diff --git a/qmk/.github/workflows/api.yml b/qmk/.github/workflows/api.yml index 2d09089b..dfb1b588 100644 --- a/qmk/.github/workflows/api.yml +++ b/qmk/.github/workflows/api.yml @@ -13,6 +13,9 @@ jobs: runs-on: ubuntu-latest container: qmkfm/base_container + # protect against those who develop with their fork on master + if: github.repository == 'qmk/qmk_firmware' + steps: - uses: actions/checkout@v2 with: diff --git a/qmk/.github/workflows/auto_tag.yaml b/qmk/.github/workflows/auto_tag.yaml new file mode 100644 index 00000000..29e85c41 --- /dev/null +++ b/qmk/.github/workflows/auto_tag.yaml @@ -0,0 +1,33 @@ +name: Essential files modified + +on: + push: + branches: + - master + paths: + - quantum/**/* + - tmk_core/**/* + - drivers/**/* + - tests/**/* + - util/**/* + - platforms/**/* + - Makefile + - '*.mk' + +jobs: + tag: + runs-on: ubuntu-latest + + # protect against those who develop with their fork on master + if: github.repository == 'qmk/qmk_firmware' + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Bump version and push tag + uses: anothrNick/github-tag-action@1.26.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEFAULT_BUMP: 'patch' diff --git a/qmk/.github/workflows/develop_api.yml b/qmk/.github/workflows/develop_api.yml new file mode 100644 index 00000000..53a5b452 --- /dev/null +++ b/qmk/.github/workflows/develop_api.yml @@ -0,0 +1,42 @@ +name: Update Develop API Data + +on: + push: + branches: + - develop + paths: + - 'keyboards/**' + - 'layouts/community/**' + +jobs: + api_data: + runs-on: ubuntu-latest + container: qmkfm/base_container + + # protect against those who work in their fork on develop + if: github.repository == 'qmk/qmk_firmware' + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + persist-credentials: false + + - name: Generate API Data + run: qmk generate-api + + - name: Install rsync + run: | + apt-get update && apt-get install -y rsync + + - name: Upload API Data + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: main + FOLDER: api_data/v1 + CLEAN: true + GIT_CONFIG_EMAIL: hello@qmk.fm + REPOSITORY_NAME: qmk/qmk_keyboards_devel + TARGET_FOLDER: v1 diff --git a/qmk/.github/workflows/develop_update.yml b/qmk/.github/workflows/develop_update.yml new file mode 100644 index 00000000..285720fe --- /dev/null +++ b/qmk/.github/workflows/develop_update.yml @@ -0,0 +1,37 @@ +name: Update develop after master merge + +on: + push: + branches: + - master + + +jobs: + develop_update: + runs-on: ubuntu-latest + + if: github.repository == 'qmk/qmk_firmware' + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Checkout develop + run: | + git fetch origin master develop + git checkout develop + + - name: Check if branch locked + id: check_locked + uses: andstor/file-existence-action@v1 + with: + files: ".locked" + + - name: Update develop from master + if: steps.check_locked.outputs.files_exists == 'false' + run: | + git config --global user.name "QMK Bot" + git config --global user.email "hello@qmk.fm" + git merge origin/master + git push origin develop diff --git a/qmk/.github/workflows/docs.yml b/qmk/.github/workflows/docs.yml new file mode 100644 index 00000000..8855d110 --- /dev/null +++ b/qmk/.github/workflows/docs.yml @@ -0,0 +1,43 @@ +name: Generate Docs + +on: + push: + branches: + - master + paths: + - 'tmk_core/**' + - 'quantum/**' + - 'platforms/**' + - 'docs/**' + - '.github/workflows/docs.yml' + +jobs: + generate: + runs-on: ubuntu-latest + container: qmkfm/base_container + + # protect against those who develop with their fork on master + if: github.repository == 'qmk/qmk_firmware' + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Install dependencies + run: | + apt-get update && apt-get install -y rsync nodejs npm doxygen + npm install -g moxygen + + - name: Build docs + run: | + qmk --verbose generate-docs + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BASE_BRANCH: master + BRANCH: gh-pages + FOLDER: .build/docs + GIT_CONFIG_EMAIL: hello@qmk.fm diff --git a/qmk/.github/workflows/format.yaml b/qmk/.github/workflows/format.yaml new file mode 100644 index 00000000..f4acb944 --- /dev/null +++ b/qmk/.github/workflows/format.yaml @@ -0,0 +1,37 @@ +name: Format Codebase + +on: + push: + branches: + - master + +jobs: + format: + runs-on: ubuntu-latest + container: qmkfm/base_container + + # protect against those who develop with their fork on master + if: github.repository == 'qmk/qmk_firmware' + + steps: + - uses: actions/checkout@v2 + with: + token: ${{ secrets.API_TOKEN_GITHUB }} + + - name: Install dependencies + run: | + apt-get update && apt-get install -y dos2unix + + - name: Format files + run: | + bin/qmk cformat -a + bin/qmk pyformat + bin/qmk fileformat + + - name: Commit files + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Format code according to conventions for $GITHUB_SHA + commit_user_name: QMK Bot + commit_user_email: hello@qmk.fm + commit_author: QMK Bot diff --git a/qmk/.github/workflows/lint.yml b/qmk/.github/workflows/lint.yml new file mode 100644 index 00000000..cd67de9d --- /dev/null +++ b/qmk/.github/workflows/lint.yml @@ -0,0 +1,55 @@ +name: PR Lint keyboards + +on: + pull_request: + paths: + - 'keyboards/**' + +jobs: + lint: + runs-on: ubuntu-latest + + container: qmkfm/base_container + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: trilom/file-changes-action@v1.2.4 + id: file_changes + with: + output: '\n' + + - name: Print info + run: | + git rev-parse --short HEAD + echo ${{ github.event.pull_request.base.sha }} + echo '${{ steps.file_changes.outputs.files}}' + + - name: Run qmk lint + shell: 'bash {0}' + run: | + QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.files}}') + QMK_KEYBOARDS=$(qmk list-keyboards) + + exit_code=0 + for KB in $QMK_KEYBOARDS; do + KEYBOARD_CHANGES=$(echo "$QMK_CHANGES" | grep -E '^(keyboards/'${KB}'/)') + if [[ -z "$KEYBOARD_CHANGES" ]]; then + # skip as no changes for this keyboard + continue + fi + + KEYMAP_ONLY=$(echo "$KEYBOARD_CHANGES" | grep -cv /keymaps/) + if [[ $KEYMAP_ONLY -gt 0 ]]; then + echo "linting ${KB}" + + qmk lint --keyboard ${KB} && qmk info -l --keyboard ${KB} + exit_code=$(($exit_code + $?)) + fi + done + if [[ $exit_code -gt 255 ]]; then + exit 255 + fi + exit $exit_code diff --git a/qmk/.travis.yml b/qmk/.travis.yml index f2e8a841..17f401da 100644 --- a/qmk/.travis.yml +++ b/qmk/.travis.yml @@ -18,21 +18,15 @@ addons: - ubuntu-toolchain-r-test - llvm-toolchain-trusty-7 packages: - - pandoc - diffutils - - dos2unix - - doxygen - clang-format-7 - libstdc++-7-dev -install: - - npm install -g moxygen script: - git fetch --depth=50 origin $TRAVIS_BRANCH:$TRAVIS_BRANCH - 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 after_script: bash util/travis_compiled_push.sh notifications: diff --git a/qmk/Makefile b/qmk/Makefile index c851e01e..a13b9286 100644 --- a/qmk/Makefile +++ b/qmk/Makefile @@ -99,40 +99,13 @@ $(eval $(call NEXT_PATH_ELEMENT)) # endif # 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)) - All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/*/rules.mk)) - - KEYMAPS_MK := $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/keymaps/*/rules.mk)) - KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/keymaps/*/rules.mk)) - KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/keymaps/*/rules.mk)) - 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)) - -# Only consider folders with makefiles, to prevent errors in case there are extra folders -#KEYBOARDS += $(patsubst $(ROOD_DIR)/keyboards/%/rules.mk,%,$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk)) - .PHONY: list-keyboards list-keyboards: - echo $(KEYBOARDS) - -define PRINT_KEYBOARD - $(info $(PRINTING_KEYBOARD)) -endef + util/list_keyboards.sh | sort -u | tr '\n' ' ' .PHONY: generate-keyboards-file generate-keyboards-file: - $(foreach PRINTING_KEYBOARD,$(KEYBOARDS),$(eval $(call PRINT_KEYBOARD))) + util/list_keyboards.sh | sort -u .PHONY: clean clean: @@ -159,7 +132,6 @@ endif # $(info Keyboard: $(KEYBOARD)) # $(info Keymap: $(KEYMAP)) # $(info Subproject: $(SUBPROJECT)) -# $(info Keyboards: $(KEYBOARDS)) # Set the default goal depending on where we are running make from @@ -272,16 +244,29 @@ endef define PARSE_RULE RULE := $1 COMMANDS := + REQUIRE_PLATFORM_KEY := # 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,all-avr),true) + KEYBOARD_RULE=all + REQUIRE_PLATFORM_KEY := avr + $$(eval $$(call PARSE_ALL_KEYBOARDS)) + else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-chibios),true) + KEYBOARD_RULE=all + REQUIRE_PLATFORM_KEY := chibios + $$(eval $$(call PARSE_ALL_KEYBOARDS)) + else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-arm_atsam),true) + KEYBOARD_RULE=all + REQUIRE_PLATFORM_KEY := arm_atsam + $$(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) + else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(shell util/list_keyboards.sh | sort -u)),true) KEYBOARD_RULE=$$(MATCHED_ITEM) $$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM))) # Otherwise use the KEYBOARD variable, which is determined either by @@ -398,7 +383,7 @@ endef # if we are going to compile all keyboards, match the rest of the rule # for each of them define PARSE_ALL_KEYBOARDS - $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(KEYBOARDS))) + $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(shell util/list_keyboards.sh noci | sort -u))) endef # $1 Subproject @@ -447,7 +432,7 @@ define PARSE_KEYMAP # Format it in bold KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR) # Specify the variables that we are passing forward to submake - MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) + MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY) # And the first part of the make command MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET) # The message to display @@ -466,6 +451,8 @@ define BUILD LOG=$$$$($$(MAKE_CMD) $$(MAKE_VARS) SILENT=true 2>&1) ; \ if [ $$$$? -gt 0 ]; \ then $$(PRINT_ERROR_PLAIN); \ + elif [ "$$$$LOG" = "skipped" ] ; \ + then $$(PRINT_SKIPPED_PLAIN); \ elif [ "$$$$LOG" != "" ] ; \ then $$(PRINT_WARNING_PLAIN); \ else \ @@ -637,12 +624,13 @@ else endif ifndef SKIP_VERSION BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") +else +BUILD_DATE := 2020-01-01-00:00:00 +endif + $(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) $(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) $(shell echo '#define CHIBIOS_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h) $(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_VERSION)"' >> $(ROOT_DIR)/quantum/version.h) -else -BUILD_DATE := NA -endif include $(ROOT_DIR)/testlist.mk diff --git a/qmk/build_keyboard.mk b/qmk/build_keyboard.mk index b4e1efd9..e87dcb8f 100644 --- a/qmk/build_keyboard.mk +++ b/qmk/build_keyboard.mk @@ -317,6 +317,13 @@ SRC += $(TMK_COMMON_SRC) OPT_DEFS += $(TMK_COMMON_DEFS) EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS) +SKIP_COMPILE := no +ifneq ($(REQUIRE_PLATFORM_KEY),) + ifneq ($(REQUIRE_PLATFORM_KEY),$(PLATFORM_KEY)) + SKIP_COMPILE := yes + endif +endif + include $(TMK_PATH)/$(PLATFORM_KEY).mk ifneq ($(strip $(PROTOCOL)),) include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk @@ -352,7 +359,13 @@ $(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(GFXINC) $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG) # Default target. +ifeq ($(SKIP_COMPILE),no) all: build check-size +else +all: + echo "skipped" >&2 +endif + build: elf cpfirmware check-size: build objs-size: build diff --git a/qmk/build_test.mk b/qmk/build_test.mk index d13d9a51..e705c6a3 100644 --- a/qmk/build_test.mk +++ b/qmk/build_test.mk @@ -49,6 +49,7 @@ endif include common_features.mk include $(TMK_PATH)/common.mk +include $(QUANTUM_PATH)/sequencer/tests/rules.mk include $(QUANTUM_PATH)/serial_link/tests/rules.mk ifneq ($(filter $(FULL_TESTS),$(TEST)),) include build_full_test.mk diff --git a/qmk/common.mk b/qmk/common.mk index aea29a7a..c13b5e27 100644 --- a/qmk/common.mk +++ b/qmk/common.mk @@ -21,4 +21,5 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras COMMON_VPATH += $(QUANTUM_PATH)/audio COMMON_VPATH += $(QUANTUM_PATH)/process_keycode COMMON_VPATH += $(QUANTUM_PATH)/api +COMMON_VPATH += $(QUANTUM_PATH)/sequencer COMMON_VPATH += $(DRIVER_PATH) diff --git a/qmk/common_features.mk b/qmk/common_features.mk index 5f232d5f..8ac53ec4 100644 --- a/qmk/common_features.mk +++ b/qmk/common_features.mk @@ -17,9 +17,15 @@ SERIAL_PATH := $(QUANTUM_PATH)/serial_link QUANTUM_SRC += \ $(QUANTUM_DIR)/quantum.c \ + $(QUANTUM_DIR)/led.c \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c +ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes) + OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE + CONSOLE_ENABLE = yes +endif + ifeq ($(strip $(API_SYSEX_ENABLE)), yes) OPT_DEFS += -DAPI_SYSEX_ENABLE OPT_DEFS += -DAPI_ENABLE @@ -38,6 +44,13 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes) SRC += $(QUANTUM_DIR)/audio/luts.c endif +ifeq ($(strip $(SEQUENCER_ENABLE)), yes) + OPT_DEFS += -DSEQUENCER_ENABLE + MUSIC_ENABLE = yes + SRC += $(QUANTUM_DIR)/sequencer/sequencer.c + SRC += $(QUANTUM_DIR)/process_keycode/process_sequencer.c +endif + ifeq ($(strip $(MIDI_ENABLE)), yes) OPT_DEFS += -DMIDI_ENABLE MUSIC_ENABLE = yes @@ -155,12 +168,14 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) endif endif -VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom LED_MATRIX_ENABLE ?= no -ifneq ($(strip $(LED_MATRIX_ENABLE)), no) - ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) - $(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type) +VALID_LED_MATRIX_TYPES := IS31FL3731 custom +# TODO: IS31FL3733 IS31FL3737 IS31FL3741 + +ifeq ($(strip $(LED_MATRIX_ENABLE)), yes) + ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),) + $(error LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type) else BACKLIGHT_ENABLE = yes BACKLIGHT_DRIVER = custom @@ -168,21 +183,22 @@ ifneq ($(strip $(LED_MATRIX_ENABLE)), no) SRC += $(QUANTUM_DIR)/led_matrix.c SRC += $(QUANTUM_DIR)/led_matrix_drivers.c endif -endif -ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731) - OPT_DEFS += -DIS31FL3731 - COMMON_VPATH += $(DRIVER_PATH)/issi - SRC += is31fl3731-simple.c - QUANTUM_LIB_SRC += i2c_master.c + ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731) + OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE + COMMON_VPATH += $(DRIVER_PATH)/issi + SRC += is31fl3731-simple.c + QUANTUM_LIB_SRC += i2c_master.c + endif endif RGB_MATRIX_ENABLE ?= no +VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom -ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) -ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),) - $(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type) -endif +ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) + ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),) + $(error "$(RGB_MATRIX_DRIVER)" is not a valid matrix type) + endif OPT_DEFS += -DRGB_MATRIX_ENABLE ifneq (,$(filter $(MCU), atmega16u2 atmega32u2)) # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines @@ -193,51 +209,47 @@ endif SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c CIE1931_CURVE := yes RGB_KEYCODES_ENABLE := yes -endif -ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) - RGB_MATRIX_ENABLE := IS31FL3731 -endif + ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731) + OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE + COMMON_VPATH += $(DRIVER_PATH)/issi + SRC += is31fl3731.c + QUANTUM_LIB_SRC += i2c_master.c + endif -ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731) - OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE - COMMON_VPATH += $(DRIVER_PATH)/issi - SRC += is31fl3731.c - QUANTUM_LIB_SRC += i2c_master.c -endif + ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3733) + OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE + COMMON_VPATH += $(DRIVER_PATH)/issi + SRC += is31fl3733.c + QUANTUM_LIB_SRC += i2c_master.c + endif -ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3733) - OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE - COMMON_VPATH += $(DRIVER_PATH)/issi - SRC += is31fl3733.c - QUANTUM_LIB_SRC += i2c_master.c -endif + ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3737) + OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE + COMMON_VPATH += $(DRIVER_PATH)/issi + SRC += is31fl3737.c + QUANTUM_LIB_SRC += i2c_master.c + endif -ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737) - OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE - COMMON_VPATH += $(DRIVER_PATH)/issi - SRC += is31fl3737.c - QUANTUM_LIB_SRC += i2c_master.c -endif + ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3741) + OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE + COMMON_VPATH += $(DRIVER_PATH)/issi + SRC += is31fl3741.c + QUANTUM_LIB_SRC += i2c_master.c + endif -ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3741) - OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE - COMMON_VPATH += $(DRIVER_PATH)/issi - SRC += is31fl3741.c - QUANTUM_LIB_SRC += i2c_master.c -endif + ifeq ($(strip $(RGB_MATRIX_DRIVER)), WS2812) + OPT_DEFS += -DWS2812 + WS2812_DRIVER_REQUIRED := yes + endif -ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812) - OPT_DEFS += -DWS2812 - WS2812_DRIVER_REQUIRED := yes -endif + ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes) + OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB + endif -ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes) - OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB -endif - -ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes) - OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER + ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes) + OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER + endif endif ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes) @@ -443,11 +455,14 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes) # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called. # Unused functions are pruned away, which is why we can add multiple drivers here without bloat. ifeq ($(PLATFORM),AVR) - QUANTUM_LIB_SRC += i2c_master.c \ - i2c_slave.c + ifneq ($(NO_I2C),yes) + QUANTUM_LIB_SRC += i2c_master.c \ + i2c_slave.c + endif endif SERIAL_DRIVER ?= bitbang + OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]')) ifeq ($(strip $(SERIAL_DRIVER)), bitbang) QUANTUM_LIB_SRC += serial.c else diff --git a/qmk/docs/ChangeLog/20201128.md b/qmk/docs/ChangeLog/20201128.md new file mode 100644 index 00000000..86abd384 --- /dev/null +++ b/qmk/docs/ChangeLog/20201128.md @@ -0,0 +1,150 @@ +# QMK Breaking Change - 2020 Nov 28 Changelog + +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. + + +## Changes Requiring User Action :id=changes-requiring-user-action + +### Relocated Keyboards :id-relocated-keyboards + +#### Reduce Helix keyboard build variation ([#8669](https://github.com/qmk/qmk_firmware/pull/8669)) + +The build commands for the Helix keyboard are: + +``` +make : +``` + +For ``, specify the one in the rightmost column of the table below, such as `helix`,` helix/pico`. + +| before Oct 17 2019 | Oct 17 2019 | Mar 10 2020 | Nov 28 2020 | +| ---------------------|-------------------------|-------------------------| ------------------------| +| helix/rev1 | helix/rev1 | helix/rev1 | helix/rev1 | +| helix/pico | helix/pico | helix/pico | helix/pico | +| | helix/pico/back | helix/pico/back | helix/pico/back | +| | helix/pico/under | helix/pico/under | helix/pico/under | +| | | helix/pico/sc | -- | +| | | helix/pico/sc/back | helix/pico/sc | +| | | helix/pico/sc/under | -- | +| helix/rev2 (=helix) | helix/rev2 (=helix) | helix/rev2 (=helix) | -- | +| | helix/rev2/back | helix/rev2/back | -- | +| | helix/rev2/back/oled | helix/rev2/back/oled | ( --> helix/rev2/back) | +| | helix/rev2/oled | helix/rev2/oled | helix/rev2 (=helix) | +| | helix/rev2/oled/back | helix/rev2/oled/back | helix/rev2/back | +| | helix/rev2/oled/under | helix/rev2/oled/under | helix/rev2/under | +| | | helix/rev2/sc | -- | +| | | helix/rev2/sc/back | -- | +| | | helix/rev2/sc/oled | -- | +| | | helix/rev2/sc/oledback | helix/rev2/sc | +| | | helix/rev2/sc/oledunder | -- | +| | | helix/rev2/sc/under | -- | +| | helix/rev2/under | helix/rev2/under | -- | +| | helix/rev2/under/oled | helix/rev2/under/oled | ( --> helix/rev2/under) | + +#### Update the Speedo firmware for v3.0 ([#10657](https://github.com/qmk/qmk_firmware/pull/10657)) + +The Speedo keyboard has moved to `cozykeys/speedo/v2` as the designer prepares to release the Speedo v3.0. + +| Previous Name | New Name | +| :------------ | :------------------------- | +| speedo | cozykeys/speedo/v2 | +| -- | cozykeys/speedo/v3 **new** | + +#### Maartenwut/Maarten name change to evyd13/Evy ([#10274](https://github.com/qmk/qmk_firmware/pull/10274)) + +Maartenwut has rebranded as @evyd13, and all released Maartenwut boards have moved. + +| Previous Name | New Name | +| :--------------------- | :----------------- | +| maartenwut/atom47/rev2 | evyd13/atom47/rev2 | +| maartenwut/atom47/rev3 | evyd13/atom47/rev3 | +| maartenwut/eon40 | evyd13/eon40 | +| maartenwut/eon65 | evyd13/eon65 | +| maartenwut/eon75 | evyd13/eon75 | +| maartenwut/eon87 | evyd13/eon87 | +| maartenwut/eon95 | evyd13/eon95 | +| maartenwut/gh80_1800 | evyd13/gh80_1800 | +| maartenwut/gh80_3700 | evyd13/gh80_3700 | +| maartenwut/minitomic | evyd13/minitomic | +| maartenwut/mx5160 | evyd13/mx5160 | +| maartenwut/nt660 | evyd13/nt660 | +| maartenwut/omrontkl | evyd13/omrontkl | +| maartenwut/plain60 | evyd13/plain60 | +| maartenwut/pockettype | evyd13/pockettype | +| maartenwut/quackfire | evyd13/quackfire | +| maartenwut/solheim68 | evyd13/solheim68 | +| maartenwut/ta65 | evyd13/ta65 | +| maartenwut/wasdat | evyd13/wasdat | +| maartenwut/wasdat_code | evyd13/wasdat_code | +| maartenwut/wonderland | evyd13/wonderland | + +#### Xelus Valor and Dawn60 Refactors ([#10512](https://github.com/qmk/qmk_firmware/pull/10512), [#10584](https://github.com/qmk/qmk_firmware/pull/10584)) + +The Valor and Dawn60 keyboards by Xelus22 both now require their revisions to be specified when compiling. + +| Previous Name | New Name | +| :------------ | :---------------- | +| xelus/dawn60 | xelus/dawn60/rev1 | +| xelus/valor | xelus/valor/rev1 | + + +### Updated Keyboard Codebases :id=keyboard-updates + +#### AEboards EXT65 Refactor ([#10820](https://github.com/qmk/qmk_firmware/pull/10820)) + +The EXT65 codebase has been reworked so keymaps can be used with either revision. + + +## Core Changes :id=core-changes + +### Fixes :id=core-fixes + +* Reconnect the USB if users wake up a computer from the keyboard to restore the USB state ([#10088](https://github.com/qmk/qmk_firmware/pull/10088)) +* Fix cursor position bug in oled_write_raw functions ([#10800](https://github.com/qmk/qmk_firmware/pull/10800)) + +### Additions and Enhancements :id=core-additions + +* Allow MATRIX_ROWS to be greater than 32 ([#10183](https://github.com/qmk/qmk_firmware/pull/10183)) +* Add support for soft serial to ATmega32U2 ([#10204](https://github.com/qmk/qmk_firmware/pull/10204)) +* Allow direct control of MIDI velocity value ([#9940](https://github.com/qmk/qmk_firmware/pull/9940)) +* Joystick 16-bit support ([#10439](https://github.com/qmk/qmk_firmware/pull/10439)) +* Allow encoder resolutions to be set per encoder ([#10259](https://github.com/qmk/qmk_firmware/pull/10259)) +* Share button state from mousekey to pointing_device ([#10179](https://github.com/qmk/qmk_firmware/pull/10179)) +* Add advanced/efficient RGB Matrix Indicators ([#8564](https://github.com/qmk/qmk_firmware/pull/8564)) +* OLED display update interval support ([#10388](https://github.com/qmk/qmk_firmware/pull/10388)) +* Per-Key Retro Tapping ([#10622](https://github.com/qmk/qmk_firmware/pull/10622)) +* Allow backlight duty cycle limit ([#10260](https://github.com/qmk/qmk_firmware/pull/10260)) +* Add step sequencer feature ([#9703](https://github.com/qmk/qmk_firmware/pull/9703)) +* Added `add_oneshot_mods` & `del_oneshot_mods` ([#10549](https://github.com/qmk/qmk_firmware/pull/10549)) +* Add AT90USB support for serial.c ([#10706](https://github.com/qmk/qmk_firmware/pull/10706)) +* Auto shift: support repeats and early registration (#9826) + +### Clean-ups and Optimizations :id=core-optimizations + +* Haptic and solenoid cleanup ([#9700](https://github.com/qmk/qmk_firmware/pull/9700)) +* XD75 cleanup ([#10524](https://github.com/qmk/qmk_firmware/pull/10524)) +* Minor change to behavior allowing display updates to continue between task ticks ([#10750](https://github.com/qmk/qmk_firmware/pull/10750)) +* Change some GPIO manipulations in matrix.c to be atomic ([#10491](https://github.com/qmk/qmk_firmware/pull/10491)) +* combine repeated lines of code for ATmega32U2, ATmega16U2, ATmega328 and ATmega328P ([#10837](https://github.com/qmk/qmk_firmware/pull/10837)) +* Remove references to HD44780 ([#10735](https://github.com/qmk/qmk_firmware/pull/10735)) + + +## QMK Infrastructure and Internals :id=qmk-internals + +* Add ability to build a subset of all keyboards based on platform. ([#10420](https://github.com/qmk/qmk_firmware/pull/10420)) +* Initialise EEPROM drivers at startup, instead of upon first execution ([#10438](https://github.com/qmk/qmk_firmware/pull/10438)) +* Make bootloader_jump weak for ChibiOS ([#10417](https://github.com/qmk/qmk_firmware/pull/10417)) +* Support for STM32 GPIOF,G,H,I,J,K ([#10206](https://github.com/qmk/qmk_firmware/pull/10206)) +* Add milc as a dependency and remove the installed milc ([#10563](https://github.com/qmk/qmk_firmware/pull/10563)) +* ChibiOS upgrade: early init conversions ([#10214](https://github.com/qmk/qmk_firmware/pull/10214)) +* ChibiOS upgrade: configuration file migrator ([#9952](https://github.com/qmk/qmk_firmware/pull/9952)) +* Add definition based on currently-selected serial driver. ([#10716](https://github.com/qmk/qmk_firmware/pull/10716)) +* Allow for modification of output RGB values when using rgblight/rgb_matrix. ([#10638](https://github.com/qmk/qmk_firmware/pull/10638)) +* Allow keyboards/keymaps to execute code at each main loop iteration ([#10530](https://github.com/qmk/qmk_firmware/pull/10530)) +* qmk cformat ([#10767](https://github.com/qmk/qmk_firmware/pull/10767)) +* Add a Make variable to easily enable DEBUG_MATRIX_SCAN_RATE on the command line ([#10824](https://github.com/qmk/qmk_firmware/pull/10824)) +* update Chibios OS USB for the OTG driver ([#8893](https://github.com/qmk/qmk_firmware/pull/8893)) +* Fixup version.h writing when using `SKIP_VERSION=yes` ([#10972](https://github.com/qmk/qmk_firmware/pull/10972), [#10974](https://github.com/qmk/qmk_firmware/pull/10974)) +* Rename ledmatrix.h to match .c file ([#7949](https://github.com/qmk/qmk_firmware/pull/7949)) +* Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER ([#10231](https://github.com/qmk/qmk_firmware/pull/10231)) +* Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER ([#10840](https://github.com/qmk/qmk_firmware/pull/10840)) diff --git a/qmk/docs/_summary.md b/qmk/docs/_summary.md index 2e874fb1..19498f6a 100644 --- a/qmk/docs/_summary.md +++ b/qmk/docs/_summary.md @@ -80,6 +80,7 @@ * [One Shot Keys](one_shot_keys.md) * [Pointing Device](feature_pointing_device.md) * [Raw HID](feature_rawhid.md) + * [Sequencer](feature_sequencer.md) * [Swap Hands](feature_swap_hands.md) * [Tap Dance](feature_tap_dance.md) * [Tap-Hold Configuration](tap_hold.md) @@ -105,6 +106,7 @@ * [Encoders](feature_encoders.md) * [Haptic Feedback](feature_haptic_feedback.md) * [Joystick](feature_joystick.md) + * [LED Indicators](feature_led_indicators.md) * [Proton C Conversion](proton_c_conversion.md) * [PS/2 Mouse](feature_ps2_mouse.md) * [Split Keyboard](feature_split_keyboard.md) @@ -118,6 +120,7 @@ * [Overview](breaking_changes.md) * [My Pull Request Was Flagged](breaking_changes_instructions.md) * History + * [2020 Nov 28](ChangeLog/20201128.md) * [2020 Aug 29](ChangeLog/20200829.md) * [2020 May 30](ChangeLog/20200530.md) * [2020 Feb 29](ChangeLog/20200229.md) diff --git a/qmk/docs/breaking_changes.md b/qmk/docs/breaking_changes.md index abace816..3ee14f2b 100644 --- a/qmk/docs/breaking_changes.md +++ b/qmk/docs/breaking_changes.md @@ -6,6 +6,7 @@ The breaking change period is when we will merge PR's that change QMK in dangero ## What has been included in past Breaking Changes? +* [2020 Nov 28](ChangeLog/20201128.md) * [2020 Aug 29](ChangeLog/20200829.md) * [2020 May 30](ChangeLog/20200530.md) * [2020 Feb 29](ChangeLog/20200229.md) @@ -13,16 +14,16 @@ The breaking change period is when we will merge PR's that change QMK in dangero ## When is the next Breaking Change? -The next Breaking Change is scheduled for November 28, 2020. +The next Breaking Change is scheduled for February 27, 2021. ### Important Dates -* [x] 2020 Aug 29 - `develop` is created. It will be rebased weekly. -* [ ] 2020 Oct 31 - `develop` closed to new PR's. -* [ ] 2020 Oct 31 - Call for testers. -* [ ] 2020 Nov 26 - `master` is locked, no PR's merged. -* [ ] 2020 Nov 28 - Merge `develop` to `master`. -* [ ] 2020 Nov 28 - `master` is unlocked. PR's can be merged again. +* [x] 2020 Nov 28 - `develop` is created. Each push to `master` is subsequently merged to `develop` +* [ ] 2021 Jan 30 - `develop` closed to new PR's. +* [ ] 2021 Jan 30 - Call for testers. +* [ ] 2021 Feb 25 - `master` is locked, no PR's merged. +* [ ] 2021 Feb 27 - Merge `develop` to `master`. +* [ ] 2021 Feb 27 - `master` is unlocked. PR's can be merged again. ## What changes will be included? @@ -39,21 +40,6 @@ Criteria for acceptance: This section documents various processes we use when running the Breaking Changes process. -## Rebase `develop` from `master` - -This is run every Friday while `develop` is open. - -Process: - -``` -cd qmk_firmware -git checkout master -git pull --ff-only -git checkout develop -git rebase master -git push --force -``` - ## Creating the `develop` branch This happens immediately after the previous `develop` branch is merged. diff --git a/qmk/docs/cli_commands.md b/qmk/docs/cli_commands.md index fe6f0663..61ce1aa2 100644 --- a/qmk/docs/cli_commands.md +++ b/qmk/docs/cli_commands.md @@ -175,9 +175,27 @@ Creates a keymap.json from a keymap.c. **Usage**: ``` -qmk c2json [--no-cpp] [-o OUTPUT] filename +qmk c2json -km KEYMAP -kb KEYBOARD [-q] [--no-cpp] [-o OUTPUT] filename ``` +## `qmk lint` + +Checks over a keyboard and/or keymap and highlights common errors, problems, and anti-patterns. + +**Usage**: + +``` +qmk lint [-km KEYMAP] [-kb KEYBOARD] [--strict] +``` + +This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory. + +**Examples**: + +Do a basic lint check: + + qmk lint -kb rominronin/katana60/rev2 + ## `qmk list-keyboards` This command lists all the keyboards currently defined in `qmk_firmware` @@ -212,6 +230,16 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] ``` +## `qmk clean` + +This command cleans up the `.build` folder. If `--all` is passed, any .hex or .bin files present in the `qmk_firmware` directory will also be deleted. + +**Usage**: + +``` +qmk clean [-a] +``` + --- # Developer Commands @@ -258,6 +286,26 @@ This command starts a local HTTP server which you can use for browsing or improv qmk docs [-p PORT] ``` +## `qmk generate-docs` + +This command allows you to generate QMK documentation locally. It can be uses for general browsing or improving the docs. External tools such as [serve](https://www.npmjs.com/package/serve) can be used to browse the generated files. + +**Usage**: + +``` +qmk generate-docs +``` + +## `qmk generate-rgb-breathe-table` + +This command generates a lookup table (LUT) header file for the [RGB Lighting](feature_rgblight.md) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/`. + +**Usage**: + +``` +qmk generate-rgb-breathe-table [-q] [-o OUTPUT] [-m MAX] [-c CENTER] +``` + ## `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. @@ -299,4 +347,3 @@ This command runs the python test suite. If you make changes to python code you ``` qmk pytest ``` - diff --git a/qmk/docs/config_options.md b/qmk/docs/config_options.md index f9b1cc65..a3262b41 100644 --- a/qmk/docs/config_options.md +++ b/qmk/docs/config_options.md @@ -29,7 +29,9 @@ This level contains all of the options for that particular keymap. If you wish t This is a C header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere. The `config.h` file shouldn't be including other `config.h` files, or anything besides this: - #include "config_common.h" +```c +#include "config_common.h" +``` ## Hardware Options @@ -135,6 +137,8 @@ If you define these options you will enable the associated feature, which may in * `#define RETRO_TAPPING` * tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release * See [Retro Tapping](tap_hold.md#retro-tapping) for details +* `#define RETRO_TAPPING_PER_KEY` + * enables handling for per key `RETRO_TAPPING` settings * `#define TAPPING_TOGGLE 2` * how many taps before triggering the toggle * `#define PERMISSIVE_HOLD` diff --git a/qmk/docs/custom_quantum_functions.md b/qmk/docs/custom_quantum_functions.md index bf3a6037..694b421e 100644 --- a/qmk/docs/custom_quantum_functions.md +++ b/qmk/docs/custom_quantum_functions.md @@ -88,108 +88,6 @@ keyrecord_t record { } ``` -# LED Control - -QMK provides methods to read 5 of the LEDs defined in the HID spec: - -* Num Lock -* Caps Lock -* Scroll Lock -* Compose -* Kana - -There are two ways to get the lock LED state: - -* 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()` - -!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called. - -Two more deprecated functions exist that provide the LED state as a `uint8_t`: - -* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)` -* `uint8_t host_keyboard_leds()` - -## `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. - -By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and -return `false` when you would prefer not to run the code in `led_update_kb()`. - -Some examples include: - - - overriding the LEDs to use them for something else like layer indication - - return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior. - - play a sound when an LED turns on or off. - - return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior. - -?> 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 -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - // writePin sets the pin high for 1 and low for 0. - // In this example the pins are inverted, setting - // it low/0 turns it on, and high/1 turns the LED off. - // This behavior depends on whether the LED is between the pin - // and VCC or the pin and GND. - writePin(B0, !led_state.num_lock); - writePin(B1, !led_state.caps_lock); - writePin(B2, !led_state.scroll_lock); - writePin(B3, !led_state.compose); - writePin(B4, !led_state.kana); - } - return res; -} -``` - -### Example `led_update_user()` Implementation - -This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state. - -```c -#ifdef AUDIO_ENABLE - float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND); - float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); -#endif - -bool led_update_user(led_t led_state) { - #ifdef AUDIO_ENABLE - static uint8_t caps_state = 0; - if (caps_state != led_state.caps_lock) { - led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off); - caps_state = led_state.caps_lock; - } - #endif - return true; -} -``` - -### `led_update_*` Function Documentation - -* 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 - -Some keyboard implementations provide convenience methods for setting the state of the physical LEDs. - -### Ergodox Boards - -The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index. - -In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`. - -Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default). - # Keyboard Initialization Code There are several steps in the keyboard initialization process. Depending on what you want to do, it will influence which function you should use. @@ -287,6 +185,14 @@ This function gets called at every matrix scan, which is basically as often as t You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LEDs or a display) or other functionality that you want to trigger regularly even when the user isn't typing. +# Keyboard housekeeping + +* Keyboard/Revision: `void housekeeping_task_kb(void)` +* Keymap: `void housekeeping_task_user(void)` + +This function gets called at the end of all QMK processing, before starting the next iteration. You can safely assume that QMK has dealt with the last matrix scan at the time that these functions are invoked -- layer states have been updated, USB reports have been sent, LEDs have been updated, and displays have been drawn. + +Similar to `matrix_scan_*`, these are called as often as the MCU can handle. To keep your board responsive, it's suggested to do as little as possible during these function calls, potentially throtting their behaviour if you do indeed require implementing something special. # Keyboard Idling/Wake Code diff --git a/qmk/docs/de/newbs_testing_debugging.md b/qmk/docs/de/newbs_testing_debugging.md index acc067e1..b3907277 100644 --- a/qmk/docs/de/newbs_testing_debugging.md +++ b/qmk/docs/de/newbs_testing_debugging.md @@ -41,7 +41,9 @@ Bevorzugst Du es lieber auf der Befehlszeile zu debuggen? Dafür eignet sich das 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 +```c +#include "print.h" +``` Danach stehen dir verschiedene Druck-Funktionen zur Verfügung: diff --git a/qmk/docs/eeprom_driver.md b/qmk/docs/eeprom_driver.md index 188b95ca..e2c26254 100644 --- a/qmk/docs/eeprom_driver.md +++ b/qmk/docs/eeprom_driver.md @@ -40,6 +40,7 @@ Module | Equivalent `#define` | Source -----------------|---------------------------------|------------------------------------------ CAT24C512 EEPROM | `#define EEPROM_I2C_CAT24C512` | RM24C512C EEPROM | `#define EEPROM_I2C_RM24C512C` | +24LC64 EEPROM | `#define EEPROM_I2C_24LC64` | 24LC128 EEPROM | `#define EEPROM_I2C_24LC128` | 24LC256 EEPROM | `#define EEPROM_I2C_24LC256` | MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | diff --git a/qmk/docs/es/newbs_testing_debugging.md b/qmk/docs/es/newbs_testing_debugging.md index ef7412f1..cb65b174 100644 --- a/qmk/docs/es/newbs_testing_debugging.md +++ b/qmk/docs/es/newbs_testing_debugging.md @@ -41,7 +41,9 @@ Para plataformas compatibles, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) 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 +```c +#include "print.h" +``` Después de eso puedes utilzar algunas funciones print diferentes: diff --git a/qmk/docs/feature_auto_shift.md b/qmk/docs/feature_auto_shift.md index b21a7690..8e04d9dd 100644 --- a/qmk/docs/feature_auto_shift.md +++ b/qmk/docs/feature_auto_shift.md @@ -15,25 +15,31 @@ problem. When you tap a key, it stays depressed for a short period of time before it is then released. This depressed time is a different length for everyone. Auto Shift defines a constant `AUTO_SHIFT_TIMEOUT` which is typically set to twice your -normal pressed state time. When you press a key, a timer starts and then stops -when you release the key. 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. +normal pressed state time. When you press a key, a timer starts, and if you +have not released the key after the `AUTO_SHIFT_TIMEOUT` period, then a shifted +version of the key is emitted. If the time is less than the `AUTO_SHIFT_TIMEOUT` +time, or you press another key, then the normal state is emitted. + +If `AUTO_SHIFT_REPEAT` is defined, there is keyrepeat support. Holding the key +down will repeat the shifted key, though this can be disabled with +`AUTO_SHIFT_NO_AUTO_REPEAT`. If you want to repeat the normal key, then tap it +once then immediately (within `TAPPING_TERM`) hold it down again (this works +with the shifted value as well if auto-repeat is disabled). ## Are There Limitations to Auto Shift? Yes, unfortunately. -1. Key repeat will cease to work. For example, before if you wanted 20 'a' - characters, you could press and hold the 'a' key for a second or two. This no - longer works with Auto Shift because it is timing your depressed time instead - of emitting a depressed key state to your operating system. -2. You will have characters that are shifted when you did not intend on shifting, and - other characters you wanted shifted, but were not. This simply comes down to - practice. As we get in a hurry, we think we have hit the key long enough - for a shifted version, but we did not. On the other hand, we may think we are - tapping the keys, but really we have held it for a little longer than - anticipated. +You will have characters that are shifted when you did not intend on shifting, and +other characters you wanted shifted, but were not. This simply comes down to +practice. As we get in a hurry, we think we have hit the key long enough for a +shifted version, but we did not. On the other hand, we may think we are tapping +the keys, but really we have held it for a little longer than anticipated. + +Additionally, with keyrepeat the desired shift state can get mixed up. It will +always 'belong' to the last key pressed. For example, keyrepeating a capital +and then tapping something lowercase (whether or not it's an Auto Shift key) +will result in the capital's *key* still being held, but shift not. ## How Do I Enable Auto Shift? @@ -103,6 +109,14 @@ Do not Auto Shift numeric keys, zero through nine. Do not Auto Shift alpha characters, which include A through Z. +### AUTO_SHIFT_REPEAT (simple define) + +Enables keyrepeat. + +### AUTO_SHIFT_NO_AUTO_REPEAT (simple define) + +Disables automatically keyrepeating when `AUTO_SHIFT_TIMEOUT` is exceeded. + ## Using Auto Shift Setup This will enable you to define three keys temporarily to increase, decrease and report your `AUTO_SHIFT_TIMEOUT`. diff --git a/qmk/docs/feature_backlight.md b/qmk/docs/feature_backlight.md index 6bb2bbed..a558af64 100644 --- a/qmk/docs/feature_backlight.md +++ b/qmk/docs/feature_backlight.md @@ -62,14 +62,15 @@ Valid driver values are `pwm`, `software`, `custom` or `no`. See below for help To configure the backlighting, `#define` these in your `config.h`: -|Define |Default |Description | -|---------------------|-------------|-------------------------------------------------------------------------------------| -|`BACKLIGHT_PIN` |*Not defined*|The pin that controls the LED(s) | -|`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` |`1` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low| +| Define | Default | Description | +|------------------------|---------------|-------------------------------------------------------------------------------------------------------------------| +| `BACKLIGHT_PIN` | *Not defined* | The pin that controls the LED(s) | +| `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` | `1` | The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low | +| `BACKLIGHT_LIMIT_VAL ` | `255` | The maximum duty cycle of the backlight -- `255` allows for full brightness, any lower will decrease the maximum. | Unless you are designing your own keyboard, you generally should not need to change the `BACKLIGHT_PIN` or `BACKLIGHT_ON_STATE`. diff --git a/qmk/docs/feature_encoders.md b/qmk/docs/feature_encoders.md index 8f9ba1a8..e2cafdac 100644 --- a/qmk/docs/feature_encoders.md +++ b/qmk/docs/feature_encoders.md @@ -32,13 +32,20 @@ Additionally, the resolution, which defines how many pulses the encoder register #define ENCODER_RESOLUTION 4 ``` +It can also be defined per-encoder, by instead defining: + +```c +#define ENCODER_RESOLUTIONS { 4, 2 } +``` + ## 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: +If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout (and optionally, resolutions) for the right half like this: ```c #define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a } #define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b } +#define ENCODER_RESOLUTIONS_RIGHT { 2, 4 } ``` ## Callbacks diff --git a/qmk/docs/feature_haptic_feedback.md b/qmk/docs/feature_haptic_feedback.md index ff7337a5..64b66310 100644 --- a/qmk/docs/feature_haptic_feedback.md +++ b/qmk/docs/feature_haptic_feedback.md @@ -42,14 +42,21 @@ 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) -| 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. | +| 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. | +|`SOLENOID_DWELL_STEP_SIZE` | `1` ms |The step size to use when `HPT_DWL*` keycodes are sent | +|`SOLENOID_DEFAULT_BUZZ` | `0` (disabled) |On HPT_RST buzz is set "on" if this is "1" | +|`SOLENOID_BUZZ_ACTUATED` | `SOLENOID_MIN_DWELL` |Actuated-time when the solenoid is in buzz mode | +|`SOLENOID_BUZZ_NONACTUATED` | `SOLENOID_MIN_DWELL` |Non-Actuated-time when the solenoid is in buzz mode | -?> Dwell time is how long the "plunger" stays activated. The dwell time changes how the solenoid sounds. +* If solenoid buzz is off, then dwell time is how long the "plunger" stays activated. The dwell time changes how the solenoid sounds. +* If solenoid buzz is on, then dwell time sets the length of the buzz, while `SOLENOID_BUZZ_ACTUATED` and `SOLENOID_BUZZ_NONACTUATED` set the (non-)actuation times withing the buzz period. +* With the current implementation, for any of the above time settings, the precision of these settings may be affected by how fast the keyboard is able to scan the matrix. + Therefore, if the keyboards scanning routine is slow, it may be preferable to set `SOLENOID_DWELL_STEP_SIZE` to a value slightly smaller than the time it takes to scan the keyboard. 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. diff --git a/qmk/docs/feature_joystick.md b/qmk/docs/feature_joystick.md index be3c781f..12bbf5b3 100644 --- a/qmk/docs/feature_joystick.md +++ b/qmk/docs/feature_joystick.md @@ -141,6 +141,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } ``` +### Axis Resolution + +By default, the resolution of each axis is 8 bit, giving a range of -127 to +127. If you need higher precision, you can increase it by defining eg. `JOYSTICK_AXES_RESOLUTION 12` in your `config.h`. The resolution must be between 8 and 16. + +Note that the supported AVR MCUs have a 10-bit ADC, and 12-bit for most STM32 MCUs. + ### Triggering Joystick Buttons Joystick buttons are normal Quantum keycodes, defined as `JS_BUTTON0` to `JS_BUTTON31`, depending on the number of buttons you have configured. diff --git a/qmk/docs/feature_led_indicators.md b/qmk/docs/feature_led_indicators.md new file mode 100644 index 00000000..10e095ab --- /dev/null +++ b/qmk/docs/feature_led_indicators.md @@ -0,0 +1,116 @@ +# LED Indicators + +QMK provides methods to read 5 of the LEDs defined in the HID spec: + +* Num Lock +* Caps Lock +* Scroll Lock +* Compose +* Kana + +There are three ways to get the lock LED state: +* by specifying configuration options within `config.h` +* 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()` + +!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called. + +Two more deprecated functions exist that provide the LED state as a `uint8_t`: + +* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)` +* `uint8_t host_keyboard_leds()` + +## Configuration Options + +To configure the indicators, `#define` these in your `config.h`: + +|Define |Default |Description | +|---------------------|-------------|-------------------------------------------| +|`LED_NUM_LOCK_PIN` |*Not defined*|The pin that controls the `Num Lock` LED | +|`LED_CAPS_LOCK_PIN` |*Not defined*|The pin that controls the `Caps Lock` LED | +|`LED_SCROLL_LOCK_PIN`|*Not defined*|The pin that controls the `Scroll Lock` LED| +|`LED_COMPOSE_PIN` |*Not defined*|The pin that controls the `Compose` LED | +|`LED_KANA_PIN` |*Not defined*|The pin that controls the `Kana` LED | +|`LED_PIN_ON_STATE` |`1` |The state of the indicator pins when the LED is "on" - `1` for high, `0` for low| + +Unless you are designing your own keyboard, you generally should not need to change the above config options. + +## `led_update_*()` + +When the configuration options do not provide enough flexibility, the API hooks provided allow custom control of the LED behavior. These functions will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter. + +By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and +return `false` when you would prefer not to run the code in `led_update_kb()`. + +Some examples include: + + - overriding the LEDs to use them for something else like layer indication + - return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior. + - play a sound when an LED turns on or off. + - return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior. + +?> 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 +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + // writePin sets the pin high for 1 and low for 0. + // In this example the pins are inverted, setting + // it low/0 turns it on, and high/1 turns the LED off. + // This behavior depends on whether the LED is between the pin + // and VCC or the pin and GND. + writePin(B0, !led_state.num_lock); + writePin(B1, !led_state.caps_lock); + writePin(B2, !led_state.scroll_lock); + writePin(B3, !led_state.compose); + writePin(B4, !led_state.kana); + } + return res; +} +``` + +### Example `led_update_user()` Implementation + +This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state. + +```c +#ifdef AUDIO_ENABLE + float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND); + float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); +#endif + +bool led_update_user(led_t led_state) { + #ifdef AUDIO_ENABLE + static uint8_t caps_state = 0; + if (caps_state != led_state.caps_lock) { + led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off); + caps_state = led_state.caps_lock; + } + #endif + return true; +} +``` + +### `led_update_*` Function Documentation + +* 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 + +Some keyboard implementations provide convenience methods for setting the state of the physical LEDs. + +### Ergodox Boards + +The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index. + +In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`. + +Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default). diff --git a/qmk/docs/feature_led_matrix.md b/qmk/docs/feature_led_matrix.md index 372407b9..a4e9d7eb 100644 --- a/qmk/docs/feature_led_matrix.md +++ b/qmk/docs/feature_led_matrix.md @@ -10,7 +10,8 @@ If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_r There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: - LED_MATRIX_ENABLE = IS31FL3731 + LED_MATRIX_ENABLE = yes + LED_MATRIX_DRIVER = IS31FL3731 You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`: diff --git a/qmk/docs/feature_macros.md b/qmk/docs/feature_macros.md index acd40d1b..3752b324 100644 --- a/qmk/docs/feature_macros.md +++ b/qmk/docs/feature_macros.md @@ -182,7 +182,9 @@ Which would send Left Control+`a` (Left Control down, `a`, Left Control up) - no By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap: - #include +```c +#include "sendstring_colemak.h" +``` ### Strings in Memory diff --git a/qmk/docs/feature_mouse_keys.md b/qmk/docs/feature_mouse_keys.md index a6b46bc1..ffde1338 100644 --- a/qmk/docs/feature_mouse_keys.md +++ b/qmk/docs/feature_mouse_keys.md @@ -140,3 +140,7 @@ To use constant speed mode, you must at least define `MK_COMBINED` in your keyma ```c #define MK_COMBINED ``` + +## Use with PS/2 Mouse and Pointing Device + +Mouse keys button state is shared with [PS/2 mouse](feature_ps2_mouse.md) and [pointing device](feature_pointing_device.md) so mouse keys button presses can be used for clicks and drags. diff --git a/qmk/docs/feature_oled_driver.md b/qmk/docs/feature_oled_driver.md index 9f0ef166..44202487 100644 --- a/qmk/docs/feature_oled_driver.md +++ b/qmk/docs/feature_oled_driver.md @@ -150,6 +150,7 @@ void oled_task_user(void) { |`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.| |`OLED_BRIGHTNESS` |`255` |The default brightness level of the OLED, from 0 to 255. | +|`OLED_UPDATE_INTERVAL` |`0` |Set the time interval for updating the OLED display in ms. This will improve the matrix scan rate. | ## 128x64 & Custom sized OLED Displays diff --git a/qmk/docs/feature_rgb_matrix.md b/qmk/docs/feature_rgb_matrix.md index b70a5fcb..f8b06535 100644 --- a/qmk/docs/feature_rgb_matrix.md +++ b/qmk/docs/feature_rgb_matrix.md @@ -11,7 +11,8 @@ If you want to use single color LED's you should use the [LED Matrix Subsystem]( There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: ```makefile -RGB_MATRIX_ENABLE = IS31FL3731 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = IS31FL3731 ``` Configure the hardware via your `config.h`: @@ -62,7 +63,8 @@ Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet] There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: ```makefile -RGB_MATRIX_ENABLE = IS31FL3733 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = IS31FL3733 ``` Configure the hardware via your `config.h`: @@ -112,7 +114,8 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet]( 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`: ```makefile -RGB_MATRIX_ENABLE = WS2812 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 ``` Configure the hardware via your `config.h`: @@ -482,6 +485,14 @@ void rgb_matrix_indicators_kb(void) { } ``` +In addition, there are the advanced indicator functions. These are aimed at those with heavily customized displays, where rendering every LED per cycle is expensive. Such as some of the "drashna" layouts. This includes a special macro to help make this easier to use: `RGB_MATRIX_INDICATOR_SET_COLOR(i, r, g, b)`. + +```c +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); +} +``` + ### Suspended state :id=suspended-state To use the suspend feature, make sure that `#define RGB_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file. diff --git a/qmk/docs/feature_rgblight.md b/qmk/docs/feature_rgblight.md index 23b2886e..762056b3 100644 --- a/qmk/docs/feature_rgblight.md +++ b/qmk/docs/feature_rgblight.md @@ -41,6 +41,8 @@ Changing the **Hue** cycles around the circle.
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.
Changing the **Value** sets the overall brightness.
+![QMK Color Wheel with HSV Values](https://i.imgur.com/vkYVo66.jpg) + ## Keycodes |Key |Aliases |Description | diff --git a/qmk/docs/feature_sequencer.md b/qmk/docs/feature_sequencer.md new file mode 100644 index 00000000..8c8587a9 --- /dev/null +++ b/qmk/docs/feature_sequencer.md @@ -0,0 +1,88 @@ +# Sequencer + +Since QMK has experimental support for MIDI, you can now turn your keyboard into a [step sequencer](https://en.wikipedia.org/wiki/Music_sequencer#Step_sequencers)! + +!> **IMPORTANT:** This feature is highly experimental, it has only been tested on a Planck EZ so far. Also, the scope will be limited to support the drum machine use-case to start with. + +## Enable the step sequencer + +Add the following line to your `rules.mk`: + +```make +SEQUENCER_ENABLE = yes +``` + +By default the sequencer has 16 steps, but you can override this setting in your `config.h`: + +```c +#define SEQUENCER_STEPS 32 +``` + +## Tracks + +You can program up to 8 independent tracks with the step sequencer. Select the tracks you want to edit, enable or disable some steps, and start the sequence! + +## Resolutions + +While the tempo defines the absolute speed at which the sequencer goes through the steps, the resolution defines the granularity of these steps (from coarser to finer). + +|Resolution |Description | +|---------- |----------- | +|`SQ_RES_2` |Every other beat | +|`SQ_RES_2T` |Every 1.5 beats | +|`SQ_RES_4` |Every beat | +|`SQ_RES_4T` |Three times per 2 beats| +|`SQ_RES_8` |Twice per beat | +|`SQ_RES_8T` |Three times per beat | +|`SQ_RES_16` |Four times per beat | +|`SQ_RES_16T` |Six times per beat | +|`SQ_RES_32` |Eight times per beat | + +## Keycodes + +|Keycode |Description | +|------- |----------- | +|`SQ_ON` |Start the step sequencer | +|`SQ_OFF` |Stop the step sequencer | +|`SQ_TOG` |Toggle the step sequencer playback | +|`SQ_SALL`|Enable all the steps | +|`SQ_SCLR`|Disable all the steps | +|`SQ_S(n)`|Toggle the step `n` | +|`SQ_TMPD`|Decrease the tempo | +|`SQ_TMPU`|Increase the tempo | +|`SQ_R(n)`|Set the resolution to n | +|`SQ_RESD`|Change to the slower resolution | +|`SQ_RESU`|Change to the faster resolution | +|`SQ_T(n)`|Set `n` as the only active track or deactivate all | + +## Functions + +|Function |Description | +|-------- |----------- | +|`bool is_sequencer_on(void);` |Return whether the sequencer is playing | +|`void sequencer_toggle(void);` |Toggle the step sequencer playback | +|`void sequencer_on(void);` |Start the step sequencer | +|`void sequencer_off(void);` |Stop the step sequencer | +|`bool is_sequencer_step_on(uint8_t step);` |Return whether the step is currently enabled | +|`void sequencer_set_step(uint8_t step, bool value);` |Enable or disable the step | +|`void sequencer_set_step_on();` |Enable the step | +|`void sequencer_set_step_off();` |Disable the step | +|`void sequencer_toggle_step(uint8_t step);` |Toggle the step | +|`void sequencer_set_all_steps(bool value);` |Enable or disable all the steps | +|`void sequencer_set_all_steps_on();` |Enable all the steps | +|`void sequencer_set_all_steps_off();` |Disable all the steps | +|`uint8_t sequencer_get_tempo(void);` |Return the current tempo | +|`void sequencer_set_tempo(uint8_t tempo);` |Set the tempo to `tempo` (between 1 and 255) | +|`void sequencer_increase_tempo(void);` |Increase the tempo | +|`void sequencer_decrease_tempo(void);` |Decrease the tempo | +|`sequencer_resolution_t sequencer_get_resolution(void);` |Return the current resolution | +|`void sequencer_set_resolution(sequencer_resolution_t resolution);` |Set the resolution to `resolution` | +|`void sequencer_increase_resolution(void);` |Change to the faster resolution | +|`void sequencer_decrease_resolution(void);` |Change to the slower resolution | +|`bool is_sequencer_track_active(uint8_t track);` |Return whether the track is active | +|`void sequencer_set_track_activation(uint8_t track, bool value);` |Activate or deactivate the `track` | +|`void sequencer_toggle_track_activation(uint8_t track);` |Toggle the `track` | +|`void sequencer_activate_track(uint8_t track);` |Activate the `track` | +|`void sequencer_deactivate_track(uint8_t track);` |Deactivate the `track` | +|`void sequencer_toggle_single_active_track(uint8_t track);` |Set `track` as the only active track or deactivate all | + diff --git a/qmk/docs/feature_split_keyboard.md b/qmk/docs/feature_split_keyboard.md index f054f365..b2341142 100644 --- a/qmk/docs/feature_split_keyboard.md +++ b/qmk/docs/feature_split_keyboard.md @@ -237,6 +237,26 @@ This sets the maximum timeout when detecting master/slave when using `SPLIT_USB_ ``` This sets the poll frequency when detecting master/slave when using `SPLIT_USB_DETECT` +## Hardware Considerations and Mods + +While most any Pro Micro can be used, micro controllers like the AVR Teensys and most (if not all) ARM boards require the Split USB Detect. + +However, with the Teensy 2.0 and Teensy++ 2.0, there is a simple hardware mod that you can perform to add VBUS detection, so you don't need the Split USB detection option. + +You'll only need a few things: + +* A knife (x-acto knife, ideally) +* A solder station or hot air station +* An appropriate Schottky diode, such as the [PMEG2005EH](https://www.digikey.com/en/products/detail/nexperia-usa-inc/PMEG2005EH,115/1589924) + +You'll need to cut the small trace between the 5V and center pads on the back of the Teensy. + +Once you have done that, you will want to solder the diode from the 5V pad to the center pad. + +You may need to use the 5V pad from the regulator block above as the pads were too small and placed too closely together to place the Schottky diode properly. + +![Teensy++ 2.0](https://i.imgur.com/BPEC5n5.png) + ## 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. diff --git a/qmk/docs/feature_userspace.md b/qmk/docs/feature_userspace.md index 77a6c8d7..8b001e3c 100644 --- a/qmk/docs/feature_userspace.md +++ b/qmk/docs/feature_userspace.md @@ -184,7 +184,7 @@ If you wanted to consolidate macros and other functions into your userspace for First, you'd want to go through all of your `keymap.c` files and replace `process_record_user` with `process_record_keymap` instead. This way, you can still use keyboard specific codes on those boards, and use your custom "global" keycodes as well. You'll also want to replace `SAFE_RANGE` with `NEW_SAFE_RANGE` so that you wont have any overlapping keycodes -Then add `#include ` to all of your keymap.c files. This allows you to use these new keycodes without having to redefine them in each keymap. +Then add `#include ".h"` to all of your keymap.c files. This allows you to use these new keycodes without having to redefine them in each keymap. Once you've done that, you'll want to set the keycode definitions that you need to the `.h` file. For instance: ```c diff --git a/qmk/docs/fr-fr/newbs_testing_debugging.md b/qmk/docs/fr-fr/newbs_testing_debugging.md index 680d7644..0307429e 100644 --- a/qmk/docs/fr-fr/newbs_testing_debugging.md +++ b/qmk/docs/fr-fr/newbs_testing_debugging.md @@ -42,7 +42,9 @@ Vous préférez une solution basée sur le terminal? [hid_listen](https://www.pj 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 +```c +#include "print.h" +``` Une fois fait, vous pouvez utiliser les fonctions print suivantes: diff --git a/qmk/docs/hardware_keyboard_guidelines.md b/qmk/docs/hardware_keyboard_guidelines.md index d49d0d09..742b5657 100644 --- a/qmk/docs/hardware_keyboard_guidelines.md +++ b/qmk/docs/hardware_keyboard_guidelines.md @@ -3,6 +3,25 @@ Since starting, QMK has grown by leaps and bounds thanks to people like you who contribute to creating and maintaining our community keyboards. As we've grown we've discovered some patterns that work well, and ask that you conform to them to make it easier for other people to benefit from your hard work. +## Use QMK Lint + +We have provided a tool, `qmk lint`, which will let you check over your keyboard for problems. We suggest using it frequently while working on your keyboard and keymap. + +Example passing check: + +``` +$ qmk lint -kb rominronin/katana60/rev2 +Ψ Lint check passed! +``` + +Example failing check: + +``` +$ qmk lint -kb clueboard/66/rev3 +☒ Missing keyboards/clueboard/66/rev3/readme.md +☒ Lint check failed! +``` + ## Naming Your Keyboard/Project All keyboard names are in lower case, consisting only of letters, numbers, and underscore (`_`). Names may not begin with an underscore. Forward slash (`/`) is used as a sub-folder separation character. diff --git a/qmk/docs/index.html b/qmk/docs/index.html index 68bd00f6..5cab97a5 100644 --- a/qmk/docs/index.html +++ b/qmk/docs/index.html @@ -46,6 +46,7 @@ '/unicode': '/feature_unicode', '/python_development': '/cli_development', '/getting_started_build_tools':'/newbs_getting_started', + '/tutorial':'/newbs', }, basePath: '/', name: 'QMK Firmware', diff --git a/qmk/docs/internals_gpio_control.md b/qmk/docs/internals_gpio_control.md index 48eaf887..7c222894 100644 --- a/qmk/docs/internals_gpio_control.md +++ b/qmk/docs/internals_gpio_control.md @@ -21,3 +21,22 @@ The following functions can provide basic control of GPIOs and are found in `qua ## Advanced Settings :id=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. + +## Atomic Operation + +The above functions are not always guaranteed to work atomically. Therefore, if you want to prevent interruptions in the middle of operations when using multiple combinations of the above functions, use the following `ATOMIC_BLOCK_FORCEON` macro. + +eg. +```c +void some_function() { + // some process + ATOMIC_BLOCK_FORCEON { + // Atomic Processing + } + // some process +} +``` + +`ATOMIC_BLOCK_FORCEON` forces interrupts to be disabled before the block is executed, without regard to whether they are enabled or disabled. Then, after the block is executed, the interrupt is enabled. + +Note that `ATOMIC_BLOCK_FORCEON` can therefore be used if you know that interrupts are enabled before the execution of the block, or if you know that it is OK to enable interrupts at the completion of the block. diff --git a/qmk/docs/ja/config_options.md b/qmk/docs/ja/config_options.md index 67e97303..170beade 100644 --- a/qmk/docs/ja/config_options.md +++ b/qmk/docs/ja/config_options.md @@ -34,7 +34,9 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 これは最初に include されるものの 1 つである C ヘッダファイルで、プロジェクト全体(もし含まれる場合)にわたって持続します。多くの変数をここで設定し、他の場所からアクセスすることができます。`config.h` ファイルでは、以下のもの以外の、他の `config.h` ファイルやその他のファイルの include をしないでください: - #include "config_common.h" +```c +#include "config_common.h" +``` ## ハードウェアオプション diff --git a/qmk/docs/ja/feature_led_matrix.md b/qmk/docs/ja/feature_led_matrix.md index b2595f99..e7b60f59 100644 --- a/qmk/docs/ja/feature_led_matrix.md +++ b/qmk/docs/ja/feature_led_matrix.md @@ -15,7 +15,8 @@ RGB LED を使いたい場合は、代わりに [RGB マトリックスサブシ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED マトリックスライトのための基本的なサポートがあります:有効にするには、`rules.mk` に以下を追加します: - LED_MATRIX_ENABLE = IS31FL3731 + LED_MATRIX_ENABLE = yes + LED_MATRIX_DRIVER = IS31FL3731 1から4個の IS31FL3731 IC を使うことができます。キーボード上に存在しない IC の `LED_DRIVER_ADDR_` 定義を指定しないでください。`config.h` に以下の項目を定義することができます: diff --git a/qmk/docs/ja/feature_macros.md b/qmk/docs/ja/feature_macros.md index 5fbe3672..14a58ad2 100644 --- a/qmk/docs/ja/feature_macros.md +++ b/qmk/docs/ja/feature_macros.md @@ -187,7 +187,9 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) { デフォルトでは、QWERTY レイアウトの US キーマップを想定しています; それを変更したい場合(例えば OS がソフトウェア Colemak を使う場合)、キーマップのどこかに以下を含めます: - #include +```c +#include "sendstring_colemak.h" +``` ### メモリ内の文字列 diff --git a/qmk/docs/ja/feature_userspace.md b/qmk/docs/ja/feature_userspace.md index d0d46f63..b0c113d1 100644 --- a/qmk/docs/ja/feature_userspace.md +++ b/qmk/docs/ja/feature_userspace.md @@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { 最初に、全ての `keymap.c` ファイルを調べ、代わりに `process_record_user` を `process_record_keymap` に置き換えます。この方法では、これらのキーボードでキーボード固有のコードを使用でき、カスタムの "global" キーコードも使うことができます。また、`SAFE_RANGE` を `NEW_SAFE_RANGE` に置き換えて、キーコードが重複しないようにすることもできます。 -次に、全ての keymap.c ファイルに `#include ` を追加します。これにより、各キーマップでそれらを再定義することなく新しいキーコードを使うことができます。 +次に、全ての keymap.c ファイルに `#include ".h"` を追加します。これにより、各キーマップでそれらを再定義することなく新しいキーコードを使うことができます。 それが完了したら、必要なキーコードの定義を `.h` ファイルに設定します。例えば: ```c diff --git a/qmk/docs/ja/newbs_testing_debugging.md b/qmk/docs/ja/newbs_testing_debugging.md index b80e09fc..41103bae 100644 --- a/qmk/docs/ja/newbs_testing_debugging.md +++ b/qmk/docs/ja/newbs_testing_debugging.md @@ -45,7 +45,9 @@ void keyboard_post_init_user(void) { [custom code](ja/custom_quantum_functions.md)内からデバッグメッセージを出力すると便利な場合があります。それはとても簡単です。ファイルの先頭に`print.h`のインクルードを追加します: - #include +```c +#include "print.h" +``` そのあとは、いくつかの異なった print 関数を使用することが出来ます。 diff --git a/qmk/docs/ko-kr/README.md b/qmk/docs/ko-kr/README.md new file mode 100644 index 00000000..881b4b5a --- /dev/null +++ b/qmk/docs/ko-kr/README.md @@ -0,0 +1,33 @@ +# 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 컴워어, QMK 툴박스, 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/) 이용할때 매우 편리합니다. 또한 QMK는 ChibiOS를 사용하여 ARM기반의 컨트롤러로도 사용할수 있습니다. 마지막으로 QMK는 커스텀회로와 핸드와이어드 키보드을 작동시키는데에도 사용가능합니다. + + +## 설치하기 + +만약 당신이 QMK에 키보드, 키맵, 또는 새로운 기능을 추가하고싶다면, 가장쉬운 방법은 Github를 통해 [저장소(REPO)를 추가하고]((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`)을 통해 클론을 만들수 있습니다. + +## 컴파일 + +먼저 컴파일을 하기전 AVR 이나 ARM [개발환경](getting_started_build_tools.md)을 구축해야 합니다. 모든준비가 끝났다면 `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/qmk/docs/ko-kr/getting_started_build_tools.md b/qmk/docs/ko-kr/getting_started_build_tools.md new file mode 100644 index 00000000..3aae69d2 --- /dev/null +++ b/qmk/docs/ko-kr/getting_started_build_tools.md @@ -0,0 +1,156 @@ +# 컴파일 도구 설치 + +이 페이지는 QMK 컴파일 환경을 설치하는 방법을 설명합니다. 이 페이지는 AVR 프로세서들(예를 들면 atmega32u4와 비슷한)을 위한 가이드를 제공합니다 + + + + +**노트:** 만약 당신이 처음 시작한다면 [입문자를 위한 가이드](newbs.md)페이지를 확인하세요. + +계속하기전에 당신의 서브모듈(외부라이브러리)이 최신인지 `make git-submodule`을 사용하여 확인하세요. + +## 리눅스 + +당신이 항상 최신 파일을 가지고 있는지는 `sudo util/qmk_install.sh`을 이용하여 간단히 확인할 수 있습니다. 이 명령어는 당신이 필요한 모든 속성물(dependencies)를 설치할 것입니다. **이 명령어는 `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 +``` + +당신이 사용하는 패키지 매니져에서 이러한 방법으로 설치하십시요. + +데비안 / 우분투 예시: + + 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 + +페도라 / 레드햇 예시: + + 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 + +아치 / 맨자로(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를 리눅스 또는 맥에서 사용중이라면 `nix-shell`를 root 디렉토리에서 사용하여 컴파일 환경의 구축할 수 있습니다. + +기본적으로 다음 커맨드는 AVR과 ARM 컴파일러를 설치할것입니다. 만약 필요 없다면 `avr` 또는 `arm`을 인수에서 해제할 수 있습니다. + + nix-shell --arg arm false + +## 맥 +당신이 홈브루([homebrew](http://brew.sh/))를 사용한다면, 다음을 입력하세요. + + brew tap osx-cross/avr + brew tap PX4/homebrew-px4 + brew update + brew install avr-gcc@7 + brew link --force avr-gcc@7 + brew install dfu-programmer + brew install dfu-util + brew install gcc-arm-none-eabi + brew install avrdude + +이 방법을 가장 추천합니다. 만약 홈브루가 없다면 커맨드라인 환경에서 매우 편한 [Homebrew](http://brew.sh/)를 다운받는 것을 추천합니다. 참고로 `avr-gcc@7`를 설치하는 중 `make`과 `make install`는 대개 20분 넘게 걸리고 CPU 사용량이 높아집니다. + +## msys2를 사용하는 윈도우 (추천) +윈도우 비스타 부터 최신버젼까지 가장추천되는 환경은 [msys2](http://www.msys2.org)를 이용하는 것입니다. (윈도우 7과 윈도우 10에서 모두 테스트되었음) + +* 이 사이트에 있는 설명을 이용해 msys2를 설치하세요: http://www.msys2.org +* ``MSYS2 MingGW 64-bit`` 를 여세요 +* QMK폴더로 이동하세요. c드라이브 루트에 있는경우: + * `$ cd /c/qmk_firmware` +* `util/qmk_install.sh`을 실행시키고 나오는데요 따라하세요 + +### 크리에이터 업데이트 +만약 당신의 윈도우 10이 크리에이터 업데이트 버전 또는 더 높은 버전이라면 바로 컴파일과 프로그램 업로드(flashing)를 할 수 있습니다. 크리에이터 업데이트 전 버전이라면 컴파일만 가능합니다. 만약 당신이 잘 모르겠거나 업데이트된 버전이 아니라면 [이 링크](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update)를 확인해 보십시오. + +### 리눅스용 윈도우 하위 시스템 사용 (Windows10 Subsystem for Linux) +크리에이터 업데이트에 추가로 만약 당신이 리눅스용 윈도우 하위 시스템이 필요하다면 이 링크에서 다운받으십시오: [설명](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/) + +만약 당신이 이미 리눅스용 윈도우 하위 시스템을 Anniversary업데이트를 통해 받았다면 이 링크에서 16.04LTS로 업데이트 하는것을 추천합니다. 왜냐하면 업데이트 없이는 일부키보드가 14.04LTS에 포함되있는 도구들로 컴파일되지 않을수 있기때문입니다 : [WSL 업데이트](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/) + + +### Git +만약 당신이 이미 파일을 로컬로 복제하였다면 이 섹션을 무시하십시요. + +당신은 파일을 기본적인 git을 사용하여 로컬로 복제해야 합니다. **주의, WSL Git을 사용하면 안됩니다** [Git](https://git-scm.com/download/win) 이 링크에서 git을 다운받고 설치하십시오. +그리고 [기본설정](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), 유저네임과 이메일을 설정하는 것은 만약 당신이 온라인에 기여할 계획이라면 매우 중요합니다. + +Git의 설치가 완료되었다면 Git Bash커맨드을 열고 당신의 복제 QMK파일이 있는 위치로 이동하고 `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`를 실행 시키십니오. 이 커맨드는 새로운 `qmk_firmware`폴더를 이미 존재하는 것의 하위 폴더설정으로 생성할 것입니다. + +### 도구(Toolchain) 설정 +기본적으로 도구설정은 리눅스용 윈도우 하위 시스템이 설치될때 자동으로 설정됩니다. 하지만 수동적으로 하고 싶다면 여기 설명이 있습니다. (If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. ) + +1. "Bash On Ubuntu On Windows" 을 실행시키십시오. +2. 당신이 `qmk_firmware`를 복제한 위치로 가십시오. WSL(리눅스용 윈도우 하위 시스템 사용)에서 `/mnt/`로 시작되는 패스를 찾으십시오. 즉 당신은 다음과 같은 형식으로 입력해야 합니다. `cd /mnt/c/path/to/qmk_firmware` (Note that the paths start with `/mnt/`in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`.) +3. `util/wsl_install.sh`를 실행시키고 화면에 나오는 지시를 따르십니오. +4. Bash command window를 재실행 시키십시오. +5. 이로써 당신은 컴파일과 프로그램 업로드(flashing)을 위한 준비가 모두 끝났습니다. + +### 중요한 참고사항 +*`util/wsl_install.sh` 명령어를 다시 실행시켜 최신 업데이트를 다운받을 수 있습니다. +* QMK 폴더의 위치는 윈도우 파일시스템을 기반으로 해야 됩니다. WSL는 외부실행파일를 작동 시킬수 없기 때문이죠. +* WSL의 Git은 윈도우용 Git과 **호환되지 않습니다** +* 파일을 수정하는 것은 WSL안과 밖에서 모두 가능합니다 하지만 만약 .makefile 혹은 .sh를 수정한다면 유닉스 라인엔딩(Unix line endings)을 지원하는 에디터를 사용하는지 확인하십이오. 그렇지 않다면 컴파일이 되지않을 수도 있습니다. + +## 윈두우 (비스타 혹은 더 최신) (비추천) + +이 섹션은 윈도우 비스타 혹은 더 최신버젼을 위한 오래된 설명입니다. [MSYS2](#windows-with-msys2-recommended)를 사용하는 것을 더 추천합니다. + +1. WinAVR을 설치하였다면 먼저 삭제하십시오. +2. [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. 만약 당신이 Infinity을 기반으로 하는 키보드에 프로그램 업로드를(flashing) 할거라면 dfu-util을 설치해야 합니다, [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware) 를 참고 하십시오. +4. [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download)를 설치하십시오. 설치중 윈도우화면에서 GUI 추가 설치 옵션을 해재하십니오. **기본 설치 위치를 바꾸지 마십시오.** 이 명령어는 기본위치를 기반으로 하고 있습니다. +5. 레파지토리를 복제하십시오. [이 링크로 압축파일을 받고 앞축해제 하십시오.](https://github.com/qmk/qmk_firmware/archive/master.zip) 윈도우 탐색기에서 다운받은 파일을 여십시오. +6. `\util` 폴더를 여십시오. +7. `1-setup-path-win` .bat파일을 더블클릭해서 실행시키시오. 유저 계정 설정 변경을 허용해야될 수도 있습니다. 스페이스바를 눌러 설치가 성공적으로 완료되었다는 메세지를 닫을 수 있습니다. +8. `2-setup-environment-win` .bat파일에 우클릭해서 '관리자 권한으로 실행'으로 실행시키십시오. 이 작업을 꽤 오래 걸릴 수도 있습니다. 또한 드라이버 설정을 승인해야 될 수도 있습니다. 하지만 이 모든것이 끝나면 당신의 시스템의 설정이 모두 끝났습니다. + +만약 이 작업을 하는데에 문제가 있어 도움받고 싶다면 *Win_Check_Output.txt*을 생성하는 것이 도움이 될것입니다. 이 파일은 `Win_Check.bat`을 `\util`폴더에서 실행시켜 생성할 수 있습니다. + +## 도커(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`파일을 프로그램 업로드를(flashing) 위해 QMK디랙토리에 생성할것입니다. 만약 `:keymap`이 생략된다면 `default`이 기본을로 사용됩니다. 참고로 여기서 사용되는 인수는 `make` 커맨드를 사용하여 컴파일할때와 동일합니다. + + +또한 스크립트를 그냥 아무 인수 없이도 사용가능합니다. 그렇게 된다면 프로그램은 하나씩 자동으로 인수입력을 요구 할것입니다. 어쩌면 이방법이 더 쉬울 수도 있습니다. +```bash +util/docker_build.sh +# 인수을 입력받습니다.(아무것도 쓰지 않고 놔두는면 기본값으로 설정됩니다) +``` + +다음과 같이 `target`를 사용하여 컴파일과 프로그램 업로드(flashing)을 동시에 할수도 있습니다. +```bash +util/docker_build.sh keyboard:keymap:target +# 예: util/docker_build.sh planck/rev6:default:dfu-util +``` +만약 당시이 리눅스를 사용한다면 이 커맨드들은 추가 설정 없이 바로 작동할 것입니다. 하지만 위도우 또는 맥 환경에서는 [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/)를 사용하여야 이 커맨드들을 사용가능합니다. Docker Machine설정은 꽤 지루하고 짜증남으로 추천하지 않고 [QMK Toolbox](https://github.com/qmk/qmk_toolbox)를 사용하는 것을 추천합니다. + +!> 윈도우에서 독커는 [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v)을 활성화 설정하여야 사용가능합니다. 즉, 도커는 Hyper-V를 지원하지 않는 윈도우 7, 윈도우 8, 그리고 **윈도우 10 홈**과 같은 윈도우 버전에서 사용할수 없다는 것을 의미합니다. + +## Vagrant +만약 컴웨어를 사용하는데 문제가 있다면 Vagrant라는 이름의 툴을 사용해 볼 수 있습니다. 이 툴은 가상환경을 세팅해줌과 동시에 컴웨어를 사용하는데에 필요한 모든 설정을 해줄 것입니다. OLKB는 가상환경에 파일을 호스팅하지 않습니다. [Vagrant 가이드](getting_started_vagrant.md)에서 더 많은 정보를 확인할 수 있습니다. diff --git a/qmk/docs/ko-kr/getting_started_getting_help.md b/qmk/docs/ko-kr/getting_started_getting_help.md new file mode 100644 index 00000000..2ae7917a --- /dev/null +++ b/qmk/docs/ko-kr/getting_started_getting_help.md @@ -0,0 +1,17 @@ +# 도움 받기 + +QMK에서 도움을 받는 방법은 다양합니다. + +**주의, 아래 링크들은 영어로 이루어져 있으며 영어 사용이 가능해야 편리하게 이용할 수 있습니다.** + +## 디스코드 실시간 채팅 + +[QMK 디스코드 서버](https://discord.gg/Uq7gcHh)에서 QMK 개발자들과 실시간으로 대화를 나눌수있습니다. 이 디스코드에는 펌웨어, 툴박스, 하드웨어, 그리고 컨피겨레이터(configurator)에 관한 특별화된 채널이 운영되고 있습니다. + +## OLKB 서브레딧 + +공식 QMK 포럼은 [reddit.com](https://reddit.com) 에 [/r/olkb](https://reddit.com/r/olkb)입니다. + +## Github 이슈 + +[issue on GitHub](https://github.com/qmk/qmk_firmware/issues)에서 문제를 보고 할 수 있습니다. 이 링크는 문제가 오랜 시간을 필요로하거나 디버깅를 요구 할때 매우 유용합니다. diff --git a/qmk/docs/ko-kr/getting_started_github.md b/qmk/docs/ko-kr/getting_started_github.md new file mode 100644 index 00000000..2ff0ccb7 --- /dev/null +++ b/qmk/docs/ko-kr/getting_started_github.md @@ -0,0 +1,67 @@ +# QMK와 함께 Github를 사용하는 방법 + +Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK. + +Github는 자주 사용하는 사람이 아니면 좀 여려울수도 있습니다. 이 문서는 Github를 사용하는데 필요한 forking, cloning 그리고 submitting a pull request with QMK를 설명할 것입니다. + +?> 이 가이드는 당신이 git커맨드를 사용하는데 익숙하고 git환경을 당신의 시스템이 설치하였다는 전제하에 작성되었습니다. + +아래와 같이 [QMK Github 페이지](https://github.com/qmk/qmk_firmware)에서 당신은 "Fork"라고 쓰여있는 버튼을 볼 수 있습니다 + +![Fork on Github](http://i.imgur.com/8Toomz4.jpg) + +만약 당신이 어느기관 소속이고, 무슨 계정을 사용할것인지 골라야 한다면 개인 계정을 사용하는 것을 추천합니다. +"Fork"가 성공적으로 끝났다면 아래 보이는 "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. +``` + +당신은 이제 모든파일이 로컬시스템이 추가 되었습니다 그리고 이제 키맵을 추가하거나 컴파일, 프로그램 업로드(flashing)를 할 수 있습니다. +모든 추가 변경을 만든 뒤에는 add, commit, and push를 사용하여 당신의 Folk에 추가 할 수 있습니다. + +``` +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의 Folk에 추가 되었습니다. (`https://github.com//qmk_firmware`)에서 확인하고 "New Pull Request"를 눌러 변경사항을 QMK에 업로드할수 있습니다. + +![New Pull Request](http://i.imgur.com/DxMHpJ8.jpg) + +이 버튼을 누르면 당신이 만든 모든 변경사항들이 보여질 것입니다. 만약 모든 변경사항이 맘에 든다면 "Create Pull Request"를 눌러 요청을 확정할수 있습니다. + +**요청사항이 확정된다고 변경사항이 바로 적용되는 것은 아닙니다.** + +![Create Pull Request](http://i.imgur.com/Ojydlaj.jpg) + +요청을 한뒤 QMK개발자들은 댓글로 무엇이 변경되었는지 등을 물어 볼수있지만 끝에는 매인 디랙토리로 업로드 될것입니다. + +**"Thanks for contributing to QMK :)"** diff --git a/qmk/docs/newbs.md b/qmk/docs/newbs.md index 389e3f47..02b0a070 100644 --- a/qmk/docs/newbs.md +++ b/qmk/docs/newbs.md @@ -1,4 +1,4 @@ -# The Complete Newbs Guide To QMK +# The QMK Tutorial Your computer keyboard has a processor inside of it, similar to the one inside your computer. This processor runs software that is responsible for detecting button presses and informing the computer when keys are pressed. QMK Firmware fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom keymap, you are creating an executable program for your keyboard. diff --git a/qmk/docs/newbs_getting_started.md b/qmk/docs/newbs_getting_started.md index dfb2d54f..eee087e4 100644 --- a/qmk/docs/newbs_getting_started.md +++ b/qmk/docs/newbs_getting_started.md @@ -60,9 +60,12 @@ After Homebrew is installed run this command: You will need to install Git and Python. It's very likely that you already have both, but if not, one of the following commands should install them: -* Debian / Ubuntu / Devuan: `sudo apt install git python3 python3-pip` -* Fedora / Red Hat / CentOS: `sudo yum install git python3 python3-pip` -* Arch / Manjaro: `sudo pacman -S git python python-pip python-setuptools libffi` +* Debian / Ubuntu / Devuan: `sudo apt install -y git python3-pip` +* Fedora / Red Hat / CentOS: `sudo yum -y install git python3-pip` +* Arch / Manjaro: `sudo pacman --needed --noconfirm -S git python-pip libffi` +* Void: `sudo xbps-install -y git python3-pip` +* Solus: `sudo eopkg -y install git python3` +* Sabayon: `sudo equo install dev-vcs/git dev-python/pip` Install the global CLI to bootstrap your system: diff --git a/qmk/docs/newbs_testing_debugging.md b/qmk/docs/newbs_testing_debugging.md index 18123890..834fed71 100644 --- a/qmk/docs/newbs_testing_debugging.md +++ b/qmk/docs/newbs_testing_debugging.md @@ -36,7 +36,9 @@ Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_l Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file: - #include +```c +#include "print.h" +``` After that you can use a few different print functions: diff --git a/qmk/docs/one_shot_keys.md b/qmk/docs/one_shot_keys.md index aa3db5ac..9a082d7d 100644 --- a/qmk/docs/one_shot_keys.md +++ b/qmk/docs/one_shot_keys.md @@ -22,7 +22,7 @@ Sometimes, you want to activate a one-shot key as part of a macro or tap dance r For one shot layers, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`. -For one shot mods, you need to call `set_oneshot_mods(MOD)` to set it, or `clear_oneshot_mods()` to cancel it. +For one shot mods, you need to call `set_oneshot_mods(MOD_BIT(KC_*))` to set it, or `clear_oneshot_mods()` to cancel it. !> If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop. diff --git a/qmk/docs/pr_checklist.md b/qmk/docs/pr_checklist.md index 22e8a3fe..e0dd0770 100644 --- a/qmk/docs/pr_checklist.md +++ b/qmk/docs/pr_checklist.md @@ -73,6 +73,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard - commented-out functions removed too - `matrix_init_board()` etc. migrated to `keyboard_pre_init_kb()`, see: [keyboard_pre_init*](https://docs.qmk.fm/#/custom_quantum_functions?id=keyboard_pre_init_-function-documentation) - prefer `CUSTOM_MATRIX = lite` if custom matrix used, allows for standard debounce, see [custom matrix 'lite'](https://docs.qmk.fm/#/custom_matrix?id=lite) + - prefer LED indicator [Configuration Options](https://docs.qmk.fm/#/feature_led_indicators?id=configuration-options) to custom `led_update_*()` implementations where possible - `keyboard.h` - `#include "quantum.h"` appears at the top - `LAYOUT` macros should use standard definitions if applicable diff --git a/qmk/docs/tap_hold.md b/qmk/docs/tap_hold.md index 9ffbfde8..aacff400 100644 --- a/qmk/docs/tap_hold.md +++ b/qmk/docs/tap_hold.md @@ -179,6 +179,25 @@ Holding and releasing a dual function key without pressing another key will resu For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead. +For more granular control of this feature, you can add the following to your `config.h`: + +```c +#define RETRO_TAPPING_PER_KEY +``` + +You can then add the following function to your keymap: + +```c +bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(2, KC_SPACE): + return true; + default: + return false; + } +} +``` + ## Why do we include the key record for the per key functions? One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that. diff --git a/qmk/docs/ws2812_driver.md b/qmk/docs/ws2812_driver.md index c1b96329..da5db01d 100644 --- a/qmk/docs/ws2812_driver.md +++ b/qmk/docs/ws2812_driver.md @@ -28,6 +28,17 @@ The default setting is 280 µs, which should work for most cases, but this can b #define WS2812_TRST_US 80 ``` +#### Byte Order + +Some variants of the WS2812 may have their color components in a different physical or logical order. For example, the WS2812B-2020 has physically swapped red and green LEDs, which causes the wrong color to be displayed, because the default order of the bytes sent over the wire is defined as GRB. +In this case, you can change the byte order by defining `WS2812_BYTE_ORDER` as one of the following values: + +| Byte order | Known devices | +|-----------------------------------|-------------------------------| +| `WS2812_BYTE_ORDER_GRB` (default) | Most WS2812's, SK6812, SK6805 | +| `WS2812_BYTE_ORDER_RGB` | WS2812B-2020 | + + ### Bitbang Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk: diff --git a/qmk/docs/zh-cn/newbs_testing_debugging.md b/qmk/docs/zh-cn/newbs_testing_debugging.md index 4edceee4..38e6346c 100644 --- a/qmk/docs/zh-cn/newbs_testing_debugging.md +++ b/qmk/docs/zh-cn/newbs_testing_debugging.md @@ -34,7 +34,9 @@ void keyboard_post_init_user(void) { 有时用[custom code](custom_quantum_functions.md)发送自定义调试信息很有用. 这么做很简单. 首先在你文件头部包含`print.h`: - #include +```c +#include "print.h" +``` 之后,您可以使用一些不同的打印功能: diff --git a/qmk/drivers/avr/serial.c b/qmk/drivers/avr/serial.c index c27cbfdd..526a0946 100644 --- a/qmk/drivers/avr/serial.c +++ b/qmk/drivers/avr/serial.c @@ -20,50 +20,111 @@ #ifdef SOFT_SERIAL_PIN -# ifdef __AVR_ATmega32U4__ -// if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. -# ifdef USE_AVR_I2C -# if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 -# error Using ATmega32U4 I2C, so can not use PD0, PD1 -# endif +# if !(defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) +# error serial.c is not supported for the currently selected MCU +# endif +// if using ATmega32U4/2, AT90USBxxx I2C, can not use PD0 and PD1 in soft serial. +# if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) +# if defined(USE_AVR_I2C) && (SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1) +# error Using I2C, so can not use PD0, PD1 # endif +# endif +// PD0..PD3, common config +# if SOFT_SERIAL_PIN == D0 +# define EIMSK_BIT _BV(INT0) +# define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) +# define SERIAL_PIN_INTERRUPT INT0_vect +# define EICRx EICRA +# elif SOFT_SERIAL_PIN == D1 +# define EIMSK_BIT _BV(INT1) +# define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) +# define SERIAL_PIN_INTERRUPT INT1_vect +# define EICRx EICRA +# elif SOFT_SERIAL_PIN == D2 +# define EIMSK_BIT _BV(INT2) +# define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) +# define SERIAL_PIN_INTERRUPT INT2_vect +# define EICRx EICRA +# elif SOFT_SERIAL_PIN == D3 +# define EIMSK_BIT _BV(INT3) +# define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) +# define SERIAL_PIN_INTERRUPT INT3_vect +# define EICRx EICRA +# endif -# define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF)) -# define setPinOutput(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF)) -# define writePinHigh(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF)) -# define writePinLow(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF)) -# define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF))) +// ATmegaxxU2 specific config +# if defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) +// PD4(INT5), PD6(INT6), PD7(INT7), PC7(INT4) +# if SOFT_SERIAL_PIN == D4 +# define EIMSK_BIT _BV(INT5) +# define EICRx_BIT (~(_BV(ISC50) | _BV(ISC51))) +# define SERIAL_PIN_INTERRUPT INT5_vect +# define EICRx EICRB +# elif SOFT_SERIAL_PIN == D6 +# define EIMSK_BIT _BV(INT6) +# define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) +# define SERIAL_PIN_INTERRUPT INT6_vect +# define EICRx EICRB +# elif SOFT_SERIAL_PIN == D7 +# define EIMSK_BIT _BV(INT7) +# define EICRx_BIT (~(_BV(ISC70) | _BV(ISC71))) +# define SERIAL_PIN_INTERRUPT INT7_vect +# define EICRx EICRB +# elif SOFT_SERIAL_PIN == C7 +# define EIMSK_BIT _BV(INT4) +# define EICRx_BIT (~(_BV(ISC40) | _BV(ISC41))) +# define SERIAL_PIN_INTERRUPT INT4_vect +# define EICRx EICRB +# endif +# endif -# if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 -# if SOFT_SERIAL_PIN == D0 -# define EIMSK_BIT _BV(INT0) -# define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) -# define SERIAL_PIN_INTERRUPT INT0_vect -# elif SOFT_SERIAL_PIN == D1 -# define EIMSK_BIT _BV(INT1) -# define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) -# define SERIAL_PIN_INTERRUPT INT1_vect -# elif SOFT_SERIAL_PIN == D2 -# define EIMSK_BIT _BV(INT2) -# define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) -# define SERIAL_PIN_INTERRUPT INT2_vect -# elif SOFT_SERIAL_PIN == D3 -# define EIMSK_BIT _BV(INT3) -# define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) -# define SERIAL_PIN_INTERRUPT INT3_vect -# endif +// ATmegaxxU4 specific config +# if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) +// PE6(INT6) +# if SOFT_SERIAL_PIN == E6 +# define EIMSK_BIT _BV(INT6) +# define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) +# define SERIAL_PIN_INTERRUPT INT6_vect +# define EICRx EICRB +# endif +# endif + +// AT90USBxxx specific config +# if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) +// PE4..PE7(INT4..INT7) +# if SOFT_SERIAL_PIN == E4 +# define EIMSK_BIT _BV(INT4) +# define EICRx_BIT (~(_BV(ISC40) | _BV(ISC41))) +# define SERIAL_PIN_INTERRUPT INT4_vect +# define EICRx EICRB +# elif SOFT_SERIAL_PIN == E5 +# define EIMSK_BIT _BV(INT5) +# define EICRx_BIT (~(_BV(ISC50) | _BV(ISC51))) +# define SERIAL_PIN_INTERRUPT INT5_vect +# define EICRx EICRB # elif SOFT_SERIAL_PIN == E6 # 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 +# define EICRx EICRB +# elif SOFT_SERIAL_PIN == E7 +# define EIMSK_BIT _BV(INT7) +# define EICRx_BIT (~(_BV(ISC70) | _BV(ISC71))) +# define SERIAL_PIN_INTERRUPT INT7_vect +# define EICRx EICRB # endif - -# else -# error serial.c now support ATmega32U4 only # endif +# ifndef SERIAL_PIN_INTERRUPT +# error invalid SOFT_SERIAL_PIN value +# endif + +# define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF)) +# define setPinOutput(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF)) +# define writePinHigh(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF)) +# define writePinLow(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF)) +# define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF))) + # define ALWAYS_INLINE __attribute__((always_inline)) # define NO_INLINE __attribute__((noinline)) # define _delay_sub_us(x) __builtin_avr_delay_cycles(x) @@ -210,15 +271,9 @@ void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) { Transaction_table_size = (uint8_t)sstd_table_size; serial_input_with_pullup(); - // Enable INT0-INT3,INT6 + // Enable INT0-INT7 EIMSK |= EIMSK_BIT; -# if SOFT_SERIAL_PIN == E6 - // Trigger on falling edge of INT6 - EICRB &= EICRx_BIT; -# else - // Trigger on falling edge of INT0-INT3 - EICRA &= EICRx_BIT; -# endif + EICRx &= EICRx_BIT; } // Used by the sender to synchronize timing with the reciver. diff --git a/qmk/drivers/avr/spi_master.c b/qmk/drivers/avr/spi_master.c index f91baf70..cbec9f36 100644 --- a/qmk/drivers/avr/spi_master.c +++ b/qmk/drivers/avr/spi_master.c @@ -140,27 +140,33 @@ spi_status_t spi_read() { } spi_status_t spi_transmit(const uint8_t *data, uint16_t length) { - spi_status_t status = SPI_STATUS_ERROR; + spi_status_t status; for (uint16_t i = 0; i < length; i++) { status = spi_write(data[i]); + + if (status < 0) { + return status; + } } - return status; + return SPI_STATUS_SUCCESS; } spi_status_t spi_receive(uint8_t *data, uint16_t length) { - spi_status_t status = SPI_STATUS_ERROR; + spi_status_t status; for (uint16_t i = 0; i < length; i++) { status = spi_read(); - if (status > 0) { + if (status >= 0) { data[i] = status; + } else { + return status; } } - return (status < 0) ? status : SPI_STATUS_SUCCESS; + return SPI_STATUS_SUCCESS; } void spi_stop(void) { diff --git a/qmk/drivers/chibios/analog.c b/qmk/drivers/chibios/analog.c index 6f6db640..2b3872af 100644 --- a/qmk/drivers/chibios/analog.c +++ b/qmk/drivers/chibios/analog.c @@ -16,7 +16,7 @@ #include "quantum.h" #include "analog.h" -#include "ch.h" +#include #include #if !HAL_USE_ADC diff --git a/qmk/drivers/chibios/i2c_master.c b/qmk/drivers/chibios/i2c_master.c index 4bd8e2af..fc4bb2ab 100644 --- a/qmk/drivers/chibios/i2c_master.c +++ b/qmk/drivers/chibios/i2c_master.c @@ -58,18 +58,23 @@ static i2c_status_t chibios_to_qmk(const msg_t* status) { } __attribute__((weak)) void i2c_init(void) { - // Try releasing special pins for a short time - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT); + static bool is_initialised = false; + if (!is_initialised) { + is_initialised = true; - chThdSleepMilliseconds(10); + // Try releasing special pins for a short time + palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT); + palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT); + + chThdSleepMilliseconds(10); #if defined(USE_GPIOV1) - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, I2C1_SCL_PAL_MODE); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, I2C1_SDA_PAL_MODE); + palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, I2C1_SCL_PAL_MODE); + palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, I2C1_SDA_PAL_MODE); #else - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); #endif + } } i2c_status_t i2c_start(uint8_t address) { diff --git a/qmk/drivers/chibios/i2c_master.h b/qmk/drivers/chibios/i2c_master.h index b3e234e1..c68109ac 100644 --- a/qmk/drivers/chibios/i2c_master.h +++ b/qmk/drivers/chibios/i2c_master.h @@ -24,7 +24,7 @@ */ #pragma once -#include "ch.h" +#include #include #ifdef I2C1_BANK diff --git a/qmk/drivers/chibios/serial.c b/qmk/drivers/chibios/serial.c index 26c68065..54f7e132 100644 --- a/qmk/drivers/chibios/serial.c +++ b/qmk/drivers/chibios/serial.c @@ -6,7 +6,7 @@ #include "serial.h" #include "wait.h" -#include "hal.h" +#include // TODO: resolve/remove build warnings #if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) && defined(PROTOCOL_CHIBIOS) && defined(WS2812_DRIVER_BITBANG) diff --git a/qmk/drivers/chibios/serial_usart.c b/qmk/drivers/chibios/serial_usart.c index 62b4913c..a3e21f90 100644 --- a/qmk/drivers/chibios/serial_usart.c +++ b/qmk/drivers/chibios/serial_usart.c @@ -1,9 +1,9 @@ #include "quantum.h" #include "serial.h" -#include "printf.h" +#include "print.h" -#include "ch.h" -#include "hal.h" +#include +#include #ifndef USART_CR1_M0 # define USART_CR1_M0 USART_CR1_M // some platforms (f1xx) dont have this so diff --git a/qmk/drivers/chibios/spi_master.c b/qmk/drivers/chibios/spi_master.c index 552ac663..5aa60742 100644 --- a/qmk/drivers/chibios/spi_master.c +++ b/qmk/drivers/chibios/spi_master.c @@ -22,21 +22,26 @@ static pin_t currentSlavePin = NO_PIN; static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0}; __attribute__((weak)) void spi_init(void) { - // Try releasing special pins for a short time - palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_INPUT); - palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_INPUT); - palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_INPUT); + static bool is_initialised = false; + if (!is_initialised) { + is_initialised = true; - chThdSleepMilliseconds(10); + // Try releasing special pins for a short time + palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_INPUT); + palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_INPUT); + palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_INPUT); + + chThdSleepMilliseconds(10); #if defined(USE_GPIOV1) - palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL); - palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL); - palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL); + palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL); + palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL); + palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL); #else - palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); - palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); - palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); + palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); + palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); + palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); #endif + } } bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) { diff --git a/qmk/drivers/chibios/spi_master.h b/qmk/drivers/chibios/spi_master.h index 0c18587c..5953bef7 100644 --- a/qmk/drivers/chibios/spi_master.h +++ b/qmk/drivers/chibios/spi_master.h @@ -18,7 +18,7 @@ #include #include -#include +#include "quantum.h" #ifndef SPI_DRIVER # define SPI_DRIVER SPID2 diff --git a/qmk/drivers/chibios/ws2812.c b/qmk/drivers/chibios/ws2812.c index 0440cac7..59ed9037 100644 --- a/qmk/drivers/chibios/ws2812.c +++ b/qmk/drivers/chibios/ws2812.c @@ -1,7 +1,7 @@ #include "quantum.h" #include "ws2812.h" -#include "ch.h" -#include "hal.h" +#include +#include /* Adapted from https://github.com/bigjosh/SimpleNeoPixelDemo/ */ @@ -89,9 +89,16 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { for (uint8_t i = 0; i < leds; i++) { // WS2812 protocol dictates grb order +#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB) sendByte(ledarray[i].g); sendByte(ledarray[i].r); sendByte(ledarray[i].b); +#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB) + sendByte(ledarray[i].r); + sendByte(ledarray[i].g); + sendByte(ledarray[i].b); +#endif + #ifdef RGBW sendByte(ledarray[i].w); #endif diff --git a/qmk/drivers/chibios/ws2812_pwm.c b/qmk/drivers/chibios/ws2812_pwm.c index bfb44ce4..3af922c0 100644 --- a/qmk/drivers/chibios/ws2812_pwm.c +++ b/qmk/drivers/chibios/ws2812_pwm.c @@ -1,6 +1,6 @@ #include "ws2812.h" #include "quantum.h" -#include "hal.h" +#include /* Adapted from https://github.com/joewa/WS2812-LED-Driver_ChibiOS/ */ @@ -107,6 +107,7 @@ */ #define WS2812_BIT(led, byte, bit) (24 * (led) + 8 * (byte) + (7 - (bit))) +#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB) /** * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given red bit * @@ -117,7 +118,7 @@ * * @return The bit index */ -#define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 1, (bit)) +# define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 1, (bit)) /** * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit @@ -129,7 +130,7 @@ * * @return The bit index */ -#define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 0, (bit)) +# define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 0, (bit)) /** * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit @@ -141,7 +142,45 @@ * * @return The bit index */ -#define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit)) +# define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit)) + +#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB) +/** + * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given red bit + * + * @note The red byte is the middle byte in the color packet + * + * @param[in] led: The led index [0, @ref RGBLED_NUM) + * @param[in] bit: The bit number [0, 7] + * + * @return The bit index + */ +# define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 0, (bit)) + +/** + * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit + * + * @note The red byte is the first byte in the color packet + * + * @param[in] led: The led index [0, @ref RGBLED_NUM) + * @param[in] bit: The bit number [0, 7] + * + * @return The bit index + */ +# define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 1, (bit)) + +/** + * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit + * + * @note The red byte is the last byte in the color packet + * + * @param[in] led: The led index [0, @ref RGBLED_NUM) + * @param[in] bit: The bit index [0, 7] + * + * @return The bit index + */ +# define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit)) +#endif /* --- PRIVATE VARIABLES ---------------------------------------------------- */ diff --git a/qmk/drivers/chibios/ws2812_spi.c b/qmk/drivers/chibios/ws2812_spi.c index 7a1d2f05..a9334243 100644 --- a/qmk/drivers/chibios/ws2812_spi.c +++ b/qmk/drivers/chibios/ws2812_spi.c @@ -62,9 +62,15 @@ static uint8_t get_protocol_eq(uint8_t data, int pos) { static void set_led_color_rgb(LED_TYPE color, int pos) { uint8_t* tx_start = &txbuf[PREAMBLE_SIZE]; +#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB) for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + j] = get_protocol_eq(color.g, j); for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE + j] = get_protocol_eq(color.r, j); for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 2 + j] = get_protocol_eq(color.b, j); +#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB) + for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + j] = get_protocol_eq(color.r, j); + for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE + j] = get_protocol_eq(color.g, j); + for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 2 + j] = get_protocol_eq(color.b, j); +#endif } void ws2812_init(void) { diff --git a/qmk/drivers/eeprom/eeprom_i2c.c b/qmk/drivers/eeprom/eeprom_i2c.c index ca8af3da..4210f06f 100644 --- a/qmk/drivers/eeprom/eeprom_i2c.c +++ b/qmk/drivers/eeprom/eeprom_i2c.c @@ -42,14 +42,6 @@ # include "debug.h" #endif // DEBUG_EEPROM_OUTPUT -static inline void init_i2c_if_required(void) { - static int done = 0; - if (!done) { - i2c_init(); - done = 1; - } -} - static inline void fill_target_address(uint8_t *buffer, const void *addr) { uintptr_t p = (uintptr_t)addr; for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) { @@ -58,7 +50,7 @@ static inline void fill_target_address(uint8_t *buffer, const void *addr) { } } -void eeprom_driver_init(void) {} +void eeprom_driver_init(void) { i2c_init(); } void eeprom_driver_erase(void) { #if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) @@ -80,7 +72,6 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) { uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE]; fill_target_address(complete_packet, addr); - init_i2c_if_required(); i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE, 100); i2c_receive(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), buf, len, 100); @@ -98,7 +89,6 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) { uint8_t * read_buf = (uint8_t *)buf; uintptr_t target_addr = (uintptr_t)addr; - init_i2c_if_required(); while (len > 0) { uintptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE; int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset; diff --git a/qmk/drivers/eeprom/eeprom_i2c.h b/qmk/drivers/eeprom/eeprom_i2c.h index 51bce825..77eea66d 100644 --- a/qmk/drivers/eeprom/eeprom_i2c.h +++ b/qmk/drivers/eeprom/eeprom_i2c.h @@ -49,6 +49,11 @@ # define EXTERNAL_EEPROM_PAGE_SIZE 64 # define EXTERNAL_EEPROM_ADDRESS_SIZE 2 # define EXTERNAL_EEPROM_WRITE_TIME 5 +#elif defined(EEPROM_I2C_24LC64) +# define EXTERNAL_EEPROM_BYTE_COUNT 8192 +# define EXTERNAL_EEPROM_PAGE_SIZE 32 +# define EXTERNAL_EEPROM_ADDRESS_SIZE 2 +# define EXTERNAL_EEPROM_WRITE_TIME 5 #elif defined(EEPROM_I2C_MB85RC256V) # define EXTERNAL_EEPROM_BYTE_COUNT 32768 # define EXTERNAL_EEPROM_PAGE_SIZE 128 diff --git a/qmk/drivers/eeprom/eeprom_spi.c b/qmk/drivers/eeprom/eeprom_spi.c index 7b6416ea..182731d8 100644 --- a/qmk/drivers/eeprom/eeprom_spi.c +++ b/qmk/drivers/eeprom/eeprom_spi.c @@ -55,14 +55,6 @@ # include "debug.h" #endif // CONSOLE_ENABLE -static void init_spi_if_required(void) { - static int done = 0; - if (!done) { - spi_init(); - done = 1; - } -} - static bool spi_eeprom_start(void) { return spi_start(EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN, EXTERNAL_EEPROM_SPI_LSBFIRST, EXTERNAL_EEPROM_SPI_MODE, EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR); } static spi_status_t spi_eeprom_wait_while_busy(int timeout) { @@ -91,7 +83,7 @@ static void spi_eeprom_transmit_address(uintptr_t addr) { //---------------------------------------------------------------------------------------------------------------------- -void eeprom_driver_init(void) {} +void eeprom_driver_init(void) { spi_init(); } void eeprom_driver_erase(void) { #if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) @@ -110,8 +102,6 @@ void eeprom_driver_erase(void) { } void eeprom_read_block(void *buf, const void *addr, size_t len) { - init_spi_if_required(); - //------------------------------------------------- // Wait for the write-in-progress bit to be cleared bool res = spi_eeprom_start(); @@ -154,8 +144,6 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) { } void eeprom_write_block(const void *buf, void *addr, size_t len) { - init_spi_if_required(); - bool res; uint8_t * read_buf = (uint8_t *)buf; uintptr_t target_addr = (uintptr_t)addr; diff --git a/qmk/drivers/eeprom/eeprom_stm32_L0_L1.c b/qmk/drivers/eeprom/eeprom_stm32_L0_L1.c index b62e6ffd..ed26cc71 100644 --- a/qmk/drivers/eeprom/eeprom_stm32_L0_L1.c +++ b/qmk/drivers/eeprom/eeprom_stm32_L0_L1.c @@ -17,7 +17,7 @@ #include #include -#include "hal.h" +#include #include "eeprom_driver.h" #include "eeprom_stm32_L0_L1.h" diff --git a/qmk/drivers/haptic/DRV2605L.c b/qmk/drivers/haptic/DRV2605L.c index 830d629d..5de2b354 100644 --- a/qmk/drivers/haptic/DRV2605L.c +++ b/qmk/drivers/haptic/DRV2605L.c @@ -21,8 +21,6 @@ #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) { @@ -32,8 +30,7 @@ void DRV_write(uint8_t drv_register, uint8_t settings) { } uint8_t DRV_read(uint8_t regaddress) { - 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_register, 1, 100); return DRV2605L_read_register; } diff --git a/qmk/drivers/haptic/haptic.c b/qmk/drivers/haptic/haptic.c index 2ce279b7..de3f4005 100644 --- a/qmk/drivers/haptic/haptic.c +++ b/qmk/drivers/haptic/haptic.c @@ -33,11 +33,18 @@ void haptic_init(void) { 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"); +#ifdef SOLENOID_ENABLE + solenoid_set_dwell(haptic_config.dwell); +#endif + if ((haptic_config.raw == 0) +#ifdef SOLENOID_ENABLE + || (haptic_config.dwell == 0) +#endif + ) { + // this will be called, if the eeprom is not corrupt, + // but the previous firmware didn't have haptic enabled, + // or the previous firmware didn't have solenoid enabled, + // and the current one has solenoid enabled. haptic_reset(); } #ifdef SOLENOID_ENABLE @@ -118,25 +125,37 @@ void haptic_mode_decrease(void) { } void haptic_dwell_increase(void) { - uint8_t dwell = haptic_config.dwell + 1; #ifdef SOLENOID_ENABLE + int16_t next_dwell = ((int16_t)haptic_config.dwell) + SOLENOID_DWELL_STEP_SIZE; if (haptic_config.dwell >= SOLENOID_MAX_DWELL) { - dwell = 1; + // if it's already at max, we wrap back to min + next_dwell = SOLENOID_MIN_DWELL; + } else if (next_dwell > SOLENOID_MAX_DWELL) { + // if we overshoot the max, then cap at max + next_dwell = SOLENOID_MAX_DWELL; } - solenoid_set_dwell(dwell); + solenoid_set_dwell(next_dwell); +#else + int16_t next_dwell = ((int16_t)haptic_config.dwell) + 1; #endif - haptic_set_dwell(dwell); + haptic_set_dwell(next_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; + int16_t next_dwell = ((int16_t)haptic_config.dwell) - SOLENOID_DWELL_STEP_SIZE; + if (haptic_config.dwell <= SOLENOID_MIN_DWELL) { + // if it's already at min, we wrap to max + next_dwell = SOLENOID_MAX_DWELL; + } else if (next_dwell < SOLENOID_MIN_DWELL) { + // if we go below min, then we cap to min + next_dwell = SOLENOID_MIN_DWELL; } - solenoid_set_dwell(dwell); + solenoid_set_dwell(next_dwell); +#else + int16_t next_dwell = ((int16_t)haptic_config.dwell) - 1; #endif - haptic_set_dwell(dwell); + haptic_set_dwell(next_dwell); } void haptic_reset(void) { @@ -150,6 +169,12 @@ void haptic_reset(void) { #ifdef SOLENOID_ENABLE uint8_t dwell = SOLENOID_DEFAULT_DWELL; haptic_config.dwell = dwell; + haptic_config.buzz = SOLENOID_DEFAULT_BUZZ; + solenoid_set_dwell(dwell); +#else + // This is to trigger haptic_reset again, if solenoid is enabled in the future. + haptic_config.dwell = 0; + haptic_config.buzz = 0; #endif eeconfig_update_haptic(haptic_config.raw); xprintf("haptic_config.feedback = %u\n", haptic_config.feedback); diff --git a/qmk/drivers/haptic/solenoid.c b/qmk/drivers/haptic/solenoid.c index d645c379..3e61d5a1 100644 --- a/qmk/drivers/haptic/solenoid.c +++ b/qmk/drivers/haptic/solenoid.c @@ -15,7 +15,7 @@ * along with this program. If not, see . */ -#include +#include "timer.h" #include "solenoid.h" #include "haptic.h" @@ -32,14 +32,6 @@ 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--; -} - -void solenoid_dwell_plus(uint8_t solenoid_dwell) { - if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++; -} - void solenoid_set_dwell(uint8_t dwell) { solenoid_dwell = dwell; } void solenoid_stop(void) { @@ -73,7 +65,7 @@ void solenoid_check(void) { // Check whether to buzz the solenoid on and off if (haptic_config.buzz) { - if (elapsed / SOLENOID_MIN_DWELL % 2 == 0) { + if ((elapsed % (SOLENOID_BUZZ_ACTUATED + SOLENOID_BUZZ_NONACTUATED)) < SOLENOID_BUZZ_ACTUATED) { if (!solenoid_buzzing) { solenoid_buzzing = true; writePinHigh(SOLENOID_PIN); diff --git a/qmk/drivers/haptic/solenoid.h b/qmk/drivers/haptic/solenoid.h index dd6ececa..f2a3bc4c 100644 --- a/qmk/drivers/haptic/solenoid.h +++ b/qmk/drivers/haptic/solenoid.h @@ -29,6 +29,22 @@ # define SOLENOID_MIN_DWELL 4 #endif +#ifndef SOLENOID_DWELL_STEP_SIZE +# define SOLENOID_DWELL_STEP_SIZE 1 +#endif + +#ifndef SOLENOID_DEFAULT_BUZZ +# define SOLENOID_DEFAULT_BUZZ 0 +#endif + +#ifndef SOLENOID_BUZZ_ACTUATED +# define SOLENOID_BUZZ_ACTUATED SOLENOID_MIN_DWELL +#endif + +#ifndef SOLENOID_BUZZ_NONACTUATED +# define SOLENOID_BUZZ_NONACTUATED SOLENOID_MIN_DWELL +#endif + #ifndef SOLENOID_PIN # error SOLENOID_PIN not defined #endif @@ -37,8 +53,6 @@ void solenoid_buzz_on(void); void solenoid_buzz_off(void); void solenoid_set_buzz(int buzz); -void solenoid_dwell_minus(uint8_t solenoid_dwell); -void solenoid_dwell_plus(uint8_t solenoid_dwell); void solenoid_set_dwell(uint8_t dwell); void solenoid_stop(void); diff --git a/qmk/drivers/issi/is31fl3731-simple.c b/qmk/drivers/issi/is31fl3731-simple.c index bd3bb474..7c86841f 100644 --- a/qmk/drivers/issi/is31fl3731-simple.c +++ b/qmk/drivers/issi/is31fl3731-simple.c @@ -63,7 +63,7 @@ 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[LED_DRIVER_COUNT] = {false}; /* There's probably a better way to init this... */ #if LED_DRIVER_COUNT == 1 @@ -75,7 +75,7 @@ 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}}; #endif -bool g_led_control_registers_update_required = false; +bool g_led_control_registers_update_required[LED_DRIVER_COUNT] = {false}; // This is the bit pattern in the LED control registers // (for matrix A, add one to register for matrix B) @@ -190,8 +190,8 @@ void IS31FL3731_set_value(int index, uint8_t value) { is31_led led = g_is31_leds[index]; // 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[led.driver][led.v - 0x24] = value; + g_pwm_buffer_update_required[led.driver] = true; } } @@ -213,20 +213,21 @@ void IS31FL3731_set_led_control_register(uint8_t index, bool value) { g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value); } - g_led_control_registers_update_required = true; + g_led_control_registers_update_required[led.driver] = true; } void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index) { - if (g_pwm_buffer_update_required) { + 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 addr, uint8_t index) { - if (g_led_control_registers_update_required) { + 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]); } + g_led_control_registers_update_required[index] = false; } } diff --git a/qmk/drivers/oled/oled_driver.c b/qmk/drivers/oled/oled_driver.c index ba11db1d..92c64399 100644 --- a/qmk/drivers/oled/oled_driver.c +++ b/qmk/drivers/oled/oled_driver.c @@ -119,6 +119,9 @@ uint32_t oled_timeout; #if OLED_SCROLL_TIMEOUT > 0 uint32_t oled_scroll_timeout; #endif +#if OLED_UPDATE_INTERVAL > 0 +uint16_t oled_update_timeout; +#endif // Internal variables to reduce math instructions @@ -268,6 +271,10 @@ static void rotate_90(const uint8_t *src, uint8_t *dest) { } void oled_render(void) { + if (!oled_initialized) { + return; + } + // Do we have work to do? oled_dirty &= OLED_ALL_BLOCKS_MASK; if (!oled_dirty || oled_scrolling) { @@ -468,8 +475,9 @@ void oled_write_raw_byte(const char data, uint16_t index) { } 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++) { + uint16_t cursor_start_index = oled_cursor - &oled_buffer[0]; + if ((size + cursor_start_index) > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE - cursor_start_index; + for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) { if (oled_buffer[i] == data[i]) continue; oled_buffer[i] = data[i]; oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); @@ -511,8 +519,9 @@ void oled_write_ln_P(const char *data, bool invert) { } 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++) { + uint16_t cursor_start_index = oled_cursor - &oled_buffer[0]; + if ((size + cursor_start_index) > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE - cursor_start_index; + for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) { uint8_t c = pgm_read_byte(data++); if (oled_buffer[i] == c) continue; oled_buffer[i] = c; @@ -522,6 +531,10 @@ void oled_write_raw_P(const char *data, uint16_t size) { #endif // defined(__AVR__) bool oled_on(void) { + if (!oled_initialized) { + return oled_active; + } + #if OLED_TIMEOUT > 0 oled_timeout = timer_read32() + OLED_TIMEOUT; #endif @@ -538,6 +551,10 @@ bool oled_on(void) { } bool oled_off(void) { + if (!oled_initialized) { + 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) { @@ -552,6 +569,10 @@ bool oled_off(void) { bool is_oled_on(void) { return oled_active; } uint8_t oled_set_brightness(uint8_t level) { + if (!oled_initialized) { + return oled_brightness; + } + uint8_t set_contrast[] = {I2C_CMD, CONTRAST, level}; if (oled_brightness != level) { if (I2C_TRANSMIT(set_contrast) != I2C_STATUS_SUCCESS) { @@ -591,6 +612,10 @@ void oled_scroll_set_speed(uint8_t speed) { } bool oled_scroll_right(void) { + if (!oled_initialized) { + 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) { @@ -605,6 +630,10 @@ bool oled_scroll_right(void) { } bool oled_scroll_left(void) { + if (!oled_initialized) { + 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) { @@ -619,6 +648,10 @@ bool oled_scroll_left(void) { } bool oled_scroll_off(void) { + if (!oled_initialized) { + 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) { @@ -650,9 +683,16 @@ void oled_task(void) { return; } +#if OLED_UPDATE_INTERVAL > 0 + if (timer_elapsed(oled_update_timeout) >= OLED_UPDATE_INTERVAL) { + oled_update_timeout = timer_read(); + oled_set_cursor(0, 0); + oled_task_user(); + } +#else oled_set_cursor(0, 0); - oled_task_user(); +#endif #if OLED_SCROLL_TIMEOUT > 0 if (oled_dirty && oled_scrolling) { diff --git a/qmk/drivers/qwiic/micro_oled.c b/qmk/drivers/qwiic/micro_oled.c index bed6b250..c7a4ee08 100644 --- a/qmk/drivers/qwiic/micro_oled.c +++ b/qmk/drivers/qwiic/micro_oled.c @@ -28,11 +28,11 @@ * along with this program. If not, see . */ #include "micro_oled.h" -#include +#include "print.h" #include #include "util/font5x7.h" #include "util/font8x16.h" -#include "string.h" +#include #define TOTALFONTS 2 const unsigned char* fonts_pointer[] = {font5x7, font8x16}; diff --git a/qmk/drivers/ugfx/gdisp/st7565/board_st7565_template.h b/qmk/drivers/ugfx/gdisp/st7565/board_st7565_template.h index 194f8ea2..875ed9e6 100644 --- a/qmk/drivers/ugfx/gdisp/st7565/board_st7565_template.h +++ b/qmk/drivers/ugfx/gdisp/st7565/board_st7565_template.h @@ -8,8 +8,9 @@ #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 +#include "quantum.h" + +#define ST7565_LCD_BIAS ST7565_LCD_BIAS_7 #define ST7565_COM_SCAN ST7565_COM_SCAN_DEC #define ST7565_PAGE_ORDER 0, 1, 2, 3 /* @@ -17,19 +18,12 @@ * #define ST7565_PAGE_ORDER 4,5,6,7,0,1,2,3 */ -#define ST7565_GPIOPORT GPIOC -#define ST7565_PORT PORTC -#define ST7565_A0_PIN 7 -#define ST7565_RST_PIN 8 -#define ST7565_MOSI_PIN 6 -#define ST7565_SLCK_PIN 5 -#define ST7565_SS_PIN 4 +#define ST7565_A0_PIN C7 +#define ST7565_RST_PIN C8 +#define ST7565_MOSI_PIN C6 +#define ST7565_SCLK_PIN C5 +#define ST7565_SS_PIN C4 -#define palSetPadModeRaw(portname, bits) ST7565_PORT->PCR[ST7565_##portname##_PIN] = bits - -#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 // Frame Size: 8 bits // MSB First @@ -38,9 +32,9 @@ 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, + .ssport = PAL_PORT(ST7565_SS_PIN), // brief The chip select line pad number - when not using pcs. - .sspad = ST7565_SS_PIN, + .sspad = PAL_PAD(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 @@ -66,13 +60,14 @@ static GFXINLINE void release_bus(GDisplay *g) { static GFXINLINE void init_board(GDisplay *g) { (void)g; - palSetPadModeNamed(A0, PAL_MODE_OUTPUT_PUSHPULL); - palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN); - palSetPadModeNamed(RST, PAL_MODE_OUTPUT_PUSHPULL); - palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN); - palSetPadModeRaw(MOSI, ST7565_SPI_MODE); - palSetPadModeRaw(SLCK, ST7565_SPI_MODE); - palSetPadModeNamed(SS, PAL_MODE_OUTPUT_PUSHPULL); + setPinOutput(ST7565_A0_PIN); + writePinHigh(ST7565_A0_PIN); + setPinOutput(ST7565_RST_PIN); + writePinHigh(ST7565_RST_PIN); + setPinOutput(ST7565_SS_PIN); + + palSetPadMode(PAL_PORT(ST7565_MOSI_PIN), PAL_PAD(ST7565_MOSI_PIN), PAL_MODE_ALTERNATIVE_2); + palSetPadMode(PAL_PORT(ST7565_SCLK_PIN), PAL_PAD(ST7565_SCLK_PIN), PAL_MODE_ALTERNATIVE_2); spiInit(); spiStart(&SPID1, &spi1config); @@ -83,19 +78,18 @@ static GFXINLINE void post_init_board(GDisplay *g) { (void)g; } static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) { (void)g; - if (state) { - palClearPad(ST7565_GPIOPORT, ST7565_RST_PIN); - } else { - palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN); - } + writePin(ST7565_RST_PIN, !state); } -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 write_data(GDisplay *g, uint8_t *data, uint16_t length) { +static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) { (void)g; + writePinLow(ST7565_A0_PIN); + spiSend(&SPID1, 1, &cmd); +} + +static GFXINLINE void write_data(GDisplay *g, gU8 *data, gU16 length) { + (void)g; + writePinHigh(ST7565_A0_PIN); spiSend(&SPID1, length, data); } diff --git a/qmk/drivers/ugfx/gdisp/st7565/driver.mk b/qmk/drivers/ugfx/gdisp/st7565/driver.mk index 31fc8f1c..799a986b 100644 --- a/qmk/drivers/ugfx/gdisp/st7565/driver.mk +++ b/qmk/drivers/ugfx/gdisp/st7565/driver.mk @@ -1,3 +1,3 @@ GFXINC += drivers/ugfx/gdisp/st7565 GFXSRC += drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c -GDISP_DRIVER_LIST += GDISPVMT_ST7565_QMK \ No newline at end of file +GDISP_DRIVER_LIST += GDISPVMT_ST7565_QMK diff --git a/qmk/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c b/qmk/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c index fde32098..f586f97e 100644 --- a/qmk/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c +++ b/qmk/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c @@ -49,31 +49,15 @@ # define ST7565_COM_SCAN ST7565_COM_SCAN_INC # endif # ifndef ST7565_PAGE_ORDER -# define ST7565_PAGE_ORDER 0, 1, 2, 3 +# define ST7565_PAGE_ORDER 0, 1, 2, 3, 4, 5, 6, 7 # endif /*===========================================================================*/ /* Driver local functions. */ /*===========================================================================*/ -typedef struct { - bool_t buffer2; - uint8_t data_pos; - uint8_t data[16]; - uint8_t ram[GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH / 8]; -} PrivData; - // Some common routines and macros -# 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 flush_cmd(GDisplay *g) { - write_data(g, PRIV(g)->data, PRIV(g)->data_pos); - PRIV(g)->data_pos = 0; -} - +# define RAM(g) ((gU8 *)g->priv) # define write_cmd2(g, cmd1, cmd2) \ { \ write_cmd(g, cmd1); \ @@ -106,9 +90,10 @@ 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; - PRIV(g)->data_pos = 0; + g->priv = gfxAlloc(GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH / 8); + if (!g->priv) { + return gFalse; + } // Initialise the board interface init_board(g); @@ -119,25 +104,33 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { setpin_reset(g, FALSE); gfxSleepMilliseconds(20); acquire_bus(g); - enter_cmd_mode(g); - write_cmd(g, ST7565_RESET); write_cmd(g, ST7565_LCD_BIAS); write_cmd(g, ST7565_ADC); write_cmd(g, ST7565_COM_SCAN); - write_cmd(g, ST7565_RESISTOR_RATIO | 0x1); - write_cmd2(g, ST7565_CONTRAST, GDISP_INITIAL_CONTRAST); - - // turn on internal power supply (VC=1, VR=1, VF=1) - write_cmd(g, ST7565_POWER_CONTROL | 0x07); - - write_cmd(g, ST7565_INVERT_DISPLAY); - write_cmd(g, ST7565_ALLON_NORMAL); - write_cmd(g, ST7565_START_LINE | 0); + + write_cmd2(g, ST7565_CONTRAST, GDISP_INITIAL_CONTRAST * 64 / 101); + write_cmd(g, ST7565_RESISTOR_RATIO | 0x1); + + // turn on voltage converter (VC=1, VR=0, VF=0) + write_cmd(g, ST7565_POWER_CONTROL | 0x04); + delay_ms(50); + + // turn on voltage regulator (VC=1, VR=1, VF=0) + write_cmd(g, ST7565_POWER_CONTROL | 0x06); + delay_ms(50); + + // turn on voltage follower (VC=1, VR=1, VF=1) + write_cmd(g, ST7565_POWER_CONTROL | 0x07); + delay_ms(50); + + write_cmd(g, ST7565_DISPLAY_ON); + write_cmd(g, ST7565_ALLON_NORMAL); + write_cmd(g, ST7565_INVERT_DISPLAY); // Disable Inversion of display. + write_cmd(g, ST7565_RMW); - flush_cmd(g); // Finish Init post_init_board(g); @@ -163,22 +156,14 @@ LLDSPEC void gdisp_lld_flush(GDisplay *g) { if (!(g->flags & GDISP_FLG_NEEDFLUSH)) return; acquire_bus(g); - enter_cmd_mode(g); - unsigned dstOffset = (PRIV(g)->buffer2 ? 4 : 0); - for (p = 0; p < 4; p++) { - write_cmd(g, ST7565_PAGE | (p + dstOffset)); + gU8 pagemap[] = {ST7565_PAGE_ORDER}; + for (p = 0; p < sizeof(pagemap); p++) { + write_cmd(g, ST7565_PAGE | pagemap[p]); write_cmd(g, ST7565_COLUMN_MSB | 0); write_cmd(g, ST7565_COLUMN_LSB | 0); write_cmd(g, ST7565_RMW); - flush_cmd(g); - enter_data_mode(g); write_data(g, RAM(g) + (p * GDISP_SCREEN_WIDTH), GDISP_SCREEN_WIDTH); - enter_cmd_mode(g); } - unsigned line = (PRIV(g)->buffer2 ? 32 : 0); - write_cmd(g, ST7565_START_LINE | line); - flush_cmd(g); - PRIV(g)->buffer2 = !PRIV(g)->buffer2; release_bus(g); g->flags &= ~GDISP_FLG_NEEDFLUSH; @@ -243,6 +228,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { } # endif +# if GDISP_HARDWARE_BITFILLS LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { uint8_t *buffer = (uint8_t *)g->p.ptr; int linelength = g->p.cx; @@ -268,6 +254,7 @@ LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { } g->flags |= GDISP_FLG_NEEDFLUSH; } +# endif # if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL LLDSPEC void gdisp_lld_control(GDisplay *g) { @@ -279,16 +266,12 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) { 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: @@ -318,12 +301,11 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) { return; case GDISP_CONTROL_CONTRAST: - g->g.Contrast = (unsigned)g->p.ptr & 63; + if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100; acquire_bus(g); - enter_cmd_mode(g); - write_cmd2(g, ST7565_CONTRAST, g->g.Contrast); - flush_cmd(g); + write_cmd2(g, ST7565_CONTRAST, ((((unsigned)g->p.ptr) << 6) / 101) & 0x3F); release_bus(g); + g->g.Contrast = (unsigned)g->p.ptr; return; } } diff --git a/qmk/keyboards/10bleoledhub/config.h b/qmk/keyboards/10bleoledhub/config.h index 0cc7831f..d3e845fe 100644 --- a/qmk/keyboards/10bleoledhub/config.h +++ b/qmk/keyboards/10bleoledhub/config.h @@ -26,7 +26,7 @@ along with this program. If not, see .*/ /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 3 -#define MATRIX_ROW_PINS { F6, F5, F4, F1 } +#define MATRIX_ROW_PINS { F0, F5, F4, F6 } #define MATRIX_COL_PINS { D6, D7, B5 } #define UNUSED_PINS diff --git a/qmk/keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk b/qmk/keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk index 6305f94a..44a2bc49 100644 --- a/qmk/keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk +++ b/qmk/keyboards/1upkeyboards/1up60hse/keymaps/via/rules.mk @@ -1,3 +1,4 @@ VIA_ENABLE = yes LTO_ENABLE = yes -MOUSEKEY_ENABLE = no \ No newline at end of file + +CONSOLE_ENABLE = no diff --git a/qmk/keyboards/1upkeyboards/1up60hte/1up60hte.c b/qmk/keyboards/1upkeyboards/1up60hte/1up60hte.c index 3af0e9d4..460e42a0 100644 --- a/qmk/keyboards/1upkeyboards/1up60hte/1up60hte.c +++ b/qmk/keyboards/1upkeyboards/1up60hte/1up60hte.c @@ -16,19 +16,3 @@ 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/qmk/keyboards/1upkeyboards/1up60hte/config.h b/qmk/keyboards/1upkeyboards/1up60hte/config.h index 8c4d2fc3..c3ba030d 100644 --- a/qmk/keyboards/1upkeyboards/1up60hte/config.h +++ b/qmk/keyboards/1upkeyboards/1up60hte/config.h @@ -40,6 +40,9 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B6 +#define LED_PIN_ON_STATE 0 + /* number of backlight levels */ #define BACKLIGHT_PIN B7 #ifdef BACKLIGHT_PIN diff --git a/qmk/keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk b/qmk/keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk index bee21da5..1e5b9980 100644 --- a/qmk/keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk +++ b/qmk/keyboards/1upkeyboards/1up60hte/keymaps/via/rules.mk @@ -1,2 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no \ No newline at end of file diff --git a/qmk/keyboards/1upkeyboards/super16/rules.mk b/qmk/keyboards/1upkeyboards/super16/rules.mk index 2ef04cd5..90e7e42a 100644 --- a/qmk/keyboards/1upkeyboards/super16/rules.mk +++ b/qmk/keyboards/1upkeyboards/super16/rules.mk @@ -25,7 +25,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -RGB_MATRIX_ENABLE = WS2812 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/qmk/keyboards/1upkeyboards/sweet16/v1/config.h b/qmk/keyboards/1upkeyboards/sweet16/v1/config.h index 5264ef69..4020f4fd 100644 --- a/qmk/keyboards/1upkeyboards/sweet16/v1/config.h +++ b/qmk/keyboards/1upkeyboards/sweet16/v1/config.h @@ -17,6 +17,12 @@ /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 +#ifndef CONVERT_TO_PROTON_C +# define LED_NUM_LOCK_PIN B0 // RXLED +# define LED_CAPS_LOCK_PIN D5 // TXLED +# define LED_PIN_ON_STATE 0 +#endif + /* Underglow options */ #define RGB_DI_PIN B1 #ifdef RGB_DI_PIN diff --git a/qmk/keyboards/1upkeyboards/sweet16/v1/v1.c b/qmk/keyboards/1upkeyboards/sweet16/v1/v1.c index 053620d3..0ff1041a 100644 --- a/qmk/keyboards/1upkeyboards/sweet16/v1/v1.c +++ b/qmk/keyboards/1upkeyboards/sweet16/v1/v1.c @@ -1,21 +1 @@ #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/qmk/keyboards/40percentclub/mf68/config.h b/qmk/keyboards/40percentclub/mf68/config.h index 5bda9bb7..7c5a0cd5 100644 --- a/qmk/keyboards/40percentclub/mf68/config.h +++ b/qmk/keyboards/40percentclub/mf68/config.h @@ -20,8 +20,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB -#define PRODUCT_ID 0x0510 +#define VENDOR_ID 0x3430 // "40" +#define PRODUCT_ID 0x4D68 // "M68" #define DEVICE_VER 0x0101 #define MANUFACTURER di0ib #define PRODUCT MF68 diff --git a/qmk/keyboards/40percentclub/mf68/keymaps/via/keymap.c b/qmk/keyboards/40percentclub/mf68/keymaps/via/keymap.c new file mode 100644 index 00000000..efd595ac --- /dev/null +++ b/qmk/keyboards/40percentclub/mf68/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2020 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_68_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_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, + 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, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, _______, KC_VOLD, KC_END, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT + ), + [2] = LAYOUT_68_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_68_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/40percentclub/mf68/keymaps/via/rules.mk b/qmk/keyboards/40percentclub/mf68/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/40percentclub/mf68/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/40percentclub/mf68/mf68.h b/qmk/keyboards/40percentclub/mf68/mf68.h index a34f9cde..6844ed1b 100644 --- a/qmk/keyboards/40percentclub/mf68/mf68.h +++ b/qmk/keyboards/40percentclub/mf68/mf68.h @@ -16,7 +16,7 @@ { K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \ { K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \ { K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \ - { K70, K71, K72, K73, K74 } \ + { K70, K71, K72, K73, K74, KC_NO, KC_NO, KC_NO, KC_NO } \ } #define LAYOUT_kc( \ diff --git a/qmk/keyboards/40percentclub/mf68/rules.mk b/qmk/keyboards/40percentclub/mf68/rules.mk index 65d18703..f1967d83 100644 --- a/qmk/keyboards/40percentclub/mf68/rules.mk +++ b/qmk/keyboards/40percentclub/mf68/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +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 @@ -22,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 = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI controls diff --git a/qmk/keyboards/40percentclub/ut47/led.c b/qmk/keyboards/40percentclub/ut47/led.c index 9458c038..f5d8ffc1 100644 --- a/qmk/keyboards/40percentclub/ut47/led.c +++ b/qmk/keyboards/40percentclub/ut47/led.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ #include -#include "stdint.h" +#include #include "led.h" diff --git a/qmk/keyboards/4pplet/bootleg/info.json b/qmk/keyboards/4pplet/bootleg/info.json new file mode 100644 index 00000000..4abffda3 --- /dev/null +++ b/qmk/keyboards/4pplet/bootleg/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "bootleg Rev A", + "url": "https://github.com/4pplet/bootlegs", + "maintainer": "4pplet", + "width": 15, + "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": "Tab", "x": 0, "y": 1, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 1 }, + { "label": "W", "x": 2.5, "y": 1 }, + { "label": "E", "x": 3.5, "y": 1 }, + { "label": "R", "x": 4.5, "y": 1 }, + { "label": "T", "x": 5.5, "y": 1 }, + { "label": "Y", "x": 6.5, "y": 1 }, + { "label": "U", "x": 7.5, "y": 1 }, + { "label": "I", "x": 8.5, "y": 1 }, + { "label": "O", "x": 9.5, "y": 1 }, + { "label": "P", "x": 10.5, "y": 1 }, + { "label": "{", "x": 11.5, "y": 1 }, + { "label": "}", "x": 12.5, "y": 1 }, + { "label": "Backsp.", "x": 13.5, "y": 1, "w": 1.5 }, + { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 2 }, + { "label": "S", "x": 2.75, "y": 2 }, + { "label": "D", "x": 3.75, "y": 2 }, + { "label": "F", "x": 4.75, "y": 2 }, + { "label": "G", "x": 5.75, "y": 2 }, + { "label": "H", "x": 6.75, "y": 2 }, + { "label": "J", "x": 7.75, "y": 2 }, + { "label": "K", "x": 8.75, "y": 2 }, + { "label": "L", "x": 9.75, "y": 2 }, + { "label": ":", "x": 10.75, "y": 2 }, + { "label": "\"", "x": 11.75, "y": 2 }, + { "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "Shift", "x": 0, "y": 3, "w": 1.25 }, + { "label": "|", "x": 1.25, "y": 3 }, + { "label": "Z", "x": 2.25, "y": 3 }, + { "label": "X", "x": 3.25, "y": 3 }, + { "label": "C", "x": 4.25, "y": 3 }, + { "label": "V", "x": 5.25, "y": 3 }, + { "label": "B", "x": 6.25, "y": 3 }, + { "label": "N", "x": 7.25, "y": 3 }, + { "label": "M", "x": 8.25, "y": 3 }, + { "label": "<", "x": 9.25, "y": 3 }, + { "label": ">", "x": 10.25, "y": 3 }, + { "label": "?", "x": 11.25, "y": 3 }, + { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "Fn", "x": 14, "y": 3, "w": 1 }, + { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "Space1", "x": 3.75, "y": 4, "w": 2.25 }, + { "label": "Space2", "x": 6, "y": 4, "w": 1.25 }, + { "label": "Space3", "x": 7.25, "y": 4, "w": 2.75 }, + { "label": "Alt", "x": 10, "y": 4, "w": 1.25 }, + { "label": "Menu", "x": 11.25, "y": 4, "w": 1.25 }, + { "label": "Win", "x": 12.5, "y": 4, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 } + ] + } + } +} diff --git a/qmk/keyboards/4pplet/bootleg/keymaps/default/keymap.c b/qmk/keyboards/4pplet/bootleg/keymaps/default/keymap.c new file mode 100644 index 00000000..c9ae421a --- /dev/null +++ b/qmk/keyboards/4pplet/bootleg/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// main layer +[0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_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_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_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, KC_RGUI, KC_APP, MO(1)), +// basic function layer +[1] = 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_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; diff --git a/qmk/keyboards/4pplet/bootleg/keymaps/via/keymap.c b/qmk/keyboards/4pplet/bootleg/keymaps/via/keymap.c new file mode 100644 index 00000000..b83266d8 --- /dev/null +++ b/qmk/keyboards/4pplet/bootleg/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// main layer +[0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_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_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_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, KC_RGUI, KC_APP, MO(1)), +// basic function layer +[1] = 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_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +// extra layer for VIA +[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), +// extra layer for VIA +[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) +}; diff --git a/qmk/keyboards/4pplet/bootleg/keymaps/via/rules.mk b/qmk/keyboards/4pplet/bootleg/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/4pplet/bootleg/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/4pplet/bootleg/readme.md b/qmk/keyboards/4pplet/bootleg/readme.md new file mode 100644 index 00000000..3ced86e6 --- /dev/null +++ b/qmk/keyboards/4pplet/bootleg/readme.md @@ -0,0 +1,12 @@ +# bootleg + +A 60% PCB for non tray-mount keyboards + +* Keyboard Maintainer: [4pplet](https://github.com/4pplet) +* Hardware Supported: bootleg Rev A + +Make example for this keyboard (after setting up your build environment): + + make 4pplet/bootleg/rev_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). diff --git a/qmk/keyboards/4pplet/bootleg/rev_a/config.h b/qmk/keyboards/4pplet/bootleg/rev_a/config.h new file mode 100644 index 00000000..4d3122af --- /dev/null +++ b/qmk/keyboards/4pplet/bootleg/rev_a/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4444 +#define PRODUCT_ID 0x0004 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 4pplet +#define PRODUCT bootleg Rev A + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +// ROWS: Top to bottom, COLS: Left to right +#define MATRIX_ROW_PINS {D0,C2,C4,D4,D2} +#define MATRIX_COL_PINS {C5,C6,C7,B7,B6,B5,B4,B3,B2,B1,B0,D6,D5,D3,D1} + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define QMK_ESC_OUTPUT C4 // usually COL +#define QMK_ESC_INPUT D0 // usually ROW diff --git a/qmk/keyboards/4pplet/bootleg/rev_a/readme.md b/qmk/keyboards/4pplet/bootleg/rev_a/readme.md new file mode 100644 index 00000000..3ced86e6 --- /dev/null +++ b/qmk/keyboards/4pplet/bootleg/rev_a/readme.md @@ -0,0 +1,12 @@ +# bootleg + +A 60% PCB for non tray-mount keyboards + +* Keyboard Maintainer: [4pplet](https://github.com/4pplet) +* Hardware Supported: bootleg Rev A + +Make example for this keyboard (after setting up your build environment): + + make 4pplet/bootleg/rev_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). diff --git a/qmk/keyboards/4pplet/bootleg/rev_a/rev_a.c b/qmk/keyboards/4pplet/bootleg/rev_a/rev_a.c new file mode 100644 index 00000000..b4f233d3 --- /dev/null +++ b/qmk/keyboards/4pplet/bootleg/rev_a/rev_a.c @@ -0,0 +1,17 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "rev_a.h" diff --git a/qmk/keyboards/4pplet/bootleg/rev_a/rev_a.h b/qmk/keyboards/4pplet/bootleg/rev_a/rev_a.h new file mode 100644 index 00000000..f9bbb445 --- /dev/null +++ b/qmk/keyboards/4pplet/bootleg/rev_a/rev_a.h @@ -0,0 +1,34 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1d, k1e, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k45, k47, k48, k4a, k4b, k4d, k4e \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1d, k1e}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e}, \ + {k40, k41, k43, k45, k47, k48, k4a, k4b, k4d, k4e } \ +} diff --git a/qmk/keyboards/4pplet/bootleg/rev_a/rules.mk b/qmk/keyboards/4pplet/bootleg/rev_a/rules.mk new file mode 100644 index 00000000..380c35d4 --- /dev/null +++ b/qmk/keyboards/4pplet/bootleg/rev_a/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +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 +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/4pplet/waffling60/README.md b/qmk/keyboards/4pplet/waffling60/README.md index a6b56a69..bf5fda88 100644 --- a/qmk/keyboards/4pplet/waffling60/README.md +++ b/qmk/keyboards/4pplet/waffling60/README.md @@ -9,6 +9,7 @@ More info: https://geekhack.org/index.php?topic=103531.0 Make example for this keyboard (after setting up your build environment): - make 4pplet/steezy60/rev_a:default + make 4pplet/waffling60/rev_a:default + make 4pplet/waffling60/rev_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 +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/qmk/keyboards/4pplet/waffling60/info.json b/qmk/keyboards/4pplet/waffling60/info.json new file mode 100644 index 00000000..6c5c83fa --- /dev/null +++ b/qmk/keyboards/4pplet/waffling60/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "Waffling60 Rev A", + "url": "https://github.com/4pplet/waffling60", + "maintainer": "4pplet", + "width": 15, + "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": "Tab", "x": 0, "y": 1, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 1 }, + { "label": "W", "x": 2.5, "y": 1 }, + { "label": "E", "x": 3.5, "y": 1 }, + { "label": "R", "x": 4.5, "y": 1 }, + { "label": "T", "x": 5.5, "y": 1 }, + { "label": "Y", "x": 6.5, "y": 1 }, + { "label": "U", "x": 7.5, "y": 1 }, + { "label": "I", "x": 8.5, "y": 1 }, + { "label": "O", "x": 9.5, "y": 1 }, + { "label": "P", "x": 10.5, "y": 1 }, + { "label": "{", "x": 11.5, "y": 1 }, + { "label": "}", "x": 12.5, "y": 1 }, + { "label": "Backsp.", "x": 13.5, "y": 1, "w": 1.5 }, + { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 2 }, + { "label": "S", "x": 2.75, "y": 2 }, + { "label": "D", "x": 3.75, "y": 2 }, + { "label": "F", "x": 4.75, "y": 2 }, + { "label": "G", "x": 5.75, "y": 2 }, + { "label": "H", "x": 6.75, "y": 2 }, + { "label": "J", "x": 7.75, "y": 2 }, + { "label": "K", "x": 8.75, "y": 2 }, + { "label": "L", "x": 9.75, "y": 2 }, + { "label": ":", "x": 10.75, "y": 2 }, + { "label": "\"", "x": 11.75, "y": 2 }, + { "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "Shift", "x": 0, "y": 3, "w": 1.25 }, + { "label": "|", "x": 1.25, "y": 3 }, + { "label": "Z", "x": 2.25, "y": 3 }, + { "label": "X", "x": 3.25, "y": 3 }, + { "label": "C", "x": 4.25, "y": 3 }, + { "label": "V", "x": 5.25, "y": 3 }, + { "label": "B", "x": 6.25, "y": 3 }, + { "label": "N", "x": 7.25, "y": 3 }, + { "label": "M", "x": 8.25, "y": 3 }, + { "label": "<", "x": 9.25, "y": 3 }, + { "label": ">", "x": 10.25, "y": 3 }, + { "label": "?", "x": 11.25, "y": 3 }, + { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "Fn", "x": 14, "y": 3, "w": 1 }, + { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, + { "label": "Space1", "x": 3.75, "y": 4, "w": 2.25 }, + { "label": "Space2", "x": 6, "y": 4, "w": 1.25 }, + { "label": "Space3", "x": 7.25, "y": 4, "w": 2.75 }, + { "label": "Alt", "x": 10, "y": 4, "w": 1.25 }, + { "label": "Menu", "x": 11.25, "y": 4, "w": 1.25 }, + { "label": "Win", "x": 12.5, "y": 4, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 } + ] + } + } +} diff --git a/qmk/keyboards/4pplet/waffling60/keymaps/default/keymap.c b/qmk/keyboards/4pplet/waffling60/keymaps/default/keymap.c index d61c3f6c..c9ae421a 100644 --- a/qmk/keyboards/4pplet/waffling60/keymaps/default/keymap.c +++ b/qmk/keyboards/4pplet/waffling60/keymaps/default/keymap.c @@ -1,3 +1,19 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/qmk/keyboards/4pplet/waffling60/keymaps/via/keymap.c b/qmk/keyboards/4pplet/waffling60/keymaps/via/keymap.c index 40ca2a28..d20c6bf0 100644 --- a/qmk/keyboards/4pplet/waffling60/keymaps/via/keymap.c +++ b/qmk/keyboards/4pplet/waffling60/keymaps/via/keymap.c @@ -1,3 +1,19 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -29,4 +45,4 @@ 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/qmk/keyboards/4pplet/waffling60/rev_a/readme.md b/qmk/keyboards/4pplet/waffling60/rev_a/readme.md new file mode 100644 index 00000000..1519fa66 --- /dev/null +++ b/qmk/keyboards/4pplet/waffling60/rev_a/readme.md @@ -0,0 +1,14 @@ +# waffling60 + +A 60% PCB for MX switches, one hot swap and one solder-pcb version with decent layout support. + +More info: https://geekhack.org/index.php?topic=103531.0 + +* Keyboard Maintainer: [4pplet](https://github.com/4pplet) +* Hardware Supported: [waffling60](https://github.com/4pplet/waffling60) + +Make example for this keyboard (after setting up your build environment): + + make 4pplet/waffling60/rev_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). diff --git a/qmk/keyboards/4pplet/waffling60/rev_b/config.h b/qmk/keyboards/4pplet/waffling60/rev_b/config.h new file mode 100644 index 00000000..eb9882d7 --- /dev/null +++ b/qmk/keyboards/4pplet/waffling60/rev_b/config.h @@ -0,0 +1,55 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4444 +#define PRODUCT_ID 0x0005 +#define DEVICE_VER 0x0002 +#define MANUFACTURER 4pplet +#define PRODUCT waffling60 Rev B + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {C2,D0,B0,D6,D5} +#define MATRIX_COL_PINS {C4,C5,D2,C6,C7,B7,B6,B5,B4,B3,B2,B1,D1,D4} + +/* 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 C2 // usually COL +#define QMK_ESC_INPUT C4 // usually ROW + +#define RGB_DI_PIN D3 +#define RGBLED_NUM 1 +#define BACKLIGHT_LEVELS 5 + +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_ANIMATIONS diff --git a/qmk/keyboards/4pplet/waffling60/rev_b/readme.md b/qmk/keyboards/4pplet/waffling60/rev_b/readme.md new file mode 100644 index 00000000..27ca8ca9 --- /dev/null +++ b/qmk/keyboards/4pplet/waffling60/rev_b/readme.md @@ -0,0 +1,14 @@ +# waffling60 + +A 60% PCB for MX switches, one hot swap and one solder-pcb version with decent layout support. + +More info: https://geekhack.org/index.php?topic=103531.0 + +* Keyboard Maintainer: [4pplet](https://github.com/4pplet) +* Hardware Supported: [waffling60](https://github.com/4pplet/waffling60) + +Make example for this keyboard (after setting up your build environment): + + make 4pplet/waffling60/rev_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). diff --git a/qmk/keyboards/4pplet/waffling60/rev_b/rev_b.c b/qmk/keyboards/4pplet/waffling60/rev_b/rev_b.c new file mode 100644 index 00000000..5f701b57 --- /dev/null +++ b/qmk/keyboards/4pplet/waffling60/rev_b/rev_b.c @@ -0,0 +1,33 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "rev_b.h" + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(CAPS_LOCK_ENABLE){ + if(res) { + if(led_state.caps_lock){ + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv_noeeprom(CAPS_LOCK_COLOR); + } + else + rgblight_disable_noeeprom(); + } + } + return res; +} diff --git a/qmk/keyboards/4pplet/waffling60/rev_b/rev_b.h b/qmk/keyboards/4pplet/waffling60/rev_b/rev_b.h new file mode 100644 index 00000000..e6dc7a15 --- /dev/null +++ b/qmk/keyboards/4pplet/waffling60/rev_b/rev_b.h @@ -0,0 +1,38 @@ +/* +Copyright 2020 Stefan Sundin "4pplet" <4pplet@protonmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +// defines to set RGB-led behaviour. Off by default +#define CAPS_LOCK_ENABLE false +#define CAPS_LOCK_COLOR HSV_ORANGE + +#include "quantum.h" + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k1d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k2c, \ + 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, k3c, k3d, \ + k40, k41, k42, k44, k46, k48, 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, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d}, \ +} diff --git a/qmk/keyboards/4pplet/waffling60/rev_b/rules.mk b/qmk/keyboards/4pplet/waffling60/rev_b/rules.mk new file mode 100644 index 00000000..69c524b7 --- /dev/null +++ b/qmk/keyboards/4pplet/waffling60/rev_b/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +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 +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/acekeyboard/titan60/config.h b/qmk/keyboards/acekeyboard/titan60/config.h new file mode 100644 index 00000000..d34622b2 --- /dev/null +++ b/qmk/keyboards/acekeyboard/titan60/config.h @@ -0,0 +1,86 @@ +/* +Copyright 2020 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 0xACE1 // Ace +#define PRODUCT_ID 0x5449 // TI +#define DEVICE_VER 0x0001 +#define MANUFACTURER Acekeyboard +#define PRODUCT titan60 + +/* 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) + * + */ + + +// 0 1 2 3 4 5 6 7 8 9 A B C D +#define MATRIX_ROW_PINS { B1, B2, B3, F0, F1 } +#define MATRIX_COL_PINS { F4, F7, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3} +#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_LEVELS 3 +#define BACKLIGHT_BREATHING + +#define RGB_DI_PIN D2 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 14 +# 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 */ +# 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 + + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/acekeyboard/titan60/info.json b/qmk/keyboards/acekeyboard/titan60/info.json new file mode 100644 index 00000000..0839c7fb --- /dev/null +++ b/qmk/keyboards/acekeyboard/titan60/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "Titan60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_all_ansi_std": { + "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":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":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}] + }, + + "LAYOUT_all_ansi_2u_lshift": { + "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}, {"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, "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}] + }, + + "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_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}, {"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}] + }, + + "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}] + }, + + "LAYOUT_60_ansi_split_spacebar": { + "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":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.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/qmk/keyboards/acekeyboard/titan60/keymaps/default/keymap.c b/qmk/keyboards/acekeyboard/titan60/keymaps/default/keymap.c new file mode 100644 index 00000000..be3ed10b --- /dev/null +++ b/qmk/keyboards/acekeyboard/titan60/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* +Copyright 2020 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] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ 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 │ │ Alt│ GUI│Menu│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_B, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_60_ansi( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/qmk/keyboards/acekeyboard/titan60/keymaps/via/keymap.c b/qmk/keyboards/acekeyboard/titan60/keymaps/via/keymap.c new file mode 100644 index 00000000..c78d8f0b --- /dev/null +++ b/qmk/keyboards/acekeyboard/titan60/keymaps/via/keymap.c @@ -0,0 +1,64 @@ +/* +Copyright 2020 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] = { + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │ 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 │ │ Alt│ GUI│Menu│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, MO(1), KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_60_ansi( + 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_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 + ), + + [3] = 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 + ) +}; \ No newline at end of file diff --git a/qmk/keyboards/acekeyboard/titan60/keymaps/via/rules.mk b/qmk/keyboards/acekeyboard/titan60/keymaps/via/rules.mk new file mode 100644 index 00000000..5f615ff6 --- /dev/null +++ b/qmk/keyboards/acekeyboard/titan60/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes + diff --git a/qmk/keyboards/acekeyboard/titan60/readme.md b/qmk/keyboards/acekeyboard/titan60/readme.md new file mode 100644 index 00000000..f977b4b8 --- /dev/null +++ b/qmk/keyboards/acekeyboard/titan60/readme.md @@ -0,0 +1,17 @@ +# titan60 + +60% custom keyboard originally meant for the Saturn 60 + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: Titan 60 PCB +* Hardware Availability: [Acekeyboard](https://acekeyboard.co/) + +Make example for this keyboard (after setting up your build environment): + + make acekeyboard/titan60:default + +Flashing example for this keyboard: + + make acekeyboard/titan60: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/qmk/keyboards/acekeyboard/titan60/rules.mk b/qmk/keyboards/acekeyboard/titan60/rules.mk new file mode 100644 index 00000000..92f7aba5 --- /dev/null +++ b/qmk/keyboards/acekeyboard/titan60/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/acekeyboard/titan60/titan60.c b/qmk/keyboards/acekeyboard/titan60/titan60.c new file mode 100644 index 00000000..64479f31 --- /dev/null +++ b/qmk/keyboards/acekeyboard/titan60/titan60.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 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 "titan60.h" diff --git a/qmk/keyboards/acekeyboard/titan60/titan60.h b/qmk/keyboards/acekeyboard/titan60/titan60.h new file mode 100644 index 00000000..219a28a8 --- /dev/null +++ b/qmk/keyboards/acekeyboard/titan60/titan60.h @@ -0,0 +1,109 @@ +/* +Copyright 2020 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_ansi_std( \ + 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, k3c, k43, \ + k40, k41, k42, k44, k46, k48, k4a, k4d, k4b, k4c, k49 \ +){ \ + { 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, ___, ___ }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, k4a, k4b, k4c, k4d } \ +} + +#define LAYOUT_all_ansi_2u_lshift( \ + 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, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k47, k3c, k43, \ + k40, k41, k42, k44, k46, k48, k4a, k4d, k4b, k4c, k49 \ +){ \ + { 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, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, k43, k44, ___, k46, k47, k48, k49, k4a, k4b, k4c, k4d } \ +} + +#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, k3c, \ + k40, k41, k42, k46, 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, ___, k2d }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4a, k4b, k4c, k4d } \ +} + +#define LAYOUT_60_ansi_tsangan( \ + 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, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k43, \ + k40, k41, k42, k46, 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, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, ___, ___, ___, ___, k4b, k4c, k4d } \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + 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, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k43, \ + k40, k41, k42, k46, 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, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, ___, ___, ___, k4a, k4b, k4c, k4d } \ +} + +#define LAYOUT_60_ansi_split_spacebar( \ + 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, \ + k40, k41, k42, k44, k46, k48, 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, ___, k2d }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \ + { k40, k41, k42, ___, k44, ___, k46, ___, k48, ___, k4a, k4b, k4c, k4d } \ +} + + diff --git a/qmk/keyboards/acheron/lasgweloth/chconf.h b/qmk/keyboards/acheron/lasgweloth/chconf.h new file mode 100644 index 00000000..4640ff53 --- /dev/null +++ b/qmk/keyboards/acheron/lasgweloth/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 rt/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_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @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 _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/qmk/keyboards/acheron/lasgweloth/config.h b/qmk/keyboards/acheron/lasgweloth/config.h new file mode 100644 index 00000000..e131787f --- /dev/null +++ b/qmk/keyboards/acheron/lasgweloth/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2015 Á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 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4150 // AP for AcheronProject +#define PRODUCT_ID 0x7641 // LA for Lasgweloth +#define DEVICE_VER 0x0001 +#define MANUFACTURER AcheronProect +#define PRODUCT Lasgweloth + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_COL_PINS { B12, A2 , A1 , A0 , F1 , F0 , C15, C14, C13, A7 , A6 , A5 , A4 , B7} +#define MATRIX_ROW_PINS { B9 , B8 , A3 , B0 , B1 } +#define DIODE_DIRECTION COL2ROW + +//#define BACKLIGHT_PIN A6 +//#define BACKLIGHT_PWM_DRIVER PWMD3 +//#define BACKLIGHT_PWM_CHANNEL 1 +//#define BACKLIGHT_PAL_MODE 1 +//#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 + +/* + * 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/qmk/keyboards/acheron/lasgweloth/halconf.h b/qmk/keyboards/acheron/lasgweloth/halconf.h new file mode 100644 index 00000000..16f32117 --- /dev/null +++ b/qmk/keyboards/acheron/lasgweloth/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC 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 SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG 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 + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT 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 + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION 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 the zero-copy API. + */ +#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 + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#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 circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#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 + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/acheron/lasgweloth/keymaps/default/keymap.c b/qmk/keyboards/acheron/lasgweloth/keymaps/default/keymap.c new file mode 100644 index 00000000..a87c25c7 --- /dev/null +++ b/qmk/keyboards/acheron/lasgweloth/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* +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 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_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_DEL, + 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, MO(1) , KC_RCTL + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_UP , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +) +}; diff --git a/qmk/keyboards/acheron/lasgweloth/keymaps/xoxotus/keymap.c b/qmk/keyboards/acheron/lasgweloth/keymaps/xoxotus/keymap.c new file mode 100644 index 00000000..8183bb56 --- /dev/null +++ b/qmk/keyboards/acheron/lasgweloth/keymaps/xoxotus/keymap.c @@ -0,0 +1,35 @@ +/* +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 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_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_TILD, + 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_DEL, + 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, MO(1) , KC_RCTL + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_UP , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ +) +}; diff --git a/qmk/keyboards/acheron/lasgweloth/lasgweloth.c b/qmk/keyboards/acheron/lasgweloth/lasgweloth.c new file mode 100644 index 00000000..be2052a3 --- /dev/null +++ b/qmk/keyboards/acheron/lasgweloth/lasgweloth.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Á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 "lasgweloth.h" diff --git a/qmk/keyboards/acheron/lasgweloth/lasgweloth.h b/qmk/keyboards/acheron/lasgweloth/lasgweloth.h new file mode 100644 index 00000000..2c144de4 --- /dev/null +++ b/qmk/keyboards/acheron/lasgweloth/lasgweloth.h @@ -0,0 +1,36 @@ +/* +Copyright 2015 Á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 + +#define ___ 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, \ + 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, K46, K48, K49, K4A, K4B \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___ }, \ + { K40, K41, K42, ___, ___, ___, K46, ___, K48, K49, K4A, K4B, ___, ___ } \ +} diff --git a/qmk/keyboards/acheron/lasgweloth/mcuconf.h b/qmk/keyboards/acheron/lasgweloth/mcuconf.h new file mode 100644 index 00000000..6289be66 --- /dev/null +++ b/qmk/keyboards/acheron/lasgweloth/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 FALSE +#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 FALSE +#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/qmk/keyboards/acheron/lasgweloth/readme.md b/qmk/keyboards/acheron/lasgweloth/readme.md new file mode 100644 index 00000000..49b20e84 --- /dev/null +++ b/qmk/keyboards/acheron/lasgweloth/readme.md @@ -0,0 +1,29 @@ +# Acheron Aχξρων 60-SM-S-STM32-MX-TH-WI (codename "Lasgweloth") QMK firmware + +

+ +

+ +## Introduction + +This is the QMK firmware repository for the Lasgweloth PCB, updated until [pre-revision Alpha](https://github.com/AcheronProject/Lasgweloth/releases/). + +The Lasgweloth PCB is an Open-Hardware guidelines compliant PCB which files can be found at [this link](https://github.com/AcheronProject/Lasgweloth). Its designer and maintainer is [Gondolindrim](https://github.com/Gondolindrim). + +## Layouts + +The possible layouts consist of a default or 7U bottom row, with possibility of using split backspace, split right shift and stepped caps lock. + +## PCB Documentation + +See the [AcheronDocs](https://acheronproject.com/lasgweloth/intro.html) page for the Lasgweloth full documentation. You can also check the KiCad PCB files at the [GitHub repository](https://github.com/AcheronProject/Lasgweloth). + +Before using the files for personal or commercial use, please read the [Acheron Open-Hardware License V1.3](https://gondolindrim.github.io/AcheronDocs/license/license.html) under which the Arctic PCB is published. + +## How to compile + +After setting up your build environment, you can compile the Arctic default keymap by using: + + make acheron/lasgweloth: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/qmk/keyboards/acheron/lasgweloth/rules.mk b/qmk/keyboards/acheron/lasgweloth/rules.mk new file mode 100644 index 00000000..2d2f71e1 --- /dev/null +++ b/qmk/keyboards/acheron/lasgweloth/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = STM32F072 + +# 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = no + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/aeboards/ext65/config.h b/qmk/keyboards/aeboards/ext65/config.h new file mode 100644 index 00000000..ff2ace92 --- /dev/null +++ b/qmk/keyboards/aeboards/ext65/config.h @@ -0,0 +1,17 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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" diff --git a/qmk/keyboards/aeboards/ext65/ext65.c b/qmk/keyboards/aeboards/ext65/ext65.c new file mode 100644 index 00000000..5f824b72 --- /dev/null +++ b/qmk/keyboards/aeboards/ext65/ext65.c @@ -0,0 +1 @@ +#include "ext65.h" diff --git a/qmk/keyboards/aeboards/ext65/ext65.h b/qmk/keyboards/aeboards/ext65/ext65.h new file mode 100644 index 00000000..571ed055 --- /dev/null +++ b/qmk/keyboards/aeboards/ext65/ext65.h @@ -0,0 +1,9 @@ +#pragma once + +#include "quantum.h" + +#if defined(KEYBOARD_aeboards_ext65_rev1) + #include "rev1.h" +#elif defined(KEYBOARD_aeboards_ext65_rev2) + #include "rev2.h" +#endif \ No newline at end of file diff --git a/qmk/keyboards/aeboards/ext65/keymaps/default/keymap.c b/qmk/keyboards/aeboards/ext65/keymaps/default/keymap.c new file mode 100644 index 00000000..af753792 --- /dev/null +++ b/qmk/keyboards/aeboards/ext65/keymaps/default/keymap.c @@ -0,0 +1,98 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------. ,-------------------------------------------------------------------. + * |- | * | / |NmLK| |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| ~ | Pscr| + * |-------------------| |-------------------------------------------------------------------| + * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | Del | + * | + |--------------| |-------------------------------------------------------------------| + * | | 6 | 5 | 4 | |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | Pgup| + * |-------------------| |-------------------------------------------------------------------| + * | | 3 | 2 | 1 | |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | Pgdn| + * | ENT|-------------------------------------------------------------------------------------| + * | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght| + * `------------------------------------------------------------------------------------------' + */ + [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_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 + ), + + [1] = LAYOUT_ext65( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, RGB_TOG, 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, KC_TRNS, KC_TRNS, EEP_RST, + KC_TRNS, RGB_HUI, RGB_SAI, 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, DEBUG, + KC_TRNS, RGB_HUD, RGB_SAD, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_ext65( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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_ext65( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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 + +void render_layer_state(void) { + oled_write_ln(PSTR("LAYER"), false); + oled_write_ln(PSTR("L1"), layer_state_is(1)); + oled_write_ln(PSTR("L2"), layer_state_is(2)); + oled_write_ln(PSTR("L3"), layer_state_is(3)); + oled_write_ln(PSTR(" "), false); +} + +void render_keylock_status(led_t led_state) { + oled_write_ln(PSTR("Lock:"), false); + oled_write(PSTR("N"), led_state.num_lock); + oled_write(PSTR("C"), led_state.caps_lock); + oled_write_ln(PSTR("S"), led_state.scroll_lock); + oled_write_ln(PSTR(" "), false); +} + +void render_mod_status(uint8_t modifiers) { + oled_write_ln(PSTR("Mods:"), false); + oled_write(PSTR("S"), (modifiers & MOD_MASK_SHIFT)); + oled_write(PSTR("C"), (modifiers & MOD_MASK_CTRL)); + oled_write(PSTR("A"), (modifiers & MOD_MASK_ALT)); + oled_write_ln(PSTR("G"), (modifiers & MOD_MASK_GUI)); + oled_write_ln(PSTR(" "), false); +} + +void oled_task_user(void) { + render_layer_state(); + render_keylock_status(host_keyboard_led_state()); + render_mod_status(get_mods()|get_oneshot_mods()); +} + +#endif diff --git a/qmk/keyboards/aeboards/ext65/keymaps/default/readme.md b/qmk/keyboards/aeboards/ext65/keymaps/default/readme.md new file mode 100644 index 00000000..3a3bb66d --- /dev/null +++ b/qmk/keyboards/aeboards/ext65/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The Default Ext65Rev2 Layout + diff --git a/qmk/keyboards/aeboards/ext65/keymaps/via/keymap.c b/qmk/keyboards/aeboards/ext65/keymaps/via/keymap.c new file mode 100644 index 00000000..af753792 --- /dev/null +++ b/qmk/keyboards/aeboards/ext65/keymaps/via/keymap.c @@ -0,0 +1,98 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------. ,-------------------------------------------------------------------. + * |- | * | / |NmLK| |Esc| 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| ~ | Pscr| + * |-------------------| |-------------------------------------------------------------------| + * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | Del | + * | + |--------------| |-------------------------------------------------------------------| + * | | 6 | 5 | 4 | |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | Pgup| + * |-------------------| |-------------------------------------------------------------------| + * | | 3 | 2 | 1 | |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | Pgdn| + * | ENT|-------------------------------------------------------------------------------------| + * | | . | 0 | | Ctrl | Win | Alt | Space | FN | Ctrl | |Left| Dn | Rght| + * `------------------------------------------------------------------------------------------' + */ + [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_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 + ), + + [1] = LAYOUT_ext65( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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, RGB_TOG, 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, KC_TRNS, KC_TRNS, EEP_RST, + KC_TRNS, RGB_HUI, RGB_SAI, 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, DEBUG, + KC_TRNS, RGB_HUD, RGB_SAD, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_ext65( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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_ext65( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, 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 + +void render_layer_state(void) { + oled_write_ln(PSTR("LAYER"), false); + oled_write_ln(PSTR("L1"), layer_state_is(1)); + oled_write_ln(PSTR("L2"), layer_state_is(2)); + oled_write_ln(PSTR("L3"), layer_state_is(3)); + oled_write_ln(PSTR(" "), false); +} + +void render_keylock_status(led_t led_state) { + oled_write_ln(PSTR("Lock:"), false); + oled_write(PSTR("N"), led_state.num_lock); + oled_write(PSTR("C"), led_state.caps_lock); + oled_write_ln(PSTR("S"), led_state.scroll_lock); + oled_write_ln(PSTR(" "), false); +} + +void render_mod_status(uint8_t modifiers) { + oled_write_ln(PSTR("Mods:"), false); + oled_write(PSTR("S"), (modifiers & MOD_MASK_SHIFT)); + oled_write(PSTR("C"), (modifiers & MOD_MASK_CTRL)); + oled_write(PSTR("A"), (modifiers & MOD_MASK_ALT)); + oled_write_ln(PSTR("G"), (modifiers & MOD_MASK_GUI)); + oled_write_ln(PSTR(" "), false); +} + +void oled_task_user(void) { + render_layer_state(); + render_keylock_status(host_keyboard_led_state()); + render_mod_status(get_mods()|get_oneshot_mods()); +} + +#endif diff --git a/qmk/keyboards/aeboards/ext65/keymaps/via/readme.md b/qmk/keyboards/aeboards/ext65/keymaps/via/readme.md new file mode 100644 index 00000000..4be6efb9 --- /dev/null +++ b/qmk/keyboards/aeboards/ext65/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA Ext65Rev2 Layout + diff --git a/qmk/keyboards/aeboards/ext65/keymaps/via/rules.mk b/qmk/keyboards/aeboards/ext65/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/aeboards/ext65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/aeboards/ext65/readme.md b/qmk/keyboards/aeboards/ext65/readme.md new file mode 100644 index 00000000..dfbb403b --- /dev/null +++ b/qmk/keyboards/aeboards/ext65/readme.md @@ -0,0 +1,19 @@ +# EXT65 + +A southpaw inspired keyboard by [AEBoards](https://aeboards.com/) + +* Keyboard Maintainer: [Xelus22](https://github.com/Xelus22) +* Hardware Supported: EXT65 Rev1, Rev2 +* Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make aeboards/ext65/rev1:default + make aeboards/ext65/rev2:default + +Flashing example for this keyboard: + + make aeboards/ext65/rev1:default:flash + make aeboards/ext65/rev2: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/qmk/keyboards/aeboards/ext65/rev1/config.h b/qmk/keyboards/aeboards/ext65/rev1/config.h index c6e6ac89..cd9c2400 100644 --- a/qmk/keyboards/aeboards/ext65/rev1/config.h +++ b/qmk/keyboards/aeboards/ext65/rev1/config.h @@ -22,9 +22,8 @@ #define VENDOR_ID 0x4145 // "AE" #define PRODUCT_ID 0xAE65 // AEboards EXT65 #define DEVICE_VER 0x0001 -#define MANUFACTURER AEboards -#define PRODUCT AEboards Ext65 -#define DESCRIPTION AEboards Ext65 +#define MANUFACTURER AEBoards +#define PRODUCT AEBoards Ext65 /* key matrix size */ #define MATRIX_ROWS 10 diff --git a/qmk/keyboards/aeboards/ext65/rev1/rev1.c b/qmk/keyboards/aeboards/ext65/rev1/rev1.c index f52f8d43..1d69a689 100644 --- a/qmk/keyboards/aeboards/ext65/rev1/rev1.c +++ b/qmk/keyboards/aeboards/ext65/rev1/rev1.c @@ -1,18 +1,32 @@ -/* 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 . - */ +#include "rev1.h" -// Nothing to see here, move along... ;-) +void keyboard_pre_init_user(void) { + // Call the keyboard pre init code. + // Set our LED pins as output + setPinOutput(D5); + setPinOutput(D3); + setPinOutput(D2); + setPinOutput(D1); +} +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if(res) { + writePin(D5, led_state.num_lock); + writePin(D3, led_state.caps_lock); + writePin(D2, led_state.scroll_lock); + } + return res; +} + +layer_state_t layer_state_set_kb(layer_state_t state) { + switch (get_highest_layer(state)) { + case 1: + writePinHigh(D1); + break; + default: // for any other layers, or the default layer + writePinLow(D1); + break; + } + return layer_state_set_user(state); +} diff --git a/qmk/keyboards/aeboards/ext65/rev1/rev1.h b/qmk/keyboards/aeboards/ext65/rev1/rev1.h index de79b92a..a8efc48a 100644 --- a/qmk/keyboards/aeboards/ext65/rev1/rev1.h +++ b/qmk/keyboards/aeboards/ext65/rev1/rev1.h @@ -1,4 +1,4 @@ -/* Copyright 2018 Jason Williams (Wilba) +/* Copyright 2020 Harrison Chan (Xelus) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,6 +16,7 @@ #pragma once +#include "ext65.h" #include "quantum.h" #define ____ KC_NO diff --git a/qmk/keyboards/aeboards/ext65/rev2/config.h b/qmk/keyboards/aeboards/ext65/rev2/config.h index 959bf91d..9db2b313 100644 --- a/qmk/keyboards/aeboards/ext65/rev2/config.h +++ b/qmk/keyboards/aeboards/ext65/rev2/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0x4145 // "AE" #define PRODUCT_ID 0xA652 // AEboards EXT65 Rev2 #define DEVICE_VER 0x0001 -#define MANUFACTURER AEboards +#define MANUFACTURER AEBoards #define PRODUCT AEBoards Ext65 Rev2 /* key matrix size */ diff --git a/qmk/keyboards/aeboards/ext65/rev2/rev2.c b/qmk/keyboards/aeboards/ext65/rev2/rev2.c index 35e88a8b..5d765810 100644 --- a/qmk/keyboards/aeboards/ext65/rev2/rev2.c +++ b/qmk/keyboards/aeboards/ext65/rev2/rev2.c @@ -1,5 +1,8 @@ #include "rev2.h" +// Tested and verified working on ext65rev2 +void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } + #ifdef OLED_DRIVER_ENABLE void board_init(void) { SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; diff --git a/qmk/keyboards/aeboards/ext65/rev2/rev2.h b/qmk/keyboards/aeboards/ext65/rev2/rev2.h index 23a4d7c8..a8efc48a 100644 --- a/qmk/keyboards/aeboards/ext65/rev2/rev2.h +++ b/qmk/keyboards/aeboards/ext65/rev2/rev2.h @@ -1,5 +1,22 @@ +/* Copyright 2020 Harrison Chan (Xelus) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "ext65.h" #include "quantum.h" #define ____ KC_NO diff --git a/qmk/keyboards/aeboards/ext65/rules.mk b/qmk/keyboards/aeboards/ext65/rules.mk new file mode 100644 index 00000000..d8b0595a --- /dev/null +++ b/qmk/keyboards/aeboards/ext65/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = aeboards/ext65/rev2 \ No newline at end of file diff --git a/qmk/keyboards/ai03/orbit/matrix.h b/qmk/keyboards/ai03/orbit/matrix.h index c2bdd309..664372b7 100644 --- a/qmk/keyboards/ai03/orbit/matrix.h +++ b/qmk/keyboards/ai03/orbit/matrix.h @@ -1,3 +1,3 @@ #pragma once -#include +#include "common/matrix.h" diff --git a/qmk/keyboards/ai03/orbit/orbit.c b/qmk/keyboards/ai03/orbit/orbit.c index 2f149875..b51ddbc6 100644 --- a/qmk/keyboards/ai03/orbit/orbit.c +++ b/qmk/keyboards/ai03/orbit/orbit.c @@ -208,8 +208,6 @@ uint32_t layer_state_set_kb(uint32_t state) { if (is_keyboard_master()) { - - current_layer = biton32(state); serial_m2s_buffer.current_layer = biton32(state); // If left half, do the LED toggle thing diff --git a/qmk/keyboards/ai03/orbit/orbit.h b/qmk/keyboards/ai03/orbit/orbit.h index 211b9ebc..2ada881f 100644 --- a/qmk/keyboards/ai03/orbit/orbit.h +++ b/qmk/keyboards/ai03/orbit/orbit.h @@ -56,8 +56,6 @@ { R40, R41, R42, R43, R44, R45, KC_NO } \ } -uint8_t current_layer; - extern void led_toggle(int id, bool on); void set_all_leds(bool leds[6]); extern void set_layer_indicators(uint8_t layer); diff --git a/qmk/keyboards/ai03/orbit/transport.h b/qmk/keyboards/ai03/orbit/transport.h index 422e2ecb..67597652 100644 --- a/qmk/keyboards/ai03/orbit/transport.h +++ b/qmk/keyboards/ai03/orbit/transport.h @@ -1,6 +1,6 @@ #pragma once -#include +#include "common/matrix.h" #define ROWS_PER_HAND (MATRIX_ROWS/2) diff --git a/qmk/keyboards/ai03/polaris/keymaps/mekberg/config.h b/qmk/keyboards/ai03/polaris/keymaps/mekberg/config.h new file mode 100644 index 00000000..ef8caf87 --- /dev/null +++ b/qmk/keyboards/ai03/polaris/keymaps/mekberg/config.h @@ -0,0 +1,22 @@ +/* +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 + +// Define some configuration for modtap behavior +// #define TAPPING_TERM 150 +#define PERMISSIVE_HOLD diff --git a/qmk/keyboards/ai03/polaris/keymaps/mekberg/keymap.c b/qmk/keyboards/ai03/polaris/keymaps/mekberg/keymap.c new file mode 100644 index 00000000..fce03adf --- /dev/null +++ b/qmk/keyboards/ai03/polaris/keymaps/mekberg/keymap.c @@ -0,0 +1,97 @@ +/* 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 + +enum layer_names { + _BASE, + _NAV, + _FN +}; + +#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] = { + [_BASE] = LAYOUT_60_tsangan_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_NUBS, KC_RBRC, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 1,5u | | | | | | | | | | | | | 1,5u | + LT(_NAV,KC_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, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 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(_FN), +// └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +// | | 1,25u | | 1,25u | | + XXXXXXX, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, KC_RGUI, XXXXXXX +// └────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ), + [_NAV] = LAYOUT_60_tsangan_hhkb( +// ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// | | | | | | | | | | | | | | | | + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, 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 +// └────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ), + [_FN] = LAYOUT_60_tsangan_hhkb( +// ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +// | | | | | | | | | | | | | | | | + 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, _______, _______, +// |─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────| +// | 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 +// └────────────────────────────────────────────────────────────────────────────────────────────────────┘ + ), +}; diff --git a/qmk/keyboards/ai03/polaris/keymaps/mekberg/readme.md b/qmk/keyboards/ai03/polaris/keymaps/mekberg/readme.md new file mode 100644 index 00000000..b9ae9642 --- /dev/null +++ b/qmk/keyboards/ai03/polaris/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 ai03/polaris:mekberg` + +To build and immediately flash: `make clean && make ai03/polaris:mekberg:flash` diff --git a/qmk/keyboards/ai03/polaris/keymaps/mekberg/rules.mk b/qmk/keyboards/ai03/polaris/keymaps/mekberg/rules.mk new file mode 100644 index 00000000..e47bb9e6 --- /dev/null +++ b/qmk/keyboards/ai03/polaris/keymaps/mekberg/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = no # Disable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Disable keyboard RGB underglow diff --git a/qmk/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.c b/qmk/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.c index 8e030352..20b857d0 100644 --- a/qmk/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.c +++ b/qmk/keyboards/akegata_denki/device_one/boards/DEVICE_ONE/board.c @@ -16,8 +16,8 @@ * generator plugin. Do not edit manually. */ -#include "hal.h" -#include "stm32_gpio.h" +#include +#include /*===========================================================================*/ /* Driver local definitions. */ diff --git a/qmk/keyboards/al1/al1.c b/qmk/keyboards/al1/al1.c index e50a6373..460a7620 100644 --- a/qmk/keyboards/al1/al1.c +++ b/qmk/keyboards/al1/al1.c @@ -14,27 +14,3 @@ * along with this program. If not, see . */ #include "al1.h" - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - CONFIG_LED_IO; - print_dec(usb_led); - if (usb_led & (1<. /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_NUM_LOCK_PIN D0 +#define LED_CAPS_LOCK_PIN B7 +#define LED_SCROLL_LOCK_PIN D1 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 diff --git a/qmk/keyboards/alf/dc60/config.h b/qmk/keyboards/alf/dc60/config.h index b4cff82d..098891ee 100644 --- a/qmk/keyboards/alf/dc60/config.h +++ b/qmk/keyboards/alf/dc60/config.h @@ -48,6 +48,9 @@ along with this program. If not, see . /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B7 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 5 diff --git a/qmk/keyboards/alf/dc60/dc60.c b/qmk/keyboards/alf/dc60/dc60.c index 70979adf..4096d10a 100644 --- a/qmk/keyboards/alf/dc60/dc60.c +++ b/qmk/keyboards/alf/dc60/dc60.c @@ -14,36 +14,3 @@ * along with this program. If not, see . */ #include "dc60.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) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 7); - PORTB &= ~(1 << 7); - } else { - DDRB &= ~(1 << 7); - PORTB &= ~(1 << 7); - } - - led_set_user(usb_led); -} diff --git a/qmk/keyboards/alf/x11/config.h b/qmk/keyboards/alf/x11/config.h index fcf4e85a..cd989350 100644 --- a/qmk/keyboards/alf/x11/config.h +++ b/qmk/keyboards/alf/x11/config.h @@ -48,10 +48,10 @@ along with this program. If not, see . /* 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 LED_NUM_LOCK_PIN E6 +#define LED_CAPS_LOCK_PIN C6 +#define LED_SCROLL_LOCK_PIN C7 +#define LED_PIN_ON_STATE 0 #define BACKLIGHT_PIN B7 #define BACKLIGHT_BREATHING diff --git a/qmk/keyboards/alf/x11/x11.c b/qmk/keyboards/alf/x11/x11.c index 9699918d..28e77ecd 100644 --- a/qmk/keyboards/alf/x11/x11.c +++ b/qmk/keyboards/alf/x11/x11.c @@ -14,51 +14,3 @@ * along with this program. If not, see . */ #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(); -} - -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(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_SCROLL_LOCK)) { - writePinLow(C7); - } else { - writePinHigh(C7); - } - - led_set_user(usb_led); -} diff --git a/qmk/keyboards/alps64/alps64.c b/qmk/keyboards/alps64/alps64.c index 0e4ef07b..61270aac 100644 --- a/qmk/keyboards/alps64/alps64.c +++ b/qmk/keyboards/alps64/alps64.c @@ -15,23 +15,3 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "alps64.h" - -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); - } - - led_set_user(usb_led); -} diff --git a/qmk/keyboards/alps64/config.h b/qmk/keyboards/alps64/config.h index 25453e69..15903818 100644 --- a/qmk/keyboards/alps64/config.h +++ b/qmk/keyboards/alps64/config.h @@ -37,6 +37,8 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN C5 + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/qmk/keyboards/amj40/amj40.c b/qmk/keyboards/amj40/amj40.c index 5a237699..20742c32 100644 --- a/qmk/keyboards/amj40/amj40.c +++ b/qmk/keyboards/amj40/amj40.c @@ -1,30 +1 @@ #include "amj40.h" -#include "led.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 - DDRB |= (1<<2); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. #define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7} #define UNUSED_PINS +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN B6 /* COL2ROW or ROW2COL */ diff --git a/qmk/keyboards/amj60/amj60.c b/qmk/keyboards/amj60/amj60.c index 993a5917..02aa116d 100644 --- a/qmk/keyboards/amj60/amj60.c +++ b/qmk/keyboards/amj60/amj60.c @@ -1,30 +1 @@ #include "amj60.h" -#include "led.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 - DDRB |= (1<<2); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. #define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7, D6, B3} #define UNUSED_PINS -#define BACKLIGHT_PIN B6 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +#define LED_CAPS_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + +#define BACKLIGHT_PIN B6 + + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/qmk/keyboards/amjpad/amjpad.c b/qmk/keyboards/amjpad/amjpad.c index ac5991bd..83cdedf6 100644 --- a/qmk/keyboards/amjpad/amjpad.c +++ b/qmk/keyboards/amjpad/amjpad.c @@ -1,30 +1 @@ #include "amjpad.h" -#include "led.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 - DDRD |= (1<<6); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +#define LED_NUM_LOCK_PIN D6 +#define LED_PIN_ON_STATE 0 + /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/qmk/keyboards/anavi/macropad8/keymaps/default/keymap.c b/qmk/keyboards/anavi/macropad8/keymaps/default/keymap.c index 8cdf9028..68fbdf0d 100644 --- a/qmk/keyboards/anavi/macropad8/keymaps/default/keymap.c +++ b/qmk/keyboards/anavi/macropad8/keymaps/default/keymap.c @@ -25,7 +25,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { void oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); - oled_write_P(PSTR("Active layer:"), false); + oled_write_P(PSTR("Active layer: "), false); switch (get_highest_layer(layer_state)) { case _MAIN: diff --git a/qmk/keyboards/anavi/macropad8/keymaps/kodi/keymap.c b/qmk/keyboards/anavi/macropad8/keymaps/kodi/keymap.c index 17b00807..72022a01 100644 --- a/qmk/keyboards/anavi/macropad8/keymaps/kodi/keymap.c +++ b/qmk/keyboards/anavi/macropad8/keymaps/kodi/keymap.c @@ -12,6 +12,18 @@ const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {60, 30, 15}; const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; #endif +/** + * Kodi shortcuts: + * + * ESC - Previous menu OR Home screen + * Enter - Select + * X - Stop + * Arrows to move + * + * For details have a look at: + * https://kodi.wiki/view/Keyboard_controls + */ + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MAIN] = LAYOUT_ortho_2x4( KC_ESC, KC_UP, KC_ENTER, KC_X, @@ -32,11 +44,11 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { void oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); - oled_write_P(PSTR("Active layer:"), false); + oled_write_P(PSTR("Active layer: "), false); switch (get_highest_layer(layer_state)) { case _MAIN: - oled_write_ln_P(PSTR("Main"), false); + oled_write_ln_P(PSTR("Kodi"), false); break; case _FN: oled_write_ln_P(PSTR("FN"), false); diff --git a/qmk/keyboards/aos/tkl/keymaps/via/rules.mk b/qmk/keyboards/aos/tkl/keymaps/via/rules.mk index 96d2d189..1e5b9980 100644 --- a/qmk/keyboards/aos/tkl/keymaps/via/rules.mk +++ b/qmk/keyboards/aos/tkl/keymaps/via/rules.mk @@ -1,2 +1 @@ VIA_ENABLE = yes -MOUSEKEY_ENABLE = no diff --git a/qmk/keyboards/ares/ares.h b/qmk/keyboards/ares/ares.h index 41ecb570..6628bb02 100644 --- a/qmk/keyboards/ares/ares.h +++ b/qmk/keyboards/ares/ares.h @@ -1,5 +1,5 @@ /* -Copyright 2019 Maarten Dekkers +Copyright 2019 Evy 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 diff --git a/qmk/keyboards/ares/keymaps/default/keymap.c b/qmk/keyboards/ares/keymaps/default/keymap.c index 18e3d30b..490dbdf6 100644 --- a/qmk/keyboards/ares/keymaps/default/keymap.c +++ b/qmk/keyboards/ares/keymaps/default/keymap.c @@ -1,5 +1,5 @@ /* -Copyright 2019 Maarten Dekkers +Copyright 2019 Evy 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 diff --git a/qmk/keyboards/at_at/660m/660m.c b/qmk/keyboards/at_at/660m/660m.c index 1a54df3b..92ccc067 100644 --- a/qmk/keyboards/at_at/660m/660m.c +++ b/qmk/keyboards/at_at/660m/660m.c @@ -1 +1,6 @@ #include "660m.h" + +void board_init(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); +} diff --git a/qmk/keyboards/at_at/660m/bootloader_defs.h b/qmk/keyboards/at_at/660m/bootloader_defs.h index 02c48c4e..dccd0fa5 100644 --- a/qmk/keyboards/at_at/660m/bootloader_defs.h +++ b/qmk/keyboards/at_at/660m/bootloader_defs.h @@ -1,7 +1,5 @@ /* 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/qmk/keyboards/at_at/660m/config.h b/qmk/keyboards/at_at/660m/config.h index 93b58b30..c876e0d1 100644 --- a/qmk/keyboards/at_at/660m/config.h +++ b/qmk/keyboards/at_at/660m/config.h @@ -17,6 +17,12 @@ along with this program. If not, see . #pragma once +/* Ensure we jump to bootloader if the RESET keycode was pressed */ +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE + +/* LSE clock */ +#define STM32_LSECLK 32768 + /* USB Device descriptor parameter */ #define VENDOR_ID 0xA22A #define PRODUCT_ID 0x6600 diff --git a/qmk/keyboards/at_at/660m/rules.mk b/qmk/keyboards/at_at/660m/rules.mk index 8c69ff7e..a94604fb 100644 --- a/qmk/keyboards/at_at/660m/rules.mk +++ b/qmk/keyboards/at_at/660m/rules.mk @@ -1,6 +1,6 @@ # MCU name MCU = STM32F072 -BOARD = ST_STM32F072B_DISCOVERY +BOARD = GENERIC_STM32_F072XB # Build Options # comment out to disable the options. diff --git a/qmk/keyboards/atreus/keymaps/talljoe/config.h b/qmk/keyboards/atreus/keymaps/talljoe/config.h new file mode 100644 index 00000000..64d5b589 --- /dev/null +++ b/qmk/keyboards/atreus/keymaps/talljoe/config.h @@ -0,0 +1,53 @@ +/* Copyright 2020 Joseph Wasson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 SPACE_COUNT 3 + +#define TEMPLATE_TKL( \ + KESC, KF01, KF02, KF03, KF04, KF05, KF06, KF07, KF08, KF09, KF10, KF11, KF12, KSCL, KPRS, KADJ, \ + KGRV, K_1 , K_2 , K_3 , K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , KMIN, KEQL, KBSP, KINS, KHOM, KPUP, \ + KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBLS, KDEL, KEND, LPDN, \ + KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ + KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, K_UP, \ + KLCT, KLOS, KLAL, KSP3, KSP2, KSP1, KRAL, KROS, KRCT, KPTT, K_LT, K_DN, K_RT \ +) LAYOUT( \ + K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , \ + K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, \ + K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, \ + KTAB, KLOS, KLAL, KLSH, KSP3, KSP2, KCAP, KSP1, KRSH, KBLS, KQUO, KADJ \ +) + +#define TEMPLATE_NUM( \ + KGRV, K_1 , K_2 , K_3 , K_4 , K_5 , K_6 , K_7 , K_8 , K_9 , K_0 , KMIN, KEQL, KBSL, KESC, \ + KTAB, K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , KLBR, KRBR, KBSP, \ + KCAP, K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, KQUO, KENT, \ + KLSH, K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, KRSH, KADJ, \ + KLCT, KLOS, KLAL, KSP3, KSP2, KSP1, KRAL, KROS, KRCT, KPTT \ +) LAYOUT( \ + K_Q , K_W , K_E , K_R , K_T , K_Y , K_U , K_I , K_O , K_P , \ + K_A , K_S , K_D , K_F , K_G , K_H , K_J , K_K , K_L , KSMI, \ + K_Z , K_X , K_C , K_V , K_B , K_N , K_M , KCMA, KDOT, KSLS, \ + KTAB, KLOS, KLAL, KLSH, KSP3, KSP2, KCAP, KSP1, KRAL, KROS, KQUO, KADJ \ +) + +#define TEMPLATE_RESET LAYOUT( \ + RESET , 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, \ + RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +) diff --git a/qmk/keyboards/atreus/keymaps/talljoe/keymap.c b/qmk/keyboards/atreus/keymaps/talljoe/keymap.c new file mode 100644 index 00000000..7812add8 --- /dev/null +++ b/qmk/keyboards/atreus/keymaps/talljoe/keymap.c @@ -0,0 +1 @@ +// This space intentionally left blank diff --git a/qmk/keyboards/atreus/keymaps/talljoe/rules.mk b/qmk/keyboards/atreus/keymaps/talljoe/rules.mk new file mode 100644 index 00000000..92007fe8 --- /dev/null +++ b/qmk/keyboards/atreus/keymaps/talljoe/rules.mk @@ -0,0 +1 @@ +USER_NAME := talljoe diff --git a/qmk/keyboards/beatervan/beatervan.c b/qmk/keyboards/beatervan/beatervan.c new file mode 100644 index 00000000..0730af00 --- /dev/null +++ b/qmk/keyboards/beatervan/beatervan.c @@ -0,0 +1,16 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "beatervan.h" diff --git a/qmk/keyboards/beatervan/beatervan.h b/qmk/keyboards/beatervan/beatervan.h new file mode 100644 index 00000000..e6458098 --- /dev/null +++ b/qmk/keyboards/beatervan/beatervan.h @@ -0,0 +1,70 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K34, K36, K37, K38, K39 \ +) \ +{ \ + { 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, KC_NO, K34, KC_NO, K36, K37, K38, K39, KC_NO, KC_NO } \ +} + +#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, K32, K33, 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, KC_NO, KC_NO, KC_NO, K37, 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, K34, 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, K34, KC_NO, KC_NO, K37, 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, K34, K33, 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, KC_NO, KC_NO, K37, K38, K39, K3A, K3B } \ +} diff --git a/qmk/keyboards/beatervan/config.h b/qmk/keyboards/beatervan/config.h new file mode 100644 index 00000000..a8973ab4 --- /dev/null +++ b/qmk/keyboards/beatervan/config.h @@ -0,0 +1,55 @@ + +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x6F6A // "oj" +#define PRODUCT_ID 0x6276 // "bv" +#define DEVICE_VER 0x0001 +#define MANUFACTURER OJ +#define PRODUCT beatervan + +/* 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, D0, D4, C6 } +#define MATRIX_COL_PINS { D7, E6, B4, B5, F4, F5, F6, F7, B1, B3, B2, B6 } +#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 + +/* 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/qmk/keyboards/beatervan/info.json b/qmk/keyboards/beatervan/info.json new file mode 100644 index 00000000..f6f38764 --- /dev/null +++ b/qmk/keyboards/beatervan/info.json @@ -0,0 +1,204 @@ +{ + "keyboard_name": "beatervan", + "url": "", + "maintainer": "OJ", + "width": 12.75, + "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":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/qmk/keyboards/beatervan/keymaps/default/keymap.c b/qmk/keyboards/beatervan/keymaps/default/keymap.c new file mode 100644 index 00000000..a99b9c9e --- /dev/null +++ b/qmk/keyboards/beatervan/keymaps/default/keymap.c @@ -0,0 +1,93 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _QW, + _DV, + _CM, + _L1, + _L2, + _L3, +}; + +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, KC_LCBR, KC_RCBR, 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, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DV); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QW); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_CM); + } + return false; + default: + return true; + } + return true; +}; diff --git a/qmk/keyboards/beatervan/keymaps/default/readme.md b/qmk/keyboards/beatervan/keymaps/default/readme.md new file mode 100644 index 00000000..ac84c08c --- /dev/null +++ b/qmk/keyboards/beatervan/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for tv44 \ No newline at end of file diff --git a/qmk/keyboards/beatervan/keymaps/oj/keymap.c b/qmk/keyboards/beatervan/keymaps/oj/keymap.c new file mode 100644 index 00000000..6b32c4dd --- /dev/null +++ b/qmk/keyboards/beatervan/keymaps/oj/keymap.c @@ -0,0 +1,93 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _QW, + _DV, + _CM, + _L1, + _L2, + _L3 +}; +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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_DEL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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, MO(_L2), + KC_TAB, MO(_L1), KC_LGUI, KC_SPC, KC_BSPC, KC_LALT, KC_RALT, TG(_L3) + ), + [_DV] = LAYOUT( /* Dvorak */ + KC_ESC, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_QUOT, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER, + 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_TAB, MO(_L1), KC_LGUI, KC_SPC, KC_BSPC, KC_LALT, KC_RALT, TG(_L3) + ), + [_CM] = LAYOUT( /* Colemak */ + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_QUOT, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENTER, + 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_TAB, MO(_L1), KC_LGUI, KC_SPC, KC_BSPC, KC_LALT, KC_RALT, TG(_L3) + ), + [_L1] = LAYOUT( /* NUM */ + 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_UP, KC_DOWN, KC_RGHT, KC_SCLN, KC_BSLS, + _______, _______, _______, KC_PSCR, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L2] = LAYOUT( /* F Keys */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, KC_ENTER, + _______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L3] = LAYOUT( /* Gaming */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, _______, MO(_L2), KC_F9, KC_F10, KC_F11, KC_F12, _______, + KC_LSFT, KC_Z, KC_B, KC_SPC, KC_BSPC, _______, _______, TG(_L3) + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DV); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QW); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_CM); + } + return false; + default: + return true; + } + return true; +}; diff --git a/qmk/keyboards/beatervan/keymaps/oj/readme.md b/qmk/keyboards/beatervan/keymaps/oj/readme.md new file mode 100644 index 00000000..34c2f075 --- /dev/null +++ b/qmk/keyboards/beatervan/keymaps/oj/readme.md @@ -0,0 +1 @@ +#Objectively superior keymap for v44 diff --git a/qmk/keyboards/beatervan/keymaps/via/keymap.c b/qmk/keyboards/beatervan/keymaps/via/keymap.c new file mode 100644 index 00000000..938f9030 --- /dev/null +++ b/qmk/keyboards/beatervan/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 OJtheTiny + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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*/ + [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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_TAB, KC_RALT, KC_RGUI, KC_RCTL + ), + /* Num Layer */ + [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 + ), + /* F-Layer */ + [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 + ), + /* Lock Layer */ + [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 + ) +}; diff --git a/qmk/keyboards/beatervan/keymaps/via/readme.md b/qmk/keyboards/beatervan/keymaps/via/readme.md new file mode 100644 index 00000000..2e9d4517 --- /dev/null +++ b/qmk/keyboards/beatervan/keymaps/via/readme.md @@ -0,0 +1 @@ +# Via keymap for beatervan diff --git a/qmk/keyboards/beatervan/keymaps/via/rules.mk b/qmk/keyboards/beatervan/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/beatervan/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/beatervan/readme.md b/qmk/keyboards/beatervan/readme.md new file mode 100644 index 00000000..2b7dd590 --- /dev/null +++ b/qmk/keyboards/beatervan/readme.md @@ -0,0 +1,13 @@ +# Beatervan (minivan) + +A Pro-Micro based Minivan with THT diodes + +Keyboard Maintainer: OJ +Hardware Supported: Beatervan PCB, 32u4 "pro-micro" +Hardware Availability: Private GB + +Make example for this keyboard (after setting up your build environment): + + make beatervan: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/qmk/keyboards/beatervan/rules.mk b/qmk/keyboards/beatervan/rules.mk new file mode 100644 index 00000000..1ea4a84d --- /dev/null +++ b/qmk/keyboards/beatervan/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 = 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 = no # Audio output on port C6 diff --git a/qmk/keyboards/bm16s/config.h b/qmk/keyboards/bm16s/config.h index 379e59bd..83f5bbbe 100644 --- a/qmk/keyboards/bm16s/config.h +++ b/qmk/keyboards/bm16s/config.h @@ -2,8 +2,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x4B50 //KP +#define PRODUCT_ID 0x016B #define DEVICE_VER 0x0001 #define MANUFACTURER KPrepublic #define PRODUCT bm16s diff --git a/qmk/keyboards/bm16s/keymaps/via/keymap.c b/qmk/keyboards/bm16s/keymaps/via/keymap.c new file mode 100644 index 00000000..71b0d2b0 --- /dev/null +++ b/qmk/keyboards/bm16s/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2020 Relocks + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_4x4( + KC_KP_7, KC_KP_8, KC_KP_9, MO(1), + KC_KP_4, KC_KP_5, KC_KP_6, KC_PMNS, + KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, + KC_KP_0, KC_PDOT, KC_PCMM, KC_PENT + ), + [1] = LAYOUT_ortho_4x4( + RESET, BL_STEP, KC_TRNS, KC_VOLU, + BL_TOGG, BL_DEC, BL_INC, KC_VOLD, + RGB_TOG, RGB_MOD, RGB_HUI, KC_MUTE, + RGB_SAI, RGB_SAD, RGB_HUD, KC_TRNS + ), + [2] = LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/qmk/keyboards/bm16s/keymaps/via/readme.md b/qmk/keyboards/bm16s/keymaps/via/readme.md new file mode 100644 index 00000000..f5e43b90 --- /dev/null +++ b/qmk/keyboards/bm16s/keymaps/via/readme.md @@ -0,0 +1 @@ +# Via keymap for bm16s diff --git a/qmk/keyboards/bm16s/keymaps/via/rules.mk b/qmk/keyboards/bm16s/keymaps/via/rules.mk new file mode 100644 index 00000000..43061db1 --- /dev/null +++ b/qmk/keyboards/bm16s/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/bm40hsrgb/rules.mk b/qmk/keyboards/bm40hsrgb/rules.mk index e83c0edb..426c99c9 100644 --- a/qmk/keyboards/bm40hsrgb/rules.mk +++ b/qmk/keyboards/bm40hsrgb/rules.mk @@ -19,7 +19,8 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = WS2812 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 LAYOUTS = planck_mit LAYOUTS_HAS_RGB = yes diff --git a/qmk/keyboards/bm60poker/rules.mk b/qmk/keyboards/bm60poker/rules.mk index 3f4a00ea..74364ace 100644 --- a/qmk/keyboards/bm60poker/rules.mk +++ b/qmk/keyboards/bm60poker/rules.mk @@ -20,5 +20,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = WS2812 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 LAYOUTS = 60_ansi diff --git a/qmk/keyboards/bm60rgb/rules.mk b/qmk/keyboards/bm60rgb/rules.mk index d888399c..9e0e3661 100644 --- a/qmk/keyboards/bm60rgb/rules.mk +++ b/qmk/keyboards/bm60rgb/rules.mk @@ -30,7 +30,8 @@ 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 = WS2812 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 LTO_ENABLE = yes # partially generated by KBFirmware JSON to QMK Parser diff --git a/qmk/keyboards/bm60rgb_iso/rules.mk b/qmk/keyboards/bm60rgb_iso/rules.mk index e5915538..8a550e63 100644 --- a/qmk/keyboards/bm60rgb_iso/rules.mk +++ b/qmk/keyboards/bm60rgb_iso/rules.mk @@ -20,5 +20,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = WS2812 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 LTO_ENABLE = yes diff --git a/qmk/keyboards/boardrun/bizarre/bizarre.c b/qmk/keyboards/boardrun/bizarre/bizarre.c new file mode 100644 index 00000000..10125f57 --- /dev/null +++ b/qmk/keyboards/boardrun/bizarre/bizarre.c @@ -0,0 +1,16 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "bizarre.h" diff --git a/qmk/keyboards/boardrun/bizarre/bizarre.h b/qmk/keyboards/boardrun/bizarre/bizarre.h new file mode 100644 index 00000000..656ab673 --- /dev/null +++ b/qmk/keyboards/boardrun/bizarre/bizarre.h @@ -0,0 +1,78 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + k11, k12, k117, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, k115, k116, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, k215, \ + k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314, k315, \ + k41, k42, k43, k44, k45, k46, k47, k57, k58, k48, k49, k410, k411, k412, k413, k415, \ + k52, k55, k56, k59, k512, k514, k515, k516 \ +) \ +{ \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, k115, k116, k117 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, k215, KC_NO, KC_NO }, \ + { KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314, k315, KC_NO, KC_NO }, \ + { k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413, KC_NO, k415, KC_NO, KC_NO }, \ + { KC_NO, k52, KC_NO, KC_NO, k55, k56, k57, k58, k59, KC_NO, KC_NO, k512, KC_NO, k514, k515, k516, KC_NO } \ +} + +#define LAYOUT_ansi( \ + k11, k12, k117, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, k115, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, k215, \ + k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k315, \ + k41, k43, k44, k45, k46, k47, k57, k58, k48, k49, k410, k411, k412, k413, k415, \ + k52, k55, k56, k59, k512, k514, k515, k516 \ +) \ +{ \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, k115, KC_NO, k117 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, k215, KC_NO, KC_NO }, \ + { KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, KC_NO, k315, KC_NO, KC_NO }, \ + { k41, KC_NO, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413, KC_NO, k415, KC_NO, KC_NO }, \ + { KC_NO, k52, KC_NO, KC_NO, k55, k56, k57, k58, k59, KC_NO, KC_NO, k512, KC_NO, k514, k515, k516, KC_NO } \ +} + +#define LAYOUT_split_bs( \ + k11, k12, k117, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, k115, k116, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, k215, \ + k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k315, \ + k41, k43, k44, k45, k46, k47, k57, k58, k48, k49, k410, k411, k412, k413, k415, \ + k52, k55, k56, k59, k512, k514, k515, k516 \ +) \ +{ \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, k115, k116, k117 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, k215, KC_NO, KC_NO }, \ + { KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, KC_NO, k315, KC_NO, KC_NO }, \ + { k41, KC_NO, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413, KC_NO, k415, KC_NO, KC_NO }, \ + { KC_NO, k52, KC_NO, KC_NO, k55, k56, k57, k58, k59, KC_NO, KC_NO, k512, KC_NO, k514, k515, k516, KC_NO } \ +} + +#define LAYOUT_iso( \ + k11, k12, k117, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, k115, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ + k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314, k315, \ + k41, k42, k43, k44, k45, k46, k47, k57, k58, k48, k49, k410, k411, k412, k413, k415, \ + k52, k55, k56, k59, k512, k514, k515, k516 \ +) \ +{ \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, k115, KC_NO, k117 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314, k315, KC_NO, KC_NO }, \ + { k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413, KC_NO, k415, KC_NO, KC_NO }, \ + { KC_NO, k52, KC_NO, KC_NO, k55, k56, k57, k58, k59, KC_NO, KC_NO, k512, KC_NO, k514, k515, k516, KC_NO } \ +} diff --git a/qmk/keyboards/boardrun/bizarre/config.h b/qmk/keyboards/boardrun/bizarre/config.h new file mode 100644 index 00000000..6e08d1f4 --- /dev/null +++ b/qmk/keyboards/boardrun/bizarre/config.h @@ -0,0 +1,83 @@ +/* +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xCDCD +#define PRODUCT_ID 0x5339 +#define DEVICE_VER 0x0001 +#define MANUFACTURER shensmobile +#define PRODUCT Boardrun Bizarre + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0, B3, B2, B1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN F5 +// #define BACKLIGHT_LEVELS 6 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 + +/* + * 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 + +// ws2812 options +#define RGB_DI_PIN B7 // pin the DI on the ws2812 is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 15 // number of LEDs +#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue +#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation +#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) diff --git a/qmk/keyboards/boardrun/bizarre/info.json b/qmk/keyboards/boardrun/bizarre/info.json new file mode 100644 index 00000000..3a100287 --- /dev/null +++ b/qmk/keyboards/boardrun/bizarre/info.json @@ -0,0 +1,397 @@ +{ + "keyboard_name": "Boardrun Bizarre", + "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/boardrun/bizarre", + "maintainer": "QMK Community", + "manufacturer": "shensmobile", + "width": 21, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"y":0, "x":0, "label":"Home"}, + + {"y":0, "x":1.5, "label":"Esc"}, + {"y":0, "x":2.5, "label":"`"}, + {"y":0, "x":3.5, "label":"1"}, + + {"y":0, "x":4.75, "label":"2"}, + {"y":0, "x":5.75, "label":"3"}, + {"y":0, "x":6.75, "label":"4"}, + {"y":0, "x":7.75, "label":"5"}, + + {"y":0, "x":11.25,"label":"6"}, + {"y":0, "x":12.25,"label":"7"}, + {"y":0, "x":13.25,"label":"8"}, + {"y":0, "x":14.25,"label":"9"}, + + {"y":0, "x":15.5, "label":"0"}, + {"y":0, "x":16.5, "label":"-"}, + {"y":0, "x":17.5, "label":"="}, + {"y":0, "x":18.5, "label":"Backspace"}, + {"y":0, "x":19.5, "label":"Bksp (Split)"}, + + + {"y":1, "x":0, "label":"End"}, + + {"y":1, "x":1.75, "label":"Tab", "w":1.5}, + {"y":1, "x":3.25, "label":"Q"}, + + {"y":1, "x":4.75, "label":"W"}, + {"y":1, "x":5.75, "label":"E"}, + {"y":1, "x":6.75, "label":"R"}, + {"y":1, "x":7.75, "label":"T"}, + + {"y":1, "x":11.25,"label":"Y"}, + {"y":1, "x":12.25,"label":"U"}, + {"y":1, "x":13.25,"label":"I"}, + {"y":1, "x":14.25,"label":"O"}, + + {"y":1, "x":15.75,"label":"P"}, + {"y":1, "x":16.75,"label":"["}, + {"y":1, "x":17.75,"label":"]"}, + {"y":1, "x":18.75,"label":"\\| (ANSI)", "w":1.5}, + + + {"y":2, "x":1.25, "label":"Caps Lock", "w":1.75}, + {"y":2, "x":3, "label":"A"}, + + {"y":2, "x":4.75, "label":"S"}, + {"y":2, "x":5.75, "label":"D"}, + {"y":2, "x":6.75, "label":"F"}, + {"y":2, "x":7.75, "label":"G"}, + + {"y":2, "x":11.25,"label":"H"}, + {"y":2, "x":12.25,"label":"J"}, + {"y":2, "x":13.25,"label":"K"}, + {"y":2, "x":14.25,"label":"L"}, + + {"y":2, "x":16, "label":";"}, + {"y":2, "x":17, "label":"'"}, + {"y":2, "x":18, "label":"#~ (ISO)"}, + {"y":2, "x":19, "label":"Enter (ANSI or ISO)", "w":1.25}, + + + {"y":3, "x":0.5, "label":"Shift", "w":1.25}, + {"y":3, "x":1.75, "label":"\\| (ISO)"}, + {"y":3, "x":2.75, "label":"Z"}, + + {"y":3, "x":4.75, "label":"X"}, + {"y":3, "x":5.75, "label":"C"}, + {"y":3, "x":6.75, "label":"V"}, + {"y":3, "x":7.75, "label":"B"}, + {"y":3, "x":8.75, "label":"Super"}, + + {"y":3, "x":10.25,"label":"Fn"}, + {"y":3, "x":11.25,"label":"N"}, + {"y":3, "x":12.25,"label":"M"}, + {"y":3, "x":13.25,"label":","}, + {"y":3, "x":14.25,"label":"."}, + + {"y":3, "x":16.25,"label":"/"}, + {"y":3, "x":17.25,"label":"Shift", "w":1.75}, + {"y":3, "x":19, "label":"Up"}, + + + {"y":4, "x":1.25, "label":"Control", "w":1.5}, + + {"y":4, "x":6.25, "label":"Alt", "w":1.5}, + {"y":4, "x":7.75, "label":"Space", "w":2}, + + {"y":4, "x":10.25,"label":"Space", "w":2.75}, + {"y":4, "x":16.5, "label":"Control", "w":1.5}, + {"y":4, "x":18, "label":"Left"}, + {"y":4, "x":19, "label":"Down"}, + {"y":4, "x":20, "label":"Right"} + ] + }, + "LAYOUT_ansi": { + "layout": [ + {"y":0, "x":0, "label":"Home"}, + + {"y":0, "x":1.5, "label":"Esc"}, + {"y":0, "x":2.5, "label":"`"}, + {"y":0, "x":3.5, "label":"1"}, + + {"y":0, "x":4.75, "label":"2"}, + {"y":0, "x":5.75, "label":"3"}, + {"y":0, "x":6.75, "label":"4"}, + {"y":0, "x":7.75, "label":"5"}, + + {"y":0, "x":11.25,"label":"6"}, + {"y":0, "x":12.25,"label":"7"}, + {"y":0, "x":13.25,"label":"8"}, + {"y":0, "x":14.25,"label":"9"}, + + {"y":0, "x":15.5, "label":"0"}, + {"y":0, "x":16.5, "label":"-"}, + {"y":0, "x":17.5, "label":"="}, + {"y":0, "x":18.5, "label":"Backspace", "w":2}, + + + {"y":1, "x":0, "label":"End"}, + + {"y":1, "x":1.75, "label":"Tab", "w":1.5}, + {"y":1, "x":3.25, "label":"Q"}, + + {"y":1, "x":4.75, "label":"W"}, + {"y":1, "x":5.75, "label":"E"}, + {"y":1, "x":6.75, "label":"R"}, + {"y":1, "x":7.75, "label":"T"}, + + {"y":1, "x":11.25,"label":"Y"}, + {"y":1, "x":12.25,"label":"U"}, + {"y":1, "x":13.25,"label":"I"}, + {"y":1, "x":14.25,"label":"O"}, + + {"y":1, "x":15.75,"label":"P"}, + {"y":1, "x":16.75,"label":"["}, + {"y":1, "x":17.75,"label":"]"}, + {"y":1, "x":18.75,"label":"\\", "w":1.5}, + + + {"y":2, "x":1.25, "label":"Caps Lock", "w":1.75}, + {"y":2, "x":3, "label":"A"}, + + {"y":2, "x":4.75, "label":"S"}, + {"y":2, "x":5.75, "label":"D"}, + {"y":2, "x":6.75, "label":"F"}, + {"y":2, "x":7.75, "label":"G"}, + + {"y":2, "x":11.25,"label":"H"}, + {"y":2, "x":12.25,"label":"J"}, + {"y":2, "x":13.25,"label":"K"}, + {"y":2, "x":14.25,"label":"L"}, + + {"y":2, "x":16, "label":";"}, + {"y":2, "x":17, "label":"'"}, + {"y":2, "x":18, "label":"Enter", "w":2.25}, + + + {"y":3, "x":0.5, "label":"Shift", "w":2.25}, + {"y":3, "x":2.75, "label":"Z"}, + + {"y":3, "x":4.75, "label":"X"}, + {"y":3, "x":5.75, "label":"C"}, + {"y":3, "x":6.75, "label":"V"}, + {"y":3, "x":7.75, "label":"B"}, + {"y":3, "x":8.75, "label":"Super"}, + + {"y":3, "x":10.25,"label":"Fn"}, + {"y":3, "x":11.25,"label":"N"}, + {"y":3, "x":12.25,"label":"M"}, + {"y":3, "x":13.25,"label":","}, + {"y":3, "x":14.25,"label":"."}, + + {"y":3, "x":16.25,"label":"/"}, + {"y":3, "x":17.25,"label":"Shift", "w":1.75}, + {"y":3, "x":19, "label":"Up"}, + + + {"y":4, "x":1.25, "label":"Control", "w":1.5}, + + {"y":4, "x":6.25, "label":"Alt", "w":1.5}, + {"y":4, "x":7.75, "label":"Space", "w":2}, + + {"y":4, "x":10.25,"label":"Space", "w":2.75}, + {"y":4, "x":16.5, "label":"Control", "w":1.5}, + {"y":4, "x":18, "label":"Left"}, + {"y":4, "x":19, "label":"Down"}, + {"y":4, "x":20, "label":"Right"} + ] + }, + "LAYOUT_split_bs": { + "layout": [ + {"y":0, "x":0, "label":"Home"}, + + {"y":0, "x":1.5, "label":"Esc"}, + {"y":0, "x":2.5, "label":"`"}, + {"y":0, "x":3.5, "label":"1"}, + + {"y":0, "x":4.75, "label":"2"}, + {"y":0, "x":5.75, "label":"3"}, + {"y":0, "x":6.75, "label":"4"}, + {"y":0, "x":7.75, "label":"5"}, + + {"y":0, "x":11.25,"label":"6"}, + {"y":0, "x":12.25,"label":"7"}, + {"y":0, "x":13.25,"label":"8"}, + {"y":0, "x":14.25,"label":"9"}, + + {"y":0, "x":15.5, "label":"0"}, + {"y":0, "x":16.5, "label":"-"}, + {"y":0, "x":17.5, "label":"="}, + {"y":0, "x":18.5, "label":"\\"}, + {"y":0, "x":19.5, "label":"Del"}, + + + {"y":1, "x":0, "label":"End"}, + + {"y":1, "x":1.75, "label":"Tab", "w":1.5}, + {"y":1, "x":3.25, "label":"Q"}, + + {"y":1, "x":4.75, "label":"W"}, + {"y":1, "x":5.75, "label":"E"}, + {"y":1, "x":6.75, "label":"R"}, + {"y":1, "x":7.75, "label":"T"}, + + {"y":1, "x":11.25,"label":"Y"}, + {"y":1, "x":12.25,"label":"U"}, + {"y":1, "x":13.25,"label":"I"}, + {"y":1, "x":14.25,"label":"O"}, + + {"y":1, "x":15.75,"label":"P"}, + {"y":1, "x":16.75,"label":"["}, + {"y":1, "x":17.75,"label":"]"}, + {"y":1, "x":18.75,"label":"Backspace", "w":1.5}, + + + {"y":2, "x":1.25, "label":"Control", "w":1.75}, + {"y":2, "x":3, "label":"A"}, + + {"y":2, "x":4.75, "label":"S"}, + {"y":2, "x":5.75, "label":"D"}, + {"y":2, "x":6.75, "label":"F"}, + {"y":2, "x":7.75, "label":"G"}, + + {"y":2, "x":11.25,"label":"H"}, + {"y":2, "x":12.25,"label":"J"}, + {"y":2, "x":13.25,"label":"K"}, + {"y":2, "x":14.25,"label":"L"}, + + {"y":2, "x":16, "label":";"}, + {"y":2, "x":17, "label":"'"}, + {"y":2, "x":18, "label":"Enter", "w":2.25}, + + + {"y":3, "x":0.5, "label":"Shift", "w":2.25}, + {"y":3, "x":2.75, "label":"Z"}, + + {"y":3, "x":4.75, "label":"X"}, + {"y":3, "x":5.75, "label":"C"}, + {"y":3, "x":6.75, "label":"V"}, + {"y":3, "x":7.75, "label":"B"}, + {"y":3, "x":8.75, "label":"Super"}, + + {"y":3, "x":10.25,"label":"Fn"}, + {"y":3, "x":11.25,"label":"N"}, + {"y":3, "x":12.25,"label":"M"}, + {"y":3, "x":13.25,"label":","}, + {"y":3, "x":14.25,"label":"."}, + + {"y":3, "x":16.25,"label":"/"}, + {"y":3, "x":17.25,"label":"Shift", "w":1.75}, + {"y":3, "x":19, "label":"Up"}, + + + {"y":4, "x":1.25, "label":"Control", "w":1.5}, + + {"y":4, "x":6.25, "label":"Alt", "w":1.5}, + {"y":4, "x":7.75, "label":"Space", "w":2}, + + {"y":4, "x":10.25,"label":"Space", "w":2.75}, + {"y":4, "x":16.5, "label":"Control", "w":1.5}, + {"y":4, "x":18, "label":"Left"}, + {"y":4, "x":19, "label":"Down"}, + {"y":4, "x":20, "label":"Right"} + ] + }, + "LAYOUT_iso": { + "layout": [ + {"y":0, "x":0, "label":"Home"}, + + {"y":0, "x":1.5, "label":"Esc"}, + {"y":0, "x":2.5, "label":"`"}, + {"y":0, "x":3.5, "label":"1"}, + + {"y":0, "x":4.75, "label":"2"}, + {"y":0, "x":5.75, "label":"3"}, + {"y":0, "x":6.75, "label":"4"}, + {"y":0, "x":7.75, "label":"5"}, + + {"y":0, "x":11.25,"label":"6"}, + {"y":0, "x":12.25,"label":"7"}, + {"y":0, "x":13.25,"label":"8"}, + {"y":0, "x":14.25,"label":"9"}, + + {"y":0, "x":15.5, "label":"0"}, + {"y":0, "x":16.5, "label":"-"}, + {"y":0, "x":17.5, "label":"="}, + {"y":0, "x":18.5, "label":"Backspace", "w":2}, + + + {"y":1, "x":0, "label":"End"}, + + {"y":1, "x":1.75, "label":"Tab", "w":1.5}, + {"y":1, "x":3.25, "label":"Q"}, + + {"y":1, "x":4.75, "label":"W"}, + {"y":1, "x":5.75, "label":"E"}, + {"y":1, "x":6.75, "label":"R"}, + {"y":1, "x":7.75, "label":"T"}, + + {"y":1, "x":11.25,"label":"Y"}, + {"y":1, "x":12.25,"label":"U"}, + {"y":1, "x":13.25,"label":"I"}, + {"y":1, "x":14.25,"label":"O"}, + + {"y":1, "x":15.75,"label":"P"}, + {"y":1, "x":16.75,"label":"["}, + {"y":1, "x":17.75,"label":"]"}, + + + {"y":2, "x":1.25, "label":"Caps Lock", "w":1.75}, + {"y":2, "x":3, "label":"A"}, + + {"y":2, "x":4.75, "label":"S"}, + {"y":2, "x":5.75, "label":"D"}, + {"y":2, "x":6.75, "label":"F"}, + {"y":2, "x":7.75, "label":"G"}, + + {"y":2, "x":11.25,"label":"H"}, + {"y":2, "x":12.25,"label":"J"}, + {"y":2, "x":13.25,"label":"K"}, + {"y":2, "x":14.25,"label":"L"}, + + {"y":2, "x":16, "label":";"}, + {"y":2, "x":17, "label":"'"}, + {"y":2, "x":18, "label":"#"}, + {"y":1, "x":19, "label":"Enter", "w":1.25, "h":2}, + + + {"y":3, "x":0.5, "label":"Shift", "w":1.25}, + {"y":3, "x":1.75, "label":"\\"}, + {"y":3, "x":2.75, "label":"Z"}, + + {"y":3, "x":4.75, "label":"X"}, + {"y":3, "x":5.75, "label":"C"}, + {"y":3, "x":6.75, "label":"V"}, + {"y":3, "x":7.75, "label":"B"}, + {"y":3, "x":8.75, "label":"Super"}, + + {"y":3, "x":10.25,"label":"Fn"}, + {"y":3, "x":11.25,"label":"N"}, + {"y":3, "x":12.25,"label":"M"}, + {"y":3, "x":13.25,"label":","}, + {"y":3, "x":14.25,"label":"."}, + + {"y":3, "x":16.25,"label":"/"}, + {"y":3, "x":17.25,"label":"Shift", "w":1.75}, + {"y":3, "x":19, "label":"Up"}, + + + {"y":4, "x":1.25, "label":"Control", "w":1.5}, + + {"y":4, "x":6.25, "label":"Alt", "w":1.5}, + {"y":4, "x":7.75, "label":"Space", "w":2}, + + {"y":4, "x":10.25,"label":"Space", "w":2.75}, + {"y":4, "x":16.5, "label":"Control", "w":1.5}, + {"y":4, "x":18, "label":"Left"}, + {"y":4, "x":19, "label":"Down"}, + {"y":4, "x":20, "label":"Right"} + ] + } + + } + +} diff --git a/qmk/keyboards/boardrun/bizarre/keymaps/default/keymap.c b/qmk/keyboards/boardrun/bizarre/keymaps/default/keymap.c new file mode 100644 index 00000000..49c2f1a7 --- /dev/null +++ b/qmk/keyboards/boardrun/bizarre/keymaps/default/keymap.c @@ -0,0 +1,71 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 _FUNC MO(_FNBIZARRE) + +// Layer shorthand +enum layer_names { + _BIZARRE, + _FNBIZARRE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /*Bizarre Base Layer (defaults for "any" layout) + * +-------+ +-----------------------+ +-------------------------------+ +-------------------------------+ +---------------------------------------+ + * HOME ESC `~ 1 2 3 4 5 6 7 8 9 0 - = BKSP DEL + * +------- +-----------------------+ +-------+-------+-------+------- +-------+-------+-------+------- +---------------------------------------+ + * END TAB Q W E R T Y U I O P [ ] \ ANSI + * +-------+ +-----------------------+ +-------+-------+-------+------- +-------+-------+-------+------- +----------------------------------- + * CAPS A S D F G H J K L ; ' # ISO ENTER + * +---------------------------+ +-------+-------+-------+-------+-------+ +-------+-------+-------+-------+------- +-----------------------+---------+ + * LSHIFT \ ISO Z X C V B LGUI FN N M , . / RSHIFT UP + * +-----------------+-------+ +-----------------------+--------------- +---------------------------------------+ +---------------------+-------+-------+ + * LCTRL LALT SPACE SPACE RCTRL LEFT DOWN RIGHT + * +-----------+ +---------------------------+ +---------------------+ +-----------------------------------+ + */ + + [_BIZARRE] = LAYOUT_all( + KC_HOME, 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_DEL, + 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_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_LGUI, _FUNC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ), + + /*Bizarre Function Layer + * +-------+ +-----------------------+ +-------------------------------+ +-------------------------------+ +---------------------------------------+ + * RESET F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 DEL + * +------- +-----------------------+ +-------+-------+-------+------- +-------+-------+-------+------- +---------------------------------------+ + * INS PRINT + * +-------+ +-----------------------+ +-------+-------+-------+------- +-------+-------+-------+------- +----------------------------------- + * SCRLL + * +---------------------------+ +-------+-------+-------+-------+-------+ +-------+-------+-------+-------+------- +-----------------------+---------+ + * PAUSE RGUI MENU PGUP + * +-----------------+-------+ +-----------------------+--------------- +---------------------------------------+ +---------------------+-------+-------+ + * RALT HOME PGDN END + * +-----------+ +---------------------------+ +---------------------+ +-----------------------------------+ + */ + + [_FNBIZARRE] = 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, _______, + _______, _______, _______, _______,_______,RESET, _______, _______,_______,KC_INS ,_______, KC_PSCR,_______,_______,_______, + _______, _______, KC_SLCK,_______,_______,_______, _______,_______,_______,_______, _______,_______,_______,_______, + _______, _______,_______, _______,_______,_______,KC_PAUS,KC_RGUI, _______,_______,KC_MENU,_______,_______, _______,_______, KC_PGUP, + _______, _______, _______, KC_RALT, _______, KC_HOME,KC_PGDN,KC_END + ) +}; \ No newline at end of file diff --git a/qmk/keyboards/boardrun/bizarre/keymaps/nopunin10did/keymap.c b/qmk/keyboards/boardrun/bizarre/keymaps/nopunin10did/keymap.c new file mode 100644 index 00000000..c0653be0 --- /dev/null +++ b/qmk/keyboards/boardrun/bizarre/keymaps/nopunin10did/keymap.c @@ -0,0 +1,50 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 _FUNC MO(_FN) +#define _LSADEL LSA_T(KC_DEL) +#define _AGRHOM RALT_T(KC_HOME) +#define _CTLEND RCTL_T(KC_END) +#define _CTLALT LCTL(KC_LALT) +#define _LSNUBS LSFT_T(KC_NUBS) +#define _MINMIZ LGUI(KC_D) + +// Layer shorthand +enum layer_names { + _ZERO, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_ZERO] = LAYOUT_ansi( + KC_ESC, KC_BSLS,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_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, _LSADEL, KC_LGUI,KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, + _FUNC, KC_LALT, KC_SPC, _AGRHOM, _CTLEND, KC_LEFT,KC_DOWN,KC_RGHT + ), + + + [_FN] = LAYOUT_ansi( + _MINMIZ, _______,_______, 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_CALC, _______, _______, _______,_______,RESET, _______, _______,_______,KC_INS ,_______, KC_PSCR,_______,_______,_______, + KC_CAPS, _______, KC_SLCK,_______,_______,_______, _______,_______,_______,_______, _______,_______,_______, + _LSNUBS, _______, _______,_______,_______,KC_PAUS,_______, KC_RGUI,_______,KC_MENU,_______,_______, _______,_______, KC_PGUP, + _______, _CTLALT, KC_DEL, _______, _______, _______,KC_PGDN,_______ + ) +}; diff --git a/qmk/keyboards/boardrun/bizarre/keymaps/via/keymap.c b/qmk/keyboards/boardrun/bizarre/keymaps/via/keymap.c new file mode 100644 index 00000000..d4d2fee9 --- /dev/null +++ b/qmk/keyboards/boardrun/bizarre/keymaps/via/keymap.c @@ -0,0 +1,81 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + + /*Bizarre Base Layer (defaults for "any" layout) + * +-------+ +-----------------------+ +-------------------------------+ +-------------------------------+ +---------------------------------------+ + * ¦ HOME ¦ ¦ ESC ¦ `~ ¦ 1 ¦ ¦ 2 ¦ 3 ¦ 4 ¦ 5 ¦ ¦ 6 ¦ 7 ¦ 8 ¦ 9 ¦ ¦ 0 ¦ - ¦ = ¦ BKSP ¦ DEL ¦ + * +-------¦ +-----------------------+ +-------+-------+-------+-------¦ +-------+-------+-------+-------¦ +---------------------------------------+ + * ¦ END ¦ ¦ TAB ¦ Q ¦ ¦ W ¦ E ¦ R ¦ T ¦ ¦ Y ¦ U ¦ I ¦ O ¦ ¦ P ¦ [ ¦ ] ¦ \ ANSI ¦ + * +-------+ +-----------------------+ +-------+-------+-------+-------¦ +-------+-------+-------+-------¦ +-----------------------------------¦ + * ¦ CAPS ¦ A ¦ ¦ S ¦ D ¦ F ¦ G ¦ ¦ H ¦ J ¦ K ¦ L ¦ ¦ ; ¦ ' ¦ # ISO ¦ ENTER ¦ + * +---------------------------+ +-------+-------+-------+-------+-------+ +-------+-------+-------+-------+-------¦ +-----------------------+---------+ + * ¦ LSHIFT ¦ \ ISO ¦ Z ¦ ¦ X ¦ C ¦ V ¦ B ¦ LGUI ¦ ¦ MO ¦ N ¦ M ¦ , ¦ . ¦ ¦ / ¦ RSHIFT ¦ UP ¦ + * +-----------------+-------+ +-----------------------+---------------¦ +---------------------------------------+ +---------------------+-------+-------+ + * ¦ LCTRL ¦ ¦ LALT ¦ SPACE ¦ ¦ SPACE ¦ ¦ RCTRL ¦ LEFT ¦ DOWN ¦ RIGHT ¦ + * +-----------+ +---------------------------+ +---------------------+ +-----------------------------------+ + */ + + [0] = LAYOUT_all( + KC_HOME, 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_DEL, + 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_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_LGUI, MO(1), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT + ), + + /*Bizarre Function Layer + * +-------+ +-----------------------+ +-------------------------------+ +-------------------------------+ +---------------------------------------+ + * ¦ RESET ¦ ¦ ¦ ¦ F1 ¦ ¦ F2 ¦ F3 ¦ F4 ¦ F5 ¦ ¦ F6 ¦ F7 ¦ F8 ¦ F9 ¦ ¦ F10 ¦ F11 ¦ F12 ¦ DEL ¦ ¦ + * +-------¦ +-----------------------+ +-------+-------+-------+-------¦ +-------+-------+-------+-------¦ +---------------------------------------+ + * ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ INS ¦ ¦ ¦ PRINT ¦ ¦ ¦ ¦ + * +-------+ +-----------------------+ +-------+-------+-------+-------¦ +-------+-------+-------+-------¦ +-----------------------------------¦ + * ¦ ¦ ¦ ¦ SCRLL ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ + * +---------------------------+ +-------+-------+-------+-------+-------+ +-------+-------+-------+-------+-------¦ +-----------------------+---------+ + * ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ PAUSE ¦ RGUI ¦ ¦ ¦ ¦ MENU ¦ ¦ ¦ ¦ ¦ ¦ PGUP ¦ + * +-----------------+-------+ +-----------------------+---------------¦ +---------------------------------------+ +---------------------+-------+-------+ + * ¦ ¦ ¦ ¦ ¦ ¦ RALT ¦ ¦ ¦ HOME ¦ PGDN ¦ END ¦ + * +-----------+ +---------------------------+ +---------------------+ +-----------------------------------+ + */ + + [1] = 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, _______, + _______, _______, _______, _______,_______,RESET, _______, _______,_______,KC_INS ,_______, KC_PSCR,_______,_______,_______, + _______, _______, KC_SLCK,_______,_______,_______, _______,_______,_______,_______, _______,_______,_______,_______, + _______, _______,_______, _______,_______,_______,KC_PAUS,KC_RGUI, _______,_______,KC_MENU,_______,_______, _______,_______, KC_PGUP, + _______, _______, _______, KC_RALT, _______, KC_HOME,KC_PGDN,KC_END + ), + + [2] = LAYOUT_all( + _______, _______,_______,_______, _______,_______,_______,_______, _______,_______,_______,_______, _______,_______,_______,_______,_______, + _______, _______, _______, _______,_______,_______,_______, _______,_______,_______,_______, _______,_______,_______,_______, + _______, _______, _______,_______,_______,_______, _______,_______,_______,_______, _______,_______,_______,_______, + _______, _______,_______, _______,_______,_______,_______,_______, _______,_______,_______,_______,_______, _______,_______, _______, + _______, _______, _______, _______, _______, _______,_______,_______ + ), + + [3] = LAYOUT_all( + _______, _______,_______,_______, _______,_______,_______,_______, _______,_______,_______,_______, _______,_______,_______,_______,_______, + _______, _______, _______, _______,_______,_______,_______, _______,_______,_______,_______, _______,_______,_______,_______, + _______, _______, _______,_______,_______,_______, _______,_______,_______,_______, _______,_______,_______,_______, + _______, _______,_______, _______,_______,_______,_______,_______, _______,_______,_______,_______,_______, _______,_______, _______, + _______, _______, _______, _______, _______, _______,_______,_______ + ) + + +}; diff --git a/qmk/keyboards/boardrun/bizarre/keymaps/via/rules.mk b/qmk/keyboards/boardrun/bizarre/keymaps/via/rules.mk new file mode 100644 index 00000000..36b7ba9c --- /dev/null +++ b/qmk/keyboards/boardrun/bizarre/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/qmk/keyboards/boardrun/bizarre/readme.md b/qmk/keyboards/boardrun/bizarre/readme.md new file mode 100644 index 00000000..5c73313d --- /dev/null +++ b/qmk/keyboards/boardrun/bizarre/readme.md @@ -0,0 +1,23 @@ +# Boardrun Bizarre + +![Boardrun Bizarre](https://i.imgur.com/usKQUWI.jpg) + +The Boardrun is a family of ortholinear keyboards with columnar stagger, inspired by the Alice layout. The Classic is a 60% layout that uses Ergodox keycap sets for compatibility, whereas the Bizarre is a 65% layout that uses standard (staggered) keycap sets in an ortholinear arrangement. + +The Boardrun is an evolution of the Boardwalk layout. The Boardwalk proved that the Ergodox keycap set could be adapted to more keyboards that provided a more compact design and layout flexibility. While adaptation was a design goal of the Boardwalk layout, the Boardrun was designed to distill and refine the best aspects of the current state of keyboard layouts, taking into account current trends in staggered design, the Ergodox keycap layout, and the Boardwalk's most popular layouts. To that end, a columnar staggered, ortholinear layout with alpha rotation was settled on, using the "HHKB" layout from the Boardwalk. The result is two layouts that are comfortable, familiar, and have great compatibility with keysets. + +- Keyboard Maintainer: QMK Community +- Hardware Supported: Boardrun Bizarre Ortholinear PCB +- Hardware Availability: mkultra.click + +Make example for this keyboard (after setting up your build environment): + + make boardrun/bizarre:default + +Flashing example for this keyboard: + + make boardrun/bizarre:default:flash + +The board may be reset into bootloader mode via either the reset button (on the bottom of the PCB) or a configured RESET shortcut (which may vary depending on when the PCB was flashed). + +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/qmk/keyboards/boardrun/bizarre/rules.mk b/qmk/keyboards/boardrun/bizarre/rules.mk new file mode 100644 index 00000000..f841c16c --- /dev/null +++ b/qmk/keyboards/boardrun/bizarre/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = 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 = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = no # Unicode diff --git a/qmk/keyboards/boardrun/classic/classic.c b/qmk/keyboards/boardrun/classic/classic.c new file mode 100644 index 00000000..49eea393 --- /dev/null +++ b/qmk/keyboards/boardrun/classic/classic.c @@ -0,0 +1,16 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "classic.h" diff --git a/qmk/keyboards/boardrun/classic/classic.h b/qmk/keyboards/boardrun/classic/classic.h new file mode 100644 index 00000000..173c686c --- /dev/null +++ b/qmk/keyboards/boardrun/classic/classic.h @@ -0,0 +1,33 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_classic( \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413, k414, \ + k52, k53, k54, k55, k56, k57, k51, k58, k59, k510, k511, k512, k513 \ +) \ +{ \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 , KC_NO, KC_NO, KC_NO,}, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 , KC_NO, KC_NO, KC_NO,}, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 , KC_NO, KC_NO, KC_NO,}, \ + { k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413, k414 , KC_NO, KC_NO, KC_NO,}, \ + { k51, k52, k53, k54, k55, k56, k57, k58, k59, k510, k511, k512, k513, KC_NO, KC_NO, KC_NO, KC_NO} \ +} diff --git a/qmk/keyboards/boardrun/classic/config.h b/qmk/keyboards/boardrun/classic/config.h new file mode 100644 index 00000000..6c814eb3 --- /dev/null +++ b/qmk/keyboards/boardrun/classic/config.h @@ -0,0 +1,83 @@ +/* +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0xCDCD +#define PRODUCT_ID 0x5338 +#define DEVICE_VER 0x0001 +#define MANUFACTURER shensmobile +#define PRODUCT Boardrun Classic + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { F0, F1, F4, F5, F6 } +#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0, B3, B2, B1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN F5 +// #define BACKLIGHT_LEVELS 6 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 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 + +/* + * 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 + +// ws2812 options +#define RGB_DI_PIN B7 // pin the DI on the ws2812 is hooked-up to +#define RGBLIGHT_ANIMATIONS // run RGB animations +#define RGBLED_NUM 14 // number of LEDs +#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue +#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation +#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) diff --git a/qmk/keyboards/boardrun/classic/info.json b/qmk/keyboards/boardrun/classic/info.json new file mode 100644 index 00000000..a37e6ece --- /dev/null +++ b/qmk/keyboards/boardrun/classic/info.json @@ -0,0 +1,89 @@ +{ + "keyboard_name": "Boardrun Classic", + "url": "https://github.com/qmk/qmk_firmware/tree/master/keyboards/boardrun/classic", + "maintainer": "QMK Community", + "manufacturer": "shensmobile", + "width": 16.5, + "height": 5, + "layouts": { + "LAYOUT_classic": { + "layout": [ + {"y":0, "x":0, "label":"Esc", "w":1.5}, + {"y":0, "x":1.5, "label":"1"}, + {"y":0, "x":2.5, "label":"2"}, + {"y":0, "x":3.5, "label":"3"}, + {"y":0, "x":4.5, "label":"4"}, + {"y":0, "x":5.5, "label":"5"}, + {"y":0, "x":6.5, "label":"-"}, + {"y":0, "x":9, "label":"="}, + {"y":0, "x":10, "label":"6"}, + {"y":0, "x":11, "label":"7"}, + {"y":0, "x":12, "label":"8"}, + {"y":0, "x":13, "label":"9"}, + {"y":0, "x":14, "label":"0"}, + {"y":0, "x":15, "label":"Backspace", "w":1.5}, + + {"y":1, "x":0, "label":"Tab", "w":1.5}, + {"y":1, "x":1.5, "label":"Q"}, + {"y":1, "x":2.5, "label":"W"}, + {"y":1, "x":3.5, "label":"E"}, + {"y":1, "x":4.5, "label":"R"}, + {"y":1, "x":5.5, "label":"T"}, + {"y":1, "x":6.5, "label":"["}, + {"y":1, "x":9, "label":"]"}, + {"y":1, "x":10, "label":"Y"}, + {"y":1, "x":11, "label":"U"}, + {"y":1, "x":12, "label":"I"}, + {"y":1, "x":13, "label":"O"}, + {"y":1, "x":14, "label":"P"}, + {"y":1, "x":15, "label":"\\", "w":1.5}, + + {"y":2, "x":0, "label":"LCtrl", "w":1.5}, + {"y":2, "x":1.5, "label":"A"}, + {"y":2, "x":2.5, "label":"S"}, + {"y":2, "x":3.5, "label":"D"}, + {"y":2, "x":4.5, "label":"F"}, + {"y":2, "x":5.5, "label":"G"}, + {"y":2, "x":6.5, "label":"Home"}, + {"y":2, "x":9, "label":"PgUp"}, + {"y":2, "x":10, "label":"H"}, + {"y":2, "x":11, "label":"J"}, + {"y":2, "x":12, "label":"K"}, + {"y":2, "x":13, "label":"L"}, + {"y":2, "x":14, "label":";"}, + {"y":2, "x":15, "label":"'", "w":1.5}, + + {"y":3, "x":0, "label":"LShift", "w":1.5}, + {"y":3, "x":1.5, "label":"Z"}, + {"y":3, "x":2.5, "label":"X"}, + {"y":3, "x":3.5, "label":"C"}, + {"y":3, "x":4.5, "label":"V"}, + {"y":3, "x":5.5, "label":"B"}, + {"y":3, "x":6.5, "label":"End"}, + {"y":3, "x":9, "label":"PgDn"}, + {"y":3, "x":10, "label":"N"}, + {"y":3, "x":11, "label":"M"}, + {"y":3, "x":12, "label":","}, + {"y":3, "x":13, "label":"."}, + {"y":3, "x":14, "label":"/"}, + {"y":3, "x":15, "label":"RShift / Enter", "w":1.5}, + + {"y":4, "x":1.5, "label":"LGui"}, + {"y":4, "x":2.5, "label":"Del"}, + {"y":4, "x":3.5, "label":"`"}, + {"y":4, "x":4.5, "label":"LAlt"}, + {"y":4, "x":5.5, "label":"Space"}, + {"y":4, "x":6.5, "label":"Space"}, + {"y":4, "x":7.75,"label":"Fn"}, + {"y":4, "x":9, "label":"Space / AltGr"}, + {"y":4, "x":10, "label":"Space / AltGr"}, + {"y":4, "x":11, "label":"Left"}, + {"y":4, "x":12, "label":"Down"}, + {"y":4, "x":13, "label":"Up"}, + {"y":4, "x":14, "label":"Right"} + + ] + } + } + +} diff --git a/qmk/keyboards/boardrun/classic/keymaps/default/keymap.c b/qmk/keyboards/boardrun/classic/keymaps/default/keymap.c new file mode 100644 index 00000000..60769992 --- /dev/null +++ b/qmk/keyboards/boardrun/classic/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 _FUNC MO(_FNCLASSIC) +#define _SHENT RSFT_T(KC_ENT) +#define _LSNUBS LSFT_T(KC_NUBS) +#define _AGRSPC RALT_T(KC_SPC) + + +// Layer shorthand +enum layer_names { + _CLASSIC, + _FNCLASSIC, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base Layer + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | TAB | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | |\ | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | LCTRL | A | S | D | F | G | HOME | | PG UP | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | LSHIFT | Z | X | C | V | B | END | | PG DN | N | M | , | . | / | SH/ENT | + * '--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' + * | LGUI | DEL | ~` | LALT | SPACE | | FN | SPACE | | LEFT | DOWN | UP | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------' + */ + [_CLASSIC] = LAYOUT_classic( + KC_ESC, 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_BSLS, + KC_LCTL, 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_QUOT, + 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, _SHENT, + KC_LGUI, KC_DEL, KC_GRV, KC_LALT, KC_SPC, KC_SPC, _FUNC, _AGRSPC, _AGRSPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Function Layer + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | RESET | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | DEL | + * |--------+--------+--------+--------+--------+--------+--------+ +--------+--------+--------+--------+--------+--------+--------| + * | | | MENU | | RESET | | | | | | | INS | | PRT SC | | + * |--------+--------+--------+--------+--------+--------+--------+ +--------+--------+--------+--------+--------+--------+--------| + * | CAPSLK | | SCROLL | | | | | | | | | | | | RCTL | + * |--------+--------+--------+--------+--------+--------+--------+ +--------+--------+--------+--------+--------+--------+--------| + * | UK \| | | | | | PAUSE | | | | | MUTE | VOL DN | VOL UP | | | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------+--------+--------+--------' + * | RGUI | | | RALT | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------' + */ + [_FNCLASSIC] = LAYOUT_classic( + RESET, 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_APP, _______, RESET, _______, _______, _______, _______, _______, KC_INS, _______, KC_PSCR, _______, + KC_CAPS, _______, KC_SLCK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RCTL, + _LSNUBS, _______, _______, _______, _______, KC_PAUS, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + KC_RGUI, _______, _______, KC_RALT, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/boardrun/classic/keymaps/via/keymap.c b/qmk/keyboards/boardrun/classic/keymaps/via/keymap.c new file mode 100644 index 00000000..0b0d9538 --- /dev/null +++ b/qmk/keyboards/boardrun/classic/keymaps/via/keymap.c @@ -0,0 +1,77 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + + /* Base Layer + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | TAB | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | |\ | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | LCTRL | A | S | D | F | G | HOME | | PG UP | H | J | K | L | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | LSHIFT | Z | X | C | V | B | END | | PG DN | N | M | , | . | / | ENTER | + * '--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-------' + * | LGUI | DEL | ~` | LALT | SPACE | | MO | SPACE | | LEFT | DOWN | UP | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_classic( + KC_ESC, 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_BSLS, + KC_LCTL, 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_QUOT, + 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_ENT, + KC_LGUI, KC_DEL, KC_GRV, KC_LALT, KC_SPC, KC_SPC, MO(1), KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Function Layer + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+--------+--------+--------+--------+--------+--------+ +--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | PRT SC | F12 | + * |--------+--------+--------+--------+--------+--------+--------+ +--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | RESET | + * |--------+--------+--------+--------+--------+--------+--------+ +--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | MUTE | VOL DN | VOL UP | | | + * '--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+--------+--------+--------+-------' + * | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------' + */ + [1] = LAYOUT_classic( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [2] = LAYOUT_classic( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT_classic( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/boardrun/classic/keymaps/via/rules.mk b/qmk/keyboards/boardrun/classic/keymaps/via/rules.mk new file mode 100644 index 00000000..43061db1 --- /dev/null +++ b/qmk/keyboards/boardrun/classic/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/boardrun/classic/readme.md b/qmk/keyboards/boardrun/classic/readme.md new file mode 100644 index 00000000..2ed4ff1b --- /dev/null +++ b/qmk/keyboards/boardrun/classic/readme.md @@ -0,0 +1,23 @@ +# Boardrun Classic + +![Boardrun Classic](https://i.imgur.com/Efo0ItKl.jpg) + +The Boardrun is a family of ortholinear keyboards with columnar stagger, inspired by the Alice layout. The Classic is a 60% layout that uses Ergodox keycap sets for compatibility, whereas the Bizarre is a 65% layout that uses standard (staggered) keycap sets in an ortholinear arrangement. + +The Boardrun is an evolution of the Boardwalk layout. The Boardwalk proved that the Ergodox keycap set could be adapted to more keyboards that provided a more compact design and layout flexibility. While adaptation was a design goal of the Boardwalk layout, the Boardrun was designed to distill and refine the best aspects of the current state of keyboard layouts, taking into account current trends in staggered design, the Ergodox keycap layout, and the Boardwalk's most popular layouts. To that end, a columnar staggered, ortholinear layout with alpha rotation was settled on, using the "HHKB" layout from the Boardwalk. The result is two layouts that are comfortable, familiar, and have great compatibility with keysets. + +- Keyboard Maintainer: QMK Community +- Hardware Supported: Boardrun Classic Ortholinear PCB +- Hardware Availability: mkultra.click + +Make example for this keyboard (after setting up your build environment): + + make boardrun/classic:default + +Flashing example for this keyboard: + + make boardrun/classic:default:flash + +The board may be reset into bootloader mode via either the reset button (on the bottom of the PCB) or a configured RESET shortcut (which may vary depending on when the PCB was flashed). + +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/qmk/keyboards/boardrun/classic/rules.mk b/qmk/keyboards/boardrun/classic/rules.mk new file mode 100644 index 00000000..065bd540 --- /dev/null +++ b/qmk/keyboards/boardrun/classic/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = no # Unicode diff --git a/qmk/keyboards/boardsource/microdox/keymaps/via/keymap.c b/qmk/keyboards/boardsource/microdox/keymaps/via/keymap.c new file mode 100644 index 00000000..2f4785ad --- /dev/null +++ b/qmk/keyboards/boardsource/microdox/keymaps/via/keymap.c @@ -0,0 +1,104 @@ +/* +Copyright 2020 Jack Sangdahl <@toastedmangoes> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + SFT_T(KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SCLN), + CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), + LT(3, KC_LGUI), MO(1), KC_SPC, KC_BSPC, MO(2), KC_ENT +), + +[1] = LAYOUT_split_3x5_3( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_ESC, KC_TAB, KC_CAPS, KC_TILD, KC_GRV, KC_QUOT, KC_DQUO, KC_MPRV, KC_MPLY, KC_MNXT, + KC_LGUI, KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, KC_RALT +), + +[2] = LAYOUT_split_3x5_3( + KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_PSCR, KC_DEL, KC_INS, KC_HOME, KC_END, + KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_RIGHT, KC_UP, KC_VOLU, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_VOLD, + KC_PGDN, KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, KC_PGUP +), +[3] = LAYOUT_split_3x5_3( + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUD, RGB_HUI, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD, RGB_VAD, RGB_VAI, XXXXXXX, XXXXXXX, + KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX +) +}; + +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) + return OLED_ROTATION_180; + return rotation; +} + +static 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); +} + +static void render_status(void) { + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR("^\n"), false); + oled_write_P(PSTR("Layer: Base\n"), false); + break; + case 1: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Raise\n"), false); + break; + case 2: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Lower\n"), false); + break; + case 3: + oled_write_P(PSTR("B R L A O\n"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Adjust\n"), false); + break; + default: + oled_write_P(PSTR("B R L A O"), false); + oled_write_P(PSTR(" ^\n"), false); + oled_write_P(PSTR("Layer: Other\n"), false); + } +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + oled_scroll_left(); + } +} + +#endif diff --git a/qmk/keyboards/boardsource/microdox/keymaps/via/rules.mk b/qmk/keyboards/boardsource/microdox/keymaps/via/rules.mk new file mode 100644 index 00000000..667a6b25 --- /dev/null +++ b/qmk/keyboards/boardsource/microdox/keymaps/via/rules.mk @@ -0,0 +1,4 @@ +OLED_DRIVER_ENABLE = yes +VIA_ENABLE = yes +EXTRAKEY_ENABLE = yes +RGBLIGHT_ENABLE = yes diff --git a/qmk/keyboards/boston_meetup/2019/rules.mk b/qmk/keyboards/boston_meetup/2019/rules.mk index 73f9008f..aa35ba75 100644 --- a/qmk/keyboards/boston_meetup/2019/rules.mk +++ b/qmk/keyboards/boston_meetup/2019/rules.mk @@ -16,7 +16,8 @@ NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = no # Custom matrix file AUDIO_ENABLE = yes RGBLIGHT_ENABLE = no -RGB_MATRIX_ENABLE = no #WS2812 +RGB_MATRIX_ENABLE = no +RGB_MATRIX_DRIVER = WS2812 HAPTIC_ENABLE += DRV2605L QWIIC_ENABLE += MICRO_OLED # SERIAL_LINK_ENABLE = yes diff --git a/qmk/keyboards/botanicalkeyboards/fm2u/keymaps/via/rules.mk b/qmk/keyboards/botanicalkeyboards/fm2u/keymaps/via/rules.mk index 7d47e6b7..44a2bc49 100644 --- a/qmk/keyboards/botanicalkeyboards/fm2u/keymaps/via/rules.mk +++ b/qmk/keyboards/botanicalkeyboards/fm2u/keymaps/via/rules.mk @@ -1,4 +1,4 @@ VIA_ENABLE = yes LTO_ENABLE = yes -EXTRAKEY_ENABLE = no +CONSOLE_ENABLE = no diff --git a/qmk/keyboards/box75/box75.c b/qmk/keyboards/box75/box75.c new file mode 100644 index 00000000..43d30309 --- /dev/null +++ b/qmk/keyboards/box75/box75.c @@ -0,0 +1,18 @@ +/* +Copyright 2020 Á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 "box75.h" diff --git a/qmk/keyboards/box75/box75.h b/qmk/keyboards/box75/box75.h new file mode 100644 index 00000000..16ac3b22 --- /dev/null +++ b/qmk/keyboards/box75/box75.h @@ -0,0 +1,38 @@ +/* +Copyright 2015 Á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 + +#define ___ 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, K3D, \ + 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, K3E, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, \ + K50, K51, K52, K56, K59, K5A, K5C, K5D, K5E \ +) { \ + { 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, ___, ___, ___, K56, ___, ___, K59, K5A, ___, K5C, K5D, K5E} \ +} diff --git a/qmk/keyboards/box75/chconf.h b/qmk/keyboards/box75/chconf.h new file mode 100644 index 00000000..4640ff53 --- /dev/null +++ b/qmk/keyboards/box75/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 rt/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_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 2 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @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 _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/qmk/keyboards/box75/config.h b/qmk/keyboards/box75/config.h new file mode 100644 index 00000000..b3b52c87 --- /dev/null +++ b/qmk/keyboards/box75/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2015 Á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 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7668 // LD for LinDesign +#define PRODUCT_ID 0xB075 // For BOX75 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Lin Design +#define PRODUCT BOX75 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +#define MATRIX_COL_PINS { B11, B10, B2 , B1, B0, A7 , A6, A5, A4, A3, A8, B15, B14, B13, A15 } +#define MATRIX_ROW_PINS { A10, A9 , B12, A2, A1, A0 } +#define DIODE_DIRECTION COL2ROW + +//#define BACKLIGHT_PIN A6 +//#define BACKLIGHT_PWM_DRIVER PWMD3 +//#define BACKLIGHT_PWM_CHANNEL 1 +//#define BACKLIGHT_PAL_MODE 1 +//#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 + +/* + * 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/qmk/keyboards/box75/halconf.h b/qmk/keyboards/box75/halconf.h new file mode 100644 index 00000000..16f32117 --- /dev/null +++ b/qmk/keyboards/box75/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC 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 SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG 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 + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT 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 + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION 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 the zero-copy API. + */ +#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 + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#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 circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#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 + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/box75/keymaps/default/keymap.c b/qmk/keyboards/box75/keymaps/default/keymap.c new file mode 100644 index 00000000..741839e1 --- /dev/null +++ b/qmk/keyboards/box75/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* +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 . +*/ +#define ____ KC_NO + +#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_Q , 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_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_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_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT) +}; diff --git a/qmk/keyboards/box75/keymaps/via/keymap.c b/qmk/keyboards/box75/keymaps/via/keymap.c new file mode 100644 index 00000000..0c8a67b0 --- /dev/null +++ b/qmk/keyboards/box75/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +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 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_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_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_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_HOME, KC_PGDN, + 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_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ) +}; diff --git a/qmk/keyboards/box75/keymaps/via/rules.mk b/qmk/keyboards/box75/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/box75/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/box75/mcuconf.h b/qmk/keyboards/box75/mcuconf.h new file mode 100644 index 00000000..6289be66 --- /dev/null +++ b/qmk/keyboards/box75/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 FALSE +#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 FALSE +#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/qmk/keyboards/box75/readme.md b/qmk/keyboards/box75/readme.md new file mode 100644 index 00000000..881eb750 --- /dev/null +++ b/qmk/keyboards/box75/readme.md @@ -0,0 +1,18 @@ +# BOX75 QMK firmware folder + +## Introduction + +This is the QMK firmware repository for the BOX75, a keyboard designed by [Lin Design Studio](https://www.instagram.com/lin_designstudio/?hl=en). The PCB was designed by [Gondolindrim](https://github.com/Gondolindrim). + +The BOX75 is a 75% keyboard featuring a sleek exterior inspired by modern architecture. It supports MX-type switches only with no lighting options. Layout-wise, the BOX75 supports ISO layouts, split backspace and split right shift and three bottom row options (6u, 6.25u, 7u). + +As of november 2020, the only way to obtain a BOX75 is through the still upcoming Group Buy on [Novelkeys](http://novelkeys.xyz). + +## How to compile + +After setting up your build environment, you can compile the BOX75 default keymap by using: + + make box75: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/qmk/keyboards/box75/rules.mk b/qmk/keyboards/box75/rules.mk new file mode 100644 index 00000000..2d2f71e1 --- /dev/null +++ b/qmk/keyboards/box75/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = STM32F072 + +# 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = no + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/bpiphany/kitten_paw/config.h b/qmk/keyboards/bpiphany/kitten_paw/config.h index 89f104cf..5e1429c8 100644 --- a/qmk/keyboards/bpiphany/kitten_paw/config.h +++ b/qmk/keyboards/bpiphany/kitten_paw/config.h @@ -47,7 +47,12 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - + +#define LED_NUM_LOCK_PIN B7 +#define LED_CAPS_LOCK_PIN C6 +#define LED_SCROLL_LOCK_PIN C5 +#define LED_PIN_ON_STATE 0 + // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 diff --git a/qmk/keyboards/bpiphany/kitten_paw/kitten_paw.c b/qmk/keyboards/bpiphany/kitten_paw/kitten_paw.c index 26cb533f..e71b3c80 100644 --- a/qmk/keyboards/bpiphany/kitten_paw/kitten_paw.c +++ b/qmk/keyboards/bpiphany/kitten_paw/kitten_paw.c @@ -1,51 +1 @@ #include "kitten_paw.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(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -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 - CONFIG_LED_IO; - CONFIG_LED_IO; - print_dec(usb_led); - if (usb_led & (1<. */ #define UNUSED_PINS { B0, C4, D3 } +#define LED_NUM_LOCK_PIN C5 +#define LED_CAPS_LOCK_PIN C6 +#define LED_SCROLL_LOCK_PIN B7 +#define LED_PIN_ON_STATE 0 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/qmk/keyboards/bpiphany/tiger_lily/tiger_lily.c b/qmk/keyboards/bpiphany/tiger_lily/tiger_lily.c index d2e7ba70..f57f8b5f 100644 --- a/qmk/keyboards/bpiphany/tiger_lily/tiger_lily.c +++ b/qmk/keyboards/bpiphany/tiger_lily/tiger_lily.c @@ -1,63 +1 @@ #include "tiger_lily.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) { - DDRB |= (1<<7); - DDRC |= (1<<5) | (1<<6); - - print_dec(usb_led); - - if (usb_led & (1<. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 +#define LED_NUM_LOCK_PIN B7 +#define LED_CAPS_LOCK_PIN C5 +#define LED_SCROLL_LOCK_PIN C6 +#define LED_PIN_ON_STATE 0 + /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST diff --git a/qmk/keyboards/bpiphany/unloved_bastard/unloved_bastard.c b/qmk/keyboards/bpiphany/unloved_bastard/unloved_bastard.c index 19759306..f4b8032a 100644 --- a/qmk/keyboards/bpiphany/unloved_bastard/unloved_bastard.c +++ b/qmk/keyboards/bpiphany/unloved_bastard/unloved_bastard.c @@ -14,57 +14,3 @@ * along with this program. If not, see . */ #include "unloved_bastard.h" - -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(); -} - -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); -} - -// C5 left -// C6 middle led -// B7 right led -void led_init_ports(void) { - DDRB |= (1<<7); - DDRC |= (1<<5); - DDRC |= (1<<6); - - PORTB |= (1<<7); - PORTC |= (1<<5); - PORTC |= (1<<6); -} - - -void led_set_kb(uint8_t usb_led) { - - if (usb_led & (1<. + */ + + +#include "bt66tech60.h" diff --git a/qmk/keyboards/bt66tech/bt66tech60/bt66tech60.h b/qmk/keyboards/bt66tech/bt66tech60/bt66tech60.h new file mode 100644 index 00000000..68db70b0 --- /dev/null +++ b/qmk/keyboards/bt66tech/bt66tech60/bt66tech60.h @@ -0,0 +1,41 @@ +/* Copyright 2020 bt66tech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_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, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, \ + 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, KC_NO, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, KC_NO, K4D } \ +} diff --git a/qmk/keyboards/bt66tech/bt66tech60/chconf.h b/qmk/keyboards/bt66tech/bt66tech60/chconf.h new file mode 100644 index 00000000..f5e47164 --- /dev/null +++ b/qmk/keyboards/bt66tech/bt66tech60/chconf.h @@ -0,0 +1,714 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 rt/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_ +#define _CHIBIOS_RT_CONF_VER_6_0_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_ST_RESOLUTION) +#define CH_CFG_ST_RESOLUTION 32 +#endif + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#if !defined(CH_CFG_ST_FREQUENCY) +#define CH_CFG_ST_FREQUENCY 100000 +#endif + +/** + * @brief Time intervals data size. + * @note Allowed values are 16, 32 or 64 bits. + */ +#if !defined(CH_CFG_INTERVALS_SIZE) +#define CH_CFG_INTERVALS_SIZE 32 +#endif + +/** + * @brief Time types data size. + * @note Allowed values are 16 or 32 bits. + */ +#if !defined(CH_CFG_TIME_TYPES_SIZE) +#define CH_CFG_TIME_TYPES_SIZE 32 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_ST_TIMEDELTA) +#define CH_CFG_ST_TIMEDELTA 0 +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_TIME_QUANTUM) +#define CH_CFG_TIME_QUANTUM 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_MEMCORE_SIZE) +#define CH_CFG_MEMCORE_SIZE 0 +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_NO_IDLE_THREAD) +#define CH_CFG_NO_IDLE_THREAD FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_OPTIMIZE_SPEED) +#define CH_CFG_OPTIMIZE_SPEED TRUE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @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. + */ +#if !defined(CH_CFG_USE_TM) +#define CH_CFG_USE_TM FALSE +#endif + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_REGISTRY) +#define CH_CFG_USE_REGISTRY TRUE +#endif + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_WAITEXIT) +#define CH_CFG_USE_WAITEXIT TRUE +#endif + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_SEMAPHORES) +#define CH_CFG_USE_SEMAPHORES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE +#endif + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MUTEXES) +#define CH_CFG_USE_MUTEXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS) +#define CH_CFG_USE_CONDVARS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE +#endif + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_EVENTS) +#define CH_CFG_USE_EVENTS TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE +#endif + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_MESSAGES) +#define CH_CFG_USE_MESSAGES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MAILBOXES) +#define CH_CFG_USE_MAILBOXES TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMCORE) +#define CH_CFG_USE_MEMCORE TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_HEAP) +#define CH_CFG_USE_HEAP TRUE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_MEMPOOLS) +#define CH_CFG_USE_MEMPOOLS FALSE +#endif + +/** + * @brief Objects FIFOs APIs. + * @details If enabled then the objects FIFOs APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_OBJ_FIFOS) +#define CH_CFG_USE_OBJ_FIFOS FALSE +#endif + +/** + * @brief Pipes APIs. + * @details If enabled then the pipes APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_PIPES) +#define CH_CFG_USE_PIPES FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_CFG_USE_DYNAMIC) +#define CH_CFG_USE_DYNAMIC FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Objects factory options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Objects Factory APIs. + * @details If enabled then the objects factory APIs are included in the + * kernel. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_CFG_USE_FACTORY) +#define CH_CFG_USE_FACTORY FALSE +#endif + +/** + * @brief Maximum length for object names. + * @details If the specified length is zero then the name is stored by + * pointer but this could have unintended side effects. + */ +#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) +#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 +#endif + +/** + * @brief Enables the registry of generic objects. + */ +#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) +#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE +#endif + +/** + * @brief Enables factory for generic buffers. + */ +#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) +#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE +#endif + +/** + * @brief Enables factory for semaphores. + */ +#if !defined(CH_CFG_FACTORY_SEMAPHORES) +#define CH_CFG_FACTORY_SEMAPHORES FALSE +#endif + +/** + * @brief Enables factory for mailboxes. + */ +#if !defined(CH_CFG_FACTORY_MAILBOXES) +#define CH_CFG_FACTORY_MAILBOXES FALSE +#endif + +/** + * @brief Enables factory for objects FIFOs. + */ +#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) +#define CH_CFG_FACTORY_OBJ_FIFOS FALSE +#endif + +/** + * @brief Enables factory for Pipes. + */ +#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) +#define CH_CFG_FACTORY_PIPES FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) +#define CH_DBG_STATISTICS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_SYSTEM_STATE_CHECK) +#define CH_DBG_SYSTEM_STATE_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_CHECKS) +#define CH_DBG_ENABLE_CHECKS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_ASSERTS) +#define CH_DBG_ENABLE_ASSERTS FALSE +#endif + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#if !defined(CH_DBG_TRACE_MASK) +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_TRACE_BUFFER_SIZE) +#define CH_DBG_TRACE_BUFFER_SIZE 128 +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_ENABLE_STACK_CHECK) +#define CH_DBG_ENABLE_STACK_CHECK FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_FILL_THREADS) +#define CH_DBG_FILL_THREADS FALSE +#endif + +/** + * @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. + */ +#if !defined(CH_DBG_THREADS_PROFILING) +#define CH_DBG_THREADS_PROFILING FALSE +#endif + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System structure extension. + * @details User fields added to the end of the @p ch_system_t structure. + */ +#define CH_CFG_SYSTEM_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief System initialization hook. + * @details User initialization code added to the @p chSysInit() function + * just before interrupts are enabled globally. + */ +#define CH_CFG_SYSTEM_INIT_HOOK() { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @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 _thread_init() function. + * + * @note It is invoked from within @p _thread_init() 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/qmk/keyboards/bt66tech/bt66tech60/config.h b/qmk/keyboards/bt66tech/bt66tech60/config.h new file mode 100644 index 00000000..ae202407 --- /dev/null +++ b/qmk/keyboards/bt66tech/bt66tech60/config.h @@ -0,0 +1,95 @@ +/* +Copyright 2020 bt66tech + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER bt66tech +#define PRODUCT bt66tech 60% + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_COL_PINS { B9, B8, B7, B6, B5, B4, B3, B11, A15, A10, A9, B14, B13, B12 } +#define MATRIX_ROW_PINS { B10, B1, B0, A7, A6 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN A8 +#define BACKLIGHT_PWM_DRIVER PWMD1 +#define BACKLIGHT_PWM_CHANNEL 1 +#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 RGB_DI_PIN B15 +#define RGBLED_NUM 9 +#define WS2812_SPI SPID2 +#define WS2812_SPI_MOSI_PAL_MODE 5 +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ +/* + * 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 + + +/* 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/qmk/keyboards/bt66tech/bt66tech60/halconf.h b/qmk/keyboards/bt66tech/bt66tech60/halconf.h new file mode 100644 index 00000000..92180376 --- /dev/null +++ b/qmk/keyboards/bt66tech/bt66tech60/halconf.h @@ -0,0 +1,525 @@ +/* + ChibiOS - Copyright (C) 2006..2018 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 + +#define _CHIBIOS_HAL_CONF_ +#define _CHIBIOS_HAL_CONF_VER_7_0_ + +#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 cryptographic subsystem. + */ +#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) +#define HAL_USE_CRY FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC 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 SIO subsystem. + */ +#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) +#define HAL_USE_SIO FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#endif + +/** + * @brief Enables the TRNG subsystem. + */ +#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) +#define HAL_USE_TRNG 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 + +/** + * @brief Enables the WSPI subsystem. + */ +#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) +#define HAL_USE_WSPI FALSE +#endif + +/*===========================================================================*/ +/* PAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) +#define PAL_USE_CALLBACKS FALSE +#endif + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) +#define PAL_USE_WAIT 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 + +/** + * @brief Enforces the driver to use direct callbacks rather than OSAL events. + */ +#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) +#define CAN_ENFORCE_USE_CALLBACKS FALSE +#endif + +/*===========================================================================*/ +/* CRY driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the SW fall-back of the cryptographic driver. + * @details When enabled, this option, activates a fall-back software + * implementation for algorithms not supported by the underlying + * hardware. + * @note Fall-back implementations may not be present for all algorithms. + */ +#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_USE_FALLBACK FALSE +#endif + +/** + * @brief Makes the driver forcibly use the fall-back implementations. + */ +#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) +#define HAL_CRY_ENFORCE_FALLBACK FALSE +#endif + +/*===========================================================================*/ +/* DAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) +#define DAC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define DAC_USE_MUTUAL_EXCLUSION 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 the zero-copy API. + */ +#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 + +/** + * @brief OCR initialization constant for V20 cards. + */ +#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) +#define SDC_INIT_OCR_V20 0x50FF8000U +#endif + +/** + * @brief OCR initialization constant for non-V20 cards. + */ +#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) +#define SDC_INIT_OCR 0x80100000U +#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 circular transfers APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) +#define SPI_USE_CIRCULAR FALSE +#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 + +/** + * @brief Handling method for SPI CS line. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD +#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 + +/*===========================================================================*/ +/* WSPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) +#define WSPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define WSPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +#endif /* HALCONF_H */ + +/** @} */ diff --git a/qmk/keyboards/bt66tech/bt66tech60/info.json b/qmk/keyboards/bt66tech/bt66tech60/info.json new file mode 100644 index 00000000..3ea3f584 --- /dev/null +++ b/qmk/keyboards/bt66tech/bt66tech60/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "bt66tech60", + "url": "", + "maintainer": "bt66tech", + "width": 15, + "height": 5, + "layouts": { + "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} + ] + } + } +} + diff --git a/qmk/keyboards/bt66tech/bt66tech60/keymaps/default/keymap.c b/qmk/keyboards/bt66tech/bt66tech60/keymaps/default/keymap.c new file mode 100644 index 00000000..7e2326ad --- /dev/null +++ b/qmk/keyboards/bt66tech/bt66tech60/keymaps/default/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2020 bt66tech + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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, + _FN1 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ +[_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, KC_RCTL, MO(_FN) + ), + + [_FN] = 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_MS_ACCEL0, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______, _______, _______, _______, _______, KC_PSCREEN, _______, _______, _______, + KC_MS_ACCEL1, KC_MS_LEFT, KC_MS_DOWN,KC_MS_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_MS_ACCEL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, MO(_FN1), + _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______ + ), + +[_FN1] = LAYOUT_60_ansi( + BL_TOGG, BL_STEP, BL_ON, BL_OFF, BL_INC, BL_DEC, BL_BRTG, _______, _______, _______, _______, BL_DEC, BL_INC, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/qmk/keyboards/bt66tech/bt66tech60/keymaps/default/readme.md b/qmk/keyboards/bt66tech/bt66tech60/keymaps/default/readme.md new file mode 100644 index 00000000..73d3f723 --- /dev/null +++ b/qmk/keyboards/bt66tech/bt66tech60/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for bt66tech60 diff --git a/qmk/keyboards/bt66tech/bt66tech60/mcuconf.h b/qmk/keyboards/bt66tech/bt66tech60/mcuconf.h new file mode 100644 index 00000000..fced2728 --- /dev/null +++ b/qmk/keyboards/bt66tech/bt66tech60/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 FALSE +#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 TRUE +#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 TRUE +#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/qmk/keyboards/bt66tech/bt66tech60/readme.md b/qmk/keyboards/bt66tech/bt66tech60/readme.md new file mode 100644 index 00000000..51755c5c --- /dev/null +++ b/qmk/keyboards/bt66tech/bt66tech60/readme.md @@ -0,0 +1,19 @@ +# bt66tech60 + +![bt66tech60](https://i.imgur.com/8eJ4liU.jpg) + +* A handwired 60% keyboard with stm32 + +* Keyboard Maintainer: [bt66](https://github.com/bt66) +* Hardware Supported: handwired, STM32 +* Hardware Availability: anywhere + +Make example for this keyboard (after setting up your build environment): + + make bt66tech:default + +Flashing example for this keyboard: + + make bt66tech: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/qmk/keyboards/bt66tech/bt66tech60/rules.mk b/qmk/keyboards/bt66tech/bt66tech60/rules.mk new file mode 100644 index 00000000..e043210f --- /dev/null +++ b/qmk/keyboards/bt66tech/bt66tech60/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = STM32F103 + +# Bootloader selection +BOOTLOADER = stm32duino + +# 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 = yes # 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 = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +WS2812_DRIVER = spi + +DEFAULT_FOLDER = bt66tech/bt66tech60 + +LAYOUTS = 60_ansi + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/butterstick/sten.h b/qmk/keyboards/butterstick/sten.h index 84635a55..0d5c58df 100644 --- a/qmk/keyboards/butterstick/sten.h +++ b/qmk/keyboards/butterstick/sten.h @@ -15,7 +15,6 @@ 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); @@ -35,7 +34,7 @@ void CLICK_MOUSE(uint8_t); #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; \ + uint32_t refChord = stenoLayers[i] | chord; \ if (cChord == (refChord)) { if (!lookup) {act;} return refChord;}; \ } diff --git a/qmk/keyboards/cannonkeys/an_c/rules.mk b/qmk/keyboards/cannonkeys/an_c/rules.mk index d9702224..8ed2d0ea 100644 --- a/qmk/keyboards/cannonkeys/an_c/rules.mk +++ b/qmk/keyboards/cannonkeys/an_c/rules.mk @@ -20,6 +20,8 @@ WS2812_DRIVER = spi LAYOUTS = 60_ansi 60_tsangan_hhkb +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/cannonkeys/bluepill/keyboard.c b/qmk/keyboards/cannonkeys/bluepill/keyboard.c index c2e5946d..6a8edd4a 100644 --- a/qmk/keyboards/cannonkeys/bluepill/keyboard.c +++ b/qmk/keyboards/cannonkeys/bluepill/keyboard.c @@ -1,5 +1,5 @@ -#include "ch.h" -#include "hal.h" +#include +#include #include "util.h" #include "quantum.h" diff --git a/qmk/keyboards/cannonkeys/bluepill/ws2812.c b/qmk/keyboards/cannonkeys/bluepill/ws2812.c index d30806d5..779e9051 100644 --- a/qmk/keyboards/cannonkeys/bluepill/ws2812.c +++ b/qmk/keyboards/cannonkeys/bluepill/ws2812.c @@ -6,7 +6,7 @@ */ #include "ws2812.h" -#include "stdlib.h" +#include #define BYTES_FOR_LED_BYTE 4 #define NB_COLORS 3 diff --git a/qmk/keyboards/cannonkeys/db60/rules.mk b/qmk/keyboards/cannonkeys/db60/rules.mk index 12672865..23385081 100644 --- a/qmk/keyboards/cannonkeys/db60/rules.mk +++ b/qmk/keyboards/cannonkeys/db60/rules.mk @@ -17,5 +17,8 @@ WS2812_DRIVER = spi LAYOUTS = 60_ansi 60_tsangan_hhkb 60_iso +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF + # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/cannonkeys/devastatingtkl/rules.mk b/qmk/keyboards/cannonkeys/devastatingtkl/rules.mk index 9c3d0179..4ce69bf4 100644 --- a/qmk/keyboards/cannonkeys/devastatingtkl/rules.mk +++ b/qmk/keyboards/cannonkeys/devastatingtkl/rules.mk @@ -16,5 +16,8 @@ BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes WS2812_DRIVER = spi +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF + # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/cannonkeys/instant60/rules.mk b/qmk/keyboards/cannonkeys/instant60/rules.mk index b863bfad..0973ad95 100644 --- a/qmk/keyboards/cannonkeys/instant60/rules.mk +++ b/qmk/keyboards/cannonkeys/instant60/rules.mk @@ -19,6 +19,8 @@ WS2812_DRIVER = spi LAYOUTS = 60_ansi 60_tsangan_hhkb +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/cannonkeys/instant65/rules.mk b/qmk/keyboards/cannonkeys/instant65/rules.mk index 33c186b2..eba941f8 100644 --- a/qmk/keyboards/cannonkeys/instant65/rules.mk +++ b/qmk/keyboards/cannonkeys/instant65/rules.mk @@ -21,3 +21,6 @@ WS2812_DRIVER = spi # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE + +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF diff --git a/qmk/keyboards/cannonkeys/obliterated75/rules.mk b/qmk/keyboards/cannonkeys/obliterated75/rules.mk index a1aa5f14..fd12ef84 100644 --- a/qmk/keyboards/cannonkeys/obliterated75/rules.mk +++ b/qmk/keyboards/cannonkeys/obliterated75/rules.mk @@ -19,5 +19,8 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches WS2812_DRIVER = spi +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF + # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/cannonkeys/rekt1800/rules.mk b/qmk/keyboards/cannonkeys/rekt1800/rules.mk index c8f75b7d..c4f07f54 100644 --- a/qmk/keyboards/cannonkeys/rekt1800/rules.mk +++ b/qmk/keyboards/cannonkeys/rekt1800/rules.mk @@ -15,5 +15,8 @@ CUSTOM_MATRIX = no # Custom matrix file BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = no +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF + # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/cannonkeys/satisfaction75/bootloader_defs.h b/qmk/keyboards/cannonkeys/satisfaction75/bootloader_defs.h index 02c48c4e..dccd0fa5 100644 --- a/qmk/keyboards/cannonkeys/satisfaction75/bootloader_defs.h +++ b/qmk/keyboards/cannonkeys/satisfaction75/bootloader_defs.h @@ -1,7 +1,5 @@ /* 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/qmk/keyboards/cannonkeys/satisfaction75/config.h b/qmk/keyboards/cannonkeys/satisfaction75/config.h index ff31e37c..6a3598f8 100644 --- a/qmk/keyboards/cannonkeys/satisfaction75/config.h +++ b/qmk/keyboards/cannonkeys/satisfaction75/config.h @@ -17,6 +17,12 @@ along with this program. If not, see . #pragma once +/* Ensure we jump to bootloader if the RESET keycode was pressed */ +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE + +/* LSE clock */ +#define STM32_LSECLK 32768 + /* USB Device descriptor parameter */ #define VENDOR_ID 0xCA04 #define PRODUCT_ID 0x57F5 diff --git a/qmk/keyboards/cannonkeys/satisfaction75/led.c b/qmk/keyboards/cannonkeys/satisfaction75/led.c index 3ddcec20..18ef06ac 100644 --- a/qmk/keyboards/cannonkeys/satisfaction75/led.c +++ b/qmk/keyboards/cannonkeys/satisfaction75/led.c @@ -15,10 +15,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "hal.h" +#include #include "led_custom.h" #include "satisfaction75.h" -#include "printf.h" static void breathing_callback(PWMDriver *pwmp); diff --git a/qmk/keyboards/cannonkeys/satisfaction75/rules.mk b/qmk/keyboards/cannonkeys/satisfaction75/rules.mk index 80f57181..3a48d3eb 100644 --- a/qmk/keyboards/cannonkeys/satisfaction75/rules.mk +++ b/qmk/keyboards/cannonkeys/satisfaction75/rules.mk @@ -1,6 +1,6 @@ # MCU name MCU = STM32F072 -BOARD = ST_STM32F072B_DISCOVERY +BOARD = GENERIC_STM32_F072XB # Build Options # comment out to disable the options. @@ -24,6 +24,8 @@ QWIIC_ENABLE += MICRO_OLED DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1 +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/qmk/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/qmk/keyboards/cannonkeys/satisfaction75/satisfaction75.c index f92067c9..fd85b823 100644 --- a/qmk/keyboards/cannonkeys/satisfaction75/satisfaction75.c +++ b/qmk/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -2,8 +2,8 @@ #include "print.h" #include "debug.h" -#include "ch.h" -#include "hal.h" +#include +#include #ifdef QWIIC_MICRO_OLED_ENABLE #include "micro_oled.h" @@ -54,6 +54,11 @@ backlight_config_t kb_backlight_config = { .level = BACKLIGHT_LEVELS }; +void board_init(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); +} + #ifdef VIA_ENABLE void backlight_get_value( uint8_t *data ) diff --git a/qmk/keyboards/cannonkeys/savage65/rules.mk b/qmk/keyboards/cannonkeys/savage65/rules.mk index 577c578d..8e1b984f 100644 --- a/qmk/keyboards/cannonkeys/savage65/rules.mk +++ b/qmk/keyboards/cannonkeys/savage65/rules.mk @@ -21,4 +21,7 @@ WS2812_DRIVER = spi # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF + LAYOUTS = 65_ansi_blocker 65_ansi_blocker_split_bs 65_ansi_blocker_tsangan 65_iso_blocker diff --git a/qmk/keyboards/cannonkeys/tmov2/keymaps/brandonschlack/keymap.c b/qmk/keyboards/cannonkeys/tmov2/keymaps/brandonschlack/keymap.c new file mode 100644 index 00000000..1d0cdf4f --- /dev/null +++ b/qmk/keyboards/cannonkeys/tmov2/keymaps/brandonschlack/keymap.c @@ -0,0 +1,173 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "brandonschlack.h" + +/** + * Layer Names + * + * Layers mostly used for macro keys + */ +#define _REEDER _M1 +#define _NAV _M2 +#define _MOUSE _M3 + +/** + * Keycodes & Macros + */ +#define TG_BASE TO(_BASE) +#define TG_REDR TO(_REEDER) +#define TG_NAV TO(_NAV) +#define TG_MOUS TO(_MOUSE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /** + * Base + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│││Tab  │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│Bck│ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │PgU│││HyEsc │ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │PgD│││Shift   │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│Shft│ Fn│ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │End│││││││││││Opt│Cmd  │        │          │  Cmd│Ctl│││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_BASE] = LAYOUT_default( + 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_RBRC, KC_BSPC, \ + KC_PGUP, HY_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, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, PLY_FN1, \ + KC_END, KC_LOPT, KC_LCMD, SPC_RAI, SPC_RAI, KC_RCMD, KC_RCTL \ + ), + /** + * Reeder + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ P │││     │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │ K │││      │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │ J │││        │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │ N │││││││││││   │     │        │          │     │   │││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_REEDER] = LAYOUT_default( \ + KC_P, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_K, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_J, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_N, _______, _______, _______, _______, _______, _______ \ + ), + /** + * Nav + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ → │││     │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │ ↑ │││      │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │ ↓ │││        │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │ ← │││││││││││   │     │        │          │     │   │││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_NAV] = LAYOUT_default( \ + KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DOWN, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_LEFT, _______, _______, _______, _______, _______, _______ \ + ), + /** + * Mouse + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │WhU│││     │   │   │   │   │   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │ ↑ │││      │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │ ↓ │││        │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │WhD│││││││││││   │     │        │          │     │   │││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_MOUSE] = LAYOUT_default( \ + MC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_DOWN, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + MC_WH_D, _______, _______, _______, _______, _______, _______ \ + ), + /** + * Lower + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Nxt│││Del  │BrD│BrU│Msn│LHP│   │   │   │   │   │   │ ↑ │Mut│SlD│ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │VlU│││HyCaps│   │   │NxW│PvT│Bck│Fwd│NxT│   │   │ ← │ → │ Play │ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │VlD│││        │   │   │   │1PX│1Ps│   │   │   │   │ ↓ │    │   │ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │Prv│││││││││││   │     │        │          │     │   │││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_LOWER] = LAYOUT_default( \ + KC_MNXT, KC_DELT, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, _______, _______, _______, _______, _______, _______, KC_UP, KC_MUTE, MC_SLPD, \ + KC_VOLU, HY_CAPS, _______, _______, NXT_WIN, PRV_TAB, MC_BACK, MC_FWRD, NXT_TAB, _______, _______, KC_LEFT, KC_RGHT, KC_MPLY, \ + KC_VOLD, _______, XXXXXXX, _______, _______, _______, PX_AFLL, OP_AFLL, _______, _______, _______, _______, KC_DOWN, _______, _______, \ + KC_MPRV, _______, _______, _______, _______, _______, _______ \ + ), + + /** + * Raise + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Hom│││~ `  │! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│   │ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │PgU│││      │ F1│ F2│ F3│ F4│ F5│ F6│_ -│+ =│   │   │   │      │ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │PgD│││        │ F7│ F8│ F9│F10│F11│F12│   │   │   │| \│    │   │ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │End│││││││││││   │     │        │          │     │   │││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_RAISE] = LAYOUT_default( \ + 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_MINS, KC_EQL, _______, \ + KC_PGUP, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, _______, _______, _______, _______, \ + KC_PGDN, _______, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_BSLS, _______, _______, \ + KC_END, _______, _______, _______, _______, _______, _______ \ + ), + /** + * Adjust + * ┌───┬┬┬─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Bse│││Make │   │   │EEP│RST│   │   │   │   │   │   │   │   │   │ + * ├───┼┼┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ + * │Rdr│││      │   │   │   │   │   │   │   │   │   │   │   │      │ + * ├───┼┼┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┤ + * │Nav│││        │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├───┼┼┼┬┬┬┬┬┬┬┬┴──┬┴───┴┬──┴───┴─┬─┴───┴───┴┬──┴──┬┴──┬┼┬┬┬┬┼┬┬┬┤ + * │Mse│││││││││││   │     │        │          │     │   │││││││││││ + * └───┴┴┴┴┴┴┴┴┴┴┴───┴─────┴────────┴──────────┴─────┴───┴┴┴┴┴┴┴┴┴┴┘ + */ + [_ADJUST] = LAYOUT_default( \ + TG_BASE, QM_MAKE, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_REDR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_NAV, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + TG_MOUS, _______, _______, _______, _______, _______, _______ \ + ), +}; + +void keyboard_post_init_keymap(void) { + rgblight_disable_noeeprom(); +} + +layer_state_t layer_state_set_keymap(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/qmk/keyboards/cannonkeys/tmov2/rules.mk b/qmk/keyboards/cannonkeys/tmov2/rules.mk index dc7f59ae..9b29e8fd 100644 --- a/qmk/keyboards/cannonkeys/tmov2/rules.mk +++ b/qmk/keyboards/cannonkeys/tmov2/rules.mk @@ -20,3 +20,6 @@ WS2812_DRIVER = spi # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE + +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF diff --git a/qmk/keyboards/capsunlocked/cu65/config.h b/qmk/keyboards/capsunlocked/cu65/config.h new file mode 100644 index 00000000..8fac6cd0 --- /dev/null +++ b/qmk/keyboards/capsunlocked/cu65/config.h @@ -0,0 +1,105 @@ +/* +Copyright 2020 CapsUnlocked + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4355 +#define PRODUCT_ID 0x0065 +#define DEVICE_VER 0x0001 +#define MANUFACTURER CapsUnlocked +#define PRODUCT CU65 + +/* 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 { F1, F4, F5, F6, D3 } +#define MATRIX_COL_PINS { D6, D7, D4, B4, B5, B6, C6, D5, C7, F0, E6, B0, B1, B7, B3, B2 } +#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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful 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 + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/capsunlocked/cu65/cu65.c b/qmk/keyboards/capsunlocked/cu65/cu65.c new file mode 100644 index 00000000..2b7f720e --- /dev/null +++ b/qmk/keyboards/capsunlocked/cu65/cu65.c @@ -0,0 +1,14 @@ +/* +Copyright 2020 CapsUnlocked +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "cu65.h" diff --git a/qmk/keyboards/capsunlocked/cu65/cu65.h b/qmk/keyboards/capsunlocked/cu65/cu65.h new file mode 100644 index 00000000..89b02ed9 --- /dev/null +++ b/qmk/keyboards/capsunlocked/cu65/cu65.h @@ -0,0 +1,67 @@ +/* +Copyright 2020 CapsUnlocked +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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, 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, K213, K214, K215, \ + K300, K301, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, \ + K400, K401, K402, K407, 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, K213, K214, K215 }, \ + { K300, K301, KC_NO,K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315 }, \ + { K400, K401, K402, KC_NO,KC_NO,KC_NO,KC_NO,K407, KC_NO,KC_NO,K410, KC_NO,K412, K413, K414, K415 } \ +} + +#define LAYOUT_65_ansi( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, 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, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, \ + K400, K401, K402, K407, K410, K412, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO,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, KC_NO, KC_NO,K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315 }, \ + { K400, K401, K402, KC_NO,KC_NO,KC_NO,KC_NO,K407, KC_NO,KC_NO,K410, KC_NO,K412, K413, K414, K415 } \ +} + +#define LAYOUT_65_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, 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, K213, K214, K215, \ + K300, K301, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, \ + K400, K401, K402, K407, K410, K412, K413, K414, K415 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO,K014, K015 }, \ + { K100, KC_NO,K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO,K115 }, \ + { K200, KC_NO,K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, K301, KC_NO,K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315 }, \ + { K400, K401, K402, KC_NO,KC_NO,KC_NO,KC_NO,K407, KC_NO,KC_NO,K410, KC_NO,K412, K413, K414, K415 } \ +} diff --git a/qmk/keyboards/capsunlocked/cu65/info.json b/qmk/keyboards/capsunlocked/cu65/info.json new file mode 100644 index 00000000..fdb187e3 --- /dev/null +++ b/qmk/keyboards/capsunlocked/cu65/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "CU65", + "url": "", + "maintainer": "qmk", + "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":"Insert", "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.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}] + }, + "LAYOUT_65_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}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Insert", "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":"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":"~", "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":"\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/qmk/keyboards/capsunlocked/cu65/keymaps/default/keymap.c b/qmk/keyboards/capsunlocked/cu65/keymaps/default/keymap.c new file mode 100644 index 00000000..1bf11d96 --- /dev/null +++ b/qmk/keyboards/capsunlocked/cu65/keymaps/default/keymap.c @@ -0,0 +1,62 @@ +/* +Copyright 2020 CapsUnlocked + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │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│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │  Enter │Pg+│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ Shift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │Pg-│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│LGUI│LAlt│      Space      │RAlt│ L1 │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + 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_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( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │RST│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│       │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │        │   │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │        │   │   │   │   │   │   │   │   │   │   │      │ │   │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │    │    │    │                        │    │    │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + 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/qmk/keyboards/capsunlocked/cu65/keymaps/default/readme.md b/qmk/keyboards/capsunlocked/cu65/keymaps/default/readme.md new file mode 100644 index 00000000..65bed4a3 --- /dev/null +++ b/qmk/keyboards/capsunlocked/cu65/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default ANSI keymap for CU65 diff --git a/qmk/keyboards/capsunlocked/cu65/keymaps/iso/keymap.c b/qmk/keyboards/capsunlocked/cu65/keymaps/iso/keymap.c new file mode 100644 index 00000000..a8a32cc7 --- /dev/null +++ b/qmk/keyboards/capsunlocked/cu65/keymaps/iso/keymap.c @@ -0,0 +1,61 @@ +/* +Copyright 2020 CapsUnlocked + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_iso( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │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│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent├───┤ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │  │Pg+│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift│ ↑ │Pg-│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │Ctrl│LGUI│LAlt│      Space      │RAlt│ L1 │ │ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + 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_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 + ), + [1] = LAYOUT_65_iso( + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │RST│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│       │   │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │   │   │   │   │   │   │   │   │   │   │   │   │   │     │   │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐    ├───┤ + * │      │   │   │   │   │   │   │   │   │   │   │   │   │    │   │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │    │   │   │   │   │   │   │   │   │   │   │   │      │ │   │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │    │    │    │                        │    │    │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + 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/qmk/keyboards/capsunlocked/cu65/keymaps/iso/readme.md b/qmk/keyboards/capsunlocked/cu65/keymaps/iso/readme.md new file mode 100644 index 00000000..2c2ded31 --- /dev/null +++ b/qmk/keyboards/capsunlocked/cu65/keymaps/iso/readme.md @@ -0,0 +1 @@ +# The ISO keymap for CU65 diff --git a/qmk/keyboards/capsunlocked/cu65/keymaps/via/keymap.c b/qmk/keyboards/capsunlocked/cu65/keymaps/via/keymap.c new file mode 100644 index 00000000..1bd83329 --- /dev/null +++ b/qmk/keyboards/capsunlocked/cu65/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 CapsUnlocked + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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_BSPC, 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_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_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/qmk/keyboards/capsunlocked/cu65/keymaps/via/rules.mk b/qmk/keyboards/capsunlocked/cu65/keymaps/via/rules.mk new file mode 100644 index 00000000..1e5b9980 --- /dev/null +++ b/qmk/keyboards/capsunlocked/cu65/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/qmk/keyboards/capsunlocked/cu65/readme.md b/qmk/keyboards/capsunlocked/cu65/readme.md new file mode 100644 index 00000000..0a51d7b1 --- /dev/null +++ b/qmk/keyboards/capsunlocked/cu65/readme.md @@ -0,0 +1,13 @@ +# CU65 + +The CU65 is a customisable 65% that supports hotswap ISO and ANSI layouts on the same PCB. + +* Keyboard maintainer: [rys](https://github.com/rys) +* Hardware supported: CU65 r2 +* Hardware availability: [CapsUnlocked](https://caps-unlocked.com/cu65-r2/) + +Make example for this keyboard (after setting up your build environment): + + make capsunlocked/cu65: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/qmk/keyboards/capsunlocked/cu65/rules.mk b/qmk/keyboards/capsunlocked/cu65/rules.mk new file mode 100644 index 00000000..cf7418e4 --- /dev/null +++ b/qmk/keyboards/capsunlocked/cu65/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader +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 = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi 65_iso diff --git a/qmk/keyboards/capsunlocked/readme.md b/qmk/keyboards/capsunlocked/readme.md new file mode 100644 index 00000000..b2306e02 --- /dev/null +++ b/qmk/keyboards/capsunlocked/readme.md @@ -0,0 +1,3 @@ +# CapsUnlocked keyboards + +Home of the firmware for CapsUnlocked keyboards! diff --git a/qmk/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c b/qmk/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c index 2bd2c5e2..faf57654 100644 --- a/qmk/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c +++ b/qmk/keyboards/chavdai40/boards/GENERIC_STM32_F042X6/board.c @@ -19,8 +19,8 @@ * generator plugin. Do not edit manually. */ -#include "hal.h" -#include "stm32_gpio.h" +#include +#include /*===========================================================================*/ /* Driver local definitions. */ diff --git a/qmk/keyboards/chavdai40/bootloader_defs.h b/qmk/keyboards/chavdai40/bootloader_defs.h index 4994be9c..6b218f7b 100644 --- a/qmk/keyboards/chavdai40/bootloader_defs.h +++ b/qmk/keyboards/chavdai40/bootloader_defs.h @@ -1,7 +1,5 @@ /* 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 0x1FFFC400 \ No newline at end of file diff --git a/qmk/keyboards/cheshire/curiosity/curiosity.h b/qmk/keyboards/cheshire/curiosity/curiosity.h index e250eda8..c26b03e2 100644 --- a/qmk/keyboards/cheshire/curiosity/curiosity.h +++ b/qmk/keyboards/cheshire/curiosity/curiosity.h @@ -26,7 +26,7 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT_default( \ +#define LAYOUT_alice_split_bs( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ K100, K101, K102, K103, K104, K105, K106, K108, K109, K110, K111, K112, K113, K114, K115, \ K200, K201, K202, K203, K204, K205, K206, K208, K209, K210, K211, K212, K213, K215, \ @@ -40,3 +40,20 @@ { ____, K301, K302, K303, K304, K305, K306, ____, K308, K309, K310, K311, K312, K313, K314, K315}, \ { ____, K401, ____, K403, ____, K405, K406, ____, ____, K409, ____, K411, ____, ____, K414, ____}, \ } + +#define LAYOUT_alice( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K015, \ + K100, K101, K102, K103, K104, K105, K106, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K208, K209, K210, K211, K212, K213, K215, \ + K301, K302, K303, K304, K305, K306, K308, K309, K310, K311, K312, K313, K314, K315, \ + K401, K403, K405, K406, K409, K411, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, ____, K015}, \ + { K100, K101, K102, K103, K104, K105, K106, ____, K108, K109, K110, K111, K112, K113, K114, K115}, \ + { K200, K201, K202, K203, K204, K205, K206, ____, K208, K209, K210, K211, K212, K213, ____, K215}, \ + { ____, K301, K302, K303, K304, K305, K306, ____, K308, K309, K310, K311, K312, K313, K314, K315}, \ + { ____, K401, ____, K403, ____, K405, K406, ____, ____, K409, ____, K411, ____, ____, K414, ____}, \ +} + +#define LAYOUT_default LAYOUT_alice_split_bs diff --git a/qmk/keyboards/cheshire/curiosity/info.json b/qmk/keyboards/cheshire/curiosity/info.json index f9895465..d9a28d01 100644 --- a/qmk/keyboards/cheshire/curiosity/info.json +++ b/qmk/keyboards/cheshire/curiosity/info.json @@ -4,7 +4,7 @@ "width": 19.75, "height": 5.25, "layouts": { - "LAYOUT_default": { + "LAYOUT_alice_split_bs": { "layout": [ {"label":"Esc", "x":0.5, "y":0}, {"label":"`", "x":1.75, "y":0.25}, @@ -69,6 +69,79 @@ {"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} + ] + }, + "LAYOUT_alice": { + "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":"|", "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}, diff --git a/qmk/keyboards/cheshire/curiosity/keymaps/madhatter/keymap.c b/qmk/keyboards/cheshire/curiosity/keymaps/madhatter/keymap.c index b0649d37..2273ad93 100644 --- a/qmk/keyboards/cheshire/curiosity/keymaps/madhatter/keymap.c +++ b/qmk/keyboards/cheshire/curiosity/keymaps/madhatter/keymap.c @@ -25,6 +25,7 @@ enum my_layers { #define FNMS MO(_FNMS) #define NAVMED MO(_NAVMED) #define CAP_CTL CTL_T(KC_CAPS) +#define GUI_BSPC LCMD_T(KC_BSPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_default( @@ -32,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, CAP_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_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, KC_LCMD, NAVMED, KC_SPC, KC_RALT, KC_RCTL + KC_LCTL, KC_LALT, GUI_BSPC, NAVMED, KC_SPC, KC_RALT, KC_RCTL ), [_FNMS] = LAYOUT_default( diff --git a/qmk/keyboards/cheshire/curiosity/keymaps/madhatter/rules.mk b/qmk/keyboards/cheshire/curiosity/keymaps/madhatter/rules.mk index 1b0f198d..41fcf032 100644 --- a/qmk/keyboards/cheshire/curiosity/keymaps/madhatter/rules.mk +++ b/qmk/keyboards/cheshire/curiosity/keymaps/madhatter/rules.mk @@ -1 +1,2 @@ -VELOCIKEY_ENABLE = yes +VIA_ENABLE = yes +VELOCIKEY_ENABLE = yes \ No newline at end of file diff --git a/qmk/keyboards/cheshire/curiosity/keymaps/via/keymap.c b/qmk/keyboards/cheshire/curiosity/keymaps/via/keymap.c new file mode 100644 index 00000000..2425474a --- /dev/null +++ b/qmk/keyboards/cheshire/curiosity/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/* +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 + + +// 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] = { + [0] = LAYOUT_default( + 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_MINS, KC_EQL, KC_BSLS, KC_DEL, + 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, KC_RGUI, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), + [1] = LAYOUT_default( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_default( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_default( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/qmk/keyboards/cheshire/curiosity/keymaps/via/rules.mk b/qmk/keyboards/cheshire/curiosity/keymaps/via/rules.mk new file mode 100644 index 00000000..40bded39 --- /dev/null +++ b/qmk/keyboards/cheshire/curiosity/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE=yes \ No newline at end of file diff --git a/qmk/keyboards/cheshire/curiosity/rules.mk b/qmk/keyboards/cheshire/curiosity/rules.mk index 354465a0..d9a7d86a 100644 --- a/qmk/keyboards/cheshire/curiosity/rules.mk +++ b/qmk/keyboards/cheshire/curiosity/rules.mk @@ -15,3 +15,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow + +LAYOUTS = alice alice_split_bs diff --git a/qmk/keyboards/claw44/claw44.c b/qmk/keyboards/claw44/claw44.c index f564fb62..d8710306 100644 --- a/qmk/keyboards/claw44/claw44.c +++ b/qmk/keyboards/claw44/claw44.c @@ -1,10 +1 @@ #include "claw44.h" -#include "ssd1306.h" - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { -#ifdef SSD1306OLED - return process_record_gfx(keycode,record) && process_record_user(keycode, record); -#else - return process_record_user(keycode, record); -#endif -} diff --git a/qmk/keyboards/claw44/config.h b/qmk/keyboards/claw44/config.h index fb1cdf39..0bd74ff8 100644 --- a/qmk/keyboards/claw44/config.h +++ b/qmk/keyboards/claw44/config.h @@ -19,10 +19,6 @@ along with this program. If not, see . #pragma once #include "config_common.h" -#include - -#define USE_I2C -#define USE_SERIAL #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION diff --git a/qmk/keyboards/claw44/keymaps/default/config.h b/qmk/keyboards/claw44/keymaps/default/config.h index eff6ad3c..d2ea0254 100644 --- a/qmk/keyboards/claw44/keymaps/default/config.h +++ b/qmk/keyboards/claw44/keymaps/default/config.h @@ -20,16 +20,4 @@ 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_TERM 200 diff --git a/qmk/keyboards/claw44/keymaps/default/keymap.c b/qmk/keyboards/claw44/keymaps/default/keymap.c index 088087c7..65dbd67d 100644 --- a/qmk/keyboards/claw44/keymaps/default/keymap.c +++ b/qmk/keyboards/claw44/keymaps/default/keymap.c @@ -1,168 +1,59 @@ #include QMK_KEYBOARD_H -#ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#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 custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, +enum layer_number { + _QWERTY = 0, + _RAISE, + _LOWER, }; #define KC_ KC_TRNS #define KC_RST RESET -#define KC_L_SPC LT(_LOWER, KC_SPC) // lower -#define KC_R_ENT LT(_RAISE, KC_ENT) // raise -#define KC_G_JA LGUI_T(KC_LANG1) // cmd or win -#define KC_G_EN LGUI_T(KC_LANG2) // cmd or win -#define KC_C_BS LCTL_T(KC_BSPC) // ctrl -#define KC_A_DEL ALT_T(KC_DEL) // alt +#define KC_L_SPC LT(_LOWER, KC_SPC) // lower +#define KC_R_ENT LT(_RAISE, KC_ENT) // raise +#define KC_G_JA LGUI_T(KC_LANG1) // cmd or win +#define KC_G_EN LGUI_T(KC_LANG2) // cmd or win +#define KC_C_BS LCTL_T(KC_BSPC) // ctrl +#define KC_A_DEL ALT_T(KC_DEL) // alt const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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_MINS, + //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------| + 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_A_DEL, KC_G_EN, KC_L_SPC, KC_C_BS, KC_C_BS, KC_R_ENT, KC_G_JA, KC_A_DEL + // `----------+--------+---------+--------' `--------+---------+--------+---------' + ), - [_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_MINS, - //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------| - 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_A_DEL, KC_G_EN, KC_L_SPC, KC_C_BS, KC_C_BS, KC_R_ENT, KC_G_JA, KC_A_DEL - // `----------+--------+---------+--------' `--------+---------+--------+---------' - ), + [_RAISE] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + _______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LPRN, KC_HASH, KC_DLR , KC_DQT , KC_QUOT, KC_TILD, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_GRV , KC_RPRN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, _______, _______, _______, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + _______, _______, _______, _______, _______, _______, _______, RESET + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), - // \ ^ ! & | @ = + * % - - // ( # $ " ' ~ ← ↓ ↑ → ` ) - // { [ ] } - - [_RAISE] = LAYOUT( \ - //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. - _______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LPRN, KC_HASH, KC_DLR , KC_DQT , KC_QUOT, KC_TILD, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_GRV , KC_RPRN, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, _______, _______, _______, _______, - //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' - _______, _______, _______, _______, _______, _______, _______, RESET - // `--------+--------+--------+--------' `--------+--------+--------+--------' - ), - - [_LOWER] = LAYOUT( \ - //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. - KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , _______, KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, KC_COMM, KC_DOT , KC_SLSH, _______, - //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' - RESET , _______, _______, _______, _______, _______, _______, _______ - // `--------+--------+--------+--------' `--------+--------+--------+--------' - ), + [_LOWER] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , _______, KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, KC_COMM, KC_DOT , KC_SLSH, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + RESET , _______, _______, _______, _______, _______, _______, _______ + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), }; - -void matrix_init_user(void) { - //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) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - } else { - layer_off(_LOWER); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - } else { - layer_off(_RAISE); - } - return false; - break; - } - return true; -} diff --git a/qmk/keyboards/claw44/keymaps/oled/config.h b/qmk/keyboards/claw44/keymaps/oled/config.h new file mode 100644 index 00000000..edde2c67 --- /dev/null +++ b/qmk/keyboards/claw44/keymaps/oled/config.h @@ -0,0 +1,24 @@ +/* +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 MASTER_LEFT +#define OLED_FONT_H "keyboards/claw44/lib/glcdfont.c" diff --git a/qmk/keyboards/claw44/keymaps/oled/keymap.c b/qmk/keyboards/claw44/keymaps/oled/keymap.c new file mode 100644 index 00000000..0d10c371 --- /dev/null +++ b/qmk/keyboards/claw44/keymaps/oled/keymap.c @@ -0,0 +1,137 @@ +#include QMK_KEYBOARD_H +#include + +// 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, + _RAISE, + _LOWER, +}; + +#define KC_ KC_TRNS +#define KC_RST RESET +#define KC_L_SPC LT(_LOWER, KC_SPC) // lower +#define KC_R_ENT LT(_RAISE, KC_ENT) // raise +#define KC_G_JA LGUI_T(KC_LANG1) // cmd or win +#define KC_G_EN LGUI_T(KC_LANG2) // cmd or win +#define KC_C_BS LCTL_T(KC_BSPC) // ctrl +#define KC_A_DEL ALT_T(KC_DEL) // alt + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_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_MINS, + //|--------+--------+---------+--------+---------+--------| |--------+---------+--------+---------+--------+--------| + 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_A_DEL, KC_G_EN, KC_L_SPC, KC_C_BS, KC_C_BS, KC_R_ENT, KC_G_JA, KC_A_DEL + // `----------+--------+---------+--------' `--------+---------+--------+---------' + ), + + [_RAISE] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + _______, KC_BSLS, KC_CIRC, KC_EXLM, KC_AMPR, KC_PIPE, KC_AT , KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LPRN, KC_HASH, KC_DLR , KC_DQT , KC_QUOT, KC_TILD, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_GRV , KC_RPRN, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, KC_LCBR, KC_LBRC, KC_RBRC, KC_RCBR, _______, _______, _______, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + _______, _______, _______, _______, _______, _______, _______, RESET + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), + + [_LOWER] = LAYOUT( \ + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , _______, KC_EQL , KC_PLUS, KC_ASTR, KC_PERC, KC_MINS, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, KC_COMM, KC_DOT , KC_SLSH, _______, + //`--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------' + RESET , _______, _______, _______, _______, _______, _______, _______ + // `--------+--------+--------+--------' `--------+--------+--------+--------' + ), +}; + +#ifdef OLED_DRIVER_ENABLE + +void render_layer_state(void) { + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("Layer: Default"), false); + break; + case _RAISE: + oled_write_ln_P(PSTR("Layer: Raise"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("Layer: Lower"), false); + break; + default: + oled_write_ln_P(PSTR("Layer: Undefined"), false); + } +} + +void render_logo(void) { + static const char PROGMEM 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(logo, false); +} + +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; } + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_layer_state(); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + } else { + render_logo(); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + set_keylog(keycode, record); + } + return true; +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) return OLED_ROTATION_180; + return rotation; +} + +#endif diff --git a/qmk/keyboards/claw44/keymaps/oled/rules.mk b/qmk/keyboards/claw44/keymaps/oled/rules.mk new file mode 100644 index 00000000..c5826621 --- /dev/null +++ b/qmk/keyboards/claw44/keymaps/oled/rules.mk @@ -0,0 +1 @@ +OLED_DRIVER_ENABLE = yes diff --git a/qmk/keyboards/claw44/rev1/config.h b/qmk/keyboards/claw44/rev1/config.h index f3406fee..dc6e49dd 100644 --- a/qmk/keyboards/claw44/rev1/config.h +++ b/qmk/keyboards/claw44/rev1/config.h @@ -19,22 +19,21 @@ 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 yfuku -#define PRODUCT claw44 -#define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 4 thumb keys +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER yfuku +#define PRODUCT claw44 +#define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 4 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 { 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 MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW +#define SOFT_SERIAL_PIN D2 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/qmk/keyboards/claw44/rev1/rev1.c b/qmk/keyboards/claw44/rev1/rev1.c index 9529636f..520a869e 100644 --- a/qmk/keyboards/claw44/rev1/rev1.c +++ b/qmk/keyboards/claw44/rev1/rev1.c @@ -1,8 +1 @@ -#include "claw44.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 +#include "rev1.h" diff --git a/qmk/keyboards/claw44/rev1/rev1.h b/qmk/keyboards/claw44/rev1/rev1.h index c6c9057f..79ae9586 100644 --- a/qmk/keyboards/claw44/rev1/rev1.h +++ b/qmk/keyboards/claw44/rev1/rev1.h @@ -1,55 +1,33 @@ #pragma once -#include "../claw44.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, 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, R30, R31, R32, R33 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { KC_NO, KC_NO, L30, L31, L32, L33 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, R20 }, \ - { KC_NO, KC_NO, R33, R32, R31, R30 } \ - } + 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, R30, R31, R32, R33 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, KC_NO, L30, L31, L32, L33 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { KC_NO, KC_NO, R33, R32, R31, R30 } \ + } #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, \ - L30, L31, L32, L33, R30, R31, R32, R33 \ - ) \ - LAYOUT( \ - 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_##R30, KC_##R31, KC_##R32, KC_##R33 \ - ) - -enum layer_number { - _QWERTY = 0, - _LOWER, - _RAISE, - _ADJUST, -}; + 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, R30, R31, R32, R33 \ + ) \ + LAYOUT( \ + 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_##R30, KC_##R31, KC_##R32, KC_##R33 \ + ) diff --git a/qmk/keyboards/claw44/rev1/rules.mk b/qmk/keyboards/claw44/rev1/rules.mk index 016bc362..b1af22c5 100644 --- a/qmk/keyboards/claw44/rev1/rules.mk +++ b/qmk/keyboards/claw44/rev1/rules.mk @@ -1,7 +1,3 @@ -SRC += rev1/matrix.c -SRC += rev1/split_util.c -SRC += rev1/split_scomm.c - # Build Options BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys @@ -10,7 +6,6 @@ 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 @@ -20,12 +15,5 @@ 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/layer_state_reader.c \ - ./lib/logo_reader.c \ - ./lib/keylogger.c \ - # ./lib/rgb_state_reader.c \ - # ./lib/mode_icon_reader.c \ - # ./lib/host_led_state_reader.c \ - # ./lib/timelogger.c \ +OLED_DRIVER_ENABLE = no # Add OLED displays support +SPLIT_KEYBOARD = yes diff --git a/qmk/keyboards/claw44/rules.mk b/qmk/keyboards/claw44/rules.mk index f872b9eb..f4d44b23 100644 --- a/qmk/keyboards/claw44/rules.mk +++ b/qmk/keyboards/claw44/rules.mk @@ -22,7 +22,6 @@ 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 @@ -30,12 +29,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 -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/qmk/keyboards/clueboard/17/.noci b/qmk/keyboards/clueboard/17/.noci new file mode 100644 index 00000000..e69de29b diff --git a/qmk/keyboards/clueboard/17/17.c b/qmk/keyboards/clueboard/17/17.c index 9e8ca644..44b55a32 100644 --- a/qmk/keyboards/clueboard/17/17.c +++ b/qmk/keyboards/clueboard/17/17.c @@ -2,16 +2,6 @@ int pwm_level; -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); -}; - -void led_set_kb(uint8_t usb_led) { - print("led_set\n"); -} - void backlight_init_ports(void) { // Set C7 to output DDRC |= (1<<7); diff --git a/qmk/keyboards/clueboard/2x1800/2018/.noci b/qmk/keyboards/clueboard/2x1800/2018/.noci new file mode 100644 index 00000000..e69de29b diff --git a/qmk/keyboards/clueboard/2x1800/2018/2018.c b/qmk/keyboards/clueboard/2x1800/2018/2018.c index 1745309f..dee0c01b 100644 --- a/qmk/keyboards/clueboard/2x1800/2018/2018.c +++ b/qmk/keyboards/clueboard/2x1800/2018/2018.c @@ -14,44 +14,3 @@ * along with this program. If not, see . */ #include "2018.h" - -void matrix_init_kb(void) { - // Set our LED pins as output - DDRB |= (1<<4); // Numlock - DDRB |= (1<<5); // Capslock - DDRB |= (1<<6); // Scroll Lock - - // Run the keymap level init - 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) { - // Toggle numlock as needed - if (usb_led & (1<. #define C4_AUDIO #define AUDIO_CLICKY +#define LED_NUM_LOCK_PIN B4 +#define LED_CAPS_LOCK_PIN B5 +#define LED_SCROLL_LOCK_PIN B6 + /* number of backlight levels */ // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/qmk/keyboards/clueboard/60/.noci b/qmk/keyboards/clueboard/60/.noci new file mode 100644 index 00000000..e69de29b diff --git a/qmk/keyboards/clueboard/60/config.h b/qmk/keyboards/clueboard/60/config.h index f0e157ff..3f54d0a9 100644 --- a/qmk/keyboards/clueboard/60/config.h +++ b/qmk/keyboards/clueboard/60/config.h @@ -121,6 +121,8 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Backlight configuration +#define LED_CAPS_LOCK_PIN B7 + +/* Backlight configuration */ #define BACKLIGHT_LEVELS 1 diff --git a/qmk/keyboards/clueboard/60/led.c b/qmk/keyboards/clueboard/60/led.c index 91a2c537..ad11ad5d 100644 --- a/qmk/keyboards/clueboard/60/led.c +++ b/qmk/keyboards/clueboard/60/led.c @@ -15,9 +15,8 @@ * along with this program. If not, see . */ -#include "hal.h" -#include "led.h" -#include "printf.h" +#include +#include "print.h" #ifdef BACKLIGHT_ENABLE #include "backlight.h" @@ -40,14 +39,3 @@ void backlight_set(uint8_t level) { } } #endif - -void led_set_kb(uint8_t usb_led) { - printf("led_set_kb(%d)\n", usb_led); - if (usb_led & (1< -#include "backlight.h" #include "print.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) { - matrix_scan_user(); -} - void backlight_init_ports(void) { print("init_backlight_pin()\n"); // Set our LED pins as output @@ -41,19 +27,3 @@ void backlight_set(uint8_t level) { PORTD &= ~(1<<4); // Arrows } } - -void led_init_ports() { - // * Set our LED pins as output - DDRB |= (1<<4); -} - -void led_set_kb(uint8_t usb_led) { - DDRB |= (1<<4); - if (usb_led & (1< -#include "backlight.h" #include "print.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) { - matrix_scan_user(); -} - void backlight_init_ports(void) { print("init_backlight_pin()\n"); // Set our LED pins as output @@ -41,19 +27,3 @@ void backlight_set(uint8_t level) { PORTD &= ~(1<<4); // Arrows } } - -void led_init_ports() { - // * Set our LED pins as output - DDRB |= (1<<4); -} - -void led_set_kb(uint8_t usb_led) { - DDRB |= (1<<4); - if (usb_led & (1</tmk_core/tool/chibios/ch-bootloader-jump.patch */ #define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 diff --git a/qmk/keyboards/clueboard/66_hotswap/gen1/rules.mk b/qmk/keyboards/clueboard/66_hotswap/gen1/rules.mk index c0132684..48740725 100644 --- a/qmk/keyboards/clueboard/66_hotswap/gen1/rules.mk +++ b/qmk/keyboards/clueboard/66_hotswap/gen1/rules.mk @@ -2,7 +2,8 @@ MCU = STM32F303 # LED Configuration -LED_MATRIX_ENABLE = IS31FL3731 +LED_MATRIX_ENABLE = yes +LED_MATRIX_DRIVER = IS31FL3731 # Build Options # comment out to disable the options. @@ -15,10 +16,7 @@ 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 AUDIO_ENABLE = yes # SERIAL_LINK_ENABLE = yes -# project specific files -SRC = led.c LAYOUTS = 66_ansi diff --git a/qmk/keyboards/clueboard/66_hotswap/prototype/.noci b/qmk/keyboards/clueboard/66_hotswap/prototype/.noci new file mode 100644 index 00000000..e69de29b diff --git a/qmk/keyboards/clueboard/66_hotswap/prototype/config.h b/qmk/keyboards/clueboard/66_hotswap/prototype/config.h index 7679d08e..f6ab6ba5 100644 --- a/qmk/keyboards/clueboard/66_hotswap/prototype/config.h +++ b/qmk/keyboards/clueboard/66_hotswap/prototype/config.h @@ -32,6 +32,8 @@ */ #define NO_ACTION_TAPPING +#define LED_CAPS_LOCK_PIN B4 + /* Backlight configuration */ #define BACKLIGHT_LEVELS 1 diff --git a/qmk/keyboards/clueboard/66_hotswap/prototype/prototype.c b/qmk/keyboards/clueboard/66_hotswap/prototype/prototype.c index 7c307be6..4ce3dd65 100644 --- a/qmk/keyboards/clueboard/66_hotswap/prototype/prototype.c +++ b/qmk/keyboards/clueboard/66_hotswap/prototype/prototype.c @@ -1,20 +1,6 @@ #include "prototype.h" -#include -#include "backlight.h" #include "print.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) { - matrix_scan_user(); -} - void backlight_init_ports(void) { print("init_backlight_pin()\n"); // Set our LED pins as output @@ -41,19 +27,3 @@ void backlight_set(uint8_t level) { PORTD &= ~(1<<1); // Arrows } } - -void led_init_ports() { - // * Set our LED pins as output - DDRB |= (1<<4); -} - -void led_set_kb(uint8_t usb_led) { - DDRB |= (1<<4); - if (usb_led & (1< #ifndef LED_H #define LED_H -#include "stdint.h" +#include /* keyboard LEDs */ diff --git a/qmk/keyboards/converter/hp_46010a/matrix.c b/qmk/keyboards/converter/hp_46010a/matrix.c index ac922408..72a09874 100644 --- a/qmk/keyboards/converter/hp_46010a/matrix.c +++ b/qmk/keyboards/converter/hp_46010a/matrix.c @@ -29,7 +29,7 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" #include "timer.h" -#include "LUFA/Drivers/Peripheral/SPI.h" +#include #include "config.h" diff --git a/qmk/keyboards/converter/ibm_terminal/led.c b/qmk/keyboards/converter/ibm_terminal/led.c index e448e84e..e0f31ee4 100644 --- a/qmk/keyboards/converter/ibm_terminal/led.c +++ b/qmk/keyboards/converter/ibm_terminal/led.c @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "stdint.h" +#include #include "ps2.h" #include "led.h" diff --git a/qmk/keyboards/converter/siemens_tastatur/matrix.c b/qmk/keyboards/converter/siemens_tastatur/matrix.c index 9fcfe9fd..2da4e33d 100644 --- a/qmk/keyboards/converter/siemens_tastatur/matrix.c +++ b/qmk/keyboards/converter/siemens_tastatur/matrix.c @@ -22,8 +22,8 @@ along with this program. If not, see . #include "wait.h" #include "print.h" #include "matrix.h" -#include "ch.h" -#include "hal.h" +#include +#include static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; diff --git a/qmk/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk b/qmk/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk index fcb7b9ea..36b7ba9c 100644 --- a/qmk/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk +++ b/qmk/keyboards/coseyfannitutti/discipad/keymaps/via/rules.mk @@ -1,3 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -MOUSEKEY_ENABLE = no diff --git a/qmk/keyboards/coseyfannitutti/discipline/keymaps/brandonschlack/keymap.c b/qmk/keyboards/coseyfannitutti/discipline/keymaps/brandonschlack/keymap.c new file mode 100644 index 00000000..4c63a3e1 --- /dev/null +++ b/qmk/keyboards/coseyfannitutti/discipline/keymaps/brandonschlack/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2019 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │Esc│! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│_ -│+ =│ Bckspc│Hom│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │{ [│} ]│| \│PgU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │HyCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │: ;│" '│ Enter│PgD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│? /│ Shift│ Up│End│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┤ + * │Ctrl│ Opt│ Cmd│ Space │ Cmd │FnPly│Lef│Dow│Rig│ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘ + */ +[_BASE] = LAYOUT_65_ansi_2_right_mods( \ + 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, \ + HY_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_LOPT, KC_LCMD, KC_SPC, KC_RCMD, PLY_FN1, KC_LEFT, KC_DOWN, KC_RGHT \ +), +/* Function Layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │` ~│ F1│ F2│ F3│ F4│ F5│ F6│ F7│ F8│ F9│F10│F11│F12│ Del │SlD│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │F13│F14│F15│ LHP │VlU│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │VlD│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │RST│ │Mke│Prv│Nxt│Ply│ │PgU│Mut│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┴┬──┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴─────┴─────┴───┴───┴───┘ + */ +[_FN1] = LAYOUT_65_ansi_2_right_mods( \ + 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_DELT, MC_SLPD, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F13, KC_F14, KC_F15, MC_LHPD, KC_VOLU, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, \ + _______, _______, _______, _______, _______, RESET, _______, QM_MAKE, KC_MPRV, KC_MNXT, KC_MPLY, _______, KC_PGUP, KC_MUTE, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ +) +}; diff --git a/qmk/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk b/qmk/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk index fcb7b9ea..36b7ba9c 100644 --- a/qmk/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk +++ b/qmk/keyboards/coseyfannitutti/discipline/keymaps/via/rules.mk @@ -1,3 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -MOUSEKEY_ENABLE = no diff --git a/qmk/keyboards/coseyfannitutti/romeo/keymaps/brandonschlack/keymap.c b/qmk/keyboards/coseyfannitutti/romeo/keymaps/brandonschlack/keymap.c new file mode 100644 index 00000000..3be5d44e --- /dev/null +++ b/qmk/keyboards/coseyfannitutti/romeo/keymaps/brandonschlack/keymap.c @@ -0,0 +1,111 @@ +/* Copyright 2020 Brandon Schlack + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "brandonschlack.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Base Layer +* ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +* │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Bspc│ +* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +* │HyEsc │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Enter│ +* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ +* │Shift │ Z │ X │ C │ V │ B │ N │ M │< ,│> .│ ?/Sft│ +* ├────┬───┼───┼───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ +* │Ctrl│Opt│Cmd│ Space │ Cmd│Opt│ Lwr│ +* └────┴───┴───┴────────────────────────┴────┴───┴────┘ +*/ +[_BASE] = LAYOUT_ansi_40( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + HY_ESC, 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, SF_SLSH, \ + KC_LCTL, KC_LOPT, KC_LCMD, SPC_RAI, KC_RCMD, KC_ROPT, LOWER \ +), +/* Lower +* ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +* │Del │BrD│BrU│Msn│LHP│   │   │   │PgU│Hom│End│ SlpD│ +* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +* │HyCaps│Mut│VlU│NxW│PvT│Bck│Fwd│NxT│PgD│ ↑ │ Play│ +* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ +* │ │Prv│VlD│Nxt│1PX│1Ps│   │ ← │ ↓ │ → │ │ +* ├────┬───┼───┼───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ +* │ │ │ │ │ │ │ │ +* └────┴───┴───┴────────────────────────┴────┴───┴────┘ +*/ +[_LOWER] = LAYOUT_ansi_40( \ + KC_DELT, KC_BRMD, KC_BRMU, MC_MSSN, MC_LHPD, _______, _______, _______, KC_PGUP, KC_HOME, KC_END, MC_SLPD, \ + HY_CAPS, KC_MUTE, KC_VOLU, NXT_WIN, PRV_TAB, MC_BACK, MC_FWRD, NXT_TAB, KC_PGDN, KC_UP, KC_MPLY, \ + _______, KC_MPRV, KC_VOLD, KC_MNXT, PX_AFLL, OP_AFLL, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ +), +/* Raise +* ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +* │~ `  │! 1│@ 2│# 3│$ 4│% 5│^ 6│& 7│* 8│( 9│) 0│ │ +* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +* │     │ F1│ F2│ F3│ F4│ F5│ F6│_ -│+ =│: ;│ " '│ +* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ +* │ │ F7│ F8│ F9│F10│F11│F12│   │{ [│} ]│ |\Sft│ +* ├────┬───┼───┼───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ +* │ │ │ │ │    │   │    │ +* └────┴───┴───┴────────────────────────┴────┴───┴────┘ +*/ +[_RAISE] = LAYOUT_ansi_40( \ + KC_GRV, 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_F6, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_LBRC, KC_RBRC, SF_BSLS, \ + _______, _______, _______, _______, _______, _______, _______ \ +), +/* Adjust/Macro Layer +* ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +* │Make │   │   │EEP│RST│ │ │ │ │ │ │     │ +* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +* │ │ │ │ │ │ │ │ │ │ │ │ +* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ +* │ │ │ │ │ │ │ │ │ │ │ │ +* ├────┬───┼───┼───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ +* │ │ │ │ │ │ │ │ +* └────┴───┴───┴────────────────────────┴────┴───┴────┘ +*/ +[_ADJUST] = LAYOUT_ansi_40( \ + QM_MAKE, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ +) +/* Blank Layer +* ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ +* │ │ │ │ │ │ │ │ │ │ │ │ │ +* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ +* │ │ │ │ │ │ │ │ │ │ │ │ +* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬──────┤ +* │ │ │ │ │ │ │ │ │ │ │ │ +* ├────┬───┼───┼───┴───┴───┴───┴───┴───┴┬──┴─┬─┴─┬────┤ +* │ │ │ │ │ │ │ │ +* └────┴───┴───┴────────────────────────┴────┴───┴────┘ +*/ +/* +[BLANK] = LAYOUT_ansi_40( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ +) +*/ +}; + +layer_state_t layer_state_set_keymap(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/qmk/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk b/qmk/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk index fcb7b9ea..36b7ba9c 100644 --- a/qmk/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk +++ b/qmk/keyboards/coseyfannitutti/romeo/keymaps/via/rules.mk @@ -1,3 +1,2 @@ VIA_ENABLE = yes LTO_ENABLE = yes -MOUSEKEY_ENABLE = no diff --git a/qmk/keyboards/cospad/config.h b/qmk/keyboards/cospad/config.h index 8d2994b7..648fa29a 100644 --- a/qmk/keyboards/cospad/config.h +++ b/qmk/keyboards/cospad/config.h @@ -53,6 +53,9 @@ along with this program. If not, see . */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define LED_NUM_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + #define BACKLIGHT_PIN F7 // #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 diff --git a/qmk/keyboards/cospad/cospad.c b/qmk/keyboards/cospad/cospad.c index c1f3a704..e7772f29 100644 --- a/qmk/keyboards/cospad/cospad.c +++ b/qmk/keyboards/cospad/cospad.c @@ -14,19 +14,3 @@ * along with this program. If not, see . */ #include "cospad.h" - -void keyboard_pre_init_kb(void) { - led_init_ports(); - keyboard_pre_init_user(); -} - -void led_init_ports(void) { - setPinOutput(B2); -} - -bool led_update_kb(led_t led_state) { - if (led_update_user(led_state)) { - writePin(B2, !led_state.num_lock); - } - return true; -} diff --git a/qmk/keyboards/cozykeys/speedo/readme.md b/qmk/keyboards/cozykeys/speedo/readme.md new file mode 100644 index 00000000..e2193363 --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/readme.md @@ -0,0 +1,28 @@ +# Speedo + +![Speedo](http://assets.cozykeys.xyz/images/keyboards/speedo/speedo-v3.0-angle-led-front_1600x1600.png) + +- Keyboard Maintainer: [Paul Ewing](https://github.com/pcewing) +- Hardware Supported: Elite-C +- Hardware Availability: [Speedo Repository](https://github.com/cozykeys/speedo) + +Make example for this keyboard (after setting up your build environment): + + make cozykeys/speedo/v2:default # for Speedo v2 + make cozykeys/speedo/v3:default # for Speedo v3 + +Flashing example for this keyboard: + + make cozykeys/speedo/v2:default:flash # for Speedo v2 + make cozykeys/speedo/v3:default:flash # for Speedo v3 + +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). + +## Flashing the Firmware + +See the QMK docs for handwiring a keyboard; there is a section with +instructions on how to flash the *.hex* file to the Teensy 2.0 controller. diff --git a/qmk/keyboards/cozykeys/speedo/speedo.c b/qmk/keyboards/cozykeys/speedo/speedo.c new file mode 100644 index 00000000..852459f8 --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/speedo.c @@ -0,0 +1,17 @@ +/* +Copyright 2020 Paul Ewing + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "speedo.h" diff --git a/qmk/keyboards/cozykeys/speedo/speedo.h b/qmk/keyboards/cozykeys/speedo/speedo.h new file mode 100644 index 00000000..2a2adff4 --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/speedo.h @@ -0,0 +1,23 @@ +/* +Copyright 2020 Paul Ewing + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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_cozykeys_speedo_v2 + #include "v2.h" +#elif KEYBOARD_cozykeys_speedo_v3 + #include "v3.h" +#endif diff --git a/qmk/keyboards/cozykeys/speedo/v2/config.h b/qmk/keyboards/cozykeys/speedo/v2/config.h new file mode 100644 index 00000000..1ab81ed7 --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v2/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 Paul Ewing + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x1192 +#define DEVICE_VER 0x0002 +#define MANUFACTURER CozyKeys +#define PRODUCT Speedo + +// Key matrix size +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +// Keyboard Matrix Assignments +#define MATRIX_ROW_PINS { D1, D2, D3, C6, C7 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, D0, B7, B3, B2, B1, B0 } +#define UNUSED_PINS { D5, D4, D6, D7, B4 } +#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/qmk/keyboards/cozykeys/speedo/v2/info.json b/qmk/keyboards/cozykeys/speedo/v2/info.json new file mode 100644 index 00000000..714de357 --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v2/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "Speedo", + "url": "https://github.com/cozykeys/speedo", + "maintainer": "pcewing", + "width": 14, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "k01", "x": 0.693, "y": 0.0, "r": 10 }, + { "label": "k02", "x": 1.675, "y": 0.173, "r": 10 }, + { "label": "k03", "x": 2.685, "y": 0.191, "r": 10 }, + { "label": "k04", "x": 3.712, "y": 0.106, "r": 10 }, + { "label": "k05", "x": 4.64, "y": 0.589, "r": 10 }, + { "label": "k06", "x": 5.577, "y": 1.021, "r": 10 }, + { "label": "k07", "x": 7.571, "y": 1.021, "r": -10 }, + { "label": "k08", "x": 8.507, "y": 0.589, "r": -10 }, + { "label": "k09", "x": 9.435, "y": 0.106, "r": -10 }, + { "label": "k10", "x": 10.463, "y": 0.191, "r": -10 }, + { "label": "k11", "x": 11.472, "y": 0.173, "r": -10 }, + { "label": "k12", "x": 12.454, "y": 0.0, "r": -10 }, + { "label": "k13", "x": 0.52, "y": 0.982, "r": 10 }, + { "label": "k14", "x": 1.502, "y": 1.155, "r": 10 }, + { "label": "k15", "x": 2.511, "y": 1.174, "r": 10 }, + { "label": "k16", "x": 3.539, "y": 1.088, "r": 10 }, + { "label": "k17", "x": 4.467, "y": 1.572, "r": 10 }, + { "label": "k18", "x": 5.403, "y": 2.003, "r": 10 }, + { "label": "k19", "x": 6.574, "y": 2.559, "r": 0 }, + { "label": "k20", "x": 7.744, "y": 2.003, "r": -10 }, + { "label": "k21", "x": 8.681, "y": 1.572, "r": -10 }, + { "label": "k22", "x": 9.608, "y": 1.088, "r": -10 }, + { "label": "k23", "x": 10.636, "y": 1.174, "r": -10 }, + { "label": "k24", "x": 11.645, "y": 1.155, "r": -10 }, + { "label": "k25", "x": 12.628, "y": 0.982, "r": -10 }, + { "label": "k26", "x": 0.346, "y": 1.964, "r": 10 }, + { "label": "k27", "x": 1.329, "y": 2.138, "r": 10 }, + { "label": "k28", "x": 2.338, "y": 2.156, "r": 10 }, + { "label": "k29", "x": 3.366, "y": 2.07, "r": 10 }, + { "label": "k30", "x": 4.294, "y": 2.554, "r": 10 }, + { "label": "k31", "x": 5.23, "y": 2.986, "r": 10 }, + { "label": "k32", "x": 6.574, "y": 3.557, "r": 0 }, + { "label": "k33", "x": 7.917, "y": 2.986, "r": -10 }, + { "label": "k34", "x": 8.854, "y": 2.554, "r": -10 }, + { "label": "k35", "x": 9.781, "y": 2.07, "r": -10 }, + { "label": "k36", "x": 10.809, "y": 2.156, "r": -10 }, + { "label": "k37", "x": 11.819, "y": 2.138, "r": -10 }, + { "label": "k38", "x": 12.801, "y": 1.964, "r": -10 }, + { "label": "k39", "x": 0.173, "y": 2.947, "r": 10 }, + { "label": "k40", "x": 1.155, "y": 3.12, "r": 10 }, + { "label": "k41", "x": 2.165, "y": 3.138, "r": 10 }, + { "label": "k42", "x": 3.193, "y": 3.053, "r": 10 }, + { "label": "k43", "x": 4.12, "y": 3.536, "r": 10 }, + { "label": "k44", "x": 5.057, "y": 3.968, "r": 10 }, + { "label": "k45", "x": 6.075, "y": 4.554, "r": 0 }, + { "label": "k46", "x": 7.072, "y": 4.554, "r": 0 }, + { "label": "k47", "x": 8.09, "y": 3.968, "r": -10 }, + { "label": "k48", "x": 9.027, "y": 3.536, "r": -10 }, + { "label": "k49", "x": 9.954, "y": 3.053, "r": -10 }, + { "label": "k50", "x": 10.982, "y": 3.138, "r": -10 }, + { "label": "k51", "x": 11.992, "y": 3.12, "r": -10 }, + { "label": "k52", "x": 12.974, "y": 2.947, "r": -10 }, + { "label": "k53", "x": 0.0, "y": 3.929, "r": 10 }, + { "label": "k54", "x": 0.982, "y": 4.102, "r": 10 }, + { "label": "k55", "x": 1.992, "y": 4.12, "r": 10 }, + { "label": "k56", "x": 3.02, "y": 4.035, "r": 10 }, + { "label": "k57", "x": 3.947, "y": 4.518, "r": 10 }, + { "label": "k58", "x": 4.994, "y": 5.235, "r": 40 }, + { "label": "k59", "x": 5.753, "y": 6.064, "r": 55 }, + { "label": "k60", "x": 7.395, "y": 6.064, "r": -55 }, + { "label": "k61", "x": 8.154, "y": 5.235, "r": 40 }, + { "label": "k62", "x": 9.2, "y": 4.518, "r": -10 }, + { "label": "k63", "x": 10.128, "y": 4.035, "r": -10 }, + { "label": "k64", "x": 11.155, "y": 4.12, "r": -10 }, + { "label": "k65", "x": 12.165, "y": 4.102, "r": -10 }, + { "label": "k66", "x": 13.147, "y": 3.929, "r": -10 } + ] + } + } +} diff --git a/qmk/keyboards/cozykeys/speedo/v2/keymaps/default/keymap.c b/qmk/keyboards/cozykeys/speedo/v2/keymaps/default/keymap.c new file mode 100644 index 00000000..814aeb60 --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v2/keymaps/default/keymap.c @@ -0,0 +1,58 @@ +/* +Copyright 2020 Paul Ewing + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_DEFAULT, + LAYER_FN, + LAYER_RESET, + + __LAYER_COUNT, +}; + +#define FN MO(LAYER_FN) +#define TORST TO(LAYER_RESET) +#define TODFT TO(LAYER_DEFAULT) +#define TODO KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[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_UP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DOWN, 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_LEFT, KC_RGHT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, FN, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, FN, TODO, KC_RALT, KC_RGUI, KC_RCTL \ +), + +[LAYER_FN] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TORST, \ + _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, _______, KC_PGUP, KC_HOME, KC_END, _______, _______, _______, \ + KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_PAUS, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_INS, _______, _______, KC_PGDN, KC_LBRC, KC_RBRC, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +[LAYER_RESET] = LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, TODFT, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NO, KC_NO, 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/qmk/keyboards/cozykeys/speedo/v2/keymaps/default/readme.md b/qmk/keyboards/cozykeys/speedo/v2/keymaps/default/readme.md new file mode 100644 index 00000000..46d98fad --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v2/keymaps/default/readme.md @@ -0,0 +1 @@ +# CozyKeys Speedo v2 Default Keymap diff --git a/qmk/keyboards/cozykeys/speedo/v2/rules.mk b/qmk/keyboards/cozykeys/speedo/v2/rules.mk new file mode 100644 index 00000000..53127aaf --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v2/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = halfkay + +# 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/cozykeys/speedo/v2/v2.c b/qmk/keyboards/cozykeys/speedo/v2/v2.c new file mode 100644 index 00000000..1cab7521 --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v2/v2.c @@ -0,0 +1,17 @@ +/* +Copyright 2020 Paul Ewing + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "v2.h" diff --git a/qmk/keyboards/cozykeys/speedo/v2/v2.h b/qmk/keyboards/cozykeys/speedo/v2/v2.h new file mode 100644 index 00000000..295d6f8f --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v2/v2.h @@ -0,0 +1,36 @@ +/* +Copyright 2020 Paul Ewing + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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( \ + 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, k65, k66 \ +) \ +{ \ + { k01, k01, k03, k04, k05, k06, ___, ___, k07, k08, k09, k10, k11, k12 }, \ + { k13, k15, k15, k16, k17, k18, k19, ___, k20, k21, k22, k23, k24, k25 }, \ + { k26, k28, 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 } \ +} diff --git a/qmk/keyboards/cozykeys/speedo/v3/config.h b/qmk/keyboards/cozykeys/speedo/v3/config.h new file mode 100644 index 00000000..9928e91f --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v3/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2020 Paul Ewing + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x1192 +#define DEVICE_VER 0x0003 +#define MANUFACTURER CozyKeys +#define PRODUCT Speedo + +// Key matrix size +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +// Keyboard Matrix Assignments +#define MATRIX_ROW_PINS { F0, F1, C7, D5, B7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B6, B2, E6, D7, C6, D4, D0, D1 } +#define UNUSED_PINS { D2, D3, B0, B4 } +#define DIODE_DIRECTION COL2ROW + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN B5 +#define RGBLED_NUM 12 +#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 +#define RGBLIGHT_BREATHE_TABLE_SIZE 256 +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 +#define RGBLIGHT_EFFECT_BREATHE_MAX 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 diff --git a/qmk/keyboards/cozykeys/speedo/v3/info.json b/qmk/keyboards/cozykeys/speedo/v3/info.json new file mode 100644 index 00000000..079f5de4 --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v3/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "Speedo", + "url": "https://github.com/cozykeys/speedo", + "maintainer": "pcewing", + "width": 14, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + { "label": "k01", "x": 0.695, "y": 0, "r": 10 }, + { "label": "k02", "x": 1.679, "y": 0.174, "r": 10 }, + { "label": "k03", "x": 2.692, "y": 0.192, "r": 10 }, + { "label": "k04", "x": 3.722, "y": 0.107, "r": 10 }, + { "label": "k05", "x": 4.652, "y": 0.591, "r": 10 }, + { "label": "k06", "x": 5.591, "y": 1.023, "r": 10 }, + { "label": "k07", "x": 9.457, "y": 1.023, "r": -10 }, + { "label": "k08", "x": 10.396, "y": 0.591, "r": -10 }, + { "label": "k09", "x": 11.326, "y": 0.107, "r": -10 }, + { "label": "k10", "x": 12.356, "y": 0.192, "r": -10 }, + { "label": "k11", "x": 13.369, "y": 0.174, "r": -10 }, + { "label": "k12", "x": 14.353, "y": 0, "r": -10 }, + { "label": "k13", "x": 0.521, "y": 0.985, "r": 10 }, + { "label": "k14", "x": 1.506, "y": 1.158, "r": 10 }, + { "label": "k15", "x": 2.518, "y": 1.177, "r": 10 }, + { "label": "k16", "x": 3.548, "y": 1.092, "r": 10 }, + { "label": "k17", "x": 4.478, "y": 1.576, "r": 10 }, + { "label": "k18", "x": 5.418, "y": 2.008, "r": 10 }, + { "label": "k19", "x": 7.524, "y": 3.305, "r": 0 }, + { "label": "k20", "x": 9.63, "y": 2.008, "r": -10 }, + { "label": "k21", "x": 10.57, "y": 1.576, "r": -10 }, + { "label": "k22", "x": 11.5, "y": 1.092, "r": -10 }, + { "label": "k23", "x": 12.53, "y": 1.177, "r": -10 }, + { "label": "k24", "x": 13.542, "y": 1.158, "r": -10 }, + { "label": "k25", "x": 14.527, "y": 0.985, "r": -10 }, + { "label": "k26", "x": 0.347, "y": 1.97, "r": 10 }, + { "label": "k27", "x": 1.332, "y": 2.143, "r": 10 }, + { "label": "k28", "x": 2.344, "y": 2.162, "r": 10 }, + { "label": "k29", "x": 3.375, "y": 2.077, "r": 10 }, + { "label": "k30", "x": 4.305, "y": 2.561, "r": 10 }, + { "label": "k31", "x": 5.244, "y": 2.993, "r": 10 }, + { "label": "k32", "x": 6.524, "y": 3.805, "r": 0 }, + { "label": "k33", "x": 8.524, "y": 3.805, "r": 0 }, + { "label": "k34", "x": 9.804, "y": 2.993, "r": -10 }, + { "label": "k35", "x": 10.743, "y": 2.561, "r": -10 }, + { "label": "k36", "x": 11.673, "y": 2.077, "r": -10 }, + { "label": "k37", "x": 12.704, "y": 2.162, "r": -10 }, + { "label": "k38", "x": 13.716, "y": 2.143, "r": -10 }, + { "label": "k39", "x": 14.701, "y": 1.97, "r": -10 }, + { "label": "k40", "x": 0.174, "y": 2.954, "r": 10 }, + { "label": "k41", "x": 1.158, "y": 3.128, "r": 10 }, + { "label": "k42", "x": 2.171, "y": 3.147, "r": 10 }, + { "label": "k43", "x": 3.201, "y": 3.062, "r": 10 }, + { "label": "k44", "x": 4.131, "y": 3.546, "r": 10 }, + { "label": "k45", "x": 5.07, "y": 3.978, "r": 10 }, + { "label": "k46", "x": 7.524, "y": 4.305, "r": 0 }, + { "label": "k47", "x": 9.978, "y": 3.978, "r": -10 }, + { "label": "k48", "x": 10.917, "y": 3.546, "r": -10 }, + { "label": "k49", "x": 11.847, "y": 3.062, "r": -10 }, + { "label": "k50", "x": 12.877, "y": 3.147, "r": -10 }, + { "label": "k51", "x": 13.89, "y": 3.128, "r": -10 }, + { "label": "k52", "x": 14.874, "y": 2.954, "r": -10 }, + { "label": "k53", "x": 0, "y": 3.939, "r": 10 }, + { "label": "k54", "x": 0.985, "y": 4.113, "r": 10 }, + { "label": "k55", "x": 1.997, "y": 4.131, "r": 10 }, + { "label": "k56", "x": 3.027, "y": 4.047, "r": 10 }, + { "label": "k57", "x": 3.957, "y": 4.53, "r": 10 }, + { "label": "k58", "x": 4.897, "y": 4.963, "r": 10 }, + { "label": "k59", "x": 5.881, "y": 5.136, "r": 10 }, + { "label": "k60", "x": 9.166, "y": 5.136, "r": -10 }, + { "label": "k61", "x": 10.151, "y": 4.963, "r": -10 }, + { "label": "k62", "x": 11.09, "y": 4.53, "r": -10 }, + { "label": "k63", "x": 12.021, "y": 4.047, "r": -10 }, + { "label": "k64", "x": 13.051, "y": 4.131, "r": -10 }, + { "label": "k65", "x": 14.063, "y": 4.113, "r": -10 }, + { "label": "k66", "x": 15.048, "y": 3.939, "r": -10 } + ] + } + } +} diff --git a/qmk/keyboards/cozykeys/speedo/v3/keymaps/default/keymap.c b/qmk/keyboards/cozykeys/speedo/v3/keymaps/default/keymap.c new file mode 100644 index 00000000..4319bd18 --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v3/keymaps/default/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2020 Paul Ewing + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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_DEFAULT, + LAYER_FN, + + __LAYER_COUNT, +}; + +#define FN MO(LAYER_FN) + +#define RGB_N RGB_MOD // Rotate to next RGB mode +#define RGB_P RGB_RMOD // Rotate to next RGB mode + +const uint16_t PROGMEM keymaps[__LAYER_COUNT][MATRIX_ROWS][MATRIX_COLS] = { + +[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_UP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LEFT, KC_RGHT, 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_DOWN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_GRV, FN, KC_BSPC, KC_DEL, KC_ENT, KC_SPC, KC_LBRC, KC_RBRC, KC_RALT, KC_RGUI, KC_RCTL +), + +[LAYER_FN] = LAYOUT( + RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, RESET, + _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, RGB_TOG, _______, KC_GRV, KC_LBRC, KC_RBRC, _______, _______, + KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_INS, RGB_N, RGB_P, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_PAUS, RGB_M_P, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +}; diff --git a/qmk/keyboards/cozykeys/speedo/v3/keymaps/default/readme.md b/qmk/keyboards/cozykeys/speedo/v3/keymaps/default/readme.md new file mode 100644 index 00000000..a69d6f38 --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v3/keymaps/default/readme.md @@ -0,0 +1,10 @@ +# CozyKeys Speedo v3 Default Keymap + +## Default Layer + +![Default Layer](https://raw.githubusercontent.com/cozykeys/speedo/master/layout/speedo_layer_default.svg) + +## Function Layer + +![Function Layer](https://raw.githubusercontent.com/cozykeys/speedo/master/layout/speedo_layer_fn.svg) + diff --git a/qmk/keyboards/cozykeys/speedo/v3/rules.mk b/qmk/keyboards/cozykeys/speedo/v3/rules.mk new file mode 100644 index 00000000..15eb4da9 --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v3/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/qmk/keyboards/cozykeys/speedo/v3/v3.c b/qmk/keyboards/cozykeys/speedo/v3/v3.c new file mode 100644 index 00000000..f35be99e --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v3/v3.c @@ -0,0 +1,17 @@ +/* +Copyright 2020 Paul Ewing + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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" diff --git a/qmk/keyboards/cozykeys/speedo/v3/v3.h b/qmk/keyboards/cozykeys/speedo/v3/v3.h new file mode 100644 index 00000000..a8623c0f --- /dev/null +++ b/qmk/keyboards/cozykeys/speedo/v3/v3.h @@ -0,0 +1,36 @@ +/* +Copyright 2020 Paul Ewing + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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( \ + 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, k65, k66 \ +) \ +{ \ + { k01, k02, k03, k04, k05, k06, ___, ___, k07, k08, k09, k10, k11, k12 }, \ + { k13, k14, k15, k16, k17, k18, ___, ___, k20, k21, k22, k23, k24, k25 }, \ + { k26, k27, k28, k29, k30, k31, k32, k19, k34, k35, k36, k37, k38, k39 }, \ + { k40, k41, k42, k43, k44, k45, k46, k33, k47, k48, k49, k50, k51, k52 }, \ + { k53, k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, k64, k65, k66 } \ +} diff --git a/qmk/keyboards/crazy_keyboard_68/config.h b/qmk/keyboards/crazy_keyboard_68/config.h new file mode 100644 index 00000000..2558e757 --- /dev/null +++ b/qmk/keyboards/crazy_keyboard_68/config.h @@ -0,0 +1,146 @@ +/* +Copyright 2020 chent7 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 // by default from pcb +#define PRODUCT_ID 0x13DE +#define DEVICE_VER 0x0001 +#define MANUFACTURER chent7 +#define PRODUCT Crazy Keyboard 68 + +/* 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 { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, 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_LEVELS 3 +//#define BACKLIGHT_BREATHING + +#define RGB_DI_PIN F6 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 84 +# 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 useful 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 + +/* disable these deprecated features by default */ +#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/qmk/keyboards/crazy_keyboard_68/crazy_keyboard_68.c b/qmk/keyboards/crazy_keyboard_68/crazy_keyboard_68.c new file mode 100644 index 00000000..f4f8515b --- /dev/null +++ b/qmk/keyboards/crazy_keyboard_68/crazy_keyboard_68.c @@ -0,0 +1,36 @@ +/* Copyright 2020 chent7 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "crazy_keyboard_68.h" + +void matrix_init_kb(void) { + led_init_ports(); + + matrix_init_user(); +} + +void led_init_ports(void) { + // Caps lock pin + setPinOutput(B0); + writePinHigh(B0); +} + +bool led_update_kb(led_t led_state) { + if(led_update_user(led_state)) { + writePin(B0, !led_state.caps_lock); + } + return true; +} diff --git a/qmk/keyboards/crazy_keyboard_68/crazy_keyboard_68.h b/qmk/keyboards/crazy_keyboard_68/crazy_keyboard_68.h new file mode 100644 index 00000000..c253824b --- /dev/null +++ b/qmk/keyboards/crazy_keyboard_68/crazy_keyboard_68.h @@ -0,0 +1,57 @@ +/* Copyright 2020 chent7 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 XXX KC_NO + +/* Crazy Keyboard 68 (ANSI) layout + * ,----------------------------------------------------------------. + * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e | + * |----------------------------------------------------------------| + * | 10 | 11| 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 | 2e | + * |----------------------------------------------------------------| + * | 31 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e | + * |----------------------------------------------------------------| + * | 40 | 41 | 43 | 46 | 49| 4a| 4b| 4c| 4d| 4e | + * `----------------------------------------------------------------' + * + * 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_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, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ + k40, k41, k43, 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, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ + {XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ + {k40, k41, XXX, k43, XXX, XXX, k46, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \ +} diff --git a/qmk/keyboards/crazy_keyboard_68/info.json b/qmk/keyboards/crazy_keyboard_68/info.json new file mode 100644 index 00000000..fa9546a1 --- /dev/null +++ b/qmk/keyboards/crazy_keyboard_68/info.json @@ -0,0 +1,81 @@ +{ + "keyboard_name": "crazy_keyboard_68", + "url": "", + "maintainer": "chent7", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_65_ansi": { + "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, "w":2}, + {"label":"k0e", "x":15, "y":0}, + {"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":"k1e", "x":15, "y":1}, + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k22", "x":1.75, "y":2}, + {"label":"k23", "x":2.75, "y":2}, + {"label":"k24", "x":3.75, "y":2}, + {"label":"k25", "x":4.75, "y":2}, + {"label":"k26", "x":5.75, "y":2}, + {"label":"k27", "x":6.75, "y":2}, + {"label":"k28", "x":7.75, "y":2}, + {"label":"k29", "x":8.75, "y":2}, + {"label":"k2a", "x":9.75, "y":2}, + {"label":"k2b", "x":10.75, "y":2}, + {"label":"k2c", "x":11.75, "y":2}, + {"label":"k2d", "x":12.75, "y":2, "w":2.25}, + {"label":"k2e", "x":15, "y":2}, + {"label":"k31", "x":0, "y":3, "w":2.25}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3c", "x":12.25, "y":3, "w":1.75}, + {"label":"k3d", "x":14, "y":3}, + {"label":"k3e", "x":15, "y":3}, + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k43", "x":2.5, "y":4, "w":1.25}, + {"label":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k49", "x":10, "y":4}, + {"label":"k4a", "x":11, "y":4}, + {"label":"k4b", "x":12, "y":4}, + {"label":"k4c", "x":13, "y":4}, + {"label":"k4d", "x":14, "y":4}, + {"label":"k4e", "x":15, "y":4} + ] + } + } +} diff --git a/qmk/keyboards/crazy_keyboard_68/keymaps/default/keymap.c b/qmk/keyboards/crazy_keyboard_68/keymaps/default/keymap.c new file mode 100644 index 00000000..c41916fc --- /dev/null +++ b/qmk/keyboards/crazy_keyboard_68/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2020 chent7 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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] = { + /* Keymap _BASE: (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| [| ]| \ |PgUp| + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgDn| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|Del | + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt|Fn |Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ + [_BASE] = 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_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_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(_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* Keymap _BASE: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * | |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |Home| + * |----------------------------------------------------------------| + * | | | | | | | | | | |PSC|SLC|Pau| |End | + * |----------------------------------------------------------------| + * | |TOG|M_P|M_B|M_R|MSW|MSN|M_K|M_X|M_G|M_T| | |Ins | + * |----------------------------------------------------------------| + * | |MOD|HUI|HUD|SAI|SAD|VAI|VAD| | | | | | | + * |----------------------------------------------------------------| + * |Reset| | | | | | | | | | + * `----------------------------------------------------------------' + */ + [_FN] = 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_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, + _______, 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, _______, _______, KC_INS, + _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/qmk/keyboards/crazy_keyboard_68/keymaps/default/readme.md b/qmk/keyboards/crazy_keyboard_68/keymaps/default/readme.md new file mode 100644 index 00000000..21c72142 --- /dev/null +++ b/qmk/keyboards/crazy_keyboard_68/keymaps/default/readme.md @@ -0,0 +1,4 @@ +# The default keymap for crazy_keyboard_68 +``` +make crazy_keyboard_68:default +``` diff --git a/qmk/keyboards/crazy_keyboard_68/readme.md b/qmk/keyboards/crazy_keyboard_68/readme.md new file mode 100644 index 00000000..3afa9cc6 --- /dev/null +++ b/qmk/keyboards/crazy_keyboard_68/readme.md @@ -0,0 +1,25 @@ +# Crazy Keyboard 68 + +![Front View of Crazy Keyboard 68 PCB](https://i.imgur.com/0nTjDbU.jpg)\ +![Back View of Crazy Keyboard 68 PCB](https://i.imgur.com/gTpdux3.jpeg) + +Obscure 68% hotswap PCB sold on taobao, powered by ATM32U4. RGB key lighting and underglow requires self-soldering. + +* Keyboard Maintainer: [chent7](https://github.com/chent7) +* Hardware Supported: crazy keyboard 68 Standard +* Hardware Availability: [taobao.com](https://item.taobao.com/item.htm?spm=a1z09.2.0.0.19422e8dJUzj8d&id=605218560507) + +Make example for this keyboard (after setting up your build environment): + + make crazy_keyboard_68:default + +Flashing example for this keyboard: + + make crazy_keyboard_68:default:flash + +## Layouts + +### ANSI +![Default ANSI Layout](https://i.imgur.com/y1ZApvU.png) + +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/qmk/keyboards/crazy_keyboard_68/rules.mk b/qmk/keyboards/crazy_keyboard_68/rules.mk new file mode 100644 index 00000000..5a51c94e --- /dev/null +++ b/qmk/keyboards/crazy_keyboard_68/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +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 +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi diff --git a/qmk/keyboards/crkbd/keymaps/curry/rules.mk b/qmk/keyboards/crkbd/keymaps/curry/rules.mk index 7d35d5f0..a7533578 100644 --- a/qmk/keyboards/crkbd/keymaps/curry/rules.mk +++ b/qmk/keyboards/crkbd/keymaps/curry/rules.mk @@ -8,7 +8,7 @@ CONSOLE_ENABLE = no COMMAND_ENABLE = no RGBLIGHT_ENABLE = no -RGB_MATRIX_ENABLE = WS2812 +RGB_MATRIX_ENABLE = yes OLED_DRIVER_ENABLE = yes diff --git a/qmk/keyboards/crkbd/keymaps/default/config.h b/qmk/keyboards/crkbd/keymaps/default/config.h index 899fde00..937d67e2 100644 --- a/qmk/keyboards/crkbd/keymaps/default/config.h +++ b/qmk/keyboards/crkbd/keymaps/default/config.h @@ -28,8 +28,6 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define SSD1306OLED - #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD @@ -44,3 +42,5 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 #endif + +#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" \ No newline at end of file diff --git a/qmk/keyboards/crkbd/keymaps/default/keymap.c b/qmk/keyboards/crkbd/keymaps/default/keymap.c index a3a9d953..27e3c840 100644 --- a/qmk/keyboards/crkbd/keymaps/default/keymap.c +++ b/qmk/keyboards/crkbd/keymaps/default/keymap.c @@ -18,218 +18,157 @@ along with this program. If not, see . #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. -#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, -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_split_3x6_3( \ + [0] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - 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_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_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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ESC, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + KC_LGUI, MO(1), KC_SPC, KC_ENT, MO(2), KC_RALT //`--------------------------' `--------------------------' ), - [_LOWER] = LAYOUT_split_3x6_3( \ + [1] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - 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_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_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_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ - //`--------------------------' `--------------------------' - ), - - [_RAISE] = LAYOUT_split_3x6_3( \ - //,-----------------------------------------------------. ,-----------------------------------------------------. - 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 \ + KC_LGUI, _______, KC_SPC, KC_ENT, MO(3), KC_RALT //`--------------------------' `--------------------------' ), - [_ADJUST] = LAYOUT_split_3x6_3( \ + [2] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT \ + KC_LGUI, MO(3), KC_SPC, KC_ENT, _______, KC_RALT + //`--------------------------' `--------------------------' + ), + + [3] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + RESET, XXXXXXX, 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, _______, KC_SPC, KC_ENT, _______, KC_RALT //`--------------------------' `--------------------------' ) }; -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); +#ifdef OLED_DRIVER_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_master) { + return OLED_ROTATION_180; // flips the display 180 degrees if offhand } + return rotation; } -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 +#define L_BASE 0 +#define L_LOWER 2 +#define L_RAISE 4 +#define L_ADJUST 8 + +void oled_render_layer_state(void) { + oled_write_P(PSTR("Layer: "), false); + switch (layer_state) { + case L_BASE: + oled_write_ln_P(PSTR("Default"), false); + break; + case L_LOWER: + oled_write_ln_P(PSTR("Lower"), false); + break; + case L_RAISE: + oled_write_ln_P(PSTR("Raise"), false); + break; + case L_ADJUST: + case L_ADJUST|L_LOWER: + case L_ADJUST|L_RAISE: + case L_ADJUST|L_LOWER|L_RAISE: + oled_write_ln_P(PSTR("Adjust"), false); + break; + } } -//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); +char keylog_str[24] = {}; -// const char *read_mode_icon(bool swap); -// const char *read_host_led_state(void); -// void set_timelog(void); -// const char *read_timelog(void); +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 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 set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || + (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } + 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); } -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 oled_render_keylog(void) { + oled_write(keylog_str, false); } -void iota_gfx_task_user(void) { - struct CharacterMatrix matrix; - matrix_clear(&matrix); - matrix_render_user(&matrix); - matrix_update(&display, &matrix); +void render_bootmagic_status(bool status) { + /* Show Ctrl-Gui Swap options */ + static const char PROGMEM logo[][2][3] = { + {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, + {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, + }; + if (status) { + oled_write_ln_P(logo[0][0], false); + oled_write_ln_P(logo[0][1], false); + } else { + oled_write_ln_P(logo[1][0], false); + oled_write_ln_P(logo[1][1], false); + } +} + +void oled_render_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 oled_task_user(void) { + if (is_master) { + oled_render_layer_state(); + oled_render_keylog(); + } else { + oled_render_logo(); + } } -#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; } +#endif // OLED_DRIVER_ENABLE diff --git a/qmk/keyboards/crkbd/keymaps/default/rules.mk b/qmk/keyboards/crkbd/keymaps/default/rules.mk index f84e5b2a..9444b88d 100644 --- a/qmk/keyboards/crkbd/keymaps/default/rules.mk +++ b/qmk/keyboards/crkbd/keymaps/default/rules.mk @@ -1,10 +1 @@ - -# 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 \ +OLED_DRIVER_ENABLE = yes diff --git a/qmk/keyboards/crkbd/keymaps/dsanchezseco/rules.mk b/qmk/keyboards/crkbd/keymaps/dsanchezseco/rules.mk index 93a21f7b..0de80697 100644 --- a/qmk/keyboards/crkbd/keymaps/dsanchezseco/rules.mk +++ b/qmk/keyboards/crkbd/keymaps/dsanchezseco/rules.mk @@ -9,7 +9,7 @@ OLED_DRIVER_ENABLE = no EXTRAKEY_ENABLE = yes # enable LEDs -RGB_MATRIX_ENABLE = WS2812 +RGB_MATRIX_ENABLE = yes # using elite-c controllers BOOTLOADER = qmk-dfu diff --git a/qmk/keyboards/crkbd/keymaps/kidbrazil/rules.mk b/qmk/keyboards/crkbd/keymaps/kidbrazil/rules.mk index 244712cd..a6057a73 100644 --- a/qmk/keyboards/crkbd/keymaps/kidbrazil/rules.mk +++ b/qmk/keyboards/crkbd/keymaps/kidbrazil/rules.mk @@ -4,7 +4,7 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 MOUSEKEY_ENABLE = no RGBLIGHT_ENABLE = no -RGB_MATRIX_ENABLE = WS2812 +RGB_MATRIX_ENABLE = yes OLED_DRIVER_ENABLE = yes # If you want to change the display of OLED, you need to change here diff --git a/qmk/keyboards/crkbd/keymaps/madhatter/config.h b/qmk/keyboards/crkbd/keymaps/madhatter/config.h index 9a4d85df..899fde00 100644 --- a/qmk/keyboards/crkbd/keymaps/madhatter/config.h +++ b/qmk/keyboards/crkbd/keymaps/madhatter/config.h @@ -1,18 +1,46 @@ +/* +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 EE_HANDS +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS #define SSD1306OLED -#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 +#define USE_SERIAL_PD2 -#undef PRODUCT -#define PRODUCT MadHatter Hacked Corne Keyboard +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#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/qmk/keyboards/crkbd/keymaps/madhatter/keymap.c b/qmk/keyboards/crkbd/keymaps/madhatter/keymap.c index 9f52d3b5..57a522de 100644 --- a/qmk/keyboards/crkbd/keymaps/madhatter/keymap.c +++ b/qmk/keyboards/crkbd/keymaps/madhatter/keymap.c @@ -1,112 +1,96 @@ +/* +Copyright 2019 @foostan +Copyright 2020 Drashna Jaelre <@drashna> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 - -#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 - extern uint8_t is_master; enum corny_layers { - _QWERTY, - _LOWER, - _RAISE, - _ADJUST, + _QWERTY, + _LOWER, + _RAISE, + _ADJUST }; -enum custom_keycodes { +enum corny_keycodes { QWERTY = SAFE_RANGE, LOWER, RAISE, ADJUST, + BACKLIT, RGBRST }; -#define LY_LWR MO(_LOWER) -#define LY_RSE MO(_RAISE) - -#define KY_CESC LCTL_T(KC_ESC) +enum macro_keycodes { + KC_SAMPLEMACRO, +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( + [_QWERTY] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - 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_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_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_ENT, + 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_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT + KC_LCTL, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RCMD //`--------------------------' `--------------------------' ), - [_LOWER] = LAYOUT( + [_LOWER] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - 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_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, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT - //`--------------------------' `--------------------------' - ), - - [_RAISE] = 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, XXXXXXX, KC_PGUP, KC_HOME, KC_END,KC_PGDN, 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_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT + KC_TRNS, LOWER, KC_TRNS, KC_TRNS, RAISE, KC_TRNS //`--------------------------' `--------------------------' ), - [_ADJUST] = LAYOUT( + [_RAISE] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - RESET, KC_BTN1, KC_MS_U, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, + KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - XXXXXXX, RGBRST, EEP_RST, AG_TOGG, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LALT, LY_LWR, KC_LCMD, KC_SPC, LY_RSE, KC_ENT + KC_TRNS, LOWER, KC_BSPC, KC_TRNS, RAISE, KC_TRNS + //`--------------------------' `--------------------------' + ), + + [_ADJUST] = LAYOUT_split_3x6_3( + //,-----------------------------------------------------. ,-----------------------------------------------------. + XXXXXXX, 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, RESET, + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_TRNS, LOWER, KC_TRNS, KC_TRNS, RAISE, KC_TRNS //`--------------------------' `--------------------------' ) }; -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - int RGB_current_mode; // Setting ADJUST layer RGB back to default @@ -185,6 +169,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + break; case LOWER: if (record->event.pressed) { layer_on(_LOWER); @@ -210,6 +199,24 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { 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_get_mode(); + } + #endif + return false; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_get_mode(); + } + #endif + break; } return true; } diff --git a/qmk/keyboards/crkbd/keymaps/madhatter/rules.mk b/qmk/keyboards/crkbd/keymaps/madhatter/rules.mk index dfee5a0b..f84e5b2a 100644 --- a/qmk/keyboards/crkbd/keymaps/madhatter/rules.mk +++ b/qmk/keyboards/crkbd/keymaps/madhatter/rules.mk @@ -1,11 +1,10 @@ -BOOTLOADER = atmel-dfu # Elite-C - -MOUSEKEY_ENABLE = yes -RGBLIGHT_ENABLE = yes # 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/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/qmk/keyboards/crkbd/keymaps/ninjonas/rules.mk b/qmk/keyboards/crkbd/keymaps/ninjonas/rules.mk index 0c7fb3af..3c3bf923 100644 --- a/qmk/keyboards/crkbd/keymaps/ninjonas/rules.mk +++ b/qmk/keyboards/crkbd/keymaps/ninjonas/rules.mk @@ -1,4 +1,4 @@ -RGB_MATRIX_ENABLE = WS2812 +RGB_MATRIX_ENABLE = yes MOUSEKEY_ENABLE = no OLED_DRIVER_ENABLE = yes LTO_ENABLE = yes diff --git a/qmk/keyboards/crkbd/keymaps/rpbaptist/rules.mk b/qmk/keyboards/crkbd/keymaps/rpbaptist/rules.mk index dedd5753..623de8c9 100644 --- a/qmk/keyboards/crkbd/keymaps/rpbaptist/rules.mk +++ b/qmk/keyboards/crkbd/keymaps/rpbaptist/rules.mk @@ -21,7 +21,7 @@ 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 +RGB_MATRIX_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/qmk/keyboards/crkbd/keymaps/soundmonster/rules.mk b/qmk/keyboards/crkbd/keymaps/soundmonster/rules.mk index bf7a84eb..a73e6fe0 100644 --- a/qmk/keyboards/crkbd/keymaps/soundmonster/rules.mk +++ b/qmk/keyboards/crkbd/keymaps/soundmonster/rules.mk @@ -1,5 +1,5 @@ RGBLIGHT_ENABLE = no -RGB_MATRIX_ENABLE = WS2812 +RGB_MATRIX_ENABLE = yes MOUSEKEY_ENABLE = no NKRO_ENABLE = yes OLED_DRIVER_ENABLE = yes diff --git a/qmk/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h b/qmk/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h index 755abc7d..cce460a9 100644 --- a/qmk/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h +++ b/qmk/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h @@ -4,7 +4,7 @@ #include "quantum.h" #include "report.h" #include -#include "../../lib/lufa/LUFA/Drivers/Peripheral/SPI.h" +#include // Trackpad speed adjustments #define POINTER_SPEED_MULTIPLIER 2 diff --git a/qmk/keyboards/crkbd/readme.md b/qmk/keyboards/crkbd/readme.md index 5de3e3ae..1e5bfb39 100644 --- a/qmk/keyboards/crkbd/readme.md +++ b/qmk/keyboards/crkbd/readme.md @@ -27,7 +27,7 @@ In your keymap's `rules.mk` file, add the following: ```make RGBLIGHT_ENABLE = no -RGB_MATRIX_ENABLE = WS2812 +RGB_MATRIX_ENABLE = yes ``` And in your `config.h` file, add the following: diff --git a/qmk/keyboards/crkbd/rev1/common/common.c b/qmk/keyboards/crkbd/rev1/common/common.c index 5ea7347d..ddc0b5fe 100644 --- a/qmk/keyboards/crkbd/rev1/common/common.c +++ b/qmk/keyboards/crkbd/rev1/common/common.c @@ -17,5 +17,3 @@ along with this program. If not, see . */ #include "common.h" - -uint8_t is_master; diff --git a/qmk/keyboards/crkbd/rev1/common/common.h b/qmk/keyboards/crkbd/rev1/common/common.h index af1795f4..71779e2e 100644 --- a/qmk/keyboards/crkbd/rev1/common/common.h +++ b/qmk/keyboards/crkbd/rev1/common/common.h @@ -21,4 +21,4 @@ along with this program. If not, see . #include "rev1.h" #define has_usb() is_keyboard_master() -extern uint8_t is_master; +#define is_master is_keyboard_master() diff --git a/qmk/keyboards/crkbd/rev1/common/keymaps/via/keymap.c b/qmk/keyboards/crkbd/rev1/common/keymaps/via/keymap.c index a3b2e52c..ecd1f17a 100644 --- a/qmk/keyboards/crkbd/rev1/common/keymaps/via/keymap.c +++ b/qmk/keyboards/crkbd/rev1/common/keymaps/via/keymap.c @@ -19,7 +19,7 @@ along with this program. If not, see . #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_split_3x6_3( \ + [0] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [1] = LAYOUT_split_3x6_3( \ + [1] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -40,11 +40,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT\ + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT //`--------------------------' `--------------------------' ), - [2] = LAYOUT_split_3x6_3( \ + [2] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| @@ -56,15 +56,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`--------------------------' `--------------------------' ), - [3] = LAYOUT_split_3x6_3( \ + [3] = LAYOUT_split_3x6_3( //,-----------------------------------------------------. ,-----------------------------------------------------. - RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + RESET, XXXXXXX, 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_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,\ + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT\ + KC_LGUI, _______, KC_SPC, KC_ENT, _______, KC_RALT //`--------------------------' `--------------------------' ) }; @@ -83,30 +83,28 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { #define L_ADJUST 8 void oled_render_layer_state(void) { - oled_write_P("Layer: ", false); + oled_write_P(PSTR("Layer: "), false); switch (layer_state) { case L_BASE: - oled_write_ln_P("Default", false); + oled_write_ln_P(PSTR("Default"), false); break; case L_LOWER: - oled_write_ln_P("Lower", false); + oled_write_ln_P(PSTR("Lower"), false); break; case L_RAISE: - oled_write_ln_P("Raise", false); + oled_write_ln_P(PSTR("Raise"), false); break; case L_ADJUST: case L_ADJUST|L_LOWER: case L_ADJUST|L_RAISE: case L_ADJUST|L_LOWER|L_RAISE: - oled_write_ln_P("Adjust", false); + oled_write_ln_P(PSTR("Adjust"), false); break; } } 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', @@ -128,25 +126,11 @@ void set_keylog(uint16_t keycode, keyrecord_t *record) { 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++; } void oled_render_keylog(void) { oled_write(keylog_str, false); } -void oled_render_keylogs(void) { - oled_write(keylogs_str, false); -} void render_bootmagic_status(bool status) { /* Show Ctrl-Gui Swap options */ @@ -176,8 +160,6 @@ void oled_task_user(void) { if (is_master) { oled_render_layer_state(); oled_render_keylog(); - // oled_render_keylogs(); - // oled_renger_bootmagic_icon(keymap_config.swap_lalt_lgui); } else { oled_render_logo(); } @@ -186,7 +168,6 @@ void oled_task_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { set_keylog(keycode, record); - // set_timelog(); } return true; } diff --git a/qmk/keyboards/crkbd/rev1/legacy/config.h b/qmk/keyboards/crkbd/rev1/legacy/config.h index 9e367641..eae6f788 100644 --- a/qmk/keyboards/crkbd/rev1/legacy/config.h +++ b/qmk/keyboards/crkbd/rev1/legacy/config.h @@ -18,6 +18,6 @@ along with this program. If not, see . #pragma once -#include +#include "serial_config.h" #define PRODUCT Corne Keyboard Rev.1 (Legacy Split) diff --git a/qmk/keyboards/crkbd/rev1/legacy/legacy.h b/qmk/keyboards/crkbd/rev1/legacy/legacy.h index 6c6308e5..08dfcefb 100644 --- a/qmk/keyboards/crkbd/rev1/legacy/legacy.h +++ b/qmk/keyboards/crkbd/rev1/legacy/legacy.h @@ -19,3 +19,5 @@ along with this program. If not, see . #pragma once #include "rev1.h" + +extern uint8_t is_master; \ No newline at end of file diff --git a/qmk/keyboards/crkbd/rev1/legacy/split_scomm.c b/qmk/keyboards/crkbd/rev1/legacy/split_scomm.c index c14bb32a..eccf2f3d 100644 --- a/qmk/keyboards/crkbd/rev1/legacy/split_scomm.c +++ b/qmk/keyboards/crkbd/rev1/legacy/split_scomm.c @@ -23,7 +23,7 @@ along with this program. If not, see . #include #include #include -#include +#include "split_scomm.h" #include "serial.h" #ifdef CONSOLE_ENABLE #include "debug.h" diff --git a/qmk/keyboards/crkbd/rev1/legacy/ssd1306.h b/qmk/keyboards/crkbd/rev1/legacy/ssd1306.h new file mode 100644 index 00000000..11a3cc67 --- /dev/null +++ b/qmk/keyboards/crkbd/rev1/legacy/ssd1306.h @@ -0,0 +1,90 @@ +#pragma once + +#include +#include +#include "action.h" + +enum ssd1306_cmds { + DisplayOff = 0xAE, + DisplayOn = 0xAF, + + 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, + + SetMemoryMode = 0x20, + ColumnAddr = 0x21, + PageAddr = 0x22, + + 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, +}; + +// Controls the SSD1306 128x32 OLED display via i2c + +#ifndef SSD1306_ADDRESS +#define SSD1306_ADDRESS 0x3C +#endif + +#define DisplayHeight 32 +#define DisplayWidth 128 + +#define FontHeight 8 +#define FontWidth 6 + +#define MatrixRows (DisplayHeight / FontHeight) +#define MatrixCols (DisplayWidth / FontWidth) + +struct CharacterMatrix { + uint8_t display[MatrixRows][MatrixCols]; + uint8_t *cursor; + bool dirty; +}; + +extern struct CharacterMatrix display; + +bool iota_gfx_init(bool rotate); +void iota_gfx_task(void); +bool iota_gfx_off(void); +bool iota_gfx_on(void); +void iota_gfx_flush(void); +void iota_gfx_write_char(uint8_t c); +void iota_gfx_write(const char *data); +void iota_gfx_write_P(const char *data); +void iota_gfx_clear_screen(void); + +void iota_gfx_task_user(void); + +void matrix_clear(struct CharacterMatrix *matrix); +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write(struct CharacterMatrix *matrix, const char *data); +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); +void matrix_write_P(struct CharacterMatrix *matrix, const char *data); +void matrix_render(struct CharacterMatrix *matrix); + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record); diff --git a/qmk/keyboards/crkbd/rev1/rev1.c b/qmk/keyboards/crkbd/rev1/rev1.c index 5e4e6560..f2df8942 100644 --- a/qmk/keyboards/crkbd/rev1/rev1.c +++ b/qmk/keyboards/crkbd/rev1/rev1.c @@ -87,10 +87,6 @@ led_config_t g_led_config = { { void matrix_init_kb(void) { -#ifdef KEYBOARD_crkbd_rev1_common - is_master = (uint8_t)is_keyboard_master(); -#endif - #ifdef RGB_MATRIX_ENABLE if (!isLeftHand) { g_led_config = (led_config_t){ { diff --git a/qmk/keyboards/crkbd/rev1/rev1.h b/qmk/keyboards/crkbd/rev1/rev1.h index ce88068e..c805efcc 100644 --- a/qmk/keyboards/crkbd/rev1/rev1.h +++ b/qmk/keyboards/crkbd/rev1/rev1.h @@ -18,8 +18,6 @@ along with this program. If not, see . #pragma once -extern uint8_t is_master; - #include "crkbd.h" #if defined(KEYBOARD_crkbd_rev1_legacy) # include "legacy.h" diff --git a/qmk/keyboards/crkbd/rules.mk b/qmk/keyboards/crkbd/rules.mk index 30de5b38..adbbf016 100644 --- a/qmk/keyboards/crkbd/rules.mk +++ b/qmk/keyboards/crkbd/rules.mk @@ -27,6 +27,8 @@ 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. +RGB_MATRIX_ENABLE = no +RGB_MATRIX_DRIVER = 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 diff --git a/qmk/keyboards/cu75/cu75.c b/qmk/keyboards/cu75/cu75.c index 60c92b70..80941df3 100644 --- a/qmk/keyboards/cu75/cu75.c +++ b/qmk/keyboards/cu75/cu75.c @@ -10,7 +10,7 @@ #ifdef AUDIO_ENABLE float test_sound[][2] = SONG(STARTUP_SOUND); -#include