diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index c17a04a54..351c3ff99 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -31,12 +31,12 @@ jobs: output: ' ' fileOutput: ' ' - - name: Run qmk cformat and qmk pyformat + - name: Run qmk format-c and qmk format-python shell: 'bash {0}' run: | - qmk cformat --core-only -n $(< ~/files.txt) - cformat_exit=$? - qmk pyformat -n - pyformat_exit=$? + qmk format-c --core-only -n $(< ~/files.txt) + format_c_exit=$? + qmk format-python -n + format_python_exit=$? - exit $((cformat_exit + pyformat_exit)) + exit $((format_c_exit + format_python_exit)) diff --git a/.gitignore b/.gitignore index b30b87ba1..f3b76f7ed 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,6 @@ api_data/v1 doxygen/ quantum/version.h -!quantum/tools/eeprom_reset.hex *.bin *.eep *.hex diff --git a/Makefile b/Makefile index f91d95a12..bb2201e85 100644 --- a/Makefile +++ b/Makefile @@ -557,29 +557,14 @@ git-submodule: git submodule sync --recursive git submodule update --init --recursive --progress +# Generate the version.h file +ifdef SKIP_GIT +VERSION_H_FLAGS := --skip-git +endif ifdef SKIP_VERSION +VERSION_H_FLAGS := --skip-all SKIP_GIT := yes endif - -# Generate the version.h file -ifndef SKIP_GIT - GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") - CHIBIOS_VERSION := $(shell cd lib/chibios && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") - CHIBIOS_CONTRIB_VERSION := $(shell cd lib/chibios-contrib && git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") -else - GIT_VERSION := NA - CHIBIOS_VERSION := NA - CHIBIOS_CONTRIB_VERSION := NA -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) +$(shell $(QMK_BIN) generate-version-h $(VERSION_H_FLAGS) -q -o quantum/version.h) include $(ROOT_DIR)/testlist.mk diff --git a/Vagrantfile b/Vagrantfile index adb93a3ce..8125b0589 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -6,7 +6,7 @@ Vagrant.configure(2) do |config| config.vm.define "qmk_firmware" # VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit - config.vm.box = "generic/debian9" + config.vm.box = "generic/debian10" config.vm.synced_folder '.', '/vagrant' diff --git a/bootloader.mk b/bootloader.mk index 4f2d69d99..abdfd20fd 100644 --- a/bootloader.mk +++ b/bootloader.mk @@ -26,6 +26,7 @@ # atmel-dfu Atmel factory DFU # lufa-dfu LUFA DFU # qmk-dfu QMK DFU (LUFA + blinkenlight) +# qmk-hid QMK HID (LUFA + blinkenlight) # bootloadHID HIDBootFlash compatible (ATmega32A) # USBasp USBaspLoader (ATmega328P) # ARM: @@ -67,6 +68,11 @@ ifeq ($(strip $(BOOTLOADER)), qmk-dfu) BOOTLOADER_SIZE = 8192 endif endif +ifeq ($(strip $(BOOTLOADER)), qmk-hid) + OPT_DEFS += -DBOOTLOADER_QMK_HID + OPT_DEFS += -DBOOTLOADER_HID + BOOTLOADER_SIZE = 4096 +endif ifeq ($(strip $(BOOTLOADER)), halfkay) OPT_DEFS += -DBOOTLOADER_HALFKAY ifeq ($(strip $(MCU)), atmega32u4) diff --git a/build_json.mk b/build_json.mk index 8822be6a1..0c034eb2a 100644 --- a/build_json.mk +++ b/build_json.mk @@ -1,31 +1,17 @@ # Look for a json keymap file ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","") - KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5) else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","") - KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4) else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","") - KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3) else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","") - KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2) else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","") - KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) endif - -# Load the keymap-level rules.mk if exists -ifneq ("$(wildcard $(KEYMAP_PATH))", "") - -include $(KEYMAP_PATH)/rules.mk -endif - -# Generate the keymap.c -$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON) - $(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON) diff --git a/build_keyboard.mk b/build_keyboard.mk index 91a6c23b7..37fa6852f 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -23,6 +23,15 @@ KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE) # Force expansion TARGET := $(TARGET) +ifneq ($(FORCE_LAYOUT),) + TARGET := $(TARGET)_$(FORCE_LAYOUT) +endif + +# Object files and generated keymap directory +# To put object files in current directory, use a dot (.), do NOT make +# this an empty or blank macro! +KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET) + # For split boards we need to set a master half. MASTER ?= left ifdef master @@ -100,7 +109,7 @@ MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP) MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP) # Pull in rules from info.json -INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/rules.mk) +INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_rules.mk) include $(INFO_RULES_MK) # Check for keymap.json first, so we can regenerate keymap.c @@ -137,16 +146,35 @@ ifeq ("$(wildcard $(KEYMAP_PATH))", "") endif endif +# Have we found a keymap.json? +ifneq ("$(wildcard $(KEYMAP_JSON))", "") + KEYMAP_C := $(KEYMAP_OUTPUT)/src/keymap.c + KEYMAP_H := $(KEYMAP_OUTPUT)/src/config.h + + # Load the keymap-level rules.mk if exists + -include $(KEYMAP_PATH)/rules.mk + + # Load any rules.mk content from keymap.json + INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_OUTPUT)/src/rules.mk) + include $(INFO_RULES_MK) + +# Add rules to generate the keymap files - indentation here is important +$(KEYMAP_OUTPUT)/src/keymap.c: $(KEYMAP_JSON) + $(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON) + +$(KEYMAP_OUTPUT)/src/config.h: $(KEYMAP_JSON) + $(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_H) + +generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c + +endif + ifeq ($(strip $(CTPC)), yes) CONVERT_TO_PROTON_C=yes endif ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) - include platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk -endif - -ifneq ($(FORCE_LAYOUT),) - TARGET := $(TARGET)_$(FORCE_LAYOUT) + include platforms/chibios/boards/QMK_PROTON_C/convert_to_proton_c.mk endif include quantum/mcu_selection.mk @@ -232,6 +260,7 @@ ifdef MCU_FAMILY PLATFORM=CHIBIOS PLATFORM_KEY=chibios FIRMWARE_FORMAT?=bin + OPT_DEFS += -DMCU_$(MCU_FAMILY) else ifdef ARM_ATSAM PLATFORM=ARM_ATSAM PLATFORM_KEY=arm_atsam @@ -327,19 +356,19 @@ endif # Disable features that a keyboard doesn't support -include disable_features.mk -# Object files directory -# To put object files in current directory, use a dot (.), do NOT make -# this an empty or blank macro! -KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET) - ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","") CONFIG_H += $(KEYMAP_PATH)/config.h endif +ifneq ("$(KEYMAP_H)","") + CONFIG_H += $(KEYMAP_H) +endif # project specific files -SRC += $(KEYBOARD_SRC) \ +SRC += \ + $(KEYBOARD_SRC) \ $(KEYMAP_C) \ - $(QUANTUM_SRC) + $(QUANTUM_SRC) \ + $(QUANTUM_DIR)/main.c \ # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax @@ -374,6 +403,7 @@ ifneq ($(strip $(PROTOCOL)),) else include $(TMK_PATH)/protocol/$(PLATFORM_KEY).mk endif +-include $(TOP_DIR)/platforms/$(PLATFORM_KEY)/flash.mk # TODO: remove this bodge? PROJECT_DEFS := $(OPT_DEFS) diff --git a/build_layout.mk b/build_layout.mk index 4748ad483..b4b00793e 100644 --- a/build_layout.mk +++ b/build_layout.mk @@ -7,7 +7,6 @@ define SEARCH_LAYOUTS_REPO LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_JSON))","") -include $$(LAYOUT_KEYMAP_PATH)/rules.mk - KEYMAP_C := $(KEYBOARD_OUTPUT)/src/keymap.c KEYMAP_JSON := $$(LAYOUT_KEYMAP_JSON) KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH) else ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","") @@ -31,6 +30,3 @@ ifneq ($(FORCE_LAYOUT),) endif $(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS))) - -# Use rule from build_json.mk, but update prerequisite in case KEYMAP_JSON was updated -$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON) diff --git a/build_test.mk b/build_test.mk index 519c142c4..037577bf9 100644 --- a/build_test.mk +++ b/build_test.mk @@ -53,8 +53,10 @@ endif include common_features.mk include $(TMK_PATH)/common.mk +include $(QUANTUM_PATH)/debounce/tests/rules.mk include $(QUANTUM_PATH)/sequencer/tests/rules.mk include $(QUANTUM_PATH)/serial_link/tests/rules.mk +include $(TMK_PATH)/common/test/rules.mk ifneq ($(filter $(FULL_TESTS),$(TEST)),) include build_full_test.mk endif @@ -62,7 +64,7 @@ endif $(TEST)_SRC += \ tests/test_common/main.c \ $(LIB_PATH)/printf/printf.c \ - $(COMMON_DIR)/printf.c + $(QUANTUM_PATH)/logging/print.c $(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC) $(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC) diff --git a/common.mk b/common.mk index c13b5e276..8acea3937 100644 --- a/common.mk +++ b/common.mk @@ -12,6 +12,9 @@ QUANTUM_PATH = $(QUANTUM_DIR) DRIVER_DIR = drivers DRIVER_PATH = $(DRIVER_DIR) +PLATFORM_DIR = platforms +PLATFORM_PATH = $(PLATFORM_DIR) + BUILD_DIR := .build COMMON_VPATH := $(TOP_DIR) diff --git a/common_features.mk b/common_features.mk index 1a9fd46b5..c92f98ab7 100644 --- a/common_features.mk +++ b/common_features.mk @@ -20,8 +20,23 @@ QUANTUM_SRC += \ $(QUANTUM_DIR)/send_string.c \ $(QUANTUM_DIR)/bitwise.c \ $(QUANTUM_DIR)/led.c \ + $(QUANTUM_DIR)/action.c \ + $(QUANTUM_DIR)/action_layer.c \ + $(QUANTUM_DIR)/action_macro.c \ + $(QUANTUM_DIR)/action_tapping.c \ + $(QUANTUM_DIR)/action_util.c \ + $(QUANTUM_DIR)/eeconfig.c \ + $(QUANTUM_DIR)/keyboard.c \ $(QUANTUM_DIR)/keymap_common.c \ - $(QUANTUM_DIR)/keycode_config.c + $(QUANTUM_DIR)/keycode_config.c \ + $(QUANTUM_DIR)/logging/debug.c \ + $(QUANTUM_DIR)/logging/sendchar.c \ + +VPATH += $(QUANTUM_DIR)/logging +# Fall back to lib/printf if there is no platform provided print +ifeq ("$(wildcard $(TMK_PATH)/common/$(PLATFORM_KEY)/printf.mk)","") + include $(QUANTUM_PATH)/logging/print.mk +endif ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes) OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE @@ -102,13 +117,13 @@ endif ifeq ($(strip $(MOUSEKEY_ENABLE)), yes) OPT_DEFS += -DMOUSEKEY_ENABLE - OPT_DEFS += -DMOUSE_ENABLE + MOUSE_ENABLE := yes SRC += $(QUANTUM_DIR)/mousekey.c endif ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) OPT_DEFS += -DPOINTING_DEVICE_ENABLE - OPT_DEFS += -DMOUSE_ENABLE + MOUSE_ENABLE := yes SRC += $(QUANTUM_DIR)/pointing_device.c endif @@ -170,6 +185,7 @@ else else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),) OPT_DEFS += -DEEPROM_DRIVER COMMON_VPATH += $(DRIVER_PATH)/eeprom + COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom SRC += eeprom_driver.c eeprom_stm32_L0_L1.c else # This will effectively work the same as "transient" if not supported by the chip @@ -196,10 +212,11 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) ifeq ($(filter $(RGBLIGHT_DRIVER),$(VALID_RGBLIGHT_TYPES)),) $(error RGBLIGHT_DRIVER="$(RGBLIGHT_DRIVER)" is not a valid RGB type) else - POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h + COMMON_VPATH += $(QUANTUM_DIR)/rgblight + POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h OPT_DEFS += -DRGBLIGHT_ENABLE SRC += $(QUANTUM_DIR)/color.c - SRC += $(QUANTUM_DIR)/rgblight.c + SRC += $(QUANTUM_DIR)/rgblight/rgblight.c CIE1931_CURVE := yes RGB_KEYCODES_ENABLE := yes endif @@ -230,21 +247,25 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162)) # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines OPT_DEFS += -DLIB8_ATTINY endif + COMMON_VPATH += $(QUANTUM_DIR)/led_matrix + COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations + COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations/runners SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c - SRC += $(QUANTUM_DIR)/led_matrix.c - SRC += $(QUANTUM_DIR)/led_matrix_drivers.c + SRC += $(QUANTUM_DIR)/led_matrix/led_matrix.c + SRC += $(QUANTUM_DIR)/led_matrix/led_matrix_drivers.c + SRC += $(LIB_PATH)/lib8tion/lib8tion.c CIE1931_CURVE := yes ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731) OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE - COMMON_VPATH += $(DRIVER_PATH)/issi + COMMON_VPATH += $(DRIVER_PATH)/led/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 +VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),) @@ -255,36 +276,47 @@ ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162)) # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines OPT_DEFS += -DLIB8_ATTINY endif + COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix + COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations + COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners SRC += $(QUANTUM_DIR)/color.c - SRC += $(QUANTUM_DIR)/rgb_matrix.c - SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c + SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c + SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c + SRC += $(LIB_PATH)/lib8tion/lib8tion.c CIE1931_CURVE := yes RGB_KEYCODES_ENABLE := yes + ifeq ($(strip $(RGB_MATRIX_DRIVER)), AW20216) + OPT_DEFS += -DAW20216 -DSTM32_SPI -DHAL_USE_SPI=TRUE + COMMON_VPATH += $(DRIVER_PATH)/led + SRC += aw20216.c + QUANTUM_LIB_SRC += spi_master.c + endif + ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731) OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE - COMMON_VPATH += $(DRIVER_PATH)/issi + COMMON_VPATH += $(DRIVER_PATH)/led/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 + COMMON_VPATH += $(DRIVER_PATH)/led/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 + COMMON_VPATH += $(DRIVER_PATH)/led/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 + COMMON_VPATH += $(DRIVER_PATH)/led/issi SRC += is31fl3741.c QUANTUM_LIB_SRC += i2c_master.c endif @@ -342,11 +374,6 @@ ifeq ($(strip $(LCD_ENABLE)), yes) CIE1931_CURVE := yes endif -# backward compat -ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes) - BACKLIGHT_DRIVER := custom -endif - VALID_BACKLIGHT_TYPES := pwm timer software custom BACKLIGHT_ENABLE ?= no @@ -406,7 +433,7 @@ ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes) endif ifeq ($(strip $(APA102_DRIVER_REQUIRED)), yes) - COMMON_VPATH += $(DRIVER_PATH)/apa102 + COMMON_VPATH += $(DRIVER_PATH)/led SRC += apa102.c endif @@ -462,18 +489,15 @@ ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes) SRC += $(QUANTUM_DIR)/dip_switch.c endif -VALID_MAGIC_TYPES := yes full lite +VALID_MAGIC_TYPES := yes lite BOOTMAGIC_ENABLE ?= no ifneq ($(strip $(BOOTMAGIC_ENABLE)), no) ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),) $(error BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic) endif - ifneq ($(strip $(BOOTMAGIC_ENABLE)), full) + ifneq ($(strip $(BOOTMAGIC_ENABLE)), no) OPT_DEFS += -DBOOTMAGIC_LITE QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c - else - OPT_DEFS += -DBOOTMAGIC_ENABLE - QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_full.c endif endif COMMON_VPATH += $(QUANTUM_DIR)/bootmagic @@ -494,42 +518,31 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes) # if 'lite' then skip the actual matrix implementation ifneq ($(strip $(CUSTOM_MATRIX)), lite) # Include the standard or split matrix code if needed - ifeq ($(strip $(SPLIT_KEYBOARD)), yes) - QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c - else - QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c - endif + QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c endif endif -# Support for translating old names to new names: -ifeq ($(strip $(DEBOUNCE_TYPE)),sym_g) - DEBOUNCE_TYPE:=sym_defer_g -else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pk) - DEBOUNCE_TYPE:=sym_eager_pk -else ifeq ($(strip $(DEBOUNCE_TYPE)),sym_pk) - DEBOUNCE_TYPE:=sym_defer_pk -else ifeq ($(strip $(DEBOUNCE_TYPE)),eager_pr) - DEBOUNCE_TYPE:=sym_eager_pr -endif - -DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce # Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually. -DEBOUNCE_TYPE?= sym_defer_g +DEBOUNCE_TYPE ?= sym_defer_g ifneq ($(strip $(DEBOUNCE_TYPE)), custom) - QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c + QUANTUM_SRC += $(QUANTUM_DIR)/debounce/$(strip $(DEBOUNCE_TYPE)).c endif ifeq ($(strip $(SPLIT_KEYBOARD)), yes) POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h OPT_DEFS += -DSPLIT_KEYBOARD + CRC_ENABLE := yes # Include files used by all split keyboards QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_util.c # Determine which (if any) transport files are required ifneq ($(strip $(SPLIT_TRANSPORT)), custom) - QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/transport.c + QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c \ + $(QUANTUM_DIR)/split_common/transactions.c + + OPT_DEFS += -DSPLIT_COMMON_TRANSACTIONS + # 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) @@ -550,11 +563,17 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes) COMMON_VPATH += $(QUANTUM_PATH)/split_common endif +ifeq ($(strip $(CRC_ENABLE)), yes) + OPT_DEFS += -DCRC_ENABLE + SRC += crc.c +endif + HAPTIC_ENABLE ?= no ifneq ($(strip $(HAPTIC_ENABLE)),no) COMMON_VPATH += $(DRIVER_PATH)/haptic - SRC += haptic.c OPT_DEFS += -DHAPTIC_ENABLE + SRC += $(QUANTUM_DIR)/haptic.c + SRC += $(QUANTUM_DIR)/process_keycode/process_haptic.c endif ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), ) @@ -569,15 +588,33 @@ ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), ) endif ifeq ($(strip $(HD44780_ENABLE)), yes) - SRC += drivers/avr/hd44780.c + SRC += platforms/avr/drivers/hd44780.c OPT_DEFS += -DHD44780_ENABLE endif -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) - OPT_DEFS += -DOLED_DRIVER_ENABLE - COMMON_VPATH += $(DRIVER_PATH)/oled - QUANTUM_LIB_SRC += i2c_master.c - SRC += oled_driver.c +VALID_OLED_DRIVER_TYPES := SSD1306 custom +OLED_DRIVER ?= SSD1306 +ifeq ($(strip $(OLED_ENABLE)), yes) + ifeq ($(filter $(OLED_DRIVER),$(VALID_OLED_DRIVER_TYPES)),) + $(error OLED_DRIVER="$(OLED_DRIVER)" is not a valid OLED driver) + else + OPT_DEFS += -DOLED_ENABLE + COMMON_VPATH += $(DRIVER_PATH)/oled + + OPT_DEFS += -DOLED_DRIVER_$(strip $(shell echo $(OLED_DRIVER) | tr '[:lower:]' '[:upper:]')) + ifeq ($(strip $(OLED_DRIVER)), SSD1306) + SRC += ssd1306_sh1106.c + QUANTUM_LIB_SRC += i2c_master.c + endif + endif +endif + +ifeq ($(strip $(ST7565_ENABLE)), yes) + OPT_DEFS += -DST7565_ENABLE + COMMON_VPATH += $(DRIVER_PATH)/oled # For glcdfont.h + COMMON_VPATH += $(DRIVER_PATH)/lcd + QUANTUM_LIB_SRC += spi_master.c + SRC += st7565.c endif include $(DRIVER_PATH)/qwiic/qwiic.mk @@ -632,6 +669,11 @@ ifeq ($(strip $(COMBO_ENABLE)), yes) OPT_DEFS += -DCOMBO_ENABLE endif +ifeq ($(strip $(KEY_OVERRIDE_ENABLE)), yes) + SRC += $(QUANTUM_DIR)/process_keycode/process_key_override.c + OPT_DEFS += -DKEY_OVERRIDE_ENABLE +endif + ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c OPT_DEFS += -DTAP_DANCE_ENABLE @@ -671,6 +713,11 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), digital) OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE endif +DIGITIZER_ENABLE ?= no +ifneq ($(strip $(DIGITIZER_ENABLE)), no) + SRC += $(QUANTUM_DIR)/digitizer.c +endif + USBPD_ENABLE ?= no VALID_USBPD_DRIVER_TYPES = custom vendor USBPD_DRIVER ?= vendor diff --git a/data/mappings/info_config.json b/data/mappings/info_config.json index b949b1332..72bb0f4a1 100644 --- a/data/mappings/info_config.json +++ b/data/mappings/info_config.json @@ -1,21 +1,48 @@ -# This file maps keys between `config.h` and `info.json`. It is used by QMK +# This file maps keys between `config.h` and `info.json`. It is used by QMK # to correctly and consistently map back and forth between the two systems. { # Format: # : {"info_key": , ["value_type": ], ["to_json": ], ["to_c": ]} - # value_type: one of "array", "array.int", "int", "hex", "list", "mapping" + # value_type: one of "array", "array.int", "bool", "int", "hex", "list", "mapping" # to_json: Default `true`. Set to `false` to exclude this mapping from info.json # to_c: Default `true`. Set to `false` to exclude this mapping from config.h # warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places - "DEBOUNCE": {"info_key": "debounce", "value_type": "int"} + "AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"}, + "BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"}, + "BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"}, + "BACKLIGHT_PIN": {"info_key": "backlight.pin"}, + "COMBO_COUNT": {"info_key": "combo.count", "value_type": "int"}, + "COMBO_TERM": {"info_key": "combo.term", "value_type": "int"}, + "DEBOUNCE": {"info_key": "debounce", "value_type": "int"}, "DEVICE_VER": {"info_key": "usb.device_ver", "value_type": "hex"}, "DESCRIPTION": {"info_key": "keyboard_folder", "to_json": false}, "DIODE_DIRECTION": {"info_key": "diode_direction"}, + "FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "bool"}, + "DYNAMIC_KEYMAP_EEPROM_MAX_ADDR": {"info_key": "dynamic_keymap.eeprom_max_addr", "value_type": "int"}, + "DYNAMIC_KEYMAP_LAYER_COUNT": {"info_key": "dynamic_keymap.layer_count", "value_type": "int"}, + "IGNORE_MOD_TAP_INTERRUPT": {"info_key": "tapping.ignore_mod_tap_interrupt", "value_type": "bool"}, + "IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "tapping.ignore_mod_tap_interrupt_per_key", "value_type": "bool"}, "LAYOUTS": {"info_key": "layout_aliases", "value_type": "mapping"}, + "LEADER_PER_KEY_TIMING": {"info_key": "leader_key.timing", "value_type": "bool"}, + "LEADER_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "bool"}, + "LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"}, "LED_CAPS_LOCK_PIN": {"info_key": "indicators.caps_lock"}, "LED_NUM_LOCK_PIN": {"info_key": "indicators.num_lock"}, "LED_SCROLL_LOCK_PIN": {"info_key": "indicators.scroll_lock"}, "MANUFACTURER": {"info_key": "manufacturer"}, + "MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "bool"}, + "MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"}, + "MOUSEKEY_DELAY": {"info_key": "mousekey.delay", "value_type": "int"}, + "MOUSEKEY_INTERVAL": {"info_key": "mousekey.interval", "value_type": "int"}, + "MOUSEKEY_MAX_SPEED": {"info_key": "mousekey.max_speed", "value_type": "int"}, + "MOUSEKEY_TIME_TO_MAX": {"info_key": "mousekey.time_to_max", "value_type": "int"}, + "MOUSEKEY_WHEEL_DELAY": {"info_key": "mousekey.wheel_delay", "value_type": "int"}, + "ONESHOT_TIMEOUT": {"info_key": "oneshot.timeout", "value_type": "int"}, + "ONESHOT_TAP_TOGGLE": {"info_key": "oneshot.tap_toggle", "value_type": "int"}, + "PERMISSIVE_HOLD": {"info_key": "tapping.permissive_hold", "value_type": "bool"}, + "PERMISSIVE_HOLD_PER_KEY": {"info_key": "tapping.permissive_hold_per_key", "value_type": "bool"}, + "RETRO_TAPPING": {"info_key": "tapping.retro", "value_type": "bool"}, + "RETRO_TAPPING_PER_KEY": {"info_key": "tapping.retro_per_key", "value_type": "bool"}, "RGB_DI_PIN": {"info_key": "rgblight.pin"}, "RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"}, "RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"}, @@ -30,17 +57,40 @@ "RGBLIGHT_EFFECT_SNAKE": {"info_key": "rgblight.animations.snake", "value_type": "bool"}, "RGBLIGHT_EFFECT_STATIC_GRADIENT": {"info_key": "rgblight.animations.static_gradient", "value_type": "bool"}, "RGBLIGHT_EFFECT_TWINKLE": {"info_key": "rgblight.animations.twinkle"}, + "RGBLIGHT_LAYER_BLINK": {"info_key": "rgblight.layers.blink", "value_type": "bool"}, + "RGBLIGHT_LAYERS": {"info_key": "rgblight.layers.enabled", "value_type": "bool"}, + "RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF": {"info_key": "rgblight.layers.override_rgb", "value_type": "bool"}, "RGBLIGHT_LIMIT_VAL": {"info_key": "rgblight.max_brightness", "value_type": "int"}, + "RGBLIGHT_MAX_LAYERS": {"info_key": "rgblight.layers.max", "value_type": "int"}, "RGBLIGHT_HUE_STEP": {"info_key": "rgblight.hue_steps", "value_type": "int"}, "RGBLIGHT_SAT_STEP": {"info_key": "rgblight.saturation_steps", "value_type": "int"}, "RGBLIGHT_VAL_STEP": {"info_key": "rgblight.brightness_steps", "value_type": "int"}, "RGBLIGHT_SLEEP": {"info_key": "rgblight.sleep", "value_type": "bool"}, "RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"}, + "RGBW": {"info_key": "rgblight.rgbw", "value_type": "bool"}, "PRODUCT": {"info_key": "keyboard_folder", "to_json": false}, "PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex"}, "VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex"}, "QMK_ESC_OUTPUT": {"info_key": "qmk_lufa_bootloader.esc_output"}, "QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"}, + "QMK_KEYS_PER_SCAN": {"info_key": "qmk.keys_per_scan", "value_type": "int"}, "QMK_LED": {"info_key": "qmk_lufa_bootloader.led"}, - "QMK_SPEAKER": {"info_key": "qmk_lufa_bootloader.speaker"} + "QMK_SPEAKER": {"info_key": "qmk_lufa_bootloader.speaker"}, + "SPLIT_MODS_ENABLE": {"info_key": "split.transport.sync_modifiers", "value_type": "bool"}, + "SPLIT_TRANSPORT_MIRROR": {"info_key": "split.transport.sync_matrix_state", "value_type": "bool"}, + "SPLIT_USB_DETECT": {"info_key": "split.usb_detect.enabled", "value_type": "bool"}, + "SPLIT_USB_TIMEOUT": {"info_key": "split.usb_detect.timeout", "value_type": "int"}, + "SPLIT_USB_TIMEOUT_POLL": {"info_key": "split.usb_detect.polling_interval", "value_type": "int"}, + "SOFT_SERIAL_PIN": {"info_key": "split.soft_serial_pin"}, + "SOFT_SERIAL_SPEED": {"info_key": "split.soft_serial_speed"}, + "TAP_CODE_DELAY": {"info_key": "qmk.tap_keycode_delay", "value_type": "int"}, + "TAP_HOLD_CAPS_DELAY": {"info_key": "qmk.tap_capslock_delay", "value_type": "int"}, + "TAPPING_FORCE_HOLD": {"info_key": "tapping.force_hold", "value_type": "bool"}, + "TAPPING_FORCE_HOLD_PER_KEY": {"info_key": "tapping.force_hold_per_key", "value_type": "bool"}, + "TAPPING_TERM": {"info_key": "tapping.term", "value_type": "int"}, + "TAPPING_TERM_PER_KEY": {"info_key": "tapping.term_per_key", "value_type": "bool"}, + "TAPPING_TOGGLE": {"info_key": "tapping.toggle", "value_type": "int"}, + "USB_MAX_POWER_CONSUMPTION": {"info_key": "usb.max_power", "value_type": "int"}, + "USB_POLLING_INTERVAL_MS": {"info_key": "usb.polling_interval", "value_type": "int"}, + "USB_SUSPEND_WAKEUP_DELAY": {"info_key": "usb.suspend_wakeup_delay", "value_type": "int"}, } diff --git a/data/mappings/info_rules.json b/data/mappings/info_rules.json index 97f772c4d..aea67e04c 100644 --- a/data/mappings/info_rules.json +++ b/data/mappings/info_rules.json @@ -1,15 +1,25 @@ -# This file maps keys between `rules.mk` and `info.json`. It is used by QMK +# This file maps keys between `rules.mk` and `info.json`. It is used by QMK # to correctly and consistently map back and forth between the two systems. { # Format: # : {"info_key": , ["value_type": ], ["to_json": ], ["to_c": ]} - # value_type: one of "array", "array.int", "int", "list", "hex", "mapping" + # value_type: one of "array", "array.int", "bool", "int", "list", "hex", "mapping" # to_json: Default `true`. Set to `false` to exclude this mapping from info.json # to_c: Default `true`. Set to `false` to exclude this mapping from rules.mk # warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places "BOARD": {"info_key": "board"}, "BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false}, + "BLUETOOTH": {"info_key": "bluetooth.driver"}, + "FIRMWARE_FORMAT": {"info_key": "build.firmware_format"}, + "KEYBOARD_SHARED_EP": {"info_key": "usb.shared_endpoint.keyboard", "value_type": "bool"}, + "MOUSE_SHARED_EP": {"info_key": "usb.shared_endpoint.mouse", "value_type": "bool"}, "LAYOUTS": {"info_key": "community_layouts", "value_type": "list"}, "LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"}, + "LTO_ENABLE": {"info_key": "build.lto", "value_type": "bool"}, "MCU": {"info_key": "processor", "warn_duplicate": false}, + "MOUSEKEY_ENABLE": {"info_key": "mouse_key.enabled", "value_type": "bool"}, + "NO_USB_STARTUP_CHECK": {"info_key": "usb.no_startup_check", "value_type": "bool"}, + "SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"}, + "SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "value_type": "str", "to_c": false}, + "WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"} } diff --git a/data/mappings/keyboard_aliases.json b/data/mappings/keyboard_aliases.json index c205b5e13..60c91b1bf 100644 --- a/data/mappings/keyboard_aliases.json +++ b/data/mappings/keyboard_aliases.json @@ -11,6 +11,9 @@ '2_milk': { target: 'spaceman/2_milk' }, + 'aeboards/constellation': { + target: 'aeboards/constellation/rev1' + }, 'aeboards/ext65': { target: 'aeboards/ext65/rev1' }, @@ -38,9 +41,36 @@ 'atom47/rev3': { target: 'maartenwut/atom47/rev3' }, + bakeneko65: { + target: 'bakeneko65/rev2' + }, bear_face: { target: 'bear_face/v1' }, + bm16a: { + target: 'kprepublic/bm16a' + }, + bm16s: { + target: 'kprepublic/bm16s' + }, + bm40hsrgb: { + target: 'kprepublic/bm40hsrgb' + }, + bm43a: { + target: 'kprepublic/bm43a' + }, + bm60poker: { + target: 'kprepublic/bm60poker' + }, + bm60rgb: { + target: 'kprepublic/bm60rgb' + }, + bm60rgb_iso: { + target: 'kprepublic/bm60rgb_iso' + }, + bm68rgb: { + target: 'kprepublic/bm68rgb' + }, 'bpiphany/pegasushoof': { target: 'bpiphany/pegasushoof/2013' }, @@ -56,15 +86,27 @@ canoe: { target: 'percent/canoe' }, + 'clawsome/gamebuddy': { + target: 'clawsome/gamebuddy/v1_0' + }, 'cmm_studio/saka68': { target: 'cmm_studio/saka68/solder' }, + 'cospad': { + target: 'kprepublic/cospad' + }, 'crkbd/rev1/legacy': { target: 'crkbd/rev1' }, 'crkbd/rev1/common': { target: 'crkbd/rev1' }, + 'custommk/genesis': { + target: 'custommk/genesis/rev1' + }, + 'daisy': { + target: 'ktec/daisy' + }, 'doro67/multi': { layouts: { LAYOUT_ansi: 'LAYOUT_65_ansi_blocker' @@ -83,6 +125,9 @@ drakon: { target: 'jagdpietr/drakon' }, + 'durgod/k320': { + target: 'durgod/k3x0/k320' + }, 'dztech/dz60rgb': { target: 'dztech/dz60rgb/v1' }, @@ -95,9 +140,15 @@ 'dztech/dz65rgb': { target: 'dztech/dz65rgb/v1' }, + 'dztech/volcano660': { + target: 'ilumkb/volcano660' + }, eek: { target: 'eek/silk_down' }, + 'ergodone': { + target: 'ktec/ergodone' + }, ergoinu: { target: 'dm9records/ergoinu' }, @@ -107,9 +158,15 @@ gh60: { target: 'gh60/revc' }, + 'gmmk/pro': { + target: 'gmmk/pro/ansi' + }, 'handwired/ferris': { target: 'ferris/0_1' }, + 'handwired/p1800fl': { + target: 'team0110/p1800fl' + }, 'helix/pico/sc/back': { target: 'helix/pico/sc' }, @@ -158,6 +215,15 @@ LAYOUT: 'LAYOUT_all' } }, + 'jj40': { + target: 'kprepublic/jj40' + }, + 'jj4x4': { + target: 'kprepublic/jj4x4' + }, + 'jj50': { + target: 'kprepublic/jj50' + }, jones: { target: 'jones/v03_1' }, @@ -182,6 +248,12 @@ kudox: { target: 'kudox/rev1' }, + 'kyria': { + target: 'splitkb/kyria' + }, + 'lazydesigners/the60': { + target: 'lazydesigners/the60/rev1' + }, 'lfkeyboards/lfk78': { target: 'lfkeyboards/lfk78/revj' }, @@ -251,6 +323,9 @@ 'maartenwut/wonderland': { target: 'evyd13/wonderland' }, + 'matrix/m12og': { + target: 'matrix/m12og/rev1' + }, 'mechlovin/hannah910': { target: 'mechlovin/hannah910/rev1' }, @@ -266,6 +341,9 @@ 'mechlovin/hannah60rgb': { target: 'mechlovin/hannah60rgb/rev1' }, + 'mechlovin/hannah65/mechlovin9': { + target: 'mechlovin/mechlovin9/rev1' + }, 'melgeek/z70ultra': { target: 'melgeek/z70ultra/rev1' }, @@ -304,6 +382,9 @@ 'pancake/promicro': { target: 'spaceman/pancake/promicro' }, + 'peiorisboards/ixora': { + target: 'coarse/ixora' + }, 'percent/canoe': { layouts: { LAYOUT_iso: 'LAYOUT_65_iso_blocker' @@ -366,6 +447,9 @@ 'ramonimbao/herringbone': { target: 'ramonimbao/herringbone/v1' }, + 'ramonimbao/mona': { + target: 'ramonimbao/mona/v1' + }, 'rgbkb/pan': { target: 'rgbkb/pan/rev1/32a' }, @@ -387,6 +471,9 @@ speedo: { target: 'cozykeys/speedo/v2' }, + 'staryu': { + target: 'ktec/staryu' + }, stoutgat: { target: 'tkw/stoutgat/v1' }, @@ -405,10 +492,14 @@ 'tkw/stoutgat/v2': { target: 'tkw/stoutgat/v2/f411' }, + 'tokyo60': { + target: 'tokyokeyboard/tokyo60' + }, underscore33: { target: 'underscore33/rev1' }, vinta: { + target: 'coarse/vinta', layouts: { LAYOUT_67_ansi: 'LAYOUT_65_ansi_blocker' } @@ -422,6 +513,33 @@ 'whale/sk': { target: 'whale/sk/v3' }, + 'xd002': { + target: 'xiudi/xd002' + }, + 'xd004': { + target: 'xiudi/xd004' + }, + 'xd60': { + target: 'xiudi/xd60' + }, + 'xd68': { + target: 'xiudi/xd68' + }, + 'xd75': { + target: 'xiudi/xd75' + }, + 'xd84': { + target: 'xiudi/xd84' + }, + 'xd84pro': { + target: 'xiudi/xd84pro' + }, + 'xd87': { + target: 'xiudi/xd87' + }, + 'xd96': { + target: 'xiudi/xd96' + }, 'xelus/dawn60': { target: 'xelus/dawn60/rev1' }, diff --git a/data/schemas/api_keyboard.jsonschema b/data/schemas/api_keyboard.jsonschema index d570ee999..d638658a1 100644 --- a/data/schemas/api_keyboard.jsonschema +++ b/data/schemas/api_keyboard.jsonschema @@ -1,34 +1,22 @@ { + "$id": "qmk.api.keyboard.v1", "allOf": [ - { "$ref": "qmk.keyboard.v1" }, + {"$ref": "qmk.keyboard.v1"}, { - "$id": "qmk.api.keyboard.v1", - "keymaps": { - "type": "string" - }, - "parse_errors": { - "type": "array", - "items": { - "type": "string" - } - }, - "parse_warnings": { - "type": "array", - "items": { - "type": "string" - } - }, - "processor_type": { - "type": "string" - }, - "protocol": { - "type": "string" - }, - "keyboard_folder": { - "type": "string" - }, - "platform": { - "type": "string" + "properties": { + "keymaps": { + "type": "object", + "properties": { + "url": {"type": "string"} + } + + }, + "parse_errors": {"$ref": "qmk.definitions.v1#/string_array"}, + "parse_warnings": {"$ref": "qmk.definitions.v1#/string_array"}, + "processor_type": {"type": "string"}, + "protocol": {"type": "string"}, + "keyboard_folder": {"type": "string"}, + "platform": {"type": "string"} } } ] diff --git a/data/schemas/definitions.jsonschema b/data/schemas/definitions.jsonschema new file mode 100644 index 000000000..822f23707 --- /dev/null +++ b/data/schemas/definitions.jsonschema @@ -0,0 +1,107 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "qmk.definitions.v1", + "title": "Common definitions used across QMK's jsonschemas.", + "type": "object", + "boolean_array": { + "type": "object", + "additionalProperties": {"type": "boolean"} + }, + "filename": { + "type": "string", + "minLength": 1, + "pattern": "^[0-9a-z_]*$" + }, + "hex_number_2d": { + "type": "string", + "pattern": "^0x[0-9A-F]{2}$" + }, + "hex_number_4d": { + "type": "string", + "pattern": "^0x[0-9A-F]{4}$" + }, + "text_identifier": { + "type": "string", + "minLength": 1, + "maxLength": 250 + }, + "layout_macro": { + "oneOf": [ + { + "type": "string", + "enum": ["LAYOUT", "LAYOUT_planck_1x2uC"] + }, + { + "type": "string", + "pattern": "^LAYOUT_[0-9a-z_]*$" + } + ] + }, + "key_unit": { + "type": "number", + "min": 0.25 + }, + "mcu_pin_array": { + "type": "array", + "items": {"$ref": "#/mcu_pin"} + }, + "mcu_pin": { + "oneOf": [ + { + "type": "string", + "pattern": "^[A-K]\\d{1,2}$" + }, + { + "type": "string", + "pattern": "^LINE_PIN\\d{1,2}$" + }, + { + "type": "number", + "multipleOf": 1 + }, + { + "type": "null" + } + ] + }, + "signed_decimal": { + "type": "number" + }, + "signed_int": { + "type": "number", + "multipleOf": 1 + } + "signed_int_8": { + "type": "number", + "min": -127, + "max": 127, + "multipleOf": 1 + } + "string_array": { + "type": "array", + "items": { + "type": "string" + } + }, + "string_object": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "unsigned_decimal": { + "type": "number", + "min": 0 + }, + "unsigned_int": { + "type": "number", + "min": 0, + "multipleOf": 1 + } + "unsigned_int_8": { + "type": "number", + "min": 0, + "max": 255, + "multipleOf": 1 + } +} diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index c335f49d5..78c9a8d36 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -1,31 +1,53 @@ { - "$schema": "http://json-schema.org/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "$id": "qmk.keyboard.v1", "title": "Keyboard Information", "type": "object", "properties": { - "keyboard_name": { - "type": "string", - "minLength": 2, - "maxLength": 250 - }, - "maintainer": { - "type": "string", - "minLength": 2, - "maxLength": 250 - }, - "manufacturer": { - "type": "string", - "minLength": 2, - "maxLength": 250 - }, + "keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"}, + "maintainer": {"$ref": "qmk.definitions.v1#/text_identifier"}, + "manufacturer": {"$ref": "qmk.definitions.v1#/text_identifier"}, "url": { "type": "string", "format": "uri" }, "processor": { "type": "string", - "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] + "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F407", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] + }, + "audio": { + "type": "object", + "additionalProperties": false, + "properties": { + "pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, + "voices": {"type": "boolean"} + } + }, + "backlight": { + "type": "object", + "additionalProperties": false, + "properties": { + "breathing": {"type": "boolean"}, + "breathing_period": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "levels": { + "type": "number", + "min": 1, + "max": 31, + "multipleOf": 1 + }, + "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"} + } + }, + "bluetooth": { + "type": "object", + "additionalProperties": false, + "properties": { + "driver": { + "type": "string", + "enum": ["AdafruitBLE", "RN42"] + }, + "lto": {"type": "boolean"}, + } }, "board": { "type": "string", @@ -34,68 +56,55 @@ }, "bootloader": { "type": "string", - "enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "stm32-dfu", "stm32duino", "unknown", "USBasp", "tinyuf2"] + "enum": ["atmel-dfu", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "qmk-hid", "stm32-dfu", "stm32duino", "unknown", "USBasp", "tinyuf2"], + }, + "bootloader_instructions": { + "type": "string", + "description": "Instructions for putting the keyboard into a mode that allows for firmware flashing." + }, + "build": { + "type": "object", + "additionalProperties": false, + "properties": { + "debounce_type": { + "type": "string", + "enum": ["custom", "eager_pk", "eager_pr", "sym_defer_pk", "sym_eager_pk"] + }, + "firmware_format": { + "type": "string", + "enum": ["bin", "hex", "uf2"] + }, + "lto": {"type": "boolean"}, + } }, "diode_direction": { "type": "string", "enum": ["COL2ROW", "ROW2COL"] }, - "debounce": { - "type": "number", - "min": 0, - "multipleOf": 1 - }, - "height": { - "type": "number", - "min": 0.25 - }, - "width": { - "type": "number", - "min": 0.25 + "debounce": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "combo": { + "type": "object", + "properties": { + "count": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "term": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } }, "community_layouts": { "type": "array", - "items": { - "type": "string", - "minLength": 2, - "pattern": "^[0-9a-z_]*$" - } - }, - "features": { - "type": "object", - "additionalProperties": {"type": "boolean"} + "items": {"$ref": "qmk.definitions.v1#/filename"} }, + "features": {"$ref": "qmk.definitions.v1#/boolean_array"}, "indicators": { "type": "object", "properties": { - "caps_lock": { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" - }, - "num_lock": { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" - }, - "scroll_lock": { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" - } + "caps_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "num_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "scroll_lock": {"$ref": "qmk.definitions.v1#/mcu_pin"} } }, "layout_aliases": { "type": "object", - "additionalProperties": { - "oneOf": [ - { - "type": "string", - "enum": ["LAYOUT", "LAYOUT_planck_1x2uC"] - }, - { - "type": "string", - "pattern": "^LAYOUT_[0-9a-z_]*$" - } - ] - } + "additionalProperties": {"$ref": "qmk.definitions.v1#/layout_macro"} }, "layouts": { "type": "object", @@ -109,11 +118,7 @@ "c_macro": { "type": "boolean" }, - "key_count": { - "type": "number", - "min": 0, - "multipleOf": 1 - }, + "key_count": {"$ref": "qmk.definitions.v1#/key_unit"}, "layout": { "type": "array", "items": { @@ -131,101 +136,61 @@ "multipleOf": 1 } }, - "h": { - "type": "number", - "min": 0.25 - }, - "r": { - "type": "number", - "min": 0 - }, - "rx": { - "type": "number", - "min": 0 - }, - "ry": { - "type": "number", - "min": 0 - }, - "w": { - "type": "number", - "min": 0.25 - }, - "x": { - "type": "number", - "min": 0 - }, - "y": { - "type": "number", - "min": 0 - } + "key_count": {"$ref": "qmk.definitions.v1#/key_unit"}, + "r": {"$ref": "qmk.definitions.v1#/unsigned_decimal"}, + "rx": {"$ref": "qmk.definitions.v1#/unsigned_decimal"}, + "ry": {"$ref": "qmk.definitions.v1#/unsigned_decimal"}, + "h": {"$ref": "qmk.definitions.v1#/key_unit"}, + "w": {"$ref": "qmk.definitions.v1#/key_unit"}, + "x": {"$ref": "qmk.definitions.v1#/key_unit"}, + "y": {"$ref": "qmk.definitions.v1#/key_unit"} } } } } } }, + "leader_key": { + "type": "object", + "properties": { + "timing": {"type": "boolean"}, + "strict_processing": {"type": "boolean"}, + "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } + }, "matrix_pins": { "type": "object", "additionalProperties": false, "properties": { + "custom": {"type": "boolean"}, + "custom_lite": {"type": "boolean"}, + "ghost": {"type": "boolean"}, + "io_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "direct": { "type": "array", - "items": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" - }, - { - "type": "number", - "multipleOf": 1 - }, - { - "type": "null" - } - ] - } - } + "items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} }, - "cols": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" - }, - { - "type": "number", - "multipleOf": 1 - }, - { - "type": "null" - } - ] - } - }, - "rows": { - "type": "array", - "items": { - "oneOf": [ - { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" - }, - { - "type": "number", - "multipleOf": 1 - }, - { - "type": "null" - } - ] - } - } + "cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, + "rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, + "unused": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} + } + }, + "mouse_key": { + "type": "object", + "properties": { + "enabled": {"type": "boolean"}, + "delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} + "interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} + "max_speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} + "time_to_max": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} + "wheel_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"} + } + }, + "oneshot": { + "type": "object", + "properties": { + "tap_toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} } }, "rgblight": { @@ -238,88 +203,160 @@ "type": "boolean" } }, - "brightness_steps": { - "type": "number", - "min": 0, - "multipleOf": 1 - }, - "hue_steps": { - "type": "number", - "min": 0, - "multipleOf": 1 - }, - "led_count": { - "type": "number", - "min": 0, - "multipleOf": 1 - }, - "max_brightness": { - "type": "number", - "min": 0, - "max": 255, - "multipleOf": 1 - }, - "pin": { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" - }, - "saturation_steps": { - "type": "number", - "min": 0, - "multipleOf": 1 + "brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "hue_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "layers": { + "type": "object", + "additionalProperties": false, + "properties": { + "blink": {"type": "boolean"}, + "enabled": {"type": "boolean"}, + "max": { + "type": "number", + "min": 1, + "max": 32, + "multipleOf": 1 + }, + "override_rgb": {"type": "boolean"} + } }, + "led_count": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "max_brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "rgbw": {"type": "boolean"}, + "saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"}, "sleep": {"type": "boolean"}, "split": {"type": "boolean"}, "split_count": { "type": "array", "minLength": 2, "maxLength": 2, - "items": { - "type": "number", - "min": 0, - "multipleOf": 1 + "items": {"$ref": "qmk.definitions.v1#/unsigned_int"} + } + } + }, + "split": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": {"type": "boolean"}, + "matrix_grid": { + "type": "array", + "items": {"$ref": "qmk.definitions.v1#/mcu_pin"} + }, + "matrix_pins": { + "type": "object", + "additionalProperties": false, + "properties": { + "right": { + "type": "object", + "additionalProperties": false, + "properties": { + "direct": { + "type": "array", + "items": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} + }, + "cols": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, + "rows": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, + "unused": {"$ref": "qmk.definitions.v1#/mcu_pin_array"} + } + } + } + }, + "main": { + "type": "string", + "enum": ["eeprom", "left", "matrix_grid", "pin", "right"] + }, + "soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "soft_serial_speed": { + "type": "number", + "min": 0, + "max": 5, + "multipleOf": 1 + }, + "transport": { + "type": "object", + "additionalProperties": false, + "properties": { + "protocol": { + "type": "string", + "enum": ["custom", "i2c", "serial", "serial_usart"] + }, + "sync_matrix_state": {"type": "boolean"}, + "sync_modifiers": {"type": "boolean"} + } + }, + "usb_detect": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": {"type": "boolean"}, + "polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"} } } } }, + "tags": { + "type": "array", + "items": {"type": "string"} + }, + "tapping": { + "type": "object", + "properties": { + "force_hold": {"type": "boolean"}, + "force_hold_per_key": {"type": "boolean"}, + "ignore_mod_tap_interrupt": {"type": "boolean"}, + "ignore_mod_tap_interrupt_per_key": {"type": "boolean"}, + "permissive_hold": {"type": "boolean"}, + "permissive_hold_per_key": {"type": "boolean"}, + "retro": {"type": "boolean"}, + "retro_per_key": {"type": "boolean"}, + "term": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + "term_per_key": {"type": "boolean"}, + "toggle": {"$ref": "qmk.definitions.v1#/unsigned_int"}, + } + }, "usb": { "type": "object", "additionalProperties": false, "properties": { - "device_ver": { - "type": "string", - "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]" + "device_ver": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, + "force_nkro": {"type": "boolean"}, + "pid": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, + "vid": {"$ref": "qmk.definitions.v1#/hex_number_4d"}, + "max_power": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "no_startup_check": {"type": "boolean"}, + "polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "shared_endpoint": { + "type": "object", + "additionalProperties": false, + "properties": { + "keyboard": {"type": "boolean"}, + "mouse": {"type": "boolean"} + } }, - "pid": { - "type": "string", - "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]" - }, - "vid": { - "type": "string", - "pattern": "^[0-9A-F]x[0-9A-F][0-9A-F][0-9A-F][0-9A-F]" - } + "suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "wait_for": {"type": "boolean"}, + } + }, + "qmk": { + "type": "object", + "additionalProperties": false, + "properties": { + "keys_per_scan": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "tap_keycode_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, + "tap_capslock_delay": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}, } }, "qmk_lufa_bootloader": { "type": "object", "additionalProperties": false, "properties": { - "esc_output": { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" - }, - "esc_input": { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" - }, - "led": { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" - }, - "speaker": { - "type": "string", - "pattern": "^[A-K]\\d{1,2}$" - } + "esc_output": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "esc_input": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "led": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "speaker": {"$ref": "qmk.definitions.v1#/mcu_pin"} } } } diff --git a/data/schemas/keymap.jsonschema b/data/schemas/keymap.jsonschema new file mode 100644 index 000000000..a4bdab966 --- /dev/null +++ b/data/schemas/keymap.jsonschema @@ -0,0 +1,24 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "qmk.keymap.v1", + "title": "Keymap Information", + "type": "object", + "properties": { + "author": {"type": "string"}, + "keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"}, + "keymap": {"$ref": "qmk.definitions.v1#/text_identifier"}, + "layout": {"$ref": "qmk.definitions.v1#/layout_macro"}, + "layers": { + "type": "array", + "items": { + "type": "array", + "items": {"type": "string"} + } + }, + "config": {"$ref": "qmk.keyboard.v1"}, + "notes": { + "type": "string", + "description": "asdf" + } + } +} \ No newline at end of file diff --git a/quantum/template/avr/config.h b/data/templates/avr/config.h similarity index 100% rename from quantum/template/avr/config.h rename to data/templates/avr/config.h diff --git a/quantum/template/avr/readme.md b/data/templates/avr/readme.md similarity index 100% rename from quantum/template/avr/readme.md rename to data/templates/avr/readme.md diff --git a/data/templates/avr/rules.mk b/data/templates/avr/rules.mk new file mode 100644 index 000000000..62fbb3434 --- /dev/null +++ b/data/templates/avr/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 = yes # Enable Bootmagic Lite +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/quantum/template/base/info.json b/data/templates/base/info.json similarity index 100% rename from quantum/template/base/info.json rename to data/templates/base/info.json diff --git a/quantum/template/base/keyboard.c b/data/templates/base/keyboard.c similarity index 100% rename from quantum/template/base/keyboard.c rename to data/templates/base/keyboard.c diff --git a/quantum/template/base/keyboard.h b/data/templates/base/keyboard.h similarity index 100% rename from quantum/template/base/keyboard.h rename to data/templates/base/keyboard.h diff --git a/quantum/template/base/keymaps/default/keymap.c b/data/templates/base/keymaps/default/keymap.c similarity index 100% rename from quantum/template/base/keymaps/default/keymap.c rename to data/templates/base/keymaps/default/keymap.c diff --git a/quantum/template/base/keymaps/default/readme.md b/data/templates/base/keymaps/default/readme.md similarity index 100% rename from quantum/template/base/keymaps/default/readme.md rename to data/templates/base/keymaps/default/readme.md diff --git a/quantum/template/ps2avrgb/config.h b/data/templates/ps2avrgb/config.h similarity index 100% rename from quantum/template/ps2avrgb/config.h rename to data/templates/ps2avrgb/config.h diff --git a/quantum/template/ps2avrgb/readme.md b/data/templates/ps2avrgb/readme.md similarity index 100% rename from quantum/template/ps2avrgb/readme.md rename to data/templates/ps2avrgb/readme.md diff --git a/data/templates/ps2avrgb/rules.mk b/data/templates/ps2avrgb/rules.mk new file mode 100644 index 000000000..6c0b7cc23 --- /dev/null +++ b/data/templates/ps2avrgb/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +BOOTLOADER = bootloadHID + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +WS2812_DRIVER = i2c diff --git a/docs/ChangeLog/20210828.md b/docs/ChangeLog/20210828.md new file mode 100644 index 000000000..22c547f8b --- /dev/null +++ b/docs/ChangeLog/20210828.md @@ -0,0 +1,557 @@ +# QMK Breaking Changes - 2021 August 28 Changelog + +## Notable Features :id=notable-features + +### Combo processing improvements ([#8591](https://github.com/qmk/qmk_firmware/pull/8591)) :id=combo-processing-improvements + +Combo processing has been reordered with respect to keypress handling, allowing for much better compatibility with mod taps. + +It is also now possible to define combos that have keys overlapping with other combos, triggering only one. For example, a combo of `A`, `B` can coexist with a longer combo of `A`, `B`, `C` -- previous functionality would trigger both combos if all three keys were pressed. + +### Key Overrides ([#11422](https://github.com/qmk/qmk_firmware/pull/11422)) :id=key-overrides + +QMK now has a new feature: [key overrides](https://docs.qmk.fm/#/feature_key_overrides). This feature allows for overriding the output of key combinations involving modifiers. As an example, pressing Shift+2 normally results in an @ on US-ANSI keyboard layouts -- the new key overrides allow for adding similar functionality, but for any modifier + key press. + +To illustrate, it's now possible to use the key overrides feature to translate Shift + Backspace into Delete -- an often-requested example of where this functionality comes in handy. + +There's far more to describe that what lives in this changelog, so head over to the [key overrides documentation](https://docs.qmk.fm/#/feature_key_overrides) for more examples and info. + +### Digitizer support ([#12851](https://github.com/qmk/qmk_firmware/pull/12851)) + +QMK gained the ability to pretend to be a digitizer device -- much like a tablet device. A mouse uses delta-coordinates -- move up, move right -- but a digitizer works with absolute coordinates -- top left, bottom right. + +## Changes Requiring User Action :id=changes-requiring-user-action + +### Updated Keyboard Codebases :id=updated-keyboard-codebases + +The following keyboards have had their source moved within QMK: + +Old Keyboard Name | New Keyboard Name +------------------------------|--------------------------------------------------------- +aeboards/constellation | aeboards/constellation/rev1, aeboards/constellation/rev2 +bakeneko65 | bakeneko65/rev2, bakeneko65/rev3 +bm16a | kprepublic/bm16a +bm16s | kprepublic/bm16s +bm40hsrgb | kprepublic/bm40hsrgb +bm43a | kprepublic/bm43a +bm60poker | kprepublic/bm60poker +bm60rgb | kprepublic/bm60rgb +bm60rgb_iso | kprepublic/bm60rgb_iso +bm68rgb | kprepublic/bm68rgb +clawsome/gamebuddy | clawsome/gamebuddy/v1_0, clawsome/gamebuddy/v1_m +cospad | kprepublic/cospad +custommk/genesis | custommk/genesis/rev1, custommk/genesis/rev2 +daisy | ktec/daisy +durgod/k320 | durgod/k3x0/k320 +dztech/volcano660 | ilumkb/volcano660 +ergodone | ktec/ergodone +gmmk/pro | gmmk/pro/ansi, gmmk/pro/iso +handwired/p1800fl | team0110/p1800fl +jj40 | kprepublic/jj40 +jj4x4 | kprepublic/jj4x4 +jj50 | kprepublic/jj50 +kyria | splitkb/kyria +lazydesigners/the60 | lazydesigners/the60/rev1, lazydesigners/the60/rev2 +matrix/m12og | matrix/m12og/rev1, matrix/m12og/rev2 +mechlovin/hannah65/mechlovin9 | mechlovin/mechlovin9/rev1, mechlovin/mechlovin9/rev2 +peiorisboards/ixora | coarse/ixora +ramonimbao/mona | ramonimbao/mona/v1, ramonimbao/mona/v1_1 +staryu | ktec/staryu +tokyo60 | tokyokeyboard/tokyo60 +vinta | coarse/vinta +xd002 | xiudi/xd002 +xd004 | xiudi/xd004 +xd60 | xiudi/xd60 +xd68 | xiudi/xd68 +xd75 | xiudi/xd75 +xd84 | xiudi/xd84 +xd84pro | xiudi/xd84pro +xd87 | xiudi/xd87 +xd96 | xiudi/xd96 + +### Bootmagic Full Removal ([#13846](https://github.com/qmk/qmk_firmware/pull/13846)) :id=bootmagic-full-removal + +As noted during last breaking changes cycle, QMK has decided to deprecate the full Bootmagic feature and leave Bootmagic Lite as the only remaining option. + +This pull request changes the behavior of `BOOTMAGIC_ENABLE` such that specifying `full` results in an error, allowing only `no`, `yes`, or `lite`. + +Next cycle, `lite` will be removed, so `yes` and `no` should be used in to minimise disruption. + +#### Bootmagic Full Deprecation Schedule + +This is the current roadmap for the behavior of `BOOTMAGIC_ENABLE`: + +- (done) From 2021 May 29, setting `BOOTMAGIC_ENABLE = yes` will enable Bootmagic Lite instead of full Bootmagic. +- (now) From 2021 Aug 28, `BOOTMAGIC_ENABLE` must be either `yes`, `lite`, or `no` – setting `BOOTMAGIC_ENABLE = full` will cause compilation to fail. +- (next) From 2021 Nov 27, `BOOTMAGIC_ENABLE` must be either `yes` or `no` – setting `BOOTMAGIC_ENABLE = lite` will cause compilation to fail. + +### DIP switch callbacks are now boolean ([#13399](https://github.com/qmk/qmk_firmware/pull/13399)) :id=dip-switch-boolean + +To match the encoder change last breaking changes cycle, DIP switch callbacks now return `bool`, too. + +Example code before change: + +```c +void dip_switch_update_kb(uint8_t index, bool active) { + dip_switch_update_user(index, active); +} + +void dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if(active) { audio_on(); } else { audio_off(); } + break; + } +} + +void dip_switch_update_mask_kb(uint32_t state) { + dip_switch_update_mask_user(state); +} + +void dip_switch_update_mask_user(uint32_t state) { + if (state & (1UL<<0) && state & (1UL<<1)) { + layer_on(_ADJUST); // C on esc + } else { + layer_off(_ADJUST); + } +} +``` + +Example code after change: + +```c +bool dip_switch_update_kb(uint8_t index, bool active) { + if !(dip_switch_update_user(index, active)) { return false; } + return true; +} + +bool dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: + if(active) { audio_on(); } else { audio_off(); } + break; + } + return true; // Returning true allows keyboard code to execute, false will tell the keyboard code "I've already handled it". +} + +bool dip_switch_update_mask_kb(uint32_t state) { + if (!dip_switch_update_mask_user(state)) { return false; } + return true; +} + +bool dip_switch_update_mask_user(uint32_t state) { + if (state & (1UL<<0) && state & (1UL<<1)) { + layer_on(_ADJUST); // C on esc + } else { + layer_off(_ADJUST); + } + return true; // Returning true allows keyboard code to execute, false will tell the keyboard code "I've already handled it". +} +``` + +## Notable core changes :id=notable-core + +### Split transport improvements :id=split-transport-improvements + +Split keyboards gained a significant amount of improvements during this breaking changes cycle, specifically: + +* Extensible split data sync ([#11930](https://github.com/qmk/qmk_firmware/pull/11930)) -- rewritten data sharing between sides, allowing for data transfer only when required, as well as enabling keyboards and keymaps to define their own shared data. +* Full-duplex ARM USART split ([#13081](https://github.com/qmk/qmk_firmware/pull/13081)) -- adds to the previous half-duplex driver and now allows for full-duplex support on ARM. +* Make solo half of split keyboards (more) usable. ([#13523](https://github.com/qmk/qmk_firmware/pull/13523)) -- allows the slave to be disconnected, enabling one-handed use. +* Switch split_common to CRC subsystem ([#13418](https://github.com/qmk/qmk_firmware/pull/13418)) + +!> If you're updating your split keyboard, you will need to flash both sides of the split with the your firmware. + +### Teensy 4.x support ([#13056](https://github.com/qmk/qmk_firmware/pull/13056), [#13076](https://github.com/qmk/qmk_firmware/pull/13076), [#13077](https://github.com/qmk/qmk_firmware/pull/13077)) :id=teensy-4-x-support + +Updated ChibiOS and ChibiOS-Contrib, which brought in support for Teensy 4.x dev boards, running NXP i.MX1062. + +### Data Driven Improvements ([#13366](https://github.com/qmk/qmk_firmware/pull/13366)) + +QMK's pursuit of data-driven keyboards has progressed, allowing substantially more configurable options to be specified in `info.json`. + +#### Tags + +Tags will let you categorize your keyboard, and will be used in the future to allow browsing and sorting through keyboards in QMK. Tags are free-form text identifiers that identify attributes about your keyboard. To add tags you simply add a `tags` key to your `info.json`: + + "tags": ["tkl", "backlight", "encoder"] + +#### Dot Notation + +With this release we are moving towards using JSON dot notation in more places. For example, when using `qmk info -f text`: + +``` +$ qmk info -f text -kb clueboard/card + bootloader: atmel-dfu + debounce: 20 + diode_direction: ROW2COL + features.audio: True + features.backlight: True + features.bluetooth: False + features.bootmagic: False + features.command: True + features.console: True + features.extrakey: True + features.lto: True + features.midi: False + features.mousekey: True + features.nkro: False + features.rgblight: True + features.unicode: False + height: 8 + keyboard_folder: clueboard/card + keyboard_name: Cluecard + layout_aliases.LAYOUT: LAYOUT_all + layouts: LAYOUT_all + maintainer: skullydazed + manufacturer: Clueboard + matrix_pins.cols: F1, F6, F7 + matrix_pins.rows: B4, F0, F4, F5 + platform: unknown + processor: atmega32u4 + processor_type: avr + protocol: LUFA + rgblight.brightness_steps: 17 + rgblight.hue_steps: 10 + rgblight.led_count: 4 + rgblight.pin: E6 + rgblight.saturation_steps: 17 + split.transport.protocol: serial + usb.device_ver: 0x0001 + usb.pid: 0x2330 + usb.vid: 0xC1ED + width: 10 +``` + +#### New configuration keys + +We've added dozens of new keys to `info.json` so that you can configure more than ever without writing a single line of code. A quick overview of the new items you can configure: + +* `audio.pins`, `audio.voices` +* `backlight.breathing`, `backlight.breathing_period`, `backlight.levels`, `backlight.pin`, +* `bluetooth.driver`, `bluetooth.lto` +* `bootloader_instructions` +* `build.debounce_type`, `build.firmware_format`, `build.lto` +* `combo.count`, `combo.term` +* `leader_key.timing`, `leader_key.strict_processing`, `leader_key.timeout` +* `matrix.custom`, `matrix.custom_lite`, `matrix.ghost`, `matrix.io_delay` +* `mouse_key.enabled`, `mouse_key.delay`, `mouse_key.interval`, `mouse_key.max_speed`, `mouse_key.time_to_max`, `mouse_key.wheel_delay` +* `oneshot.tap_toggle`, `oneshot.timeout` +* `rgblight.layers.blink`, `rgblight.layers.enabled`, `rgblight.layers.max`, `rgblight.layers.override_rgb`, `rgblight.rgbw` +* `split.enabled`, `split.matrix_grid`, `split.matrix_pins`, `split.main`, `split.soft_serial_pin`, `split.soft_serial_speed`, `split.transport.protocol`, `split.transport.sync_matrix_state`, `split.transport.sync_modifiers`, `split.usb_detect` +* `tapping.force_hold`, `tapping.force_hold_per_key`, `tapping.ignore_mod_tap_interrupt`, `tapping.ignore_mod_tap_interrupt_per_key`, `tapping.permissive_hold`, `tapping.permissive_hold_per_key`, `tapping.retro`, `tapping.retro_per_key`, `tapping.term`, `tapping.term_per_key`, `tapping.toggle` +* `usb.force_nkro`, `usb.max_power`, `usb.no_startup_check`, `usb.polling_interval`, `usb.shared_endpoint.keyboard`, `usb.shared_endpoint.mouse`, `usb.suspend_wakeup_delay`, `usb.wait_for` +* `qmk.keys_per_scan`, `qmk.tap_keycode_delay`, `qmk.tap_capslock_delay` + +### Codebase restructure and cleanup :id=codebase-restructure + +QMK was originally based on TMK, and has grown in size considerably since its first inception. To keep moving things forward, restructure of some of the core areas of the code is needed to support new concepts and new hardware, and progress is happening along those lines: + +* Move RGBLight code into its own folder ([#13312](https://github.com/qmk/qmk_firmware/pull/13312)) +* Migrate platform independent code from tmk_core -> quantum ([#13673](https://github.com/qmk/qmk_firmware/pull/13673)) +* matrix_scan_x -> x_task ([#13748](https://github.com/qmk/qmk_firmware/pull/13748)) +* Move some led drivers to common folder ([#13749](https://github.com/qmk/qmk_firmware/pull/13749)) +* Move chibios board files to allow tmk_core platform migration ([#13777](https://github.com/qmk/qmk_firmware/pull/13777)) +* Begin to carve out platform/protocol API - Single main loop ([#13843](https://github.com/qmk/qmk_firmware/pull/13843)) +* Relocate platform specific drivers ([#13894](https://github.com/qmk/qmk_firmware/pull/13894)) +* Move all the flash logic from tmk_core ([#13927](https://github.com/qmk/qmk_firmware/pull/13927)) +* Move USB Host Shield and Arduino core to `lib/` ([#13973](https://github.com/qmk/qmk_firmware/pull/13973)) +* Unify behaviour of wait on AVR ([#14025](https://github.com/qmk/qmk_firmware/pull/14025)) +* Move nix folder alongside vagrant ([#14132](https://github.com/qmk/qmk_firmware/pull/14132)) +* Align some quantum sub-directories ([#14134](https://github.com/qmk/qmk_firmware/pull/14134)) + +--- + +## Full changelist + +Core: +* Arm ps2 mouse interrupt ([#6490](https://github.com/qmk/qmk_firmware/pull/6490)) +* Process combos earlier & overlapping combos ([#8591](https://github.com/qmk/qmk_firmware/pull/8591)) +* Swap buttons on PS2 Mouse/Trackball ([#9205](https://github.com/qmk/qmk_firmware/pull/9205)) +* Add HOLD_ON_OTHER_KEY_PRESS option for dual-role keys ([#9404](https://github.com/qmk/qmk_firmware/pull/9404)) +* add yaml_build_options target ([#10533](https://github.com/qmk/qmk_firmware/pull/10533)) +* Warn when building a board that uses arm_atsam ([#10904](https://github.com/qmk/qmk_firmware/pull/10904)) +* Key Overrides ([#11422](https://github.com/qmk/qmk_firmware/pull/11422)) +* Refactor `quantum/command.{c,h}` for code size & {read,maintain}ability ([#11842](https://github.com/qmk/qmk_firmware/pull/11842)) +* Extensible split data sync ([#11930](https://github.com/qmk/qmk_firmware/pull/11930)) +* Move print/debug files to quantum ([#12069](https://github.com/qmk/qmk_firmware/pull/12069)) +* Unconditionally call led_init_ports ([#12116](https://github.com/qmk/qmk_firmware/pull/12116)) +* Support using a timer for wait_us() on ChibiOS-based boards ([#12211](https://github.com/qmk/qmk_firmware/pull/12211)) +* Add support for NO_PIN to all matrix types ([#12238](https://github.com/qmk/qmk_firmware/pull/12238)) +* Avoid 8-bit timer overflows in debounce algorithms ([#12240](https://github.com/qmk/qmk_firmware/pull/12240)) +* Add Per Key exclusions for Haptic Feedback ([#12386](https://github.com/qmk/qmk_firmware/pull/12386)) +* Steno combinedkeys ([#12538](https://github.com/qmk/qmk_firmware/pull/12538)) +* eeprom_stm32: implement high density wear leveling ([#12567](https://github.com/qmk/qmk_firmware/pull/12567)) +* eeprom_i2c driver: added EXTERNAL_EEPROM_WP_PIN configuration option. ([#12617](https://github.com/qmk/qmk_firmware/pull/12617)) +* Add CRC8 calculation subsystem to quantum ([#12641](https://github.com/qmk/qmk_firmware/pull/12641)) +* Limit saturation for RGB_MATRIX_JELLYBEAN_RAINDROPS ([#12669](https://github.com/qmk/qmk_firmware/pull/12669)) +* Add asym_eager_defer_pk debounce type ([#12689](https://github.com/qmk/qmk_firmware/pull/12689)) +* Include lib8tion.c into RGB/LED matrix build list ([#12699](https://github.com/qmk/qmk_firmware/pull/12699)) +* Add readPort() and some API to 'tmk_core/common/*/gpio.h' ([#12754](https://github.com/qmk/qmk_firmware/pull/12754)) +* add wait_cpuclock() macro for AVR and CPU_CLOCK macro ([#12755](https://github.com/qmk/qmk_firmware/pull/12755)) +* Trigger a wakeup after USB Reset on ChibiOS. ([#12831](https://github.com/qmk/qmk_firmware/pull/12831)) +* Add sync_timer support over serial_link (i.e. Ergodox Infinity) ([#12845](https://github.com/qmk/qmk_firmware/pull/12845)) +* Digitizer HID interface : absolute coordinates for mouse cursor ([#12851](https://github.com/qmk/qmk_firmware/pull/12851)) +* Add config.h and rules.mk support for data driven keymaps ([#12859](https://github.com/qmk/qmk_firmware/pull/12859)) +* Add alternate ldscript for STM32duino (F103xB) ([#12914](https://github.com/qmk/qmk_firmware/pull/12914)) +* `keymap_extras`: Remove deprecated defines ([#12949](https://github.com/qmk/qmk_firmware/pull/12949)) +* Retain brightness with lighting layers ([#13025](https://github.com/qmk/qmk_firmware/pull/13025)) +* Move optical sensor code to drivers folder ([#13044](https://github.com/qmk/qmk_firmware/pull/13044)) +* Change the prototype of matrix_output_unselect_delay() ([#13045](https://github.com/qmk/qmk_firmware/pull/13045)) +* Add weak refs on reading rows/cols. ([#13062](https://github.com/qmk/qmk_firmware/pull/13062)) +* Use single memcmp to determine if matrix changed. ([#13064](https://github.com/qmk/qmk_firmware/pull/13064)) +* Improve layer mask handling ([#13065](https://github.com/qmk/qmk_firmware/pull/13065)) +* mousekey: expose current report to users ([#13069](https://github.com/qmk/qmk_firmware/pull/13069)) +* ChibiOS SVN mirror script. ([#13070](https://github.com/qmk/qmk_firmware/pull/13070)) +* Added right vs left specific pin assignments for dip switch ([#13074](https://github.com/qmk/qmk_firmware/pull/13074)) +* make RESET key work with Teensy 4.x ([#13076](https://github.com/qmk/qmk_firmware/pull/13076)) +* wire up flash make target for Teensy 4.x ([#13077](https://github.com/qmk/qmk_firmware/pull/13077)) +* bump USB spec version in device descriptor to 2.0 ([#13078](https://github.com/qmk/qmk_firmware/pull/13078)) +* Unite half-duplex and full-duplex serial drivers ([#13081](https://github.com/qmk/qmk_firmware/pull/13081)) +* Add ST7565 LCD driver ([#13089](https://github.com/qmk/qmk_firmware/pull/13089)) +* `spi_master` Kinetis support ([#13098](https://github.com/qmk/qmk_firmware/pull/13098)) +* GMMK Pro RGB Support ([#13147](https://github.com/qmk/qmk_firmware/pull/13147)) +* Remove dfu-util arguments from mcu_selection ([#13150](https://github.com/qmk/qmk_firmware/pull/13150)) +* Add subcommand to generate version.h ([#13151](https://github.com/qmk/qmk_firmware/pull/13151)) +* Add oled_invert ([#13172](https://github.com/qmk/qmk_firmware/pull/13172)) +* ST7565 invert ([#13237](https://github.com/qmk/qmk_firmware/pull/13237)) +* RGB Matrix eeprom write limiting ([#13238](https://github.com/qmk/qmk_firmware/pull/13238)) +* Temporary disable of CRC ([#13252](https://github.com/qmk/qmk_firmware/pull/13252)) +* Move LED/RGB Matrix code into their own directories ([#13257](https://github.com/qmk/qmk_firmware/pull/13257)) +* Skip EEPROM writes once done. ([#13293](https://github.com/qmk/qmk_firmware/pull/13293)) +* Remove rgblight stubs ([#13302](https://github.com/qmk/qmk_firmware/pull/13302)) +* Allow settable SPI divisor for AW20216 driver, set default to 4 ([#13309](https://github.com/qmk/qmk_firmware/pull/13309)) +* Move RGBLight code into its own folder ([#13312](https://github.com/qmk/qmk_firmware/pull/13312)) +* Unify matrix for split common and regular matrix ([#13330](https://github.com/qmk/qmk_firmware/pull/13330)) +* Relocate RGB/HSV color defs to a more fitting place ([#13377](https://github.com/qmk/qmk_firmware/pull/13377)) +* Adds support for STM32L412xB, STM32L422xB. ([#13383](https://github.com/qmk/qmk_firmware/pull/13383)) +* Convert Dip Switch callbacks to boolean functions ([#13399](https://github.com/qmk/qmk_firmware/pull/13399)) +* Use string literals for `SERIAL_NUMBER` ([#13403](https://github.com/qmk/qmk_firmware/pull/13403)) +* Switch split_common to CRC subsystem ([#13418](https://github.com/qmk/qmk_firmware/pull/13418)) +* Improve 'show_build_options' target ([#13425](https://github.com/qmk/qmk_firmware/pull/13425)) +* AW20216 use register increment for framebuffer flushes ([#13430](https://github.com/qmk/qmk_firmware/pull/13430)) +* Allow invert of SPLIT_HAND_PIN logic ([#13433](https://github.com/qmk/qmk_firmware/pull/13433)) +* chibios: bootloader: use integer pointers as volatile ([#13450](https://github.com/qmk/qmk_firmware/pull/13450)) +* Refactor OLED to allow easy addition of other types ([#13454](https://github.com/qmk/qmk_firmware/pull/13454)) +* Dual RGB Matrix IS31FL3737 driver support to address #13442 ([#13457](https://github.com/qmk/qmk_firmware/pull/13457)) +* Enable g_is31_leds PROGMEM for RGB Matrix IS31FL3737 driver ([#13480](https://github.com/qmk/qmk_firmware/pull/13480)) +* Switch Ergodox Infinity over to split_common ([#13481](https://github.com/qmk/qmk_firmware/pull/13481)) +* Make solo half of split keyboards (more) usable. ([#13523](https://github.com/qmk/qmk_firmware/pull/13523)) +* Enable sync of OLED/ST7565 display on/off state on Splits ([#13542](https://github.com/qmk/qmk_firmware/pull/13542)) +* Revert "Add rgblight to RGB Matrix VPATH" ([#13559](https://github.com/qmk/qmk_firmware/pull/13559)) +* Move `SENDSTRING_BELL` code to `send_string.h` ([#13566](https://github.com/qmk/qmk_firmware/pull/13566)) +* Migrate platform independent code from tmk_core -> quantum ([#13673](https://github.com/qmk/qmk_firmware/pull/13673)) +* Avoid LTO conficts on arm_atsam ([#13676](https://github.com/qmk/qmk_firmware/pull/13676)) +* Allow for removal of hysteresis on 4x encoders ([#13698](https://github.com/qmk/qmk_firmware/pull/13698)) +* Port new_keyboard.sh to CLI ([#13706](https://github.com/qmk/qmk_firmware/pull/13706)) +* Align AW20216 driver ([#13712](https://github.com/qmk/qmk_firmware/pull/13712)) +* Haptic: driver-> feature ([#13713](https://github.com/qmk/qmk_firmware/pull/13713)) +* Add support for STM32F407x MCUs. ([#13718](https://github.com/qmk/qmk_firmware/pull/13718)) +* Remove legacy BACKLIGHT_CUSTOM_DRIVER option ([#13731](https://github.com/qmk/qmk_firmware/pull/13731)) +* Minor tidy up of key overrides ([#13747](https://github.com/qmk/qmk_firmware/pull/13747)) +* matrix_scan_x -> x_task ([#13748](https://github.com/qmk/qmk_firmware/pull/13748)) +* Move some led drivers to common folder ([#13749](https://github.com/qmk/qmk_firmware/pull/13749)) +* Allow for higher USB Polling rate on ATSAM boards ([#13755](https://github.com/qmk/qmk_firmware/pull/13755)) +* Rgb matrix/enable modes explicitly ([#13758](https://github.com/qmk/qmk_firmware/pull/13758)) +* Move chibios board files to allow tmk_core platform migration ([#13777](https://github.com/qmk/qmk_firmware/pull/13777)) +* __flash? ([#13799](https://github.com/qmk/qmk_firmware/pull/13799)) +* `--parallel` improvements ([#13800](https://github.com/qmk/qmk_firmware/pull/13800)) +* Speed up pimoroni trackball driver ([#13823](https://github.com/qmk/qmk_firmware/pull/13823)) +* Add a toggle key for GUI On/Off in Magic feature ([#13830](https://github.com/qmk/qmk_firmware/pull/13830)) +* Begin to carve out platform/protocol API - Single main loop ([#13843](https://github.com/qmk/qmk_firmware/pull/13843)) +* Remove Full Bootmagic ([#13846](https://github.com/qmk/qmk_firmware/pull/13846)) +* Remove backwards compatibility of debounce names ([#13877](https://github.com/qmk/qmk_firmware/pull/13877)) +* Relocate platform specific drivers ([#13894](https://github.com/qmk/qmk_firmware/pull/13894)) +* Remove ONEHAND_ENABLE ([#13920](https://github.com/qmk/qmk_firmware/pull/13920)) +* Move all the flash logic from tmk_core ([#13927](https://github.com/qmk/qmk_firmware/pull/13927)) +* adding uf2 flash support for blackpill 401 ([#13968](https://github.com/qmk/qmk_firmware/pull/13968)) +* Unify behaviour of wait on AVR ([#14025](https://github.com/qmk/qmk_firmware/pull/14025)) +* Add qmk-hid bootloader detection support to `qmk console` ([#14038](https://github.com/qmk/qmk_firmware/pull/14038)) +* Align DIP_SWITCH_PINS_RIGHT implementation with encoders ([#14079](https://github.com/qmk/qmk_firmware/pull/14079)) +* Tidy up quantum.c now some of tmk_core has been merged ([#14083](https://github.com/qmk/qmk_firmware/pull/14083)) +* Improve pmw3360 sensor and make it more hardware agnostic ([#14097](https://github.com/qmk/qmk_firmware/pull/14097)) +* Move nix folder alongside vagrant ([#14132](https://github.com/qmk/qmk_firmware/pull/14132)) +* Align some quantum sub-directories ([#14134](https://github.com/qmk/qmk_firmware/pull/14134)) +* Revert 14083 && 14144 ([#14150](https://github.com/qmk/qmk_firmware/pull/14150)) + +CLI: +* allow LINE_PINxx for Teensy 4.x pins ([#13247](https://github.com/qmk/qmk_firmware/pull/13247)) +* Remove the redundant pin name validation ([#13251](https://github.com/qmk/qmk_firmware/pull/13251)) +* Move all our CLI file formatters to the format dir ([#13296](https://github.com/qmk/qmk_firmware/pull/13296)) +* Refactor doctor.py into a directory ([#13298](https://github.com/qmk/qmk_firmware/pull/13298)) +* Add git and venv info to doctor's output ([#13405](https://github.com/qmk/qmk_firmware/pull/13405)) +* Matrix consistency check ([#13470](https://github.com/qmk/qmk_firmware/pull/13470)) +* Remove references to info.json `width` and `height` in CLI ([#13728](https://github.com/qmk/qmk_firmware/pull/13728)) +* Make `qmk doctor` more lenient about system config ([#13804](https://github.com/qmk/qmk_firmware/pull/13804)) +* Defer the expensive search for layout macros until info.json has been processed ([#14007](https://github.com/qmk/qmk_firmware/pull/14007)) + +Submodule updates: +* Update ChibiOS, ChibiOS-Contrib. ([#13056](https://github.com/qmk/qmk_firmware/pull/13056)) +* Update LUFA (18-07-2021) and add QMK-HID Bootloader support ([#13588](https://github.com/qmk/qmk_firmware/pull/13588)) +* Update LUFA Submodule (2021-07-30) ([#13819](https://github.com/qmk/qmk_firmware/pull/13819)) +* Bump gtest ([#13885](https://github.com/qmk/qmk_firmware/pull/13885)) +* Update ChibiOS-Contrib, mirroring script. ([#13896](https://github.com/qmk/qmk_firmware/pull/13896)) +* Move USB Host Shield and Arduino core to `lib/` ([#13973](https://github.com/qmk/qmk_firmware/pull/13973)) + +Keyboards: +* Migrate keyboards using uGFX to LED_MATRIX ([#9657](https://github.com/qmk/qmk_firmware/pull/9657)) +* Remove MIDI Configuration boilerplate ([#11151](https://github.com/qmk/qmk_firmware/pull/11151)) +* manyboard macro ([#11896](https://github.com/qmk/qmk_firmware/pull/11896)) +* Moved tokyo60/ into tokyokeyboard/tokyo60/. ([#12023](https://github.com/qmk/qmk_firmware/pull/12023)) +* Organize KPrepublic, K.T.E.C, xiudi boards into directories ([#12159](https://github.com/qmk/qmk_firmware/pull/12159)) +* Add Durgod Taurus K310 keyboard ([#12314](https://github.com/qmk/qmk_firmware/pull/12314)) +* add support for m65 and simple 5x13 ortholinear ([#12315](https://github.com/qmk/qmk_firmware/pull/12315)) +* Relocalize and Update p1800fl ([#12425](https://github.com/qmk/qmk_firmware/pull/12425)) +* GameBuddy v1.M ([#12637](https://github.com/qmk/qmk_firmware/pull/12637)) +* Add mechlovin9 rev2 PCB ([#12767](https://github.com/qmk/qmk_firmware/pull/12767)) +* Add RGB matrix support for Kyria ([#12789](https://github.com/qmk/qmk_firmware/pull/12789)) +* RGB Matrix working for Sofle RGB ([#12861](https://github.com/qmk/qmk_firmware/pull/12861)) +* Add Durgod Hades, Galaxy and Venus Keyboards ([#12893](https://github.com/qmk/qmk_firmware/pull/12893)) +* kint36: set correct EEPROM size ([#12946](https://github.com/qmk/qmk_firmware/pull/12946)) +* Updated encoder_update_user on my keymap to follow the new signature on quantum ([#13152](https://github.com/qmk/qmk_firmware/pull/13152)) +* Add Creator Pro by SergioPoverony ([#13154](https://github.com/qmk/qmk_firmware/pull/13154)) +* Use the new ST7565 driver on Ergodox Infinity ([#13165](https://github.com/qmk/qmk_firmware/pull/13165)) +* Refactor atom47 and add rev4 and rev5 ([#13201](https://github.com/qmk/qmk_firmware/pull/13201)) +* Add Bakeneko65 V3 and revision folders ([#13228](https://github.com/qmk/qmk_firmware/pull/13228)) +* Keyboards/RGBKB/Mün ([#13239](https://github.com/qmk/qmk_firmware/pull/13239)) +* Optimize our jsonschema by using refs ([#13271](https://github.com/qmk/qmk_firmware/pull/13271)) +* Handwired/Stream_Cheap/2x4: Add via support ([#13297](https://github.com/qmk/qmk_firmware/pull/13297)) +* ez_maker/directpins for easy one-offs in qmk_configurator ([#13321](https://github.com/qmk/qmk_firmware/pull/13321)) +* add kinT kinesis keyboard controller (kint41 variant) ([#13333](https://github.com/qmk/qmk_firmware/pull/13333)) +* Error log cleanup ([#13349](https://github.com/qmk/qmk_firmware/pull/13349)) +* Drashna's split updates ([#13350](https://github.com/qmk/qmk_firmware/pull/13350)) +* Migrate SHIFT_ESC and RGB `fn_actions` to Grave Escape and RGB keycodes ([#13360](https://github.com/qmk/qmk_firmware/pull/13360)) +* Add a lot more data to info.json ([#13366](https://github.com/qmk/qmk_firmware/pull/13366)) +* Remove `API_SYSEX_ENABLE`s from rules.mk ([#13389](https://github.com/qmk/qmk_firmware/pull/13389)) +* gmmk/pro/mike1808 keymap ([#13398](https://github.com/qmk/qmk_firmware/pull/13398)) +* Remove deprecated callbacks for encoders and dip switches ([#13404](https://github.com/qmk/qmk_firmware/pull/13404)) +* first pass: matrix consistency improvements ([#13471](https://github.com/qmk/qmk_firmware/pull/13471)) +* Migrate more `fn_actions` stuff ([#13502](https://github.com/qmk/qmk_firmware/pull/13502)) +* add simple gmmk pro macos keymap with rgb ([#13504](https://github.com/qmk/qmk_firmware/pull/13504)) +* move volcano660 to ilumkb folder ([#13550](https://github.com/qmk/qmk_firmware/pull/13550)) +* Valor Rev 2 ([#13551](https://github.com/qmk/qmk_firmware/pull/13551)) +* Split GMMK Pro PCBs into separate revisions ([#13570](https://github.com/qmk/qmk_firmware/pull/13570)) +* Remove the vision_division keyboard ([#13571](https://github.com/qmk/qmk_firmware/pull/13571)) +* Develop - Change uint32_t to layer_state_t ([#13596](https://github.com/qmk/qmk_firmware/pull/13596)) +* Develop - DC01 left ([#13597](https://github.com/qmk/qmk_firmware/pull/13597)) +* Created "paddlegame" keymap ([#13629](https://github.com/qmk/qmk_firmware/pull/13629)) +* Add timer_avr to includes for broken builds ([#13641](https://github.com/qmk/qmk_firmware/pull/13641)) +* Disable console by default on all Keebio boards ([#13649](https://github.com/qmk/qmk_firmware/pull/13649)) +* Enable LTO by default on BastardKB Scylla ([#13664](https://github.com/qmk/qmk_firmware/pull/13664)) +* Reduce compile size for dz60rgb v2.1 ([#13680](https://github.com/qmk/qmk_firmware/pull/13680)) +* Clean up remaining RGB_DISABLE_WHEN_USB_SUSPENDED defines ([#13689](https://github.com/qmk/qmk_firmware/pull/13689)) +* Remove some legacy files ([#13715](https://github.com/qmk/qmk_firmware/pull/13715)) +* [Keyboard Update] Change to L422 ([#13717](https://github.com/qmk/qmk_firmware/pull/13717)) +* Update kyria make path example ([#13720](https://github.com/qmk/qmk_firmware/pull/13720)) +* Drashna's Defaults cleanup ([#13722](https://github.com/qmk/qmk_firmware/pull/13722)) +* Reduce firmware size in prep for #12670 ([#13724](https://github.com/qmk/qmk_firmware/pull/13724)) +* Tidy up rgbkb/mun ([#13801](https://github.com/qmk/qmk_firmware/pull/13801)) +* Make default keymap for GMMK Pro reflect stock ([#13850](https://github.com/qmk/qmk_firmware/pull/13850)) +* Rework as per 9824 ([#13898](https://github.com/qmk/qmk_firmware/pull/13898)) +* Remove console from keebio via keyboards ([#13901](https://github.com/qmk/qmk_firmware/pull/13901)) +* Drashna split transport improvement ([#13905](https://github.com/qmk/qmk_firmware/pull/13905)) +* Copy GMMK Pro screw specs to ISO readme ([#13908](https://github.com/qmk/qmk_firmware/pull/13908)) +* Clean up remaining RGB_DISABLE_WHEN_USB_SUSPENDED defines Part 2 ([#13912](https://github.com/qmk/qmk_firmware/pull/13912)) +* Add andrebrait layout for GMMK Pro ([#13932](https://github.com/qmk/qmk_firmware/pull/13932)) +* Updated RGB Matrix suspend define part 3 ([#13954](https://github.com/qmk/qmk_firmware/pull/13954)) +* Improve andrebrait keymap ([#13985](https://github.com/qmk/qmk_firmware/pull/13985)) +* Drashna's Improve OLEDs and custom Split code ([#14063](https://github.com/qmk/qmk_firmware/pull/14063)) +* Kyria default reformat ([#14080](https://github.com/qmk/qmk_firmware/pull/14080)) +* Feature rich keymap for GMMK Pro (ANSI) ([#14120](https://github.com/qmk/qmk_firmware/pull/14120)) + +Keyboard fixes: +* Fix LED mapping for GMMK Pro ([#13189](https://github.com/qmk/qmk_firmware/pull/13189)) +* Fix up SplitKB keyboards ([#13511](https://github.com/qmk/qmk_firmware/pull/13511)) +* Keyboards/sol rev2 fix ([#13533](https://github.com/qmk/qmk_firmware/pull/13533)) +* Fix MATRIX_COLS for aeboards/constellation/rev2 ([#13633](https://github.com/qmk/qmk_firmware/pull/13633)) +* Fix errors with matrix_output_unselect_delay function calls ([#13645](https://github.com/qmk/qmk_firmware/pull/13645)) +* Fix default keymap for 0xCB 1337 keyboard ([#13646](https://github.com/qmk/qmk_firmware/pull/13646)) +* Fix Matrix Row number for ggkeyboards/genisis ([#13647](https://github.com/qmk/qmk_firmware/pull/13647)) +* Fix matrix issues with Promethium ([#13648](https://github.com/qmk/qmk_firmware/pull/13648)) +* Fix dc01/left so that it doesn't throw a warning ([#13653](https://github.com/qmk/qmk_firmware/pull/13653)) +* Remove broken, unmaintained converter/ibm_5291 ([#13658](https://github.com/qmk/qmk_firmware/pull/13658)) +* Quick hack to fix Astro65 board ([#13665](https://github.com/qmk/qmk_firmware/pull/13665)) +* Fix symmetric70_proto build break on develop branch ([#13667](https://github.com/qmk/qmk_firmware/pull/13667)) +* Fix matrix delay on Drop boards ([#13671](https://github.com/qmk/qmk_firmware/pull/13671)) +* Fix split matrix for sekigon grs 70ec ([#13672](https://github.com/qmk/qmk_firmware/pull/13672)) +* Fix type on pandora via keymap ([#13681](https://github.com/qmk/qmk_firmware/pull/13681)) +* Fix & clean up tronguylabs/m122_3270 ([#13684](https://github.com/qmk/qmk_firmware/pull/13684)) +* Fix up xd002 rgb keymaps ([#13685](https://github.com/qmk/qmk_firmware/pull/13685)) +* Dactyl Manuform cleanup ([#13686](https://github.com/qmk/qmk_firmware/pull/13686)) +* Fix Q1 change dip switch to bool ([#13687](https://github.com/qmk/qmk_firmware/pull/13687)) +* Fix compile size for the Merge UM70 via keymap ([#13690](https://github.com/qmk/qmk_firmware/pull/13690)) +* Fix compile size for the Lets Split Sockets via keymap ([#13691](https://github.com/qmk/qmk_firmware/pull/13691)) +* Fix Compile size on ungodly Launch Pad ([#13692](https://github.com/qmk/qmk_firmware/pull/13692)) +* dirty fix ([#13695](https://github.com/qmk/qmk_firmware/pull/13695)) +* Fix compile size for the Vitamins Included via keymap ([#13696](https://github.com/qmk/qmk_firmware/pull/13696)) +* Fix typo in Dactyl Manuform ([#13740](https://github.com/qmk/qmk_firmware/pull/13740)) +* Fix compile issues due to LED changes ([#13821](https://github.com/qmk/qmk_firmware/pull/13821)) +* Fix SRC include for matrix/m20add issi driver ([#13826](https://github.com/qmk/qmk_firmware/pull/13826)) +* fix develop branch move file ([#13832](https://github.com/qmk/qmk_firmware/pull/13832)) +* Fix knops keymaps ([#13872](https://github.com/qmk/qmk_firmware/pull/13872)) +* Switch Draculad to using WPM char hack ([#13886](https://github.com/qmk/qmk_firmware/pull/13886)) +* Fix up builds after #8591 ([#13900](https://github.com/qmk/qmk_firmware/pull/13900)) +* Fix matrix_output_unselect_delay for handwired/xealousbrown ([#13913](https://github.com/qmk/qmk_firmware/pull/13913)) +* Fixup rgb matrix config for KBD67 mkII boards ([#13931](https://github.com/qmk/qmk_firmware/pull/13931)) +* Fix compliation for ferris 0.2 bling ([#13937](https://github.com/qmk/qmk_firmware/pull/13937)) +* Fix some additional bootmagic settings ([#13979](https://github.com/qmk/qmk_firmware/pull/13979)) +* Fix default keymap for GMMK Pro Iso ([#13980](https://github.com/qmk/qmk_firmware/pull/13980)) +* Fixup Ungodly Launch Pad config ([#13992](https://github.com/qmk/qmk_firmware/pull/13992)) +* Fix errors that have cropped up in develop ([#14005](https://github.com/qmk/qmk_firmware/pull/14005)) +* Fix wait_us overflow in matrix for dactyl based boards ([#14039](https://github.com/qmk/qmk_firmware/pull/14039)) +* Fixup Neson Design N6 ISSI includes ([#14045](https://github.com/qmk/qmk_firmware/pull/14045)) +* Fixup `massdrop/alt`, `cest73/tkm`. ([#14048](https://github.com/qmk/qmk_firmware/pull/14048)) +* fix helix:fraanrosi compile error caused by #13677. ([#14061](https://github.com/qmk/qmk_firmware/pull/14061)) +* Fix compile issues for Tractyl Manuform ([#14105](https://github.com/qmk/qmk_firmware/pull/14105)) +* Disable Console on Keebio Quefrency ([#14108](https://github.com/qmk/qmk_firmware/pull/14108)) +* Fixed GMMK Pro -> stickandgum keymap readme.md ([#14123](https://github.com/qmk/qmk_firmware/pull/14123)) +* Drashna keymap fixups ([#14140](https://github.com/qmk/qmk_firmware/pull/14140)) +* fix ([#14142](https://github.com/qmk/qmk_firmware/pull/14142)) +* Fix merge artifacts ([#14146](https://github.com/qmk/qmk_firmware/pull/14146)) +* Update readme files ([#14172](https://github.com/qmk/qmk_firmware/pull/14172)) + +Others: +* Add examples to RGB Matrix Indicators docs ([#12797](https://github.com/qmk/qmk_firmware/pull/12797)) + +Bugs: +* Fix Indicator LED issues ([#12097](https://github.com/qmk/qmk_firmware/pull/12097)) +* Fixing incorrect keymap build when switching between multiple keymap.jsons ([#12632](https://github.com/qmk/qmk_firmware/pull/12632)) +* Fix LED Hit Counter for LED/RGB Matrix ([#12674](https://github.com/qmk/qmk_firmware/pull/12674)) +* ChibiOS fix O3 and LTO breakage of extra keys and joystick ([#12819](https://github.com/qmk/qmk_firmware/pull/12819)) +* Remove the #10088 hotfix for Teensy 3.1-like Input:Club keyboards ([#12870](https://github.com/qmk/qmk_firmware/pull/12870)) +* Fix firmware size check with avr-libc 1:2.0.0+Atmel3.6.2-1.1 (Debian bullseye) ([#12951](https://github.com/qmk/qmk_firmware/pull/12951)) +* Fix RGB/LED Suspend defines ([#13146](https://github.com/qmk/qmk_firmware/pull/13146)) +* Fix overrun in st7565_write_raw when not at (0, 0) ([#13209](https://github.com/qmk/qmk_firmware/pull/13209)) +* Upgrades Vagrant box to Debian 10 to fix Docker build error on Debian 9. ([#13236](https://github.com/qmk/qmk_firmware/pull/13236)) +* Fix issues with VIA EEPROM init and bring in line with eeconfig functionality ([#13243](https://github.com/qmk/qmk_firmware/pull/13243)) +* Fix CRC for AVR and enable again. ([#13253](https://github.com/qmk/qmk_firmware/pull/13253)) +* Fix linker error when rgblight and RGB Matrix are both enabled ([#13304](https://github.com/qmk/qmk_firmware/pull/13304)) +* Fix building layouts from JSON ([#13310](https://github.com/qmk/qmk_firmware/pull/13310)) +* Add rgblight to RGB Matrix VPATH ([#13371](https://github.com/qmk/qmk_firmware/pull/13371)) +* Fix two out of bounds accesses from #13330. ([#13525](https://github.com/qmk/qmk_firmware/pull/13525)) +* Fixes for clang not being able to run unit tests ([#13546](https://github.com/qmk/qmk_firmware/pull/13546)) +* Fixup Audio startup and add to documents ([#13606](https://github.com/qmk/qmk_firmware/pull/13606)) +* CLI/Docs: Fix the format commands' name ([#13668](https://github.com/qmk/qmk_firmware/pull/13668)) +* Disables rgblight twinkle by default. ([#13677](https://github.com/qmk/qmk_firmware/pull/13677)) +* Fix typo in dip switch example ([#13688](https://github.com/qmk/qmk_firmware/pull/13688)) +* docs/cli_commands: fix typo ([#13697](https://github.com/qmk/qmk_firmware/pull/13697)) +* Include gpio.h in solenoid driver for GPIO Control functions ([#13716](https://github.com/qmk/qmk_firmware/pull/13716)) +* Fix pimoroni trackball read address ([#13810](https://github.com/qmk/qmk_firmware/pull/13810)) +* Fix Key Override includes ([#13831](https://github.com/qmk/qmk_firmware/pull/13831)) +* Fix alignment of USB out report buffer 2 -> 4 ([#13838](https://github.com/qmk/qmk_firmware/pull/13838)) +* Fix compilation issue. ([#13926](https://github.com/qmk/qmk_firmware/pull/13926)) +* Fix `combo_disable` ([#13988](https://github.com/qmk/qmk_firmware/pull/13988)) +* Fix pmw3360 code to only output debug info if mouse debugging is enabled ([#13993](https://github.com/qmk/qmk_firmware/pull/13993)) +* Fix ifdefs for OLED split sync code ([#14017](https://github.com/qmk/qmk_firmware/pull/14017)) +* Various fixes from reorg of files ([#14051](https://github.com/qmk/qmk_firmware/pull/14051)) +* Fixup atsam builds. ([#14052](https://github.com/qmk/qmk_firmware/pull/14052)) +* Fix RGB/LED Matrix Suspend code ([#14084](https://github.com/qmk/qmk_firmware/pull/14084)) +* Fix issues with recent keymap.json changes ([#14089](https://github.com/qmk/qmk_firmware/pull/14089)) +* Fix LED Matrix suspend code ([#14090](https://github.com/qmk/qmk_firmware/pull/14090)) +* Fix up compilation issues. ([#14095](https://github.com/qmk/qmk_firmware/pull/14095)) +* Fix copypasta issue with pmw3360 sensor config ([#14106](https://github.com/qmk/qmk_firmware/pull/14106)) +* Fix typo ([#14118](https://github.com/qmk/qmk_firmware/pull/14118)) +* Fix bootloadHID comments breaking :flash ([#14133](https://github.com/qmk/qmk_firmware/pull/14133)) +* Fix Mouse Shared EP functionality ([#14136](https://github.com/qmk/qmk_firmware/pull/14136)) +* Short term bodge for firmware size bloat ([#14144](https://github.com/qmk/qmk_firmware/pull/14144)) +* Move to correct location ([#14171](https://github.com/qmk/qmk_firmware/pull/14171)) diff --git a/docs/_summary.md b/docs/_summary.md index 8347805a2..2f6309e41 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -36,6 +36,7 @@ * Guides * [Customizing Functionality](custom_quantum_functions.md) * [Driver Installation with Zadig](driver_installation_zadig.md) + * [Easy Maker for One Offs](easy_maker.md) * [Keymap Overview](keymap.md) * Development Environments * [Docker Guide](getting_started_docker.md) @@ -61,6 +62,7 @@ * [Language-Specific Keycodes](reference_keymap_extras.md) * [Modifier Keys](feature_advanced_keycodes.md) * [Quantum Keycodes](quantum_keycodes.md) + * [Magic Keycodes](keycodes_magic.md) * Advanced Keycodes * [Command](feature_command.md) @@ -78,6 +80,7 @@ * [Combos](feature_combo.md) * [Debounce API](feature_debounce_type.md) * [Key Lock](feature_key_lock.md) + * [Key Overrides](feature_key_overrides.md) * [Layers](feature_layers.md) * [One Shot Keys](one_shot_keys.md) * [Pointing Device](feature_pointing_device.md) @@ -94,6 +97,7 @@ * Hardware Features * Displays * [HD44780 LCD Controller](feature_hd44780.md) + * [ST7565 LCD Driver](feature_st7565.md) * [OLED Driver](feature_oled_driver.md) * Lighting * [Backlight](feature_backlight.md) @@ -102,8 +106,9 @@ * [RGB Matrix](feature_rgb_matrix.md) * [Audio](feature_audio.md) * [Bluetooth](feature_bluetooth.md) - * [Bootmagic](feature_bootmagic.md) + * [Bootmagic Lite](feature_bootmagic.md) * [Custom Matrix](custom_matrix.md) + * [Digitizer](feature_digitizer.md) * [DIP Switch](feature_dip_switch.md) * [Encoders](feature_encoders.md) * [Haptic Feedback](feature_haptic_feedback.md) diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index 754e6ec97..c5f4eec04 100644 --- a/docs/breaking_changes.md +++ b/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? +* [2021 Aug 28](ChangeLog/20210828.md) * [2021 May 29](ChangeLog/20210529.md) * [2021 Feb 27](ChangeLog/20210227.md) * [2020 Nov 28](ChangeLog/20201128.md) @@ -20,12 +21,12 @@ The next Breaking Change is scheduled for August 28, 2021. ### Important Dates -* [x] 2021 May 29 - `develop` is created. Each push to `master` is subsequently merged to `develop` -* [ ] 2021 Jul 31 - `develop` closed to new PR's. -* [ ] 2021 Jul 31 - Call for testers. -* [ ] 2021 Aug 26 - `master` is locked, no PR's merged. -* [ ] 2021 Aug 28 - Merge `develop` to `master`. -* [ ] 2021 Aug 28 - `master` is unlocked. PR's can be merged again. +* [x] 2021 Aug 29 - `develop` is created. Each push to `master` is subsequently merged to `develop` +* [ ] 2021 Oct 31 - `develop` closed to new PR's. +* [ ] 2021 Oct 31 - Call for testers. +* [ ] 2021 Nov 26 - `master` is locked, no PR's merged. +* [ ] 2021 Nov 28 - Merge `develop` to `master`. +* [ ] 2021 Nov 28 - `master` is unlocked. PR's can be merged again. ## What changes will be included? @@ -99,3 +100,7 @@ This happens immediately after the previous `develop` branch is merged. * [ ] `git pull --ff-only` * [ ] `git merge --no-ff develop` * [ ] `git push upstream master` + +## Post-merge operations + +* (Optional) [update ChibiOS + ChibiOS-Contrib on `develop`](chibios_upgrade_instructions.md) diff --git a/docs/breaking_changes_history.md b/docs/breaking_changes_history.md index 6ba8fe3b0..f78e97f1c 100644 --- a/docs/breaking_changes_history.md +++ b/docs/breaking_changes_history.md @@ -2,6 +2,7 @@ This page links to all previous changelogs from the QMK Breaking Changes process. +* [2021 Aug 28](ChangeLog/20210828.md) - version 0.14.0 * [2021 May 29](ChangeLog/20210529.md) - version 0.13.0 * [2021 Feb 27](ChangeLog/20210227.md) - version 0.12.0 * [2020 Nov 28](ChangeLog/20201128.md) - version 0.11.0 diff --git a/docs/chibios_upgrade_instructions.md b/docs/chibios_upgrade_instructions.md new file mode 100644 index 000000000..40c2faafc --- /dev/null +++ b/docs/chibios_upgrade_instructions.md @@ -0,0 +1,56 @@ +# ChibiOS Upgrade Procedure + +ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a branch tied to the ChibiOS version in use and should not be mixed with different versions. + +## Getting ChibiOS + +* `svn` Initialisation: + * Only needed to be done once + * You might need to separately install `git-svn` package in your OS's package manager + * `git svn init --stdlayout --prefix='svn/' http://svn.osdn.net/svnroot/chibios/` + * `git remote add qmk git@github.com:qmk/ChibiOS.git` +* Updating: + * `git svn fetch` + * First time around this will take several hours + * Subsequent updates will be incremental only +* Tagging example (work out which version first!): + * `git tag -a ver20.3.3 -m ver20.3.3 svn/tags/ver20.3.3` + * `git push qmk ver20.3.3` + * `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN svn/tags/ver20.3.3` + * `git push qmk breaking_YYYY_qN` + +## Getting ChibiOS-Contrib + +* `git` Initialisation: + * `git clone git@github.com:qmk/ChibiOS-Contrib` + * `git remote add upstream https://github.com/ChibiOS/ChibiOS-Contrib` + * `git checkout -b chibios-20.3.x upstream/chibios-20.3.x` +* Updating: + * `git fetch --all --tags --prune` + * `git checkout chibios-20.3.x` + * `git pull --ff-only` + * `git push origin chibios-20.3.x` + * `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN chibios-20.3.x` + * `git push origin breaking_YYYY_qN` + +## Updating submodules + +* Update the submodules + * `cd $QMK_FIRMWARE` + * `git checkout develop` + * `git pull --ff-only` + * `git checkout -b chibios-version-bump` + * `cd lib/chibios` + * `git fetch --all --tags --prune` + * `git checkout breaking_YYYY_qN` + * `cd ../chibios-contrib` + * `git fetch --all --tags --prune` + * `git checkout breaking_YYYY_qN` +* Build everything + * `cd $QMK_FIRMWARE` + * `qmk multibuild -j4` + * Make sure there are no errors +* Push to the repo + * `git commit -am 'Update ChibiOS to XXXXXXXXX'` + * `git push --set-upstream origin chibios-version-bump` +* Make a PR to qmk_firmware with the new branch \ No newline at end of file diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 4e27622c7..8fa7ad41d 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -17,7 +17,7 @@ qmk compile [-c] **Usage for Keymaps**: ``` -qmk compile [-c] [-e =] -kb -km +qmk compile [-c] [-e =] [-j ] -kb -km ``` **Usage in Keyboard Directory**: @@ -73,6 +73,17 @@ $ qmk compile -kb dz60 ... ``` +**Parallel Compilation**: + +It is possible to speed up compilation by adding the `-j`/`--parallel` flag. +``` +qmk compile -j -kb +``` +The `num_jobs` argument determines the maximum number of jobs that can be used. Setting it to zero will enable parallel compilation without limiting the maximum number of jobs. +``` +qmk compile -j 0 -kb +``` + ## `qmk flash` This command is similar to `qmk compile`, but can also target a bootloader. The bootloader is optional, and is set to `:flash` by default. To specify a different bootloader, use `-bl `. Visit the [Flashing Firmware](flashing.md) guide for more details of the available bootloaders. @@ -82,13 +93,13 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K **Usage for Configurator Exports**: ``` -qmk flash [-bl ] [-c] [-e =] +qmk flash [-bl ] [-c] [-e =] [-j ] ``` **Usage for Keymaps**: ``` -qmk flash -kb -km [-bl ] [-c] [-e =] +qmk flash -kb -km [-bl ] [-c] [-e =] [-j ] ``` **Listing the Bootloaders** @@ -109,7 +120,7 @@ qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN] ## `qmk console` -This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with `CONSOLE_ENABLED=yes`. +This command lets you connect to keyboard consoles to get debugging messages. It only works if your keyboard firmware has been compiled with `CONSOLE_ENABLE=yes`. **Usage**: @@ -280,12 +291,12 @@ qmk list-keymaps -kb planck/ez This command creates a new keyboard based on available templates. -This command will prompt for input to guide you though the generation process. +Any arguments that are not provided will prompt for input. If `-u` is not passed and `user.name` is set in .gitconfig, it will be used as the default username in the prompt. **Usage**: ``` -qmk new-keyboard +qmk new-keyboard [-kb KEYBOARD] [-t {avr,ps2avrgb}] -u USERNAME ``` ## `qmk new-keymap` @@ -314,7 +325,18 @@ qmk clean [-a] # Developer Commands -## `qmk cformat` +## `qmk format-text` + +This command formats text files to have proper line endings. + +Every text file in the repository needs to have Unix (LF) line ending. +If you are working on **Windows**, you must ensure that line endings are corrected in order to get your PRs merged. + +``` +qmk format-text +``` + +## `qmk format-c` This command formats C code using clang-format. @@ -325,25 +347,25 @@ Run it with `-a` to format all core code, or pass filenames on the command line **Usage for specified files**: ``` -qmk cformat [file1] [file2] [...] [fileN] +qmk format-c [file1] [file2] [...] [fileN] ``` **Usage for all core files**: ``` -qmk cformat -a +qmk format-c -a ``` **Usage for only changed files against origin/master**: ``` -qmk cformat +qmk format-c ``` **Usage for only changed files against branch_name**: ``` -qmk cformat -b branch_name +qmk format-c -b branch_name ``` ## `qmk docs` @@ -369,7 +391,7 @@ 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/`. +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/rgblight/`. **Usage**: @@ -399,14 +421,14 @@ $ qmk kle2json -f kle.txt -f Ψ Wrote out to info.json ``` -## `qmk pyformat` +## `qmk format-python` This command formats python code in `qmk_firmware`. **Usage**: ``` -qmk pyformat +qmk format-python ``` ## `qmk pytest` diff --git a/docs/cli_development.md b/docs/cli_development.md index 07c8f281b..0f4f401b3 100644 --- a/docs/cli_development.md +++ b/docs/cli_development.md @@ -188,7 +188,7 @@ cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.ou # Testing, and Linting, and Formatting (oh my!) -We use nose2, flake8, and yapf to test, lint, and format code. You can use the `pytest` and `pyformat` subcommands to run these tests: +We use nose2, flake8, and yapf to test, lint, and format code. You can use the `pytest` and `format-py` subcommands to run these tests: ### Testing and Linting @@ -196,7 +196,7 @@ We use nose2, flake8, and yapf to test, lint, and format code. You can use the ` ### Formatting - qmk pyformat + qmk format-py ## Formatting Details diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md index 0f5b140de..2bf3b0ebb 100644 --- a/docs/compatible_microcontrollers.md +++ b/docs/compatible_microcontrollers.md @@ -27,10 +27,13 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) * [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html) + * [STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html) * [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html) * [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html) * [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html) * [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html) + * [STM32L412](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html) + * [STM32L422](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html) * [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html) * [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html) diff --git a/docs/config_options.md b/docs/config_options.md index d0f0b316e..94f99e74c 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -51,8 +51,10 @@ This is a C header file that is one of the first things included, and will persi * the number of columns in your keyboard's matrix * `#define MATRIX_ROW_PINS { D0, D5, B5, B6 }` * pins of the rows, from top to bottom + * may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information. * `#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }` * pins of the columns, from left to right + * may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information. * `#define MATRIX_IO_DELAY 30` * the delay in microseconds when between changing matrix pin state and reading values * `#define UNUSED_PINS { D1, D2, D3, B1, B2, B3 }` @@ -186,13 +188,27 @@ If you define these options you will enable the associated feature, which may in few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. * `#define COMBO_COUNT 2` - * Set this to the number of combos that you're using in the [Combo](feature_combo.md) feature. + * Set this to the number of combos that you're using in the [Combo](feature_combo.md) feature. Or leave it undefined and programmatically set the count. * `#define COMBO_TERM 200` * how long for the Combo keys to be detected. Defaults to `TAPPING_TERM` if not defined. +* `#define COMBO_MUST_HOLD_MODS` + * Flag for enabling extending timeout on Combos containing modifers +* `#define COMBO_MOD_TERM 200` + * Allows for extending COMBO_TERM for mod keys while mid-combo. +* `#define COMBO_MUST_HOLD_PER_COMBO` + * Flag to enable per-combo COMBO_TERM extension and `get_combo_must_hold()` function +* `#define COMBO_TERM_PER_COMBO` + * Flag to enable per-combo COMBO_TERM extension and `get_combo_term()` function +* `#define COMBO_STRICT_TIMER` + * Only start the combo timer on the first key press instead of on all key presses. +* `#define COMBO_NO_TIMER` + * Disable the combo timer completely for relaxed combos. * `#define TAP_CODE_DELAY 100` * Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. * `#define TAP_HOLD_CAPS_DELAY 80` * Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. +* `#define KEY_OVERRIDE_REPEAT_DELAY 500` + * Sets the key repeat interval for [key overrides](feature_key_overrides.md). ## RGB Light Configuration @@ -272,7 +288,7 @@ There are a few different ways to set handedness for split keyboards (listed in ### Other Options * `#define USE_I2C` - * For using I2C instead of Serial (defaults to serial) + * For using I2C instead of Serial (default is serial; serial transport is supported on ARM -- I2C is AVR-only) * `#define SOFT_SERIAL_PIN D0` * When using serial, define this. `D0` or `D1`,`D2`,`D3`,`E6`. @@ -280,6 +296,7 @@ There are a few different ways to set handedness for split keyboards (listed in * `#define MATRIX_ROW_PINS_RIGHT { }` * `#define MATRIX_COL_PINS_RIGHT { }` * If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns. + * may be omitted by the keyboard designer if matrix reads are handled in an alternate manner. See [low-level matrix overrides](custom_quantum_functions.md?id=low-level-matrix-overrides) for more information. * `#define DIRECT_PINS_RIGHT { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }` * If you want to specify a different direct pinout for the right half than the left half, you can define `DIRECT_PINS_RIGHT`. Currently, the size of `DIRECT_PINS` must be the same as `DIRECT_PINS_RIGHT`. @@ -300,7 +317,7 @@ There are a few different ways to set handedness for split keyboards (listed in * `#define SPLIT_USB_DETECT` * Detect (with timeout) USB connection when delegating master/slave * Default behavior for ARM - * Required for AVR Teensy + * Required for AVR Teensy (without hardware mods) * `#define SPLIT_USB_TIMEOUT 2000` * Maximum timeout when detecting master/slave when using `SPLIT_USB_DETECT` @@ -308,6 +325,34 @@ There are a few different ways to set handedness for split keyboards (listed in * `#define SPLIT_USB_TIMEOUT_POLL 10` * Poll frequency when detecting master/slave when using `SPLIT_USB_DETECT` +* `#define FORCED_SYNC_THROTTLE_MS 100` + * Deadline for synchronizing data from master to slave when using the QMK-provided split transport. + +* `#define SPLIT_TRANSPORT_MIRROR` + * Mirrors the master-side matrix on the slave when using the QMK-provided split transport. + +* `#define SPLIT_LAYER_STATE_ENABLE` + * Ensures the current layer state is available on the slave when using the QMK-provided split transport. + +* `#define SPLIT_LED_STATE_ENABLE` + * Ensures the current host indicator state (caps/num/scroll) is available on the slave when using the QMK-provided split transport. + +* `#define SPLIT_MODS_ENABLE` + * Ensures the current modifier state (normal, weak, and oneshot) is available on the slave when using the QMK-provided split transport. + +* `#define SPLIT_WPM_ENABLE` + * Ensures the current WPM is available on the slave when using the QMK-provided split transport. + +* `#define SPLIT_OLED_ENABLE` + * Syncs the on/off state of the OLED between the halves. + +* `#define SPLIT_ST7565_ENABLE` + * Syncs the on/off state of the ST7565 screen between the halves. + +* `#define SPLIT_TRANSACTION_IDS_KB .....` +* `#define SPLIT_TRANSACTION_IDS_USER .....` + * Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](feature_split_keyboard.md#custom-data-sync) for more information. + # The `rules.mk` File This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features. @@ -375,6 +420,8 @@ Use these to enable or disable building certain features. The more you have enab * USB N-Key Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work * `AUDIO_ENABLE` * Enable the audio subsystem. +* `KEY_OVERRIDE_ENABLE` + * Enable the key override feature * `RGBLIGHT_ENABLE` * Enable keyboard underlight functionality * `LEADER_ENABLE` diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 694b421e7..494e76996 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -144,6 +144,14 @@ This is useful for setting up stuff that you may need elsewhere, but isn't hardw * Keyboard/Revision: `void matrix_init_kb(void)` * Keymap: `void matrix_init_user(void)` +### Low-level Matrix Overrides Function Documentation :id=low-level-matrix-overrides + +* GPIO pin initialisation: `void matrix_init_pins(void)` + * This needs to perform the low-level initialisation of all row and column pins. By default this will initialise the input/output state of each of the GPIO pins listed in `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no initialisation of pin state will occur within QMK itself, instead deferring to the keyboard's override. +* `COL2ROW`-based row reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)` +* `ROW2COL`-based column reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)` +* `DIRECT_PINS`-based reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)` + * These three functions need to perform the low-level retrieval of matrix state of relevant input pins, based on the matrix type. Only one of the functions should be implemented, if needed. By default this will iterate through `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, configuring the inputs and outputs based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no manipulation of matrix GPIO pin state will occur within QMK itself, instead deferring to the keyboard's override. ## Keyboard Post Initialization code @@ -374,7 +382,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } ``` -And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EEP_RST` keycode or [Bootmagic](feature_bootmagic.md) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued. +And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EEP_RST` keycode or [Bootmagic Lite](feature_bootmagic.md) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued. ```c void eeconfig_init_user(void) { // EEPROM is getting reset! diff --git a/docs/de/cli.md b/docs/de/cli.md index 437062ad6..7dc02d505 100644 --- a/docs/de/cli.md +++ b/docs/de/cli.md @@ -88,14 +88,14 @@ qmk compile qmk compile -kb -km ``` -## `qmk cformat` +## `qmk format-c` Dieser Befehl formatiert C-Code im clang-Format. Benutze ihn ohne Argumente, um den core-Code zu formatieren, oder benutze Namen von Dateien in der CLI, um den Befehl auf bestimmte Dateien anzuwenden. **Anwendung**: ``` -qmk cformat [file1] [file2] [...] [fileN] +qmk format-c [file1] [file2] [...] [fileN] ``` ## `qmk config` @@ -148,14 +148,14 @@ Dieser Befehl erstellt eine neue Keymap basierend auf einer existierenden Standa qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] ``` -## `qmk pyformat` +## `qmk format-py` Dieser Befehl formatiert Python-Code in `qmk_firmware`. **Anwendung**: ``` -qmk pyformat +qmk format-py ``` ## `qmk pytest` diff --git a/docs/driver_installation_zadig.md b/docs/driver_installation_zadig.md index fd5d3e92f..137ec8ad6 100644 --- a/docs/driver_installation_zadig.md +++ b/docs/driver_installation_zadig.md @@ -8,8 +8,8 @@ We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have ## Installation -Put your keyboard into bootloader mode, either by hitting the `RESET` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic](feature_bootmagic.md) docs for more details). Some boards use [Command](feature_command.md) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in. -Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](feature_bootmagic.md#bootmagic-lite) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure. +Put your keyboard into bootloader mode, either by hitting the `RESET` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic Lite](feature_bootmagic.md) docs for more details). Some boards use [Command](feature_command.md) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in. +Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](feature_bootmagic.md) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure. To put a device in bootloader mode with USBaspLoader, tap the `RESET` button while holding down the `BOOT` button. Alternatively, hold `BOOT` while inserting the USB cable. @@ -95,3 +95,4 @@ The device name here is the name that appears in Zadig, and may not be what the |`stm32-dfu` |STM32 BOOTLOADER |`0483:DF11` |WinUSB | |`kiibohd` |Kiibohd DFU Bootloader |`1C11:B007` |WinUSB | |`stm32duino` |Maple 003 |`1EAF:0003` |WinUSB | +|`qmk-hid` |(keyboard name) Bootloader |`03EB:2067` |HidUsb | diff --git a/docs/easy_maker.md b/docs/easy_maker.md new file mode 100644 index 000000000..dc9727233 --- /dev/null +++ b/docs/easy_maker.md @@ -0,0 +1,31 @@ +# Easy Maker - Build One-Off Projects In Configurator + +Have you ever needed an easy way to program a controller, such as a Proton C or Teensy 2.0, for a one-off project you're building? QMK has you covered with the Easy Maker. Now you can create a firmware in minutes using QMK Configurator. + +There are different styles of Easy Maker available depending on your needs: + +* [Direct Pin](https://config.qmk.fm/#/?filter=ez_maker/direct) - Connect a single switch to a single pin +* Direct Pin + Backlight (Coming Soon) - Like Direct Pin but dedicates a single pin to [Backlight](feature_backlight.md) control +* Direct Pin + Numlock (Coming Soon) - Like Direct Pin but dedicates a single pin to the Numlock LED +* Direct Pin + Capslock (Coming Soon) - Like Direct Pin but dedicates a single pin to the Numlock LED +* Direct Pin + Encoder (Coming Soon) - Like Direct Pin but uses 2 pins to add a single rotary encoder + +## Quickstart + +The easiest way to get started is with the Direct Pin boards. This will assign a single key to each pin and you can short that pin to ground to activate it. Select your MCU from the Keyboard dropdown here: + +* + +For more details see the [Direct Pin](#direct-pin) section. + +# Direct Pin + +As its name implies Direct Pin works by connecting one switch per pin. The other side of the switch should be connected to ground (VSS or GND.) You don't need any other components, your MCU has internal pull-up resistors so that the switch sensing can work. + +Here is a schematic showing how we connect a single button to pin A3 on a ProMicro: + +![Schematic diagram showing a ProMicro with a wire coming out of A3, connecting to the left side of a switch. Another wire comes out of the right side of the switch to connect to the Ground Plane.](https://i.imgur.com/JcDhZll.png) + +Once you have wired your switches you can assign keycodes to each pin and build a firmware by selecting the MCU you are using from the Keyboard dropdown. Use this link to show only Easy Maker Direct Pin: + +* diff --git a/docs/eeprom_driver.md b/docs/eeprom_driver.md index e2c262546..6dcf10c04 100644 --- a/docs/eeprom_driver.md +++ b/docs/eeprom_driver.md @@ -31,6 +31,9 @@ Currently QMK supports 24xx-series chips over I2C. As such, requires a working i `#define EXTERNAL_EEPROM_PAGE_SIZE` | Page size of the EEPROM in bytes, as specified in the datasheet | 32 `#define EXTERNAL_EEPROM_ADDRESS_SIZE` | The number of bytes to transmit for the memory location within the EEPROM | 2 `#define EXTERNAL_EEPROM_WRITE_TIME` | Write cycle time of the EEPROM, as specified in the datasheet | 5 +`#define EXTERNAL_EEPROM_WP_PIN` | If defined the WP pin will be toggled appropriately when writing to the EEPROM. | _none_ + +Some I2C EEPROM manufacturers explicitly recommend against hardcoding the WP pin to ground. This is in order to protect the eeprom memory content during power-up/power-down/brown-out conditions at low voltage where the eeprom is still operational, but the i2c master output might be unpredictable. If a WP pin is configured, then having an external pull-up on the WP pin is recommended. Default values and extended descriptions can be found in `drivers/eeprom/eeprom_i2c.h`. diff --git a/docs/es/hardware_avr.md b/docs/es/hardware_avr.md index f8c426381..ac6a71565 100644 --- a/docs/es/hardware_avr.md +++ b/docs/es/hardware_avr.md @@ -6,26 +6,28 @@ Si aún no lo has hecho, debes leer las [Pautas de teclados](hardware_keyboard_g ## Añadir tu Teclado AVR a QMK -QMK tiene varias características para simplificar el trabajo con teclados AVR. Para la mayoría de los teclados no tienes que escribir ni una sola línea de código. Para empezar, ejecuta el archivo `util/new_keyboard.sh`: +QMK tiene varias características para simplificar el trabajo con teclados AVR. Para la mayoría de los teclados no tienes que escribir ni una sola línea de código. Para empezar, ejecuta `qmk new-keyboard`: ``` -$ ./util/new_keyboard.sh -Generating a new QMK keyboard directory +$ qmk new-keyboard +Ψ Generating a new QMK keyboard directory -Keyboard Name: mycoolkb -Keyboard Type [avr]: -Your Name [John Smith]: +Keyboard Name: mycoolkeeb +Keyboard Type: + 1. avr + 2. ps2avrgb +Please enter your choice: [1] +Your Name: [John Smith] +Ψ Copying base template files... +Ψ Copying avr template files... +Ψ Renaming keyboard.[ch] to mycoolkeeb.[ch]... +Ψ Replacing %YEAR% with 2021... +Ψ Replacing %KEYBOARD% with mycoolkeeb... +Ψ Replacing %YOUR_NAME% with John Smith... -Copying base template files... done -Copying avr template files... done -Renaming keyboard files... done -Replacing %KEYBOARD% with mycoolkb... done -Replacing %YOUR_NAME% with John Smith... done - -Created a new keyboard called mycoolkb. - -To start working on things, cd into keyboards/mycoolkb, -or open the directory in your favourite text editor. +Ψ Created a new keyboard called mycoolkeeb. +Ψ To start working on things, `cd` into keyboards/mycoolkeeb, +Ψ or open the directory in your preferred text editor. ``` Esto creará todos los archivos necesarios para tu nuevo teclado, y rellenará la configuración con valores predeterminados. Ahora sólo tienes que personalizarlo para tu teclado. diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index c30e17990..3de4cd240 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -31,7 +31,7 @@ QMK has two features, Bootmagic and Command, which allow you to change the behav As a quick fix try holding down `Space`+`Backspace` while you plug in your keyboard. This will reset the stored settings on your keyboard, returning those keys to normal operation. If that doesn't work look here: -* [Bootmagic](feature_bootmagic.md) +* [Bootmagic Lite](feature_bootmagic.md) * [Command](feature_command.md) ## The Menu Key Isn't Working diff --git a/docs/feature_audio.md b/docs/feature_audio.md index 9ffbc2cba..5b84dc774 100644 --- a/docs/feature_audio.md +++ b/docs/feature_audio.md @@ -167,6 +167,32 @@ The available keycodes for audio are: !> These keycodes turn all of the audio functionality on and off. Turning it off means that audio feedback, audio clicky, music mode, etc. are disabled, completely. +## Audio Config + +| Settings | Default | Description | +|---------------------------------|----------------------|-------------------------------------------------------------------------------| +|`AUDIO_PIN` | *Not defined* |Configures the pin that the speaker is connected to. | +|`AUDIO_PIN_ALT` | *Not defined* |Configures the pin for a second speaker or second pin connected to one speaker.| +|`AUDIO_PIN_ALT_AS_NEGATIVE` | *Not defined* |Enables support for one speaker connected to two pins. | +|`AUDIO_INIT_DELAY` | *Not defined* |Enables delay during startup song to accomidate for USB startup issues. | +|`AUDIO_ENABLE_TONE_MULTIPLEXING` | *Not defined* |Enables time splicing/multiplexing to create multiple tones simutaneously. | +|`STARTUP_SONG` | `STARTUP_SOUND` |Plays when the keyboard starts up (audio.c) | +|`GOODBYE_SONG` | `GOODBYE_SOUND` |Plays when you press the RESET key (quantum.c) | +|`AG_NORM_SONG` | `AG_NORM_SOUND` |Plays when you press AG_NORM (process_magic.c) | +|`AG_SWAP_SONG` | `AG_SWAP_SOUND` |Plays when you press AG_SWAP (process_magic.c) | +|`CG_NORM_SONG` | `AG_NORM_SOUND` |Plays when you press CG_NORM (process_magic.c) | +|`CG_SWAP_SONG` | `AG_SWAP_SOUND` |Plays when you press CG_SWAP (process_magic.c) | +|`MUSIC_ON_SONG` | `MUSIC_ON_SOUND` |Plays when music mode is activated (process_music.c) | +|`MUSIC_OFF_SONG` | `MUSIC_OFF_SOUND` |Plays when music mode is deactivated (process_music.c) | +|`MIDI_ON_SONG` | `MUSIC_ON_SOUND` |Plays when midi mode is activated (process_music.c) | +|`MIDI_OFF_SONG` | `MUSIC_OFF_SOUND` |Plays when midi mode is deactivated (process_music.c) | +|`CHROMATIC_SONG` | `CHROMATIC_SOUND` |Plays when the chromatic music mode is selected (process_music.c) | +|`GUITAR_SONG` | `GUITAR_SOUND` |Plays when the guitar music mode is selected (process_music.c) | +|`VIOLIN_SONG` | `VIOLIN_SOUND` |Plays when the violin music mode is selected (process_music.c) | +|`MAJOR_SONG` | `MAJOR_SOUND` |Plays when the major music mode is selected (process_music.c) | +|`DEFAULT_LAYER_SONGS` | *Not defined* |Plays song when switched default layers with [`set_single_persistent_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer)(quantum.c) | +|`SENDSTRING_BELL` | *Not defined* |Plays chime when the "enter" ("\a") character is sent (send_string.c) | + ## Tempo the 'speed' at which SONGs are played is dictated by the set Tempo, which is measured in beats-per-minute. Note lengths are defined relative to that. The initial/default tempo is set to 120 bpm, but can be configured by setting `TEMPO_DEFAULT` in `config.c`. diff --git a/docs/feature_bootmagic.md b/docs/feature_bootmagic.md index 4c655d8e1..6c66b0067 100644 --- a/docs/feature_bootmagic.md +++ b/docs/feature_bootmagic.md @@ -1,136 +1,15 @@ -# Bootmagic - -There are three separate but related features that allow you to change the behavior of your keyboard without reflashing. While each of them have similar functionality, it is accessed in different ways depending on how your keyboard is configured. - -**Bootmagic** is a system for configuring your keyboard while it initializes. To trigger a Bootmagic command, hold down the Bootmagic key and one or more command keys. - -**Bootmagic Keycodes** are prefixed with `MAGIC_`, and allow you to access the Bootmagic functionality *after* your keyboard has initialized. To use the keycodes, assign them to your keymap as you would any other keycode. - -**Command**, formerly known as **Magic**, is another feature that allows you to control different aspects of your keyboard. While it shares some functionality with Bootmagic, it also allows you to do things that Bootmagic does not, such as printing version information to the console. For more information, see [Command](feature_command.md). - -On some keyboards Bootmagic is disabled by default. If this is the case, it must be explicitly enabled in your `rules.mk` with: - -```make -BOOTMAGIC_ENABLE = full -``` - -?> You may see `yes` being used in place of `full`, and this is okay. However, `yes` is deprecated, and ideally `full` (or `lite`) should be used instead. - -Additionally, you can use [Bootmagic Lite](#bootmagic-lite) (a scaled down, very basic version of Bootmagic) by adding the following to your `rules.mk` file: - -```make -BOOTMAGIC_ENABLE = lite -``` - -## Hotkeys - -Hold down the Bootmagic key (Space by default) and the desired hotkey while plugging in your keyboard. For example, holding Space+`B` should cause it to enter the bootloader. - -|Hotkey |Description | -|------------------|---------------------------------------------| -|Escape |Ignore Bootmagic configuration in EEPROM | -|`B` |Enter the bootloader | -|`D` |Toggle debugging over serial | -|`X` |Toggle key matrix debugging | -|`K` |Toggle keyboard debugging | -|`M` |Toggle mouse debugging | -|`L` |Set "Left Hand" for EE_HANDS handedness | -|`R` |Set "Right Hand" for EE_HANDS handedness | -|Backspace |Clear the EEPROM | -|Caps Lock |Toggle treating Caps Lock as Left Control | -|Left Control |Toggle swapping Caps Lock and Left Control | -|Left Alt |Toggle swapping Left Alt and Left GUI | -|Right Alt |Toggle swapping Right Alt and Right GUI | -|Left GUI |Toggle the GUI keys (useful when gaming) | -|`|Toggle swapping ` and Escape| -|`\` |Toggle swapping `\` and Backspace | -|`N` |Toggle N-Key Rollover (NKRO) | -|`0` |Make layer 0 the default layer | -|`1` |Make layer 1 the default layer | -|`2` |Make layer 2 the default layer | -|`3` |Make layer 3 the default layer | -|`4` |Make layer 4 the default layer | -|`5` |Make layer 5 the default layer | -|`6` |Make layer 6 the default layer | -|`7` |Make layer 7 the default layer | - -## Keycodes :id=keycodes - -|Key |Aliases |Description | -|----------------------------------|---------|--------------------------------------------------------------------------| -|`MAGIC_SWAP_CONTROL_CAPSLOCK` |`CL_SWAP`|Swap Caps Lock and Left Control | -|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |`CL_NORM`|Unswap Caps Lock and Left Control | -|`MAGIC_CAPSLOCK_TO_CONTROL` |`CL_CTRL`|Treat Caps Lock as Control | -|`MAGIC_UNCAPSLOCK_TO_CONTROL` |`CL_CAPS`|Stop treating Caps Lock as Control | -|`MAGIC_SWAP_LCTL_LGUI` |`LCG_SWP`|Swap Left Control and GUI | -|`MAGIC_UNSWAP_LCTL_LGUI` |`LCG_NRM`|Unswap Left Control and GUI | -|`MAGIC_SWAP_RCTL_RGUI` |`RCG_SWP`|Swap Right Control and GUI | -|`MAGIC_UNSWAP_RCTL_RGUI` |`RCG_NRM`|Unswap Right Control and GUI | -|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Control and GUI on both sides | -|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Control and GUI on both sides | -|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Control and GUI swap on both sides | -|`MAGIC_SWAP_LALT_LGUI` |`LAG_SWP`|Swap Left Alt and GUI | -|`MAGIC_UNSWAP_LALT_LGUI` |`LAG_NRM`|Unswap Left Alt and GUI | -|`MAGIC_SWAP_RALT_RGUI` |`RAG_SWP`|Swap Right Alt and GUI | -|`MAGIC_UNSWAP_RALT_RGUI` |`RAG_NRM`|Unswap Right Alt and GUI | -|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides | -|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides | -|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides | -|`MAGIC_NO_GUI` |`GUI_OFF`|Disable the GUI keys | -|`MAGIC_UNNO_GUI` |`GUI_ON` |Enable the GUI keys | -|`MAGIC_SWAP_GRAVE_ESC` |`GE_SWAP`|Swap ` and Escape | -|`MAGIC_UNSWAP_GRAVE_ESC` |`GE_NORM`|Unswap ` and Escape | -|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |`BS_SWAP`|Swap `\` and Backspace | -|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace | -|`MAGIC_HOST_NKRO` |`NK_ON` |Enable N-key rollover | -|`MAGIC_UNHOST_NKRO` |`NK_OFF` |Disable N-key rollover | -|`MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover | -|`MAGIC_EE_HANDS_LEFT` |`EH_LEFT`|Set the master half of a split keyboard as the left hand (for `EE_HANDS`) | -|`MAGIC_EE_HANDS_RIGHT` |`EH_RGHT`|Set the master half of a split keyboard as the right hand (for `EE_HANDS`)| - -## Configuration - -If you would like to change the hotkey assignments for Bootmagic, `#define` these in your `config.h` at either the keyboard or keymap level. - -|Define |Default |Description | -|----------------------------------------|-------------|---------------------------------------------------| -|`BOOTMAGIC_KEY_SALT` |`KC_SPACE` |The Bootmagic key | -|`BOOTMAGIC_KEY_SKIP` |`KC_ESC` |Ignore Bootmagic configuration in EEPROM | -|`BOOTMAGIC_KEY_EEPROM_CLEAR` |`KC_BSPACE` |Clear the EEPROM configuration | -|`BOOTMAGIC_KEY_BOOTLOADER` |`KC_B` |Enter the bootloader | -|`BOOTMAGIC_KEY_DEBUG_ENABLE` |`KC_D` |Toggle debugging over serial | -|`BOOTMAGIC_KEY_DEBUG_MATRIX` |`KC_X` |Toggle matrix debugging | -|`BOOTMAGIC_KEY_DEBUG_KEYBOARD` |`KC_K` |Toggle keyboard debugging | -|`BOOTMAGIC_KEY_DEBUG_MOUSE` |`KC_M` |Toggle mouse debugging | -|`BOOTMAGIC_KEY_EE_HANDS_LEFT` |`KC_L` |Set "Left Hand" for EE_HANDS handedness | -|`BOOTMAGIC_KEY_EE_HANDS_RIGHT` |`KC_R` |Set "Right Hand" for EE_HANDS handedness | -|`BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK` |`KC_LCTRL` |Swap Left Control and Caps Lock | -|`BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL` |`KC_CAPSLOCK`|Toggle treating Caps Lock as Left Control | -|`BOOTMAGIC_KEY_SWAP_LALT_LGUI` |`KC_LALT` |Toggle swapping Left Alt and Left GUI (for macOS) | -|`BOOTMAGIC_KEY_SWAP_RALT_RGUI` |`KC_RALT` |Toggle swapping Right Alt and Right GUI (for macOS)| -|`BOOTMAGIC_KEY_NO_GUI` |`KC_LGUI` |Toggle the GUI keys (useful when gaming) | -|`BOOTMAGIC_KEY_SWAP_GRAVE_ESC` |`KC_GRAVE` |Toggle swapping ` and Escape | -|`BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE`|`KC_BSLASH` |Toggle swapping `\` and Backspace | -|`BOOTMAGIC_HOST_NKRO` |`KC_N` |Toggle N-Key Rollover (NKRO) | -|`BOOTMAGIC_KEY_DEFAULT_LAYER_0` |`KC_0` |Make layer 0 the default layer | -|`BOOTMAGIC_KEY_DEFAULT_LAYER_1` |`KC_1` |Make layer 1 the default layer | -|`BOOTMAGIC_KEY_DEFAULT_LAYER_2` |`KC_2` |Make layer 2 the default layer | -|`BOOTMAGIC_KEY_DEFAULT_LAYER_3` |`KC_3` |Make layer 3 the default layer | -|`BOOTMAGIC_KEY_DEFAULT_LAYER_4` |`KC_4` |Make layer 4 the default layer | -|`BOOTMAGIC_KEY_DEFAULT_LAYER_5` |`KC_5` |Make layer 5 the default layer | -|`BOOTMAGIC_KEY_DEFAULT_LAYER_6` |`KC_6` |Make layer 6 the default layer | -|`BOOTMAGIC_KEY_DEFAULT_LAYER_7` |`KC_7` |Make layer 7 the default layer | - # Bootmagic Lite :id=bootmagic-lite -In addition to the full blown Bootmagic feature, is the Bootmagic Lite feature that only handles jumping into the bootloader. This is great for boards that don't have a physical reset button but you need a way to jump into the bootloader, and don't want to deal with the headache that Bootmagic can cause. +The Bootmagic Lite feature that only handles jumping into the bootloader. This is great for boards that don't have a physical reset button, giving you a way to jump into the bootloader -To enable this version of Bootmagic, you need to enable it in your `rules.mk` with: +On some keyboards Bootmagic Lite is disabled by default. If this is the case, it must be explicitly enabled in your `rules.mk` with: ```make -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = yes ``` +?> You may see `lite` being used in place of `yes`. + Additionally, you may want to specify which key to use. This is especially useful for keyboards that have unusual matrices. To do so, you need to specify the row and column of the key that you want to use. Add these entries to your `config.h` file: ```c @@ -142,7 +21,7 @@ By default, these are set to 0 and 0, which is usually the "ESC" key on a majori And to trigger the bootloader, you hold this key down when plugging the keyboard in. Just the single key. -!> Using bootmagic lite will **always reset** the EEPROM, so you will lose any settings that have been saved. +!> Using Bootmagic Lite will **always reset** the EEPROM, so you will lose any settings that have been saved. ## Split Keyboards @@ -174,4 +53,10 @@ void bootmagic_lite(void) { } ``` -You can additional feature here. For instance, resetting the eeprom or requiring additional keys to be pressed to trigger bootmagic. Keep in mind that `bootmagic_lite` is called before a majority of features are initialized in the firmware. +You can additional feature here. For instance, resetting the EEPROM or requiring additional keys to be pressed to trigger Bootmagic Lite. Keep in mind that `bootmagic_lite` is called before a majority of features are initialized in the firmware. + +## Addenda + +To manipulate settings that were formerly configured through the now-deprecated full Bootmagic feature, see [Magic Keycodes](keycodes_magic.md). + +The Command feature, formerly known as Magic, also allows you to control different aspects of your keyboard. While it shares some functionality with Magic Keycodes, it also allows you to do things that Magic Keycodes cannot, such as printing version information to the console. For more information, see [Command](feature_command.md). diff --git a/docs/feature_combo.md b/docs/feature_combo.md index d831328f6..d98e6f2ac 100644 --- a/docs/feature_combo.md +++ b/docs/feature_combo.md @@ -1,24 +1,39 @@ # Combos -The Combo feature is a chording type solution for adding custom actions. It lets you hit multiple keys at once and produce a different effect. For instance, hitting `A` and `S` within the tapping term would hit `ESC` instead, or have it perform even more complex tasks. +The Combo feature is a chording type solution for adding custom actions. It lets you hit multiple keys at once and produce a different effect. For instance, hitting `A` and `S` within the combo term would hit `ESC` instead, or have it perform even more complex tasks. To enable this feature, you need to add `COMBO_ENABLE = yes` to your `rules.mk`. -Additionally, in your `config.h`, you'll need to specify the number of combos that you'll be using, by adding `#define COMBO_COUNT 1` (replacing 1 with the number that you're using). - +Additionally, in your `config.h`, you'll need to specify the number of combos that you'll be using, by adding `#define COMBO_COUNT 1` (replacing 1 with the number that you're using). It is also possible to not define this and instead set the variable `COMBO_LEN` yourself. There's a trick where we don't need to think about this variable at all. More on this later. -Also, by default, the tapping term for the Combos is set to the same value as `TAPPING_TERM` (200 by default on most boards). But you can specify a different value by defining it in your `config.h`. For instance: `#define COMBO_TERM 300` would set the time out period for combos to 300ms. -Then, your `keymap.c` file, you'll need to define a sequence of keys, terminated with `COMBO_END`, and a structure to list the combination of keys, and it's resulting action. +Then, in your `keymap.c` file, you'll need to define a sequence of keys, terminated with `COMBO_END`, and a structure to list the combination of keys, and its resulting action. ```c -const uint16_t PROGMEM test_combo[] = {KC_A, KC_B, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO(test_combo, KC_ESC)}; +const uint16_t PROGMEM test_combo1[] = {KC_A, KC_B, COMBO_END}; +const uint16_t PROGMEM test_combo2[] = {KC_C, KC_D, COMBO_END}; +combo_t key_combos[COMBO_COUNT] = { + COMBO(test_combo1, KC_ESC), + COMBO(test_combo2, LCTL(KC_Z)), // keycodes with modifiers are possible too! +}; ``` -This will send "Escape" if you hit the A and B keys. +This will send "Escape" if you hit the A and B keys, and Ctrl+Z when you hit the C and D keys. -!> This method only supports [basic keycodes](keycodes_basic.md). See the examples for more control. +As of [PR#8591](https://github.com/qmk/qmk_firmware/pull/8591/), it is possible to fire combos from ModTap keys and LayerTap keys. So in the above example you could have keys `LSFT_T(KC_A)` and `LT(_LAYER, KC_B)` and it would work. So Home Row Mods and Home Row Combos at same time is now a thing! + +It is also now possible to overlap combos. Before, with the example below both combos would activate when all three keys were pressed. Now only the three key combo will activate. + +```c +const uint16_t PROGMEM test_combo1[] = {LSFT_T(KC_A), LT(_LAYER, KC_B), COMBO_END}; +const uint16_t PROGMEM test_combo2[] = {LSFT_T(KC_A), LT(_LAYER, KC_B), KC_C, COMBO_END}; +combo_t key_combos[COMBO_COUNT] = { + COMBO(test_combo1, KC_ESC) + COMBO(test_combo2, KC_TAB) +}; +``` + +Executing more complex keycodes like ModTaps and LayerTaps is now also possible. ## Examples @@ -27,63 +42,68 @@ If you want to add a list, then you'd use something like this: ```c enum combos { AB_ESC, - JK_TAB + JK_TAB, + QW_SFT, + SD_LAYER, }; const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END}; const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; +const uint16_t PROGMEM qw_combo[] = {KC_Q, KC_W, COMBO_END}; +const uint16_t PROGMEM sd_combo[] = {KC_S, KC_D, COMBO_END}; combo_t key_combos[COMBO_COUNT] = { [AB_ESC] = COMBO(ab_combo, KC_ESC), - [JK_TAB] = COMBO(jk_combo, KC_TAB) + [JK_TAB] = COMBO(jk_combo, KC_TAB), + [QW_SFT] = COMBO(qw_combo, KC_LSFT) + [SD_LAYER] = COMBO(layer_combo, MO(_LAYER)), }; ``` For a more complicated implementation, you can use the `process_combo_event` function to add custom handling. +Additionally, this example shows how you can leave `COMBO_COUNT` undefined. ```c enum combo_events { - ZC_COPY, - XV_PASTE + EM_EMAIL, + BSPC_LSFT_CLEAR, + COMBO_LENGTH }; +uint16_t COMBO_LEN = COMBO_LENGTH; // remove the COMBO_COUNT define and use this instead! -const uint16_t PROGMEM copy_combo[] = {KC_Z, KC_C, COMBO_END}; -const uint16_t PROGMEM paste_combo[] = {KC_X, KC_V, COMBO_END}; +const uint16_t PROGMEM email_combo[] = {KC_E, KC_M, COMBO_END}; +const uint16_t PROGMEM clear_line_combo[] = {KC_BSPC, KC_LSFT, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = { - [ZC_COPY] = COMBO_ACTION(copy_combo), - [XV_PASTE] = COMBO_ACTION(paste_combo), +combo_t key_combos[] = { + [EM_EMAIL] = COMBO_ACTION(email_combo), + [BSPC_LSFT_CLEAR] = COMBO_ACTION(clear_line_combo), }; +/* COMBO_ACTION(x) is same as COMBO(x, KC_NO) */ void process_combo_event(uint16_t combo_index, bool pressed) { switch(combo_index) { - case ZC_COPY: + case EM_EMAIL: if (pressed) { - tap_code16(LCTL(KC_C)); + SEND_STRING("john.doe@example.com"); } break; - case XV_PASTE: + case BSPC_LSFT_CLEAR: if (pressed) { - tap_code16(LCTL(KC_V)); + tap_code16(KC_END); + tap_code16(S(KC_HOME)); + tap_code16(KC_BSPC); } break; } } ``` -This will send Ctrl+C if you hit Z and C, and Ctrl+V if you hit X and V. But you could change this to do stuff like change layers, play sounds, or change settings. +This will send "john.doe@example.com" if you chord E and M together, and clear the current line with Backspace and Left-Shift. You could change this to do stuff like play sounds or change settings. -## Additional Configuration +It is worth noting that `COMBO_ACTION`s are not needed anymore. As of [PR#8591](https://github.com/qmk/qmk_firmware/pull/8591/), it is possible to run your own custom keycodes from combos. Just define the custom keycode, program its functionality in `process_record_user`, and define a combo with `COMBO(, )`. -If you're using long combos, or even longer combos, you may run into issues with this, as the structure may not be large enough to accommodate what you're doing. - -In this case, you can add either `#define EXTRA_LONG_COMBOS` or `#define EXTRA_EXTRA_LONG_COMBOS` in your `config.h` file. - -You may also be able to enable action keys by defining `COMBO_ALLOW_ACTION_KEYS`. - -## Keycodes - -You can enable, disable and toggle the Combo feature on the fly. This is useful if you need to disable them temporarily, such as for a game. +## Keycodes +You can enable, disable and toggle the Combo feature on the fly. This is useful if you need to disable them temporarily, such as for a game. The following keycodes are available for use in your `keymap.c` |Keycode |Description | |----------|---------------------------------| @@ -91,6 +111,187 @@ You can enable, disable and toggle the Combo feature on the fly. This is useful |`CMB_OFF` |Turns off Combo feature | |`CMB_TOG` |Toggles Combo feature on and off | +# Advanced Configuration +These configuration settings can be set in your `config.h` file. + +## Combo Term +By default, the timeout for the Combos to be recognized is set to 50ms. This can be changed if accidental combo misfires are happening or if you're having difficulties pressing keys at the same time. For instance, `#define COMBO_TERM 40` would set the timeout period for combos to 40ms. + +## Buffer and state sizes +If you're using long combos, or you have a lot of overlapping combos, you may run into issues with this, as the buffers may not be large enough to accommodate what you're doing. In this case, you can configure the sizes of the buffers used. Be aware, larger combo sizes and larger buffers will increase memory usage! + +To configure the amount of keys a combo can be composed of, change the following: + +| Keys | Define to be set | +|------|-----------------------------------| +| 6 | `#define EXTRA_SHORT_COMBOS` | +| 8 | QMK Default | +| 16 | `#define EXTRA_LONG_COMBOS` | +| 32 | `#define EXTRA_EXTRA_LONG_COMBOS` | + +Defining `EXTRA_SHORT_COMBOS` combines a combo's internal state into just one byte. This can, in some cases, save some memory. If it doesn't, no point using it. If you do, you also have to make sure you don't define combos with more than 6 keys. + +Processing combos has two buffers, one for the key presses, another for the combos being activated. Use the following options to configure the sizes of these buffers: + +| Define | Default | +|-------------------------------------|------------------------------------------------------| +| `#define COMBO_KEY_BUFFER_LENGTH 8` | 8 (the key amount `(EXTRA_)EXTRA_LONG_COMBOS` gives) | +| `#define COMBO_BUFFER_LENGTH 4` | 4 | + +## Modifier Combos +If a combo resolves to a Modifier, the window for processing the combo can be extended independently from normal combos. By default, this is disabled but can be enabled with `#define COMBO_MUST_HOLD_MODS`, and the time window can be configured with `#define COMBO_HOLD_TERM 150` (default: `TAPPING_TERM`). With `COMBO_MUST_HOLD_MODS`, you cannot tap the combo any more which makes the combo less prone to misfires. + +## Per Combo Timing, Holding and Tapping +For each combo, it is possible to configure the time window it has to pressed in, if it needs to be held down, or if it needs to be tapped. + +For example, tap-only combos are useful if any (or all) of the underlying keys is a Mod-Tap or a Layer-Tap key. When you tap the combo, you get the combo result. When you press the combo and hold it down, the combo doesn't actually activate. Instead the keys are processed separately as if the combo wasn't even there. + +In order to use these features, the following configuration options and functions need to be defined. Coming up with useful timings and configuration is left as an exercise for the reader. + +| Config Flag | Function | Description | +|-----------------------------|-----------------------------------------------------------|--------------------------------------------------------------------------------------------------------| +| `COMBO_TERM_PER_COMBO` | uint16_t get_combo_term(uint16_t index, combo_t \*combo) | Optional per-combo timeout window. (default: `COMBO_TERM`) | +| `COMBO_MUST_HOLD_PER_COMBO` | bool get_combo_must_hold(uint16_t index, combo_t \*combo) | Controls if a given combo should fire immediately on tap or if it needs to be held. (default: `false`) | +| `COMBO_MUST_TAP_PER_COMBO` | bool get_combo_must_tap(uint16_t index, combo_t \*combo) | Controls if a given combo should fire only if tapped within `COMBO_HOLD_TERM`. (default: `false`) | + +Examples: +```c +uint16_t get_combo_term(uint16_t index, combo_t *combo) { + // decide by combo->keycode + switch (combo->keycode) { + case KC_X: + return 50; + } + + // or with combo index, i.e. its name from enum. + switch (index) { + case COMBO_NAME_HERE: + return 9001; + } + + // And if you're feeling adventurous, you can even decide by the keys in the chord, + // i.e. the exact array of keys you defined for the combo. + // This can be useful if your combos have a common key and you want to apply the + // same combo term for all of them. + if (combo->keys[0] == KC_ENTER) { // if first key in the array is KC_ENTER + return 150; + } + + return COMBO_TERM; +} + +bool get_combo_must_hold(uint16_t index, combo_t *combo) { + // Same as above, decide by keycode, the combo index, or by the keys in the chord. + + if (KEYCODE_IS_MOD(combo->keycode) || + (combo->keycode >= QK_MOMENTARY && combo->keycode <= QK_MOMENTARY_MAX) // MO(kc) keycodes + ) { + return true; + } + + switch (index) { + case COMBO_NAME_HERE: + return true; + } + + return false; +} + +bool get_combo_must_tap(uint16_t index, combo_t *combo) { + // If you want all combos to be tap-only, just uncomment the next line + // return true + + // If you want *all* combos, that have Mod-Tap/Layer-Tap/Momentary keys in its chord, to be tap-only, this is for you: + uint16_t key; + uint8_t idx = 0; + while ((key = pgm_read_word(&combo->keys[idx])) != COMBO_END) { + switch (key) { + case QK_MOD_TAP...QK_MOD_TAP_MAX: + case QK_LAYER_TAP...QK_LAYER_TAP_MAX: + case QK_MOMENTARY...QK_MOMENTARY_MAX: + return true; + } + idx += 1; + } + return false; + +} +``` + +## Variable Length Combos +If you leave `COMBO_COUNT` undefined in `config.h`, it allows you to programmatically declare the size of the Combo data structure and avoid updating `COMBO_COUNT`. Instead a variable called `COMBO_LEN` has to be set. It can be set with something similar to the following in `keymap.c`: `uint16_t COMBO_LEN = sizeof(key_combos) / sizeof(key_combos[0]);` or by adding `COMBO_LENGTH` as the *last* entry in the combo enum and then `uint16_t COMBO_LEN = COMBO_LENGTH;` as such: +```c +enum myCombos { + ..., + COMBO_LENGTH +}; +uint16_t COMBO_LEN = COMBO_LENGTH; +``` +Regardless of the method used to declare `COMBO_LEN`, this also requires to convert the `combo_t key_combos[COMBO_COUNT] = {...};` line to `combo_t key_combos[] = {...};`. + + +## Combo timer + +Normally, the timer is started on the first key press and then reset on every subsequent key press within the `COMBO_TERM`. +Inputting combos is relaxed like this, but also slightly more prone to accidental misfires. + +The next two options alter the behaviour of the timer. + +### `#define COMBO_STRICT_TIMER` + +With `COMBO_STRICT_TIMER`, the timer is started only on the first key press. +Inputting combos is now less relaxed; you need to make sure the full chord is pressed within the `COMBO_TERM`. +Misfires are less common but if you type multiple combos fast, there is a +chance that the latter ones might not activate properly. + +### `#define COMBO_NO_TIMER` + +By defining `COMBO_NO_TIMER`, the timer is disabled completely and combos are activated on the first key release. +This also disables the "must hold" functionalities as they just wouldn't work at all. + +## Customizable key releases + +By defining `COMBO_PROCESS_KEY_RELEASE` and implementing the function `bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key_index, uint16_t keycode)`, you can run your custom code on each key release after a combo was activated. For example you could change the RGB colors, activate haptics, or alter the modifiers. + +You can also release a combo early by returning `true` from the function. + +Here's an example where a combo resolves to two modifiers, and on key releases the modifiers are unregistered one by one, depending on which key was released. + +```c +enum combos { + AB_MODS, + COMBO_LENGTH +}; +uint16_t COMBO_LEN = COMBO_LENGTH; + +const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END}; + +combo_t key_combos[] = { + [AB_MODS] = COMBO(ab_combo, LCTL(KC_LSFT)), +}; + +bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key_index, uint16_t keycode) { + switch (combo_index) { + case AB_MODS: + switch(keycode) { + case KC_A: + unregister_mods(MOD_MASK_CTRL); + break; + case KC_B: + unregister_mods(MOD_MASK_SHIFT); + break; + } + return false; // do not release combo + } + return false; +} +``` +## Layer independent combos + +If you, for example, use multiple base layers for different key layouts, one for QWERTY, and another one for Colemak, you might want your combos to work from the same key positions on all layers. Defining the same combos again for another layout is redundant and takes more memory. The solution is to just check the keycodes from one layer. + +With `#define COMBO_ONLY_FROM_LAYER _LAYER_A` the combos' keys are always checked from layer `_LAYER_A` even though the active layer would be `_LAYER_B`. + ## User callbacks In addition to the keycodes, there are a few functions that you can use to set the status, or check it: @@ -101,3 +302,28 @@ In addition to the keycodes, there are a few functions that you can use to set t | `combo_disable()` | Disables the combo feature, and clears the combo buffer | | `combo_toggle()` | Toggles the state of the combo feature | | `is_combo_enabled()` | Returns the status of the combo feature state (true or false) | + + +# Dictionary Management + +Having 3 places to update when adding new combos or altering old ones does become cumbersome when you have a lot of combos. We can alleviate this with some magic! ... If you consider C macros magic. +First, you need to add `VPATH += keyboards/gboards` to your `rules.mk`. Next, include the file `g/keymap_combo.h` in your `keymap.c`. + +!> This functionality uses the same `process_combo_event` function as `COMBO_ACTION` macros do, so you cannot use the function yourself in your keymap. Instead, you have to define the `case`s of the `switch` statement by themselves within `inject.h`, which `g/keymap_combo.h` will then include into the function. + +Then, write your combos in `combos.def` file in the following manner: + +```c +// name result chord keys +COMB(AB_ESC, KC_ESC, KC_A, KC_B) +COMB(JK_TAB, KC_TAB, KC_J, KC_K) +COMB(JKL_SPC, KC_SPC, KC_J, KC_K, KC_L) +COMB(BSSL_CLR, KC_NO, KC_BSPC, KC_LSFT) // using KC_NO as the resulting keycode is the same as COMBO_ACTION before. +COMB(QW_UNDO, C(KC_Z), KC_Q, KC_W) +SUBS(TH_THE, "the", KC_T, KC_H) // SUBS uses SEND_STRING to output the given string. +... +``` + +Now, you can update only one place to add or alter combos. You don't even need to remember to update the `COMBO_COUNT` or the `COMBO_LEN` variables at all. Everything is taken care of. Magic! + +For small to huge ready made dictionaries of combos, you can check out http://combos.gboards.ca/. diff --git a/docs/feature_command.md b/docs/feature_command.md index a4ce3f5ae..830006613 100644 --- a/docs/feature_command.md +++ b/docs/feature_command.md @@ -1,6 +1,6 @@ # Command -Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic](feature_bootmagic.md). There is a lot of overlap between this functionality and the [Bootmagic Keycodes](feature_bootmagic.md#keycodes). Wherever possible we encourage you to use that feature instead of Command. +Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic Lite](feature_bootmagic.md). There is a lot of overlap between this functionality and the [Magic Keycodes](keycodes_magic.md). Wherever possible we encourage you to use that feature instead of Command. On some keyboards Command is disabled by default. If this is the case, it must be explicitly enabled in your `rules.mk`: diff --git a/docs/feature_debounce_type.md b/docs/feature_debounce_type.md index 3ad74224c..f37a785b1 100644 --- a/docs/feature_debounce_type.md +++ b/docs/feature_debounce_type.md @@ -92,15 +92,6 @@ susceptible to noise, you must choose a debounce method that will also mitigate ## Debounce algorithms supported by QMK QMK supports multiple debounce algorithms through its debounce API. -The logic for which debounce method called is below. It checks various defines that you have set in ```rules.mk``` - -``` -DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce -DEBOUNCE_TYPE?= sym_defer_g -ifneq ($(strip $(DEBOUNCE_TYPE)), custom) - QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c -endif -``` ### Debounce selection @@ -121,16 +112,16 @@ DEBOUNCE_TYPE = Where name of algorithm is one of: * ```sym_defer_g``` - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE``` milliseconds of no changes has occurred, all input changes are pushed. * This is the current default algorithm. This is the highest performance algorithm with lowest memory usage, and it's also noise-resistant. -* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row. +* ```sym_eager_pr``` - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE``` milliseconds of no further input for that row. For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use. * ```sym_eager_pk``` - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key * ```sym_defer_pk``` - debouncing per key. On any state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key status change is pushed. +* ```asym_eager_defer_pk``` - debouncing per key. On a key-down state change, response is immediate, followed by ```DEBOUNCE``` milliseconds of no further input for that key. On a key-up state change, a per-key timer is set. When ```DEBOUNCE``` milliseconds of no changes have occurred on that key, the key-up status change is pushed. ### A couple algorithms that could be implemented in the future: * ```sym_defer_pr``` * ```sym_eager_g``` -* ```asym_eager_defer_pk``` ### Use your own debouncing code You have the option to implement you own debouncing algorithm. To do this: @@ -140,11 +131,3 @@ You have the option to implement you own debouncing algorithm. To do this: * Debouncing occurs after every raw matrix scan. * Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly. * If the algorithm might be applicable to other keyboards, please consider adding it to ```quantum/debounce``` - -### Old names -The following old names for existing algorithms will continue to be supported, however it is recommended to use the new names instead. - -* sym_g - old name for sym_defer_g -* eager_pk - old name for sym_eager_pk -* sym_pk - old name for sym_defer_pk -* eager_pr - old name for sym_eager_pr diff --git a/docs/feature_digitizer.md b/docs/feature_digitizer.md new file mode 100644 index 000000000..9b6aeddba --- /dev/null +++ b/docs/feature_digitizer.md @@ -0,0 +1,35 @@ +## Digitizer + +The digitizer HID interface allows setting the mouse cursor position at absolute coordinates, unlike the Pointing Device feature that applies relative displacements. + +To enable the digitizer interface, add the following line to your rules.mk: + +```makefile +DIGITIZER_ENABLE = yes +``` + +In order to change the mouse cursor position from your keymap.c file, include the digitizer header : + +```c +#include "digitizer.h" +``` + +This gives you access to the `digitizer` structure which members allow you to change the cursor position. + +The coordinates are normalized, meaning there value must be set between 0 and 1. For the `x` coordinate, the value `0` is the leftmost position, whereas the value `1` is the rightmost position. +For the `y` coordinate, `0` is at the top and `1` at the bottom. + +Here is an example setting the cursor in the middle of the screen: + +```c +digitizer_t digitizer; +digitizer.x = 0.5; +digitizer.y = 0.5; +digitizer.tipswitch = 0; +digitizer.inrange = 1; +digitizer_set_report(digitizer); +``` + +The `tipswitch` member triggers what equates to a click when set to `1`. The `inrange` member is required for the change in coordinates to be taken. It can then be set to `0` in a new report to signal the end of the digitizer interaction, but it is not strictly required. + +Once all members are set to the desired value, the `status` member needs its bitmask `DZ_UPDATED` to be set so the report is sent during the next main loop iteration. diff --git a/docs/feature_dip_switch.md b/docs/feature_dip_switch.md index 15e449c4c..6fbe91657 100644 --- a/docs/feature_dip_switch.md +++ b/docs/feature_dip_switch.md @@ -9,6 +9,8 @@ and this to your `config.h`: ```c // Connects each switch in the dip switch to the GPIO pin of the MCU #define DIP_SWITCH_PINS { B14, A15, A10, B9 } +// For split keyboards, you can separately define the right side pins +#define DIP_SWITCH_PINS_RIGHT { ... } ``` or @@ -23,8 +25,9 @@ or The callback functions can be inserted into your `.c`: ```c -void dip_switch_update_kb(uint8_t index, bool active) { - dip_switch_update_user(index, active); +bool dip_switch_update_kb(uint8_t index, bool active) { + if (!dip_switch_update_user(index, active)) { return false; } + return true; } ``` @@ -32,7 +35,7 @@ void dip_switch_update_kb(uint8_t index, bool active) { or `keymap.c`: ```c -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if(active) { audio_on(); } else { audio_off(); } @@ -57,6 +60,7 @@ void dip_switch_update_user(uint8_t index, bool active) { } break; } + return true; } ``` @@ -64,8 +68,9 @@ Additionally, we support bit mask functions which allow for more complex handlin ```c -void dip_switch_update_mask_kb(uint32_t state) { - dip_switch_update_mask_user(state); +bool dip_switch_update_mask_kb(uint32_t state) { + if (!dip_switch_update_mask_user(state)) { return false; } + return true; } ``` @@ -73,7 +78,7 @@ void dip_switch_update_mask_kb(uint32_t state) { or `keymap.c`: ```c -void dip_switch_update_mask_user(uint32_t state) { +bool dip_switch_update_mask_user(uint32_t state) { if (state & (1UL<<0) && state & (1UL<<1)) { layer_on(_ADJUST); // C on esc } else { @@ -89,10 +94,10 @@ void dip_switch_update_mask_user(uint32_t state) { } else { layer_off(_TEST_B); } + return true; } ``` - ## Hardware ### Connects each switch in the dip switch to the GPIO pin of the MCU diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index a56f093a3..509f55b91 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md @@ -38,6 +38,12 @@ It can also be defined per-encoder, by instead defining: #define ENCODER_RESOLUTIONS { 4, 2 } ``` +For 4× encoders you also can assign default position if encoder skips pulses when it changes direction. For example, if your encoder send high level on both pins by default, define this: + +```c +#define ENCODER_DEFAULT_POS 0x3 +``` + ## Split Keyboards 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: diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md index a092e784c..469c9c798 100644 --- a/docs/feature_haptic_feedback.md +++ b/docs/feature_haptic_feedback.md @@ -162,4 +162,28 @@ This will set what sequence HPT_RST will set as the active mode. If not defined, ### DRV2605L Continuous Haptic Mode -This mode sets continuous haptic feedback with the option to increase or decrease strength. +This mode sets continuous haptic feedback with the option to increase or decrease strength. + +## Haptic Key Exclusion +The Haptic Exclusion is implemented as `__attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t *record)` in haptic.c. This allows a re-definition at the required level with the specific requirement / exclusion. + +### NO_HAPTIC_MOD +With the entry of `#define NO_HAPTIC_MOD` in config.h, modifiers from Left Control to Right GUI will not trigger a feedback. This also includes modifiers in a Mod Tap configuration. + +### NO_HAPTIC_FN +With the entry of `#define NO_HAPTIC_FN` in config.h, layer keys will not rigger a feedback. + +### NO_HAPTIC_ALPHA +With the entry of `#define NO_HAPTIC_ALPHA` in config.h, none of the alpha keys (A ... Z) will trigger a feedback. + +### NO_HAPTIC_PUNCTUATION +With the entry of `#define NO_HAPTIC_PUNCTUATION` in config.h, none of the following keys will trigger a feedback: Enter, ESC, Backspace, Space, Minus, Equal, Left Bracket, Right Bracket, Backslash, Non-US Hash, Semicolon, Quote, Grave, Comma, Slash, Dot, Non-US Backslash. + +### NO_HAPTIC_LOCKKEYS +With the entry of `#define NO_HAPTIC_LOCKKEYS` in config.h, none of the following keys will trigger a feedback: Caps Lock, Scroll Lock, Num Lock. + +### NO_HAPTIC_NAV +With the entry of `#define NO_HAPTIC_NAV` in config.h, none of the following keys will trigger a feedback: Print Screen, Pause, Insert, Delete, Page Down, Page Up, Left Arrow, Up Arrow, Right Arrow, Down Arrow, End, Home. + +### NO_HAPTIC_NUMERIC +With the entry of `#define NO_HAPTIC_NUMERIC` in config.h, none of the following keys between 0 and 9 (KC_1 ... KC_0) will trigger a feedback. \ No newline at end of file diff --git a/docs/feature_key_overrides.md b/docs/feature_key_overrides.md new file mode 100644 index 000000000..861c4bef5 --- /dev/null +++ b/docs/feature_key_overrides.md @@ -0,0 +1,229 @@ +# Key Overrides + +Key overrides allow you to override modifier-key combinations to send a different modifier-key combination or perform completely custom actions. Don't want `shift` + `1` to type `!` on your computer? Use a key override to make your keyboard type something different when you press `shift` + `1`. The general behavior is like this: If `modifiers w` + `key x` are pressed, replace these keys with `modifiers y` + `key z` in the keyboard report. + +You can use key overrides in a similar way to momentary layer/fn keys to activate custom keycodes/shortcuts, with a number of benefits: You completely keep the original use of the modifier keys, while being able to save space by removing fn keys from your keyboard. You can also easily configure _combinations of modifiers_ to trigger different actions than individual modifiers, and much more. The possibilities are quite vast and this documentation contains a few examples for inspiration throughout. + +##### A few more examples to get started: You could use key overrides to... +- Send `brightness up/down` when pressing `ctrl` + `volume up/down`. +- Send `delete` when pressing `shift` + `backspace`. +- Create custom shortcuts or change existing ones: E.g. Send `ctrl`+`shift`+`z` when `ctrl`+`y` is pressed. +- Run custom code when `ctrl` + `alt` + `esc` is pressed. + +## Setup + +To enable this feature, you need to add `KEY_OVERRIDE_ENABLE = yes` to your `rules.mk`. + +Then, in your `keymap.c` file, you'll need to define the array `key_overrides`, which defines all key overrides to be used. Each override is a value of type `key_override_t`. The array `key_overrides` is `NULL`-terminated and contains pointers to `key_override_t` values (`const key_override_t **`). + +## Creating Key Overrides + +The `key_override_t` struct has many options that allow you to precisely tune your overrides. The full reference is shown below. Instead of manually creating a `key_override_t` value, it is recommended to use these dedicated initializers: + +#### `ko_make_basic(modifiers, key, replacement)` +Returns a `key_override_t`, which sends `replacement` (can be a key-modifer combination), when `key` and `modifiers` are all pressed down. This override still activates if any additional modifiers not specified in `modifiers` are also pressed down. See `ko_make_with_layers_and_negmods` to customize this behavior. + +#### `ko_make_with_layers(modifiers, key, replacement, layers)` +Additionally takes a bitmask `layers` that defines on which layers the override is used. + +#### `ko_make_with_layers_and_negmods(modifiers, key, replacement, layers, negative_mods)` +Additionally takes a bitmask `negative_mods` that defines which modifiers may not be pressed for this override to activate. + +#### `ko_make_with_layers_negmods_and_options(modifiers, key, replacement, layers, negative_mods, options)` +Additionally takes a bitmask `options` that specifies additional options. See `ko_option_t` for available options. + +For more customization possibilities, you may directly create a `key_override_t`, which allows you to customize even more behavior. Read further below for details and examples. + +## Simple Example + +This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized: + +```c +const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPACE, KC_DELETE); + +// This globally defines all key overrides to be used +const key_override_t **key_overrides = (const key_override_t *[]){ + &delete_key_override, + NULL // Null terminate the array of overrides! +}; +``` + +## Intermediate Difficulty Examples + +### Media Controls & Screen Brightness + +In this example a single key is configured to control media, volume and screen brightness by using key overrides. + +- The key is set to send `play/pause` in the keymap. + +The following key overrides will be configured: + +- `Ctrl` + `play/pause` will send `next track`. +- `Ctrl` + `Shift` + `play/pause` will send `previous track`. +- `Alt` + `play/pause` will send `volume up`. +- `Alt` + `Shift` + `play/pause` will send `volume down`. +- `Ctrl` + `Alt` + `play/pause` will send `brightness up`. +- `Ctrl` + `Alt` + `Shift` + `play/pause` will send `brightness down`. + + +```c +const key_override_t next_track_override = + ko_make_with_layers_negmods_and_options( + MOD_MASK_CTRL, // Trigger modifiers: ctrl + KC_MPLY, // Trigger key: play/pause + KC_MNXT, // Replacement key + ~0, // Activate on all layers + MOD_MASK_SA, // Do not activate when shift or alt are pressed + ko_option_no_reregister_trigger); // Specifies that the play key is not registered again after lifting ctrl + +const key_override_t prev_track_override = ko_make_with_layers_negmods_and_options(MOD_MASK_CS, KC_MPLY, + KC_MPRV, ~0, MOD_MASK_ALT, ko_option_no_reregister_trigger); + +const key_override_t vol_up_override = ko_make_with_layers_negmods_and_options(MOD_MASK_ALT, KC_MPLY, + KC_VOLU, ~0, MOD_MASK_CS, ko_option_no_reregister_trigger); + +const key_override_t vol_down_override = ko_make_with_layers_negmods_and_options(MOD_MASK_SA, KC_MPLY, + KC_VOLD, ~0, MOD_MASK_CTRL, ko_option_no_reregister_trigger); + +const key_override_t brightness_up_override = ko_make_with_layers_negmods_and_options(MOD_MASK_CA, KC_MPLY, + KC_BRIU, ~0, MOD_MASK_SHIFT, ko_option_no_reregister_trigger); + +const key_override_t brightness_down_override = ko_make_basic(MOD_MASK_CSA, KC_MPLY, KC_BRID); + +// This globally defines all key overrides to be used +const key_override_t **key_overrides = (const key_override_t *[]){ + &next_track_override, + &prev_track_override, + &vol_up_override, + &vol_down_override, + &brightness_up_override, + &brightness_down_override, + NULL +}; +``` + +### Flexible macOS-friendly Grave Escape +The [Grave Escape feature](https://docs.qmk.fm/using-qmk/advanced-keycodes/feature_grave_esc) is limited in its configurability and has [bugs when used on macOS](https://docs.qmk.fm/using-qmk/advanced-keycodes/feature_grave_esc#caveats). Key overrides can be used to achieve a similar functionality as Grave Escape, but with more customization and without bugs on macOS. + +```c +// Shift + esc = ~ +const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRAVE)); + +// GUI + esc = ` +const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRAVE); + +const key_override_t **key_overrides = (const key_override_t *[]){ + &tilde_esc_override, + &grave_esc_override, + NULL +}; +``` + +In addition to not encountering unexpected bugs on macOS, you can also change the behavior as you wish. Instead setting `GUI` + `ESC` = `` ` `` you may change it to an arbitrary other modifier, for example `Ctrl` + `ESC` = `` ` ``. + +## Advanced Examples +### Modifiers as Layer Keys + +Do you really need a dedicated key to toggle your fn layer? With key overrides, perhaps not. This example shows how you can configure to use `rGUI` + `rAlt` (right GUI and right alt) to access a momentary layer like an fn layer. With this you completely eliminate the need to use a dedicated layer key. Of course the choice of modifier keys can be changed as needed, `rGUI` + `rAlt` is just an example here. + +```c +// This is called when the override activates and deactivates. Enable the fn layer on activation and disable on deactivation +bool momentary_layer(bool key_down, void *layer) { + if (key_down) { + layer_on((uint8_t)(uintptr_t)layer); + } else { + layer_off((uint8_t)(uintptr_t)layer); + } + + return false; +} + +const key_override_t fn_override = {.trigger_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL), // + .layers = ~(1 << LAYER_FN), // + .suppressed_mods = MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL), // + .options = ko_option_no_unregister_on_other_key_down, // + .negative_mod_mask = (uint8_t) ~(MOD_BIT(KC_RGUI) | MOD_BIT(KC_RCTL)), // + .custom_action = momentary_layer, // + .context = (void *)LAYER_FN, // + .trigger = KC_NO, // + .replacement = KC_NO, // + .enabled = NULL}; +``` + +## Keycodes + +You can enable, disable and toggle all key overrides on the fly. + +|Keycode |Description |Function Equivalent| +|----------|---------------------------------|--------| +|`KEY_OVERRIDE_ON` |Turns on Key Override feature | `key_override_on(void)`| +|`KEY_OVERRIDE_OFF` |Turns off Key Override feature |`key_override_off(void)`| +|`KEY_OVERRIDE_TOGGLE` |Toggles Key Override feature on and off |`key_override_toggle(void)`| + +## Reference for `key_override_t` + +Advanced users may need more customization than what is offered by the simple `ko_make` initializers. For this, directly create a `key_override_t` value and set all members. Below is a reference for all members of `key_override_t`. + +| Member | Description | +|--------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `uint16_t trigger` | The non-modifier keycode that triggers the override. This keycode, and the necessary modifiers (`trigger_mods`) must be pressed to activate this override. Set this to the keycode of the key that should activate the override. Set to `KC_NO` to require only the necessary modifiers to be pressed and no non-modifier. | +| `uint8_t trigger_mods` | Which mods need to be down for activation. If both sides of a modifier are set (e.g. left ctrl and right ctrl) then only one is required to be pressed (e.g. left ctrl suffices). Use the `MOD_MASK_XXX` and `MOD_BIT()` macros for this. | +| `layer_state_t layers` | This is a BITMASK (!), defining which layers this override applies to. To use this override on layer i set the ith bit `(1 << i)`. | +| `uint8_t negative_mod_mask` | Which modifiers cannot be down. It must hold that `(active_modifiers & negative_mod_mask) == 0`, otherwise the key override will not be activated. An active override will be deactivated once this is no longer true. | +| `uint8_t suppressed_mods` | Modifiers to 'suppress' while the override is active. To suppress a modifier means that even though the modifier key is held down, the host OS sees the modifier as not pressed. Can be used to suppress the trigger modifiers, as a trivial example. | +| `uint16_t replacement` | The complex keycode to send as replacement when this override is triggered. This can be a simple keycode, a key-modifier combination (e.g. `C(KC_A)`), or `KC_NO` (to register no replacement keycode). Use in combination with suppressed_mods to get the correct modifiers to be sent. | +| `ko_option_t options` | Options controlling the behavior of the override, such as what actions are allowed to activate the override. | +| `bool (*custom_action)(bool activated, void *context)` | If not NULL, this function will be called right before the replacement key is registered, along with the provided context and a flag indicating whether the override was activated or deactivated. This function allows you to run some custom actions for specific key overrides. If you return `false`, the replacement key is not registered/unregistered as it would normally. Return `true` to register and unregister the override normally. | +| `void *context` | A context that will be passed to the custom action function. | +| `bool *enabled` | If this points to false this override will not be used. Set to NULL to always have this override enabled. | + +### Reference for `ko_option_t` + +Bitfield with various options controlling the behavior of a key override. + +| Value | Description | +|------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `ko_option_activation_trigger_down` | Allow activating when the trigger key is pressed down. | +| `ko_option_activation_required_mod_down` | Allow activating when a necessary modifier is pressed down. | +| `ko_option_activation_negative_mod_up` | Allow activating when a negative modifier is released. | +| `ko_option_one_mod` | If set, any of the modifiers in `trigger_mods` will be enough to activate the override (logical OR of modifiers). If not set, all the modifiers in `trigger_mods` have to be pressed (logical AND of modifiers). | +| `ko_option_no_unregister_on_other_key_down` | If set, the override will not deactivate when another key is pressed down. Use only if you really know you need this. | +| `ko_option_no_reregister_trigger` | If set, the trigger key will never be registered again after the override is deactivated. | +| `ko_options_default` | The default options used by the `ko_make_xxx` functions | + +## For Advanced Users: Inner Workings + +This section explains how a key override works in detail, explaining where each member of `key_override_t` comes into play. Understanding this is essential to be able to take full advantage of all the options offered by key overrides. + +#### Activation + +When the necessary keys are pressed (`trigger_mods` + `trigger`), the override is 'activated' and the replacement key is registered in the keyboard report (`replacement`), while the `trigger` key is removed from the keyboard report. The trigger modifiers may also be removed from the keyboard report upon activation of an override (`suppressed_mods`). The override will not activate if any of the `negative_modifiers` are pressed. + +Overrides can activate in three different cases: + +1. The trigger key is pressed down and necessary modifiers are already down. +2. A necessary modifier is pressed down, while the trigger key and other necessary modifiers are already down. +3. A negative modifier is released, while all necessary modifiers and the trigger key are already down. + +Use the `option` member to customize which of these events are allowed to activate your overrides (default: all three). + +In any case, a key override can only activate if the `trigger` key is the _last_ non-modifier key that was pressed down. This emulates the behavior of how standard OSes (macOS, Windows, Linux) handle normal key input (to understand: Hold down `a`, then also hold down `b`, then hold down `shift`; `B` will be typed but not `A`). + +#### Deactivation + +An override is 'deactivated' when one of the trigger keys (`trigger_mods`, `trigger`) is lifted, another non-modifier key is pressed down, or one of the `negative_modifiers` is pressed down. When an override deactivates, the `replacement` key is removed from the keyboard report, while the `suppressed_mods` that are still held down are re-added to the keyboard report. By default, the `trigger` key is re-added to the keyboard report if it is still held down and no other non-modifier key has been pressed since. This again emulates the behavior of how standard OSes handle normal key input (To understand: hold down `a`, then also hold down `b`, then also `shift`, then release `b`; `A` will not be typed even though you are holding the `a` and `shift` keys). Use the `option` field `ko_option_no_reregister_trigger` to prevent re-registering the trigger key in all cases. + +#### Key Repeat Delay + +A third way in which standard OS-handling of modifier-key input is emulated in key overrides is with a ['key repeat delay'](https://www.dummies.com/computers/pcs/set-your-keyboards-repeat-delay-and-repeat-rate/). To explain what this is, let's look at how normal keyboard input is handled by mainstream OSes again: If you hold down `a`, followed by `shift`, you will see the letter `a` is first typed, then for a short moment nothing is typed and then repeating `A`s are typed. Take note that, although shift is pressed down just after `a` is pressed, it takes a moment until `A` is typed. This is caused by the aforementioned key repeat delay, and it is a feature that prevents unwanted repeated characters from being typed. + +This applies equally to releasing a modifier: When you hold `shift`, then press `a`, the letter `A` is typed. Now if you release `shift` first, followed by `a` shortly after, you will not see the letter `a` being typed, even though for a short moment of time you were just holding down the key `a`. This is because no modified characters are typed until the key repeat delay has passed. + + This exact behavior is implemented in key overrides as well: If a key override for `shift` + `a` = `b` exists, and `a` is pressed and held, followed by `shift`, you will not immediately see the letter `b` being typed. Instead, this event is deferred for a short moment, until the key repeat delay has passed, measured from the moment when the trigger key (`a`) was pressed down. + +The duration of the key repeat delay is controlled with the `KEY_OVERRIDE_REPEAT_DELAY` macro. Define this value in your `config.h` file to change it. It is 500ms by default. + + +## Difference to Combos + +Note that key overrides are very different from [combos](https://docs.qmk.fm/#/feature_combo). Combos require that you press down several keys almost _at the same time_ and can work with any combination of non-modifier keys. Key overrides work like keyboard shortcuts (e.g. `ctrl` + `z`): They take combinations of _multiple_ modifiers and _one_ non-modifier key to then perform some custom action. Key overrides are implemented with much care to behave just like normal keyboard shortcuts would in regards to the order of pressed keys, timing, and interacton with other pressed keys. There are a number of optional settings that can be used to really fine-tune the behavior of each key override as well. Using key overrides also does not delay key input for regular key presses, which inherently happens in combos and may be undesirable. diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md index 5134ab6ef..fc6682601 100644 --- a/docs/feature_led_matrix.md +++ b/docs/feature_led_matrix.md @@ -52,7 +52,7 @@ Here is an example using 2 drivers. Define these arrays listing all the LEDs in your `.c`: ```c -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | LED address @@ -63,7 +63,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { } ``` -Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ). +Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/led/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ). --- @@ -164,26 +164,26 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con |Define |Description | |-------------------------------------------------------|-----------------------------------------------| -|`#define DISABLE_LED_MATRIX_ALPHAS_MODS` |Disables `LED_MATRIX_ALPHAS_MODS` | -|`#define DISABLE_LED_MATRIX_BREATHING` |Disables `LED_MATRIX_BREATHING` | -|`#define DISABLE_LED_MATRIX_BAND` |Disables `LED_MATRIX_BAND` | -|`#define DISABLE_LED_MATRIX_BAND_PINWHEEL` |Disables `LED_MATRIX_BAND_PINWHEEL` | -|`#define DISABLE_LED_MATRIX_BAND_SPIRAL` |Disables `LED_MATRIX_BAND_SPIRAL` | -|`#define DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT` |Disables `LED_MATRIX_CYCLE_LEFT_RIGHT` | -|`#define DISABLE_LED_MATRIX_CYCLE_UP_DOWN` |Disables `LED_MATRIX_CYCLE_UP_DOWN` | -|`#define DISABLE_LED_MATRIX_CYCLE_OUT_IN` |Disables `LED_MATRIX_CYCLE_OUT_IN` | -|`#define DISABLE_LED_MATRIX_DUAL_BEACON` |Disables `LED_MATRIX_DUAL_BEACON` | -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `LED_MATRIX_SOLID_REACTIVE_SIMPLE` | -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE` |Disables `LED_MATRIX_SOLID_REACTIVE_WIDE` | -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` | -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS` |Disables `LED_MATRIX_SOLID_REACTIVE_CROSS` | -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTICROSS`| -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS` |Disables `LED_MATRIX_SOLID_REACTIVE_NEXUS` | -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTINEXUS`| -|`#define DISABLE_LED_MATRIX_SOLID_SPLASH` |Disables `LED_MATRIX_SOLID_SPLASH` | -|`#define DISABLE_LED_MATRIX_SOLID_MULTISPLASH` |Disables `LED_MATRIX_SOLID_MULTISPLASH` | -|`#define DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT` |Disables `LED_MATRIX_WAVE_LEFT_RIGHT` | -|`#define DISABLE_LED_MATRIX_WAVE_UP_DOWN` |Disables `LED_MATRIX_WAVE_UP_DOWN` | +|`#define ENABLE_LED_MATRIX_ALPHAS_MODS` |Enables `LED_MATRIX_ALPHAS_MODS` | +|`#define ENABLE_LED_MATRIX_BREATHING` |Enables `LED_MATRIX_BREATHING` | +|`#define ENABLE_LED_MATRIX_BAND` |Enables `LED_MATRIX_BAND` | +|`#define ENABLE_LED_MATRIX_BAND_PINWHEEL` |Enables `LED_MATRIX_BAND_PINWHEEL` | +|`#define ENABLE_LED_MATRIX_BAND_SPIRAL` |Enables `LED_MATRIX_BAND_SPIRAL` | +|`#define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT` |Enables `LED_MATRIX_CYCLE_LEFT_RIGHT` | +|`#define ENABLE_LED_MATRIX_CYCLE_UP_DOWN` |Enables `LED_MATRIX_CYCLE_UP_DOWN` | +|`#define ENABLE_LED_MATRIX_CYCLE_OUT_IN` |Enables `LED_MATRIX_CYCLE_OUT_IN` | +|`#define ENABLE_LED_MATRIX_DUAL_BEACON` |Enables `LED_MATRIX_DUAL_BEACON` | +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE` |Enables `LED_MATRIX_SOLID_REACTIVE_SIMPLE` | +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE` |Enables `LED_MATRIX_SOLID_REACTIVE_WIDE` | +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Enables `LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` | +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS` |Enables `LED_MATRIX_SOLID_REACTIVE_CROSS` | +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS` |Enables `LED_MATRIX_SOLID_REACTIVE_MULTICROSS`| +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS` |Enables `LED_MATRIX_SOLID_REACTIVE_NEXUS` | +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Enables `LED_MATRIX_SOLID_REACTIVE_MULTINEXUS`| +|`#define ENABLE_LED_MATRIX_SOLID_SPLASH` |Enables `LED_MATRIX_SOLID_SPLASH` | +|`#define ENABLE_LED_MATRIX_SOLID_MULTISPLASH` |Enables `LED_MATRIX_SOLID_MULTISPLASH` | +|`#define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT` |Enables `LED_MATRIX_WAVE_LEFT_RIGHT` | +|`#define ENABLE_LED_MATRIX_WAVE_UP_DOWN` |Enables `LED_MATRIX_WAVE_UP_DOWN` | ## Custom LED Matrix Effects :id=custom-led-matrix-effects @@ -262,7 +262,7 @@ For inspiration and examples, check out the built-in effects under `quantum/led_ #define LED_MATRIX_FRAMEBUFFER_EFFECTS // enable framebuffer effects #define LED_DISABLE_TIMEOUT 0 // number of milliseconds to wait until led automatically turns off #define LED_DISABLE_AFTER_TIMEOUT 0 // OBSOLETE: number of ticks to wait until disabling effects -#define LED_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +#define LED_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define LED_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) #define LED_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define LED_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs @@ -350,30 +350,3 @@ void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { LED_MATRIX_INDICATOR_SET_VALUE(index, value); } ``` - -## Suspended State :id=suspended-state -To use the suspend feature, make sure that `#define LED_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file. - -Additionally add this to your `.c`: - -```c -void suspend_power_down_kb(void) { - led_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - led_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} -``` -or add this to your `keymap.c`: -```c -void suspend_power_down_user(void) { - led_matrix_set_suspend_state(true); -} - -void suspend_wakeup_init_user(void) { - led_matrix_set_suspend_state(false); -} -``` diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index f3b659b1b..c97843cfb 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -21,13 +21,23 @@ Hardware configurations using Arm-based microcontrollers or different sizes of O To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`: ```make -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +``` + +## OLED type +|OLED Driver |Supported Device | +|-------------------|---------------------------| +|SSD1306 (default) |For both SSD1306 and SH1106| + +e.g. +```make +OLED_DRIVER = SSD1306 ``` Then in your `keymap.c` file, implement the OLED task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`: ```c -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -114,7 +124,7 @@ static void fade_display(void) { In split keyboards, it is very common to have two OLED displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g: ```c -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand @@ -346,6 +356,10 @@ bool oled_scroll_left(void); // Returns true if the screen was not scrolling or stops scrolling bool oled_scroll_off(void); +// Inverts the display +// Returns true if the screen was or is inverted +bool oled_invert(bool invert); + // Returns the maximum number of characters that will fit on a line uint8_t oled_max_chars(void); diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md index 8e84e22d8..776a33150 100644 --- a/docs/feature_ps2_mouse.md +++ b/docs/feature_ps2_mouse.md @@ -50,7 +50,7 @@ In your keyboard config.h: #endif ``` -## Interrupt Version :id=interrupt-version +### Interrupt Version (AVR/ATMega32u4) :id=interrupt-version-avr The following example uses D2 for clock and D5 for data. You can use any INT or PCINT pin for clock, and any pin for data. @@ -88,7 +88,31 @@ In your keyboard config.h: #endif ``` -## USART Version :id=usart-version +### Interrupt Version (ARM chibios) :id=interrupt-version-chibios + +Pretty much any two pins can be used for the (software) interrupt variant on ARM cores. The example below uses A8 for clock, and A9 for data. + +In rules.mk: + +``` +PS2_MOUSE_ENABLE = yes +PS2_USE_INT = yes +``` + +In your keyboard config.h: + +```c +#define PS2_CLOCK A8 +#define PS2_DATA A9 +``` + +And in the chibios specifig halconf.h: +```c +#define PAL_USE_CALLBACKS TRUE +``` + + +### USART Version :id=usart-version To use USART on the ATMega32u4, you have to use PD5 for clock and PD2 for data. If one of those are unavailable, you need to use interrupt version. @@ -246,6 +270,16 @@ Fine control over the scrolling is supported with the following defines: #define PS2_MOUSE_SCROLL_DIVISOR_V 2 ``` +### Invert Mouse buttons :id=invert-buttons + +To invert the left & right buttons you can put: + +```c +#define PS2_MOUSE_INVERT_BUTTONS +``` + +into config.h. + ### Invert Mouse and Scroll Axes :id=invert-mouse-and-scroll-axes To invert the X and Y axes you can put: diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 08d5c9c4c..42a57aec1 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md @@ -52,7 +52,7 @@ Here is an example using 2 drivers. Define these arrays listing all the LEDs in your `.c`: ```c -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -64,7 +64,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { } ``` -Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3`). +Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/led/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3`). --- ### IS31FL3733 :id=is31fl3733 @@ -122,7 +122,7 @@ Currently only 4 drivers are supported, but it would be trivial to support all 8 Define these arrays listing all the LEDs in your `.c`: ```c -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -134,7 +134,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { } ``` -Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` for now). +Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/led/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` for now). --- ### IS31FL3737 :id=is31fl3737 @@ -145,9 +145,22 @@ There is basic support for addressable RGB matrix lighting with the I2C IS31FL37 RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3737 ``` +You can use between 1 and 2 IS31FL3737 IC's. Do not specify `DRIVER_ADDR_2` define for second IC if not present on your keyboard. Configure the hardware via your `config.h`: +| Variable | Description | Default | +|----------|-------------|---------| +| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | +| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | +| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | +| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | +| `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | +| `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | | + + +Here is an example using 2 drivers. + ```c // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) @@ -159,19 +172,21 @@ Configure the hardware via your `config.h`: // ADDR represents A3:A0 of the 7-bit address. // The result is: 0b101(ADDR) #define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +#define DRIVER_ADDR_2 0b1010001 #define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 64 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_1_LED_TOTAL 30 +#define DRIVER_2_LED_TOTAL 36 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) ``` +!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`. -Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1` +Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. Define these arrays listing all the LEDs in your `.c`: ```c -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -183,7 +198,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { } ``` -Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3737.pdf) and the header file `drivers/issi/is31fl3737.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now). +Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](https://www.issi.com/WW/pdf/31FL3737.pdf) and the header file `drivers/led/issi/is31fl3737.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0`, `1` for now). --- @@ -227,6 +242,75 @@ Configure the hardware via your `config.h`: #define DRIVER_LED_TOTAL 70 ``` +--- +### AW20216 :id=aw20216 +There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`: + +```makefile +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = AW20216 +``` + +You can use up to 2 AW20216 IC's. Do not specify `DRIVER__xxx` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`: + +| Variable | Description | Default | +|----------|-------------|---------| +| `DRIVER_1_CS` | (Required) MCU pin connected to first RGB driver chip select line | B13 | +| `DRIVER_2_CS` | (Optional) MCU pin connected to second RGB driver chip select line | | +| `DRIVER_1_EN` | (Required) MCU pin connected to first RGB driver hardware enable line | C13 | +| `DRIVER_2_EN` | (Optional) MCU pin connected to second RGB driver hardware enable line | | +| `DRIVER_1_LED_TOTAL` | (Required) How many RGB lights are connected to first RGB driver | | +| `DRIVER_2_LED_TOTAL` | (Optional) How many RGB lights are connected to second RGB driver | | +| `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | +| `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | +| `AW_SCALING_MAX` | (Optional) LED current scaling value (0-255, higher values mean LED is brighter at full PWM) | 150 | +| `AW_GLOBAL_CURRENT_MAX` | (Optional) Driver global current limit (0-255, higher values means the driver may consume more power) | 150 | +| `AW_SPI_DIVISOR` | (Optional) Clock divisor for SPI communication (powers of 2, smaller numbers means faster communication, should not be less than 4) | 4 | + +Here is an example using 2 drivers. + +```c +#define DRIVER_1_CS B13 +#define DRIVER_2_CS B14 +// Hardware enable lines may be connected to the same pin +#define DRIVER_1_EN C13 +#define DRIVER_2_EN C13 + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 66 +#define DRIVER_2_LED_TOTAL 32 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +``` + +!> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`. + +Define these arrays listing all the LEDs in your `.c`: + +```c +const aw_led __flash g_aw_leds[DRIVER_LED_TOTAL] = { +/* Each AW20216 channel is controlled by a register at some offset between 0x00 + * and 0xD7 inclusive. + * See drivers/awinic/aw20216.h for the mapping between register offsets and + * driver pin locations. + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + { 0, CS1_SW1, CS2_SW1, CS3_SW1 }, + { 0, CS4_SW1, CS5_SW1, CS6_SW1 }, + { 0, CS7_SW1, CS8_SW1, CS9_SW1 }, + { 0, CS10_SW1, CS11_SW1, CS12_SW1 }, + { 0, CS13_SW1, CS14_SW1, CS15_SW1 }, + ... + { 1, CS1_SW1, CS2_SW1, CS3_SW1 }, + { 1, CS13_SW1, CS14_SW1, CS15_SW1 }, + { 1, CS16_SW1, CS17_SW1, CS18_SW1 }, + { 1, CS4_SW2, CS5_SW2, CS6_SW2 }, + ... +}; +``` + --- ## Common Configuration :id=common-configuration @@ -364,46 +448,46 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con |Define |Description | |-------------------------------------------------------|-----------------------------------------------| -|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` | -|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` | -|`#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT` |Disables `MATRIX_GRADIENT_LEFT_RIGHT` | -|`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` | -|`#define DISABLE_RGB_MATRIX_BAND_SAT` |Disables `RGB_MATRIX_BAND_SAT` | -|`#define DISABLE_RGB_MATRIX_BAND_VAL` |Disables `RGB_MATRIX_BAND_VAL` | -|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT` |Disables `RGB_MATRIX_BAND_PINWHEEL_SAT` | -|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL` |Disables `RGB_MATRIX_BAND_PINWHEEL_VAL` | -|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT` |Disables `RGB_MATRIX_BAND_SPIRAL_SAT` | -|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL` |Disables `RGB_MATRIX_BAND_SPIRAL_VAL` | -|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | -|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | -|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` | -|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN` |Disables `RGB_MATRIX_CYCLE_OUT_IN` | -|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Disables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` | -|`#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL` |Disables `RGB_MATRIX_CYCLE_PINWHEEL` | -|`#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL` |Disables `RGB_MATRIX_CYCLE_SPIRAL` | -|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` | -|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | -|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | -|`#define DISABLE_RGB_MATRIX_HUE_BREATHING` |Disables `RGB_MATRIX_HUE_BREATHING` | -|`#define DISABLE_RGB_MATRIX_HUE_PENDULUM` |Disables `RGB_MATRIX_HUE_PENDULUM` | -|`#define DISABLE_RGB_MATRIX_HUE_WAVE ` |Disables `RGB_MATRIX_HUE_WAVE ` | -|`#define DISABLE_RGB_MATRIX_TYPING_HEATMAP` |Disables `RGB_MATRIX_TYPING_HEATMAP` | -|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_WIDE` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_CROSS` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTICROSS`| -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` |Disables `RGB_MATRIX_SOLID_REACTIVE_NEXUS` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS`| -|`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` | -|`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` | -|`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` | -|`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` | +|`#define ENABLE_RGB_MATRIX_ALPHAS_MODS` |Enables `RGB_MATRIX_ALPHAS_MODS` | +|`#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Enables `RGB_MATRIX_GRADIENT_UP_DOWN` | +|`#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT` |Enables `MATRIX_GRADIENT_LEFT_RIGHT` | +|`#define ENABLE_RGB_MATRIX_BREATHING` |Enables `RGB_MATRIX_BREATHING` | +|`#define ENABLE_RGB_MATRIX_BAND_SAT` |Enables `RGB_MATRIX_BAND_SAT` | +|`#define ENABLE_RGB_MATRIX_BAND_VAL` |Enables `RGB_MATRIX_BAND_VAL` | +|`#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT` |Enables `RGB_MATRIX_BAND_PINWHEEL_SAT` | +|`#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL` |Enables `RGB_MATRIX_BAND_PINWHEEL_VAL` | +|`#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT` |Enables `RGB_MATRIX_BAND_SPIRAL_SAT` | +|`#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL` |Enables `RGB_MATRIX_BAND_SPIRAL_VAL` | +|`#define ENABLE_RGB_MATRIX_CYCLE_ALL` |Enables `RGB_MATRIX_CYCLE_ALL` | +|`#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Enables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | +|`#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Enables `RGB_MATRIX_CYCLE_UP_DOWN` | +|`#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Enables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` | +|`#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN` |Enables `RGB_MATRIX_CYCLE_OUT_IN` | +|`#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Enables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` | +|`#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL` |Enables `RGB_MATRIX_CYCLE_PINWHEEL` | +|`#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL` |Enables `RGB_MATRIX_CYCLE_SPIRAL` | +|`#define ENABLE_RGB_MATRIX_DUAL_BEACON` |Enables `RGB_MATRIX_DUAL_BEACON` | +|`#define ENABLE_RGB_MATRIX_RAINBOW_BEACON` |Enables `RGB_MATRIX_RAINBOW_BEACON` | +|`#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Enables `RGB_MATRIX_RAINBOW_PINWHEELS` | +|`#define ENABLE_RGB_MATRIX_RAINDROPS` |Enables `RGB_MATRIX_RAINDROPS` | +|`#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Enables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | +|`#define ENABLE_RGB_MATRIX_HUE_BREATHING` |Enables `RGB_MATRIX_HUE_BREATHING` | +|`#define ENABLE_RGB_MATRIX_HUE_PENDULUM` |Enables `RGB_MATRIX_HUE_PENDULUM` | +|`#define ENABLE_RGB_MATRIX_HUE_WAVE ` |Enables `RGB_MATRIX_HUE_WAVE ` | +|`#define ENABLE_RGB_MATRIX_TYPING_HEATMAP` |Enables `RGB_MATRIX_TYPING_HEATMAP` | +|`#define ENABLE_RGB_MATRIX_DIGITAL_RAIN` |Enables `RGB_MATRIX_DIGITAL_RAIN` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Enables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE` |Enables `RGB_MATRIX_SOLID_REACTIVE` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE` |Enables `RGB_MATRIX_SOLID_REACTIVE_WIDE` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Enables `RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS` |Enables `RGB_MATRIX_SOLID_REACTIVE_CROSS` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS` |Enables `RGB_MATRIX_SOLID_REACTIVE_MULTICROSS`| +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` |Enables `RGB_MATRIX_SOLID_REACTIVE_NEXUS` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Enables `RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS`| +|`#define ENABLE_RGB_MATRIX_SPLASH` |Enables `RGB_MATRIX_SPLASH` | +|`#define ENABLE_RGB_MATRIX_MULTISPLASH` |Enables `RGB_MATRIX_MULTISPLASH` | +|`#define ENABLE_RGB_MATRIX_SOLID_SPLASH` |Enables `RGB_MATRIX_SOLID_SPLASH` | +|`#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Enables `RGB_MATRIX_SOLID_MULTISPLASH` | ### RGB Matrix Effect Typing Heatmap :id=rgb-matrix-effect-typing-heatmap @@ -485,28 +569,29 @@ For inspiration and examples, check out the built-in effects under `quantum/rgb_ These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions. -|RGB |HSV | -|-------------------|-------------------| -|`RGB_WHITE` |`HSV_WHITE` | -|`RGB_RED` |`HSV_RED` | -|`RGB_CORAL` |`HSV_CORAL` | -|`RGB_ORANGE` |`HSV_ORANGE` | -|`RGB_GOLDENROD` |`HSV_GOLDENROD` | -|`RGB_GOLD` |`HSV_GOLD` | -|`RGB_YELLOW` |`HSV_YELLOW` | -|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` | -|`RGB_GREEN` |`HSV_GREEN` | -|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` | -|`RGB_TURQUOISE` |`HSV_TURQUOISE` | -|`RGB_TEAL` |`HSV_TEAL` | -|`RGB_CYAN` |`HSV_CYAN` | -|`RGB_AZURE` |`HSV_AZURE` | -|`RGB_BLUE` |`HSV_BLUE` | -|`RGB_PURPLE` |`HSV_PURPLE` | -|`RGB_MAGENTA` |`HSV_MAGENTA` | -|`RGB_PINK` |`HSV_PINK` | +|RGB |HSV | +|---------------------|---------------------| +|`RGB_AZURE` |`HSV_AZURE` | +|`RGB_BLACK`/`RGB_OFF`|`HSV_BLACK`/`HSV_OFF`| +|`RGB_BLUE` |`HSV_BLUE` | +|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` | +|`RGB_CORAL` |`HSV_CORAL` | +|`RGB_CYAN` |`HSV_CYAN` | +|`RGB_GOLD` |`HSV_GOLD` | +|`RGB_GOLDENROD` |`HSV_GOLDENROD` | +|`RGB_GREEN` |`HSV_GREEN` | +|`RGB_MAGENTA` |`HSV_MAGENTA` | +|`RGB_ORANGE` |`HSV_ORANGE` | +|`RGB_PINK` |`HSV_PINK` | +|`RGB_PURPLE` |`HSV_PURPLE` | +|`RGB_RED` |`HSV_RED` | +|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` | +|`RGB_TEAL` |`HSV_TEAL` | +|`RGB_TURQUOISE` |`HSV_TURQUOISE` | +|`RGB_WHITE` |`HSV_WHITE` | +|`RGB_YELLOW` |`HSV_YELLOW` | -These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list! +These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h). Feel free to add to this list! ## Additional `config.h` Options :id=additional-configh-options @@ -657,29 +742,41 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } ``` -### 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. +#### Examples :id=indicator-examples -Additionally add this to your `.c`: +This example sets the modifiers to be a specific color based on the layer state. You can use a switch case here, instead, if you would like. This uses HSV and then converts to RGB, because this allows the brightness to be limited (important when using the WS2812 driver). ```c -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + HSV hsv = {0, 255, 255}; + + if (layer_state_is(layer_state, 2)) { + hsv = {130, 255, 255}; + } else { + hsv = {30, 255, 255}; + } + + if (hsv.v > rgb_matrix_get_val()) { + hsv.v = rgb_matrix_get_val(); + } + RGB rgb = hsv_to_rgb(hsv); + + for (uint8_t i = led_min; i <= led_max; i++) { + if (HAS_FLAGS(g_led_config.flags[i], 0x01)) { // 0x01 == LED_FLAG_MODIFIER + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + } } ``` -or add this to your `keymap.c`: + +If you want to indicate a Host LED status (caps lock, num lock, etc), you can use something like this to light up the caps lock key: + ```c -void suspend_power_down_user(void) { - rgb_matrix_set_suspend_state(true); -} - -void suspend_wakeup_init_user(void) { - rgb_matrix_set_suspend_state(false); +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(5, 255, 255, 255); // assuming caps lock is at led #5 + } else { + RGB_MATRIX_INDICATOR_SET_COLOR(5, 0, 0, 0); + } } ``` diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 994a014a2..8484586c0 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md @@ -119,7 +119,7 @@ if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a n Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstration. -Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol. +Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight/rgblight.h` there is a contrast table between the old mode number and the current symbol. ### Effect and Animation Toggles @@ -326,9 +326,13 @@ would turn the layer 0 (or 1) on and off again three times when `DEBUG` is press Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `RGB_TOG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`. +### Retain brightness + +Usually lighting layers apply their configured brightness once activated. If you would like lighting layers to retain the currently used brightness (as returned by `rgblight_get_val()`), add `#define RGBLIGHT_LAYERS_RETAIN_VAL` to your `config.h`. + ## Functions -If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include: +If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight/rgblight.h) for the full list, but the most commonly used functions include: ### Utility Functions |Function |Description | @@ -449,26 +453,27 @@ rgblight_sethsv_at(HSV_GREEN, 2); // led 2 These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions. -|RGB |HSV | -|-------------------|-------------------| -|`RGB_WHITE` |`HSV_WHITE` | -|`RGB_RED` |`HSV_RED` | -|`RGB_CORAL` |`HSV_CORAL` | -|`RGB_ORANGE` |`HSV_ORANGE` | -|`RGB_GOLDENROD` |`HSV_GOLDENROD` | -|`RGB_GOLD` |`HSV_GOLD` | -|`RGB_YELLOW` |`HSV_YELLOW` | -|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` | -|`RGB_GREEN` |`HSV_GREEN` | -|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` | -|`RGB_TURQUOISE` |`HSV_TURQUOISE` | -|`RGB_TEAL` |`HSV_TEAL` | -|`RGB_CYAN` |`HSV_CYAN` | -|`RGB_AZURE` |`HSV_AZURE` | -|`RGB_BLUE` |`HSV_BLUE` | -|`RGB_PURPLE` |`HSV_PURPLE` | -|`RGB_MAGENTA` |`HSV_MAGENTA` | -|`RGB_PINK` |`HSV_PINK` | +|RGB |HSV | +|---------------------|---------------------| +|`RGB_AZURE` |`HSV_AZURE` | +|`RGB_BLACK`/`RGB_OFF`|`HSV_BLACK`/`HSV_OFF`| +|`RGB_BLUE` |`HSV_BLUE` | +|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` | +|`RGB_CORAL` |`HSV_CORAL` | +|`RGB_CYAN` |`HSV_CYAN` | +|`RGB_GOLD` |`HSV_GOLD` | +|`RGB_GOLDENROD` |`HSV_GOLDENROD` | +|`RGB_GREEN` |`HSV_GREEN` | +|`RGB_MAGENTA` |`HSV_MAGENTA` | +|`RGB_ORANGE` |`HSV_ORANGE` | +|`RGB_PINK` |`HSV_PINK` | +|`RGB_PURPLE` |`HSV_PURPLE` | +|`RGB_RED` |`HSV_RED` | +|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` | +|`RGB_TEAL` |`HSV_TEAL` | +|`RGB_TURQUOISE` |`HSV_TURQUOISE` | +|`RGB_WHITE` |`HSV_WHITE` | +|`RGB_YELLOW` |`HSV_YELLOW` | ```c rgblight_setrgb(RGB_ORANGE); @@ -477,7 +482,7 @@ rgblight_setrgb_at(RGB_GOLD, 3); rgblight_sethsv_range(HSV_WHITE, 0, 6); ``` -These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list! +These are defined in [`color.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/color.h). Feel free to add to this list! ## Changing the order of the LEDs diff --git a/docs/feature_split_keyboard.md b/docs/feature_split_keyboard.md index 4ebf585f5..27df46a82 100644 --- a/docs/feature_split_keyboard.md +++ b/docs/feature_split_keyboard.md @@ -8,8 +8,7 @@ QMK Firmware has a generic implementation that is usable by any board, as well a For this, we will mostly be talking about the generic implementation used by the Let's Split and other keyboards. -!> ARM is not yet fully supported for Split Keyboards and has many limitations. Progress is being made, but we have not yet reached 100% feature parity. - +!> ARM split supports most QMK subsystems when using the 'serial' and 'serial_usart' drivers. I2C slave is currently unsupported. ## Compatibility Overview @@ -90,7 +89,13 @@ You can configure the firmware to read a pin on the controller to determine hand #define SPLIT_HAND_PIN B7 ``` -This will read the specified pin. If it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side. +This will read the specified pin. By default, if it's high, then the controller assumes it is the left hand, and if it's low, it's assumed to be the right side. + +This behaviour can be flipped by adding this to you `config.h` file: + +```c +#define SPLIT_HAND_PIN_LOW_IS_LEFT +``` #### Handedness by Matrix Pin @@ -169,7 +174,7 @@ Because not every split keyboard is identical, there are a number of additional #define USE_I2C ``` -This enables I2C support for split keyboards. This isn't strictly for communication, but can be used for OLED or other I2C-based devices. +This configures the use of I2C support for split keyboard transport (AVR only). ```c #define SOFT_SERIAL_PIN D0 @@ -193,20 +198,143 @@ If you're having issues with serial communication, you can change this value, as * **`5`**: about 20kbps ```c -#define SPLIT_MODS_ENABLE +#define FORCED_SYNC_THROTTLE_MS 100 ``` -This enables transmitting modifier state (normal, weak and oneshot) to the non -primary side of the split keyboard. This adds a few bytes of data to the split -communication protocol and may impact the matrix scan speed when enabled. -The purpose of this feature is to support cosmetic use of modifer state (e.g. -displaying status on an OLED screen). +This sets the maximum number of milliseconds before forcing a synchronization of data from master to slave. Under normal circumstances this sync occurs whenever the data _changes_, for safety a data transfer occurs after this number of milliseconds if no change has been detected since the last sync. + +```c +#define SPLIT_MAX_CONNECTION_ERRORS 10 +``` +This sets the maximum number of failed communication attempts (one per scan cycle) from the master part before it assumes that no slave part is connected. This makes it possible to use a master part without the slave part connected. + +Set to 0 to disable the disconnection check altogether. + +```c +#define SPLIT_CONNECTION_CHECK_TIMEOUT 500 +``` +How long (in milliseconds) the master part should block all connection attempts to the slave after the communication has been flagged as disconnected (see `SPLIT_MAX_CONNECTION_ERRORS` above). + +One communication attempt will be allowed everytime this amount of time has passed since the last attempt. If that attempt succeeds, the communication is seen as working again. + +Set to 0 to disable this throttling of communications while disconnected. This can save you a couple of bytes of firmware size. ```c #define SPLIT_TRANSPORT_MIRROR ``` -This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. This adds a few bytes of data to the split communication protocol and may impact the matrix scan speed when enabled. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to Keypresses). +This mirrors the master side matrix to the slave side for features that react or require knowledge of master side key presses on the slave side. The purpose of this feature is to support cosmetic use of key events (e.g. RGB reacting to keypresses). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. + +```c +#define SPLIT_LAYER_STATE_ENABLE +``` + +This enables syncing of the layer state between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the currently active layer. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. + +```c +#define SPLIT_LED_STATE_ENABLE +``` + +This enables syncing of the Host LED status (caps lock, num lock, etc) between both halves of the split keyboard. The main purpose of this feature is to enable support for use of things like OLED display of the Host LED status. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. + +```c +#define SPLIT_MODS_ENABLE +``` + +This enables transmitting modifier state (normal, weak and oneshot) to the non primary side of the split keyboard. The purpose of this feature is to support cosmetic use of modifer state (e.g. displaying status on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. + +```c +#define SPLIT_WPM_ENABLE +``` + +This enables transmitting the current WPM to the slave side of the split keyboard. The purpose of this feature is to support cosmetic use of WPM (e.g. displaying the current value on an OLED screen). This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. + +```c +#define SPLIT_OLED_ENABLE +``` + +This enables transmitting the current OLED on/off status to the slave side of the split keyboard. The purpose of this feature is to support state (on/off state only) syncing. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. + +```c +#define SPLIT_ST7565_ENABLE +``` + +This enables transmitting the current ST7565 on/off status to the slave side of the split keyboard. The purpose of this feature is to support state (on/off state only) syncing. This adds overhead to the split communication protocol and may negatively impact the matrix scan speed when enabled. + +### Custom data sync between sides :id=custom-data-sync + +QMK's split transport allows for arbitrary data transactions at both the keyboard and user levels. This is modelled on a remote procedure call, with the master invoking a function on the slave side, with the ability to send data from master to slave, process it slave side, and send data back from slave to master. + +To leverage this, a keyboard or user/keymap can define a comma-separated list of _transaction IDs_: + +```c +// for keyboard-level data sync: +#define SPLIT_TRANSACTION_IDS_KB KEYBOARD_SYNC_A, KEYBOARD_SYNC_B +// or, for user: +#define SPLIT_TRANSACTION_IDS_USER USER_SYNC_A, USER_SYNC_B, USER_SYNC_C +``` + +These _transaction IDs_ then need a slave-side handler function to be registered with the split transport, for example: + +```c +typedef struct _master_to_slave_t { + int m2s_data; +} master_to_slave_t; + +typedef struct _slave_to_master_t { + int s2m_data; +} slave_to_master_t; + +void user_sync_a_slave_handler(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) { + const master_to_slave_t *m2s = (const master_to_slave_t*)in_data; + slave_to_master_t *s2m = (slave_to_master_t*)out_data; + s2m->s2m_data = m2s->m2s_data + 5; // whatever comes in, add 5 so it can be sent back +} + +void keyboard_post_init_user(void) { + transaction_register_rpc(USER_SYNC_A, user_sync_a_slave_handler); +} +``` + +The master side can then invoke the slave-side handler - for normal keyboard functionality to be minimally affected, any keyboard- or user-level code attempting to sync data should be throttled: + +```c +void housekeeping_task_user(void) { + if (is_keyboard_master()) { + // Interact with slave every 500ms + static uint32_t last_sync = 0; + if (timer_elapsed32(last_sync) > 500) { + master_to_slave_t m2s = {6}; + slave_to_master_t s2m = {0}; + if(transaction_rpc_exec(USER_SYNC_A, sizeof(m2s), &m2s, sizeof(s2m), &s2m)) { + last_sync = timer_read32(); + dprintf("Slave value: %d\n", s2m.s2m_data); // this will now be 11, as the slave adds 5 + } else { + dprint("Slave sync failed!\n"); + } + } + } +} +``` + +!> It is recommended that any data sync between halves happens during the master side's _housekeeping task_. This ensures timely retries should failures occur. + +If only one-way data transfer is needed, helper methods are provided: + +```c +bool transaction_rpc_exec(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer); +bool transaction_rpc_send(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer); +bool transaction_rpc_recv(int8_t transaction_id, uint8_t target2initiator_buffer_size, void *target2initiator_buffer); +``` + +By default, the inbound and outbound data is limited to a maximum of 32 bytes each. The sizes can be altered if required: + +```c +// Master to slave: +#define RPC_M2S_BUFFER_SIZE 48 +// Slave to master: +#define RPC_S2M_BUFFER_SIZE 48 +``` ### Hardware Configuration Options diff --git a/docs/feature_st7565.md b/docs/feature_st7565.md new file mode 100644 index 000000000..de3e44d8e --- /dev/null +++ b/docs/feature_st7565.md @@ -0,0 +1,274 @@ +# ST7565 LCD Driver + +## Supported Hardware + +LCD modules using ST7565 driver IC, communicating over SPI. + +|Module |IC |Size |Notes | +|------------------------------|-------|------|----------------------------------------------------------| +|Newhaven Display NHD-C12832A1Z|ST7565R|128x32|Used by Ergodox Infinity; primary consumer of this feature| +|Zolentech ZLE12864B |ST7565P|128x64|Requires contrast adjustment | + +## Usage + +To enable the feature, there are three steps. First, when compiling your keyboard, you'll need to add the following to your `rules.mk`: + +```make +ST7565_ENABLE = yes +``` + +Then in your `keymap.c` file, implement the ST7565 task call. This example assumes your keymap has three layers named `_QWERTY`, `_FN` and `_ADJ`: + +```c +#ifdef ST7565_ENABLE +void st7565_task_user(void) { + // Host Keyboard Layer Status + st7565_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case _QWERTY: + st7565_write_P(PSTR("Default\n"), false); + break; + case _FN: + st7565_write_P(PSTR("FN\n"), false); + break; + case _ADJ: + st7565_write_P(PSTR("ADJ\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + st7565_write_ln_P(PSTR("Undefined"), false); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + st7565_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + st7565_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); + st7565_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); +} +#endif +``` + +## Logo Example + +In the default font, certain ranges of characters are reserved for a QMK logo. To render this logo to the screen, use the following code example: + +```c +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, 0x00 + }; + + st7565_write_P(qmk_logo, false); +} +``` + +## Buffer Read Example +For some purposes, you may need to read the current state of the display buffer. The `st7565_read_raw` function can be used to safely read bytes from the buffer. + +In this example, calling `fade_display` in the `st7565_task_user` function will slowly fade away whatever is on the screen by turning random pixels off over time. +```c +//Setup some mask which can be or'd with bytes to turn off pixels +const uint8_t single_bit_masks[8] = {127, 191, 223, 239, 247, 251, 253, 254}; + +static void fade_display(void) { + //Define the reader structure + display_buffer_reader_t reader; + uint8_t buff_char; + if (random() % 30 == 0) { + srand(timer_read()); + // Fetch a pointer for the buffer byte at index 0. The return structure + // will have the pointer and the number of bytes remaining from this + // index position if we want to perform a sequential read by + // incrementing the buffer pointer + reader = st7565_read_raw(0); + //Loop over the remaining buffer and erase pixels as we go + for (uint16_t i = 0; i < reader.remaining_element_count; i++) { + //Get the actual byte in the buffer by dereferencing the pointer + buff_char = *reader.current_element; + if (buff_char != 0) { + st7565_write_raw_byte(buff_char & single_bit_masks[rand() % 8], i); + } + //increment the pointer to fetch a new byte during the next loop + reader.current_element++; + } + } +} +``` + +## Other Examples + +In split keyboards, it is very common to have two displays that each render different content and are oriented or flipped differently. You can do this by switching which content to render by using the return value from `is_keyboard_master()` or `is_keyboard_left()` found in `split_util.h`, e.g: + +```c +#ifdef ST7565_ENABLE +display_rotation_t st7565_init_user(display_rotation_t rotation) { + if (!is_keyboard_master()) { + return DISPLAY_ROTATION_180; // flips the display 180 degrees if offhand + } + + return rotation; +} + +void st7565_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_logo(); // Renders a static logo + } +} +#endif +``` + +## Basic Configuration + +|Define |Default |Description | +|------------------------|--------------|-----------------------------------------------------------------------------------------------------| +|`ST7565_A0_PIN` |*Not defined* |(Required) The GPIO connected to the display's A0 (data/command) pin | +|`ST7565_RST_PIN` |*Not defined* |(Required) The GPIO connected to the display's reset pin | +|`ST7565_SS_PIN` |*Not defined* |(Required) The GPIO connected to the display's slave select pin | +|`ST7565_SPI_CLK_DIVISOR`|`4` |The SPI clock divisor to use | +|`ST7565_FONT_H` |`"glcdfont.c"`|The font code file to use for custom fonts | +|`ST7565_FONT_START` |`0` |The starting character index for custom fonts | +|`ST7565_FONT_END` |`223` |The ending character index for custom fonts | +|`ST7565_FONT_WIDTH` |`6` |The font width | +|`ST7565_FONT_HEIGHT` |`8` |The font height (untested) | +|`ST7565_TIMEOUT` |`60000` |Turns off the screen after 60000ms of keyboard inactivity. Helps reduce burn-in. Set to 0 to disable.| +|`ST7565_COLUMN_OFFSET` |`0` |Shift output to the right this many pixels. | +|`ST7565_CONTRAST` |`32` |The default contrast level of the display, from 0 to 255. | +|`ST7565_UPDATE_INTERVAL`|`0` |Set the time interval for updating the display in ms. This will improve the matrix scan rate. | + +## Custom sized displays + +The default display size for this feature is 128x32 and all necessary defines are precalculated with that in mind. + +|Define |Default |Description | +|-----------------------|----------|-----------------------------------------------------------------------------------------------------------| +|`ST7565_DISPLAY_WIDTH` |`128` |The width of the display. | +|`ST7565_DISPLAY_HEIGHT`|`32` |The height of the display. | +|`ST7565_MATRIX_SIZE` |`512` |The local buffer size to allocate.
`(ST7565_DISPLAY_HEIGHT / 8 * ST7565_DISPLAY_WIDTH)`. | +|`ST7565_BLOCK_TYPE` |`uint16_t`|The unsigned integer type to use for dirty rendering. | +|`ST7565_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.
`(sizeof(ST7565_BLOCK_TYPE) * 8)`.| +|`ST7565_BLOCK_SIZE` |`32` |The size of each block for dirty rendering
`(ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT)`. | + +## API + +```c +// Rotation enum values are flags +typedef enum { + DISPLAY_ROTATION_0, + DISPLAY_ROTATION_180 +} display_rotation_t; + +// Initialize the display, rotating the rendered output based on the define passed in. +// Returns true if the was initialized successfully +bool st7565_init(display_rotation_t rotation); + +// Called at the start of st7565_init, weak function overridable by the user +// rotation - the value passed into st7565_init +// Return new display_rotation_t if you want to override default rotation +display_rotation_t st7565_init_user(display_rotation_t rotation); + +// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering +void st7565_clear(void); + +// Renders the dirty chunks of the buffer to display +void st7565_render(void); + +// Moves cursor to character position indicated by column and line, wraps if out of bounds +// Max column denoted by 'st7565_max_chars()' and max lines by 'st7565_max_lines()' functions +void st7565_set_cursor(uint8_t col, uint8_t line); + +// Advances the cursor to the next page, writing ' ' if true +// Wraps to the begining when out of bounds +void st7565_advance_page(bool clearPageRemainder); + +// Moves the cursor forward 1 character length +// Advance page if there is not enough room for the next character +// Wraps to the begining when out of bounds +void st7565_advance_char(void); + +// Writes a single character to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Main handler that writes character data to the display buffer +void st7565_write_char(const char data, bool invert); + +// Writes a string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +void st7565_write(const char *data, bool invert); + +// Writes a string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Advances the cursor to the next page, wiring ' ' to the remainder of the current page +void st7565_write_ln(const char *data, bool invert); + +// Pans the buffer to the right (or left by passing true) by moving contents of the buffer +// Useful for moving the screen in preparation for new drawing +void st7565_pan(bool left); + +// Returns a pointer to the requested start index in the buffer plus remaining +// buffer length as struct +display_buffer_reader_t st7565_read_raw(uint16_t start_index); + +// Writes a string to the buffer at current cursor position +void st7565_write_raw(const char *data, uint16_t size); + +// Writes a single byte into the buffer at the specified index +void st7565_write_raw_byte(const char data, uint16_t index); + +// Sets a specific pixel on or off +// Coordinates start at top-left and go right and down for positive x and y +void st7565_write_pixel(uint8_t x, uint8_t y, bool on); + +// Writes a PROGMEM string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Remapped to call 'void st7565_write(const char *data, bool invert);' on ARM +void st7565_write_P(const char *data, bool invert); + +// Writes a PROGMEM string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Advances the cursor to the next page, wiring ' ' to the remainder of the current page +// Remapped to call 'void st7565_write_ln(const char *data, bool invert);' on ARM +void st7565_write_ln_P(const char *data, bool invert); + +// Writes a PROGMEM string to the buffer at current cursor position +void st7565_write_raw_P(const char *data, uint16_t size); + +// Can be used to manually turn on the screen if it is off +// Returns true if the screen was on or turns on +bool st7565_on(void); + +// Called when st7565_on() turns on the screen, weak function overridable by the user +// Not called if the screen is already on +void st7565_on_user(void); + +// Can be used to manually turn off the screen if it is on +// Returns true if the screen was off or turns off +bool st7565_off(void); + +// Called when st7565_off() turns off the screen, weak function overridable by the user +// Not called if the screen is already off +void st7565_off_user(void); + +// Returns true if the screen is currently on, false if it is +// not +bool st7565_is_on(void); + +// Basically it's st7565_render, but with timeout management and st7565_task_user calling! +void st7565_task(void); + +// Called at the start of st7565_task, weak function overridable by the user +void st7565_task_user(void); + +// Inverts the display +// Returns true if the screen was or is inverted +bool st7565_invert(bool invert); + +// Returns the maximum number of characters that will fit on a line +uint8_t st7565_max_chars(void); + +// Returns the maximum number of lines that will fit on the display +uint8_t st7565_max_lines(void); +``` diff --git a/docs/feature_stenography.md b/docs/feature_stenography.md index bf4bd39db..af4754ed7 100644 --- a/docs/feature_stenography.md +++ b/docs/feature_stenography.md @@ -128,3 +128,18 @@ As defined in `keymap_steno.h`. |`STN_RES1`||(GeminiPR only)| |`STN_RES2`||(GeminiPR only)| |`STN_PWR`||(GeminiPR only)| + +If you do not want to hit two keys with one finger combined keycodes can be used. These are also defined in `keymap_steno.h`, and causes both keys to be reported as pressed or released. To use these keycodes define `STENO_COMBINEDMAP` in your `config.h` file +|Combined key | Key1 | Key 2 | +|---------------|--------|----------| +|STN_S3 | STN_S1 | STN_S2 | +|STN_TKL | STN_TL | STN_KL | +|STN_PWL | STN_PL | STN_WL | +|STN_HRL | STN_HL | STN_RL | +|STN_FRR | STN_FR | STN_RR | +|STN_PBR | STN_PR | STN_BR | +|STN_LGR | STN_LR | STN_GR | +|STN_TSR | STN_TR | STN_SR | +|STN_DZR | STN_DR | STN_ZR | +|STN_AO | STN_A | STN_O | +|STN_EU | STN_E | STN_U | diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index 5d77f3e08..f4e989921 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -50,7 +50,7 @@ The main entry point is `process_tap_dance()`, called from `process_record_quant This means that you have `TAPPING_TERM` time to tap the key again; you do not have to input all the taps within a single `TAPPING_TERM` timeframe. This allows for longer tap counts, with minimal impact on responsiveness. -Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-dance keys. +Our next stop is `tap_dance_task()`. This handles the timeout of tap-dance keys. For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros. diff --git a/docs/flashing.md b/docs/flashing.md index 83c97444e..7b7fe956f 100644 --- a/docs/flashing.md +++ b/docs/flashing.md @@ -48,7 +48,7 @@ QMK maintains [a fork of the LUFA DFU bootloader](https://github.com/qmk/lufa/tr //#define QMK_LED E6 //#define QMK_SPEAKER C6 ``` -Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](feature_bootmagic.md#bootmagic-lite), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader. +Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](feature_bootmagic.md), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader. The manufacturer and product strings are automatically pulled from `config.h`, with " Bootloader" appended to the product string. @@ -171,6 +171,52 @@ Flashing sequence: 3. Flash a .hex file 4. Reset the device into application mode (may be done automatically) +### QMK HID + +QMK maintains [a fork of the LUFA HID bootloader](https://github.com/qmk/lufa/tree/master/Bootloaders/HID), which uses a USB HID Endpoint for flashing in the way that the PJRC's Teensy Loader flasher and HalfKay bootloader work. Additionally, it performs a simple matrix scan for exiting the bootloader and returning to the application, as well as flashing an LED/making a ticking noise with a speaker when things are happening. + +To ensure compatibility with the QMK HID bootloader, make sure this block is present in your `rules.mk`: + +```make +# Bootloader selection +BOOTLOADER = qmk-hid +``` + +To enable the additional features, add the following defines to your `config.h`: + +```c +#define QMK_ESC_OUTPUT F1 // COL pin if COL2ROW +#define QMK_ESC_INPUT D5 // ROW pin if COL2ROW +// Optional: +//#define QMK_LED E6 +//#define QMK_SPEAKER C6 +``` + +Currently we do not recommend making `QMK_ESC` the same key as the one designated for [Bootmagic Lite](feature_bootmagic.md), as holding it down will cause the MCU to loop back and forth between entering and exiting the bootloader. + +The manufacturer and product strings are automatically pulled from `config.h`, with " Bootloader" appended to the product string. + +To generate this bootloader, use the `bootloader` target, eg. `make planck/rev4:default:bootloader`. To generate a production-ready .hex file (combining QMK and the bootloader), use the `production` target, eg. `make planck/rev4:default:production`. + +Compatible flashers: + +* TBD + * Currently, you need to either use the [Python script](https://github.com/qmk/lufa/tree/master/Bootloaders/HID/HostLoaderApp_python), or compile [`hid_bootloader_cli`](https://github.com/qmk/lufa/tree/master/Bootloaders/HID/HostLoaderApp), from the LUFA repo. Homebrew may (will) have support for this directly (via `brew install qmk/qmk/hid_bootloader_cli`). + +Flashing sequence: + +1. Enter the bootloader using any of the following methods: + * Press the `RESET` keycode + * Press the `RESET` button on the PCB if available + * short RST to GND quickly +2. Wait for the OS to detect the device +3. Flash a .hex file +4. Reset the device into application mode (may be done automatically) + +### `make` Targets + +* `:qmk-hid`: Checks every 5 seconds until a DFU device is available, and then flashes the firmware. + ## STM32/APM32 DFU All STM32 and APM32 MCUs, except for F103 (see the [STM32duino section](#stm32duino)) come preloaded with a factory bootloader that cannot be modified nor deleted. @@ -252,7 +298,7 @@ Flashing sequence: ## tinyuf2 -Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on the F411 blackpill. +Keyboards may opt into supporting the tinyuf2 bootloader. This is currently only supported on the F401/F411 blackpill. The `rules.mk` setting for this bootloader is `tinyuf2`, and can be specified at the keymap or user level. diff --git a/docs/fr-fr/cli.md b/docs/fr-fr/cli.md index 428153645..bfa060f2a 100644 --- a/docs/fr-fr/cli.md +++ b/docs/fr-fr/cli.md @@ -85,14 +85,14 @@ qmk compile qmk compile -kb -km ``` -## `qmk cformat` +## `qmk format-c` Cette commande formatte le code C en utilisant clang-format. Lancez-la sans arguments pour formatter tout le code core, ou passez les noms de fichiers à la ligne de commande pour la lancer sur des fichiers spécifiques. **Utilisation**: ``` -qmk cformat [file1] [file2] [...] [fileN] +qmk format-c [file1] [file2] [...] [fileN] ``` ## `qmk config` @@ -125,14 +125,14 @@ Cette commande crée une nouvelle keymap basée sur une keymap par défaut d'un qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] ``` -## `qmk pyformat` +## `qmk format-py` Cette commande formate le code python dans `qmk_firmware`. **Utilisation**: ``` -qmk pyformat +qmk format-py ``` ## `qmk pytest` diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md index eb536ca96..3d58cdc05 100644 --- a/docs/hardware_avr.md +++ b/docs/hardware_avr.md @@ -6,26 +6,28 @@ If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_ ## Adding Your AVR Keyboard to QMK -QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started, run the `util/new_keyboard.sh` script: +QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started, run `qmk new-keyboard`: ``` -$ ./util/new_keyboard.sh -Generating a new QMK keyboard directory +$ qmk new-keyboard +Ψ Generating a new QMK keyboard directory -Keyboard Name: mycoolkb -Keyboard Type [avr]: -Your Name [John Smith]: +Keyboard Name: mycoolkeeb +Keyboard Type: + 1. avr + 2. ps2avrgb +Please enter your choice: [1] +Your Name: [John Smith] +Ψ Copying base template files... +Ψ Copying avr template files... +Ψ Renaming keyboard.[ch] to mycoolkeeb.[ch]... +Ψ Replacing %YEAR% with 2021... +Ψ Replacing %KEYBOARD% with mycoolkeeb... +Ψ Replacing %YOUR_NAME% with John Smith... -Copying base template files... done -Copying avr template files... done -Renaming keyboard files... done -Replacing %KEYBOARD% with mycoolkb... done -Replacing %YOUR_NAME% with John Smith... done - -Created a new keyboard called mycoolkb. - -To start working on things, cd into keyboards/mycoolkb, -or open the directory in your favourite text editor. +Ψ Created a new keyboard called mycoolkeeb. +Ψ To start working on things, `cd` into keyboards/mycoolkeeb, +Ψ or open the directory in your preferred text editor. ``` This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard. diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 4f3271504..7630b44e0 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -189,9 +189,9 @@ Hardware files (such as plates, cases, pcb) can be contributed to the [qmk.fm re Given the amount of functionality that QMK exposes it's very easy to confuse new users. When putting together the default firmware for your keyboard we recommend limiting your enabled features and options to the minimal set needed to support your hardware. Recommendations for specific features follow. -### Bootmagic and Command +### Magic Keycodes and Command -[Bootmagic](feature_bootmagic.md) and [Command](feature_command.md) are two related features that allow a user to control their keyboard in non-obvious ways. We recommend you think long and hard about if you're going to enable either feature, and how you will expose this functionality. Keep in mind that users who want this functionality can enable it in their personal keymaps without affecting all the novice users who may be using your keyboard as their first programmable board. +[Magic Keycodes](keycodes_magic.md) and [Command](feature_command.md) are two related features that allow a user to control their keyboard in non-obvious ways. We recommend you think long and hard about if you're going to enable either feature, and how you will expose this functionality. Keep in mind that users who want this functionality can enable it in their personal keymaps without affecting all the novice users who may be using your keyboard as their first programmable board. By far the most common problem new users encounter is accidentally triggering Bootmagic while they're plugging in their keyboard. They're holding the keyboard by the bottom, unknowingly pressing in alt and spacebar, and then they find that these keys have been swapped on them. We recommend leaving this feature disabled by default, but if you do turn it on consider setting `BOOTMAGIC_KEY_SALT` to a key that is hard to press while plugging your keyboard in. diff --git a/docs/ja/cli_commands.md b/docs/ja/cli_commands.md index 81cb03cfe..35937dbbc 100644 --- a/docs/ja/cli_commands.md +++ b/docs/ja/cli_commands.md @@ -211,7 +211,7 @@ qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] # 開発者用コマンド -## `qmk cformat` +## `qmk format-c` このコマンドは clang-format を使って C コードを整形します。 @@ -222,25 +222,25 @@ qmk new-keymap [-kb KEYBOARD] [-km KEYMAP] **指定したファイルに対する使い方**: ``` -qmk cformat [file1] [file2] [...] [fileN] +qmk format-c [file1] [file2] [...] [fileN] ``` **全てのコアファイルに対する使い方**: ``` -qmk cformat -a +qmk format-c -a ``` **origin/master で変更されたファイルのみに対する使い方**: ``` -qmk cformat +qmk format-c ``` **branch_name で変更されたファイルのみに対する使い方**: ``` -qmk cformat -b branch_name +qmk format-c -b branch_name ``` ## `qmk docs` @@ -275,14 +275,14 @@ $ qmk kle2json -f kle.txt -f Ψ Wrote out to info.json ``` -## `qmk pyformat` +## `qmk format-py` このコマンドは `qmk_firmware` 内の python コードを整形します。 **使用法**: ``` -qmk pyformat +qmk format-py ``` ## `qmk pytest` diff --git a/docs/ja/cli_development.md b/docs/ja/cli_development.md index 47262213a..28cdd91c1 100644 --- a/docs/ja/cli_development.md +++ b/docs/ja/cli_development.md @@ -192,7 +192,7 @@ cli.log.info('Reading from %s and writing to %s', cli.args.filename, cli.args.ou # テスト、リントおよびフォーマット -nose2、flake8 および yapf を使ってコードをテスト、リントおよびフォーマットします。これらのテストを実行するために `pytest` と `pyformat` サブコマンドを使うことができます。 +nose2、flake8 および yapf を使ってコードをテスト、リントおよびフォーマットします。これらのテストを実行するために `pytest` と `format-py` サブコマンドを使うことができます。 ### テストとリント @@ -200,7 +200,7 @@ nose2、flake8 および yapf を使ってコードをテスト、リントお ### フォーマット - qmk pyformat + qmk format-py ## フォーマットの詳細 diff --git a/docs/ja/compatible_microcontrollers.md b/docs/ja/compatible_microcontrollers.md index b675b038d..85b31f3f1 100644 --- a/docs/ja/compatible_microcontrollers.md +++ b/docs/ja/compatible_microcontrollers.md @@ -32,10 +32,13 @@ QMK は十分な容量のフラッシュメモリを備えた USB 対応 AVR ま * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) * [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html) +* [STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html) * [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html) * [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html) * [STM32G431](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x1.html) * [STM32G474](https://www.st.com/en/microcontrollers-microprocessors/stm32g4x4.html) +* [STM32L412](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html) +* [STM32L422](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html) * [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html) * [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html) diff --git a/docs/ja/feature_bootmagic.md b/docs/ja/feature_bootmagic.md index 20a93d5c4..2ad6fc853 100644 --- a/docs/ja/feature_bootmagic.md +++ b/docs/ja/feature_bootmagic.md @@ -16,7 +16,7 @@ 一部のキーボードでは、ブートマジックはデフォルトで無効になっています。その場合、`rules.mk` 内で以下のように明示的に有効にする必要があります: ```make -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = yes ``` ?> `full` の代わりに `yes` が使われていることがあるかもしれませんが、これは問題ありません。ただし、`yes` は非推奨で、理想的には `full` (あるいは`lite`) が使われるべきです。 diff --git a/docs/ja/feature_debounce_type.md b/docs/ja/feature_debounce_type.md index 03f68d721..258ca194d 100644 --- a/docs/ja/feature_debounce_type.md +++ b/docs/ja/feature_debounce_type.md @@ -88,15 +88,6 @@ voltage +---------------------- ## QMK でサポートされるデバウンスアルゴリズム QMK はデバウンス API を介して複数のデバウンスアルゴリズムをサポートします。 -どのデバウンスメソッドが呼ばれるかのロジックは下記のとおりです。```rules.mk``` で設定された様々な定義をチェックします。 - -``` -DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce -DEBOUNCE_TYPE?= sym_defer_g -ifneq ($(strip $(DEBOUNCE_TYPE)), custom) - QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c -endif -``` ### デバウンスの選択 @@ -135,11 +126,3 @@ DEBOUNCE_TYPE = <アルゴリズムの名前> * デバウンスは、全てのマトリクススキャンの後で発生します。 * MATRIX_ROWS ではなく num_rows を使って、分割キーボードが正しくサポートされるようにします。 * アルゴリズムが他のキーボードにも適用できる可能性がある場合、```quantum/debounce``` に追加することを検討してください。 - -### 古い名前 -次の既存のアルゴリズムの古い名前は引き続きサポートされますが、代わりに新しい名前を使うことを推奨します。 - -* sym_g - sym_defer_g の古い名前 -* eager_pk - sym_eager_pk の古い名前 -* sym_pk - sym_defer_pk の古い名前 -* eager_pr - sym_eager_pr の古い名前 diff --git a/docs/ja/feature_dip_switch.md b/docs/ja/feature_dip_switch.md index a0f6aeb00..8d0eeafa5 100644 --- a/docs/ja/feature_dip_switch.md +++ b/docs/ja/feature_dip_switch.md @@ -14,6 +14,8 @@ DIP スイッチは、以下を `rules.mk` に追加することでサポート ```c // Connects each switch in the dip switch to the GPIO pin of the MCU #define DIP_SWITCH_PINS { B14, A15, A10, B9 } +// For split keyboards, you can separately define the right side pins +#define DIP_SWITCH_PINS_RIGHT { ... } ``` あるいは @@ -28,8 +30,9 @@ DIP スイッチは、以下を `rules.mk` に追加することでサポート コールバック関数を `.c` に記述することができます: ```c -void dip_switch_update_kb(uint8_t index, bool active) { - dip_switch_update_user(index, active); +bool dip_switch_update_kb(uint8_t index, bool active) { + if !(dip_switch_update_user(index, active)) { return false; } + return true; } ``` @@ -37,7 +40,7 @@ void dip_switch_update_kb(uint8_t index, bool active) { あるいは `keymap.c` に記述することもできます: ```c -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if(active) { audio_on(); } else { audio_off(); } @@ -62,6 +65,7 @@ void dip_switch_update_user(uint8_t index, bool active) { } break; } + return true; } ``` @@ -69,8 +73,9 @@ void dip_switch_update_user(uint8_t index, bool active) { ```c -void dip_switch_update_mask_kb(uint32_t state) { - dip_switch_update_mask_user(state); +bool dip_switch_update_mask_kb(uint32_t state) { + if (!dip_switch_update_mask_user(state)) { return false; } + return true; } ``` @@ -78,7 +83,7 @@ void dip_switch_update_mask_kb(uint32_t state) { あるいは `keymap.c` に記述することもできます: ```c -void dip_switch_update_mask_user(uint32_t state) { +bool dip_switch_update_mask_user(uint32_t state) { if (state & (1UL<<0) && state & (1UL<<1)) { layer_on(_ADJUST); // C on esc } else { @@ -94,6 +99,7 @@ void dip_switch_update_mask_user(uint32_t state) { } else { layer_off(_TEST_B); } + return true; } ``` diff --git a/docs/ja/feature_encoders.md b/docs/ja/feature_encoders.md index 7b7f394c8..21f42d38b 100644 --- a/docs/ja/feature_encoders.md +++ b/docs/ja/feature_encoders.md @@ -51,15 +51,18 @@ ENCODER_ENABLE = yes コールバック関数を `.c` に記述することができます: ```c -void encoder_update_kb(uint8_t index, bool clockwise) { - encoder_update_user(index, clockwise); +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { + return false; + } + } ``` あるいは `keymap.c` に記述することもできます: ```c -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { /* First encoder */ if (clockwise) { tap_code(KC_PGDN); @@ -73,6 +76,7 @@ void encoder_update_user(uint8_t index, bool clockwise) { tap_code(KC_UP); } } + return true; } ``` diff --git a/docs/ja/feature_led_matrix.md b/docs/ja/feature_led_matrix.md index 62e22859f..6511b2824 100644 --- a/docs/ja/feature_led_matrix.md +++ b/docs/ja/feature_led_matrix.md @@ -52,7 +52,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED `.c` に全ての LED を列挙する配列を定義します: - const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* これらの位置については IS31 マニュアルを参照してください * driver * | LED address @@ -61,7 +61,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED .... } -ここで、`Cx_y` は[データシート](https://www.issi.com/WW/pdf/31FL3731.pdf)およびヘッダファイル `drivers/issi/is31fl3731-simple.h` で定義されるマトリックス内の LED の位置です。`driver` は `config.h` で定義したドライバのインデックス(`0`、`1`、`2`、`3`のいずれか)です。 +ここで、`Cx_y` は[データシート](https://www.issi.com/WW/pdf/31FL3731.pdf)およびヘッダファイル `drivers/led/issi/is31fl3731-simple.h` で定義されるマトリックス内の LED の位置です。`driver` は `config.h` で定義したドライバのインデックス(`0`、`1`、`2`、`3`のいずれか)です。 ## キーコード diff --git a/docs/ja/feature_tap_dance.md b/docs/ja/feature_tap_dance.md index 082d48f1c..a6d108f1e 100644 --- a/docs/ja/feature_tap_dance.md +++ b/docs/ja/feature_tap_dance.md @@ -59,7 +59,7 @@ このことは、あなたは再びキーをタップするまでの時間として `TAPPING_TERM` の時間を持っていることを意味します。そのため、あなたは1つの `TAPPING_TERM` の時間内に全てのタップを行う必要はありません。これにより、キーの反応への影響を最小限に抑えながら、より長いタップ回数を可能にします。 -次は `matrix_scan_tap_dance()` です。この関数はタップダンスキーのタイムアウトを制御します。 +次は `tap_dance_task()` です。この関数はタップダンスキーのタイムアウトを制御します。 柔軟性のために、タップダンスは、キーコードの組み合わせにも、ユーザー関数にもなることができます。後者は、より高度なタップ回数の制御や、LED を点滅させたり、バックライトをいじったり、等々の制御を可能にします。これは、1つの共用体と、いくつかの賢いマクロによって成し遂げられています。 diff --git a/docs/ja/hardware_avr.md b/docs/ja/hardware_avr.md index 66be2f71c..cdc5f8cb8 100644 --- a/docs/ja/hardware_avr.md +++ b/docs/ja/hardware_avr.md @@ -12,26 +12,28 @@ ## AVR を使用したキーボードを QMK に追加する -QMK には AVR を使ったキーボードでの作業を簡略化するための機能が多数あります。大体のキーボードでは1行もコードを書く必要がありません。まずはじめに、`util/new_keyboard.sh` スクリプトを実行します。 +QMK には AVR を使ったキーボードでの作業を簡略化するための機能が多数あります。大体のキーボードでは1行もコードを書く必要がありません。まずはじめに、`qmk new-keyboard` を実行します。 ``` -$ ./util/new_keyboard.sh -Generating a new QMK keyboard directory +$ qmk new-keyboard +Ψ Generating a new QMK keyboard directory -Keyboard Name: mycoolkb -Keyboard Type [avr]: -Your Name [John Smith]: +Keyboard Name: mycoolkeeb +Keyboard Type: + 1. avr + 2. ps2avrgb +Please enter your choice: [1] +Your Name: [John Smith] +Ψ Copying base template files... +Ψ Copying avr template files... +Ψ Renaming keyboard.[ch] to mycoolkeeb.[ch]... +Ψ Replacing %YEAR% with 2021... +Ψ Replacing %KEYBOARD% with mycoolkeeb... +Ψ Replacing %YOUR_NAME% with John Smith... -Copying base template files... done -Copying avr template files... done -Renaming keyboard files... done -Replacing %KEYBOARD% with mycoolkb... done -Replacing %YOUR_NAME% with John Smith... done - -Created a new keyboard called mycoolkb. - -To start working on things, cd into keyboards/mycoolkb, -or open the directory in your favourite text editor. +Ψ Created a new keyboard called mycoolkeeb. +Ψ To start working on things, `cd` into keyboards/mycoolkeeb, +Ψ or open the directory in your preferred text editor. ``` これにより、新しいキーボードをサポートするために必要なすべてのファイルが作成され、デフォルト値で設定が入力されます。あとはあなたのキーボード用にカスタマイズするだけです。 diff --git a/docs/ja/reference_configurator_support.md b/docs/ja/reference_configurator_support.md index 4fb98fc0e..83d6d648d 100644 --- a/docs/ja/reference_configurator_support.md +++ b/docs/ja/reference_configurator_support.md @@ -104,8 +104,6 @@ JSON ファイルをビルドする最も簡単な方法は、[Keyboard Layout E "tags": { "form_factor": "numpad" }, - "width": 4, - "height": 5, "layouts": { "LAYOUT": { "layout": [ diff --git a/docs/ja/reference_info_json.md b/docs/ja/reference_info_json.md index 5b9a1b6b6..7346a6395 100644 --- a/docs/ja/reference_info_json.md +++ b/docs/ja/reference_info_json.md @@ -20,10 +20,6 @@ * キーボードの製品ページ、[QMK.fm/keyboards](https://qmk.fm/keyboards) のページ、あるいはキーボードに関する情報を説明する他のページの URL。 * `maintainer` * メンテナの GitHub のユーザ名、あるいはコミュニティが管理するキーボードの場合は `qmk` -* `width` - * キー単位でのキーボードの幅 -* `height` - * キー単位でのキーボードの高さ * `layouts` * 物理的なレイアウト表現。詳細は以下のセクションを見てください。 diff --git a/docs/keycodes.md b/docs/keycodes.md index 85988f185..a134c5a1b 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -257,42 +257,6 @@ See also: [Backlighting](feature_backlight.md) |`BL_DEC` |Decrease the backlight level | |`BL_BRTG`|Toggle backlight breathing | -## Bootmagic :id=bootmagic - -See also: [Bootmagic](feature_bootmagic.md) - -|Key |Aliases |Description | -|----------------------------------|---------|--------------------------------------------------------------------------| -|`MAGIC_SWAP_CONTROL_CAPSLOCK` |`CL_SWAP`|Swap Caps Lock and Left Control | -|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |`CL_NORM`|Unswap Caps Lock and Left Control | -|`MAGIC_CAPSLOCK_TO_CONTROL` |`CL_CTRL`|Treat Caps Lock as Control | -|`MAGIC_UNCAPSLOCK_TO_CONTROL` |`CL_CAPS`|Stop treating Caps Lock as Control | -|`MAGIC_SWAP_LCTL_LGUI` |`LCG_SWP`|Swap Left Control and GUI | -|`MAGIC_UNSWAP_LCTL_LGUI` |`LCG_NRM`|Unswap Left Control and GUI | -|`MAGIC_SWAP_RCTL_RGUI` |`RCG_SWP`|Swap Right Control and GUI | -|`MAGIC_UNSWAP_RCTL_RGUI` |`RCG_NRM`|Unswap Right Control and GUI | -|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Control and GUI on both sides | -|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Control and GUI on both sides | -|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Control and GUI swap on both sides | -|`MAGIC_SWAP_LALT_LGUI` |`LAG_SWP`|Swap Left Alt and GUI | -|`MAGIC_UNSWAP_LALT_LGUI` |`LAG_NRM`|Unswap Left Alt and GUI | -|`MAGIC_SWAP_RALT_RGUI` |`RAG_SWP`|Swap Right Alt and GUI | -|`MAGIC_UNSWAP_RALT_RGUI` |`RAG_NRM`|Unswap Right Alt and GUI | -|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides | -|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides | -|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides | -|`MAGIC_NO_GUI` |`GUI_OFF`|Disable the GUI keys | -|`MAGIC_UNNO_GUI` |`GUI_ON` |Enable the GUI keys | -|`MAGIC_SWAP_GRAVE_ESC` |`GE_SWAP`|Swap ` and Escape | -|`MAGIC_UNSWAP_GRAVE_ESC` |`GE_NORM`|Unswap ` and Escape | -|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |`BS_SWAP`|Swap `\` and Backspace | -|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace | -|`MAGIC_HOST_NKRO` |`NK_ON` |Enable N-key rollover | -|`MAGIC_UNHOST_NKRO` |`NK_OFF` |Disable N-key rollover | -|`MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover | -|`MAGIC_EE_HANDS_LEFT` |`EH_LEFT`|Set the master half of a split keyboard as the left hand (for `EE_HANDS`) | -|`MAGIC_EE_HANDS_RIGHT` |`EH_RGHT`|Set the master half of a split keyboard as the right hand (for `EE_HANDS`)| - ## Bluetooth :id=bluetooth See also: [Bluetooth](feature_bluetooth.md) @@ -354,6 +318,42 @@ See also: [Leader Key](feature_leader_key.md) |---------|------------------------| |`KC_LEAD`|Begins a leader sequence| +## Magic Keycodes :id=magic-keycodes + +See also: [Magic Keycodes](keycodes_magic.md) + +|Key |Aliases |Description | +|----------------------------------|---------|--------------------------------------------------------------------------| +|`MAGIC_SWAP_CONTROL_CAPSLOCK` |`CL_SWAP`|Swap Caps Lock and Left Control | +|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |`CL_NORM`|Unswap Caps Lock and Left Control | +|`MAGIC_CAPSLOCK_TO_CONTROL` |`CL_CTRL`|Treat Caps Lock as Control | +|`MAGIC_UNCAPSLOCK_TO_CONTROL` |`CL_CAPS`|Stop treating Caps Lock as Control | +|`MAGIC_SWAP_LCTL_LGUI` |`LCG_SWP`|Swap Left Control and GUI | +|`MAGIC_UNSWAP_LCTL_LGUI` |`LCG_NRM`|Unswap Left Control and GUI | +|`MAGIC_SWAP_RCTL_RGUI` |`RCG_SWP`|Swap Right Control and GUI | +|`MAGIC_UNSWAP_RCTL_RGUI` |`RCG_NRM`|Unswap Right Control and GUI | +|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Control and GUI on both sides | +|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Control and GUI on both sides | +|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Control and GUI swap on both sides | +|`MAGIC_SWAP_LALT_LGUI` |`LAG_SWP`|Swap Left Alt and GUI | +|`MAGIC_UNSWAP_LALT_LGUI` |`LAG_NRM`|Unswap Left Alt and GUI | +|`MAGIC_SWAP_RALT_RGUI` |`RAG_SWP`|Swap Right Alt and GUI | +|`MAGIC_UNSWAP_RALT_RGUI` |`RAG_NRM`|Unswap Right Alt and GUI | +|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides | +|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides | +|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides | +|`MAGIC_NO_GUI` |`GUI_OFF`|Disable the GUI keys | +|`MAGIC_UNNO_GUI` |`GUI_ON` |Enable the GUI keys | +|`MAGIC_SWAP_GRAVE_ESC` |`GE_SWAP`|Swap ` and Escape | +|`MAGIC_UNSWAP_GRAVE_ESC` |`GE_NORM`|Unswap ` and Escape | +|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |`BS_SWAP`|Swap `\` and Backspace | +|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace | +|`MAGIC_HOST_NKRO` |`NK_ON` |Enable N-key rollover | +|`MAGIC_UNHOST_NKRO` |`NK_OFF` |Disable N-key rollover | +|`MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover | +|`MAGIC_EE_HANDS_LEFT` |`EH_LEFT`|Set the master half of a split keyboard as the left hand (for `EE_HANDS`) | +|`MAGIC_EE_HANDS_RIGHT` |`EH_RGHT`|Set the master half of a split keyboard as the right hand (for `EE_HANDS`)| + ## MIDI :id=midi See also: [MIDI](feature_midi.md) diff --git a/docs/keycodes_magic.md b/docs/keycodes_magic.md new file mode 100644 index 000000000..7e1b1a4f6 --- /dev/null +++ b/docs/keycodes_magic.md @@ -0,0 +1,36 @@ +# Magic Keycodes :id=magic-keycodes + +**Magic Keycodes** are prefixed with `MAGIC_`, and allow you to access the functionality of the deprecated Bootmagic feature *after* your keyboard has initialized. To use the keycodes, assign them to your keymap as you would any other keycode. + +|Key |Aliases |Description | +|----------------------------------|---------|--------------------------------------------------------------------------| +|`MAGIC_SWAP_CONTROL_CAPSLOCK` |`CL_SWAP`|Swap Caps Lock and Left Control | +|`MAGIC_UNSWAP_CONTROL_CAPSLOCK` |`CL_NORM`|Unswap Caps Lock and Left Control | +|`MAGIC_CAPSLOCK_TO_CONTROL` |`CL_CTRL`|Treat Caps Lock as Control | +|`MAGIC_UNCAPSLOCK_TO_CONTROL` |`CL_CAPS`|Stop treating Caps Lock as Control | +|`MAGIC_SWAP_LCTL_LGUI` |`LCG_SWP`|Swap Left Control and GUI | +|`MAGIC_UNSWAP_LCTL_LGUI` |`LCG_NRM`|Unswap Left Control and GUI | +|`MAGIC_SWAP_RCTL_RGUI` |`RCG_SWP`|Swap Right Control and GUI | +|`MAGIC_UNSWAP_RCTL_RGUI` |`RCG_NRM`|Unswap Right Control and GUI | +|`MAGIC_SWAP_CTL_GUI` |`CG_SWAP`|Swap Control and GUI on both sides | +|`MAGIC_UNSWAP_CTL_GUI` |`CG_NORM`|Unswap Control and GUI on both sides | +|`MAGIC_TOGGLE_CTL_GUI` |`CG_TOGG`|Toggle Control and GUI swap on both sides | +|`MAGIC_SWAP_LALT_LGUI` |`LAG_SWP`|Swap Left Alt and GUI | +|`MAGIC_UNSWAP_LALT_LGUI` |`LAG_NRM`|Unswap Left Alt and GUI | +|`MAGIC_SWAP_RALT_RGUI` |`RAG_SWP`|Swap Right Alt and GUI | +|`MAGIC_UNSWAP_RALT_RGUI` |`RAG_NRM`|Unswap Right Alt and GUI | +|`MAGIC_SWAP_ALT_GUI` |`AG_SWAP`|Swap Alt and GUI on both sides | +|`MAGIC_UNSWAP_ALT_GUI` |`AG_NORM`|Unswap Alt and GUI on both sides | +|`MAGIC_TOGGLE_ALT_GUI` |`AG_TOGG`|Toggle Alt and GUI swap on both sides | +|`MAGIC_NO_GUI` |`GUI_OFF`|Disable the GUI keys | +|`MAGIC_UNNO_GUI` |`GUI_ON` |Enable the GUI keys | +|`MAGIC_TOGGLE_GUI` |`GUI_TOG`|Toggles the status of the GUI keys | +|`MAGIC_SWAP_GRAVE_ESC` |`GE_SWAP`|Swap ` and Escape | +|`MAGIC_UNSWAP_GRAVE_ESC` |`GE_NORM`|Unswap ` and Escape | +|`MAGIC_SWAP_BACKSLASH_BACKSPACE` |`BS_SWAP`|Swap `\` and Backspace | +|`MAGIC_UNSWAP_BACKSLASH_BACKSPACE`|`BS_NORM`|Unswap `\` and Backspace | +|`MAGIC_HOST_NKRO` |`NK_ON` |Enable N-key rollover | +|`MAGIC_UNHOST_NKRO` |`NK_OFF` |Disable N-key rollover | +|`MAGIC_TOGGLE_NKRO` |`NK_TOGG`|Toggle N-key rollover | +|`MAGIC_EE_HANDS_LEFT` |`EH_LEFT`|Set the master half of a split keyboard as the left hand (for `EE_HANDS`) | +|`MAGIC_EE_HANDS_RIGHT` |`EH_RGHT`|Set the master half of a split keyboard as the right hand (for `EE_HANDS`)| diff --git a/docs/ref_functions.md b/docs/ref_functions.md index 27ae95aa9..c6185c870 100644 --- a/docs/ref_functions.md +++ b/docs/ref_functions.md @@ -93,7 +93,7 @@ And to do so, add `reset_keyboard()` to your function or macro, and this will re ## Wiping the EEPROM (Persistent Storage) -If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). To force an EEPROM reset, use the [`EEP_RST` keycode](quantum_keycodes.md) or [Bootmagic](feature_bootmagic.md) functionality. If neither of those are an option, then you can use a custom macro to do so. +If you're having issues with Audio, RGB Underglow, backlighting or keys acting weird, then you can reset the EEPROM (persistent setting storage). To force an EEPROM reset, use the [`EEP_RST` keycode](quantum_keycodes.md) or [Bootmagic Lite](feature_bootmagic.md) functionality. If neither of those are an option, then you can use a custom macro to do so. To wipe the EEPROM, run `eeconfig_init()` from your function or macro to reset most of the settings to default. diff --git a/docs/reference_configurator_support.md b/docs/reference_configurator_support.md index 1b34c85a2..ba3d49e2b 100644 --- a/docs/reference_configurator_support.md +++ b/docs/reference_configurator_support.md @@ -99,8 +99,6 @@ Use the `keyboard_name` object to set the name of the keyboard. For instruction "tags": { "form_factor": "numpad" }, - "width": 4, - "height": 5, "layouts": { "LAYOUT": { "layout": [ diff --git a/docs/reference_info_json.md b/docs/reference_info_json.md index 30d813e93..cf492629f 100644 --- a/docs/reference_info_json.md +++ b/docs/reference_info_json.md @@ -15,10 +15,6 @@ The `info.json` file is a JSON formatted dictionary with the following keys avai * A URL to the keyboard's product page, [QMK.fm/keyboards](https://qmk.fm/keyboards) page, or other page describing information about the keyboard. * `maintainer` * GitHub username of the maintainer, or `qmk` for community maintained boards -* `width` - * Width of the board in Key Units -* `height` - * Height of the board in Key Units * `debounce` * How many milliseconds (ms) to wait for debounce to happen. (Default: 5) * `diode_direction` diff --git a/docs/serial_driver.md b/docs/serial_driver.md index 359fc5955..3e89deffa 100644 --- a/docs/serial_driver.md +++ b/docs/serial_driver.md @@ -63,7 +63,7 @@ Configure the hardware via your config.h: // 5: about 19200 baud #define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 #define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 -#define SERIAL_USART_TIMEOUT 100 // USART driver timeout. default 100 +#define SERIAL_USART_TIMEOUT 20 // USART driver timeout. default 20 ``` You must also enable the ChibiOS `SERIAL` feature: @@ -73,7 +73,7 @@ You must also enable the ChibiOS `SERIAL` feature: Do note that the configuration required is for the `SERIAL` peripheral, not the `UART` peripheral. ### USART Full-duplex -Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage over bitbang is that this provides fast and accurate timings. USART Full-Duplex requires two conductors **without** pull-up resistors instead of one conductor with a pull-up resistor unlike the Half-duplex driver, but it is more efficent as it uses DMA transfers, which can result in even faster transmission speeds. +Targeting STM32 boards where communication is offloaded to a USART hardware device. The advantage over bitbang is that this provides fast and accurate timings. USART Full-Duplex requires two conductors **without** pull-up resistors instead of one conductor with a pull-up resistor unlike the Half-duplex driver. Due to its internal design it is more efficent, which can result in even faster transmission speeds. #### Pin configuration @@ -86,12 +86,13 @@ Please note that `TX` of the master half has to be connected with the `RX` pin o To use the driver, add this to your rules.mk: ```make -SERIAL_DRIVER = usart_duplex +SERIAL_DRIVER = usart ``` Next configure the hardware via your config.h: ```c +#define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. #define SERIAL_USART_TX_PIN B6 // USART TX pin #define SERIAL_USART_RX_PIN B7 // USART RX pin //#define USART1_REMAP // Remap USART TX and RX pins on STM32F103 MCUs, see table below. @@ -104,17 +105,17 @@ Next configure the hardware via your config.h: // 3: 57600 baud // 4: 38400 baud // 5: 19200 baud -#define SERIAL_USART_DRIVER UARTD1 // USART driver of TX and RX pin. default: UARTD1 +#define SERIAL_USART_DRIVER SD1 // USART driver of TX and RX pin. default: SD1 #define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 #define SERIAL_USART_RX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 -#define SERIAL_USART_TIMEOUT 100 // USART driver timeout. default 100 +#define SERIAL_USART_TIMEOUT 20 // USART driver timeout. default 20 ``` -You must also enable the ChibiOS `UART` with blocking api feature: -* In your board's halconf.h: `#define HAL_USE_UART TRUE` and `#define UART_USE_WAIT TRUE` -* In your board's mcuconf.h: `#define STM32_UART_USE_USARTn TRUE` (where 'n' matches the peripheral number of your selected USART on the MCU) +You must also enable the ChibiOS `SERIAL` feature: +* In your board's halconf.h: `#define HAL_USE_SERIAL TRUE` +* In your board's mcuconf.h: `#define STM32_SERIAL_USE_USARTn TRUE` (where 'n' matches the peripheral number of your selected USART on the MCU) -Do note that the configuration required is for the `UART` peripheral, not the `SERIAL` peripheral. +Do note that the configuration required is for the `SERIAL` peripheral, not the `UART` peripheral. #### Pins for USART Peripherals with Alternate Functions for selected STM32 MCUs diff --git a/docs/syllabus.md b/docs/syllabus.md index ec7f66ba7..ccb382c5d 100644 --- a/docs/syllabus.md +++ b/docs/syllabus.md @@ -40,6 +40,7 @@ These topics start to dig into some of the features that QMK supports. You don't * [Tap Dance](feature_tap_dance.md) * [Combos](feature_combo.md) * [Userspace](feature_userspace.md) + * [Key Overrides](feature_key_overrides.md) # Advanced Topics @@ -53,7 +54,7 @@ Everything below here requires a lot of foundational knowledge. Besides being ab * **Advanced Features** * [Unicode](feature_unicode.md) * [API](api_overview.md) - * [Bootmagic](feature_bootmagic.md) + * [Bootmagic Lite](feature_bootmagic.md) * **Hardware** * [How Keyboards Work](how_keyboards_work.md) * [How A Keyboard Matrix Works](how_a_matrix_works.md) diff --git a/docs/tap_hold.md b/docs/tap_hold.md index 085bbde16..71bff30ba 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md @@ -36,29 +36,49 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { } ``` +## Tap-Or-Hold Decision Modes -## Permissive Hold +The code which decides between the tap and hold actions of dual-role keys supports three different modes, in increasing order of preference for the hold action: -As of [PR#1359](https://github.com/qmk/qmk_firmware/pull/1359/), there is a new `config.h` option: +1. The default mode selects the hold action only if the dual-role key is held down longer than the tapping term. In this mode pressing other keys while the dual-role key is held down does not influence the tap-or-hold decision. + +2. The “permissive hold” mode, in addition to the default behavior, immediately selects the hold action when another key is tapped (pressed and then released) while the dual-role key is held down, even if this happens earlier than the tapping term. If another key is just pressed, but then the dual-role key is released before that other key (and earlier than the tapping term), this mode will still select the tap action. + +3. The “hold on other key press” mode, in addition to the default behavior, immediately selects the hold action when another key is pressed while the dual-role key is held down, even if this happens earlier than the tapping term. + +Note that until the tap-or-hold decision completes (which happens when either the dual-role key is released, or the tapping term has expired, or the extra condition for the selected decision mode is satisfied), key events are delayed and not transmitted to the host immediately. The default mode gives the most delay (if the dual-role key is held down, this mode always waits for the whole tapping term), and the other modes may give less delay when other keys are pressed, because the hold action may be selected earlier. + +### Permissive Hold + +The “permissive hold” mode can be enabled for all dual-role keys by adding the corresponding option to `config.h`: ```c #define PERMISSIVE_HOLD ``` -This makes tap and hold keys (like Mod Tap) work better for fast typists, or for high `TAPPING_TERM` settings. +This makes tap and hold keys (like Layer Tap) work better for fast typists, or for high `TAPPING_TERM` settings. -If you press a Mod Tap key, tap another key (press and release) and then release the Mod Tap key, all within the tapping term, it will output the tapping function for both keys. +If you press a dual-role key, tap another key (press and release) and then release the dual-role key, all within the tapping term, by default the dual-role key will perform its tap action. If the `PERMISSIVE_HOLD` option is enabled, the dual-role key will perform its hold action instead. -For Instance: +An example of a sequence which is affected by the “permissive hold” mode: -- `SFT_T(KC_A)` Down -- `KC_X` Down -- `KC_X` Up -- `SFT_T(KC_A)` Up +- `LT(2, KC_A)` Down +- `KC_L` Down (the `L` key is also mapped to `KC_RGHT` on layer 2) +- `KC_L` Up +- `LT(2, KC_A)` Up -Normally, if you do all this within the `TAPPING_TERM` (default: 200ms) this will be registered as `ax` by the firmware and host system. With permissive hold enabled, this modifies how this is handled by considering the Mod Tap keys as a Mod if another key is tapped, and would registered as `X` (`SHIFT`+`x`). +Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `PERMISSIVE_HOLD` option enabled, the Layer Tap key is considered as a layer switch if another key is tapped, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2). -?> If you have `Ignore Mod Tap Interrupt` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`. +However, this slightly different sequence will not be affected by the “permissive hold” mode: + +- `LT(2, KC_A)` Down +- `KC_L` Down (the `L` key is also mapped to `KC_RGHT` on layer 2) +- `LT(2, KC_A)` Up +- `KC_L` Up + +In the sequence above the dual-role key is released before the other key is released, and if that happens within the tapping term, the “permissive hold” mode will still choose the tap action for the dual-role key, and the sequence will be registered as `al` by the host. + +?> The `PERMISSIVE_HOLD` option also affects Mod Tap keys, but this may not be noticeable if you do not also enable the `IGNORE_MOD_TAP_INTERRUPT` option for those keys, because the default handler for Mod Tap keys also considers both the “nested press” and “rolling press” sequences like shown above as a modifier hold, not the tap action. If you do not enable `IGNORE_MOD_TAP_INTERRUPT`, the effect of `PERMISSIVE_HOLD` on Mod Tap keys would be limited to reducing the delay before the key events are made visible to the host. For more granular control of this feature, you can add the following to your `config.h`: @@ -72,13 +92,60 @@ You can then add the following function to your keymap: bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case LT(1, KC_BSPC): + // Immediately select the hold action when another key is tapped. return true; default: + // Do not select the hold action when another key is tapped. return false; } } ``` +### Hold On Other Key Press + +The “hold on other key press” mode can be enabled for all dual-role keys by adding the corresponding option to `config.h`: + +```c +#define HOLD_ON_OTHER_KEY_PRESS +``` + +This mode makes tap and hold keys (like Layer Tap) work better for fast typists, or for high `TAPPING_TERM` settings. Compared to the “permissive hold” mode, this mode selects the hold action in more cases. + +If you press a dual-role key, press another key, and then release the dual-role key, all within the tapping term, by default the dual-role key will perform its tap action. If the `HOLD_ON_OTHER_KEY_PRESS` option is enabled, the dual-role key will perform its hold action instead. + +An example of a sequence which is affected by the “hold on other key press” mode, but not by the “permissive hold” mode: + +- `LT(2, KC_A)` Down +- `KC_L` Down (the `L` key is also mapped to `KC_RGHT` on layer 2) +- `LT(2, KC_A)` Up +- `KC_L` Up + +Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `HOLD_ON_OTHER_KEY_PRESS` option enabled, the Layer Tap key is considered as a layer switch if another key is pressed, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2). + +?> The `HOLD_ON_OTHER_KEY_PRESS` option also affects Mod Tap keys, but this may not be noticeable if you do not also enable the `IGNORE_MOD_TAP_INTERRUPT` option for those keys, because the default handler for Mod Tap keys also considers the “rolling press” sequence like shown above as a modifier hold, not the tap action. If you do not enable `IGNORE_MOD_TAP_INTERRUPT`, the effect of `HOLD_ON_OTHER_KEY_PRESS` on Mod Tap keys would be limited to reducing the delay before the key events are made visible to the host. + +For more granular control of this feature, you can add the following to your `config.h`: + +```c +#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY +``` + +You can then add the following function to your keymap: + +```c +bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LT(1, KC_BSPC): + // Immediately select the hold action when another key is pressed. + return true; + default: + // Do not select the hold action when another key is pressed. + return false; + } +} +``` + + ## Ignore Mod Tap Interrupt To enable this setting, add this to your `config.h`: @@ -87,23 +154,22 @@ To enable this setting, add this to your `config.h`: #define IGNORE_MOD_TAP_INTERRUPT ``` -Similar to Permissive Hold, this alters how the firmware processes inputs for fast typists. If you press a Mod Tap key, press another key, release the Mod Tap key, and then release the normal key, it would normally output the Mod plus the normal key, even if pressed within the `TAPPING_TERM`. This may not be desirable for rolling combo keys, or for fast typists who have a Mod Tap on a frequently used key (`RCTL_T(KC_QUOT)`, for example). +?> This option affects only the Mod Tap keys; it does not affect other dual-role keys such as Layer Tap. -Setting `Ignore Mod Tap Interrupt` requires holding both keys for the `TAPPING_TERM` to trigger the hold function (the mod). +By default the tap-or-hold decision for Mod Tap keys strongly prefers the hold action. If you press a Mod Tap key, then press another key while still holding the Mod Tap key down, the Mod Tap press will be handled as a modifier hold even if the Mod Tap key is then released within the tapping term, and irrespective of the order in which those keys are released. Using options such as `PERMISSIVE_HOLD` or `HOLD_ON_OTHER_KEY_PRESS` will not affect the functionality of Mod Tap keys in a major way (these options would still affect the delay until the common code for dual-role keys finishes its tap-or-hold decision, but then the special code for Mod Tap keys will override the result of that decision and choose the hold action if another key was pressed). In fact, by default the tap-or-hold decision for Mod Tap keys is done in the same way as if the `HOLD_ON_OTHER_KEY_PRESS` option was enabled, but without the decreased delay provided by `HOLD_ON_OTHER_KEY_PRESS`. -For Instance: +If the `IGNORE_MOD_TAP_INTERRUPT` option is enabled, Mod Tap keys are no longer treated as a special case, and their behavior will match the behavior of other dual-role keys such as Layer Tap. Then the behavior of Mod Tap keys can be further tuned using other options such as `PERMISSIVE_HOLD` or `HOLD_ON_OTHER_KEY_PRESS`. + +An example of a sequence which will be affected by the `IGNORE_MOD_TAP_INTERRUPT` option (assuming that options like `PERMISSIVE_HOLD` or `HOLD_ON_OTHER_KEY_PRESS` are not enabled): - `SFT_T(KC_A)` Down - `KC_X` Down - `SFT_T(KC_A)` Up - `KC_X` Up -Normally, this would send a capital `X` (`SHIFT`+`x`), or, Mod + key. With `Ignore Mod Tap Interrupt` enabled, holding both keys are required for the `TAPPING_TERM` to register the hold action. A quick tap will output `ax` in this case, while a hold on both will still output capital `X` (`SHIFT`+`x`). +Normally, this would send a capital `X` (`SHIFT`+`x`), even if the sequence is performed faster than the `TAPPING_TERM`. However, if the `IGNORE_MOD_TAP_INTERRUPT` option is enabled, the `SFT_T(KC_A)` key must be held longer than the `TAPPING_TERM` to register the hold action. A quick tap will output `ax` in this case, while a hold will still output a capital `X` (`SHIFT`+`x`). - -?> __Note__: This only concerns modifiers and not layer switching keys. - -?> If you have `Permissive Hold` enabled, as well, this will modify how both work. The regular key has the modifier added if the first key is released first or if both keys are held longer than the `TAPPING_TERM`. +However, if the `HOLD_ON_OTHER_KEY_PRESS` option is enabled in addition to `IGNORE_MOD_TAP_INTERRUPT`, the above sequence will again send a capital `X` (`SHIFT`+`x`) even if performed faster that the `TAPPING_TERM`. The difference from the default configuration is that by default the host will receive the key events only after the `SFT_T(KC_A)` key is released, but with the `HOLD_ON_OTHER_KEY_PRESS` option the host will start receiving key events when the `KC_X` key is pressed. For more granular control of this feature, you can add the following to your `config.h`: @@ -117,8 +183,12 @@ You can then add the following function to your keymap: bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case SFT_T(KC_SPC): + // Do not force the mod-tap key press to be handled as a modifier + // if any other key was pressed while the mod-tap key is held down. return true; default: + // Force the mod-tap key press to be handled as a modifier if any + // other key was pressed while the mod-tap key is held down. return false; } } diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index 331b1c893..e3dd5cb78 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -146,6 +146,7 @@ The `process_record()` function itself is deceptively simple, but hidden within * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_audio.c#L19) * [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_steno.c#L160) * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_music.c#L114) + * [`bool process_key_override(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/5a1b857dea45a17698f6baa7dd1b7a7ea907fb0a/quantum/process_keycode/process_key_override.c#L397) * [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L141) * [`bool process_unicode_common(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode_common.c#L169) calls one of: diff --git a/docs/zh-cn/custom_quantum_functions.md b/docs/zh-cn/custom_quantum_functions.md index 27b2edf38..44cb5cf76 100644 --- a/docs/zh-cn/custom_quantum_functions.md +++ b/docs/zh-cn/custom_quantum_functions.md @@ -297,7 +297,7 @@ void suspend_wakeup_init_user(void) { 本例使用了Planck键盘示范了如何设置 [RGB背光灯](feature_rgblight.md)使之与层对应 ```c -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case _RAISE: rgblight_setrgb (0x00, 0x00, 0xFF); @@ -321,7 +321,7 @@ uint32_t layer_state_set_user(uint32_t state) { ### `layer_state_set_*` 函数文档 * 键盘/修订: `uint32_t layer_state_set_kb(uint32_t state)` -* 布局: `uint32_t layer_state_set_user(uint32_t state)` +* 布局: `layer_state_t layer_state_set_user(layer_state_t state)` 该`状态`是活动层的bitmask, 详见[布局概述](keymap.md#布局的层状态) @@ -377,7 +377,7 @@ void keyboard_post_init_user(void) { 以上函数会在读EEPROM配置后立即使用该设置来设置默认层RGB颜色。"raw"的值是从你上面基于"union"创建的结构体中转换来的。 ```c -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case _RAISE: if (user_config.rgb_layer_change) { rgblight_sethsv_noeeprom_magenta(); rgblight_mode_noeeprom(1); } diff --git a/doxygen-todo b/doxygen-todo index d8892e48d..643a0df1d 100644 --- a/doxygen-todo +++ b/doxygen-todo @@ -21,7 +21,6 @@ quantum/tools quantum/visualizer quantum/visualizer/resources drivers -drivers/avr drivers/ugfx drivers/ugfx/gdisp drivers/ugfx/gdisp/is31fl3731c diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c deleted file mode 100644 index b1e488529..000000000 --- a/drivers/avr/i2c_master.c +++ /dev/null @@ -1,224 +0,0 @@ -/* Copyright (C) 2019 Elia Ritterbusch - + - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -/* Library made by: g4lvanix - * GitHub repository: https://github.com/g4lvanix/I2C-master-lib - */ - -#include -#include - -#include "i2c_master.h" -#include "timer.h" -#include "wait.h" - -#ifndef F_SCL -# define F_SCL 400000UL // SCL frequency -#endif - -#define TWBR_val (((F_CPU / F_SCL) - 16) / 2) - -void i2c_init(void) { - TWSR = 0; /* no prescaler */ - TWBR = (uint8_t)TWBR_val; - -#ifdef __AVR_ATmega32A__ - // set pull-up resistors on I2C bus pins - PORTC |= 0b11; - - // enable TWI (two-wire interface) - TWCR |= (1 << TWEN); - - // enable TWI interrupt and slave address ACK - TWCR |= (1 << TWIE); - TWCR |= (1 << TWEA); -#endif -} - -i2c_status_t i2c_start(uint8_t address, uint16_t timeout) { - // reset TWI control register - TWCR = 0; - // transmit START condition - TWCR = (1 << TWINT) | (1 << TWSTA) | (1 << TWEN); - - uint16_t timeout_timer = timer_read(); - while (!(TWCR & (1 << TWINT))) { - if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { - return I2C_STATUS_TIMEOUT; - } - } - - // check if the start condition was successfully transmitted - if (((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)) { - return I2C_STATUS_ERROR; - } - - // load slave address into data register - TWDR = address; - // start transmission of address - TWCR = (1 << TWINT) | (1 << TWEN); - - timeout_timer = timer_read(); - while (!(TWCR & (1 << TWINT))) { - if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { - return I2C_STATUS_TIMEOUT; - } - } - - // check if the device has acknowledged the READ / WRITE mode - uint8_t twst = TW_STATUS & 0xF8; - if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) { - return I2C_STATUS_ERROR; - } - - return I2C_STATUS_SUCCESS; -} - -i2c_status_t i2c_write(uint8_t data, uint16_t timeout) { - // load data into data register - TWDR = data; - // start transmission of data - TWCR = (1 << TWINT) | (1 << TWEN); - - uint16_t timeout_timer = timer_read(); - while (!(TWCR & (1 << TWINT))) { - if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { - return I2C_STATUS_TIMEOUT; - } - } - - if ((TW_STATUS & 0xF8) != TW_MT_DATA_ACK) { - return I2C_STATUS_ERROR; - } - - return I2C_STATUS_SUCCESS; -} - -int16_t i2c_read_ack(uint16_t timeout) { - // start TWI module and acknowledge data after reception - TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWEA); - - uint16_t timeout_timer = timer_read(); - while (!(TWCR & (1 << TWINT))) { - if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { - return I2C_STATUS_TIMEOUT; - } - } - - // return received data from TWDR - return TWDR; -} - -int16_t i2c_read_nack(uint16_t timeout) { - // start receiving without acknowledging reception - TWCR = (1 << TWINT) | (1 << TWEN); - - uint16_t timeout_timer = timer_read(); - while (!(TWCR & (1 << TWINT))) { - if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { - return I2C_STATUS_TIMEOUT; - } - } - - // return received data from TWDR - return TWDR; -} - -i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_status_t status = i2c_start(address | I2C_WRITE, timeout); - - for (uint16_t i = 0; i < length && status >= 0; i++) { - status = i2c_write(data[i], timeout); - } - - i2c_stop(); - - return status; -} - -i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_status_t status = i2c_start(address | I2C_READ, timeout); - - for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { - status = i2c_read_ack(timeout); - if (status >= 0) { - data[i] = status; - } - } - - if (status >= 0) { - status = i2c_read_nack(timeout); - if (status >= 0) { - data[(length - 1)] = status; - } - } - - i2c_stop(); - - return (status < 0) ? status : I2C_STATUS_SUCCESS; -} - -i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_status_t status = i2c_start(devaddr | 0x00, timeout); - if (status >= 0) { - status = i2c_write(regaddr, timeout); - - for (uint16_t i = 0; i < length && status >= 0; i++) { - status = i2c_write(data[i], timeout); - } - } - - i2c_stop(); - - return status; -} - -i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { - i2c_status_t status = i2c_start(devaddr, timeout); - if (status < 0) { - goto error; - } - - status = i2c_write(regaddr, timeout); - if (status < 0) { - goto error; - } - - status = i2c_start(devaddr | 0x01, timeout); - - for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { - status = i2c_read_ack(timeout); - if (status >= 0) { - data[i] = status; - } - } - - if (status >= 0) { - status = i2c_read_nack(timeout); - if (status >= 0) { - data[(length - 1)] = status; - } - } - -error: - i2c_stop(); - - return (status < 0) ? status : I2C_STATUS_SUCCESS; -} - -void i2c_stop(void) { - // transmit STOP condition - TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO); -} diff --git a/drivers/avr/i2c_slave.c b/drivers/avr/i2c_slave.c deleted file mode 100644 index 62a378165..000000000 --- a/drivers/avr/i2c_slave.c +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (C) 2019 Elia Ritterbusch - + - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -/* Library made by: g4lvanix - * GitHub repository: https://github.com/g4lvanix/I2C-slave-lib - */ - -#include -#include -#include -#include - -#include "i2c_slave.h" - -volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT]; - -static volatile uint8_t buffer_address; -static volatile bool slave_has_register_set = false; - -void i2c_slave_init(uint8_t address) { - // load address into TWI address register - TWAR = address; - // set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt - TWCR = (1 << TWIE) | (1 << TWEA) | (1 << TWINT) | (1 << TWEN); -} - -void i2c_slave_stop(void) { - // clear acknowledge and enable bits - TWCR &= ~((1 << TWEA) | (1 << TWEN)); -} - -ISR(TWI_vect) { - uint8_t ack = 1; - - switch (TW_STATUS) { - case TW_SR_SLA_ACK: - // The device is now a slave receiver - slave_has_register_set = false; - break; - - case TW_SR_DATA_ACK: - // This device is a slave receiver and has received data - // First byte is the location then the bytes will be writen in buffer with auto-incriment - if (!slave_has_register_set) { - buffer_address = TWDR; - - if (buffer_address >= I2C_SLAVE_REG_COUNT) { // address out of bounds dont ack - ack = 0; - buffer_address = 0; - } - slave_has_register_set = true; // address has been receaved now fill in buffer - } else { - i2c_slave_reg[buffer_address] = TWDR; - buffer_address++; - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // This device is a slave transmitter and master has requested data - TWDR = i2c_slave_reg[buffer_address]; - buffer_address++; - break; - - case TW_BUS_ERROR: - // We got an error, reset i2c - TWCR = 0; - default: - break; - } - - // Reset i2c state machine to be ready for next interrupt - TWCR |= (1 << TWIE) | (1 << TWINT) | (ack << TWEA) | (1 << TWEN); -} diff --git a/drivers/avr/i2c_slave.h b/drivers/avr/i2c_slave.h deleted file mode 100644 index 1cd0625ef..000000000 --- a/drivers/avr/i2c_slave.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright (C) 2019 Elia Ritterbusch - + - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -/* Library made by: g4lvanix - * GitHub repository: https://github.com/g4lvanix/I2C-slave-lib - - Info: Inititate the library by giving the required address. - Read or write to the necessary buffer according to the opperation. - */ - -#pragma once - -#define I2C_SLAVE_REG_COUNT 30 - -extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT]; - -void i2c_slave_init(uint8_t address); -void i2c_slave_stop(void); diff --git a/drivers/avr/serial.c b/drivers/avr/serial.c deleted file mode 100644 index 3647bee0d..000000000 --- a/drivers/avr/serial.c +++ /dev/null @@ -1,563 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - * - * 2018-10-28 checked - * avr-gcc 4.9.2 - * avr-gcc 5.4.0 - * avr-gcc 7.3.0 - */ - -#ifndef F_CPU -# define F_CPU 16000000 -#endif - -#include -#include -#include -#include -#include -#include "serial.h" - -#ifdef SOFT_SERIAL_PIN - -# if !(defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB162__) || 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 - -// ATmegaxxU2/AT90USB162 specific config -# if defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_AT90USB162__) -// 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 - -// 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 -# 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 -# 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) - -// parity check -# define ODD_PARITY 1 -# define EVEN_PARITY 0 -# define PARITY EVEN_PARITY - -# ifdef SERIAL_DELAY -// custom setup in config.h -// #define TID_SEND_ADJUST 2 -// #define SERIAL_DELAY 6 // micro sec -// #define READ_WRITE_START_ADJUST 30 // cycles -// #define READ_WRITE_WIDTH_ADJUST 8 // cycles -# else -// ============ Standard setups ============ - -# ifndef SELECT_SOFT_SERIAL_SPEED -# define SELECT_SOFT_SERIAL_SPEED 1 -// 0: about 189kbps (Experimental only) -// 1: about 137kbps (default) -// 2: about 75kbps -// 3: about 39kbps -// 4: about 26kbps -// 5: about 20kbps -# endif - -# if __GNUC__ < 6 -# define TID_SEND_ADJUST 14 -# else -# define TID_SEND_ADJUST 2 -# endif - -# if SELECT_SOFT_SERIAL_SPEED == 0 -// Very High speed -# define SERIAL_DELAY 4 // micro sec -# if __GNUC__ < 6 -# define READ_WRITE_START_ADJUST 33 // cycles -# define READ_WRITE_WIDTH_ADJUST 3 // cycles -# else -# define READ_WRITE_START_ADJUST 34 // cycles -# define READ_WRITE_WIDTH_ADJUST 7 // cycles -# endif -# elif SELECT_SOFT_SERIAL_SPEED == 1 -// High speed -# define SERIAL_DELAY 6 // micro sec -# if __GNUC__ < 6 -# define READ_WRITE_START_ADJUST 30 // cycles -# define READ_WRITE_WIDTH_ADJUST 3 // cycles -# else -# define READ_WRITE_START_ADJUST 33 // cycles -# define READ_WRITE_WIDTH_ADJUST 7 // cycles -# endif -# elif SELECT_SOFT_SERIAL_SPEED == 2 -// Middle speed -# define SERIAL_DELAY 12 // micro sec -# define READ_WRITE_START_ADJUST 30 // cycles -# if __GNUC__ < 6 -# define READ_WRITE_WIDTH_ADJUST 3 // cycles -# else -# define READ_WRITE_WIDTH_ADJUST 7 // cycles -# endif -# elif SELECT_SOFT_SERIAL_SPEED == 3 -// Low speed -# define SERIAL_DELAY 24 // micro sec -# define READ_WRITE_START_ADJUST 30 // cycles -# if __GNUC__ < 6 -# define READ_WRITE_WIDTH_ADJUST 3 // cycles -# else -# define READ_WRITE_WIDTH_ADJUST 7 // cycles -# endif -# elif SELECT_SOFT_SERIAL_SPEED == 4 -// Very Low speed -# define SERIAL_DELAY 36 // micro sec -# define READ_WRITE_START_ADJUST 30 // cycles -# if __GNUC__ < 6 -# define READ_WRITE_WIDTH_ADJUST 3 // cycles -# else -# define READ_WRITE_WIDTH_ADJUST 7 // cycles -# endif -# elif SELECT_SOFT_SERIAL_SPEED == 5 -// Ultra Low speed -# define SERIAL_DELAY 48 // micro sec -# define READ_WRITE_START_ADJUST 30 // cycles -# if __GNUC__ < 6 -# define READ_WRITE_WIDTH_ADJUST 3 // cycles -# else -# define READ_WRITE_WIDTH_ADJUST 7 // cycles -# endif -# else -# error invalid SELECT_SOFT_SERIAL_SPEED value -# endif /* SELECT_SOFT_SERIAL_SPEED */ -# endif /* SERIAL_DELAY */ - -# define SERIAL_DELAY_HALF1 (SERIAL_DELAY / 2) -# define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY / 2) - -# define SLAVE_INT_WIDTH_US 1 -# ifndef SERIAL_USE_MULTI_TRANSACTION -# define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY -# else -# define SLAVE_INT_ACK_WIDTH_UNIT 2 -# define SLAVE_INT_ACK_WIDTH 4 -# endif - -static SSTD_t *Transaction_table = NULL; -static uint8_t Transaction_table_size = 0; - -inline static void serial_delay(void) ALWAYS_INLINE; -inline static void serial_delay(void) { _delay_us(SERIAL_DELAY); } - -inline static void serial_delay_half1(void) ALWAYS_INLINE; -inline static void serial_delay_half1(void) { _delay_us(SERIAL_DELAY_HALF1); } - -inline static void serial_delay_half2(void) ALWAYS_INLINE; -inline static void serial_delay_half2(void) { _delay_us(SERIAL_DELAY_HALF2); } - -inline static void serial_output(void) ALWAYS_INLINE; -inline static void serial_output(void) { setPinOutput(SOFT_SERIAL_PIN); } - -// make the serial pin an input with pull-up resistor -inline static void serial_input_with_pullup(void) ALWAYS_INLINE; -inline static void serial_input_with_pullup(void) { setPinInputHigh(SOFT_SERIAL_PIN); } - -inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; -inline static uint8_t serial_read_pin(void) { return !!readPin(SOFT_SERIAL_PIN); } - -inline static void serial_low(void) ALWAYS_INLINE; -inline static void serial_low(void) { writePinLow(SOFT_SERIAL_PIN); } - -inline static void serial_high(void) ALWAYS_INLINE; -inline static void serial_high(void) { writePinHigh(SOFT_SERIAL_PIN); } - -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) { - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_output(); - serial_high(); -} - -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) { - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - serial_input_with_pullup(); - - // Enable INT0-INT7 - EIMSK |= EIMSK_BIT; - EICRx &= EICRx_BIT; -} - -// Used by the sender to synchronize timing with the reciver. -static void sync_recv(void) NO_INLINE; -static void sync_recv(void) { - for (uint8_t i = 0; i < SERIAL_DELAY * 5 && serial_read_pin(); i++) { - } - // This shouldn't hang if the target disconnects because the - // serial line will float to high if the target does disconnect. - while (!serial_read_pin()) - ; -} - -// Used by the reciver to send a synchronization signal to the sender. -static void sync_send(void) NO_INLINE; -static void sync_send(void) { - serial_low(); - serial_delay(); - serial_high(); -} - -// Reads a byte from the serial line -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; -static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { - uint8_t byte, i, p, pb; - - _delay_sub_us(READ_WRITE_START_ADJUST); - for (i = 0, byte = 0, p = PARITY; i < bit; i++) { - serial_delay_half1(); // read the middle of pulses - if (serial_read_pin()) { - byte = (byte << 1) | 1; - p ^= 1; - } else { - byte = (byte << 1) | 0; - p ^= 0; - } - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - } - /* recive parity bit */ - serial_delay_half1(); // read the middle of pulses - pb = serial_read_pin(); - _delay_sub_us(READ_WRITE_WIDTH_ADJUST); - serial_delay_half2(); - - *pterrcount += (p != pb) ? 1 : 0; - - return byte; -} - -// Sends a byte with MSB ordering -void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; -void serial_write_chunk(uint8_t data, uint8_t bit) { - uint8_t b, p; - for (p = PARITY, b = 1 << (bit - 1); b; b >>= 1) { - if (data & b) { - serial_high(); - p ^= 1; - } else { - serial_low(); - p ^= 0; - } - serial_delay(); - } - /* send parity bit */ - if (p & 1) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - - serial_low(); // sync_send() / senc_recv() need raise edge -} - -static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static void serial_send_packet(uint8_t *buffer, uint8_t size) { - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - data = buffer[i]; - sync_send(); - serial_write_chunk(data, 8); - } -} - -static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; -static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { - uint8_t pecount = 0; - for (uint8_t i = 0; i < size; ++i) { - uint8_t data; - sync_recv(); - data = serial_read_chunk(&pecount, 8); - buffer[i] = data; - } - return pecount == 0; -} - -inline static void change_sender2reciver(void) { - sync_send(); // 0 - serial_delay_half1(); // 1 - serial_low(); // 2 - serial_input_with_pullup(); // 2 - serial_delay_half1(); // 3 -} - -inline static void change_reciver2sender(void) { - sync_recv(); // 0 - serial_delay(); // 1 - serial_low(); // 3 - serial_output(); // 3 - serial_delay_half1(); // 4 -} - -static inline uint8_t nibble_bits_count(uint8_t bits) { - bits = (bits & 0x5) + (bits >> 1 & 0x5); - bits = (bits & 0x3) + (bits >> 2 & 0x3); - return bits; -} - -// interrupt handle to be used by the target device -ISR(SERIAL_PIN_INTERRUPT) { -# ifndef SERIAL_USE_MULTI_TRANSACTION - serial_low(); - serial_output(); - SSTD_t *trans = Transaction_table; -# else - // recive transaction table index - uint8_t tid, bits; - uint8_t pecount = 0; - sync_recv(); - bits = serial_read_chunk(&pecount, 7); - tid = bits >> 3; - bits = (bits & 7) != nibble_bits_count(tid); - if (bits || pecount > 0 || tid > Transaction_table_size) { - return; - } - serial_delay_half1(); - - serial_high(); // response step1 low->high - serial_output(); - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT * SLAVE_INT_ACK_WIDTH); - SSTD_t *trans = &Transaction_table[tid]; - serial_low(); // response step2 ack high->low -# endif - - // target send phase - if (trans->target2initiator_buffer_size > 0) serial_send_packet((uint8_t *)trans->target2initiator_buffer, trans->target2initiator_buffer_size); - // target switch to input - change_sender2reciver(); - - // target recive phase - if (trans->initiator2target_buffer_size > 0) { - if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, trans->initiator2target_buffer_size)) { - *trans->status = TRANSACTION_ACCEPTED; - } else { - *trans->status = TRANSACTION_DATA_ERROR; - } - } else { - *trans->status = TRANSACTION_ACCEPTED; - } - - sync_recv(); // weit initiator output to high -} - -///////// -// start transaction by initiator -// -// int soft_serial_transaction(int sstd_index) -// -// Returns: -// TRANSACTION_END -// TRANSACTION_NO_RESPONSE -// TRANSACTION_DATA_ERROR -// this code is very time dependent, so we need to disable interrupts -# ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void) { - SSTD_t *trans = Transaction_table; -# else -int soft_serial_transaction(int sstd_index) { - if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR; - SSTD_t *trans = &Transaction_table[sstd_index]; -# endif - cli(); - - // signal to the target that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(SLAVE_INT_WIDTH_US); - -# ifndef SERIAL_USE_MULTI_TRANSACTION - // wait for the target response - serial_input_with_pullup(); - _delay_us(SLAVE_INT_RESPONSE_TIME); - - // check if the target is present - if (serial_read_pin()) { - // target failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - -# else - // send transaction table index - int tid = (sstd_index << 3) | (7 & nibble_bits_count(sstd_index)); - sync_send(); - _delay_sub_us(TID_SEND_ADJUST); - serial_write_chunk(tid, 7); - serial_delay_half1(); - - // wait for the target response (step1 low->high) - serial_input_with_pullup(); - while (!serial_read_pin()) { - _delay_sub_us(2); - } - - // check if the target is present (step2 high->low) - for (int i = 0; serial_read_pin(); i++) { - if (i > SLAVE_INT_ACK_WIDTH + 1) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; - } - _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); - } -# endif - - // initiator recive phase - // if the target is present syncronize with it - if (trans->target2initiator_buffer_size > 0) { - if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, trans->target2initiator_buffer_size)) { - serial_output(); - serial_high(); - *trans->status = TRANSACTION_DATA_ERROR; - sei(); - return TRANSACTION_DATA_ERROR; - } - } - - // initiator switch to output - change_reciver2sender(); - - // initiator send phase - if (trans->initiator2target_buffer_size > 0) { - serial_send_packet((uint8_t *)trans->initiator2target_buffer, trans->initiator2target_buffer_size); - } - - // always, release the line when not in use - sync_send(); - - *trans->status = TRANSACTION_END; - sei(); - return TRANSACTION_END; -} - -# ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index) { - SSTD_t *trans = &Transaction_table[sstd_index]; - cli(); - int retval = *trans->status; - *trans->status = 0; - ; - sei(); - return retval; -} -# endif - -#endif - -// Helix serial.c history -// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) -// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) -// (adjusted with avr-gcc 4.9.2) -// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) -// (adjusted with avr-gcc 4.9.2) -// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) -// (adjusted with avr-gcc 4.9.2) -// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) -// (adjusted with avr-gcc 7.3.0) -// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) -// (adjusted with avr-gcc 5.4.0, 7.3.0) -// 2018-12-17 copy to TOP/quantum/split_common/ and remove backward compatibility code (#4669) diff --git a/drivers/avr/serial.h b/drivers/avr/serial.h deleted file mode 100644 index 53e66cf90..000000000 --- a/drivers/avr/serial.h +++ /dev/null @@ -1,62 +0,0 @@ -#pragma once - -#include - -// ///////////////////////////////////////////////////////////////// -// Need Soft Serial defines in config.h -// ///////////////////////////////////////////////////////////////// -// ex. -// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 -// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 -// // 1: about 137kbps (default) -// // 2: about 75kbps -// // 3: about 39kbps -// // 4: about 26kbps -// // 5: about 20kbps -// -// //// USE simple API (using signle-type transaction function) -// /* nothing */ -// //// USE flexible API (using multi-type transaction function) -// #define SERIAL_USE_MULTI_TRANSACTION -// -// ///////////////////////////////////////////////////////////////// - -// Soft Serial Transaction Descriptor -typedef struct _SSTD_t { - uint8_t *status; - uint8_t initiator2target_buffer_size; - uint8_t *initiator2target_buffer; - uint8_t target2initiator_buffer_size; - uint8_t *target2initiator_buffer; -} SSTD_t; -#define TID_LIMIT(table) (sizeof(table) / sizeof(SSTD_t)) - -// initiator is transaction start side -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); -// target is interrupt accept side -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); - -// initiator resullt -#define TRANSACTION_END 0 -#define TRANSACTION_NO_RESPONSE 0x1 -#define TRANSACTION_DATA_ERROR 0x2 -#define TRANSACTION_TYPE_ERROR 0x4 -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void); -#else -int soft_serial_transaction(int sstd_index); -#endif - -// target status -// *SSTD_t.status has -// initiator: -// TRANSACTION_END -// or TRANSACTION_NO_RESPONSE -// or TRANSACTION_DATA_ERROR -// target: -// TRANSACTION_DATA_ERROR -// or TRANSACTION_ACCEPTED -#define TRANSACTION_ACCEPTED 0x8 -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index); -#endif diff --git a/drivers/chibios/serial.c b/drivers/chibios/serial.c deleted file mode 100644 index 54f7e1321..000000000 --- a/drivers/chibios/serial.c +++ /dev/null @@ -1,290 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#include "quantum.h" -#include "serial.h" -#include "wait.h" - -#include - -// TODO: resolve/remove build warnings -#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) && defined(PROTOCOL_CHIBIOS) && defined(WS2812_DRIVER_BITBANG) -# warning "RGBLED_SPLIT not supported with bitbang WS2812 driver" -#endif - -// default wait implementation cannot be called within interrupt -// this method seems to be more accurate than GPT timers -#if PORT_SUPPORTS_RT == FALSE -# error "chSysPolledDelayX method not supported on this platform" -#else -# undef wait_us -# define wait_us(x) chSysPolledDelayX(US2RTC(STM32_SYSCLK, x)) -#endif - -#ifndef SELECT_SOFT_SERIAL_SPEED -# define SELECT_SOFT_SERIAL_SPEED 1 -// TODO: correct speeds... -// 0: about 189kbps (Experimental only) -// 1: about 137kbps (default) -// 2: about 75kbps -// 3: about 39kbps -// 4: about 26kbps -// 5: about 20kbps -#endif - -// Serial pulse period in microseconds. At the moment, going lower than 12 causes communication failure -#if SELECT_SOFT_SERIAL_SPEED == 0 -# define SERIAL_DELAY 12 -#elif SELECT_SOFT_SERIAL_SPEED == 1 -# define SERIAL_DELAY 16 -#elif SELECT_SOFT_SERIAL_SPEED == 2 -# define SERIAL_DELAY 24 -#elif SELECT_SOFT_SERIAL_SPEED == 3 -# define SERIAL_DELAY 32 -#elif SELECT_SOFT_SERIAL_SPEED == 4 -# define SERIAL_DELAY 48 -#elif SELECT_SOFT_SERIAL_SPEED == 5 -# define SERIAL_DELAY 64 -#else -# error invalid SELECT_SOFT_SERIAL_SPEED value -#endif - -inline static void serial_delay(void) { wait_us(SERIAL_DELAY); } -inline static void serial_delay_half(void) { wait_us(SERIAL_DELAY / 2); } -inline static void serial_delay_blip(void) { wait_us(1); } -inline static void serial_output(void) { setPinOutput(SOFT_SERIAL_PIN); } -inline static void serial_input(void) { setPinInputHigh(SOFT_SERIAL_PIN); } -inline static bool serial_read_pin(void) { return !!readPin(SOFT_SERIAL_PIN); } -inline static void serial_low(void) { writePinLow(SOFT_SERIAL_PIN); } -inline static void serial_high(void) { writePinHigh(SOFT_SERIAL_PIN); } - -void interrupt_handler(void *arg); - -// Use thread + palWaitLineTimeout instead of palSetLineCallback -// - Methods like setPinOutput and palEnableLineEvent/palDisableLineEvent -// cause the interrupt to lock up, which would limit to only receiving data... -static THD_WORKING_AREA(waThread1, 128); -static THD_FUNCTION(Thread1, arg) { - (void)arg; - chRegSetThreadName("blinker"); - while (true) { - palWaitLineTimeout(SOFT_SERIAL_PIN, TIME_INFINITE); - interrupt_handler(NULL); - } -} - -static SSTD_t *Transaction_table = NULL; -static uint8_t Transaction_table_size = 0; - -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) { - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - - serial_output(); - serial_high(); -} - -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) { - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - - serial_input(); - - palEnablePadEvent(PAL_PORT(SOFT_SERIAL_PIN), PAL_PAD(SOFT_SERIAL_PIN), PAL_EVENT_MODE_FALLING_EDGE); - chThdCreateStatic(waThread1, sizeof(waThread1), HIGHPRIO, Thread1, NULL); -} - -// Used by the master to synchronize timing with the slave. -static void __attribute__((noinline)) sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()) { - } - - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static void __attribute__((noinline)) sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static uint8_t __attribute__((noinline)) serial_read_byte(void) { - uint8_t byte = 0; - serial_input(); - for (uint8_t i = 0; i < 8; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - } - - return byte; -} - -// Sends a byte with MSB ordering -static void __attribute__((noinline)) serial_write_byte(uint8_t data) { - uint8_t b = 8; - serial_output(); - while (b--) { - if (data & (1 << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -void interrupt_handler(void *arg) { - chSysLockFromISR(); - - sync_send(); - - // read mid pulses - serial_delay_blip(); - - uint8_t checksum_computed = 0; - int sstd_index = 0; - -#ifdef SERIAL_USE_MULTI_TRANSACTION - sstd_index = serial_read_byte(); - sync_send(); -#endif - - SSTD_t *trans = &Transaction_table[sstd_index]; - for (int i = 0; i < trans->initiator2target_buffer_size; ++i) { - trans->initiator2target_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += trans->initiator2target_buffer[i]; - } - checksum_computed ^= 7; - uint8_t checksum_received = serial_read_byte(); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - uint8_t checksum = 0; - for (int i = 0; i < trans->target2initiator_buffer_size; ++i) { - serial_write_byte(trans->target2initiator_buffer[i]); - sync_send(); - serial_delay_half(); - checksum += trans->target2initiator_buffer[i]; - } - serial_write_byte(checksum ^ 7); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - *trans->status = (checksum_computed == checksum_received) ? TRANSACTION_ACCEPTED : TRANSACTION_DATA_ERROR; - - // end transaction - serial_input(); - - // TODO: remove extra delay between transactions - serial_delay(); - - chSysUnlockFromISR(); -} - -///////// -// start transaction by initiator -// -// int soft_serial_transaction(int sstd_index) -// -// Returns: -// TRANSACTION_END -// TRANSACTION_NO_RESPONSE -// TRANSACTION_DATA_ERROR -// this code is very time dependent, so we need to disable interrupts -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void) { - int sstd_index = 0; -#else -int soft_serial_transaction(int sstd_index) { -#endif - - if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR; - SSTD_t *trans = &Transaction_table[sstd_index]; - - // TODO: remove extra delay between transactions - serial_delay(); - - // this code is very time dependent, so we need to disable interrupts - chSysLock(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - serial_delay_blip(); - - // wait for the slaves response - serial_input(); - serial_high(); - serial_delay(); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - dprintf("serial::NO_RESPONSE\n"); - chSysUnlock(); - return TRANSACTION_NO_RESPONSE; - } - - // if the slave is present syncronize with it - - uint8_t checksum = 0; - // send data to the slave -#ifdef SERIAL_USE_MULTI_TRANSACTION - serial_write_byte(sstd_index); // first chunk is transaction id - sync_recv(); -#endif - for (int i = 0; i < trans->initiator2target_buffer_size; ++i) { - serial_write_byte(trans->initiator2target_buffer[i]); - sync_recv(); - checksum += trans->initiator2target_buffer[i]; - } - serial_write_byte(checksum ^ 7); - sync_recv(); - - serial_delay(); - serial_delay(); // read mid pulses - - // receive data from the slave - uint8_t checksum_computed = 0; - for (int i = 0; i < trans->target2initiator_buffer_size; ++i) { - trans->target2initiator_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += trans->target2initiator_buffer[i]; - } - checksum_computed ^= 7; - uint8_t checksum_received = serial_read_byte(); - - sync_recv(); - serial_delay(); - - if ((checksum_computed) != (checksum_received)) { - dprintf("serial::FAIL[%u,%u,%u]\n", checksum_computed, checksum_received, sstd_index); - serial_output(); - serial_high(); - - chSysUnlock(); - return TRANSACTION_DATA_ERROR; - } - - // always, release the line when not in use - serial_high(); - serial_output(); - - chSysUnlock(); - return TRANSACTION_END; -} diff --git a/drivers/chibios/serial.h b/drivers/chibios/serial.h deleted file mode 100644 index 0c1857d52..000000000 --- a/drivers/chibios/serial.h +++ /dev/null @@ -1,62 +0,0 @@ -#pragma once - -#include - -// ///////////////////////////////////////////////////////////////// -// Need Soft Serial defines in config.h -// ///////////////////////////////////////////////////////////////// -// ex. -// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 -// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 -// // 1: about 137kbps (default) -// // 2: about 75kbps -// // 3: about 39kbps -// // 4: about 26kbps -// // 5: about 20kbps -// -// //// USE simple API (using signle-type transaction function) -// /* nothing */ -// //// USE flexible API (using multi-type transaction function) -// #define SERIAL_USE_MULTI_TRANSACTION -// -// ///////////////////////////////////////////////////////////////// - -// Soft Serial Transaction Descriptor -typedef struct _SSTD_t { - uint8_t *status; - uint8_t initiator2target_buffer_size; - uint8_t *initiator2target_buffer; - uint8_t target2initiator_buffer_size; - uint8_t *target2initiator_buffer; -} SSTD_t; -#define TID_LIMIT(table) (sizeof(table) / sizeof(SSTD_t)) - -// initiator is transaction start side -void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); -// target is interrupt accept side -void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); - -// initiator result -#define TRANSACTION_END 0 -#define TRANSACTION_NO_RESPONSE 0x1 -#define TRANSACTION_DATA_ERROR 0x2 -#define TRANSACTION_TYPE_ERROR 0x4 -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void); -#else -int soft_serial_transaction(int sstd_index); -#endif - -// target status -// *SSTD_t.status has -// initiator: -// TRANSACTION_END -// or TRANSACTION_NO_RESPONSE -// or TRANSACTION_DATA_ERROR -// target: -// TRANSACTION_DATA_ERROR -// or TRANSACTION_ACCEPTED -#define TRANSACTION_ACCEPTED 0x8 -#ifdef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_get_and_clean_status(int sstd_index); -#endif diff --git a/drivers/chibios/serial_usart.c b/drivers/chibios/serial_usart.c deleted file mode 100644 index cae29388c..000000000 --- a/drivers/chibios/serial_usart.c +++ /dev/null @@ -1,208 +0,0 @@ -/* Copyright 2021 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "serial_usart.h" - -#ifndef USE_GPIOV1 -// The default PAL alternate modes are used to signal that the pins are used for USART -# ifndef SERIAL_USART_TX_PAL_MODE -# define SERIAL_USART_TX_PAL_MODE 7 -# endif -#endif - -#ifndef SERIAL_USART_DRIVER -# define SERIAL_USART_DRIVER SD1 -#endif - -#ifdef SOFT_SERIAL_PIN -# define SERIAL_USART_TX_PIN SOFT_SERIAL_PIN -#endif - -static inline msg_t sdWriteHalfDuplex(SerialDriver* driver, uint8_t* data, uint8_t size) { - msg_t ret = sdWrite(driver, data, size); - - // Half duplex requires us to read back the data we just wrote - just throw it away - uint8_t dump[size]; - sdRead(driver, dump, size); - - return ret; -} -#undef sdWrite -#define sdWrite sdWriteHalfDuplex - -static inline msg_t sdWriteTimeoutHalfDuplex(SerialDriver* driver, uint8_t* data, uint8_t size, uint32_t timeout) { - msg_t ret = sdWriteTimeout(driver, data, size, timeout); - - // Half duplex requires us to read back the data we just wrote - just throw it away - uint8_t dump[size]; - sdReadTimeout(driver, dump, size, timeout); - - return ret; -} -#undef sdWriteTimeout -#define sdWriteTimeout sdWriteTimeoutHalfDuplex - -static inline void sdClear(SerialDriver* driver) { - while (sdGetTimeout(driver, TIME_IMMEDIATE) != MSG_TIMEOUT) { - // Do nothing with the data - } -} - -static SerialConfig sdcfg = { - (SERIAL_USART_SPEED), // speed - mandatory - (SERIAL_USART_CR1), // CR1 - (SERIAL_USART_CR2), // CR2 - (SERIAL_USART_CR3) // CR3 -}; - -void handle_soft_serial_slave(void); - -/* - * This thread runs on the slave and responds to transactions initiated - * by the master - */ -static THD_WORKING_AREA(waSlaveThread, 2048); -static THD_FUNCTION(SlaveThread, arg) { - (void)arg; - chRegSetThreadName("slave_transport"); - - while (true) { - handle_soft_serial_slave(); - } -} - -__attribute__((weak)) void usart_init(void) { -#if defined(USE_GPIOV1) - palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_OPENDRAIN); -#else - palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); -#endif - -#if defined(USART_REMAP) - USART_REMAP; -#endif -} - -void usart_master_init(void) { - usart_init(); - - sdcfg.cr3 |= USART_CR3_HDSEL; - sdStart(&SERIAL_USART_DRIVER, &sdcfg); -} - -void usart_slave_init(void) { - usart_init(); - - sdcfg.cr3 |= USART_CR3_HDSEL; - sdStart(&SERIAL_USART_DRIVER, &sdcfg); - - // Start transport thread - chThdCreateStatic(waSlaveThread, sizeof(waSlaveThread), HIGHPRIO, SlaveThread, NULL); -} - -static SSTD_t* Transaction_table = NULL; -static uint8_t Transaction_table_size = 0; - -void soft_serial_initiator_init(SSTD_t* sstd_table, int sstd_table_size) { - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - - usart_master_init(); -} - -void soft_serial_target_init(SSTD_t* sstd_table, int sstd_table_size) { - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - - usart_slave_init(); -} - -void handle_soft_serial_slave(void) { - uint8_t sstd_index = sdGet(&SERIAL_USART_DRIVER); // first chunk is always transaction id - SSTD_t* trans = &Transaction_table[sstd_index]; - - // Always write back the sstd_index as part of a basic handshake - sstd_index ^= HANDSHAKE_MAGIC; - sdWrite(&SERIAL_USART_DRIVER, &sstd_index, sizeof(sstd_index)); - - if (trans->initiator2target_buffer_size) { - sdRead(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size); - } - - if (trans->target2initiator_buffer_size) { - sdWrite(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size); - } - - if (trans->status) { - *trans->status = TRANSACTION_ACCEPTED; - } -} - -///////// -// start transaction by initiator -// -// int soft_serial_transaction(int sstd_index) -// -// Returns: -// TRANSACTION_END -// TRANSACTION_NO_RESPONSE -// TRANSACTION_DATA_ERROR -#ifndef SERIAL_USE_MULTI_TRANSACTION -int soft_serial_transaction(void) { - uint8_t sstd_index = 0; -#else -int soft_serial_transaction(int index) { - uint8_t sstd_index = index; -#endif - - if (sstd_index > Transaction_table_size) return TRANSACTION_TYPE_ERROR; - SSTD_t* trans = &Transaction_table[sstd_index]; - msg_t res = 0; - - sdClear(&SERIAL_USART_DRIVER); - - // First chunk is always transaction id - sdWriteTimeout(&SERIAL_USART_DRIVER, &sstd_index, sizeof(sstd_index), TIME_MS2I(SERIAL_USART_TIMEOUT)); - - uint8_t sstd_index_shake = 0xFF; - - // Which we always read back first so that we can error out correctly - // - due to the half duplex limitations on return codes, we always have to read *something* - // - without the read, write only transactions *always* succeed, even during the boot process where the slave is not ready - res = sdReadTimeout(&SERIAL_USART_DRIVER, &sstd_index_shake, sizeof(sstd_index_shake), TIME_MS2I(SERIAL_USART_TIMEOUT)); - if (res < 0 || (sstd_index_shake != (sstd_index ^ HANDSHAKE_MAGIC))) { - dprintf("serial::usart_shake NO_RESPONSE\n"); - return TRANSACTION_NO_RESPONSE; - } - - if (trans->initiator2target_buffer_size) { - res = sdWriteTimeout(&SERIAL_USART_DRIVER, trans->initiator2target_buffer, trans->initiator2target_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT)); - if (res < 0) { - dprintf("serial::usart_transmit NO_RESPONSE\n"); - return TRANSACTION_NO_RESPONSE; - } - } - - if (trans->target2initiator_buffer_size) { - res = sdReadTimeout(&SERIAL_USART_DRIVER, trans->target2initiator_buffer, trans->target2initiator_buffer_size, TIME_MS2I(SERIAL_USART_TIMEOUT)); - if (res < 0) { - dprintf("serial::usart_receive NO_RESPONSE\n"); - return TRANSACTION_NO_RESPONSE; - } - } - - return TRANSACTION_END; -} diff --git a/drivers/chibios/serial_usart.h b/drivers/chibios/serial_usart.h deleted file mode 100644 index fee7b4d15..000000000 --- a/drivers/chibios/serial_usart.h +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright 2021 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include "quantum.h" -#include "serial.h" -#include "printf.h" - -#include -#include - -#ifndef USART_CR1_M0 -# define USART_CR1_M0 USART_CR1_M // some platforms (f1xx) dont have this so -#endif - -#ifndef SERIAL_USART_CR1 -# define SERIAL_USART_CR1 (USART_CR1_PCE | USART_CR1_PS | USART_CR1_M0) // parity enable, odd parity, 9 bit length -#endif - -#ifndef SERIAL_USART_CR2 -# define SERIAL_USART_CR2 (USART_CR2_STOP_1) // 2 stop bits -#endif - -#ifndef SERIAL_USART_CR3 -# define SERIAL_USART_CR3 0 -#endif - -#if defined(USART1_REMAP) -# define USART_REMAP \ - do { \ - (AFIO->MAPR |= AFIO_MAPR_USART1_REMAP); \ - } while (0) -#elif defined(USART2_REMAP) -# define USART_REMAP \ - do { \ - (AFIO->MAPR |= AFIO_MAPR_USART2_REMAP); \ - } while (0) -#elif defined(USART3_PARTIALREMAP) -# define USART_REMAP \ - do { \ - (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_PARTIALREMAP); \ - } while (0) -#elif defined(USART3_FULLREMAP) -# define USART_REMAP \ - do { \ - (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_FULLREMAP); \ - } while (0) -#endif - -#ifndef SELECT_SOFT_SERIAL_SPEED -# define SELECT_SOFT_SERIAL_SPEED 1 -#endif - -#ifdef SERIAL_USART_SPEED -// Allow advanced users to directly set SERIAL_USART_SPEED -#elif SELECT_SOFT_SERIAL_SPEED == 0 -# define SERIAL_USART_SPEED 460800 -#elif SELECT_SOFT_SERIAL_SPEED == 1 -# define SERIAL_USART_SPEED 230400 -#elif SELECT_SOFT_SERIAL_SPEED == 2 -# define SERIAL_USART_SPEED 115200 -#elif SELECT_SOFT_SERIAL_SPEED == 3 -# define SERIAL_USART_SPEED 57600 -#elif SELECT_SOFT_SERIAL_SPEED == 4 -# define SERIAL_USART_SPEED 38400 -#elif SELECT_SOFT_SERIAL_SPEED == 5 -# define SERIAL_USART_SPEED 19200 -#else -# error invalid SELECT_SOFT_SERIAL_SPEED value -#endif - -#ifndef SERIAL_USART_TIMEOUT -# define SERIAL_USART_TIMEOUT 100 -#endif - -#define HANDSHAKE_MAGIC 7 diff --git a/drivers/chibios/serial_usart_duplex.c b/drivers/chibios/serial_usart_duplex.c deleted file mode 100644 index cc9b889ac..000000000 --- a/drivers/chibios/serial_usart_duplex.c +++ /dev/null @@ -1,261 +0,0 @@ -/* Copyright 2021 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "serial_usart.h" - -#include - -#if !defined(USE_GPIOV1) -// The default PAL alternate modes are used to signal that the pins are used for USART -# if !defined(SERIAL_USART_TX_PAL_MODE) -# define SERIAL_USART_TX_PAL_MODE 7 -# endif -# if !defined(SERIAL_USART_RX_PAL_MODE) -# define SERIAL_USART_RX_PAL_MODE 7 -# endif -#endif - -#if !defined(SERIAL_USART_DRIVER) -# define SERIAL_USART_DRIVER UARTD1 -#endif - -#if !defined(SERIAL_USART_TX_PIN) -# define SERIAL_USART_TX_PIN A9 -#endif - -#if !defined(SERIAL_USART_RX_PIN) -# define SERIAL_USART_RX_PIN A10 -#endif - -#define SIGNAL_HANDSHAKE_RECEIVED 0x1 - -void handle_transactions_slave(uint8_t sstd_index); -static void receive_transaction_handshake(UARTDriver* uartp, uint16_t received_handshake); - -/* - * UART driver configuration structure. We use the blocking DMA enabled API and - * the rxchar callback to receive handshake tokens but only on the slave halve. - */ -// clang-format off -static UARTConfig uart_config = { - .txend1_cb = NULL, - .txend2_cb = NULL, - .rxend_cb = NULL, - .rxchar_cb = NULL, - .rxerr_cb = NULL, - .timeout_cb = NULL, - .speed = (SERIAL_USART_SPEED), - .cr1 = (SERIAL_USART_CR1), - .cr2 = (SERIAL_USART_CR2), - .cr3 = (SERIAL_USART_CR3) -}; -// clang-format on - -static SSTD_t* Transaction_table = NULL; -static uint8_t Transaction_table_size = 0; -static atomic_uint_least8_t handshake = 0xFF; -static thread_reference_t tp_target = NULL; - -/* - * This callback is invoked when a character is received but the application - * was not ready to receive it, the character is passed as parameter. - * Receive transaction table index from initiator, which doubles as basic handshake token. */ -static void receive_transaction_handshake(UARTDriver* uartp, uint16_t received_handshake) { - /* Check if received handshake is not a valid transaction id. - * Please note that we can still catch a seemingly valid handshake - * i.e. a byte from a ongoing transfer which is in the allowed range. - * So this check mainly prevents any obviously wrong handshakes and - * subsequent wakeups of the receiving thread, which is a costly operation. */ - if (received_handshake > Transaction_table_size) { - return; - } - - handshake = (uint8_t)received_handshake; - chSysLockFromISR(); - /* Wakeup receiving thread to start a transaction. */ - chEvtSignalI(tp_target, (eventmask_t)SIGNAL_HANDSHAKE_RECEIVED); - chSysUnlockFromISR(); -} - -__attribute__((weak)) void usart_init(void) { -#if defined(USE_GPIOV1) - palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL); - palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_INPUT); -#else - palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); - palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_RX_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); -#endif -} - -/* - * This thread runs on the slave half and reacts to transactions initiated from the master. - */ -static THD_WORKING_AREA(waSlaveThread, 1024); -static THD_FUNCTION(SlaveThread, arg) { - (void)arg; - chRegSetThreadName("slave_usart_tx_rx"); - - while (true) { - /* We sleep as long as there is no handshake waiting for us. */ - chEvtWaitAny((eventmask_t)SIGNAL_HANDSHAKE_RECEIVED); - handle_transactions_slave(handshake); - } -} - -void soft_serial_target_init(SSTD_t* const sstd_table, int sstd_table_size) { - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - usart_init(); - -#if defined(USART_REMAP) - USART_REMAP; -#endif - - tp_target = chThdCreateStatic(waSlaveThread, sizeof(waSlaveThread), HIGHPRIO, SlaveThread, NULL); - - // Start receiving handshake tokens on slave halve - uart_config.rxchar_cb = receive_transaction_handshake; - uartStart(&SERIAL_USART_DRIVER, &uart_config); -} - -/** - * @brief React to transactions started by the master. - * This version uses duplex send and receive usart pheriphals and DMA backed transfers. - */ -void inline handle_transactions_slave(uint8_t sstd_index) { - size_t buffer_size = 0; - msg_t msg = 0; - SSTD_t* trans = &Transaction_table[sstd_index]; - - /* Send back the handshake which is XORed as a simple checksum, - to signal that the slave is ready to receive possible transaction buffers */ - sstd_index ^= HANDSHAKE_MAGIC; - buffer_size = (size_t)sizeof(sstd_index); - msg = uartSendTimeout(&SERIAL_USART_DRIVER, &buffer_size, &sstd_index, TIME_MS2I(SERIAL_USART_TIMEOUT)); - - if (msg != MSG_OK) { - if (trans->status) { - *trans->status = TRANSACTION_NO_RESPONSE; - } - return; - } - - /* Receive transaction buffer from the master. If this transaction requires it.*/ - buffer_size = (size_t)trans->initiator2target_buffer_size; - if (buffer_size) { - msg = uartReceiveTimeout(&SERIAL_USART_DRIVER, &buffer_size, trans->initiator2target_buffer, TIME_MS2I(SERIAL_USART_TIMEOUT)); - if (msg != MSG_OK) { - if (trans->status) { - *trans->status = TRANSACTION_NO_RESPONSE; - } - return; - } - } - - /* Send transaction buffer to the master. If this transaction requires it. */ - buffer_size = (size_t)trans->target2initiator_buffer_size; - if (buffer_size) { - msg = uartSendFullTimeout(&SERIAL_USART_DRIVER, &buffer_size, trans->target2initiator_buffer, TIME_MS2I(SERIAL_USART_TIMEOUT)); - if (msg != MSG_OK) { - if (trans->status) { - *trans->status = TRANSACTION_NO_RESPONSE; - } - return; - } - } - - if (trans->status) { - *trans->status = TRANSACTION_ACCEPTED; - } -} - -void soft_serial_initiator_init(SSTD_t* const sstd_table, int sstd_table_size) { - Transaction_table = sstd_table; - Transaction_table_size = (uint8_t)sstd_table_size; - usart_init(); - -#if defined(SERIAL_USART_PIN_SWAP) - uart_config.cr2 |= USART_CR2_SWAP; // master has swapped TX/RX pins -#endif - -#if defined(USART_REMAP) - USART_REMAP; -#endif - - uartStart(&SERIAL_USART_DRIVER, &uart_config); -} - -/** - * @brief Start transaction from the master to the slave. - * This version uses duplex send and receive usart pheriphals and DMA backed transfers. - * - * @param index Transaction Table index of the transaction to start. - * @return int TRANSACTION_NO_RESPONSE in case of Timeout. - * TRANSACTION_TYPE_ERROR in case of invalid transaction index. - * TRANSACTION_END in case of success. - */ -#if !defined(SERIAL_USE_MULTI_TRANSACTION) -int soft_serial_transaction(void) { - uint8_t sstd_index = 0; -#else -int soft_serial_transaction(int index) { - uint8_t sstd_index = index; -#endif - - if (sstd_index > Transaction_table_size) { - return TRANSACTION_TYPE_ERROR; - } - - SSTD_t* const trans = &Transaction_table[sstd_index]; - msg_t msg = 0; - size_t buffer_size = (size_t)sizeof(sstd_index); - - /* Send transaction table index to the slave, which doubles as basic handshake token. */ - uartSendFullTimeout(&SERIAL_USART_DRIVER, &buffer_size, &sstd_index, TIME_MS2I(SERIAL_USART_TIMEOUT)); - - uint8_t sstd_index_shake = 0xFF; - buffer_size = (size_t)sizeof(sstd_index_shake); - - /* Receive the handshake token from the slave. The token was XORed by the slave as a simple checksum. - If the tokens match, the master will start to send and receive possible transaction buffers. */ - msg = uartReceiveTimeout(&SERIAL_USART_DRIVER, &buffer_size, &sstd_index_shake, TIME_MS2I(SERIAL_USART_TIMEOUT)); - if (msg != MSG_OK || (sstd_index_shake != (sstd_index ^ HANDSHAKE_MAGIC))) { - dprintln("USART: Handshake Failed"); - return TRANSACTION_NO_RESPONSE; - } - - /* Send transaction buffer to the slave. If this transaction requires it. */ - buffer_size = (size_t)trans->initiator2target_buffer_size; - if (buffer_size) { - msg = uartSendFullTimeout(&SERIAL_USART_DRIVER, &buffer_size, trans->initiator2target_buffer, TIME_MS2I(SERIAL_USART_TIMEOUT)); - if (msg != MSG_OK) { - dprintln("USART: Send Failed"); - return TRANSACTION_NO_RESPONSE; - } - } - - /* Receive transaction buffer from the slave. If this transaction requires it. */ - buffer_size = (size_t)trans->target2initiator_buffer_size; - if (buffer_size) { - msg = uartReceiveTimeout(&SERIAL_USART_DRIVER, &buffer_size, trans->target2initiator_buffer, TIME_MS2I(SERIAL_USART_TIMEOUT)); - if (msg != MSG_OK) { - dprintln("USART: Receive Failed"); - return TRANSACTION_NO_RESPONSE; - } - } - - return TRANSACTION_END; -} diff --git a/drivers/chibios/spi_master.c b/drivers/chibios/spi_master.c deleted file mode 100644 index 4852a6eba..000000000 --- a/drivers/chibios/spi_master.c +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright 2020 Nick Brassel (tzarc) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "spi_master.h" - -#include "timer.h" - -static pin_t currentSlavePin = NO_PIN; -static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0}; - -__attribute__((weak)) void spi_init(void) { - static bool is_initialised = false; - if (!is_initialised) { - is_initialised = true; - - // 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); -#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); -#endif - } -} - -bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) { - if (currentSlavePin != NO_PIN || slavePin == NO_PIN) { - return false; - } - - uint16_t roundedDivisor = 2; - while (roundedDivisor < divisor) { - roundedDivisor <<= 1; - } - - if (roundedDivisor < 2 || roundedDivisor > 256) { - return false; - } - - spiConfig.cr1 = 0; - - if (lsbFirst) { - spiConfig.cr1 |= SPI_CR1_LSBFIRST; - } - - switch (mode) { - case 0: - break; - case 1: - spiConfig.cr1 |= SPI_CR1_CPHA; - break; - case 2: - spiConfig.cr1 |= SPI_CR1_CPOL; - break; - case 3: - spiConfig.cr1 |= SPI_CR1_CPHA | SPI_CR1_CPOL; - break; - } - - switch (roundedDivisor) { - case 2: - break; - case 4: - spiConfig.cr1 |= SPI_CR1_BR_0; - break; - case 8: - spiConfig.cr1 |= SPI_CR1_BR_1; - break; - case 16: - spiConfig.cr1 |= SPI_CR1_BR_1 | SPI_CR1_BR_0; - break; - case 32: - spiConfig.cr1 |= SPI_CR1_BR_2; - break; - case 64: - spiConfig.cr1 |= SPI_CR1_BR_2 | SPI_CR1_BR_0; - break; - case 128: - spiConfig.cr1 |= SPI_CR1_BR_2 | SPI_CR1_BR_1; - break; - case 256: - spiConfig.cr1 |= SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0; - break; - } - - currentSlavePin = slavePin; - spiConfig.ssport = PAL_PORT(slavePin); - spiConfig.sspad = PAL_PAD(slavePin); - - setPinOutput(slavePin); - spiStart(&SPI_DRIVER, &spiConfig); - spiSelect(&SPI_DRIVER); - - return true; -} - -spi_status_t spi_write(uint8_t data) { - uint8_t rxData; - spiExchange(&SPI_DRIVER, 1, &data, &rxData); - - return rxData; -} - -spi_status_t spi_read(void) { - uint8_t data = 0; - spiReceive(&SPI_DRIVER, 1, &data); - - return data; -} - -spi_status_t spi_transmit(const uint8_t *data, uint16_t length) { - spiSend(&SPI_DRIVER, length, data); - return SPI_STATUS_SUCCESS; -} - -spi_status_t spi_receive(uint8_t *data, uint16_t length) { - spiReceive(&SPI_DRIVER, length, data); - return SPI_STATUS_SUCCESS; -} - -void spi_stop(void) { - if (currentSlavePin != NO_PIN) { - spiUnselect(&SPI_DRIVER); - spiStop(&SPI_DRIVER); - currentSlavePin = NO_PIN; - } -} diff --git a/drivers/chibios/spi_master.h b/drivers/chibios/spi_master.h deleted file mode 100644 index e93580e31..000000000 --- a/drivers/chibios/spi_master.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright 2020 Nick Brassel (tzarc) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include -#include -#include - -#include "gpio.h" - -#ifndef SPI_DRIVER -# define SPI_DRIVER SPID2 -#endif - -#ifndef SPI_SCK_PIN -# define SPI_SCK_PIN B13 -#endif - -#ifndef SPI_SCK_PAL_MODE -# define SPI_SCK_PAL_MODE 5 -#endif - -#ifndef SPI_MOSI_PIN -# define SPI_MOSI_PIN B15 -#endif - -#ifndef SPI_MOSI_PAL_MODE -# define SPI_MOSI_PAL_MODE 5 -#endif - -#ifndef SPI_MISO_PIN -# define SPI_MISO_PIN B14 -#endif - -#ifndef SPI_MISO_PAL_MODE -# define SPI_MISO_PAL_MODE 5 -#endif - -typedef int16_t spi_status_t; - -#define SPI_STATUS_SUCCESS (0) -#define SPI_STATUS_ERROR (-1) -#define SPI_STATUS_TIMEOUT (-2) - -#define SPI_TIMEOUT_IMMEDIATE (0) -#define SPI_TIMEOUT_INFINITE (0xFFFF) - -#ifdef __cplusplus -extern "C" { -#endif -void spi_init(void); - -bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor); - -spi_status_t spi_write(uint8_t data); - -spi_status_t spi_read(void); - -spi_status_t spi_transmit(const uint8_t *data, uint16_t length); - -spi_status_t spi_receive(uint8_t *data, uint16_t length); - -void spi_stop(void); -#ifdef __cplusplus -} -#endif diff --git a/drivers/eeprom/eeprom_i2c.c b/drivers/eeprom/eeprom_i2c.c index 4210f06f9..8e80ff544 100644 --- a/drivers/eeprom/eeprom_i2c.c +++ b/drivers/eeprom/eeprom_i2c.c @@ -16,6 +16,9 @@ #include #include +#if defined(EXTERNAL_EEPROM_WP_PIN) +# include "gpio.h" +#endif /* Note that the implementations of eeprom_XXXX_YYYY on AVR are normally @@ -50,7 +53,14 @@ static inline void fill_target_address(uint8_t *buffer, const void *addr) { } } -void eeprom_driver_init(void) { i2c_init(); } +void eeprom_driver_init(void) { + i2c_init(); +#if defined(EXTERNAL_EEPROM_WP_PIN) + /* We are setting the WP pin to high in a way that requires at least two bit-flips to change back to 0 */ + writePin(EXTERNAL_EEPROM_WP_PIN, 1); + setPinInputHigh(EXTERNAL_EEPROM_WP_PIN); +#endif +} void eeprom_driver_erase(void) { #if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) @@ -89,6 +99,11 @@ 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; +#if defined(EXTERNAL_EEPROM_WP_PIN) + setPinOutput(EXTERNAL_EEPROM_WP_PIN); + writePin(EXTERNAL_EEPROM_WP_PIN, 0); +#endif + while (len > 0) { uintptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE; int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset; @@ -116,4 +131,10 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) { target_addr += write_length; len -= write_length; } + +#if defined(EXTERNAL_EEPROM_WP_PIN) + /* We are setting the WP pin to high in a way that requires at least two bit-flips to change back to 0 */ + writePin(EXTERNAL_EEPROM_WP_PIN, 1); + setPinInputHigh(EXTERNAL_EEPROM_WP_PIN); +#endif } diff --git a/drivers/eeprom/eeprom_spi.c b/drivers/eeprom/eeprom_spi.c index 182731d82..e27309085 100644 --- a/drivers/eeprom/eeprom_spi.c +++ b/drivers/eeprom/eeprom_spi.c @@ -31,6 +31,8 @@ */ #include "wait.h" +#include "debug.h" +#include "timer.h" #include "spi_master.h" #include "eeprom.h" #include "eeprom_spi.h" @@ -50,11 +52,6 @@ # define EXTERNAL_EEPROM_SPI_TIMEOUT 100 #endif -#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT) -# include "timer.h" -# include "debug.h" -#endif // CONSOLE_ENABLE - 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) { diff --git a/drivers/haptic/haptic.c b/drivers/haptic/haptic.c deleted file mode 100644 index de3f40052..000000000 --- a/drivers/haptic/haptic.c +++ /dev/null @@ -1,355 +0,0 @@ -/* Copyright 2019 ishtob - * Driver for haptic feedback written for QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "haptic.h" -#include "eeconfig.h" -#include "progmem.h" -#include "debug.h" -#ifdef DRV2605L -# include "DRV2605L.h" -#endif -#ifdef SOLENOID_ENABLE -# include "solenoid.h" -#endif - -haptic_config_t haptic_config; - -void haptic_init(void) { - debug_enable = 1; // Debug is ON! - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - haptic_config.raw = eeconfig_read_haptic(); -#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 - solenoid_setup(); - dprintf("Solenoid driver initialized\n"); -#endif -#ifdef DRV2605L - DRV_init(); - dprintf("DRV2605 driver initialized\n"); -#endif - eeconfig_debug_haptic(); -} - -void haptic_task(void) { -#ifdef SOLENOID_ENABLE - solenoid_check(); -#endif -} - -void eeconfig_debug_haptic(void) { - dprintf("haptic_config eprom\n"); - dprintf("haptic_config.enable = %d\n", haptic_config.enable); - dprintf("haptic_config.mode = %d\n", haptic_config.mode); -} - -void haptic_enable(void) { - haptic_config.enable = 1; - xprintf("haptic_config.enable = %u\n", haptic_config.enable); - eeconfig_update_haptic(haptic_config.raw); -} - -void haptic_disable(void) { - haptic_config.enable = 0; - xprintf("haptic_config.enable = %u\n", haptic_config.enable); - eeconfig_update_haptic(haptic_config.raw); -} - -void haptic_toggle(void) { - if (haptic_config.enable) { - haptic_disable(); - } else { - haptic_enable(); - } - eeconfig_update_haptic(haptic_config.raw); -} - -void haptic_feedback_toggle(void) { - haptic_config.feedback++; - if (haptic_config.feedback >= HAPTIC_FEEDBACK_MAX) haptic_config.feedback = KEY_PRESS; - xprintf("haptic_config.feedback = %u\n", !haptic_config.feedback); - eeconfig_update_haptic(haptic_config.raw); -} - -void haptic_buzz_toggle(void) { - bool buzz_stat = !haptic_config.buzz; - haptic_config.buzz = buzz_stat; - haptic_set_buzz(buzz_stat); -} - -void haptic_mode_increase(void) { - uint8_t mode = haptic_config.mode + 1; -#ifdef DRV2605L - if (haptic_config.mode >= drv_effect_max) { - mode = 1; - } -#endif - haptic_set_mode(mode); -} - -void haptic_mode_decrease(void) { - uint8_t mode = haptic_config.mode - 1; -#ifdef DRV2605L - if (haptic_config.mode < 1) { - mode = (drv_effect_max - 1); - } -#endif - haptic_set_mode(mode); -} - -void haptic_dwell_increase(void) { -#ifdef SOLENOID_ENABLE - int16_t next_dwell = ((int16_t)haptic_config.dwell) + SOLENOID_DWELL_STEP_SIZE; - if (haptic_config.dwell >= SOLENOID_MAX_DWELL) { - // 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(next_dwell); -#else - int16_t next_dwell = ((int16_t)haptic_config.dwell) + 1; -#endif - haptic_set_dwell(next_dwell); -} - -void haptic_dwell_decrease(void) { -#ifdef SOLENOID_ENABLE - 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(next_dwell); -#else - int16_t next_dwell = ((int16_t)haptic_config.dwell) - 1; -#endif - haptic_set_dwell(next_dwell); -} - -void haptic_reset(void) { - haptic_config.enable = true; - uint8_t feedback = HAPTIC_FEEDBACK_DEFAULT; - haptic_config.feedback = feedback; -#ifdef DRV2605L - uint8_t mode = HAPTIC_MODE_DEFAULT; - haptic_config.mode = mode; -#endif -#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); - xprintf("haptic_config.mode = %u\n", haptic_config.mode); -} - -void haptic_set_feedback(uint8_t feedback) { - haptic_config.feedback = feedback; - eeconfig_update_haptic(haptic_config.raw); - xprintf("haptic_config.feedback = %u\n", haptic_config.feedback); -} - -void haptic_set_mode(uint8_t mode) { - haptic_config.mode = mode; - eeconfig_update_haptic(haptic_config.raw); - xprintf("haptic_config.mode = %u\n", haptic_config.mode); -} - -void haptic_set_amplitude(uint8_t amp) { - haptic_config.amplitude = amp; - eeconfig_update_haptic(haptic_config.raw); - xprintf("haptic_config.amplitude = %u\n", haptic_config.amplitude); -#ifdef DRV2605L - DRV_amplitude(amp); -#endif -} - -void haptic_set_buzz(uint8_t buzz) { - haptic_config.buzz = buzz; - eeconfig_update_haptic(haptic_config.raw); - xprintf("haptic_config.buzz = %u\n", haptic_config.buzz); -} - -void haptic_set_dwell(uint8_t dwell) { - haptic_config.dwell = dwell; - eeconfig_update_haptic(haptic_config.raw); - xprintf("haptic_config.dwell = %u\n", haptic_config.dwell); -} - -uint8_t haptic_get_mode(void) { - if (!haptic_config.enable) { - return false; - } - return haptic_config.mode; -} - -uint8_t haptic_get_feedback(void) { - if (!haptic_config.enable) { - return false; - } - return haptic_config.feedback; -} - -uint8_t haptic_get_dwell(void) { - if (!haptic_config.enable) { - return false; - } - return haptic_config.dwell; -} - -void haptic_enable_continuous(void) { - haptic_config.cont = 1; - xprintf("haptic_config.cont = %u\n", haptic_config.cont); - eeconfig_update_haptic(haptic_config.raw); -#ifdef DRV2605L - DRV_rtp_init(); -#endif -} - -void haptic_disable_continuous(void) { - haptic_config.cont = 0; - xprintf("haptic_config.cont = %u\n", haptic_config.cont); - eeconfig_update_haptic(haptic_config.raw); -#ifdef DRV2605L - DRV_write(DRV_MODE, 0x00); -#endif -} - -void haptic_toggle_continuous(void) { -#ifdef DRV2605L - if (haptic_config.cont) { - haptic_disable_continuous(); - } else { - haptic_enable_continuous(); - } - eeconfig_update_haptic(haptic_config.raw); -#endif -} - -void haptic_cont_increase(void) { - uint8_t amp = haptic_config.amplitude + 10; - if (haptic_config.amplitude >= 120) { - amp = 120; - } - haptic_set_amplitude(amp); -} - -void haptic_cont_decrease(void) { - uint8_t amp = haptic_config.amplitude - 10; - if (haptic_config.amplitude < 20) { - amp = 20; - } - haptic_set_amplitude(amp); -} - -void haptic_play(void) { -#ifdef DRV2605L - uint8_t play_eff = 0; - play_eff = haptic_config.mode; - DRV_pulse(play_eff); -#endif -#ifdef SOLENOID_ENABLE - solenoid_fire(); -#endif -} - -bool process_haptic(uint16_t keycode, keyrecord_t *record) { - if (keycode == HPT_ON && record->event.pressed) { - haptic_enable(); - } - if (keycode == HPT_OFF && record->event.pressed) { - haptic_disable(); - } - if (keycode == HPT_TOG && record->event.pressed) { - haptic_toggle(); - } - if (keycode == HPT_RST && record->event.pressed) { - haptic_reset(); - } - if (keycode == HPT_FBK && record->event.pressed) { - haptic_feedback_toggle(); - } - if (keycode == HPT_BUZ && record->event.pressed) { - haptic_buzz_toggle(); - } - if (keycode == HPT_MODI && record->event.pressed) { - haptic_mode_increase(); - } - if (keycode == HPT_MODD && record->event.pressed) { - haptic_mode_decrease(); - } - if (keycode == HPT_DWLI && record->event.pressed) { - haptic_dwell_increase(); - } - if (keycode == HPT_DWLD && record->event.pressed) { - haptic_dwell_decrease(); - } - if (keycode == HPT_CONT && record->event.pressed) { - haptic_toggle_continuous(); - } - if (keycode == HPT_CONI && record->event.pressed) { - haptic_cont_increase(); - } - if (keycode == HPT_COND && record->event.pressed) { - haptic_cont_decrease(); - } - - if (haptic_config.enable) { - if (record->event.pressed) { - // keypress - if (haptic_config.feedback < 2) { - haptic_play(); - } - } else { - // keyrelease - if (haptic_config.feedback > 0) { - haptic_play(); - } - } - } - return true; -} - -void haptic_shutdown(void) { -#ifdef SOLENOID_ENABLE - solenoid_shutdown(); -#endif -} diff --git a/drivers/haptic/haptic.h b/drivers/haptic/haptic.h deleted file mode 100644 index ba8e0d20b..000000000 --- a/drivers/haptic/haptic.h +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright 2019 ishtob - * Driver for haptic feedback written for QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 -#include -#include "quantum.h" -#ifdef DRV2605L -# include "DRV2605L.h" -#endif - -#ifndef HAPTIC_FEEDBACK_DEFAULT -# define HAPTIC_FEEDBACK_DEFAULT 0 -#endif -#ifndef HAPTIC_MODE_DEFAULT -# define HAPTIC_MODE_DEFAULT DRV_MODE_DEFAULT -#endif - -/* EEPROM config settings */ -typedef union { - uint32_t raw; - struct { - bool enable : 1; - uint8_t feedback : 2; - uint8_t mode : 7; - bool buzz : 1; - uint8_t dwell : 7; - bool cont : 1; - uint8_t amplitude : 8; - uint8_t reserved : 5; - }; -} haptic_config_t; - -typedef enum HAPTIC_FEEDBACK { - KEY_PRESS, - KEY_PRESS_RELEASE, - KEY_RELEASE, - HAPTIC_FEEDBACK_MAX, -} HAPTIC_FEEDBACK; - -bool process_haptic(uint16_t keycode, keyrecord_t *record); -void haptic_init(void); -void haptic_task(void); -void eeconfig_debug_haptic(void); -void haptic_enable(void); -void haptic_disable(void); -void haptic_toggle(void); -void haptic_feedback_toggle(void); -void haptic_mode_increase(void); -void haptic_mode_decrease(void); -void haptic_mode(uint8_t mode); -void haptic_reset(void); -void haptic_set_feedback(uint8_t feedback); -void haptic_set_mode(uint8_t mode); -void haptic_set_dwell(uint8_t dwell); -void haptic_set_buzz(uint8_t buzz); -void haptic_buzz_toggle(void); -uint8_t haptic_get_mode(void); -uint8_t haptic_get_feedback(void); -void haptic_dwell_increase(void); -void haptic_dwell_decrease(void); -void haptic_toggle_continuous(void); -void haptic_cont_increase(void); -void haptic_cont_decrease(void); - -void haptic_play(void); -void haptic_shutdown(void); diff --git a/drivers/haptic/solenoid.c b/drivers/haptic/solenoid.c index 3e61d5a17..25cf34465 100644 --- a/drivers/haptic/solenoid.c +++ b/drivers/haptic/solenoid.c @@ -18,6 +18,7 @@ #include "timer.h" #include "solenoid.h" #include "haptic.h" +#include "gpio.h" bool solenoid_on = false; bool solenoid_buzzing = false; diff --git a/drivers/issi/is31fl3731-simple.h b/drivers/issi/is31fl3731-simple.h deleted file mode 100644 index 9665d6ed3..000000000 --- a/drivers/issi/is31fl3731-simple.h +++ /dev/null @@ -1,207 +0,0 @@ -/* Copyright 2017 Jason Williams - * Copyright 2018 Jack Humbert - * Copyright 2019 Clueboard - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 -#include - -typedef struct is31_led { - uint8_t driver : 2; - uint8_t v; -} __attribute__((packed)) is31_led; - -extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; - -void IS31FL3731_init(uint8_t addr); -void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data); -void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); - -void IS31FL3731_set_value(int index, uint8_t value); -void IS31FL3731_set_value_all(uint8_t value); - -void IS31FL3731_set_led_control_register(uint8_t index, bool value); - -// This should not be called from an interrupt -// (eg. from a timer interrupt). -// Call this while idle (in between matrix scans). -// If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index); -void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); - -#define C1_1 0x24 -#define C1_2 0x25 -#define C1_3 0x26 -#define C1_4 0x27 -#define C1_5 0x28 -#define C1_6 0x29 -#define C1_7 0x2A -#define C1_8 0x2B - -#define C1_9 0x2C -#define C1_10 0x2D -#define C1_11 0x2E -#define C1_12 0x2F -#define C1_13 0x30 -#define C1_14 0x31 -#define C1_15 0x32 -#define C1_16 0x33 - -#define C2_1 0x34 -#define C2_2 0x35 -#define C2_3 0x36 -#define C2_4 0x37 -#define C2_5 0x38 -#define C2_6 0x39 -#define C2_7 0x3A -#define C2_8 0x3B - -#define C2_9 0x3C -#define C2_10 0x3D -#define C2_11 0x3E -#define C2_12 0x3F -#define C2_13 0x40 -#define C2_14 0x41 -#define C2_15 0x42 -#define C2_16 0x43 - -#define C3_1 0x44 -#define C3_2 0x45 -#define C3_3 0x46 -#define C3_4 0x47 -#define C3_5 0x48 -#define C3_6 0x49 -#define C3_7 0x4A -#define C3_8 0x4B - -#define C3_9 0x4C -#define C3_10 0x4D -#define C3_11 0x4E -#define C3_12 0x4F -#define C3_13 0x50 -#define C3_14 0x51 -#define C3_15 0x52 -#define C3_16 0x53 - -#define C4_1 0x54 -#define C4_2 0x55 -#define C4_3 0x56 -#define C4_4 0x57 -#define C4_5 0x58 -#define C4_6 0x59 -#define C4_7 0x5A -#define C4_8 0x5B - -#define C4_9 0x5C -#define C4_10 0x5D -#define C4_11 0x5E -#define C4_12 0x5F -#define C4_13 0x60 -#define C4_14 0x61 -#define C4_15 0x62 -#define C4_16 0x63 - -#define C5_1 0x64 -#define C5_2 0x65 -#define C5_3 0x66 -#define C5_4 0x67 -#define C5_5 0x68 -#define C5_6 0x69 -#define C5_7 0x6A -#define C5_8 0x6B - -#define C5_9 0x6C -#define C5_10 0x6D -#define C5_11 0x6E -#define C5_12 0x6F -#define C5_13 0x70 -#define C5_14 0x71 -#define C5_15 0x72 -#define C5_16 0x73 - -#define C6_1 0x74 -#define C6_2 0x75 -#define C6_3 0x76 -#define C6_4 0x77 -#define C6_5 0x78 -#define C6_6 0x79 -#define C6_7 0x7A -#define C6_8 0x7B - -#define C6_9 0x7C -#define C6_10 0x7D -#define C6_11 0x7E -#define C6_12 0x7F -#define C6_13 0x80 -#define C6_14 0x81 -#define C6_15 0x82 -#define C6_16 0x83 - -#define C7_1 0x84 -#define C7_2 0x85 -#define C7_3 0x86 -#define C7_4 0x87 -#define C7_5 0x88 -#define C7_6 0x89 -#define C7_7 0x8A -#define C7_8 0x8B - -#define C7_9 0x8C -#define C7_10 0x8D -#define C7_11 0x8E -#define C7_12 0x8F -#define C7_13 0x90 -#define C7_14 0x91 -#define C7_15 0x92 -#define C7_16 0x93 - -#define C8_1 0x94 -#define C8_2 0x95 -#define C8_3 0x96 -#define C8_4 0x97 -#define C8_5 0x98 -#define C8_6 0x99 -#define C8_7 0x9A -#define C8_8 0x9B - -#define C8_9 0x9C -#define C8_10 0x9D -#define C8_11 0x9E -#define C8_12 0x9F -#define C8_13 0xA0 -#define C8_14 0xA1 -#define C8_15 0xA2 -#define C8_16 0xA3 - -#define C9_1 0xA4 -#define C9_2 0xA5 -#define C9_3 0xA6 -#define C9_4 0xA7 -#define C9_5 0xA8 -#define C9_6 0xA9 -#define C9_7 0xAA -#define C9_8 0xAB - -#define C9_9 0xAC -#define C9_10 0xAD -#define C9_11 0xAE -#define C9_12 0xAF -#define C9_13 0xB0 -#define C9_14 0xB1 -#define C9_15 0xB2 -#define C9_16 0xB3 diff --git a/drivers/issi/is31fl3731.h b/drivers/issi/is31fl3731.h deleted file mode 100644 index 19e8e6251..000000000 --- a/drivers/issi/is31fl3731.h +++ /dev/null @@ -1,208 +0,0 @@ -/* Copyright 2017 Jason Williams - * Copyright 2018 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include -#include - -typedef struct is31_led { - uint8_t driver : 2; - uint8_t r; - uint8_t g; - uint8_t b; -} __attribute__((packed)) is31_led; - -extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; - -void IS31FL3731_init(uint8_t addr); -void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data); -void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); - -void IS31FL3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); -void IS31FL3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue); - -void IS31FL3731_set_led_control_register(uint8_t index, bool red, bool green, bool blue); - -// This should not be called from an interrupt -// (eg. from a timer interrupt). -// Call this while idle (in between matrix scans). -// If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index); -void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); - -#define C1_1 0x24 -#define C1_2 0x25 -#define C1_3 0x26 -#define C1_4 0x27 -#define C1_5 0x28 -#define C1_6 0x29 -#define C1_7 0x2A -#define C1_8 0x2B - -#define C1_9 0x2C -#define C1_10 0x2D -#define C1_11 0x2E -#define C1_12 0x2F -#define C1_13 0x30 -#define C1_14 0x31 -#define C1_15 0x32 -#define C1_16 0x33 - -#define C2_1 0x34 -#define C2_2 0x35 -#define C2_3 0x36 -#define C2_4 0x37 -#define C2_5 0x38 -#define C2_6 0x39 -#define C2_7 0x3A -#define C2_8 0x3B - -#define C2_9 0x3C -#define C2_10 0x3D -#define C2_11 0x3E -#define C2_12 0x3F -#define C2_13 0x40 -#define C2_14 0x41 -#define C2_15 0x42 -#define C2_16 0x43 - -#define C3_1 0x44 -#define C3_2 0x45 -#define C3_3 0x46 -#define C3_4 0x47 -#define C3_5 0x48 -#define C3_6 0x49 -#define C3_7 0x4A -#define C3_8 0x4B - -#define C3_9 0x4C -#define C3_10 0x4D -#define C3_11 0x4E -#define C3_12 0x4F -#define C3_13 0x50 -#define C3_14 0x51 -#define C3_15 0x52 -#define C3_16 0x53 - -#define C4_1 0x54 -#define C4_2 0x55 -#define C4_3 0x56 -#define C4_4 0x57 -#define C4_5 0x58 -#define C4_6 0x59 -#define C4_7 0x5A -#define C4_8 0x5B - -#define C4_9 0x5C -#define C4_10 0x5D -#define C4_11 0x5E -#define C4_12 0x5F -#define C4_13 0x60 -#define C4_14 0x61 -#define C4_15 0x62 -#define C4_16 0x63 - -#define C5_1 0x64 -#define C5_2 0x65 -#define C5_3 0x66 -#define C5_4 0x67 -#define C5_5 0x68 -#define C5_6 0x69 -#define C5_7 0x6A -#define C5_8 0x6B - -#define C5_9 0x6C -#define C5_10 0x6D -#define C5_11 0x6E -#define C5_12 0x6F -#define C5_13 0x70 -#define C5_14 0x71 -#define C5_15 0x72 -#define C5_16 0x73 - -#define C6_1 0x74 -#define C6_2 0x75 -#define C6_3 0x76 -#define C6_4 0x77 -#define C6_5 0x78 -#define C6_6 0x79 -#define C6_7 0x7A -#define C6_8 0x7B - -#define C6_9 0x7C -#define C6_10 0x7D -#define C6_11 0x7E -#define C6_12 0x7F -#define C6_13 0x80 -#define C6_14 0x81 -#define C6_15 0x82 -#define C6_16 0x83 - -#define C7_1 0x84 -#define C7_2 0x85 -#define C7_3 0x86 -#define C7_4 0x87 -#define C7_5 0x88 -#define C7_6 0x89 -#define C7_7 0x8A -#define C7_8 0x8B - -#define C7_9 0x8C -#define C7_10 0x8D -#define C7_11 0x8E -#define C7_12 0x8F -#define C7_13 0x90 -#define C7_14 0x91 -#define C7_15 0x92 -#define C7_16 0x93 - -#define C8_1 0x94 -#define C8_2 0x95 -#define C8_3 0x96 -#define C8_4 0x97 -#define C8_5 0x98 -#define C8_6 0x99 -#define C8_7 0x9A -#define C8_8 0x9B - -#define C8_9 0x9C -#define C8_10 0x9D -#define C8_11 0x9E -#define C8_12 0x9F -#define C8_13 0xA0 -#define C8_14 0xA1 -#define C8_15 0xA2 -#define C8_16 0xA3 - -#define C9_1 0xA4 -#define C9_2 0xA5 -#define C9_3 0xA6 -#define C9_4 0xA7 -#define C9_5 0xA8 -#define C9_6 0xA9 -#define C9_7 0xAA -#define C9_8 0xAB - -#define C9_9 0xAC -#define C9_10 0xAD -#define C9_11 0xAE -#define C9_12 0xAF -#define C9_13 0xB0 -#define C9_14 0xB1 -#define C9_15 0xB2 -#define C9_16 0xB3 diff --git a/drivers/issi/is31fl3733.h b/drivers/issi/is31fl3733.h deleted file mode 100644 index 603d505a1..000000000 --- a/drivers/issi/is31fl3733.h +++ /dev/null @@ -1,251 +0,0 @@ -/* Copyright 2017 Jason Williams - * Copyright 2018 Jack Humbert - * Copyright 2018 Yiancar - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include -#include - -typedef struct is31_led { - uint8_t driver : 2; - uint8_t r; - uint8_t g; - uint8_t b; -} __attribute__((packed)) is31_led; - -extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; - -void IS31FL3733_init(uint8_t addr, uint8_t sync); -bool IS31FL3733_write_register(uint8_t addr, uint8_t reg, uint8_t data); -bool IS31FL3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); - -void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); -void IS31FL3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue); - -void IS31FL3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue); - -// This should not be called from an interrupt -// (eg. from a timer interrupt). -// Call this while idle (in between matrix scans). -// If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3733_update_pwm_buffers(uint8_t addr, uint8_t index); -void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index); - -#define A_1 0x00 -#define A_2 0x01 -#define A_3 0x02 -#define A_4 0x03 -#define A_5 0x04 -#define A_6 0x05 -#define A_7 0x06 -#define A_8 0x07 -#define A_9 0x08 -#define A_10 0x09 -#define A_11 0x0A -#define A_12 0x0B -#define A_13 0x0C -#define A_14 0x0D -#define A_15 0x0E -#define A_16 0x0F - -#define B_1 0x10 -#define B_2 0x11 -#define B_3 0x12 -#define B_4 0x13 -#define B_5 0x14 -#define B_6 0x15 -#define B_7 0x16 -#define B_8 0x17 -#define B_9 0x18 -#define B_10 0x19 -#define B_11 0x1A -#define B_12 0x1B -#define B_13 0x1C -#define B_14 0x1D -#define B_15 0x1E -#define B_16 0x1F - -#define C_1 0x20 -#define C_2 0x21 -#define C_3 0x22 -#define C_4 0x23 -#define C_5 0x24 -#define C_6 0x25 -#define C_7 0x26 -#define C_8 0x27 -#define C_9 0x28 -#define C_10 0x29 -#define C_11 0x2A -#define C_12 0x2B -#define C_13 0x2C -#define C_14 0x2D -#define C_15 0x2E -#define C_16 0x2F - -#define D_1 0x30 -#define D_2 0x31 -#define D_3 0x32 -#define D_4 0x33 -#define D_5 0x34 -#define D_6 0x35 -#define D_7 0x36 -#define D_8 0x37 -#define D_9 0x38 -#define D_10 0x39 -#define D_11 0x3A -#define D_12 0x3B -#define D_13 0x3C -#define D_14 0x3D -#define D_15 0x3E -#define D_16 0x3F - -#define E_1 0x40 -#define E_2 0x41 -#define E_3 0x42 -#define E_4 0x43 -#define E_5 0x44 -#define E_6 0x45 -#define E_7 0x46 -#define E_8 0x47 -#define E_9 0x48 -#define E_10 0x49 -#define E_11 0x4A -#define E_12 0x4B -#define E_13 0x4C -#define E_14 0x4D -#define E_15 0x4E -#define E_16 0x4F - -#define F_1 0x50 -#define F_2 0x51 -#define F_3 0x52 -#define F_4 0x53 -#define F_5 0x54 -#define F_6 0x55 -#define F_7 0x56 -#define F_8 0x57 -#define F_9 0x58 -#define F_10 0x59 -#define F_11 0x5A -#define F_12 0x5B -#define F_13 0x5C -#define F_14 0x5D -#define F_15 0x5E -#define F_16 0x5F - -#define G_1 0x60 -#define G_2 0x61 -#define G_3 0x62 -#define G_4 0x63 -#define G_5 0x64 -#define G_6 0x65 -#define G_7 0x66 -#define G_8 0x67 -#define G_9 0x68 -#define G_10 0x69 -#define G_11 0x6A -#define G_12 0x6B -#define G_13 0x6C -#define G_14 0x6D -#define G_15 0x6E -#define G_16 0x6F - -#define H_1 0x70 -#define H_2 0x71 -#define H_3 0x72 -#define H_4 0x73 -#define H_5 0x74 -#define H_6 0x75 -#define H_7 0x76 -#define H_8 0x77 -#define H_9 0x78 -#define H_10 0x79 -#define H_11 0x7A -#define H_12 0x7B -#define H_13 0x7C -#define H_14 0x7D -#define H_15 0x7E -#define H_16 0x7F - -#define I_1 0x80 -#define I_2 0x81 -#define I_3 0x82 -#define I_4 0x83 -#define I_5 0x84 -#define I_6 0x85 -#define I_7 0x86 -#define I_8 0x87 -#define I_9 0x88 -#define I_10 0x89 -#define I_11 0x8A -#define I_12 0x8B -#define I_13 0x8C -#define I_14 0x8D -#define I_15 0x8E -#define I_16 0x8F - -#define J_1 0x90 -#define J_2 0x91 -#define J_3 0x92 -#define J_4 0x93 -#define J_5 0x94 -#define J_6 0x95 -#define J_7 0x96 -#define J_8 0x97 -#define J_9 0x98 -#define J_10 0x99 -#define J_11 0x9A -#define J_12 0x9B -#define J_13 0x9C -#define J_14 0x9D -#define J_15 0x9E -#define J_16 0x9F - -#define K_1 0xA0 -#define K_2 0xA1 -#define K_3 0xA2 -#define K_4 0xA3 -#define K_5 0xA4 -#define K_6 0xA5 -#define K_7 0xA6 -#define K_8 0xA7 -#define K_9 0xA8 -#define K_10 0xA9 -#define K_11 0xAA -#define K_12 0xAB -#define K_13 0xAC -#define K_14 0xAD -#define K_15 0xAE -#define K_16 0xAF - -#define L_1 0xB0 -#define L_2 0xB1 -#define L_3 0xB2 -#define L_4 0xB3 -#define L_5 0xB4 -#define L_6 0xB5 -#define L_7 0xB6 -#define L_8 0xB7 -#define L_9 0xB8 -#define L_10 0xB9 -#define L_11 0xBA -#define L_12 0xBB -#define L_13 0xBC -#define L_14 0xBD -#define L_15 0xBE -#define L_16 0xBF diff --git a/drivers/issi/is31fl3736.h b/drivers/issi/is31fl3736.h deleted file mode 100644 index e48e31c27..000000000 --- a/drivers/issi/is31fl3736.h +++ /dev/null @@ -1,168 +0,0 @@ -/* Copyright 2018 Jason Williams (Wilba) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include -#include - -// Simple interface option. -// If these aren't defined, just define them to make it compile - -#ifndef DRIVER_COUNT -# define DRIVER_COUNT 2 -#endif - -#ifndef DRIVER_LED_TOTAL -# define DRIVER_LED_TOTAL 96 -#endif - -typedef struct is31_led { - uint8_t driver : 2; - uint8_t r; - uint8_t g; - uint8_t b; -} __attribute__((packed)) is31_led; - -extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; - -void IS31FL3736_init(uint8_t addr); -void IS31FL3736_write_register(uint8_t addr, uint8_t reg, uint8_t data); -void IS31FL3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); - -void IS31FL3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); -void IS31FL3736_set_color_all(uint8_t red, uint8_t green, uint8_t blue); - -void IS31FL3736_set_led_control_register(uint8_t index, bool red, bool green, bool blue); - -void IS31FL3736_mono_set_brightness(int index, uint8_t value); -void IS31FL3736_mono_set_brightness_all(uint8_t value); -void IS31FL3736_mono_set_led_control_register(uint8_t index, bool enabled); - -// This should not be called from an interrupt -// (eg. from a timer interrupt). -// Call this while idle (in between matrix scans). -// If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3736_update_pwm_buffers(uint8_t addr1, uint8_t addr2); -void IS31FL3736_update_led_control_registers(uint8_t addr1, uint8_t addr2); - -#define A_1 0x00 -#define A_2 0x02 -#define A_3 0x04 -#define A_4 0x06 -#define A_5 0x08 -#define A_6 0x0A -#define A_7 0x0C -#define A_8 0x0E - -#define B_1 0x10 -#define B_2 0x12 -#define B_3 0x14 -#define B_4 0x16 -#define B_5 0x18 -#define B_6 0x1A -#define B_7 0x1C -#define B_8 0x1E - -#define C_1 0x20 -#define C_2 0x22 -#define C_3 0x24 -#define C_4 0x26 -#define C_5 0x28 -#define C_6 0x2A -#define C_7 0x2C -#define C_8 0x2E - -#define D_1 0x30 -#define D_2 0x32 -#define D_3 0x34 -#define D_4 0x36 -#define D_5 0x38 -#define D_6 0x3A -#define D_7 0x3C -#define D_8 0x3E - -#define E_1 0x40 -#define E_2 0x42 -#define E_3 0x44 -#define E_4 0x46 -#define E_5 0x48 -#define E_6 0x4A -#define E_7 0x4C -#define E_8 0x4E - -#define F_1 0x50 -#define F_2 0x52 -#define F_3 0x54 -#define F_4 0x56 -#define F_5 0x58 -#define F_6 0x5A -#define F_7 0x5C -#define F_8 0x5E - -#define G_1 0x60 -#define G_2 0x62 -#define G_3 0x64 -#define G_4 0x66 -#define G_5 0x68 -#define G_6 0x6A -#define G_7 0x6C -#define G_8 0x6E - -#define H_1 0x70 -#define H_2 0x72 -#define H_3 0x74 -#define H_4 0x76 -#define H_5 0x78 -#define H_6 0x7A -#define H_7 0x7C -#define H_8 0x7E - -#define I_1 0x80 -#define I_2 0x82 -#define I_3 0x84 -#define I_4 0x86 -#define I_5 0x88 -#define I_6 0x8A -#define I_7 0x8C -#define I_8 0x8E - -#define J_1 0x90 -#define J_2 0x92 -#define J_3 0x94 -#define J_4 0x96 -#define J_5 0x98 -#define J_6 0x9A -#define J_7 0x9C -#define J_8 0x9E - -#define K_1 0xA0 -#define K_2 0xA2 -#define K_3 0xA4 -#define K_4 0xA6 -#define K_5 0xA8 -#define K_6 0xAA -#define K_7 0xAC -#define K_8 0xAE - -#define L_1 0xB0 -#define L_2 0xB2 -#define L_3 0xB4 -#define L_4 0xB6 -#define L_5 0xB8 -#define L_6 0xBA -#define L_7 0xBC -#define L_8 0xBE diff --git a/drivers/issi/is31fl3737.c b/drivers/issi/is31fl3737.c deleted file mode 100644 index 8647c93cc..000000000 --- a/drivers/issi/is31fl3737.c +++ /dev/null @@ -1,223 +0,0 @@ -/* Copyright 2017 Jason Williams - * Copyright 2018 Jack Humbert - * Copyright 2018 Yiancar - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "is31fl3737.h" -#include "i2c_master.h" -#include "wait.h" - -// This is a 7-bit address, that gets left-shifted and bit 0 -// set to 0 for write, 1 for read (as per I2C protocol) -// The address will vary depending on your wiring: -// 00 <-> GND -// 01 <-> SCL -// 10 <-> SDA -// 11 <-> VCC -// ADDR1 represents A1:A0 of the 7-bit address. -// ADDR2 represents A3:A2 of the 7-bit address. -// The result is: 0b101(ADDR2)(ADDR1) -#define ISSI_ADDR_DEFAULT 0x50 - -#define ISSI_COMMANDREGISTER 0xFD -#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE -#define ISSI_INTERRUPTMASKREGISTER 0xF0 -#define ISSI_INTERRUPTSTATUSREGISTER 0xF1 - -#define ISSI_PAGE_LEDCONTROL 0x00 // PG0 -#define ISSI_PAGE_PWM 0x01 // PG1 -#define ISSI_PAGE_AUTOBREATH 0x02 // PG2 -#define ISSI_PAGE_FUNCTION 0x03 // PG3 - -#define ISSI_REG_CONFIGURATION 0x00 // PG3 -#define ISSI_REG_GLOBALCURRENT 0x01 // PG3 -#define ISSI_REG_RESET 0x11 // PG3 -#define ISSI_REG_SWPULLUP 0x0F // PG3 -#define ISSI_REG_CSPULLUP 0x10 // PG3 - -#ifndef ISSI_TIMEOUT -# define ISSI_TIMEOUT 100 -#endif - -#ifndef ISSI_PERSISTENCE -# define ISSI_PERSISTENCE 0 -#endif - -// Transfer buffer for TWITransmitData() -uint8_t g_twi_transfer_buffer[20]; - -// These buffers match the IS31FL3737 PWM registers. -// The control buffers match the PG0 LED On/Off registers. -// Storing them like this is optimal for I2C transfers to the registers. -// We could optimize this and take out the unused registers from these -// buffers and the transfers in IS31FL3737_write_pwm_buffer() but it's -// probably not worth the extra complexity. -uint8_t g_pwm_buffer[DRIVER_COUNT][192]; -bool g_pwm_buffer_update_required = false; - -uint8_t g_led_control_registers[DRIVER_COUNT][24] = {{0}}; -bool g_led_control_registers_update_required = false; - -void IS31FL3737_write_register(uint8_t addr, uint8_t reg, uint8_t data) { - g_twi_transfer_buffer[0] = reg; - g_twi_transfer_buffer[1] = data; - -#if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break; - } -#else - i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); -#endif -} - -void IS31FL3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { - // assumes PG1 is already selected - - // transmit PWM registers in 12 transfers of 16 bytes - // g_twi_transfer_buffer[] is 20 bytes - - // iterate over the pwm_buffer contents at 16 byte intervals - for (int i = 0; i < 192; i += 16) { - g_twi_transfer_buffer[0] = i; - // copy the data from i to i+15 - // device will auto-increment register for data after the first byte - // thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer - for (int j = 0; j < 16; j++) { - g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; - } - -#if ISSI_PERSISTENCE > 0 - for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break; - } -#else - i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); -#endif - } -} - -void IS31FL3737_init(uint8_t addr) { - // In order to avoid the LEDs being driven with garbage data - // in the LED driver's PWM registers, shutdown is enabled last. - // Set up the mode and other settings, clear the PWM registers, - // then disable software shutdown. - - // Unlock the command register. - IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); - - // Select PG0 - IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); - // Turn off all LEDs. - for (int i = 0x00; i <= 0x17; i++) { - IS31FL3737_write_register(addr, i, 0x00); - } - - // Unlock the command register. - IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); - - // Select PG1 - IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); - // Set PWM on all LEDs to 0 - // No need to setup Breath registers to PWM as that is the default. - for (int i = 0x00; i <= 0xBF; i++) { - IS31FL3737_write_register(addr, i, 0x00); - } - - // Unlock the command register. - IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); - - // Select PG3 - IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION); - // Set global current to maximum. - IS31FL3737_write_register(addr, ISSI_REG_GLOBALCURRENT, 0xFF); - // Disable software shutdown. - IS31FL3737_write_register(addr, ISSI_REG_CONFIGURATION, 0x01); - - // Wait 10ms to ensure the device has woken up. - wait_ms(10); -} - -void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { - if (index >= 0 && index < DRIVER_LED_TOTAL) { - is31_led led = g_is31_leds[index]; - - g_pwm_buffer[led.driver][led.r] = red; - g_pwm_buffer[led.driver][led.g] = green; - g_pwm_buffer[led.driver][led.b] = blue; - g_pwm_buffer_update_required = true; - } -} - -void IS31FL3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { - for (int i = 0; i < DRIVER_LED_TOTAL; i++) { - IS31FL3737_set_color(i, red, green, blue); - } -} - -void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { - is31_led led = g_is31_leds[index]; - - uint8_t control_register_r = led.r / 8; - uint8_t control_register_g = led.g / 8; - uint8_t control_register_b = led.b / 8; - uint8_t bit_r = led.r % 8; - uint8_t bit_g = led.g % 8; - uint8_t bit_b = led.b % 8; - - if (red) { - g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); - } else { - g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); - } - if (green) { - g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); - } else { - g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); - } - if (blue) { - g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); - } else { - g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); - } - - g_led_control_registers_update_required = true; -} - -void IS31FL3737_update_pwm_buffers(uint8_t addr1, uint8_t addr2) { - if (g_pwm_buffer_update_required) { - // Firstly we need to unlock the command register and select PG1 - IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); - IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); - - IS31FL3737_write_pwm_buffer(addr1, g_pwm_buffer[0]); - // IS31FL3737_write_pwm_buffer(addr2, g_pwm_buffer[1]); - } - g_pwm_buffer_update_required = false; -} - -void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2) { - if (g_led_control_registers_update_required) { - // Firstly we need to unlock the command register and select PG0 - IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); - IS31FL3737_write_register(addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); - for (int i = 0; i < 24; i++) { - IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i]); - // IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i]); - } - g_led_control_registers_update_required = false; - } -} diff --git a/drivers/issi/is31fl3737.h b/drivers/issi/is31fl3737.h deleted file mode 100644 index a1d228177..000000000 --- a/drivers/issi/is31fl3737.h +++ /dev/null @@ -1,203 +0,0 @@ -/* Copyright 2017 Jason Williams - * Copyright 2018 Jack Humbert - * Copyright 2018 Yiancar - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include -#include - -typedef struct is31_led { - uint8_t driver : 2; - uint8_t r; - uint8_t g; - uint8_t b; -} __attribute__((packed)) is31_led; - -extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; - -void IS31FL3737_init(uint8_t addr); -void IS31FL3737_write_register(uint8_t addr, uint8_t reg, uint8_t data); -void IS31FL3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); - -void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); -void IS31FL3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue); - -void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue); - -// This should not be called from an interrupt -// (eg. from a timer interrupt). -// Call this while idle (in between matrix scans). -// If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3737_update_pwm_buffers(uint8_t addr1, uint8_t addr2); -void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2); - -#define A_1 0x00 -#define A_2 0x01 -#define A_3 0x02 -#define A_4 0x03 -#define A_5 0x04 -#define A_6 0x05 -#define A_7 0x08 -#define A_8 0x09 -#define A_9 0x0A -#define A_10 0x0B -#define A_11 0x0C -#define A_12 0x0D - -#define B_1 0x10 -#define B_2 0x11 -#define B_3 0x12 -#define B_4 0x13 -#define B_5 0x14 -#define B_6 0x15 -#define B_7 0x18 -#define B_8 0x19 -#define B_9 0x1A -#define B_10 0x1B -#define B_11 0x1C -#define B_12 0x1D - -#define C_1 0x20 -#define C_2 0x21 -#define C_3 0x22 -#define C_4 0x23 -#define C_5 0x24 -#define C_6 0x25 -#define C_7 0x28 -#define C_8 0x29 -#define C_9 0x2A -#define C_10 0x2B -#define C_11 0x2C -#define C_12 0x2D - -#define D_1 0x30 -#define D_2 0x31 -#define D_3 0x32 -#define D_4 0x33 -#define D_5 0x34 -#define D_6 0x35 -#define D_7 0x38 -#define D_8 0x39 -#define D_9 0x3A -#define D_10 0x3B -#define D_11 0x3C -#define D_12 0x3D - -#define E_1 0x40 -#define E_2 0x41 -#define E_3 0x42 -#define E_4 0x43 -#define E_5 0x44 -#define E_6 0x45 -#define E_7 0x48 -#define E_8 0x49 -#define E_9 0x4A -#define E_10 0x4B -#define E_11 0x4C -#define E_12 0x4D - -#define F_1 0x50 -#define F_2 0x51 -#define F_3 0x52 -#define F_4 0x53 -#define F_5 0x54 -#define F_6 0x55 -#define F_7 0x58 -#define F_8 0x59 -#define F_9 0x5A -#define F_10 0x5B -#define F_11 0x5C -#define F_12 0x5D - -#define G_1 0x60 -#define G_2 0x61 -#define G_3 0x62 -#define G_4 0x63 -#define G_5 0x64 -#define G_6 0x65 -#define G_7 0x68 -#define G_8 0x69 -#define G_9 0x6A -#define G_10 0x6B -#define G_11 0x6C -#define G_12 0x6D - -#define H_1 0x70 -#define H_2 0x71 -#define H_3 0x72 -#define H_4 0x73 -#define H_5 0x74 -#define H_6 0x75 -#define H_7 0x78 -#define H_8 0x79 -#define H_9 0x7A -#define H_10 0x7B -#define H_11 0x7C -#define H_12 0x7D - -#define I_1 0x80 -#define I_2 0x81 -#define I_3 0x82 -#define I_4 0x83 -#define I_5 0x84 -#define I_6 0x85 -#define I_7 0x88 -#define I_8 0x89 -#define I_9 0x8A -#define I_10 0x8B -#define I_11 0x8C -#define I_12 0x8D - -#define J_1 0x90 -#define J_2 0x91 -#define J_3 0x92 -#define J_4 0x93 -#define J_5 0x94 -#define J_6 0x95 -#define J_7 0x98 -#define J_8 0x99 -#define J_9 0x9A -#define J_10 0x9B -#define J_11 0x9C -#define J_12 0x9D - -#define K_1 0xA0 -#define K_2 0xA1 -#define K_3 0xA2 -#define K_4 0xA3 -#define K_5 0xA4 -#define K_6 0xA5 -#define K_7 0xA8 -#define K_8 0xA9 -#define K_9 0xAA -#define K_10 0xAB -#define K_11 0xAC -#define K_12 0xAD - -#define L_1 0xB0 -#define L_2 0xB1 -#define L_3 0xB2 -#define L_4 0xB3 -#define L_5 0xB4 -#define L_6 0xB5 -#define L_7 0xB8 -#define L_8 0xB9 -#define L_9 0xBA -#define L_10 0xBB -#define L_11 0xBC -#define L_12 0xBD diff --git a/drivers/issi/is31fl3741.h b/drivers/issi/is31fl3741.h deleted file mode 100644 index 2df0c5b1a..000000000 --- a/drivers/issi/is31fl3741.h +++ /dev/null @@ -1,420 +0,0 @@ -/* Copyright 2017 Jason Williams - * Copyright 2018 Jack Humbert - * Copyright 2018 Yiancar - * Copyright 2020 MelGeek - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 -#include - -typedef struct is31_led { - uint32_t driver : 2; - uint32_t r : 10; - uint32_t g : 10; - uint32_t b : 10; -} __attribute__((packed)) is31_led; - -extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; - -void IS31FL3741_init(uint8_t addr); -void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data); -bool IS31FL3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); - -void IS31FL3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); -void IS31FL3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue); - -void IS31FL3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue); - -// This should not be called from an interrupt -// (eg. from a timer interrupt). -// Call this while idle (in between matrix scans). -// If the buffer is dirty, it will update the driver with the buffer. -void IS31FL3741_update_pwm_buffers(uint8_t addr1, uint8_t addr2); -void IS31FL3741_update_led_control_registers(uint8_t addr1, uint8_t addr2); -void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); - -void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); - -#define CS1_SW1 0x00 -#define CS2_SW1 0x01 -#define CS3_SW1 0x02 -#define CS4_SW1 0x03 -#define CS5_SW1 0x04 -#define CS6_SW1 0x05 -#define CS7_SW1 0x06 -#define CS8_SW1 0x07 -#define CS9_SW1 0x08 -#define CS10_SW1 0x09 -#define CS11_SW1 0x0A -#define CS12_SW1 0x0B -#define CS13_SW1 0x0C -#define CS14_SW1 0x0D -#define CS15_SW1 0x0E -#define CS16_SW1 0x0F -#define CS17_SW1 0x10 -#define CS18_SW1 0x11 -#define CS19_SW1 0x12 -#define CS20_SW1 0x13 -#define CS21_SW1 0x14 -#define CS22_SW1 0x15 -#define CS23_SW1 0x16 -#define CS24_SW1 0x17 -#define CS25_SW1 0x18 -#define CS26_SW1 0x19 -#define CS27_SW1 0x1A -#define CS28_SW1 0x1B -#define CS29_SW1 0x1C -#define CS30_SW1 0x1D - -#define CS1_SW2 0x1E -#define CS2_SW2 0x1F -#define CS3_SW2 0x20 -#define CS4_SW2 0x21 -#define CS5_SW2 0x22 -#define CS6_SW2 0x23 -#define CS7_SW2 0x24 -#define CS8_SW2 0x25 -#define CS9_SW2 0x26 -#define CS10_SW2 0x27 -#define CS11_SW2 0x28 -#define CS12_SW2 0x29 -#define CS13_SW2 0x2A -#define CS14_SW2 0x2B -#define CS15_SW2 0x2C -#define CS16_SW2 0x2D -#define CS17_SW2 0x2E -#define CS18_SW2 0x2F -#define CS19_SW2 0x30 -#define CS20_SW2 0x31 -#define CS21_SW2 0x32 -#define CS22_SW2 0x33 -#define CS23_SW2 0x34 -#define CS24_SW2 0x35 -#define CS25_SW2 0x36 -#define CS26_SW2 0x37 -#define CS27_SW2 0x38 -#define CS28_SW2 0x39 -#define CS29_SW2 0x3A -#define CS30_SW2 0x3B - -#define CS1_SW3 0x3C -#define CS2_SW3 0x3D -#define CS3_SW3 0x3E -#define CS4_SW3 0x3F -#define CS5_SW3 0x40 -#define CS6_SW3 0x41 -#define CS7_SW3 0x42 -#define CS8_SW3 0x43 -#define CS9_SW3 0x44 -#define CS10_SW3 0x45 -#define CS11_SW3 0x46 -#define CS12_SW3 0x47 -#define CS13_SW3 0x48 -#define CS14_SW3 0x49 -#define CS15_SW3 0x4A -#define CS16_SW3 0x4B -#define CS17_SW3 0x4C -#define CS18_SW3 0x4D -#define CS19_SW3 0x4E -#define CS20_SW3 0x4F -#define CS21_SW3 0x50 -#define CS22_SW3 0x51 -#define CS23_SW3 0x52 -#define CS24_SW3 0x53 -#define CS25_SW3 0x54 -#define CS26_SW3 0x55 -#define CS27_SW3 0x56 -#define CS28_SW3 0x57 -#define CS29_SW3 0x58 -#define CS30_SW3 0x59 - -#define CS1_SW4 0x5A -#define CS2_SW4 0x5B -#define CS3_SW4 0x5C -#define CS4_SW4 0x5D -#define CS5_SW4 0x5E -#define CS6_SW4 0x5F -#define CS7_SW4 0x60 -#define CS8_SW4 0x61 -#define CS9_SW4 0x62 -#define CS10_SW4 0x63 -#define CS11_SW4 0x64 -#define CS12_SW4 0x65 -#define CS13_SW4 0x66 -#define CS14_SW4 0x67 -#define CS15_SW4 0x68 -#define CS16_SW4 0x69 -#define CS17_SW4 0x6A -#define CS18_SW4 0x6B -#define CS19_SW4 0x6C -#define CS20_SW4 0x6D -#define CS21_SW4 0x6E -#define CS22_SW4 0x6F -#define CS23_SW4 0x70 -#define CS24_SW4 0x71 -#define CS25_SW4 0x72 -#define CS26_SW4 0x73 -#define CS27_SW4 0x74 -#define CS28_SW4 0x75 -#define CS29_SW4 0x76 -#define CS30_SW4 0x77 - -#define CS1_SW5 0x78 -#define CS2_SW5 0x79 -#define CS3_SW5 0x7A -#define CS4_SW5 0x7B -#define CS5_SW5 0x7C -#define CS6_SW5 0x7D -#define CS7_SW5 0x7E -#define CS8_SW5 0x7F -#define CS9_SW5 0x80 -#define CS10_SW5 0x81 -#define CS11_SW5 0x82 -#define CS12_SW5 0x83 -#define CS13_SW5 0x84 -#define CS14_SW5 0x85 -#define CS15_SW5 0x86 -#define CS16_SW5 0x87 -#define CS17_SW5 0x88 -#define CS18_SW5 0x89 -#define CS19_SW5 0x8A -#define CS20_SW5 0x8B -#define CS21_SW5 0x8C -#define CS22_SW5 0x8D -#define CS23_SW5 0x8E -#define CS24_SW5 0x8F -#define CS25_SW5 0x90 -#define CS26_SW5 0x91 -#define CS27_SW5 0x92 -#define CS28_SW5 0x93 -#define CS29_SW5 0x94 -#define CS30_SW5 0x95 - -#define CS1_SW6 0x96 -#define CS2_SW6 0x97 -#define CS3_SW6 0x98 -#define CS4_SW6 0x99 -#define CS5_SW6 0x9A -#define CS6_SW6 0x9B -#define CS7_SW6 0x9C -#define CS8_SW6 0x9D -#define CS9_SW6 0x9E -#define CS10_SW6 0x9F -#define CS11_SW6 0xA0 -#define CS12_SW6 0xA1 -#define CS13_SW6 0xA2 -#define CS14_SW6 0xA3 -#define CS15_SW6 0xA4 -#define CS16_SW6 0xA5 -#define CS17_SW6 0xA6 -#define CS18_SW6 0xA7 -#define CS19_SW6 0xA8 -#define CS20_SW6 0xA9 -#define CS21_SW6 0xAA -#define CS22_SW6 0xAB -#define CS23_SW6 0xAC -#define CS24_SW6 0xAD -#define CS25_SW6 0xAE -#define CS26_SW6 0xAF -#define CS27_SW6 0xB0 -#define CS28_SW6 0xB1 -#define CS29_SW6 0xB2 -#define CS30_SW6 0xB3 - -#define CS1_SW7 0xB4 -#define CS2_SW7 0xB5 -#define CS3_SW7 0xB6 -#define CS4_SW7 0xB7 -#define CS5_SW7 0xB8 -#define CS6_SW7 0xB9 -#define CS7_SW7 0xBA -#define CS8_SW7 0xBB -#define CS9_SW7 0xBC -#define CS10_SW7 0xBD -#define CS11_SW7 0xBE -#define CS12_SW7 0xBF -#define CS13_SW7 0xC0 -#define CS14_SW7 0xC1 -#define CS15_SW7 0xC2 -#define CS16_SW7 0xC3 -#define CS17_SW7 0xC4 -#define CS18_SW7 0xC5 -#define CS19_SW7 0xC6 -#define CS20_SW7 0xC7 -#define CS21_SW7 0xC8 -#define CS22_SW7 0xC9 -#define CS23_SW7 0xCA -#define CS24_SW7 0xCB -#define CS25_SW7 0xCC -#define CS26_SW7 0xCD -#define CS27_SW7 0xCE -#define CS28_SW7 0xCF -#define CS29_SW7 0xD0 -#define CS30_SW7 0xD1 - -#define CS1_SW8 0xD2 -#define CS2_SW8 0xD3 -#define CS3_SW8 0xD4 -#define CS4_SW8 0xD5 -#define CS5_SW8 0xD6 -#define CS6_SW8 0xD7 -#define CS7_SW8 0xD8 -#define CS8_SW8 0xD9 -#define CS9_SW8 0xDA -#define CS10_SW8 0xDB -#define CS11_SW8 0xDC -#define CS12_SW8 0xDD -#define CS13_SW8 0xDE -#define CS14_SW8 0xDF -#define CS15_SW8 0xE0 -#define CS16_SW8 0xE1 -#define CS17_SW8 0xE2 -#define CS18_SW8 0xE3 -#define CS19_SW8 0xE4 -#define CS20_SW8 0xE5 -#define CS21_SW8 0xE6 -#define CS22_SW8 0xE7 -#define CS23_SW8 0xE8 -#define CS24_SW8 0xE9 -#define CS25_SW8 0xEA -#define CS26_SW8 0xEB -#define CS27_SW8 0xEC -#define CS28_SW8 0xED -#define CS29_SW8 0xEE -#define CS30_SW8 0xEF - -#define CS1_SW9 0xF0 -#define CS2_SW9 0xF1 -#define CS3_SW9 0xF2 -#define CS4_SW9 0xF3 -#define CS5_SW9 0xF4 -#define CS6_SW9 0xF5 -#define CS7_SW9 0xF6 -#define CS8_SW9 0xF7 -#define CS9_SW9 0xF8 -#define CS10_SW9 0xF9 -#define CS11_SW9 0xFA -#define CS12_SW9 0xFB -#define CS13_SW9 0xFC -#define CS14_SW9 0xFD -#define CS15_SW9 0xFE -#define CS16_SW9 0xFF -#define CS17_SW9 0x100 -#define CS18_SW9 0x101 -#define CS19_SW9 0x102 -#define CS20_SW9 0x103 -#define CS21_SW9 0x104 -#define CS22_SW9 0x105 -#define CS23_SW9 0x106 -#define CS24_SW9 0x107 -#define CS25_SW9 0x108 -#define CS26_SW9 0x109 -#define CS27_SW9 0x10A -#define CS28_SW9 0x10B -#define CS29_SW9 0x10C -#define CS30_SW9 0x10D - -#define CS31_SW1 0x10E -#define CS32_SW1 0x10F -#define CS33_SW1 0x110 -#define CS34_SW1 0x111 -#define CS35_SW1 0x112 -#define CS36_SW1 0x113 -#define CS37_SW1 0x114 -#define CS38_SW1 0x115 -#define CS39_SW1 0x116 - -#define CS31_SW2 0x117 -#define CS32_SW2 0x118 -#define CS33_SW2 0x119 -#define CS34_SW2 0x11A -#define CS35_SW2 0x11B -#define CS36_SW2 0x11C -#define CS37_SW2 0x11D -#define CS38_SW2 0x11E -#define CS39_SW2 0x11F - -#define CS31_SW3 0x120 -#define CS32_SW3 0x121 -#define CS33_SW3 0x122 -#define CS34_SW3 0x123 -#define CS35_SW3 0x124 -#define CS36_SW3 0x125 -#define CS37_SW3 0x126 -#define CS38_SW3 0x127 -#define CS39_SW3 0x128 - -#define CS31_SW4 0x129 -#define CS32_SW4 0x12A -#define CS33_SW4 0x12B -#define CS34_SW4 0x12C -#define CS35_SW4 0x12D -#define CS36_SW4 0x12E -#define CS37_SW4 0x12F -#define CS38_SW4 0x130 -#define CS39_SW4 0x131 - -#define CS31_SW5 0x132 -#define CS32_SW5 0x133 -#define CS33_SW5 0x134 -#define CS34_SW5 0x135 -#define CS35_SW5 0x136 -#define CS36_SW5 0x137 -#define CS37_SW5 0x138 -#define CS38_SW5 0x139 -#define CS39_SW5 0x13A - -#define CS31_SW6 0x13B -#define CS32_SW6 0x13C -#define CS33_SW6 0x13D -#define CS34_SW6 0x13E -#define CS35_SW6 0x13F -#define CS36_SW6 0x140 -#define CS37_SW6 0x141 -#define CS38_SW6 0x142 -#define CS39_SW6 0x143 - -#define CS31_SW7 0x144 -#define CS32_SW7 0x145 -#define CS33_SW7 0x146 -#define CS34_SW7 0x147 -#define CS35_SW7 0x148 -#define CS36_SW7 0x149 -#define CS37_SW7 0x14A -#define CS38_SW7 0x14B -#define CS39_SW7 0x14C - -#define CS31_SW8 0x14D -#define CS32_SW8 0x14E -#define CS33_SW8 0x14F -#define CS34_SW8 0x150 -#define CS35_SW8 0x151 -#define CS36_SW8 0x152 -#define CS37_SW8 0x153 -#define CS38_SW8 0x154 -#define CS39_SW8 0x155 - -#define CS31_SW9 0x156 -#define CS32_SW9 0x157 -#define CS33_SW9 0x158 -#define CS34_SW9 0x159 -#define CS35_SW9 0x15A -#define CS36_SW9 0x15B -#define CS37_SW9 0x15C -#define CS38_SW9 0x15D -#define CS39_SW9 0x15E diff --git a/drivers/lcd/st7565.c b/drivers/lcd/st7565.c new file mode 100644 index 000000000..49b13c00f --- /dev/null +++ b/drivers/lcd/st7565.c @@ -0,0 +1,496 @@ +/* +Copyright 2021 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "st7565.h" + +#include + +#include "keyboard.h" +#include "progmem.h" +#include "timer.h" +#include "wait.h" + +#include ST7565_FONT_H + +// Fundamental Commands +#define CONTRAST 0x81 +#define DISPLAY_ALL_ON 0xA5 +#define DISPLAY_ALL_ON_RESUME 0xA4 +#define NORMAL_DISPLAY 0xA6 +#define INVERT_DISPLAY 0xA7 +#define DISPLAY_ON 0xAF +#define DISPLAY_OFF 0xAE +#define NOP 0xE3 + +// Addressing Setting Commands +#define PAM_SETCOLUMN_LSB 0x00 +#define PAM_SETCOLUMN_MSB 0x10 +#define PAM_PAGE_ADDR 0xB0 // 0xb0 -- 0xb7 + +// Hardware Configuration Commands +#define DISPLAY_START_LINE 0x40 +#define SEGMENT_REMAP 0xA0 +#define SEGMENT_REMAP_INV 0xA1 +#define COM_SCAN_INC 0xC0 +#define COM_SCAN_DEC 0xC8 +#define LCD_BIAS_7 0xA3 +#define LCD_BIAS_9 0xA2 +#define RESISTOR_RATIO 0x20 +#define POWER_CONTROL 0x28 + +// Misc defines +#ifndef ST7565_BLOCK_COUNT +# define ST7565_BLOCK_COUNT (sizeof(ST7565_BLOCK_TYPE) * 8) +#endif +#ifndef ST7565_BLOCK_SIZE +# define ST7565_BLOCK_SIZE (ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT) +#endif + +#define ST7565_ALL_BLOCKS_MASK (((((ST7565_BLOCK_TYPE)1 << (ST7565_BLOCK_COUNT - 1)) - 1) << 1) | 1) + +#define HAS_FLAGS(bits, flags) ((bits & flags) == flags) + +// Display buffer's is the same as the display memory layout +// this is so we don't end up with rounding errors with +// parts of the display unusable or don't get cleared correctly +// and also allows for drawing & inverting +uint8_t st7565_buffer[ST7565_MATRIX_SIZE]; +uint8_t * st7565_cursor; +ST7565_BLOCK_TYPE st7565_dirty = 0; +bool st7565_initialized = false; +bool st7565_active = false; +bool st7565_inverted = false; +display_rotation_t st7565_rotation = DISPLAY_ROTATION_0; +#if ST7565_TIMEOUT > 0 +uint32_t st7565_timeout; +#endif +#if ST7565_UPDATE_INTERVAL > 0 +uint16_t st7565_update_timeout; +#endif + +// Flips the rendering bits for a character at the current cursor position +static void InvertCharacter(uint8_t *cursor) { + const uint8_t *end = cursor + ST7565_FONT_WIDTH; + while (cursor < end) { + *cursor = ~(*cursor); + cursor++; + } +} + +bool st7565_init(display_rotation_t rotation) { + setPinOutput(ST7565_A0_PIN); + writePinHigh(ST7565_A0_PIN); + setPinOutput(ST7565_RST_PIN); + writePinHigh(ST7565_RST_PIN); + + st7565_rotation = st7565_init_user(rotation); + + spi_init(); + spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR); + + st7565_reset(); + + st7565_send_cmd(LCD_BIAS_7); + if (!HAS_FLAGS(st7565_rotation, DISPLAY_ROTATION_180)) { + st7565_send_cmd(SEGMENT_REMAP); + st7565_send_cmd(COM_SCAN_DEC); + } else { + st7565_send_cmd(SEGMENT_REMAP_INV); + st7565_send_cmd(COM_SCAN_INC); + } + st7565_send_cmd(DISPLAY_START_LINE | 0x00); + st7565_send_cmd(CONTRAST); + st7565_send_cmd(ST7565_CONTRAST); + st7565_send_cmd(RESISTOR_RATIO | 0x01); + st7565_send_cmd(POWER_CONTROL | 0x04); + wait_ms(50); + st7565_send_cmd(POWER_CONTROL | 0x06); + wait_ms(50); + st7565_send_cmd(POWER_CONTROL | 0x07); + wait_ms(10); + st7565_send_cmd(DISPLAY_ON); + st7565_send_cmd(DISPLAY_ALL_ON_RESUME); + st7565_send_cmd(NORMAL_DISPLAY); + + spi_stop(); + +#if ST7565_TIMEOUT > 0 + st7565_timeout = timer_read32() + ST7565_TIMEOUT; +#endif + + st7565_clear(); + st7565_initialized = true; + st7565_active = true; + return true; +} + +__attribute__((weak)) display_rotation_t st7565_init_user(display_rotation_t rotation) { return rotation; } + +void st7565_clear(void) { + memset(st7565_buffer, 0, sizeof(st7565_buffer)); + st7565_cursor = &st7565_buffer[0]; + st7565_dirty = ST7565_ALL_BLOCKS_MASK; +} + +uint8_t crot(uint8_t a, int8_t n) { + const uint8_t mask = 0x7; + n &= mask; + return a << n | a >> (-n & mask); +} + +void st7565_render(void) { + if (!st7565_initialized) { + return; + } + + // Do we have work to do? + st7565_dirty &= ST7565_ALL_BLOCKS_MASK; + if (!st7565_dirty) { + return; + } + + // Find first dirty block + uint8_t update_start = 0; + while (!(st7565_dirty & ((ST7565_BLOCK_TYPE)1 << update_start))) { + ++update_start; + } + + // Calculate commands to set memory addressing bounds. + uint8_t start_page = ST7565_BLOCK_SIZE * update_start / ST7565_DISPLAY_WIDTH; + uint8_t start_column = ST7565_BLOCK_SIZE * update_start % ST7565_DISPLAY_WIDTH; + // IC has 132 segment drivers, for panels with less width we need to offset the starting column + if (HAS_FLAGS(st7565_rotation, DISPLAY_ROTATION_180)) { + start_column += (132 - ST7565_DISPLAY_WIDTH); + } + + spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR); + + st7565_send_cmd(PAM_PAGE_ADDR | start_page); + st7565_send_cmd(PAM_SETCOLUMN_LSB | ((ST7565_COLUMN_OFFSET + start_column) & 0x0f)); + st7565_send_cmd(PAM_SETCOLUMN_MSB | ((ST7565_COLUMN_OFFSET + start_column) >> 4 & 0x0f)); + + st7565_send_data(&st7565_buffer[ST7565_BLOCK_SIZE * update_start], ST7565_BLOCK_SIZE); + + // Turn on display if it is off + st7565_on(); + + // Clear dirty flag + st7565_dirty &= ~((ST7565_BLOCK_TYPE)1 << update_start); +} + +void st7565_set_cursor(uint8_t col, uint8_t line) { + uint16_t index = line * ST7565_DISPLAY_WIDTH + col * ST7565_FONT_WIDTH; + + // Out of bounds? + if (index >= ST7565_MATRIX_SIZE) { + index = 0; + } + + st7565_cursor = &st7565_buffer[index]; +} + +void st7565_advance_page(bool clearPageRemainder) { + uint16_t index = st7565_cursor - &st7565_buffer[0]; + uint8_t remaining = ST7565_DISPLAY_WIDTH - (index % ST7565_DISPLAY_WIDTH); + + if (clearPageRemainder) { + // Remaining Char count + remaining = remaining / ST7565_FONT_WIDTH; + + // Write empty character until next line + while (remaining--) st7565_write_char(' ', false); + } else { + // Next page index out of bounds? + if (index + remaining >= ST7565_MATRIX_SIZE) { + index = 0; + remaining = 0; + } + + st7565_cursor = &st7565_buffer[index + remaining]; + } +} + +void st7565_advance_char(void) { + uint16_t nextIndex = st7565_cursor - &st7565_buffer[0] + ST7565_FONT_WIDTH; + uint8_t remainingSpace = ST7565_DISPLAY_WIDTH - (nextIndex % ST7565_DISPLAY_WIDTH); + + // Do we have enough space on the current line for the next character + if (remainingSpace < ST7565_FONT_WIDTH) { + nextIndex += remainingSpace; + } + + // Did we go out of bounds + if (nextIndex >= ST7565_MATRIX_SIZE) { + nextIndex = 0; + } + + // Update cursor position + st7565_cursor = &st7565_buffer[nextIndex]; +} + +// Main handler that writes character data to the display buffer +void st7565_write_char(const char data, bool invert) { + // Advance to the next line if newline + if (data == '\n') { + // Old source wrote ' ' until end of line... + st7565_advance_page(true); + return; + } + + if (data == '\r') { + st7565_advance_page(false); + return; + } + + // copy the current render buffer to check for dirty after + static uint8_t st7565_temp_buffer[ST7565_FONT_WIDTH]; + memcpy(&st7565_temp_buffer, st7565_cursor, ST7565_FONT_WIDTH); + + _Static_assert(sizeof(font) >= ((ST7565_FONT_END + 1 - ST7565_FONT_START) * ST7565_FONT_WIDTH), "ST7565_FONT_END references outside array"); + + // set the reder buffer data + uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index + if (cast_data < ST7565_FONT_START || cast_data > ST7565_FONT_END) { + memset(st7565_cursor, 0x00, ST7565_FONT_WIDTH); + } else { + const uint8_t *glyph = &font[(cast_data - ST7565_FONT_START) * ST7565_FONT_WIDTH]; + memcpy_P(st7565_cursor, glyph, ST7565_FONT_WIDTH); + } + + // Invert if needed + if (invert) { + InvertCharacter(st7565_cursor); + } + + // Dirty check + if (memcmp(&st7565_temp_buffer, st7565_cursor, ST7565_FONT_WIDTH)) { + uint16_t index = st7565_cursor - &st7565_buffer[0]; + st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (index / ST7565_BLOCK_SIZE)); + // Edgecase check if the written data spans the 2 chunks + st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << ((index + ST7565_FONT_WIDTH - 1) / ST7565_BLOCK_SIZE)); + } + + // Finally move to the next char + st7565_advance_char(); +} + +void st7565_write(const char *data, bool invert) { + const char *end = data + strlen(data); + while (data < end) { + st7565_write_char(*data, invert); + data++; + } +} + +void st7565_write_ln(const char *data, bool invert) { + st7565_write(data, invert); + st7565_advance_page(true); +} + +void st7565_pan(bool left) { + uint16_t i = 0; + for (uint16_t y = 0; y < ST7565_DISPLAY_HEIGHT / 8; y++) { + if (left) { + for (uint16_t x = 0; x < ST7565_DISPLAY_WIDTH - 1; x++) { + i = y * ST7565_DISPLAY_WIDTH + x; + st7565_buffer[i] = st7565_buffer[i + 1]; + } + } else { + for (uint16_t x = ST7565_DISPLAY_WIDTH - 1; x > 0; x--) { + i = y * ST7565_DISPLAY_WIDTH + x; + st7565_buffer[i] = st7565_buffer[i - 1]; + } + } + } + st7565_dirty = ST7565_ALL_BLOCKS_MASK; +} + +display_buffer_reader_t st7565_read_raw(uint16_t start_index) { + if (start_index > ST7565_MATRIX_SIZE) start_index = ST7565_MATRIX_SIZE; + display_buffer_reader_t ret_reader; + ret_reader.current_element = &st7565_buffer[start_index]; + ret_reader.remaining_element_count = ST7565_MATRIX_SIZE - start_index; + return ret_reader; +} + +void st7565_write_raw_byte(const char data, uint16_t index) { + if (index > ST7565_MATRIX_SIZE) index = ST7565_MATRIX_SIZE; + if (st7565_buffer[index] == data) return; + st7565_buffer[index] = data; + st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (index / ST7565_BLOCK_SIZE)); +} + +void st7565_write_raw(const char *data, uint16_t size) { + uint16_t cursor_start_index = st7565_cursor - &st7565_buffer[0]; + if ((size + cursor_start_index) > ST7565_MATRIX_SIZE) size = ST7565_MATRIX_SIZE - cursor_start_index; + for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) { + uint8_t c = *data++; + if (st7565_buffer[i] == c) continue; + st7565_buffer[i] = c; + st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (i / ST7565_BLOCK_SIZE)); + } +} + +void st7565_write_pixel(uint8_t x, uint8_t y, bool on) { + if (x >= ST7565_DISPLAY_WIDTH) { + return; + } + uint16_t index = x + (y / 8) * ST7565_DISPLAY_WIDTH; + if (index >= ST7565_MATRIX_SIZE) { + return; + } + uint8_t data = st7565_buffer[index]; + if (on) { + data |= (1 << (y % 8)); + } else { + data &= ~(1 << (y % 8)); + } + if (st7565_buffer[index] != data) { + st7565_buffer[index] = data; + st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (index / ST7565_BLOCK_SIZE)); + } +} + +#if defined(__AVR__) +void st7565_write_P(const char *data, bool invert) { + uint8_t c = pgm_read_byte(data); + while (c != 0) { + st7565_write_char(c, invert); + c = pgm_read_byte(++data); + } +} + +void st7565_write_ln_P(const char *data, bool invert) { + st7565_write_P(data, invert); + st7565_advance_page(true); +} + +void st7565_write_raw_P(const char *data, uint16_t size) { + uint16_t cursor_start_index = st7565_cursor - &st7565_buffer[0]; + if ((size + cursor_start_index) > ST7565_MATRIX_SIZE) size = ST7565_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 (st7565_buffer[i] == c) continue; + st7565_buffer[i] = c; + st7565_dirty |= ((ST7565_BLOCK_TYPE)1 << (i / ST7565_BLOCK_SIZE)); + } +} +#endif // defined(__AVR__) + +bool st7565_on(void) { + if (!st7565_initialized) { + return st7565_active; + } + +#if ST7565_TIMEOUT > 0 + st7565_timeout = timer_read32() + ST7565_TIMEOUT; +#endif + + if (!st7565_active) { + spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR); + st7565_send_cmd(DISPLAY_ON); + spi_stop(); + st7565_active = true; + st7565_on_user(); + } + return st7565_active; +} + +__attribute__((weak)) void st7565_on_user(void) {} + +bool st7565_off(void) { + if (!st7565_initialized) { + return !st7565_active; + } + + if (st7565_active) { + spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR); + st7565_send_cmd(DISPLAY_OFF); + spi_stop(); + st7565_active = false; + st7565_off_user(); + } + return !st7565_active; +} + +__attribute__((weak)) void st7565_off_user(void) {} + +bool st7565_is_on(void) { return st7565_active; } + +bool st7565_invert(bool invert) { + if (!st7565_initialized) { + return st7565_inverted; + } + + if (invert != st7565_inverted) { + spi_start(ST7565_SS_PIN, false, 0, ST7565_SPI_CLK_DIVISOR); + st7565_send_cmd(invert ? INVERT_DISPLAY : NORMAL_DISPLAY); + spi_stop(); + st7565_inverted = invert; + } + return st7565_inverted; +} + +uint8_t st7565_max_chars(void) { return ST7565_DISPLAY_WIDTH / ST7565_FONT_WIDTH; } + +uint8_t st7565_max_lines(void) { return ST7565_DISPLAY_HEIGHT / ST7565_FONT_HEIGHT; } + +void st7565_task(void) { + if (!st7565_initialized) { + return; + } + +#if ST7565_UPDATE_INTERVAL > 0 + if (timer_elapsed(st7565_update_timeout) >= ST7565_UPDATE_INTERVAL) { + st7565_update_timeout = timer_read(); + st7565_set_cursor(0, 0); + st7565_task_user(); + } +#else + st7565_set_cursor(0, 0); + st7565_task_user(); +#endif + + // Smart render system, no need to check for dirty + st7565_render(); + + // Display timeout check +#if ST7565_TIMEOUT > 0 + if (st7565_active && timer_expired32(timer_read32(), st7565_timeout)) { + st7565_off(); + } +#endif +} + +__attribute__((weak)) void st7565_task_user(void) {} + +void st7565_reset(void) { + writePinLow(ST7565_RST_PIN); + wait_ms(20); + writePinHigh(ST7565_RST_PIN); + wait_ms(20); +} + +spi_status_t st7565_send_cmd(uint8_t cmd) { + writePinLow(ST7565_A0_PIN); + return spi_write(cmd); +} + +spi_status_t st7565_send_data(uint8_t *data, uint16_t length) { + writePinHigh(ST7565_A0_PIN); + return spi_transmit(data, length); +} diff --git a/drivers/lcd/st7565.h b/drivers/lcd/st7565.h new file mode 100644 index 000000000..d453dbe6d --- /dev/null +++ b/drivers/lcd/st7565.h @@ -0,0 +1,219 @@ +/* +Copyright 2021 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 +#include + +#include "spi_master.h" + +#ifndef ST7565_DISPLAY_WIDTH +# define ST7565_DISPLAY_WIDTH 128 +#endif +#ifndef ST7565_DISPLAY_HEIGHT +# define ST7565_DISPLAY_HEIGHT 32 +#endif +#ifndef ST7565_MATRIX_SIZE +# define ST7565_MATRIX_SIZE (ST7565_DISPLAY_HEIGHT / 8 * ST7565_DISPLAY_WIDTH) // 1024 (compile time mathed) +#endif +#ifndef ST7565_BLOCK_TYPE +# define ST7565_BLOCK_TYPE uint16_t +#endif +#ifndef ST7565_BLOCK_COUNT +# define ST7565_BLOCK_COUNT (sizeof(ST7565_BLOCK_TYPE) * 8) // 32 (compile time mathed) +#endif +#ifndef ST7565_BLOCK_SIZE +# define ST7565_BLOCK_SIZE (ST7565_MATRIX_SIZE / ST7565_BLOCK_COUNT) // 32 (compile time mathed) +#endif + +// the column address corresponding to the first column in the display hardware +#if !defined(ST7565_COLUMN_OFFSET) +# define ST7565_COLUMN_OFFSET 0 +#endif + +// spi clock divisor +#if !defined(ST7565_SPI_CLK_DIVISOR) +# define ST7565_SPI_CLK_DIVISOR 4 +#endif + +// Custom font file to use +#if !defined(ST7565_FONT_H) +# define ST7565_FONT_H "glcdfont.c" +#endif +// unsigned char value of the first character in the font file +#if !defined(ST7565_FONT_START) +# define ST7565_FONT_START 0 +#endif +// unsigned char value of the last character in the font file +#if !defined(ST7565_FONT_END) +# define ST7565_FONT_END 223 +#endif +// Font render width +#if !defined(ST7565_FONT_WIDTH) +# define ST7565_FONT_WIDTH 6 +#endif +// Font render height +#if !defined(ST7565_FONT_HEIGHT) +# define ST7565_FONT_HEIGHT 8 +#endif +// Default contrast level +#if !defined(ST7565_CONTRAST) +# define ST7565_CONTRAST 32 +#endif + +#if !defined(ST7565_TIMEOUT) +# if defined(ST7565_DISABLE_TIMEOUT) +# define ST7565_TIMEOUT 0 +# else +# define ST7565_TIMEOUT 60000 +# endif +#endif + +#if !defined(ST7565_UPDATE_INTERVAL) && defined(SPLIT_KEYBOARD) +# define ST7565_UPDATE_INTERVAL 50 +#endif + +typedef struct __attribute__((__packed__)) { + uint8_t *current_element; + uint16_t remaining_element_count; +} display_buffer_reader_t; + +// Rotation enum values are flags +typedef enum { DISPLAY_ROTATION_0, DISPLAY_ROTATION_180 } display_rotation_t; + +// Initialize the display, rotating the rendered output based on the define passed in. +// Returns true if the display was initialized successfully +bool st7565_init(display_rotation_t rotation); + +// Called at the start of st7565_init, weak function overridable by the user +// rotation - the value passed into st7565_init +// Return new display_rotation_t if you want to override default rotation +display_rotation_t st7565_init_user(display_rotation_t rotation); + +// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering +void st7565_clear(void); + +// Renders the dirty chunks of the buffer to display +void st7565_render(void); + +// Moves cursor to character position indicated by column and line, wraps if out of bounds +// Max column denoted by 'st7565_max_chars()' and max lines by 'st7565_max_lines()' functions +void st7565_set_cursor(uint8_t col, uint8_t line); + +// Advances the cursor to the next page, writing ' ' if true +// Wraps to the begining when out of bounds +void st7565_advance_page(bool clearPageRemainder); + +// Moves the cursor forward 1 character length +// Advance page if there is not enough room for the next character +// Wraps to the begining when out of bounds +void st7565_advance_char(void); + +// Writes a single character to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Main handler that writes character data to the display buffer +void st7565_write_char(const char data, bool invert); + +// Writes a string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +void st7565_write(const char *data, bool invert); + +// Writes a string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Advances the cursor to the next page, wiring ' ' to the remainder of the current page +void st7565_write_ln(const char *data, bool invert); + +// Pans the buffer to the right (or left by passing true) by moving contents of the buffer +// Useful for moving the screen in preparation for new drawing +void st7565_pan(bool left); + +// Returns a pointer to the requested start index in the buffer plus remaining +// buffer length as struct +display_buffer_reader_t st7565_read_raw(uint16_t start_index); + +// Writes a string to the buffer at current cursor position +void st7565_write_raw(const char *data, uint16_t size); + +// Writes a single byte into the buffer at the specified index +void st7565_write_raw_byte(const char data, uint16_t index); + +// Sets a specific pixel on or off +// Coordinates start at top-left and go right and down for positive x and y +void st7565_write_pixel(uint8_t x, uint8_t y, bool on); + +#if defined(__AVR__) +// Writes a PROGMEM string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Remapped to call 'void st7565_write(const char *data, bool invert);' on ARM +void st7565_write_P(const char *data, bool invert); + +// Writes a PROGMEM string to the buffer at current cursor position +// Advances the cursor while writing, inverts the pixels if true +// Advances the cursor to the next page, wiring ' ' to the remainder of the current page +// Remapped to call 'void st7565_write_ln(const char *data, bool invert);' on ARM +void st7565_write_ln_P(const char *data, bool invert); + +// Writes a PROGMEM string to the buffer at current cursor position +void st7565_write_raw_P(const char *data, uint16_t size); +#else +# define st7565_write_P(data, invert) st7565_write(data, invert) +# define st7565_write_ln_P(data, invert) st7565_write_ln(data, invert) +# define st7565_write_raw_P(data, size) st7565_write_raw(data, size) +#endif // defined(__AVR__) + +// Can be used to manually turn on the screen if it is off +// Returns true if the screen was on or turns on +bool st7565_on(void); + +// Called when st7565_on() turns on the screen, weak function overridable by the user +// Not called if the screen is already on +void st7565_on_user(void); + +// Can be used to manually turn off the screen if it is on +// Returns true if the screen was off or turns off +bool st7565_off(void); + +// Called when st7565_off() turns off the screen, weak function overridable by the user +// Not called if the screen is already off +void st7565_off_user(void); + +// Returns true if the screen is currently on, false if it is +// not +bool st7565_is_on(void); + +// Basically it's st7565_render, but with timeout management and st7565_task_user calling! +void st7565_task(void); + +// Called at the start of st7565_task, weak function overridable by the user +void st7565_task_user(void); + +// Inverts the display +// Returns true if the screen was or is inverted +bool st7565_invert(bool invert); + +// Returns the maximum number of characters that will fit on a line +uint8_t st7565_max_chars(void); + +// Returns the maximum number of lines that will fit on the display +uint8_t st7565_max_lines(void); + +void st7565_reset(void); + +spi_status_t st7565_send_cmd(uint8_t cmd); + +spi_status_t st7565_send_data(uint8_t *data, uint16_t length); diff --git a/drivers/apa102/apa102.c b/drivers/led/apa102.c similarity index 100% rename from drivers/apa102/apa102.c rename to drivers/led/apa102.c diff --git a/drivers/apa102/apa102.h b/drivers/led/apa102.h similarity index 100% rename from drivers/apa102/apa102.h rename to drivers/led/apa102.h diff --git a/drivers/led/aw20216.c b/drivers/led/aw20216.c new file mode 100644 index 000000000..c608c0ab4 --- /dev/null +++ b/drivers/led/aw20216.c @@ -0,0 +1,141 @@ +/* Copyright 2021 Jasper Chan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "aw20216.h" +#include "spi_master.h" + +/* The AW20216 appears to be somewhat similar to the IS31FL743, although quite + * a few things are different, such as the command byte format and page ordering. + * The LED addresses start from 0x00 instead of 0x01. + */ +#define AWINIC_ID 0b1010 << 4 + +#define AW_PAGE_FUNCTION 0x00 << 1 // PG0, Function registers +#define AW_PAGE_PWM 0x01 << 1 // PG1, LED PWM control +#define AW_PAGE_SCALING 0x02 << 1 // PG2, LED current scaling control +#define AW_PAGE_PATCHOICE 0x03 << 1 // PG3, Pattern choice? +#define AW_PAGE_PWMSCALING 0x04 << 1 // PG4, LED PWM + Scaling control? + +#define AW_WRITE 0 +#define AW_READ 1 + +#define AW_REG_CONFIGURATION 0x00 // PG0 +#define AW_REG_GLOBALCURRENT 0x01 // PG0 + +// Default value of AW_REG_CONFIGURATION +// D7:D4 = 1011, SWSEL (SW1~SW12 active) +// D3 = 0?, reserved (apparently this should be 1 but it doesn't seem to matter) +// D2:D1 = 00, OSDE (open/short detection enable) +// D0 = 0, CHIPEN (write 1 to enable LEDs when hardware enable pulled high) +#define AW_CONFIG_DEFAULT 0b10110000 +#define AW_CHIPEN 1 + +#define AW_PWM_REGISTER_COUNT 216 + +#ifndef AW_SCALING_MAX +# define AW_SCALING_MAX 150 +#endif + +#ifndef AW_GLOBAL_CURRENT_MAX +# define AW_GLOBAL_CURRENT_MAX 150 +#endif + +#ifndef AW_SPI_DIVISOR +# define AW_SPI_DIVISOR 4 +#endif + +uint8_t g_pwm_buffer[DRIVER_COUNT][AW_PWM_REGISTER_COUNT]; +bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false}; + +bool AW20216_write(pin_t cs_pin, uint8_t page, uint8_t reg, uint8_t* data, uint8_t len) { + static uint8_t s_spi_transfer_buffer[2] = {0}; + + if (!spi_start(cs_pin, false, 0, AW_SPI_DIVISOR)) { + spi_stop(); + return false; + } + + s_spi_transfer_buffer[0] = (AWINIC_ID | page | AW_WRITE); + s_spi_transfer_buffer[1] = reg; + + if (spi_transmit(s_spi_transfer_buffer, 2) != SPI_STATUS_SUCCESS) { + spi_stop(); + return false; + } + + if (spi_transmit(data, len) != SPI_STATUS_SUCCESS) { + spi_stop(); + return false; + } + + spi_stop(); + return true; +} + +static inline bool AW20216_write_register(pin_t cs_pin, uint8_t page, uint8_t reg, uint8_t value) { + // Little wrapper so callers need not care about sending a buffer + return AW20216_write(cs_pin, page, reg, &value, 1); +} + +static void AW20216_init_scaling(pin_t cs_pin) { + // Set constant current to the max, control brightness with PWM + for (uint8_t i = 0; i < AW_PWM_REGISTER_COUNT; i++) { + AW20216_write_register(cs_pin, AW_PAGE_SCALING, i, AW_SCALING_MAX); + } +} + +static inline void AW20216_init_current_limit(pin_t cs_pin) { + // Push config + AW20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_GLOBALCURRENT, AW_GLOBAL_CURRENT_MAX); +} + +static inline void AW20216_soft_enable(pin_t cs_pin) { + // Push config + AW20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_CONFIGURATION, AW_CONFIG_DEFAULT | AW_CHIPEN); +} + +void AW20216_init(pin_t cs_pin, pin_t en_pin) { + setPinOutput(en_pin); + writePinHigh(en_pin); + + // Drivers should start with all scaling and PWM registers as off + AW20216_init_current_limit(cs_pin); + AW20216_init_scaling(cs_pin); + + AW20216_soft_enable(cs_pin); +} + +void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + aw_led led = g_aw_leds[index]; + + g_pwm_buffer[led.driver][led.r] = red; + g_pwm_buffer[led.driver][led.g] = green; + g_pwm_buffer[led.driver][led.b] = blue; + g_pwm_buffer_update_required[led.driver] = true; +} + +void AW20216_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + AW20216_set_color(i, red, green, blue); + } +} + +void AW20216_update_pwm_buffers(pin_t cs_pin, uint8_t index) { + if (g_pwm_buffer_update_required[index]) { + AW20216_write(cs_pin, AW_PAGE_PWM, 0, g_pwm_buffer[index], AW_PWM_REGISTER_COUNT); + } + g_pwm_buffer_update_required[index] = false; +} diff --git a/drivers/led/aw20216.h b/drivers/led/aw20216.h new file mode 100644 index 000000000..97ac6dc5b --- /dev/null +++ b/drivers/led/aw20216.h @@ -0,0 +1,253 @@ +/* Copyright 2021 Jasper Chan (Gigahawk) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +#include +#include "progmem.h" +#include "gpio.h" + +typedef struct aw_led { + uint8_t driver : 2; + uint8_t r; + uint8_t g; + uint8_t b; +} aw_led; + +extern const aw_led __flash g_aw_leds[DRIVER_LED_TOTAL]; + +void AW20216_init(pin_t cs_pin, pin_t en_pin); +void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void AW20216_set_color_all(uint8_t red, uint8_t green, uint8_t blue); +void AW20216_update_pwm_buffers(pin_t cs_pin, uint8_t index); + +#define CS1_SW1 0x00 +#define CS2_SW1 0x01 +#define CS3_SW1 0x02 +#define CS4_SW1 0x03 +#define CS5_SW1 0x04 +#define CS6_SW1 0x05 +#define CS7_SW1 0x06 +#define CS8_SW1 0x07 +#define CS9_SW1 0x08 +#define CS10_SW1 0x09 +#define CS11_SW1 0x0A +#define CS12_SW1 0x0B +#define CS13_SW1 0x0C +#define CS14_SW1 0x0D +#define CS15_SW1 0x0E +#define CS16_SW1 0x0F +#define CS17_SW1 0x10 +#define CS18_SW1 0x11 +#define CS1_SW2 0x12 +#define CS2_SW2 0x13 +#define CS3_SW2 0x14 +#define CS4_SW2 0x15 +#define CS5_SW2 0x16 +#define CS6_SW2 0x17 +#define CS7_SW2 0x18 +#define CS8_SW2 0x19 +#define CS9_SW2 0x1A +#define CS10_SW2 0x1B +#define CS11_SW2 0x1C +#define CS12_SW2 0x1D +#define CS13_SW2 0x1E +#define CS14_SW2 0x1F +#define CS15_SW2 0x20 +#define CS16_SW2 0x21 +#define CS17_SW2 0x22 +#define CS18_SW2 0x23 +#define CS1_SW3 0x24 +#define CS2_SW3 0x25 +#define CS3_SW3 0x26 +#define CS4_SW3 0x27 +#define CS5_SW3 0x28 +#define CS6_SW3 0x29 +#define CS7_SW3 0x2A +#define CS8_SW3 0x2B +#define CS9_SW3 0x2C +#define CS10_SW3 0x2D +#define CS11_SW3 0x2E +#define CS12_SW3 0x2F +#define CS13_SW3 0x30 +#define CS14_SW3 0x31 +#define CS15_SW3 0x32 +#define CS16_SW3 0x33 +#define CS17_SW3 0x34 +#define CS18_SW3 0x35 +#define CS1_SW4 0x36 +#define CS2_SW4 0x37 +#define CS3_SW4 0x38 +#define CS4_SW4 0x39 +#define CS5_SW4 0x3A +#define CS6_SW4 0x3B +#define CS7_SW4 0x3C +#define CS8_SW4 0x3D +#define CS9_SW4 0x3E +#define CS10_SW4 0x3F +#define CS11_SW4 0x40 +#define CS12_SW4 0x41 +#define CS13_SW4 0x42 +#define CS14_SW4 0x43 +#define CS15_SW4 0x44 +#define CS16_SW4 0x45 +#define CS17_SW4 0x46 +#define CS18_SW4 0x47 +#define CS1_SW5 0x48 +#define CS2_SW5 0x49 +#define CS3_SW5 0x4A +#define CS4_SW5 0x4B +#define CS5_SW5 0x4C +#define CS6_SW5 0x4D +#define CS7_SW5 0x4E +#define CS8_SW5 0x4F +#define CS9_SW5 0x50 +#define CS10_SW5 0x51 +#define CS11_SW5 0x52 +#define CS12_SW5 0x53 +#define CS13_SW5 0x54 +#define CS14_SW5 0x55 +#define CS15_SW5 0x56 +#define CS16_SW5 0x57 +#define CS17_SW5 0x58 +#define CS18_SW5 0x59 +#define CS1_SW6 0x5A +#define CS2_SW6 0x5B +#define CS3_SW6 0x5C +#define CS4_SW6 0x5D +#define CS5_SW6 0x5E +#define CS6_SW6 0x5F +#define CS7_SW6 0x60 +#define CS8_SW6 0x61 +#define CS9_SW6 0x62 +#define CS10_SW6 0x63 +#define CS11_SW6 0x64 +#define CS12_SW6 0x65 +#define CS13_SW6 0x66 +#define CS14_SW6 0x67 +#define CS15_SW6 0x68 +#define CS16_SW6 0x69 +#define CS17_SW6 0x6A +#define CS18_SW6 0x6B +#define CS1_SW7 0x6C +#define CS2_SW7 0x6D +#define CS3_SW7 0x6E +#define CS4_SW7 0x6F +#define CS5_SW7 0x70 +#define CS6_SW7 0x71 +#define CS7_SW7 0x72 +#define CS8_SW7 0x73 +#define CS9_SW7 0x74 +#define CS10_SW7 0x75 +#define CS11_SW7 0x76 +#define CS12_SW7 0x77 +#define CS13_SW7 0x78 +#define CS14_SW7 0x79 +#define CS15_SW7 0x7A +#define CS16_SW7 0x7B +#define CS17_SW7 0x7C +#define CS18_SW7 0x7D +#define CS1_SW8 0x7E +#define CS2_SW8 0x7F +#define CS3_SW8 0x80 +#define CS4_SW8 0x81 +#define CS5_SW8 0x82 +#define CS6_SW8 0x83 +#define CS7_SW8 0x84 +#define CS8_SW8 0x85 +#define CS9_SW8 0x86 +#define CS10_SW8 0x87 +#define CS11_SW8 0x88 +#define CS12_SW8 0x89 +#define CS13_SW8 0x8A +#define CS14_SW8 0x8B +#define CS15_SW8 0x8C +#define CS16_SW8 0x8D +#define CS17_SW8 0x8E +#define CS18_SW8 0x8F +#define CS1_SW9 0x90 +#define CS2_SW9 0x91 +#define CS3_SW9 0x92 +#define CS4_SW9 0x93 +#define CS5_SW9 0x94 +#define CS6_SW9 0x95 +#define CS7_SW9 0x96 +#define CS8_SW9 0x97 +#define CS9_SW9 0x98 +#define CS10_SW9 0x99 +#define CS11_SW9 0x9A +#define CS12_SW9 0x9B +#define CS13_SW9 0x9C +#define CS14_SW9 0x9D +#define CS15_SW9 0x9E +#define CS16_SW9 0x9F +#define CS17_SW9 0xA0 +#define CS18_SW9 0xA1 +#define CS1_SW10 0xA2 +#define CS2_SW10 0xA3 +#define CS3_SW10 0xA4 +#define CS4_SW10 0xA5 +#define CS5_SW10 0xA6 +#define CS6_SW10 0xA7 +#define CS7_SW10 0xA8 +#define CS8_SW10 0xA9 +#define CS9_SW10 0xAA +#define CS10_SW10 0xAB +#define CS11_SW10 0xAC +#define CS12_SW10 0xAD +#define CS13_SW10 0xAE +#define CS14_SW10 0xAF +#define CS15_SW10 0xB0 +#define CS16_SW10 0xB1 +#define CS17_SW10 0xB2 +#define CS18_SW10 0xB3 +#define CS1_SW11 0xB4 +#define CS2_SW11 0xB5 +#define CS3_SW11 0xB6 +#define CS4_SW11 0xB7 +#define CS5_SW11 0xB8 +#define CS6_SW11 0xB9 +#define CS7_SW11 0xBA +#define CS8_SW11 0xBB +#define CS9_SW11 0xBC +#define CS10_SW11 0xBD +#define CS11_SW11 0xBE +#define CS12_SW11 0xBF +#define CS13_SW11 0xC0 +#define CS14_SW11 0xC1 +#define CS15_SW11 0xC2 +#define CS16_SW11 0xC3 +#define CS17_SW11 0xC4 +#define CS18_SW11 0xC5 +#define CS1_SW12 0xC6 +#define CS2_SW12 0xC7 +#define CS3_SW12 0xC8 +#define CS4_SW12 0xC9 +#define CS5_SW12 0xCA +#define CS6_SW12 0xCB +#define CS7_SW12 0xCC +#define CS8_SW12 0xCD +#define CS9_SW12 0xCE +#define CS10_SW12 0xCF +#define CS11_SW12 0xD0 +#define CS12_SW12 0xD1 +#define CS13_SW12 0xD2 +#define CS14_SW12 0xD3 +#define CS15_SW12 0xD4 +#define CS16_SW12 0xD5 +#define CS17_SW12 0xD6 +#define CS18_SW12 0xD7 diff --git a/drivers/issi/is31fl3218.c b/drivers/led/issi/is31fl3218.c similarity index 100% rename from drivers/issi/is31fl3218.c rename to drivers/led/issi/is31fl3218.c diff --git a/drivers/issi/is31fl3218.h b/drivers/led/issi/is31fl3218.h similarity index 100% rename from drivers/issi/is31fl3218.h rename to drivers/led/issi/is31fl3218.h diff --git a/drivers/issi/is31fl3731-simple.c b/drivers/led/issi/is31fl3731-simple.c similarity index 100% rename from drivers/issi/is31fl3731-simple.c rename to drivers/led/issi/is31fl3731-simple.c diff --git a/drivers/led/issi/is31fl3731-simple.h b/drivers/led/issi/is31fl3731-simple.h new file mode 100644 index 000000000..ecde31eed --- /dev/null +++ b/drivers/led/issi/is31fl3731-simple.h @@ -0,0 +1,208 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * Copyright 2019 Clueboard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +#include +#include "progmem.h" + +typedef struct is31_led { + uint8_t driver : 2; + uint8_t v; +} __attribute__((packed)) is31_led; + +extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; + +void IS31FL3731_init(uint8_t addr); +void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data); +void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); + +void IS31FL3731_set_value(int index, uint8_t value); +void IS31FL3731_set_value_all(uint8_t value); + +void IS31FL3731_set_led_control_register(uint8_t index, bool value); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index); +void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); + +#define C1_1 0x24 +#define C1_2 0x25 +#define C1_3 0x26 +#define C1_4 0x27 +#define C1_5 0x28 +#define C1_6 0x29 +#define C1_7 0x2A +#define C1_8 0x2B + +#define C1_9 0x2C +#define C1_10 0x2D +#define C1_11 0x2E +#define C1_12 0x2F +#define C1_13 0x30 +#define C1_14 0x31 +#define C1_15 0x32 +#define C1_16 0x33 + +#define C2_1 0x34 +#define C2_2 0x35 +#define C2_3 0x36 +#define C2_4 0x37 +#define C2_5 0x38 +#define C2_6 0x39 +#define C2_7 0x3A +#define C2_8 0x3B + +#define C2_9 0x3C +#define C2_10 0x3D +#define C2_11 0x3E +#define C2_12 0x3F +#define C2_13 0x40 +#define C2_14 0x41 +#define C2_15 0x42 +#define C2_16 0x43 + +#define C3_1 0x44 +#define C3_2 0x45 +#define C3_3 0x46 +#define C3_4 0x47 +#define C3_5 0x48 +#define C3_6 0x49 +#define C3_7 0x4A +#define C3_8 0x4B + +#define C3_9 0x4C +#define C3_10 0x4D +#define C3_11 0x4E +#define C3_12 0x4F +#define C3_13 0x50 +#define C3_14 0x51 +#define C3_15 0x52 +#define C3_16 0x53 + +#define C4_1 0x54 +#define C4_2 0x55 +#define C4_3 0x56 +#define C4_4 0x57 +#define C4_5 0x58 +#define C4_6 0x59 +#define C4_7 0x5A +#define C4_8 0x5B + +#define C4_9 0x5C +#define C4_10 0x5D +#define C4_11 0x5E +#define C4_12 0x5F +#define C4_13 0x60 +#define C4_14 0x61 +#define C4_15 0x62 +#define C4_16 0x63 + +#define C5_1 0x64 +#define C5_2 0x65 +#define C5_3 0x66 +#define C5_4 0x67 +#define C5_5 0x68 +#define C5_6 0x69 +#define C5_7 0x6A +#define C5_8 0x6B + +#define C5_9 0x6C +#define C5_10 0x6D +#define C5_11 0x6E +#define C5_12 0x6F +#define C5_13 0x70 +#define C5_14 0x71 +#define C5_15 0x72 +#define C5_16 0x73 + +#define C6_1 0x74 +#define C6_2 0x75 +#define C6_3 0x76 +#define C6_4 0x77 +#define C6_5 0x78 +#define C6_6 0x79 +#define C6_7 0x7A +#define C6_8 0x7B + +#define C6_9 0x7C +#define C6_10 0x7D +#define C6_11 0x7E +#define C6_12 0x7F +#define C6_13 0x80 +#define C6_14 0x81 +#define C6_15 0x82 +#define C6_16 0x83 + +#define C7_1 0x84 +#define C7_2 0x85 +#define C7_3 0x86 +#define C7_4 0x87 +#define C7_5 0x88 +#define C7_6 0x89 +#define C7_7 0x8A +#define C7_8 0x8B + +#define C7_9 0x8C +#define C7_10 0x8D +#define C7_11 0x8E +#define C7_12 0x8F +#define C7_13 0x90 +#define C7_14 0x91 +#define C7_15 0x92 +#define C7_16 0x93 + +#define C8_1 0x94 +#define C8_2 0x95 +#define C8_3 0x96 +#define C8_4 0x97 +#define C8_5 0x98 +#define C8_6 0x99 +#define C8_7 0x9A +#define C8_8 0x9B + +#define C8_9 0x9C +#define C8_10 0x9D +#define C8_11 0x9E +#define C8_12 0x9F +#define C8_13 0xA0 +#define C8_14 0xA1 +#define C8_15 0xA2 +#define C8_16 0xA3 + +#define C9_1 0xA4 +#define C9_2 0xA5 +#define C9_3 0xA6 +#define C9_4 0xA7 +#define C9_5 0xA8 +#define C9_6 0xA9 +#define C9_7 0xAA +#define C9_8 0xAB + +#define C9_9 0xAC +#define C9_10 0xAD +#define C9_11 0xAE +#define C9_12 0xAF +#define C9_13 0xB0 +#define C9_14 0xB1 +#define C9_15 0xB2 +#define C9_16 0xB3 diff --git a/drivers/issi/is31fl3731.c b/drivers/led/issi/is31fl3731.c similarity index 100% rename from drivers/issi/is31fl3731.c rename to drivers/led/issi/is31fl3731.c diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h new file mode 100644 index 000000000..803ea3ea1 --- /dev/null +++ b/drivers/led/issi/is31fl3731.h @@ -0,0 +1,209 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include +#include +#include "progmem.h" + +typedef struct is31_led { + uint8_t driver : 2; + uint8_t r; + uint8_t g; + uint8_t b; +} __attribute__((packed)) is31_led; + +extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; + +void IS31FL3731_init(uint8_t addr); +void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data); +void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); + +void IS31FL3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void IS31FL3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue); + +void IS31FL3731_set_led_control_register(uint8_t index, bool red, bool green, bool blue); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index); +void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index); + +#define C1_1 0x24 +#define C1_2 0x25 +#define C1_3 0x26 +#define C1_4 0x27 +#define C1_5 0x28 +#define C1_6 0x29 +#define C1_7 0x2A +#define C1_8 0x2B + +#define C1_9 0x2C +#define C1_10 0x2D +#define C1_11 0x2E +#define C1_12 0x2F +#define C1_13 0x30 +#define C1_14 0x31 +#define C1_15 0x32 +#define C1_16 0x33 + +#define C2_1 0x34 +#define C2_2 0x35 +#define C2_3 0x36 +#define C2_4 0x37 +#define C2_5 0x38 +#define C2_6 0x39 +#define C2_7 0x3A +#define C2_8 0x3B + +#define C2_9 0x3C +#define C2_10 0x3D +#define C2_11 0x3E +#define C2_12 0x3F +#define C2_13 0x40 +#define C2_14 0x41 +#define C2_15 0x42 +#define C2_16 0x43 + +#define C3_1 0x44 +#define C3_2 0x45 +#define C3_3 0x46 +#define C3_4 0x47 +#define C3_5 0x48 +#define C3_6 0x49 +#define C3_7 0x4A +#define C3_8 0x4B + +#define C3_9 0x4C +#define C3_10 0x4D +#define C3_11 0x4E +#define C3_12 0x4F +#define C3_13 0x50 +#define C3_14 0x51 +#define C3_15 0x52 +#define C3_16 0x53 + +#define C4_1 0x54 +#define C4_2 0x55 +#define C4_3 0x56 +#define C4_4 0x57 +#define C4_5 0x58 +#define C4_6 0x59 +#define C4_7 0x5A +#define C4_8 0x5B + +#define C4_9 0x5C +#define C4_10 0x5D +#define C4_11 0x5E +#define C4_12 0x5F +#define C4_13 0x60 +#define C4_14 0x61 +#define C4_15 0x62 +#define C4_16 0x63 + +#define C5_1 0x64 +#define C5_2 0x65 +#define C5_3 0x66 +#define C5_4 0x67 +#define C5_5 0x68 +#define C5_6 0x69 +#define C5_7 0x6A +#define C5_8 0x6B + +#define C5_9 0x6C +#define C5_10 0x6D +#define C5_11 0x6E +#define C5_12 0x6F +#define C5_13 0x70 +#define C5_14 0x71 +#define C5_15 0x72 +#define C5_16 0x73 + +#define C6_1 0x74 +#define C6_2 0x75 +#define C6_3 0x76 +#define C6_4 0x77 +#define C6_5 0x78 +#define C6_6 0x79 +#define C6_7 0x7A +#define C6_8 0x7B + +#define C6_9 0x7C +#define C6_10 0x7D +#define C6_11 0x7E +#define C6_12 0x7F +#define C6_13 0x80 +#define C6_14 0x81 +#define C6_15 0x82 +#define C6_16 0x83 + +#define C7_1 0x84 +#define C7_2 0x85 +#define C7_3 0x86 +#define C7_4 0x87 +#define C7_5 0x88 +#define C7_6 0x89 +#define C7_7 0x8A +#define C7_8 0x8B + +#define C7_9 0x8C +#define C7_10 0x8D +#define C7_11 0x8E +#define C7_12 0x8F +#define C7_13 0x90 +#define C7_14 0x91 +#define C7_15 0x92 +#define C7_16 0x93 + +#define C8_1 0x94 +#define C8_2 0x95 +#define C8_3 0x96 +#define C8_4 0x97 +#define C8_5 0x98 +#define C8_6 0x99 +#define C8_7 0x9A +#define C8_8 0x9B + +#define C8_9 0x9C +#define C8_10 0x9D +#define C8_11 0x9E +#define C8_12 0x9F +#define C8_13 0xA0 +#define C8_14 0xA1 +#define C8_15 0xA2 +#define C8_16 0xA3 + +#define C9_1 0xA4 +#define C9_2 0xA5 +#define C9_3 0xA6 +#define C9_4 0xA7 +#define C9_5 0xA8 +#define C9_6 0xA9 +#define C9_7 0xAA +#define C9_8 0xAB + +#define C9_9 0xAC +#define C9_10 0xAD +#define C9_11 0xAE +#define C9_12 0xAF +#define C9_13 0xB0 +#define C9_14 0xB1 +#define C9_15 0xB2 +#define C9_16 0xB3 diff --git a/drivers/issi/is31fl3733.c b/drivers/led/issi/is31fl3733.c similarity index 100% rename from drivers/issi/is31fl3733.c rename to drivers/led/issi/is31fl3733.c diff --git a/drivers/led/issi/is31fl3733.h b/drivers/led/issi/is31fl3733.h new file mode 100644 index 000000000..64fd38eb1 --- /dev/null +++ b/drivers/led/issi/is31fl3733.h @@ -0,0 +1,252 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include +#include +#include "progmem.h" + +typedef struct is31_led { + uint8_t driver : 2; + uint8_t r; + uint8_t g; + uint8_t b; +} __attribute__((packed)) is31_led; + +extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; + +void IS31FL3733_init(uint8_t addr, uint8_t sync); +bool IS31FL3733_write_register(uint8_t addr, uint8_t reg, uint8_t data); +bool IS31FL3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); + +void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void IS31FL3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue); + +void IS31FL3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void IS31FL3733_update_pwm_buffers(uint8_t addr, uint8_t index); +void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index); + +#define A_1 0x00 +#define A_2 0x01 +#define A_3 0x02 +#define A_4 0x03 +#define A_5 0x04 +#define A_6 0x05 +#define A_7 0x06 +#define A_8 0x07 +#define A_9 0x08 +#define A_10 0x09 +#define A_11 0x0A +#define A_12 0x0B +#define A_13 0x0C +#define A_14 0x0D +#define A_15 0x0E +#define A_16 0x0F + +#define B_1 0x10 +#define B_2 0x11 +#define B_3 0x12 +#define B_4 0x13 +#define B_5 0x14 +#define B_6 0x15 +#define B_7 0x16 +#define B_8 0x17 +#define B_9 0x18 +#define B_10 0x19 +#define B_11 0x1A +#define B_12 0x1B +#define B_13 0x1C +#define B_14 0x1D +#define B_15 0x1E +#define B_16 0x1F + +#define C_1 0x20 +#define C_2 0x21 +#define C_3 0x22 +#define C_4 0x23 +#define C_5 0x24 +#define C_6 0x25 +#define C_7 0x26 +#define C_8 0x27 +#define C_9 0x28 +#define C_10 0x29 +#define C_11 0x2A +#define C_12 0x2B +#define C_13 0x2C +#define C_14 0x2D +#define C_15 0x2E +#define C_16 0x2F + +#define D_1 0x30 +#define D_2 0x31 +#define D_3 0x32 +#define D_4 0x33 +#define D_5 0x34 +#define D_6 0x35 +#define D_7 0x36 +#define D_8 0x37 +#define D_9 0x38 +#define D_10 0x39 +#define D_11 0x3A +#define D_12 0x3B +#define D_13 0x3C +#define D_14 0x3D +#define D_15 0x3E +#define D_16 0x3F + +#define E_1 0x40 +#define E_2 0x41 +#define E_3 0x42 +#define E_4 0x43 +#define E_5 0x44 +#define E_6 0x45 +#define E_7 0x46 +#define E_8 0x47 +#define E_9 0x48 +#define E_10 0x49 +#define E_11 0x4A +#define E_12 0x4B +#define E_13 0x4C +#define E_14 0x4D +#define E_15 0x4E +#define E_16 0x4F + +#define F_1 0x50 +#define F_2 0x51 +#define F_3 0x52 +#define F_4 0x53 +#define F_5 0x54 +#define F_6 0x55 +#define F_7 0x56 +#define F_8 0x57 +#define F_9 0x58 +#define F_10 0x59 +#define F_11 0x5A +#define F_12 0x5B +#define F_13 0x5C +#define F_14 0x5D +#define F_15 0x5E +#define F_16 0x5F + +#define G_1 0x60 +#define G_2 0x61 +#define G_3 0x62 +#define G_4 0x63 +#define G_5 0x64 +#define G_6 0x65 +#define G_7 0x66 +#define G_8 0x67 +#define G_9 0x68 +#define G_10 0x69 +#define G_11 0x6A +#define G_12 0x6B +#define G_13 0x6C +#define G_14 0x6D +#define G_15 0x6E +#define G_16 0x6F + +#define H_1 0x70 +#define H_2 0x71 +#define H_3 0x72 +#define H_4 0x73 +#define H_5 0x74 +#define H_6 0x75 +#define H_7 0x76 +#define H_8 0x77 +#define H_9 0x78 +#define H_10 0x79 +#define H_11 0x7A +#define H_12 0x7B +#define H_13 0x7C +#define H_14 0x7D +#define H_15 0x7E +#define H_16 0x7F + +#define I_1 0x80 +#define I_2 0x81 +#define I_3 0x82 +#define I_4 0x83 +#define I_5 0x84 +#define I_6 0x85 +#define I_7 0x86 +#define I_8 0x87 +#define I_9 0x88 +#define I_10 0x89 +#define I_11 0x8A +#define I_12 0x8B +#define I_13 0x8C +#define I_14 0x8D +#define I_15 0x8E +#define I_16 0x8F + +#define J_1 0x90 +#define J_2 0x91 +#define J_3 0x92 +#define J_4 0x93 +#define J_5 0x94 +#define J_6 0x95 +#define J_7 0x96 +#define J_8 0x97 +#define J_9 0x98 +#define J_10 0x99 +#define J_11 0x9A +#define J_12 0x9B +#define J_13 0x9C +#define J_14 0x9D +#define J_15 0x9E +#define J_16 0x9F + +#define K_1 0xA0 +#define K_2 0xA1 +#define K_3 0xA2 +#define K_4 0xA3 +#define K_5 0xA4 +#define K_6 0xA5 +#define K_7 0xA6 +#define K_8 0xA7 +#define K_9 0xA8 +#define K_10 0xA9 +#define K_11 0xAA +#define K_12 0xAB +#define K_13 0xAC +#define K_14 0xAD +#define K_15 0xAE +#define K_16 0xAF + +#define L_1 0xB0 +#define L_2 0xB1 +#define L_3 0xB2 +#define L_4 0xB3 +#define L_5 0xB4 +#define L_6 0xB5 +#define L_7 0xB6 +#define L_8 0xB7 +#define L_9 0xB8 +#define L_10 0xB9 +#define L_11 0xBA +#define L_12 0xBB +#define L_13 0xBC +#define L_14 0xBD +#define L_15 0xBE +#define L_16 0xBF diff --git a/drivers/issi/is31fl3736.c b/drivers/led/issi/is31fl3736.c similarity index 100% rename from drivers/issi/is31fl3736.c rename to drivers/led/issi/is31fl3736.c diff --git a/drivers/led/issi/is31fl3736.h b/drivers/led/issi/is31fl3736.h new file mode 100644 index 000000000..c956c87f7 --- /dev/null +++ b/drivers/led/issi/is31fl3736.h @@ -0,0 +1,169 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include +#include +#include "progmem.h" + +// Simple interface option. +// If these aren't defined, just define them to make it compile + +#ifndef DRIVER_COUNT +# define DRIVER_COUNT 2 +#endif + +#ifndef DRIVER_LED_TOTAL +# define DRIVER_LED_TOTAL 96 +#endif + +typedef struct is31_led { + uint8_t driver : 2; + uint8_t r; + uint8_t g; + uint8_t b; +} __attribute__((packed)) is31_led; + +extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; + +void IS31FL3736_init(uint8_t addr); +void IS31FL3736_write_register(uint8_t addr, uint8_t reg, uint8_t data); +void IS31FL3736_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); + +void IS31FL3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void IS31FL3736_set_color_all(uint8_t red, uint8_t green, uint8_t blue); + +void IS31FL3736_set_led_control_register(uint8_t index, bool red, bool green, bool blue); + +void IS31FL3736_mono_set_brightness(int index, uint8_t value); +void IS31FL3736_mono_set_brightness_all(uint8_t value); +void IS31FL3736_mono_set_led_control_register(uint8_t index, bool enabled); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void IS31FL3736_update_pwm_buffers(uint8_t addr1, uint8_t addr2); +void IS31FL3736_update_led_control_registers(uint8_t addr1, uint8_t addr2); + +#define A_1 0x00 +#define A_2 0x02 +#define A_3 0x04 +#define A_4 0x06 +#define A_5 0x08 +#define A_6 0x0A +#define A_7 0x0C +#define A_8 0x0E + +#define B_1 0x10 +#define B_2 0x12 +#define B_3 0x14 +#define B_4 0x16 +#define B_5 0x18 +#define B_6 0x1A +#define B_7 0x1C +#define B_8 0x1E + +#define C_1 0x20 +#define C_2 0x22 +#define C_3 0x24 +#define C_4 0x26 +#define C_5 0x28 +#define C_6 0x2A +#define C_7 0x2C +#define C_8 0x2E + +#define D_1 0x30 +#define D_2 0x32 +#define D_3 0x34 +#define D_4 0x36 +#define D_5 0x38 +#define D_6 0x3A +#define D_7 0x3C +#define D_8 0x3E + +#define E_1 0x40 +#define E_2 0x42 +#define E_3 0x44 +#define E_4 0x46 +#define E_5 0x48 +#define E_6 0x4A +#define E_7 0x4C +#define E_8 0x4E + +#define F_1 0x50 +#define F_2 0x52 +#define F_3 0x54 +#define F_4 0x56 +#define F_5 0x58 +#define F_6 0x5A +#define F_7 0x5C +#define F_8 0x5E + +#define G_1 0x60 +#define G_2 0x62 +#define G_3 0x64 +#define G_4 0x66 +#define G_5 0x68 +#define G_6 0x6A +#define G_7 0x6C +#define G_8 0x6E + +#define H_1 0x70 +#define H_2 0x72 +#define H_3 0x74 +#define H_4 0x76 +#define H_5 0x78 +#define H_6 0x7A +#define H_7 0x7C +#define H_8 0x7E + +#define I_1 0x80 +#define I_2 0x82 +#define I_3 0x84 +#define I_4 0x86 +#define I_5 0x88 +#define I_6 0x8A +#define I_7 0x8C +#define I_8 0x8E + +#define J_1 0x90 +#define J_2 0x92 +#define J_3 0x94 +#define J_4 0x96 +#define J_5 0x98 +#define J_6 0x9A +#define J_7 0x9C +#define J_8 0x9E + +#define K_1 0xA0 +#define K_2 0xA2 +#define K_3 0xA4 +#define K_4 0xA6 +#define K_5 0xA8 +#define K_6 0xAA +#define K_7 0xAC +#define K_8 0xAE + +#define L_1 0xB0 +#define L_2 0xB2 +#define L_3 0xB4 +#define L_4 0xB6 +#define L_5 0xB8 +#define L_6 0xBA +#define L_7 0xBC +#define L_8 0xBE diff --git a/drivers/led/issi/is31fl3737.c b/drivers/led/issi/is31fl3737.c new file mode 100644 index 000000000..0bb4ddd42 --- /dev/null +++ b/drivers/led/issi/is31fl3737.c @@ -0,0 +1,222 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "is31fl3737.h" +#include "i2c_master.h" +#include "wait.h" + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 00 <-> GND +// 01 <-> SCL +// 10 <-> SDA +// 11 <-> VCC +// ADDR1 represents A1:A0 of the 7-bit address. +// ADDR2 represents A3:A2 of the 7-bit address. +// The result is: 0b101(ADDR2)(ADDR1) +#define ISSI_ADDR_DEFAULT 0x50 + +#define ISSI_COMMANDREGISTER 0xFD +#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE +#define ISSI_INTERRUPTMASKREGISTER 0xF0 +#define ISSI_INTERRUPTSTATUSREGISTER 0xF1 + +#define ISSI_PAGE_LEDCONTROL 0x00 // PG0 +#define ISSI_PAGE_PWM 0x01 // PG1 +#define ISSI_PAGE_AUTOBREATH 0x02 // PG2 +#define ISSI_PAGE_FUNCTION 0x03 // PG3 + +#define ISSI_REG_CONFIGURATION 0x00 // PG3 +#define ISSI_REG_GLOBALCURRENT 0x01 // PG3 +#define ISSI_REG_RESET 0x11 // PG3 +#define ISSI_REG_SWPULLUP 0x0F // PG3 +#define ISSI_REG_CSPULLUP 0x10 // PG3 + +#ifndef ISSI_TIMEOUT +# define ISSI_TIMEOUT 100 +#endif + +#ifndef ISSI_PERSISTENCE +# define ISSI_PERSISTENCE 0 +#endif + +// Transfer buffer for TWITransmitData() +uint8_t g_twi_transfer_buffer[20]; + +// These buffers match the IS31FL3737 PWM registers. +// The control buffers match the PG0 LED On/Off registers. +// Storing them like this is optimal for I2C transfers to the registers. +// We could optimize this and take out the unused registers from these +// buffers and the transfers in IS31FL3737_write_pwm_buffer() but it's +// probably not worth the extra complexity. + +uint8_t g_pwm_buffer[DRIVER_COUNT][192]; +bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false}; + +uint8_t g_led_control_registers[DRIVER_COUNT][24] = {0}; +bool g_led_control_registers_update_required[DRIVER_COUNT] = {false}; + +void IS31FL3737_write_register(uint8_t addr, uint8_t reg, uint8_t data) { + g_twi_transfer_buffer[0] = reg; + g_twi_transfer_buffer[1] = data; + +#if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break; + } +#else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT); +#endif +} + +void IS31FL3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { + // assumes PG1 is already selected + + // transmit PWM registers in 12 transfers of 16 bytes + // g_twi_transfer_buffer[] is 20 bytes + + // iterate over the pwm_buffer contents at 16 byte intervals + for (int i = 0; i < 192; i += 16) { + g_twi_transfer_buffer[0] = i; + // copy the data from i to i+15 + // device will auto-increment register for data after the first byte + // thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer + for (int j = 0; j < 16; j++) { + g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; + } + +#if ISSI_PERSISTENCE > 0 + for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break; + } +#else + i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT); +#endif + } +} + +void IS31FL3737_init(uint8_t addr) { + // In order to avoid the LEDs being driven with garbage data + // in the LED driver's PWM registers, shutdown is enabled last. + // Set up the mode and other settings, clear the PWM registers, + // then disable software shutdown. + + // Unlock the command register. + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + + // Select PG0 + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); + // Turn off all LEDs. + for (int i = 0x00; i <= 0x17; i++) { + IS31FL3737_write_register(addr, i, 0x00); + } + + // Unlock the command register. + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + + // Select PG1 + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); + // Set PWM on all LEDs to 0 + // No need to setup Breath registers to PWM as that is the default. + for (int i = 0x00; i <= 0xBF; i++) { + IS31FL3737_write_register(addr, i, 0x00); + } + + // Unlock the command register. + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + + // Select PG3 + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION); + // Set global current to maximum. + IS31FL3737_write_register(addr, ISSI_REG_GLOBALCURRENT, 0xFF); + // Disable software shutdown. + IS31FL3737_write_register(addr, ISSI_REG_CONFIGURATION, 0x01); + + // Wait 10ms to ensure the device has woken up. + wait_ms(10); +} + +void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + if (index >= 0 && index < DRIVER_LED_TOTAL) { + is31_led led = g_is31_leds[index]; + + g_pwm_buffer[led.driver][led.r] = red; + g_pwm_buffer[led.driver][led.g] = green; + g_pwm_buffer[led.driver][led.b] = blue; + g_pwm_buffer_update_required[led.driver] = true; + } +} + +void IS31FL3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + IS31FL3737_set_color(i, red, green, blue); + } +} + +void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { + is31_led led = g_is31_leds[index]; + + uint8_t control_register_r = led.r / 8; + uint8_t control_register_g = led.g / 8; + uint8_t control_register_b = led.b / 8; + uint8_t bit_r = led.r % 8; + uint8_t bit_g = led.g % 8; + uint8_t bit_b = led.b % 8; + + if (red) { + g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); + } else { + g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); + } + if (green) { + g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); + } else { + g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); + } + if (blue) { + g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); + } else { + g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); + } + + g_led_control_registers_update_required[led.driver] = true; +} + +void IS31FL3737_update_pwm_buffers(uint8_t addr, uint8_t index) { + if (g_pwm_buffer_update_required[index]) { + // Firstly we need to unlock the command register and select PG1 + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM); + + IS31FL3737_write_pwm_buffer(addr, g_pwm_buffer[index]); + } + g_pwm_buffer_update_required[index] = false; +} + +void IS31FL3737_update_led_control_registers(uint8_t addr, uint8_t index) { + if (g_led_control_registers_update_required[index]) { + // Firstly we need to unlock the command register and select PG0 + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5); + IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL); + for (int i = 0; i < 24; i++) { + IS31FL3737_write_register(addr, i, g_led_control_registers[index][i]); + } + } + g_led_control_registers_update_required[index] = false; +} diff --git a/drivers/led/issi/is31fl3737.h b/drivers/led/issi/is31fl3737.h new file mode 100644 index 000000000..06886e9c9 --- /dev/null +++ b/drivers/led/issi/is31fl3737.h @@ -0,0 +1,204 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include +#include +#include "progmem.h" + +typedef struct is31_led { + uint8_t driver : 2; + uint8_t r; + uint8_t g; + uint8_t b; +} __attribute__((packed)) is31_led; + +extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; + +void IS31FL3737_init(uint8_t addr); +void IS31FL3737_write_register(uint8_t addr, uint8_t reg, uint8_t data); +void IS31FL3737_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); + +void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void IS31FL3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue); + +void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void IS31FL3737_update_pwm_buffers(uint8_t addr1, uint8_t addr2); +void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2); + +#define A_1 0x00 +#define A_2 0x01 +#define A_3 0x02 +#define A_4 0x03 +#define A_5 0x04 +#define A_6 0x05 +#define A_7 0x08 +#define A_8 0x09 +#define A_9 0x0A +#define A_10 0x0B +#define A_11 0x0C +#define A_12 0x0D + +#define B_1 0x10 +#define B_2 0x11 +#define B_3 0x12 +#define B_4 0x13 +#define B_5 0x14 +#define B_6 0x15 +#define B_7 0x18 +#define B_8 0x19 +#define B_9 0x1A +#define B_10 0x1B +#define B_11 0x1C +#define B_12 0x1D + +#define C_1 0x20 +#define C_2 0x21 +#define C_3 0x22 +#define C_4 0x23 +#define C_5 0x24 +#define C_6 0x25 +#define C_7 0x28 +#define C_8 0x29 +#define C_9 0x2A +#define C_10 0x2B +#define C_11 0x2C +#define C_12 0x2D + +#define D_1 0x30 +#define D_2 0x31 +#define D_3 0x32 +#define D_4 0x33 +#define D_5 0x34 +#define D_6 0x35 +#define D_7 0x38 +#define D_8 0x39 +#define D_9 0x3A +#define D_10 0x3B +#define D_11 0x3C +#define D_12 0x3D + +#define E_1 0x40 +#define E_2 0x41 +#define E_3 0x42 +#define E_4 0x43 +#define E_5 0x44 +#define E_6 0x45 +#define E_7 0x48 +#define E_8 0x49 +#define E_9 0x4A +#define E_10 0x4B +#define E_11 0x4C +#define E_12 0x4D + +#define F_1 0x50 +#define F_2 0x51 +#define F_3 0x52 +#define F_4 0x53 +#define F_5 0x54 +#define F_6 0x55 +#define F_7 0x58 +#define F_8 0x59 +#define F_9 0x5A +#define F_10 0x5B +#define F_11 0x5C +#define F_12 0x5D + +#define G_1 0x60 +#define G_2 0x61 +#define G_3 0x62 +#define G_4 0x63 +#define G_5 0x64 +#define G_6 0x65 +#define G_7 0x68 +#define G_8 0x69 +#define G_9 0x6A +#define G_10 0x6B +#define G_11 0x6C +#define G_12 0x6D + +#define H_1 0x70 +#define H_2 0x71 +#define H_3 0x72 +#define H_4 0x73 +#define H_5 0x74 +#define H_6 0x75 +#define H_7 0x78 +#define H_8 0x79 +#define H_9 0x7A +#define H_10 0x7B +#define H_11 0x7C +#define H_12 0x7D + +#define I_1 0x80 +#define I_2 0x81 +#define I_3 0x82 +#define I_4 0x83 +#define I_5 0x84 +#define I_6 0x85 +#define I_7 0x88 +#define I_8 0x89 +#define I_9 0x8A +#define I_10 0x8B +#define I_11 0x8C +#define I_12 0x8D + +#define J_1 0x90 +#define J_2 0x91 +#define J_3 0x92 +#define J_4 0x93 +#define J_5 0x94 +#define J_6 0x95 +#define J_7 0x98 +#define J_8 0x99 +#define J_9 0x9A +#define J_10 0x9B +#define J_11 0x9C +#define J_12 0x9D + +#define K_1 0xA0 +#define K_2 0xA1 +#define K_3 0xA2 +#define K_4 0xA3 +#define K_5 0xA4 +#define K_6 0xA5 +#define K_7 0xA8 +#define K_8 0xA9 +#define K_9 0xAA +#define K_10 0xAB +#define K_11 0xAC +#define K_12 0xAD + +#define L_1 0xB0 +#define L_2 0xB1 +#define L_3 0xB2 +#define L_4 0xB3 +#define L_5 0xB4 +#define L_6 0xB5 +#define L_7 0xB8 +#define L_8 0xB9 +#define L_9 0xBA +#define L_10 0xBB +#define L_11 0xBC +#define L_12 0xBD diff --git a/drivers/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c similarity index 100% rename from drivers/issi/is31fl3741.c rename to drivers/led/issi/is31fl3741.c diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h new file mode 100644 index 000000000..cea6761ca --- /dev/null +++ b/drivers/led/issi/is31fl3741.h @@ -0,0 +1,421 @@ +/* Copyright 2017 Jason Williams + * Copyright 2018 Jack Humbert + * Copyright 2018 Yiancar + * Copyright 2020 MelGeek + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +#include +#include "progmem.h" + +typedef struct is31_led { + uint32_t driver : 2; + uint32_t r : 10; + uint32_t g : 10; + uint32_t b : 10; +} __attribute__((packed)) is31_led; + +extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; + +void IS31FL3741_init(uint8_t addr); +void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data); +bool IS31FL3741_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); + +void IS31FL3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void IS31FL3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue); + +void IS31FL3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void IS31FL3741_update_pwm_buffers(uint8_t addr1, uint8_t addr2); +void IS31FL3741_update_led_control_registers(uint8_t addr1, uint8_t addr2); +void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); + +void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); + +#define CS1_SW1 0x00 +#define CS2_SW1 0x01 +#define CS3_SW1 0x02 +#define CS4_SW1 0x03 +#define CS5_SW1 0x04 +#define CS6_SW1 0x05 +#define CS7_SW1 0x06 +#define CS8_SW1 0x07 +#define CS9_SW1 0x08 +#define CS10_SW1 0x09 +#define CS11_SW1 0x0A +#define CS12_SW1 0x0B +#define CS13_SW1 0x0C +#define CS14_SW1 0x0D +#define CS15_SW1 0x0E +#define CS16_SW1 0x0F +#define CS17_SW1 0x10 +#define CS18_SW1 0x11 +#define CS19_SW1 0x12 +#define CS20_SW1 0x13 +#define CS21_SW1 0x14 +#define CS22_SW1 0x15 +#define CS23_SW1 0x16 +#define CS24_SW1 0x17 +#define CS25_SW1 0x18 +#define CS26_SW1 0x19 +#define CS27_SW1 0x1A +#define CS28_SW1 0x1B +#define CS29_SW1 0x1C +#define CS30_SW1 0x1D + +#define CS1_SW2 0x1E +#define CS2_SW2 0x1F +#define CS3_SW2 0x20 +#define CS4_SW2 0x21 +#define CS5_SW2 0x22 +#define CS6_SW2 0x23 +#define CS7_SW2 0x24 +#define CS8_SW2 0x25 +#define CS9_SW2 0x26 +#define CS10_SW2 0x27 +#define CS11_SW2 0x28 +#define CS12_SW2 0x29 +#define CS13_SW2 0x2A +#define CS14_SW2 0x2B +#define CS15_SW2 0x2C +#define CS16_SW2 0x2D +#define CS17_SW2 0x2E +#define CS18_SW2 0x2F +#define CS19_SW2 0x30 +#define CS20_SW2 0x31 +#define CS21_SW2 0x32 +#define CS22_SW2 0x33 +#define CS23_SW2 0x34 +#define CS24_SW2 0x35 +#define CS25_SW2 0x36 +#define CS26_SW2 0x37 +#define CS27_SW2 0x38 +#define CS28_SW2 0x39 +#define CS29_SW2 0x3A +#define CS30_SW2 0x3B + +#define CS1_SW3 0x3C +#define CS2_SW3 0x3D +#define CS3_SW3 0x3E +#define CS4_SW3 0x3F +#define CS5_SW3 0x40 +#define CS6_SW3 0x41 +#define CS7_SW3 0x42 +#define CS8_SW3 0x43 +#define CS9_SW3 0x44 +#define CS10_SW3 0x45 +#define CS11_SW3 0x46 +#define CS12_SW3 0x47 +#define CS13_SW3 0x48 +#define CS14_SW3 0x49 +#define CS15_SW3 0x4A +#define CS16_SW3 0x4B +#define CS17_SW3 0x4C +#define CS18_SW3 0x4D +#define CS19_SW3 0x4E +#define CS20_SW3 0x4F +#define CS21_SW3 0x50 +#define CS22_SW3 0x51 +#define CS23_SW3 0x52 +#define CS24_SW3 0x53 +#define CS25_SW3 0x54 +#define CS26_SW3 0x55 +#define CS27_SW3 0x56 +#define CS28_SW3 0x57 +#define CS29_SW3 0x58 +#define CS30_SW3 0x59 + +#define CS1_SW4 0x5A +#define CS2_SW4 0x5B +#define CS3_SW4 0x5C +#define CS4_SW4 0x5D +#define CS5_SW4 0x5E +#define CS6_SW4 0x5F +#define CS7_SW4 0x60 +#define CS8_SW4 0x61 +#define CS9_SW4 0x62 +#define CS10_SW4 0x63 +#define CS11_SW4 0x64 +#define CS12_SW4 0x65 +#define CS13_SW4 0x66 +#define CS14_SW4 0x67 +#define CS15_SW4 0x68 +#define CS16_SW4 0x69 +#define CS17_SW4 0x6A +#define CS18_SW4 0x6B +#define CS19_SW4 0x6C +#define CS20_SW4 0x6D +#define CS21_SW4 0x6E +#define CS22_SW4 0x6F +#define CS23_SW4 0x70 +#define CS24_SW4 0x71 +#define CS25_SW4 0x72 +#define CS26_SW4 0x73 +#define CS27_SW4 0x74 +#define CS28_SW4 0x75 +#define CS29_SW4 0x76 +#define CS30_SW4 0x77 + +#define CS1_SW5 0x78 +#define CS2_SW5 0x79 +#define CS3_SW5 0x7A +#define CS4_SW5 0x7B +#define CS5_SW5 0x7C +#define CS6_SW5 0x7D +#define CS7_SW5 0x7E +#define CS8_SW5 0x7F +#define CS9_SW5 0x80 +#define CS10_SW5 0x81 +#define CS11_SW5 0x82 +#define CS12_SW5 0x83 +#define CS13_SW5 0x84 +#define CS14_SW5 0x85 +#define CS15_SW5 0x86 +#define CS16_SW5 0x87 +#define CS17_SW5 0x88 +#define CS18_SW5 0x89 +#define CS19_SW5 0x8A +#define CS20_SW5 0x8B +#define CS21_SW5 0x8C +#define CS22_SW5 0x8D +#define CS23_SW5 0x8E +#define CS24_SW5 0x8F +#define CS25_SW5 0x90 +#define CS26_SW5 0x91 +#define CS27_SW5 0x92 +#define CS28_SW5 0x93 +#define CS29_SW5 0x94 +#define CS30_SW5 0x95 + +#define CS1_SW6 0x96 +#define CS2_SW6 0x97 +#define CS3_SW6 0x98 +#define CS4_SW6 0x99 +#define CS5_SW6 0x9A +#define CS6_SW6 0x9B +#define CS7_SW6 0x9C +#define CS8_SW6 0x9D +#define CS9_SW6 0x9E +#define CS10_SW6 0x9F +#define CS11_SW6 0xA0 +#define CS12_SW6 0xA1 +#define CS13_SW6 0xA2 +#define CS14_SW6 0xA3 +#define CS15_SW6 0xA4 +#define CS16_SW6 0xA5 +#define CS17_SW6 0xA6 +#define CS18_SW6 0xA7 +#define CS19_SW6 0xA8 +#define CS20_SW6 0xA9 +#define CS21_SW6 0xAA +#define CS22_SW6 0xAB +#define CS23_SW6 0xAC +#define CS24_SW6 0xAD +#define CS25_SW6 0xAE +#define CS26_SW6 0xAF +#define CS27_SW6 0xB0 +#define CS28_SW6 0xB1 +#define CS29_SW6 0xB2 +#define CS30_SW6 0xB3 + +#define CS1_SW7 0xB4 +#define CS2_SW7 0xB5 +#define CS3_SW7 0xB6 +#define CS4_SW7 0xB7 +#define CS5_SW7 0xB8 +#define CS6_SW7 0xB9 +#define CS7_SW7 0xBA +#define CS8_SW7 0xBB +#define CS9_SW7 0xBC +#define CS10_SW7 0xBD +#define CS11_SW7 0xBE +#define CS12_SW7 0xBF +#define CS13_SW7 0xC0 +#define CS14_SW7 0xC1 +#define CS15_SW7 0xC2 +#define CS16_SW7 0xC3 +#define CS17_SW7 0xC4 +#define CS18_SW7 0xC5 +#define CS19_SW7 0xC6 +#define CS20_SW7 0xC7 +#define CS21_SW7 0xC8 +#define CS22_SW7 0xC9 +#define CS23_SW7 0xCA +#define CS24_SW7 0xCB +#define CS25_SW7 0xCC +#define CS26_SW7 0xCD +#define CS27_SW7 0xCE +#define CS28_SW7 0xCF +#define CS29_SW7 0xD0 +#define CS30_SW7 0xD1 + +#define CS1_SW8 0xD2 +#define CS2_SW8 0xD3 +#define CS3_SW8 0xD4 +#define CS4_SW8 0xD5 +#define CS5_SW8 0xD6 +#define CS6_SW8 0xD7 +#define CS7_SW8 0xD8 +#define CS8_SW8 0xD9 +#define CS9_SW8 0xDA +#define CS10_SW8 0xDB +#define CS11_SW8 0xDC +#define CS12_SW8 0xDD +#define CS13_SW8 0xDE +#define CS14_SW8 0xDF +#define CS15_SW8 0xE0 +#define CS16_SW8 0xE1 +#define CS17_SW8 0xE2 +#define CS18_SW8 0xE3 +#define CS19_SW8 0xE4 +#define CS20_SW8 0xE5 +#define CS21_SW8 0xE6 +#define CS22_SW8 0xE7 +#define CS23_SW8 0xE8 +#define CS24_SW8 0xE9 +#define CS25_SW8 0xEA +#define CS26_SW8 0xEB +#define CS27_SW8 0xEC +#define CS28_SW8 0xED +#define CS29_SW8 0xEE +#define CS30_SW8 0xEF + +#define CS1_SW9 0xF0 +#define CS2_SW9 0xF1 +#define CS3_SW9 0xF2 +#define CS4_SW9 0xF3 +#define CS5_SW9 0xF4 +#define CS6_SW9 0xF5 +#define CS7_SW9 0xF6 +#define CS8_SW9 0xF7 +#define CS9_SW9 0xF8 +#define CS10_SW9 0xF9 +#define CS11_SW9 0xFA +#define CS12_SW9 0xFB +#define CS13_SW9 0xFC +#define CS14_SW9 0xFD +#define CS15_SW9 0xFE +#define CS16_SW9 0xFF +#define CS17_SW9 0x100 +#define CS18_SW9 0x101 +#define CS19_SW9 0x102 +#define CS20_SW9 0x103 +#define CS21_SW9 0x104 +#define CS22_SW9 0x105 +#define CS23_SW9 0x106 +#define CS24_SW9 0x107 +#define CS25_SW9 0x108 +#define CS26_SW9 0x109 +#define CS27_SW9 0x10A +#define CS28_SW9 0x10B +#define CS29_SW9 0x10C +#define CS30_SW9 0x10D + +#define CS31_SW1 0x10E +#define CS32_SW1 0x10F +#define CS33_SW1 0x110 +#define CS34_SW1 0x111 +#define CS35_SW1 0x112 +#define CS36_SW1 0x113 +#define CS37_SW1 0x114 +#define CS38_SW1 0x115 +#define CS39_SW1 0x116 + +#define CS31_SW2 0x117 +#define CS32_SW2 0x118 +#define CS33_SW2 0x119 +#define CS34_SW2 0x11A +#define CS35_SW2 0x11B +#define CS36_SW2 0x11C +#define CS37_SW2 0x11D +#define CS38_SW2 0x11E +#define CS39_SW2 0x11F + +#define CS31_SW3 0x120 +#define CS32_SW3 0x121 +#define CS33_SW3 0x122 +#define CS34_SW3 0x123 +#define CS35_SW3 0x124 +#define CS36_SW3 0x125 +#define CS37_SW3 0x126 +#define CS38_SW3 0x127 +#define CS39_SW3 0x128 + +#define CS31_SW4 0x129 +#define CS32_SW4 0x12A +#define CS33_SW4 0x12B +#define CS34_SW4 0x12C +#define CS35_SW4 0x12D +#define CS36_SW4 0x12E +#define CS37_SW4 0x12F +#define CS38_SW4 0x130 +#define CS39_SW4 0x131 + +#define CS31_SW5 0x132 +#define CS32_SW5 0x133 +#define CS33_SW5 0x134 +#define CS34_SW5 0x135 +#define CS35_SW5 0x136 +#define CS36_SW5 0x137 +#define CS37_SW5 0x138 +#define CS38_SW5 0x139 +#define CS39_SW5 0x13A + +#define CS31_SW6 0x13B +#define CS32_SW6 0x13C +#define CS33_SW6 0x13D +#define CS34_SW6 0x13E +#define CS35_SW6 0x13F +#define CS36_SW6 0x140 +#define CS37_SW6 0x141 +#define CS38_SW6 0x142 +#define CS39_SW6 0x143 + +#define CS31_SW7 0x144 +#define CS32_SW7 0x145 +#define CS33_SW7 0x146 +#define CS34_SW7 0x147 +#define CS35_SW7 0x148 +#define CS36_SW7 0x149 +#define CS37_SW7 0x14A +#define CS38_SW7 0x14B +#define CS39_SW7 0x14C + +#define CS31_SW8 0x14D +#define CS32_SW8 0x14E +#define CS33_SW8 0x14F +#define CS34_SW8 0x150 +#define CS35_SW8 0x151 +#define CS36_SW8 0x152 +#define CS37_SW8 0x153 +#define CS38_SW8 0x154 +#define CS39_SW8 0x155 + +#define CS31_SW9 0x156 +#define CS32_SW9 0x157 +#define CS33_SW9 0x158 +#define CS34_SW9 0x159 +#define CS35_SW9 0x15A +#define CS36_SW9 0x15B +#define CS37_SW9 0x15C +#define CS38_SW9 0x15D +#define CS39_SW9 0x15E diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c deleted file mode 100644 index 8e5ed5f07..000000000 --- a/drivers/oled/oled_driver.c +++ /dev/null @@ -1,751 +0,0 @@ -/* -Copyright 2019 Ryan Caltabiano - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#include "i2c_master.h" -#include "oled_driver.h" -#include OLED_FONT_H -#include "timer.h" -#include "print.h" - -#include - -#include "progmem.h" - -#include "keyboard.h" - -// Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf -// for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf - -// Fundamental Commands -#define CONTRAST 0x81 -#define DISPLAY_ALL_ON 0xA5 -#define DISPLAY_ALL_ON_RESUME 0xA4 -#define NORMAL_DISPLAY 0xA6 -#define DISPLAY_ON 0xAF -#define DISPLAY_OFF 0xAE -#define NOP 0xE3 - -// Scrolling Commands -#define ACTIVATE_SCROLL 0x2F -#define DEACTIVATE_SCROLL 0x2E -#define SCROLL_RIGHT 0x26 -#define SCROLL_LEFT 0x27 -#define SCROLL_RIGHT_UP 0x29 -#define SCROLL_LEFT_UP 0x2A - -// Addressing Setting Commands -#define MEMORY_MODE 0x20 -#define COLUMN_ADDR 0x21 -#define PAGE_ADDR 0x22 -#define PAM_SETCOLUMN_LSB 0x00 -#define PAM_SETCOLUMN_MSB 0x10 -#define PAM_PAGE_ADDR 0xB0 // 0xb0 -- 0xb7 - -// Hardware Configuration Commands -#define DISPLAY_START_LINE 0x40 -#define SEGMENT_REMAP 0xA0 -#define SEGMENT_REMAP_INV 0xA1 -#define MULTIPLEX_RATIO 0xA8 -#define COM_SCAN_INC 0xC0 -#define COM_SCAN_DEC 0xC8 -#define DISPLAY_OFFSET 0xD3 -#define COM_PINS 0xDA -#define COM_PINS_SEQ 0x02 -#define COM_PINS_ALT 0x12 -#define COM_PINS_SEQ_LR 0x22 -#define COM_PINS_ALT_LR 0x32 - -// Timing & Driving Commands -#define DISPLAY_CLOCK 0xD5 -#define PRE_CHARGE_PERIOD 0xD9 -#define VCOM_DETECT 0xDB - -// Advance Graphic Commands -#define FADE_BLINK 0x23 -#define ENABLE_FADE 0x20 -#define ENABLE_BLINK 0x30 - -// Charge Pump Commands -#define CHARGE_PUMP 0x8D - -// Misc defines -#ifndef OLED_BLOCK_COUNT -# define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) -#endif -#ifndef OLED_BLOCK_SIZE -# define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) -#endif - -#define OLED_ALL_BLOCKS_MASK (((((OLED_BLOCK_TYPE)1 << (OLED_BLOCK_COUNT - 1)) - 1) << 1) | 1) - -// i2c defines -#define I2C_CMD 0x00 -#define I2C_DATA 0x40 -#if defined(__AVR__) -# define I2C_TRANSMIT_P(data) i2c_transmit_P((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT) -#else // defined(__AVR__) -# define I2C_TRANSMIT_P(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT) -#endif // defined(__AVR__) -#define I2C_TRANSMIT(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT) -#define I2C_WRITE_REG(mode, data, size) i2c_writeReg((OLED_DISPLAY_ADDRESS << 1), mode, data, size, OLED_I2C_TIMEOUT) - -#define HAS_FLAGS(bits, flags) ((bits & flags) == flags) - -// Display buffer's is the same as the OLED memory layout -// this is so we don't end up with rounding errors with -// parts of the display unusable or don't get cleared correctly -// and also allows for drawing & inverting -uint8_t oled_buffer[OLED_MATRIX_SIZE]; -uint8_t * oled_cursor; -OLED_BLOCK_TYPE oled_dirty = 0; -bool oled_initialized = false; -bool oled_active = false; -bool oled_scrolling = false; -uint8_t oled_brightness = OLED_BRIGHTNESS; -oled_rotation_t oled_rotation = 0; -uint8_t oled_rotation_width = 0; -uint8_t oled_scroll_speed = 0; // this holds the speed after being remapped to ssd1306 internal values -uint8_t oled_scroll_start = 0; -uint8_t oled_scroll_end = 7; -#if OLED_TIMEOUT > 0 -uint32_t oled_timeout; -#endif -#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 - -#if defined(__AVR__) -// identical to i2c_transmit, but for PROGMEM since all initialization is in PROGMEM arrays currently -// probably should move this into i2c_master... -static i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t *data, uint16_t length, uint16_t timeout) { - i2c_status_t status = i2c_start(address | I2C_WRITE, timeout); - - for (uint16_t i = 0; i < length && status >= 0; i++) { - status = i2c_write(pgm_read_byte((const char *)data++), timeout); - if (status) break; - } - - i2c_stop(); - - return status; -} -#endif - -// Flips the rendering bits for a character at the current cursor position -static void InvertCharacter(uint8_t *cursor) { - const uint8_t *end = cursor + OLED_FONT_WIDTH; - while (cursor < end) { - *cursor = ~(*cursor); - cursor++; - } -} - -bool oled_init(oled_rotation_t rotation) { -#if defined(USE_I2C) && defined(SPLIT_KEYBOARD) - if (!is_keyboard_master()) { - return true; - } -#endif - - oled_rotation = oled_init_user(rotation); - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - oled_rotation_width = OLED_DISPLAY_WIDTH; - } else { - oled_rotation_width = OLED_DISPLAY_HEIGHT; - } - i2c_init(); - - static const uint8_t PROGMEM display_setup1[] = { - I2C_CMD, - DISPLAY_OFF, - DISPLAY_CLOCK, - 0x80, - MULTIPLEX_RATIO, - OLED_DISPLAY_HEIGHT - 1, - DISPLAY_OFFSET, - 0x00, - DISPLAY_START_LINE | 0x00, - CHARGE_PUMP, - 0x14, -#if (OLED_IC != OLED_IC_SH1106) - // MEMORY_MODE is unsupported on SH1106 (Page Addressing only) - MEMORY_MODE, - 0x00, // Horizontal addressing mode -#endif - }; - if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) { - print("oled_init cmd set 1 failed\n"); - return false; - } - - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_180)) { - static const uint8_t PROGMEM display_normal[] = {I2C_CMD, SEGMENT_REMAP_INV, COM_SCAN_DEC}; - if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) { - print("oled_init cmd normal rotation failed\n"); - return false; - } - } else { - static const uint8_t PROGMEM display_flipped[] = {I2C_CMD, SEGMENT_REMAP, COM_SCAN_INC}; - if (I2C_TRANSMIT_P(display_flipped) != I2C_STATUS_SUCCESS) { - print("display_flipped failed\n"); - return false; - } - } - - static const uint8_t PROGMEM display_setup2[] = {I2C_CMD, COM_PINS, OLED_COM_PINS, CONTRAST, OLED_BRIGHTNESS, PRE_CHARGE_PERIOD, 0xF1, VCOM_DETECT, 0x20, DISPLAY_ALL_ON_RESUME, NORMAL_DISPLAY, DEACTIVATE_SCROLL, DISPLAY_ON}; - if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) { - print("display_setup2 failed\n"); - return false; - } - -#if OLED_TIMEOUT > 0 - oled_timeout = timer_read32() + OLED_TIMEOUT; -#endif -#if OLED_SCROLL_TIMEOUT > 0 - oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT; -#endif - - oled_clear(); - oled_initialized = true; - oled_active = true; - oled_scrolling = false; - return true; -} - -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } - -void oled_clear(void) { - memset(oled_buffer, 0, sizeof(oled_buffer)); - oled_cursor = &oled_buffer[0]; - oled_dirty = OLED_ALL_BLOCKS_MASK; -} - -static void calc_bounds(uint8_t update_start, uint8_t *cmd_array) { - // Calculate commands to set memory addressing bounds. - uint8_t start_page = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH; - uint8_t start_column = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH; -#if (OLED_IC == OLED_IC_SH1106) - // Commands for Page Addressing Mode. Sets starting page and column; has no end bound. - // Column value must be split into high and low nybble and sent as two commands. - cmd_array[0] = PAM_PAGE_ADDR | start_page; - cmd_array[1] = PAM_SETCOLUMN_LSB | ((OLED_COLUMN_OFFSET + start_column) & 0x0f); - cmd_array[2] = PAM_SETCOLUMN_MSB | ((OLED_COLUMN_OFFSET + start_column) >> 4 & 0x0f); - cmd_array[3] = NOP; - cmd_array[4] = NOP; - cmd_array[5] = NOP; -#else - // Commands for use in Horizontal Addressing mode. - cmd_array[1] = start_column; - cmd_array[4] = start_page; - cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) % OLED_DISPLAY_WIDTH + cmd_array[1]; - cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) / OLED_DISPLAY_WIDTH - 1; -#endif -} - -static void calc_bounds_90(uint8_t update_start, uint8_t *cmd_array) { - cmd_array[1] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_HEIGHT * 8; - cmd_array[4] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_HEIGHT; - cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8 - 1 + cmd_array[1]; - ; - cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) % OLED_DISPLAY_HEIGHT / 8; -} - -uint8_t crot(uint8_t a, int8_t n) { - const uint8_t mask = 0x7; - n &= mask; - return a << n | a >> (-n & mask); -} - -static void rotate_90(const uint8_t *src, uint8_t *dest) { - for (uint8_t i = 0, shift = 7; i < 8; ++i, --shift) { - uint8_t selector = (1 << i); - for (uint8_t j = 0; j < 8; ++j) { - dest[i] |= crot(src[j] & selector, shift - (int8_t)j); - } - } -} - -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) { - return; - } - - // Find first dirty block - uint8_t update_start = 0; - while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) { - ++update_start; - } - - // Set column & page position - static uint8_t display_start[] = {I2C_CMD, COLUMN_ADDR, 0, OLED_DISPLAY_WIDTH - 1, PAGE_ADDR, 0, OLED_DISPLAY_HEIGHT / 8 - 1}; - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - calc_bounds(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start - } else { - calc_bounds_90(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start - } - - // Send column & page position - if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) { - print("oled_render offset command failed\n"); - return; - } - - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - // Send render data chunk as is - if (I2C_WRITE_REG(I2C_DATA, &oled_buffer[OLED_BLOCK_SIZE * update_start], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) { - print("oled_render data failed\n"); - return; - } - } else { - // Rotate the render chunks - const static uint8_t source_map[] = OLED_SOURCE_MAP; - const static uint8_t target_map[] = OLED_TARGET_MAP; - - static uint8_t temp_buffer[OLED_BLOCK_SIZE]; - memset(temp_buffer, 0, sizeof(temp_buffer)); - for (uint8_t i = 0; i < sizeof(source_map); ++i) { - rotate_90(&oled_buffer[OLED_BLOCK_SIZE * update_start + source_map[i]], &temp_buffer[target_map[i]]); - } - - // Send render data chunk after rotating - if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[0], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) { - print("oled_render90 data failed\n"); - return; - } - } - - // Turn on display if it is off - oled_on(); - - // Clear dirty flag - oled_dirty &= ~((OLED_BLOCK_TYPE)1 << update_start); -} - -void oled_set_cursor(uint8_t col, uint8_t line) { - uint16_t index = line * oled_rotation_width + col * OLED_FONT_WIDTH; - - // Out of bounds? - if (index >= OLED_MATRIX_SIZE) { - index = 0; - } - - oled_cursor = &oled_buffer[index]; -} - -void oled_advance_page(bool clearPageRemainder) { - uint16_t index = oled_cursor - &oled_buffer[0]; - uint8_t remaining = oled_rotation_width - (index % oled_rotation_width); - - if (clearPageRemainder) { - // Remaining Char count - remaining = remaining / OLED_FONT_WIDTH; - - // Write empty character until next line - while (remaining--) oled_write_char(' ', false); - } else { - // Next page index out of bounds? - if (index + remaining >= OLED_MATRIX_SIZE) { - index = 0; - remaining = 0; - } - - oled_cursor = &oled_buffer[index + remaining]; - } -} - -void oled_advance_char(void) { - uint16_t nextIndex = oled_cursor - &oled_buffer[0] + OLED_FONT_WIDTH; - uint8_t remainingSpace = oled_rotation_width - (nextIndex % oled_rotation_width); - - // Do we have enough space on the current line for the next character - if (remainingSpace < OLED_FONT_WIDTH) { - nextIndex += remainingSpace; - } - - // Did we go out of bounds - if (nextIndex >= OLED_MATRIX_SIZE) { - nextIndex = 0; - } - - // Update cursor position - oled_cursor = &oled_buffer[nextIndex]; -} - -// Main handler that writes character data to the display buffer -void oled_write_char(const char data, bool invert) { - // Advance to the next line if newline - if (data == '\n') { - // Old source wrote ' ' until end of line... - oled_advance_page(true); - return; - } - - if (data == '\r') { - oled_advance_page(false); - return; - } - - // copy the current render buffer to check for dirty after - static uint8_t oled_temp_buffer[OLED_FONT_WIDTH]; - memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH); - - _Static_assert(sizeof(font) >= ((OLED_FONT_END + 1 - OLED_FONT_START) * OLED_FONT_WIDTH), "OLED_FONT_END references outside array"); - - // set the reder buffer data - uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index - if (cast_data < OLED_FONT_START || cast_data > OLED_FONT_END) { - memset(oled_cursor, 0x00, OLED_FONT_WIDTH); - } else { - const uint8_t *glyph = &font[(cast_data - OLED_FONT_START) * OLED_FONT_WIDTH]; - memcpy_P(oled_cursor, glyph, OLED_FONT_WIDTH); - } - - // Invert if needed - if (invert) { - InvertCharacter(oled_cursor); - } - - // Dirty check - if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) { - uint16_t index = oled_cursor - &oled_buffer[0]; - oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); - // Edgecase check if the written data spans the 2 chunks - oled_dirty |= ((OLED_BLOCK_TYPE)1 << ((index + OLED_FONT_WIDTH - 1) / OLED_BLOCK_SIZE)); - } - - // Finally move to the next char - oled_advance_char(); -} - -void oled_write(const char *data, bool invert) { - const char *end = data + strlen(data); - while (data < end) { - oled_write_char(*data, invert); - data++; - } -} - -void oled_write_ln(const char *data, bool invert) { - oled_write(data, invert); - oled_advance_page(true); -} - -void oled_pan(bool left) { - uint16_t i = 0; - for (uint16_t y = 0; y < OLED_DISPLAY_HEIGHT / 8; y++) { - if (left) { - for (uint16_t x = 0; x < OLED_DISPLAY_WIDTH - 1; x++) { - i = y * OLED_DISPLAY_WIDTH + x; - oled_buffer[i] = oled_buffer[i + 1]; - } - } else { - for (uint16_t x = OLED_DISPLAY_WIDTH - 1; x > 0; x--) { - i = y * OLED_DISPLAY_WIDTH + x; - oled_buffer[i] = oled_buffer[i - 1]; - } - } - } - oled_dirty = OLED_ALL_BLOCKS_MASK; -} - -oled_buffer_reader_t oled_read_raw(uint16_t start_index) { - if (start_index > OLED_MATRIX_SIZE) start_index = OLED_MATRIX_SIZE; - oled_buffer_reader_t ret_reader; - ret_reader.current_element = &oled_buffer[start_index]; - ret_reader.remaining_element_count = OLED_MATRIX_SIZE - start_index; - return ret_reader; -} - -void oled_write_raw_byte(const char data, uint16_t index) { - if (index > OLED_MATRIX_SIZE) index = OLED_MATRIX_SIZE; - if (oled_buffer[index] == data) return; - oled_buffer[index] = data; - oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); -} - -void oled_write_raw(const char *data, uint16_t size) { - 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 = *data++; - if (oled_buffer[i] == c) continue; - oled_buffer[i] = c; - oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); - } -} - -void oled_write_pixel(uint8_t x, uint8_t y, bool on) { - if (x >= oled_rotation_width) { - return; - } - uint16_t index = x + (y / 8) * oled_rotation_width; - if (index >= OLED_MATRIX_SIZE) { - return; - } - uint8_t data = oled_buffer[index]; - if (on) { - data |= (1 << (y % 8)); - } else { - data &= ~(1 << (y % 8)); - } - if (oled_buffer[index] != data) { - oled_buffer[index] = data; - oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); - } -} - -#if defined(__AVR__) -void oled_write_P(const char *data, bool invert) { - uint8_t c = pgm_read_byte(data); - while (c != 0) { - oled_write_char(c, invert); - c = pgm_read_byte(++data); - } -} - -void oled_write_ln_P(const char *data, bool invert) { - oled_write_P(data, invert); - oled_advance_page(true); -} - -void oled_write_raw_P(const char *data, uint16_t size) { - 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; - oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_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 - - static const uint8_t PROGMEM display_on[] = -#ifdef OLED_FADE_OUT - {I2C_CMD, FADE_BLINK, 0x00}; -#else - {I2C_CMD, DISPLAY_ON}; -#endif - - if (!oled_active) { - if (I2C_TRANSMIT_P(display_on) != I2C_STATUS_SUCCESS) { - print("oled_on cmd failed\n"); - return oled_active; - } - oled_active = true; - } - return oled_active; -} - -bool oled_off(void) { - if (!oled_initialized) { - return !oled_active; - } - - static const uint8_t PROGMEM display_off[] = -#ifdef OLED_FADE_OUT - {I2C_CMD, FADE_BLINK, ENABLE_FADE | OLED_FADE_OUT_INTERVAL}; -#else - {I2C_CMD, DISPLAY_OFF}; -#endif - - if (oled_active) { - if (I2C_TRANSMIT_P(display_off) != I2C_STATUS_SUCCESS) { - print("oled_off cmd failed\n"); - return oled_active; - } - oled_active = false; - } - return !oled_active; -} - -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) { - print("set_brightness cmd failed\n"); - return oled_brightness; - } - oled_brightness = level; - } - return oled_brightness; -} - -uint8_t oled_get_brightness(void) { return oled_brightness; } - -// Set the specific 8 lines rows of the screen to scroll. -// 0 is the default for start, and 7 for end, which is the entire -// height of the screen. For 128x32 screens, rows 4-7 are not used. -void oled_scroll_set_area(uint8_t start_line, uint8_t end_line) { - oled_scroll_start = start_line; - oled_scroll_end = end_line; -} - -void oled_scroll_set_speed(uint8_t speed) { - // Sets the speed for scrolling... does not take effect - // until scrolling is either started or restarted - // the ssd1306 supports 8 speeds - // FrameRate2 speed = 7 - // FrameRate3 speed = 4 - // FrameRate4 speed = 5 - // FrameRate5 speed = 0 - // FrameRate25 speed = 6 - // FrameRate64 speed = 1 - // FrameRate128 speed = 2 - // FrameRate256 speed = 3 - // for ease of use these are remaped here to be in order - static const uint8_t scroll_remap[8] = {7, 4, 5, 0, 6, 1, 2, 3}; - oled_scroll_speed = scroll_remap[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) { - uint8_t display_scroll_right[] = {I2C_CMD, SCROLL_RIGHT, 0x00, oled_scroll_start, oled_scroll_speed, oled_scroll_end, 0x00, 0xFF, ACTIVATE_SCROLL}; - if (I2C_TRANSMIT(display_scroll_right) != I2C_STATUS_SUCCESS) { - print("oled_scroll_right cmd failed\n"); - return oled_scrolling; - } - oled_scrolling = true; - } - return oled_scrolling; -} - -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) { - uint8_t display_scroll_left[] = {I2C_CMD, SCROLL_LEFT, 0x00, oled_scroll_start, oled_scroll_speed, oled_scroll_end, 0x00, 0xFF, ACTIVATE_SCROLL}; - if (I2C_TRANSMIT(display_scroll_left) != I2C_STATUS_SUCCESS) { - print("oled_scroll_left cmd failed\n"); - return oled_scrolling; - } - oled_scrolling = true; - } - return oled_scrolling; -} - -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) { - print("oled_scroll_off cmd failed\n"); - return oled_scrolling; - } - oled_scrolling = false; - oled_dirty = OLED_ALL_BLOCKS_MASK; - } - return !oled_scrolling; -} - -uint8_t oled_max_chars(void) { - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - return OLED_DISPLAY_WIDTH / OLED_FONT_WIDTH; - } - return OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH; -} - -uint8_t oled_max_lines(void) { - if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { - return OLED_DISPLAY_HEIGHT / OLED_FONT_HEIGHT; - } - return OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT; -} - -void oled_task(void) { - if (!oled_initialized) { - 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) { - oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT; - oled_scroll_off(); - } -#endif - - // Smart render system, no need to check for dirty - oled_render(); - - // Display timeout check -#if OLED_TIMEOUT > 0 - if (oled_active && timer_expired32(timer_read32(), oled_timeout)) { - oled_off(); - } -#endif - -#if OLED_SCROLL_TIMEOUT > 0 - if (!oled_scrolling && timer_expired32(timer_read32(), oled_scroll_timeout)) { -# ifdef OLED_SCROLL_TIMEOUT_RIGHT - oled_scroll_right(); -# else - oled_scroll_left(); -# endif - } -#endif -} - -__attribute__((weak)) void oled_task_user(void) {} diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index a6b85f37e..fc68f0ec9 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -313,6 +313,10 @@ bool oled_scroll_left(void); // Returns true if the screen was not scrolling or stops scrolling bool oled_scroll_off(void); +// Inverts the display +// Returns true if the screen was or is inverted +bool oled_invert(bool invert); + // Returns the maximum number of characters that will fit on a line uint8_t oled_max_chars(void); diff --git a/drivers/oled/ssd1306_sh1106.c b/drivers/oled/ssd1306_sh1106.c new file mode 100644 index 000000000..7d4197890 --- /dev/null +++ b/drivers/oled/ssd1306_sh1106.c @@ -0,0 +1,777 @@ +/* +Copyright 2019 Ryan Caltabiano + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "i2c_master.h" +#include "oled_driver.h" +#include OLED_FONT_H +#include "timer.h" +#include "print.h" + +#include + +#include "progmem.h" + +#include "keyboard.h" + +// Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf +// for SH1106: https://www.velleman.eu/downloads/29/infosheets/sh1106_datasheet.pdf + +// Fundamental Commands +#define CONTRAST 0x81 +#define DISPLAY_ALL_ON 0xA5 +#define DISPLAY_ALL_ON_RESUME 0xA4 +#define NORMAL_DISPLAY 0xA6 +#define INVERT_DISPLAY 0xA7 +#define DISPLAY_ON 0xAF +#define DISPLAY_OFF 0xAE +#define NOP 0xE3 + +// Scrolling Commands +#define ACTIVATE_SCROLL 0x2F +#define DEACTIVATE_SCROLL 0x2E +#define SCROLL_RIGHT 0x26 +#define SCROLL_LEFT 0x27 +#define SCROLL_RIGHT_UP 0x29 +#define SCROLL_LEFT_UP 0x2A + +// Addressing Setting Commands +#define MEMORY_MODE 0x20 +#define COLUMN_ADDR 0x21 +#define PAGE_ADDR 0x22 +#define PAM_SETCOLUMN_LSB 0x00 +#define PAM_SETCOLUMN_MSB 0x10 +#define PAM_PAGE_ADDR 0xB0 // 0xb0 -- 0xb7 + +// Hardware Configuration Commands +#define DISPLAY_START_LINE 0x40 +#define SEGMENT_REMAP 0xA0 +#define SEGMENT_REMAP_INV 0xA1 +#define MULTIPLEX_RATIO 0xA8 +#define COM_SCAN_INC 0xC0 +#define COM_SCAN_DEC 0xC8 +#define DISPLAY_OFFSET 0xD3 +#define COM_PINS 0xDA +#define COM_PINS_SEQ 0x02 +#define COM_PINS_ALT 0x12 +#define COM_PINS_SEQ_LR 0x22 +#define COM_PINS_ALT_LR 0x32 + +// Timing & Driving Commands +#define DISPLAY_CLOCK 0xD5 +#define PRE_CHARGE_PERIOD 0xD9 +#define VCOM_DETECT 0xDB + +// Advance Graphic Commands +#define FADE_BLINK 0x23 +#define ENABLE_FADE 0x20 +#define ENABLE_BLINK 0x30 + +// Charge Pump Commands +#define CHARGE_PUMP 0x8D + +// Misc defines +#ifndef OLED_BLOCK_COUNT +# define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) +#endif +#ifndef OLED_BLOCK_SIZE +# define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) +#endif + +#define OLED_ALL_BLOCKS_MASK (((((OLED_BLOCK_TYPE)1 << (OLED_BLOCK_COUNT - 1)) - 1) << 1) | 1) + +// i2c defines +#define I2C_CMD 0x00 +#define I2C_DATA 0x40 +#if defined(__AVR__) +# define I2C_TRANSMIT_P(data) i2c_transmit_P((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT) +#else // defined(__AVR__) +# define I2C_TRANSMIT_P(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT) +#endif // defined(__AVR__) +#define I2C_TRANSMIT(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), OLED_I2C_TIMEOUT) +#define I2C_WRITE_REG(mode, data, size) i2c_writeReg((OLED_DISPLAY_ADDRESS << 1), mode, data, size, OLED_I2C_TIMEOUT) + +#define HAS_FLAGS(bits, flags) ((bits & flags) == flags) + +// Display buffer's is the same as the OLED memory layout +// this is so we don't end up with rounding errors with +// parts of the display unusable or don't get cleared correctly +// and also allows for drawing & inverting +uint8_t oled_buffer[OLED_MATRIX_SIZE]; +uint8_t * oled_cursor; +OLED_BLOCK_TYPE oled_dirty = 0; +bool oled_initialized = false; +bool oled_active = false; +bool oled_scrolling = false; +bool oled_inverted = false; +uint8_t oled_brightness = OLED_BRIGHTNESS; +oled_rotation_t oled_rotation = 0; +uint8_t oled_rotation_width = 0; +uint8_t oled_scroll_speed = 0; // this holds the speed after being remapped to ssd1306 internal values +uint8_t oled_scroll_start = 0; +uint8_t oled_scroll_end = 7; +#if OLED_TIMEOUT > 0 +uint32_t oled_timeout; +#endif +#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 + +#if defined(__AVR__) +// identical to i2c_transmit, but for PROGMEM since all initialization is in PROGMEM arrays currently +// probably should move this into i2c_master... +static i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t *data, uint16_t length, uint16_t timeout) { + i2c_status_t status = i2c_start(address | I2C_WRITE, timeout); + + for (uint16_t i = 0; i < length && status >= 0; i++) { + status = i2c_write(pgm_read_byte((const char *)data++), timeout); + if (status) break; + } + + i2c_stop(); + + return status; +} +#endif + +// Flips the rendering bits for a character at the current cursor position +static void InvertCharacter(uint8_t *cursor) { + const uint8_t *end = cursor + OLED_FONT_WIDTH; + while (cursor < end) { + *cursor = ~(*cursor); + cursor++; + } +} + +bool oled_init(oled_rotation_t rotation) { +#if defined(USE_I2C) && defined(SPLIT_KEYBOARD) + if (!is_keyboard_master()) { + return true; + } +#endif + + oled_rotation = oled_init_user(rotation); + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + oled_rotation_width = OLED_DISPLAY_WIDTH; + } else { + oled_rotation_width = OLED_DISPLAY_HEIGHT; + } + i2c_init(); + + static const uint8_t PROGMEM display_setup1[] = { + I2C_CMD, + DISPLAY_OFF, + DISPLAY_CLOCK, + 0x80, + MULTIPLEX_RATIO, + OLED_DISPLAY_HEIGHT - 1, + DISPLAY_OFFSET, + 0x00, + DISPLAY_START_LINE | 0x00, + CHARGE_PUMP, + 0x14, +#if (OLED_IC != OLED_IC_SH1106) + // MEMORY_MODE is unsupported on SH1106 (Page Addressing only) + MEMORY_MODE, + 0x00, // Horizontal addressing mode +#endif + }; + if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) { + print("oled_init cmd set 1 failed\n"); + return false; + } + + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_180)) { + static const uint8_t PROGMEM display_normal[] = {I2C_CMD, SEGMENT_REMAP_INV, COM_SCAN_DEC}; + if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) { + print("oled_init cmd normal rotation failed\n"); + return false; + } + } else { + static const uint8_t PROGMEM display_flipped[] = {I2C_CMD, SEGMENT_REMAP, COM_SCAN_INC}; + if (I2C_TRANSMIT_P(display_flipped) != I2C_STATUS_SUCCESS) { + print("display_flipped failed\n"); + return false; + } + } + + static const uint8_t PROGMEM display_setup2[] = {I2C_CMD, COM_PINS, OLED_COM_PINS, CONTRAST, OLED_BRIGHTNESS, PRE_CHARGE_PERIOD, 0xF1, VCOM_DETECT, 0x20, DISPLAY_ALL_ON_RESUME, NORMAL_DISPLAY, DEACTIVATE_SCROLL, DISPLAY_ON}; + if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) { + print("display_setup2 failed\n"); + return false; + } + +#if OLED_TIMEOUT > 0 + oled_timeout = timer_read32() + OLED_TIMEOUT; +#endif +#if OLED_SCROLL_TIMEOUT > 0 + oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT; +#endif + + oled_clear(); + oled_initialized = true; + oled_active = true; + oled_scrolling = false; + return true; +} + +__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } + +void oled_clear(void) { + memset(oled_buffer, 0, sizeof(oled_buffer)); + oled_cursor = &oled_buffer[0]; + oled_dirty = OLED_ALL_BLOCKS_MASK; +} + +static void calc_bounds(uint8_t update_start, uint8_t *cmd_array) { + // Calculate commands to set memory addressing bounds. + uint8_t start_page = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH; + uint8_t start_column = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH; +#if (OLED_IC == OLED_IC_SH1106) + // Commands for Page Addressing Mode. Sets starting page and column; has no end bound. + // Column value must be split into high and low nybble and sent as two commands. + cmd_array[0] = PAM_PAGE_ADDR | start_page; + cmd_array[1] = PAM_SETCOLUMN_LSB | ((OLED_COLUMN_OFFSET + start_column) & 0x0f); + cmd_array[2] = PAM_SETCOLUMN_MSB | ((OLED_COLUMN_OFFSET + start_column) >> 4 & 0x0f); + cmd_array[3] = NOP; + cmd_array[4] = NOP; + cmd_array[5] = NOP; +#else + // Commands for use in Horizontal Addressing mode. + cmd_array[1] = start_column; + cmd_array[4] = start_page; + cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) % OLED_DISPLAY_WIDTH + cmd_array[1]; + cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) / OLED_DISPLAY_WIDTH - 1; +#endif +} + +static void calc_bounds_90(uint8_t update_start, uint8_t *cmd_array) { + cmd_array[1] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_HEIGHT * 8; + cmd_array[4] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_HEIGHT; + cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8 - 1 + cmd_array[1]; + ; + cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) % OLED_DISPLAY_HEIGHT / 8; +} + +uint8_t crot(uint8_t a, int8_t n) { + const uint8_t mask = 0x7; + n &= mask; + return a << n | a >> (-n & mask); +} + +static void rotate_90(const uint8_t *src, uint8_t *dest) { + for (uint8_t i = 0, shift = 7; i < 8; ++i, --shift) { + uint8_t selector = (1 << i); + for (uint8_t j = 0; j < 8; ++j) { + dest[i] |= crot(src[j] & selector, shift - (int8_t)j); + } + } +} + +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) { + return; + } + + // Find first dirty block + uint8_t update_start = 0; + while (!(oled_dirty & ((OLED_BLOCK_TYPE)1 << update_start))) { + ++update_start; + } + + // Set column & page position + static uint8_t display_start[] = {I2C_CMD, COLUMN_ADDR, 0, OLED_DISPLAY_WIDTH - 1, PAGE_ADDR, 0, OLED_DISPLAY_HEIGHT / 8 - 1}; + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + calc_bounds(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start + } else { + calc_bounds_90(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start + } + + // Send column & page position + if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) { + print("oled_render offset command failed\n"); + return; + } + + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + // Send render data chunk as is + if (I2C_WRITE_REG(I2C_DATA, &oled_buffer[OLED_BLOCK_SIZE * update_start], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) { + print("oled_render data failed\n"); + return; + } + } else { + // Rotate the render chunks + const static uint8_t source_map[] = OLED_SOURCE_MAP; + const static uint8_t target_map[] = OLED_TARGET_MAP; + + static uint8_t temp_buffer[OLED_BLOCK_SIZE]; + memset(temp_buffer, 0, sizeof(temp_buffer)); + for (uint8_t i = 0; i < sizeof(source_map); ++i) { + rotate_90(&oled_buffer[OLED_BLOCK_SIZE * update_start + source_map[i]], &temp_buffer[target_map[i]]); + } + + // Send render data chunk after rotating + if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[0], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) { + print("oled_render90 data failed\n"); + return; + } + } + + // Turn on display if it is off + oled_on(); + + // Clear dirty flag + oled_dirty &= ~((OLED_BLOCK_TYPE)1 << update_start); +} + +void oled_set_cursor(uint8_t col, uint8_t line) { + uint16_t index = line * oled_rotation_width + col * OLED_FONT_WIDTH; + + // Out of bounds? + if (index >= OLED_MATRIX_SIZE) { + index = 0; + } + + oled_cursor = &oled_buffer[index]; +} + +void oled_advance_page(bool clearPageRemainder) { + uint16_t index = oled_cursor - &oled_buffer[0]; + uint8_t remaining = oled_rotation_width - (index % oled_rotation_width); + + if (clearPageRemainder) { + // Remaining Char count + remaining = remaining / OLED_FONT_WIDTH; + + // Write empty character until next line + while (remaining--) oled_write_char(' ', false); + } else { + // Next page index out of bounds? + if (index + remaining >= OLED_MATRIX_SIZE) { + index = 0; + remaining = 0; + } + + oled_cursor = &oled_buffer[index + remaining]; + } +} + +void oled_advance_char(void) { + uint16_t nextIndex = oled_cursor - &oled_buffer[0] + OLED_FONT_WIDTH; + uint8_t remainingSpace = oled_rotation_width - (nextIndex % oled_rotation_width); + + // Do we have enough space on the current line for the next character + if (remainingSpace < OLED_FONT_WIDTH) { + nextIndex += remainingSpace; + } + + // Did we go out of bounds + if (nextIndex >= OLED_MATRIX_SIZE) { + nextIndex = 0; + } + + // Update cursor position + oled_cursor = &oled_buffer[nextIndex]; +} + +// Main handler that writes character data to the display buffer +void oled_write_char(const char data, bool invert) { + // Advance to the next line if newline + if (data == '\n') { + // Old source wrote ' ' until end of line... + oled_advance_page(true); + return; + } + + if (data == '\r') { + oled_advance_page(false); + return; + } + + // copy the current render buffer to check for dirty after + static uint8_t oled_temp_buffer[OLED_FONT_WIDTH]; + memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH); + + _Static_assert(sizeof(font) >= ((OLED_FONT_END + 1 - OLED_FONT_START) * OLED_FONT_WIDTH), "OLED_FONT_END references outside array"); + + // set the reder buffer data + uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index + if (cast_data < OLED_FONT_START || cast_data > OLED_FONT_END) { + memset(oled_cursor, 0x00, OLED_FONT_WIDTH); + } else { + const uint8_t *glyph = &font[(cast_data - OLED_FONT_START) * OLED_FONT_WIDTH]; + memcpy_P(oled_cursor, glyph, OLED_FONT_WIDTH); + } + + // Invert if needed + if (invert) { + InvertCharacter(oled_cursor); + } + + // Dirty check + if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) { + uint16_t index = oled_cursor - &oled_buffer[0]; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); + // Edgecase check if the written data spans the 2 chunks + oled_dirty |= ((OLED_BLOCK_TYPE)1 << ((index + OLED_FONT_WIDTH - 1) / OLED_BLOCK_SIZE)); + } + + // Finally move to the next char + oled_advance_char(); +} + +void oled_write(const char *data, bool invert) { + const char *end = data + strlen(data); + while (data < end) { + oled_write_char(*data, invert); + data++; + } +} + +void oled_write_ln(const char *data, bool invert) { + oled_write(data, invert); + oled_advance_page(true); +} + +void oled_pan(bool left) { + uint16_t i = 0; + for (uint16_t y = 0; y < OLED_DISPLAY_HEIGHT / 8; y++) { + if (left) { + for (uint16_t x = 0; x < OLED_DISPLAY_WIDTH - 1; x++) { + i = y * OLED_DISPLAY_WIDTH + x; + oled_buffer[i] = oled_buffer[i + 1]; + } + } else { + for (uint16_t x = OLED_DISPLAY_WIDTH - 1; x > 0; x--) { + i = y * OLED_DISPLAY_WIDTH + x; + oled_buffer[i] = oled_buffer[i - 1]; + } + } + } + oled_dirty = OLED_ALL_BLOCKS_MASK; +} + +oled_buffer_reader_t oled_read_raw(uint16_t start_index) { + if (start_index > OLED_MATRIX_SIZE) start_index = OLED_MATRIX_SIZE; + oled_buffer_reader_t ret_reader; + ret_reader.current_element = &oled_buffer[start_index]; + ret_reader.remaining_element_count = OLED_MATRIX_SIZE - start_index; + return ret_reader; +} + +void oled_write_raw_byte(const char data, uint16_t index) { + if (index > OLED_MATRIX_SIZE) index = OLED_MATRIX_SIZE; + if (oled_buffer[index] == data) return; + oled_buffer[index] = data; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); +} + +void oled_write_raw(const char *data, uint16_t size) { + 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 = *data++; + if (oled_buffer[i] == c) continue; + oled_buffer[i] = c; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE)); + } +} + +void oled_write_pixel(uint8_t x, uint8_t y, bool on) { + if (x >= oled_rotation_width) { + return; + } + uint16_t index = x + (y / 8) * oled_rotation_width; + if (index >= OLED_MATRIX_SIZE) { + return; + } + uint8_t data = oled_buffer[index]; + if (on) { + data |= (1 << (y % 8)); + } else { + data &= ~(1 << (y % 8)); + } + if (oled_buffer[index] != data) { + oled_buffer[index] = data; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (index / OLED_BLOCK_SIZE)); + } +} + +#if defined(__AVR__) +void oled_write_P(const char *data, bool invert) { + uint8_t c = pgm_read_byte(data); + while (c != 0) { + oled_write_char(c, invert); + c = pgm_read_byte(++data); + } +} + +void oled_write_ln_P(const char *data, bool invert) { + oled_write_P(data, invert); + oled_advance_page(true); +} + +void oled_write_raw_P(const char *data, uint16_t size) { + 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; + oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_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 + + static const uint8_t PROGMEM display_on[] = +#ifdef OLED_FADE_OUT + {I2C_CMD, FADE_BLINK, 0x00}; +#else + {I2C_CMD, DISPLAY_ON}; +#endif + + if (!oled_active) { + if (I2C_TRANSMIT_P(display_on) != I2C_STATUS_SUCCESS) { + print("oled_on cmd failed\n"); + return oled_active; + } + oled_active = true; + } + return oled_active; +} + +bool oled_off(void) { + if (!oled_initialized) { + return !oled_active; + } + + static const uint8_t PROGMEM display_off[] = +#ifdef OLED_FADE_OUT + {I2C_CMD, FADE_BLINK, ENABLE_FADE | OLED_FADE_OUT_INTERVAL}; +#else + {I2C_CMD, DISPLAY_OFF}; +#endif + + if (oled_active) { + if (I2C_TRANSMIT_P(display_off) != I2C_STATUS_SUCCESS) { + print("oled_off cmd failed\n"); + return oled_active; + } + oled_active = false; + } + return !oled_active; +} + +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) { + print("set_brightness cmd failed\n"); + return oled_brightness; + } + oled_brightness = level; + } + return oled_brightness; +} + +uint8_t oled_get_brightness(void) { return oled_brightness; } + +// Set the specific 8 lines rows of the screen to scroll. +// 0 is the default for start, and 7 for end, which is the entire +// height of the screen. For 128x32 screens, rows 4-7 are not used. +void oled_scroll_set_area(uint8_t start_line, uint8_t end_line) { + oled_scroll_start = start_line; + oled_scroll_end = end_line; +} + +void oled_scroll_set_speed(uint8_t speed) { + // Sets the speed for scrolling... does not take effect + // until scrolling is either started or restarted + // the ssd1306 supports 8 speeds + // FrameRate2 speed = 7 + // FrameRate3 speed = 4 + // FrameRate4 speed = 5 + // FrameRate5 speed = 0 + // FrameRate25 speed = 6 + // FrameRate64 speed = 1 + // FrameRate128 speed = 2 + // FrameRate256 speed = 3 + // for ease of use these are remaped here to be in order + static const uint8_t scroll_remap[8] = {7, 4, 5, 0, 6, 1, 2, 3}; + oled_scroll_speed = scroll_remap[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) { + uint8_t display_scroll_right[] = {I2C_CMD, SCROLL_RIGHT, 0x00, oled_scroll_start, oled_scroll_speed, oled_scroll_end, 0x00, 0xFF, ACTIVATE_SCROLL}; + if (I2C_TRANSMIT(display_scroll_right) != I2C_STATUS_SUCCESS) { + print("oled_scroll_right cmd failed\n"); + return oled_scrolling; + } + oled_scrolling = true; + } + return oled_scrolling; +} + +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) { + uint8_t display_scroll_left[] = {I2C_CMD, SCROLL_LEFT, 0x00, oled_scroll_start, oled_scroll_speed, oled_scroll_end, 0x00, 0xFF, ACTIVATE_SCROLL}; + if (I2C_TRANSMIT(display_scroll_left) != I2C_STATUS_SUCCESS) { + print("oled_scroll_left cmd failed\n"); + return oled_scrolling; + } + oled_scrolling = true; + } + return oled_scrolling; +} + +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) { + print("oled_scroll_off cmd failed\n"); + return oled_scrolling; + } + oled_scrolling = false; + oled_dirty = OLED_ALL_BLOCKS_MASK; + } + return !oled_scrolling; +} + +bool oled_invert(bool invert) { + if (!oled_initialized) { + return oled_inverted; + } + + if (invert && !oled_inverted) { + static const uint8_t PROGMEM display_inverted[] = {I2C_CMD, INVERT_DISPLAY}; + if (I2C_TRANSMIT_P(display_inverted) != I2C_STATUS_SUCCESS) { + print("oled_invert cmd failed\n"); + return oled_inverted; + } + oled_inverted = true; + } else if (!invert && oled_inverted) { + static const uint8_t PROGMEM display_normal[] = {I2C_CMD, NORMAL_DISPLAY}; + if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) { + print("oled_invert cmd failed\n"); + return oled_inverted; + } + oled_inverted = false; + } + + return oled_inverted; +} + +uint8_t oled_max_chars(void) { + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + return OLED_DISPLAY_WIDTH / OLED_FONT_WIDTH; + } + return OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH; +} + +uint8_t oled_max_lines(void) { + if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { + return OLED_DISPLAY_HEIGHT / OLED_FONT_HEIGHT; + } + return OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT; +} + +void oled_task(void) { + if (!oled_initialized) { + 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) { + oled_scroll_timeout = timer_read32() + OLED_SCROLL_TIMEOUT; + oled_scroll_off(); + } +#endif + + // Smart render system, no need to check for dirty + oled_render(); + + // Display timeout check +#if OLED_TIMEOUT > 0 + if (oled_active && timer_expired32(timer_read32(), oled_timeout)) { + oled_off(); + } +#endif + +#if OLED_SCROLL_TIMEOUT > 0 + if (!oled_scrolling && timer_expired32(timer_read32(), oled_scroll_timeout)) { +# ifdef OLED_SCROLL_TIMEOUT_RIGHT + oled_scroll_right(); +# else + oled_scroll_left(); +# endif + } +#endif +} + +__attribute__((weak)) void oled_task_user(void) {} diff --git a/drivers/sensors/adns5050.c b/drivers/sensors/adns5050.c new file mode 100644 index 000000000..e7273977d --- /dev/null +++ b/drivers/sensors/adns5050.c @@ -0,0 +1,193 @@ +/* Copyright 2021 Colin Lam (Ploopy Corporation) + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2019 Hiroyuki Okada + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#include "adns5050.h" +#include "wait.h" +#include "debug.h" +#include "print.h" +#include "gpio.h" + +#ifndef OPTIC_ROTATED +# define OPTIC_ROTATED false +#endif + +// Definitions for the ADNS serial line. +#ifndef ADNS_SCLK_PIN +# define ADNS_SCLK_PIN B7 +#endif + +#ifndef ADNS_SDIO_PIN +# define ADNS_SDIO_PIN C6 +#endif + +#ifndef ADNS_CS_PIN +# define ADNS_CS_PIN B4 +#endif + +#ifdef CONSOLE_ENABLE +void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } +#endif + +// Initialize the ADNS serial pins. +void adns_init(void) { + setPinOutput(ADNS_SCLK_PIN); + setPinOutput(ADNS_SDIO_PIN); + setPinOutput(ADNS_CS_PIN); +} + +// Perform a synchronization with the ADNS. +// Just as with the serial protocol, this is used by the slave to send a +// synchronization signal to the master. +void adns_sync(void) { + writePinLow(ADNS_CS_PIN); + wait_us(1); + writePinHigh(ADNS_CS_PIN); +} + +void adns_cs_select(void) { + writePinLow(ADNS_CS_PIN); +} + +void adns_cs_deselect(void) { + writePinHigh(ADNS_CS_PIN); +} + +uint8_t adns_serial_read(void) { + setPinInput(ADNS_SDIO_PIN); + uint8_t byte = 0; + + for (uint8_t i = 0; i < 8; ++i) { + writePinLow(ADNS_SCLK_PIN); + wait_us(1); + + byte = (byte << 1) | readPin(ADNS_SDIO_PIN); + + writePinHigh(ADNS_SCLK_PIN); + wait_us(1); + } + + return byte; +} + +void adns_serial_write(uint8_t data) { + setPinOutput(ADNS_SDIO_PIN); + + for (int8_t b = 7; b >= 0; b--) { + writePinLow(ADNS_SCLK_PIN); + + if (data & (1 << b)) + writePinHigh(ADNS_SDIO_PIN); + else + writePinLow(ADNS_SDIO_PIN); + + wait_us(2); + + writePinHigh(ADNS_SCLK_PIN); + } + + // tSWR. See page 15 of the ADNS spec sheet. + // Technically, this is only necessary if the next operation is an SDIO + // read. This is not guaranteed to be the case, but we're being lazy. + wait_us(4); + + // Note that tSWW is never necessary. All write operations require at + // least 32us, which exceeds tSWW, so there's never a need to wait for it. +} + +// Read a byte of data from a register on the ADNS. +// Don't forget to use the register map (as defined in the header file). +uint8_t adns_read_reg(uint8_t reg_addr) { + adns_cs_select(); + + adns_serial_write(reg_addr); + + // We don't need a minimum tSRAD here. That's because a 4ms wait time is + // already included in adns_serial_write(), so we're good. + // See page 10 and 15 of the ADNS spec sheet. + //wait_us(4); + + uint8_t byte = adns_serial_read(); + + // tSRW & tSRR. See page 15 of the ADNS spec sheet. + // Technically, this is only necessary if the next operation is an SDIO + // read or write. This is not guaranteed to be the case. + // Honestly, this wait could probably be removed. + wait_us(1); + + adns_cs_deselect(); + + return byte; +} + +void adns_write_reg(uint8_t reg_addr, uint8_t data) { + adns_cs_select(); + adns_serial_write( 0b10000000 | reg_addr ); + adns_serial_write(data); + adns_cs_deselect(); +} + +report_adns_t adns_read_burst(void) { + adns_cs_select(); + + report_adns_t data; + data.dx = 0; + data.dy = 0; + + adns_serial_write(REG_MOTION_BURST); + + // We don't need a minimum tSRAD here. That's because a 4ms wait time is + // already included in adns_serial_write(), so we're good. + // See page 10 and 15 of the ADNS spec sheet. + //wait_us(4); + + uint8_t x = adns_serial_read(); + uint8_t y = adns_serial_read(); + + // Burst mode returns a bunch of other shit that we don't really need. + // Setting CS to high ends burst mode early. + adns_cs_deselect(); + + data.dx = convert_twoscomp(x); + data.dy = convert_twoscomp(y); + + return data; +} + +// Convert a two's complement byte from an unsigned data type into a signed +// data type. +int8_t convert_twoscomp(uint8_t data) { + if ((data & 0x80) == 0x80) + return -128 + (data & 0x7F); + else + return data; +} + +// Don't forget to use the definitions for CPI in the header file. +void adns_set_cpi(uint8_t cpi) { + adns_write_reg(REG_MOUSE_CONTROL2, cpi); +} + +bool adns_check_signature(void) { + uint8_t pid = adns_read_reg(REG_PRODUCT_ID); + uint8_t rid = adns_read_reg(REG_REVISION_ID); + uint8_t pid2 = adns_read_reg(REG_PRODUCT_ID2); + + return (pid == 0x12 && rid == 0x01 && pid2 == 0x26); +} diff --git a/keyboards/ploopyco/adns5050.h b/drivers/sensors/adns5050.h similarity index 100% rename from keyboards/ploopyco/adns5050.h rename to drivers/sensors/adns5050.h diff --git a/drivers/sensors/adns9800.c b/drivers/sensors/adns9800.c new file mode 100644 index 000000000..36213179f --- /dev/null +++ b/drivers/sensors/adns9800.c @@ -0,0 +1,219 @@ +/* Copyright 2020 Alexander Tulloh + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "spi_master.h" +#include "quantum.h" +#include "adns9800_srom_A6.h" +#include "adns9800.h" + +// registers +#define REG_Product_ID 0x00 +#define REG_Revision_ID 0x01 +#define REG_Motion 0x02 +#define REG_Delta_X_L 0x03 +#define REG_Delta_X_H 0x04 +#define REG_Delta_Y_L 0x05 +#define REG_Delta_Y_H 0x06 +#define REG_SQUAL 0x07 +#define REG_Pixel_Sum 0x08 +#define REG_Maximum_Pixel 0x09 +#define REG_Minimum_Pixel 0x0a +#define REG_Shutter_Lower 0x0b +#define REG_Shutter_Upper 0x0c +#define REG_Frame_Period_Lower 0x0d +#define REG_Frame_Period_Upper 0x0e +#define REG_Configuration_I 0x0f +#define REG_Configuration_II 0x10 +#define REG_Frame_Capture 0x12 +#define REG_SROM_Enable 0x13 +#define REG_Run_Downshift 0x14 +#define REG_Rest1_Rate 0x15 +#define REG_Rest1_Downshift 0x16 +#define REG_Rest2_Rate 0x17 +#define REG_Rest2_Downshift 0x18 +#define REG_Rest3_Rate 0x19 +#define REG_Frame_Period_Max_Bound_Lower 0x1a +#define REG_Frame_Period_Max_Bound_Upper 0x1b +#define REG_Frame_Period_Min_Bound_Lower 0x1c +#define REG_Frame_Period_Min_Bound_Upper 0x1d +#define REG_Shutter_Max_Bound_Lower 0x1e +#define REG_Shutter_Max_Bound_Upper 0x1f +#define REG_LASER_CTRL0 0x20 +#define REG_Observation 0x24 +#define REG_Data_Out_Lower 0x25 +#define REG_Data_Out_Upper 0x26 +#define REG_SROM_ID 0x2a +#define REG_Lift_Detection_Thr 0x2e +#define REG_Configuration_V 0x2f +#define REG_Configuration_IV 0x39 +#define REG_Power_Up_Reset 0x3a +#define REG_Shutdown 0x3b +#define REG_Inverse_Product_ID 0x3f +#define REG_Motion_Burst 0x50 +#define REG_SROM_Load_Burst 0x62 +#define REG_Pixel_Burst 0x64 + +#define ADNS_CLOCK_SPEED 2000000 +#define MIN_CPI 200 +#define MAX_CPI 8200 +#define CPI_STEP 200 +#define CLAMP_CPI(value) value < MIN_CPI ? MIN_CPI : value > MAX_CPI ? MAX_CPI : value +#define SPI_MODE 3 +#define SPI_DIVISOR (F_CPU / ADNS_CLOCK_SPEED) +#define US_BETWEEN_WRITES 120 +#define US_BETWEEN_READS 20 +#define US_BEFORE_MOTION 100 +#define MSB1 0x80 + +extern const uint16_t adns_firmware_length; +extern const uint8_t adns_firmware_data[]; + +void adns_spi_start(void){ + spi_start(SPI_SS_PIN, false, SPI_MODE, SPI_DIVISOR); +} + +void adns_write(uint8_t reg_addr, uint8_t data){ + + adns_spi_start(); + spi_write(reg_addr | MSB1); + spi_write(data); + spi_stop(); + wait_us(US_BETWEEN_WRITES); +} + +uint8_t adns_read(uint8_t reg_addr){ + + adns_spi_start(); + spi_write(reg_addr & 0x7f ); + uint8_t data = spi_read(); + spi_stop(); + wait_us(US_BETWEEN_READS); + + return data; +} + +void adns_init() { + + setPinOutput(SPI_SS_PIN); + + spi_init(); + + // reboot + adns_write(REG_Power_Up_Reset, 0x5a); + wait_ms(50); + + // read registers and discard + adns_read(REG_Motion); + adns_read(REG_Delta_X_L); + adns_read(REG_Delta_X_H); + adns_read(REG_Delta_Y_L); + adns_read(REG_Delta_Y_H); + + // upload firmware + + // 3k firmware mode + adns_write(REG_Configuration_IV, 0x02); + + // enable initialisation + adns_write(REG_SROM_Enable, 0x1d); + + // wait a frame + wait_ms(10); + + // start SROM download + adns_write(REG_SROM_Enable, 0x18); + + // write the SROM file + + adns_spi_start(); + + spi_write(REG_SROM_Load_Burst | 0x80); + wait_us(15); + + // send all bytes of the firmware + unsigned char c; + for(int i = 0; i < adns_firmware_length; i++){ + c = (unsigned char)pgm_read_byte(adns_firmware_data + i); + spi_write(c); + wait_us(15); + } + + spi_stop(); + + wait_ms(10); + + // enable laser + uint8_t laser_ctrl0 = adns_read(REG_LASER_CTRL0); + adns_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0); +} + +config_adns_t adns_get_config(void) { + uint8_t config_1 = adns_read(REG_Configuration_I); + return (config_adns_t){ (config_1 & 0xFF) * CPI_STEP }; +} + +void adns_set_config(config_adns_t config) { + uint8_t config_1 = (CLAMP_CPI(config.cpi) / CPI_STEP) & 0xFF; + adns_write(REG_Configuration_I, config_1); +} + +static int16_t convertDeltaToInt(uint8_t high, uint8_t low){ + + // join bytes into twos compliment + uint16_t twos_comp = (high << 8) | low; + + // convert twos comp to int + if (twos_comp & 0x8000) + return -1 * (~twos_comp + 1); + + return twos_comp; +} + +report_adns_t adns_get_report(void) { + + report_adns_t report = {0, 0}; + + adns_spi_start(); + + // start burst mode + spi_write(REG_Motion_Burst & 0x7f); + + wait_us(US_BEFORE_MOTION); + + uint8_t motion = spi_read(); + + if(motion & 0x80) { + + // clear observation register + spi_read(); + + // delta registers + uint8_t delta_x_l = spi_read(); + uint8_t delta_x_h = spi_read(); + uint8_t delta_y_l = spi_read(); + uint8_t delta_y_h = spi_read(); + + report.x = convertDeltaToInt(delta_x_h, delta_x_l); + report.y = convertDeltaToInt(delta_y_h, delta_y_l); + } + + // clear residual motion + spi_write(REG_Motion & 0x7f); + + spi_stop(); + + return report; +} diff --git a/keyboards/oddball/adns/adns.h b/drivers/sensors/adns9800.h similarity index 100% rename from keyboards/oddball/adns/adns.h rename to drivers/sensors/adns9800.h diff --git a/keyboards/oddball/adns/adns9800_srom_A6.h b/drivers/sensors/adns9800_srom_A6.h similarity index 100% rename from keyboards/oddball/adns/adns9800_srom_A6.h rename to drivers/sensors/adns9800_srom_A6.h diff --git a/drivers/sensors/pimoroni_trackball.c b/drivers/sensors/pimoroni_trackball.c new file mode 100644 index 000000000..48098ff0c --- /dev/null +++ b/drivers/sensors/pimoroni_trackball.c @@ -0,0 +1,201 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2021 Dasky (@daskygit) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "pimoroni_trackball.h" +#include "i2c_master.h" +#include "print.h" + +#ifndef PIMORONI_TRACKBALL_ADDRESS +# define PIMORONI_TRACKBALL_ADDRESS 0x0A +#endif +#ifndef PIMORONI_TRACKBALL_INTERVAL_MS +# define PIMORONI_TRACKBALL_INTERVAL_MS 8 +#endif +#ifndef PIMORONI_TRACKBALL_MOUSE_SCALE +# define PIMORONI_TRACKBALL_MOUSE_SCALE 5 +#endif +#ifndef PIMORONI_TRACKBALL_SCROLL_SCALE +# define PIMORONI_TRACKBALL_SCROLL_SCALE 1 +#endif +#ifndef PIMORONI_TRACKBALL_DEBOUNCE_CYCLES +# define PIMORONI_TRACKBALL_DEBOUNCE_CYCLES 20 +#endif +#ifndef PIMORONI_TRACKBALL_ERROR_COUNT +# define PIMORONI_TRACKBALL_ERROR_COUNT 10 +#endif + +#define TRACKBALL_TIMEOUT 100 +#define TRACKBALL_REG_LED_RED 0x00 +#define TRACKBALL_REG_LED_GRN 0x01 +#define TRACKBALL_REG_LED_BLU 0x02 +#define TRACKBALL_REG_LED_WHT 0x03 +#define TRACKBALL_REG_LEFT 0x04 +#define TRACKBALL_REG_RIGHT 0x05 +#define TRACKBALL_REG_UP 0x06 +#define TRACKBALL_REG_DOWN 0x07 + +static pimoroni_data current_pimoroni_data; +static report_mouse_t mouse_report; +static bool scrolling = false; +static int16_t x_offset = 0; +static int16_t y_offset = 0; +static int16_t h_offset = 0; +static int16_t v_offset = 0; +static uint16_t precision = 128; +static uint8_t error_count = 0; + +float trackball_get_precision(void) { return ((float)precision / 128); } +void trackball_set_precision(float floatprecision) { precision = (floatprecision * 128); } +bool trackball_is_scrolling(void) { return scrolling; } +void trackball_set_scrolling(bool scroll) { scrolling = scroll; } + +void trackball_set_rgbw(uint8_t r, uint8_t g, uint8_t b, uint8_t w) { + uint8_t data[4] = {r, g, b, w}; + __attribute__((unused)) i2c_status_t status = i2c_writeReg(PIMORONI_TRACKBALL_ADDRESS << 1, TRACKBALL_REG_LED_RED, data, sizeof(data), TRACKBALL_TIMEOUT); +#ifdef TRACKBALL_DEBUG + dprintf("Trackball RGBW i2c_status_t: %d\n", status); +#endif +} + +i2c_status_t read_pimoroni_trackball(pimoroni_data* data) { + i2c_status_t status = i2c_readReg(PIMORONI_TRACKBALL_ADDRESS << 1, TRACKBALL_REG_LEFT, (uint8_t*)data, sizeof(*data), TRACKBALL_TIMEOUT); +#ifdef TRACKBALL_DEBUG + dprintf("Trackball READ i2c_status_t: %d\nLeft: %d\nRight: %d\nUp: %d\nDown: %d\nSwtich: %d\n", status, data->left, data->right, data->up, data->down, data->click); +#endif + return status; +} + +__attribute__((weak)) void pointing_device_init(void) { + i2c_init(); + trackball_set_rgbw(0x00, 0x00, 0x00, 0x00); +} + +int16_t trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale) { + uint8_t offset = 0; + bool isnegative = false; + if (negative_dir > positive_dir) { + offset = negative_dir - positive_dir; + isnegative = true; + } else { + offset = positive_dir - negative_dir; + } + uint16_t magnitude = (scale * offset * offset * precision) >> 7; + return isnegative ? -(int16_t)(magnitude) : (int16_t)(magnitude); +} + +void trackball_adapt_values(int8_t* mouse, int16_t* offset) { + if (*offset > 127) { + *mouse = 127; + *offset -= 127; + } else if (*offset < -127) { + *mouse = -127; + *offset += 127; + } else { + *mouse = *offset; + *offset = 0; + } +} + +__attribute__((weak)) void trackball_click(bool pressed, report_mouse_t* mouse) { +#ifdef PIMORONI_TRACKBALL_CLICK + if (pressed) { + mouse->buttons |= MOUSE_BTN1; + } else { + mouse->buttons &= ~MOUSE_BTN1; + } +#endif +} + +__attribute__((weak)) bool pointing_device_task_user(pimoroni_data* trackball_data) { return true; }; + +__attribute__((weak)) void pointing_device_task() { + static fast_timer_t throttle = 0; + static uint16_t debounce = 0; + + if (error_count < PIMORONI_TRACKBALL_ERROR_COUNT && timer_elapsed_fast(throttle) >= PIMORONI_TRACKBALL_INTERVAL_MS) { + i2c_status_t status = read_pimoroni_trackball(¤t_pimoroni_data); + + if (status == I2C_STATUS_SUCCESS) { + error_count = 0; + + if (pointing_device_task_user(¤t_pimoroni_data)) { + mouse_report = pointing_device_get_report(); + + if (!(current_pimoroni_data.click & 128)) { + trackball_click(false, &mouse_report); + if (!debounce) { + if (scrolling) { +#ifdef PIMORONI_TRACKBALL_INVERT_X + h_offset += trackball_get_offsets(current_pimoroni_data.right, current_pimoroni_data.left, PIMORONI_TRACKBALL_SCROLL_SCALE); +#else + h_offset -= trackball_get_offsets(current_pimoroni_data.right, current_pimoroni_data.left, PIMORONI_TRACKBALL_SCROLL_SCALE); +#endif +#ifdef PIMORONI_TRACKBALL_INVERT_Y + v_offset += trackball_get_offsets(current_pimoroni_data.down, current_pimoroni_data.up, PIMORONI_TRACKBALL_SCROLL_SCALE); +#else + v_offset -= trackball_get_offsets(current_pimoroni_data.down, current_pimoroni_data.up, PIMORONI_TRACKBALL_SCROLL_SCALE); +#endif + } else { +#ifdef PIMORONI_TRACKBALL_INVERT_X + x_offset -= trackball_get_offsets(current_pimoroni_data.right, current_pimoroni_data.left, PIMORONI_TRACKBALL_MOUSE_SCALE); +#else + x_offset += trackball_get_offsets(current_pimoroni_data.right, current_pimoroni_data.left, PIMORONI_TRACKBALL_MOUSE_SCALE); +#endif +#ifdef PIMORONI_TRACKBALL_INVERT_Y + y_offset -= trackball_get_offsets(current_pimoroni_data.down, current_pimoroni_data.up, PIMORONI_TRACKBALL_MOUSE_SCALE); +#else + y_offset += trackball_get_offsets(current_pimoroni_data.down, current_pimoroni_data.up, PIMORONI_TRACKBALL_MOUSE_SCALE); +#endif + } + if (scrolling) { +#ifndef PIMORONI_TRACKBALL_ROTATE + trackball_adapt_values(&mouse_report.h, &h_offset); + trackball_adapt_values(&mouse_report.v, &v_offset); +#else + trackball_adapt_values(&mouse_report.h, &v_offset); + trackball_adapt_values(&mouse_report.v, &h_offset); +#endif + mouse_report.x = 0; + mouse_report.y = 0; + } else { +#ifndef PIMORONI_TRACKBALL_ROTATE + trackball_adapt_values(&mouse_report.x, &x_offset); + trackball_adapt_values(&mouse_report.y, &y_offset); +#else + trackball_adapt_values(&mouse_report.x, &y_offset); + trackball_adapt_values(&mouse_report.y, &x_offset); +#endif + mouse_report.h = 0; + mouse_report.v = 0; + } + } else { + debounce--; + } + } else { + trackball_click(true, &mouse_report); + debounce = PIMORONI_TRACKBALL_DEBOUNCE_CYCLES; + } + } + } else { + error_count++; + } + + pointing_device_set_report(mouse_report); + pointing_device_send(); + + throttle = timer_read_fast(); + } +} diff --git a/drivers/sensors/pimoroni_trackball.h b/drivers/sensors/pimoroni_trackball.h new file mode 100644 index 000000000..6b2a41425 --- /dev/null +++ b/drivers/sensors/pimoroni_trackball.h @@ -0,0 +1,37 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2021 Dasky (@daskygit) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" +#include "pointing_device.h" + +typedef struct pimoroni_data { + uint8_t left; + uint8_t right; + uint8_t up; + uint8_t down; + uint8_t click; +} pimoroni_data; + +void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); +void trackball_click(bool pressed, report_mouse_t* mouse); +int16_t trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale); +void trackball_adapt_values(int8_t* mouse, int16_t* offset); +float trackball_get_precision(void); +void trackball_set_precision(float precision); +bool trackball_is_scrolling(void); +void trackball_set_scrolling(bool scroll); diff --git a/drivers/sensors/pmw3360.c b/drivers/sensors/pmw3360.c new file mode 100644 index 000000000..17c4675ff --- /dev/null +++ b/drivers/sensors/pmw3360.c @@ -0,0 +1,271 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "pmw3360.h" +#include "wait.h" +#include "debug.h" +#include "print.h" +#include "pmw3360_firmware.h" + +// Registers +#define REG_Product_ID 0x00 +#define REG_Revision_ID 0x01 +#define REG_Motion 0x02 +#define REG_Delta_X_L 0x03 +#define REG_Delta_X_H 0x04 +#define REG_Delta_Y_L 0x05 +#define REG_Delta_Y_H 0x06 +#define REG_SQUAL 0x07 +#define REG_Raw_Data_Sum 0x08 +#define REG_Maximum_Raw_data 0x09 +#define REG_Minimum_Raw_data 0x0A +#define REG_Shutter_Lower 0x0B +#define REG_Shutter_Upper 0x0C +#define REG_Control 0x0D +#define REG_Config1 0x0F +#define REG_Config2 0x10 +#define REG_Angle_Tune 0x11 +#define REG_Frame_Capture 0x12 +#define REG_SROM_Enable 0x13 +#define REG_Run_Downshift 0x14 +#define REG_Rest1_Rate_Lower 0x15 +#define REG_Rest1_Rate_Upper 0x16 +#define REG_Rest1_Downshift 0x17 +#define REG_Rest2_Rate_Lower 0x18 +#define REG_Rest2_Rate_Upper 0x19 +#define REG_Rest2_Downshift 0x1A +#define REG_Rest3_Rate_Lower 0x1B +#define REG_Rest3_Rate_Upper 0x1C +#define REG_Observation 0x24 +#define REG_Data_Out_Lower 0x25 +#define REG_Data_Out_Upper 0x26 +#define REG_Raw_Data_Dump 0x29 +#define REG_SROM_ID 0x2A +#define REG_Min_SQ_Run 0x2B +#define REG_Raw_Data_Threshold 0x2C +#define REG_Config5 0x2F +#define REG_Power_Up_Reset 0x3A +#define REG_Shutdown 0x3B +#define REG_Inverse_Product_ID 0x3F +#define REG_LiftCutoff_Tune3 0x41 +#define REG_Angle_Snap 0x42 +#define REG_LiftCutoff_Tune1 0x4A +#define REG_Motion_Burst 0x50 +#define REG_LiftCutoff_Tune_Timeout 0x58 +#define REG_LiftCutoff_Tune_Min_Length 0x5A +#define REG_SROM_Load_Burst 0x62 +#define REG_Lift_Config 0x63 +#define REG_Raw_Data_Burst 0x64 +#define REG_LiftCutoff_Tune2 0x65 + +bool _inBurst = false; + +void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } + +bool spi_start_adv(void) { + bool status = spi_start(PMW3360_CS_PIN, PMW3360_SPI_LSBFIRST, PMW3360_SPI_MODE, PMW3360_SPI_DIVISOR); + wait_us(1); + return status; +} + +void spi_stop_adv(void) { + wait_us(1); + spi_stop(); +} + +spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data) { + if (reg_addr != REG_Motion_Burst) { + _inBurst = false; + } + + spi_start_adv(); + // send address of the register, with MSBit = 1 to indicate it's a write + spi_status_t status = spi_write(reg_addr | 0x80); + status = spi_write(data); + + // tSCLK-NCS for write operation + wait_us(20); + + // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound + wait_us(100); + spi_stop(); + return status; +} + +uint8_t spi_read_adv(uint8_t reg_addr) { + spi_start_adv(); + // send adress of the register, with MSBit = 0 to indicate it's a read + spi_write(reg_addr & 0x7f); + + uint8_t data = spi_read(); + + // tSCLK-NCS for read operation is 120ns + wait_us(1); + + // tSRW/tSRR (=20us) minus tSCLK-NCS + wait_us(19); + + spi_stop(); + return data; +} + +void pmw_set_cpi(uint16_t cpi) { + uint8_t cpival = constrain((cpi / 100) - 1, 0, 0x77); // limits to 0--119 + + spi_start_adv(); + spi_write_adv(REG_Config1, cpival); + spi_stop(); +} + +uint16_t pmw_get_cpi(void) { + uint8_t cpival = spi_read_adv(REG_Config1); + return (uint16_t)(cpival & 0xFF) * 100; +} + +bool pmw_spi_init(void) { + setPinOutput(PMW3360_CS_PIN); + + spi_init(); + _inBurst = false; + + spi_stop(); + spi_start_adv(); + spi_stop(); + + spi_write_adv(REG_Shutdown, 0xb6); // Shutdown first + wait_ms(300); + + spi_start_adv(); + wait_us(40); + spi_stop_adv(); + wait_us(40); + + spi_write_adv(REG_Power_Up_Reset, 0x5a); + wait_ms(50); + + spi_read_adv(REG_Motion); + spi_read_adv(REG_Delta_X_L); + spi_read_adv(REG_Delta_X_H); + spi_read_adv(REG_Delta_Y_L); + spi_read_adv(REG_Delta_Y_H); + + pmw_upload_firmware(); + + spi_stop_adv(); + + wait_ms(10); + pmw_set_cpi(PMW3360_CPI); + + wait_ms(1); + + spi_write_adv(REG_Config2, 0x00); + + spi_write_adv(REG_Angle_Tune, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30)); + + bool init_success = pmw_check_signature(); + + writePinLow(PMW3360_CS_PIN); + + return init_success; +} + +void pmw_upload_firmware(void) { + spi_write_adv(REG_SROM_Enable, 0x1d); + + wait_ms(10); + + spi_write_adv(REG_SROM_Enable, 0x18); + + spi_start_adv(); + spi_write(REG_SROM_Load_Burst | 0x80); + wait_us(15); + + unsigned char c; + for (int i = 0; i < firmware_length; i++) { + c = (unsigned char)pgm_read_byte(firmware_data + i); + spi_write(c); + wait_us(15); + } + wait_us(200); + + spi_read_adv(REG_SROM_ID); + + spi_write_adv(REG_Config2, 0x00); + + spi_stop(); + wait_ms(10); +} + +bool pmw_check_signature(void) { + uint8_t pid = spi_read_adv(REG_Product_ID); + uint8_t iv_pid = spi_read_adv(REG_Inverse_Product_ID); + uint8_t SROM_ver = spi_read_adv(REG_SROM_ID); + return (pid == 0x42 && iv_pid == 0xBD && SROM_ver == 0x04); // signature for SROM 0x04 +} + +report_pmw_t pmw_read_burst(void) { + if (!_inBurst) { + dprintf("burst on"); + spi_write_adv(REG_Motion_Burst, 0x00); + _inBurst = true; + } + + spi_start_adv(); + spi_write(REG_Motion_Burst); + wait_us(35); // waits for tSRAD + + report_pmw_t data; + data.motion = 0; + data.dx = 0; + data.mdx = 0; + data.dy = 0; + data.mdx = 0; + + data.motion = spi_read(); + spi_write(0x00); // skip Observation + data.dx = spi_read(); + data.mdx = spi_read(); + data.dy = spi_read(); + data.mdy = spi_read(); + + spi_stop(); + + if (debug_mouse) { + print_byte(data.motion); + print_byte(data.dx); + print_byte(data.mdx); + print_byte(data.dy); + print_byte(data.mdy); + dprintf("\n"); + } + + data.isMotion = (data.motion & 0x80) != 0; + data.isOnSurface = (data.motion & 0x08) == 0; + data.dx |= (data.mdx << 8); + data.dx = data.dx * -1; + data.dy |= (data.mdy << 8); + data.dy = data.dy * -1; + + spi_stop(); + + if (data.motion & 0b111) { // panic recovery, sometimes burst mode works weird. + _inBurst = false; + } + + return data; +} diff --git a/drivers/sensors/pmw3360.h b/drivers/sensors/pmw3360.h new file mode 100644 index 000000000..124c62cf0 --- /dev/null +++ b/drivers/sensors/pmw3360.h @@ -0,0 +1,85 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "spi_master.h" + +#ifndef PMW3360_CPI +# define PMW3360_CPI 1600 +#endif + +#ifndef PMW3360_CLOCK_SPEED +# define PMW3360_CLOCK_SPEED 70000000 +#endif + +#ifndef PMW3360_SPI_LSBFIRST +# define PMW3360_SPI_LSBFIRST false +#endif + +#ifndef PMW3360_SPI_MODE +# define PMW3360_SPI_MODE 3 +#endif + +#ifndef PMW3360_SPI_DIVISOR +# ifdef __AVR__ +# define PMW3360_SPI_DIVISOR (F_CPU / PMW3360_CLOCK_SPEED) +# else +# define PMW3360_SPI_DIVISOR 64 +# endif +#endif + +#ifndef ROTATIONAL_TRANSFORM_ANGLE +# define ROTATIONAL_TRANSFORM_ANGLE 0x00 +#endif + +#ifndef PMW3360_CS_PIN +# error "No chip select pin defined -- missing PMW3360_CS_PIN" +#endif + +#ifdef CONSOLE_ENABLE +void print_byte(uint8_t byte); +#endif + +typedef struct { + int8_t motion; + bool isMotion; // True if a motion is detected. + bool isOnSurface; // True when a chip is on a surface + int16_t dx; // displacement on x directions. Unit: Count. (CPI * Count = Inch value) + int8_t mdx; + int16_t dy; // displacement on y directions. + int8_t mdy; +} report_pmw_t; + + + +bool spi_start_adv(void); +void spi_stop_adv(void); +spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data); +uint8_t spi_read_adv(uint8_t reg_addr); +bool pmw_spi_init(void); +void pmw_set_cpi(uint16_t cpi); +uint16_t pmw_get_cpi(void); +void pmw_upload_firmware(void); +bool pmw_check_signature(void); +report_pmw_t pmw_read_burst(void); + + +#define degToRad(angleInDegrees) ((angleInDegrees)*M_PI / 180.0) +#define radToDeg(angleInRadians) ((angleInRadians)*180.0 / M_PI) +#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt))) diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360_firmware.h b/drivers/sensors/pmw3360_firmware.h similarity index 100% rename from keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360_firmware.h rename to drivers/sensors/pmw3360_firmware.h diff --git a/drivers/serial.h b/drivers/serial.h new file mode 100644 index 000000000..d9c2a69e9 --- /dev/null +++ b/drivers/serial.h @@ -0,0 +1,46 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +#include + +#include + +// initiator is transaction start side +void soft_serial_initiator_init(void); +// target is interrupt accept side +void soft_serial_target_init(void); + +// initiator result +#define TRANSACTION_END 0 +#define TRANSACTION_NO_RESPONSE 0x1 +#define TRANSACTION_DATA_ERROR 0x2 +#define TRANSACTION_TYPE_ERROR 0x4 +int soft_serial_transaction(int sstd_index); + +// target status +// *SSTD_t.status has +// initiator: +// TRANSACTION_END +// or TRANSACTION_NO_RESPONSE +// or TRANSACTION_DATA_ERROR +// target: +// TRANSACTION_DATA_ERROR +// or TRANSACTION_ACCEPTED +#define TRANSACTION_ACCEPTED 0x8 +int soft_serial_get_and_clean_status(int sstd_index); diff --git a/keyboards/0_sixty/rules.mk b/keyboards/0_sixty/rules.mk index 92df0f561..82cfc95d5 100644 --- a/keyboards/0_sixty/rules.mk +++ b/keyboards/0_sixty/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration diff --git a/keyboards/0xcb/1337/keymaps/conor/keymap.c b/keyboards/0xcb/1337/keymaps/conor/keymap.c index e9d8756b1..63c3ea9f5 100644 --- a/keyboards/0xcb/1337/keymaps/conor/keymap.c +++ b/keyboards/0xcb/1337/keymaps/conor/keymap.c @@ -76,7 +76,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif /* oled stuff :) */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE uint16_t startup_timer; oled_rotation_t oled_init_user(oled_rotation_t rotation) { diff --git a/keyboards/0xcb/1337/keymaps/default/keymap.c b/keyboards/0xcb/1337/keymaps/default/keymap.c index 5c231298c..b79ecb767 100644 --- a/keyboards/0xcb/1337/keymaps/default/keymap.c +++ b/keyboards/0xcb/1337/keymaps/default/keymap.c @@ -51,13 +51,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef ENCODER_ENABLE bool encoder_update_user(uint8_t index, bool clockwise) { if (IS_LAYER_ON(_RGB)) { - #ifdef RGBLIGHT_ENABLE - if (clockwise) { - rgblight_increase_val(); - } else { - rgblight_decrease_val(); - } - #endif +# ifdef RGBLIGHT_ENABLE + if (clockwise) { + rgblight_increase_val(); + } else { + rgblight_decrease_val(); + } +# endif } else if (IS_LAYER_ON(_BLED)) { if (clockwise) { backlight_increase(); @@ -76,7 +76,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif /* oled stuff :) */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE uint16_t startup_timer; oled_rotation_t oled_init_user(oled_rotation_t rotation) { @@ -86,24 +86,15 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { static void render_logo(void) { static const char PROGMEM raw_logo[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 1, 2, 4, 2, 1, 1, 1, 1, 1, 1,255, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 1, 1, 1, 1, 1, 1, 2, 4, 2, 1, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5,248, 5, 2, 0, 0, 0, 0, 0, 0,128,192,192,224,224,112,120, 56, 63, 28, 14, 14, 14,254, 14, 14, 30, 28, 63, 56,120,112,224,224,192,128, 0, 0, 0, 0, 0, 0, 0, 2, 5,248, 5, 2, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,160, 19,162, 66, 66, 66, 66, 66, 66, 66,255,255,255, 0, 0, 0,252,254,254,192,192,192,192,255, 0, 0, 0, 62, 62, 60, 60, 0, 0, 1,255,255,255, 66, 66, 66, 66, 66, 66, 66,162, 19,160, 64, 0, - 0, 0, 0,128, 64, 64, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 64, 64,192,128, 0, 0,192, 64, 64,192,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 64,192, 0, 0, 0, 0, 0,128,192, 64, 64,192,128, 0, 0,128,192, 64, 64,192,128, 0, 0, 64, 64, 64, 64, 64,192, 0, 0, 0, 0, 0,249, 8, 8, 8, 8, 8, 8, 8, 8,127,255,255,192,128,128, 15, 31, 31, 1, 1, 1, 1,255, 0, 0, 0, 30, 30, 14, 14,128,192,192,255,255,127, 8, 8, 8, 8, 8, 8, 8, 8,249, 0, 0, 0, - 0, 0, 31, 49, 64, 78, 64, 49, 31, 0, 0, 97, 22, 8, 22, 97, 0, 0, 31, 49, 96, 64, 64, 96, 32, 0, 0,127, 68, 68,100, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64,127, 64, 64, 0, 0, 0, 32,100, 68, 68,110, 59, 0, 0, 32,100, 68, 68,110, 59, 0, 0, 0, 0, 0,126, 3, 1, 0, 0, 0, 8, 20, 35, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 7, 15,254, 30, 28, 28, 28,255, 28, 28, 28, 30,254, 15, 7, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 10, 17, 10, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 40, 68, 40, 16, 16, 16, 16, 16, 16, 31, 0, 0, 16, 40, 71, 40, 16, 0, 0, 31, 16, 16, 16, 16, 16, 16, 40, 68, 40, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 64, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 64, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 1, 2, 4, 2, 1, 1, 1, 1, 1, 1, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 1, 1, 1, 1, 1, 1, 2, 4, 2, 1, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5, 248, 5, 2, 0, 0, 0, 0, 0, 0, 128, 192, 192, 224, 224, 112, 120, 56, 63, 28, 14, 14, 14, 254, 14, 14, 30, 28, 63, 56, 120, 112, 224, 224, 192, 128, 0, 0, 0, 0, 0, 0, 0, 2, 5, 248, 5, 2, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 160, 19, 162, 66, 66, 66, 66, 66, 66, 66, 255, 255, 255, 0, 0, 0, 252, 254, 254, 192, 192, 192, 192, 255, 0, 0, 0, 62, 62, 60, 60, 0, 0, 1, 255, 255, 255, 66, 66, 66, 66, 66, 66, 66, 162, 19, 160, 64, 0, 0, 0, 0, 128, 64, 64, 64, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 64, 64, 192, 128, 0, 0, 192, 64, 64, 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 64, 192, 0, 0, 0, 0, 0, 128, 192, 64, 64, 192, 128, 0, 0, 128, 192, 64, 64, 192, 128, 0, 0, 64, 64, 64, 64, 64, 192, 0, 0, 0, 0, 0, 249, 8, 8, 8, 8, 8, 8, 8, 8, 127, 255, 255, 192, 128, 128, 15, 31, 31, 1, 1, 1, 1, 255, 0, 0, 0, 30, 30, 14, 14, 128, 192, 192, 255, 255, 127, 8, 8, 8, 8, 8, 8, 8, 8, 249, 0, 0, 0, + 0, 0, 31, 49, 64, 78, 64, 49, 31, 0, 0, 97, 22, 8, 22, 97, 0, 0, 31, 49, 96, 64, 64, 96, 32, 0, 0, 127, 68, 68, 100, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 64, 127, 64, 64, 0, 0, 0, 32, 100, 68, 68, 110, 59, 0, 0, 32, 100, 68, 68, 110, 59, 0, 0, 0, 0, 0, 126, 3, 1, 0, 0, 0, 8, 20, 35, 20, 8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 7, 15, 254, 30, 28, 28, 28, 255, 28, 28, 28, 30, 254, 15, 7, 3, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 10, 17, 10, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 40, 68, 40, 16, 16, 16, 16, 16, 16, 31, 0, 0, 16, 40, 71, 40, 16, 0, 0, 31, 16, 16, 16, 16, 16, 16, 40, 68, 40, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; oled_write_raw_P(raw_logo, sizeof(raw_logo)); } static void render_logo_font(void) { - static const char PROGMEM qmk_logo[] = { - 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, - 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, - 0x88, 0x89, 0x8A, 0x8B, 0x8A, 0x8B, 0x8C, 0x8D, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, - 0xA8, 0xA9, 0xAA, 0xAB, 0xAA, 0xAB, 0xAC, 0xAD, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0x00 - }; + static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0x88, 0x89, 0x8A, 0x8B, 0x8A, 0x8B, 0x8C, 0x8D, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xA8, 0xA9, 0xAA, 0xAB, 0xAA, 0xAB, 0xAC, 0xAD, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xCB, 0xEC, 0xED, 0xEE, 0xEF, 0xF0, 0x00}; oled_write_P(qmk_logo, false); } @@ -132,35 +123,35 @@ static void render_info(void) { oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); } -static void render_rgbled_status(bool) { +static void render_rgbled_status(void) { char string[4]; if (RGBLIGHT_MODES > 1 && rgblight_is_enabled() && get_highest_layer(layer_state) == _RGB) { uint16_t m = rgblight_get_mode(); - string[3] = '\0'; - string[2] = '0' + m % 10; - string[1] = ( m /= 10) % 10 ? '0' + (m) % 10 : (m / 10) % 10 ? '0' : ' '; - string[0] = m / 10 ? '0' + m / 10 : ' '; + string[3] = '\0'; + string[2] = '0' + m % 10; + string[1] = (m /= 10) % 10 ? '0' + (m) % 10 : (m / 10) % 10 ? '0' : ' '; + string[0] = m / 10 ? '0' + m / 10 : ' '; oled_write_P(PSTR("Conf:"), false); oled_write(string, false); - uint16_t h = rgblight_get_hue()/RGBLIGHT_HUE_STEP; - string[3] = '\0'; - string[2] = '0' + h % 10; - string[1] = ( h /= 10) % 10 ? '0' + (h) % 10 : (h / 10) % 10 ? '0' : ' '; - string[0] = h / 10 ? '0' + h / 10 : ' '; + uint16_t h = rgblight_get_hue() / RGBLIGHT_HUE_STEP; + string[3] = '\0'; + string[2] = '0' + h % 10; + string[1] = (h /= 10) % 10 ? '0' + (h) % 10 : (h / 10) % 10 ? '0' : ' '; + string[0] = h / 10 ? '0' + h / 10 : ' '; oled_write_P(PSTR(","), false); oled_write(string, false); - uint16_t s = rgblight_get_sat()/RGBLIGHT_SAT_STEP; - string[3] = '\0'; - string[2] = '0' + s % 10; - string[1] = ( s /= 10) % 10 ? '0' + (s) % 10 : (s / 10) % 10 ? '0' : ' '; - string[0] = s / 10 ? '0' + s / 10 : ' '; + uint16_t s = rgblight_get_sat() / RGBLIGHT_SAT_STEP; + string[3] = '\0'; + string[2] = '0' + s % 10; + string[1] = (s /= 10) % 10 ? '0' + (s) % 10 : (s / 10) % 10 ? '0' : ' '; + string[0] = s / 10 ? '0' + s / 10 : ' '; oled_write_P(PSTR(","), false); oled_write(string, false); - uint16_t v = rgblight_get_val()/RGBLIGHT_VAL_STEP; - string[3] = '\0'; - string[2] = '0' + v % 10; - string[1] = ( v /= 10) % 10 ? '0' + (v) % 10 : (v / 10) % 10 ? '0' : ' '; - string[0] = v / 10 ? '0' + v / 10 : ' '; + uint16_t v = rgblight_get_val() / RGBLIGHT_VAL_STEP; + string[3] = '\0'; + string[2] = '0' + v % 10; + string[1] = (v /= 10) % 10 ? '0' + (v) % 10 : (v / 10) % 10 ? '0' : ' '; + string[0] = v / 10 ? '0' + v / 10 : ' '; oled_write_P(PSTR(","), false); oled_write(string, false); oled_write_ln_P(PSTR("\n MOD HUE SAT VAR"), false); @@ -178,7 +169,7 @@ void oled_task_user(void) { finished_timer = true; } render_info(); - render_rgbled_status(true); + render_rgbled_status(); render_logo_font(); } } diff --git a/keyboards/0xcb/1337/keymaps/jakob/keymap.c b/keyboards/0xcb/1337/keymaps/jakob/keymap.c index f4a5c3cb4..190fee21c 100644 --- a/keyboards/0xcb/1337/keymaps/jakob/keymap.c +++ b/keyboards/0xcb/1337/keymaps/jakob/keymap.c @@ -76,7 +76,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif /* oled stuff :) */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE uint16_t startup_timer; oled_rotation_t oled_init_user(oled_rotation_t rotation) { diff --git a/keyboards/0xcb/1337/keymaps/via/keymap.c b/keyboards/0xcb/1337/keymaps/via/keymap.c index 897bfdeda..eefa67ddb 100644 --- a/keyboards/0xcb/1337/keymaps/via/keymap.c +++ b/keyboards/0xcb/1337/keymaps/via/keymap.c @@ -76,7 +76,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif /* oled stuff :) */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE uint16_t startup_timer; oled_rotation_t oled_init_user(oled_rotation_t rotation) { diff --git a/keyboards/0xcb/1337/rules.mk b/keyboards/0xcb/1337/rules.mk index 5469b415c..b08dfd380 100644 --- a/keyboards/0xcb/1337/rules.mk +++ b/keyboards/0xcb/1337/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,4 +24,5 @@ AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes LTO_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/0xcb/static/keymaps/default/keymap.c b/keyboards/0xcb/static/keymaps/default/keymap.c index e83d6c904..139c257e6 100644 --- a/keyboards/0xcb/static/keymaps/default/keymap.c +++ b/keyboards/0xcb/static/keymaps/default/keymap.c @@ -92,7 +92,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif /* oled stuff :) */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE uint16_t startup_timer = 0; oled_rotation_t oled_init_user(oled_rotation_t rotation) { diff --git a/keyboards/0xcb/static/keymaps/via/keymap.c b/keyboards/0xcb/static/keymaps/via/keymap.c index 4b8bf3ae5..6bb24c1fa 100644 --- a/keyboards/0xcb/static/keymaps/via/keymap.c +++ b/keyboards/0xcb/static/keymaps/via/keymap.c @@ -92,7 +92,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif /* oled stuff :) */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE uint16_t startup_timer = 0; oled_rotation_t oled_init_user(oled_rotation_t rotation) { diff --git a/keyboards/0xcb/static/rules.mk b/keyboards/0xcb/static/rules.mk index b7158f888..c50970a43 100644 --- a/keyboards/0xcb/static/rules.mk +++ b/keyboards/0xcb/static/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -23,4 +23,5 @@ AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes LTO_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/10bleoledhub/keymaps/default/keymap.c b/keyboards/10bleoledhub/keymaps/default/keymap.c index fec5f8f37..84c1f1068 100644 --- a/keyboards/10bleoledhub/keymaps/default/keymap.c +++ b/keyboards/10bleoledhub/keymaps/default/keymap.c @@ -54,7 +54,7 @@ static void render_logo(void) { oled_write_P(qmk_logo, false); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { render_logo(); } #endif diff --git a/keyboards/10bleoledhub/keymaps/via/keymap.c b/keyboards/10bleoledhub/keymaps/via/keymap.c index 6f78ac8af..df7130e80 100644 --- a/keyboards/10bleoledhub/keymaps/via/keymap.c +++ b/keyboards/10bleoledhub/keymaps/via/keymap.c @@ -54,7 +54,7 @@ static void render_logo(void) { oled_write_P(qmk_logo, false); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { render_logo(); } #endif diff --git a/keyboards/10bleoledhub/rules.mk b/keyboards/10bleoledhub/rules.mk index e582b213f..1e036e660 100644 --- a/keyboards/10bleoledhub/rules.mk +++ b/keyboards/10bleoledhub/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,5 +24,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output BLUETOOTH = AdafruitBLE -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes diff --git a/keyboards/1upkeyboards/1up60hse/config.h b/keyboards/1upkeyboards/1up60hse/config.h index 9d4ac3eed..a38ccf383 100644 --- a/keyboards/1upkeyboards/1up60hse/config.h +++ b/keyboards/1upkeyboards/1up60hse/config.h @@ -165,23 +165,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/1upkeyboards/1up60hse/rules.mk b/keyboards/1upkeyboards/1up60hse/rules.mk index 37c18690c..2c7392c6e 100644 --- a/keyboards/1upkeyboards/1up60hse/rules.mk +++ b/keyboards/1upkeyboards/1up60hse/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/1upkeyboards/1up60hte/rules.mk b/keyboards/1upkeyboards/1up60hte/rules.mk index 33656c638..9bc293bc1 100644 --- a/keyboards/1upkeyboards/1up60hte/rules.mk +++ b/keyboards/1upkeyboards/1up60hte/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c index cba9a205c..c4d82a476 100644 --- a/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c +++ b/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //***************************** Function bodies *****************************// // enable tri-layer state for _raise + _rgb = _adjust -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _raise, _rgb, _adjust); } diff --git a/keyboards/1upkeyboards/1up60rgb/rules.mk b/keyboards/1upkeyboards/1up60rgb/rules.mk index ea5308b96..cb4ba7bb3 100644 --- a/keyboards/1upkeyboards/1up60rgb/rules.mk +++ b/keyboards/1upkeyboards/1up60rgb/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/1upkeyboards/super16/config.h b/keyboards/1upkeyboards/super16/config.h index 4d12f2edc..f943fed54 100644 --- a/keyboards/1upkeyboards/super16/config.h +++ b/keyboards/1upkeyboards/super16/config.h @@ -195,26 +195,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/1upkeyboards/super16/rules.mk b/keyboards/1upkeyboards/super16/rules.mk index 209fdeb19..4cd0ce009 100644 --- a/keyboards/1upkeyboards/super16/rules.mk +++ b/keyboards/1upkeyboards/super16/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -27,7 +27,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by d RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow 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 AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/1upkeyboards/sweet16/keymaps/ridingintraffic/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/ridingintraffic/keymap.c index 7e6d13130..6b7b36cbb 100644 --- a/keyboards/1upkeyboards/sweet16/keymaps/ridingintraffic/keymap.c +++ b/keyboards/1upkeyboards/sweet16/keymaps/ridingintraffic/keymap.c @@ -39,17 +39,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+-------+-------+--------| * |SHRUG |DISFACE| HRTFAC| HAPPYF | * |------+-------+-------+--------| - * | ENTER| |LEDCNTR| tapland| + * | ENTER| |LEDCNTR| tapland| * `-------------------------------' */ //purple [_EMOJI] = LAYOUT_ortho_4x4( - TFLIP, TFLIP2, KC_NO, FU , - CLOUD, KC_NO, KC_NO, CMDCLEAR, - SHRUG, DISFACE, HEARTFACE, HAPPYFACE, + TFLIP, TFLIP2, KC_NO, FU , + CLOUD, KC_NO, KC_NO, CMDCLEAR, + SHRUG, DISFACE, HEARTFACE, HAPPYFACE, KC_ENT, RGB_TOG, MO(_LEDCNTL), MO(_TAPLAND) ), - + /* TapLand // * ,-------------------------------. * | str1 | str2 | str3 | str4 | @@ -58,14 +58,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+-------+-------+--------| * | | | | | * |------+-------+-------+--------| - * | | | | | + * | | | | | * `-------------------------------' */ //blue [_TAPLAND] = LAYOUT_ortho_4x4( - TD(TD_EXAMPLE1), TD(TD_EXAMPLE2), TD(TD_EXAMPLE3), TD(TD_EXAMPLE4), - KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, + TD(TD_EXAMPLE1), TD(TD_EXAMPLE2), TD(TD_EXAMPLE3), TD(TD_EXAMPLE4), + KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO ), /* LEDControl Pad @@ -76,14 +76,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+-------+-------+--------| * |kngrdr| Val- | Sat- | HUE- | * |------+-------+-------+--------| - * | swirl| PLAIN | | ON/OFF | + * | swirl| PLAIN | | ON/OFF | * `-------------------------------' */ //blue [_LEDCNTL] = LAYOUT_ortho_4x4( - RGB_M_SN, RGB_M_B, RGB_M_R, RGB_M_G, - RGB_M_X, RGB_VAI, RGB_SAI, RGB_HUI, - RGB_M_K, RGB_VAD, RGB_SAD, RGB_HUD, + RGB_M_SN, RGB_M_B, RGB_M_R, RGB_M_G, + RGB_M_X, RGB_VAI, RGB_SAI, RGB_HUI, + RGB_M_K, RGB_VAD, RGB_SAD, RGB_HUD, RGB_M_SW, RGB_M_P, KC_NO, RGB_TOG ), }; @@ -102,34 +102,34 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("t(-_-t)"); } return false; - break; + break; case HAPPYFACE: if(record->event.pressed){ send_unicode_string("ʘ‿ʘ"); } return false; - break; + break; case CMDCLEAR: if (record->event.pressed) { register_code(KC_LGUI); - tap_code(KC_A); + tap_code(KC_A); unregister_code(KC_LGUI); - tap_code(KC_DEL); + tap_code(KC_DEL); } return false; - break; + break; case SHRUG: if (record->event.pressed) { send_unicode_string("¯\\_(ツ)_/¯"); } - return false; + return false; break; case HEARTFACE: if(record->event.pressed){ send_unicode_string("♥‿♥"); } return false; - break; + break; case DISFACE: if(record->event.pressed){ send_unicode_string("ಠ_ಠ"); @@ -148,7 +148,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - } + } } return true; } @@ -195,7 +195,7 @@ void matrix_scan_user(void) { rgblight_setrgb (16, 0, 16); } } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case _TAPLAND: rgblight_setrgb(0, 16, 0); //green diff --git a/keyboards/1upkeyboards/sweet16/keymaps/switchtester/rules.mk b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/rules.mk index c0f2d0182..76d8b3afc 100644 --- a/keyboards/1upkeyboards/sweet16/keymaps/switchtester/rules.mk +++ b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/rules.mk @@ -1,7 +1,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/1upkeyboards/sweet16/rules.mk b/keyboards/1upkeyboards/sweet16/rules.mk index 22f9c36e6..9e78a851d 100644 --- a/keyboards/1upkeyboards/sweet16/rules.mk +++ b/keyboards/1upkeyboards/sweet16/rules.mk @@ -1,7 +1,7 @@ # Build Options # DEFAULT_FOLDER = 1upkeyboards/sweet16/v1 -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/2key2crawl/rules.mk b/keyboards/2key2crawl/rules.mk index e6ef0a288..1565cc38d 100644 --- a/keyboards/2key2crawl/rules.mk +++ b/keyboards/2key2crawl/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/30wer/rules.mk b/keyboards/30wer/rules.mk index 9a80d5a18..9732be1c2 100644 --- a/keyboards/30wer/rules.mk +++ b/keyboards/30wer/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h index 4a927110c..d43c59e06 100644 --- a/keyboards/40percentclub/25/config.h +++ b/keyboards/40percentclub/25/config.h @@ -173,23 +173,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/40percentclub/25/rules.mk b/keyboards/40percentclub/25/rules.mk index d01803957..53bc1a707 100644 --- a/keyboards/40percentclub/25/rules.mk +++ b/keyboards/40percentclub/25/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,12 +25,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 # Enable generic behavior for split boards SPLIT_KEYBOARD = yes - -LAYOUTS = ortho_5x5 ortho_5x10 diff --git a/keyboards/40percentclub/4pack/config.h b/keyboards/40percentclub/4pack/config.h index b1101484c..00f0d3e57 100644 --- a/keyboards/40percentclub/4pack/config.h +++ b/keyboards/40percentclub/4pack/config.h @@ -200,26 +200,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/40percentclub/4pack/rules.mk b/keyboards/40percentclub/4pack/rules.mk index a94516139..f684c650c 100644 --- a/keyboards/40percentclub/4pack/rules.mk +++ b/keyboards/40percentclub/4pack/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/40percentclub/4x4/config.h b/keyboards/40percentclub/4x4/config.h index cfb5257b1..f3ed8ed22 100644 --- a/keyboards/40percentclub/4x4/config.h +++ b/keyboards/40percentclub/4x4/config.h @@ -140,23 +140,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/40percentclub/4x4/rules.mk b/keyboards/40percentclub/4x4/rules.mk index 91b609103..4409d64b6 100644 --- a/keyboards/40percentclub/4x4/rules.mk +++ b/keyboards/40percentclub/4x4/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,12 +24,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 ortho_4x16 +LAYOUTS = ortho_4x4 ortho_4x12 # Disable unsupported hardware RGBLIGHT_SUPPORTED = no diff --git a/keyboards/40percentclub/5x5/config.h b/keyboards/40percentclub/5x5/config.h index 809e0a9e1..6f098a80b 100644 --- a/keyboards/40percentclub/5x5/config.h +++ b/keyboards/40percentclub/5x5/config.h @@ -149,23 +149,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/40percentclub/5x5/rules.mk b/keyboards/40percentclub/5x5/rules.mk index ae36f660e..d9edf4284 100644 --- a/keyboards/40percentclub/5x5/rules.mk +++ b/keyboards/40percentclub/5x5/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,9 +24,8 @@ 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 RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = ortho_5x5 ortho_5x10 ortho_5x15 +LAYOUTS = ortho_5x15 diff --git a/keyboards/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h index 4d21542d1..a7a68fc73 100644 --- a/keyboards/40percentclub/6lit/config.h +++ b/keyboards/40percentclub/6lit/config.h @@ -174,23 +174,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/40percentclub/6lit/rules.mk b/keyboards/40percentclub/6lit/rules.mk index 7ff281ecc..e6d7079db 100644 --- a/keyboards/40percentclub/6lit/rules.mk +++ b/keyboards/40percentclub/6lit/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h index 46f1248f2..203ebd77f 100644 --- a/keyboards/40percentclub/foobar/config.h +++ b/keyboards/40percentclub/foobar/config.h @@ -174,23 +174,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/40percentclub/foobar/rules.mk b/keyboards/40percentclub/foobar/rules.mk index 7516c9bdd..86368f3bd 100644 --- a/keyboards/40percentclub/foobar/rules.mk +++ b/keyboards/40percentclub/foobar/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/40percentclub/gherkin/keymaps/midi/rules.mk b/keyboards/40percentclub/gherkin/keymaps/midi/rules.mk index bfc6dbbd0..a7e93c234 100644 --- a/keyboards/40percentclub/gherkin/keymaps/midi/rules.mk +++ b/keyboards/40percentclub/gherkin/keymaps/midi/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/40percentclub/gherkin/keymaps/steno/rules.mk b/keyboards/40percentclub/gherkin/keymaps/steno/rules.mk index a6e76f7cf..1210452d8 100644 --- a/keyboards/40percentclub/gherkin/keymaps/steno/rules.mk +++ b/keyboards/40percentclub/gherkin/keymaps/steno/rules.mk @@ -1,6 +1,6 @@ STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/40percentclub/gherkin/keymaps/stevexyz/rules.mk b/keyboards/40percentclub/gherkin/keymaps/stevexyz/rules.mk index 8c48f5850..3b0966b94 100644 --- a/keyboards/40percentclub/gherkin/keymaps/stevexyz/rules.mk +++ b/keyboards/40percentclub/gherkin/keymaps/stevexyz/rules.mk @@ -1,6 +1,6 @@ # Build Options (yes/no) # -BOOTMAGIC_ENABLE = lite # Just bootloader enabled with keys +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/gherkin/rules.mk b/keyboards/40percentclub/gherkin/rules.mk index 18a35b275..2b2a89b90 100644 --- a/keyboards/40percentclub/gherkin/rules.mk +++ b/keyboards/40percentclub/gherkin/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h index e226c7291..ca099d476 100644 --- a/keyboards/40percentclub/half_n_half/config.h +++ b/keyboards/40percentclub/half_n_half/config.h @@ -188,26 +188,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/40percentclub/half_n_half/rules.mk b/keyboards/40percentclub/half_n_half/rules.mk index bd2b179d8..5ab178e8b 100644 --- a/keyboards/40percentclub/half_n_half/rules.mk +++ b/keyboards/40percentclub/half_n_half/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/40percentclub/i75/config.h b/keyboards/40percentclub/i75/config.h index 776f4abb6..0f478b516 100644 --- a/keyboards/40percentclub/i75/config.h +++ b/keyboards/40percentclub/i75/config.h @@ -130,26 +130,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/40percentclub/i75/rules.mk b/keyboards/40percentclub/i75/rules.mk index ba535b1c6..402bf5c30 100644 --- a/keyboards/40percentclub/i75/rules.mk +++ b/keyboards/40percentclub/i75/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -12,7 +12,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/40percentclub/luddite/rules.mk b/keyboards/40percentclub/luddite/rules.mk index 3e42dddd6..6b026cead 100644 --- a/keyboards/40percentclub/luddite/rules.mk +++ b/keyboards/40percentclub/luddite/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk b/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk index 617f5f6fc..1a247b054 100644 --- a/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk +++ b/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk @@ -1,2 +1,2 @@ MOUSEKEY_ENABLE = yes -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/40percentclub/mf68/rules.mk b/keyboards/40percentclub/mf68/rules.mk index f1967d83e..48ad075a0 100644 --- a/keyboards/40percentclub/mf68/rules.mk +++ b/keyboards/40percentclub/mf68/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 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 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c index b8947cce7..13f89dd53 100644 --- a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c +++ b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c @@ -85,15 +85,15 @@ int16_t axisCoordinate(uint8_t pin, uint16_t origin) { int8_t axisToMouseComponent(uint8_t pin, int16_t origin, uint8_t maxSpeed, int8_t polarity) { int coordinate = axisCoordinate(pin, origin); - if (coordinate == 0) { - return 0; - } else { + if (coordinate != 0) { float percent = (float)coordinate / 100; - if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { + if (get_mods() & MOD_BIT(KC_LSFT)) { return percent * precisionSpeed * polarity * (abs(coordinate) / speedRegulator); } else { return percent * maxCursorSpeed * polarity * (abs(coordinate) / speedRegulator); } + } else { + return 0; } } diff --git a/keyboards/40percentclub/nano/rules.mk b/keyboards/40percentclub/nano/rules.mk index e9658c4b5..cb6b0b389 100644 --- a/keyboards/40percentclub/nano/rules.mk +++ b/keyboards/40percentclub/nano/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/40percentclub/nein/config.h b/keyboards/40percentclub/nein/config.h index ec088d443..3532c8258 100644 --- a/keyboards/40percentclub/nein/config.h +++ b/keyboards/40percentclub/nein/config.h @@ -184,26 +184,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/40percentclub/nein/rules.mk b/keyboards/40percentclub/nein/rules.mk index 67b7f813e..87eb47e4c 100644 --- a/keyboards/40percentclub/nein/rules.mk +++ b/keyboards/40percentclub/nein/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/40percentclub/nori/config.h b/keyboards/40percentclub/nori/config.h index e9bbe487a..1c1d8f0fb 100644 --- a/keyboards/40percentclub/nori/config.h +++ b/keyboards/40percentclub/nori/config.h @@ -162,23 +162,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/40percentclub/nori/rules.mk b/keyboards/40percentclub/nori/rules.mk index 3056c606c..e173f397f 100644 --- a/keyboards/40percentclub/nori/rules.mk +++ b/keyboards/40percentclub/nori/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/40percentclub/sixpack/rules.mk b/keyboards/40percentclub/sixpack/rules.mk index 84e3ea5ea..046b18343 100644 --- a/keyboards/40percentclub/sixpack/rules.mk +++ b/keyboards/40percentclub/sixpack/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/tomato/rules.mk b/keyboards/40percentclub/tomato/rules.mk index 80b40c719..43af53550 100644 --- a/keyboards/40percentclub/tomato/rules.mk +++ b/keyboards/40percentclub/tomato/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c b/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c index f3e297ec0..52372e285 100644 --- a/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c +++ b/keyboards/40percentclub/ut47/keymaps/nordic/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( /* Base - L0 */ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - LT3_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_APOS, MT_RSFT_ENT, + LT3_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_QUOT, MT_RSFT_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, MO(4), KC_LCTL, KC_LGUI, MO(4), KC_LALT, MO(2), KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), @@ -84,7 +84,7 @@ LAYOUT( /* Right modifier - L1 */ */ LAYOUT( /* Left modifier - L2 */ - NO_SECT, KC_EXCLAIM, NO_QUO2, KC_HASH, NO_BULT, KC_PERCENT, NO_AMPR, NO_SLSH, NO_EQL, NO_PLUS, NO_BSLS, KC_DELETE, + NO_SECT, KC_EXCLAIM, NO_DQUO, KC_HASH, NO_CURR, KC_PERCENT, NO_AMPR, NO_SLSH, NO_EQL, NO_PLUS, NO_BSLS, KC_DELETE, _______, _______, NO_QUES, NO_LCBR, NO_LBRC, NO_LPRN, NO_RPRN, NO_RBRC, NO_RCBR, KC_F10, KC_F11, KC_F12, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_PGUP, _______, _______, _______, _______, KC_CAPS, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END @@ -122,9 +122,9 @@ LAYOUT( /* Hold Tab down - L3 */ */ LAYOUT( /* Norsk - L4 */ - _______, _______, NO_AT, NO_PND, NO_DLR, NO_TILD, _______, NO_QUOT, NO_ACUT, NO_GRV, NO_AA, _______, - _______, _______, _______, NO_EURO, _______, _______, _______, _______, NO_CIRC, NO_OSLH, NO_AE, _______, - _______, NO_LESS, _______, _______, _______, _______, _______, NO_MU, _______, _______, _______, _______, + _______, _______, NO_AT, NO_PND, NO_DLR, NO_TILD, _______, NO_QUOT, NO_ACUT, NO_GRV, NO_ARNG, _______, + _______, _______, _______, NO_EURO, _______, _______, _______, _______, NO_CIRC, NO_OSTR, NO_AE, _______, + _______, NO_LABK, _______, _______, _______, _______, _______, NO_MICR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(5), _______, _______, _______ ), diff --git a/keyboards/40percentclub/ut47/rules.mk b/keyboards/40percentclub/ut47/rules.mk index 3c8a8f68f..82900cac3 100644 --- a/keyboards/40percentclub/ut47/rules.mk +++ b/keyboards/40percentclub/ut47/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/45_ats/rules.mk b/keyboards/45_ats/rules.mk index db96f0afc..f68b5b1df 100644 --- a/keyboards/45_ats/rules.mk +++ b/keyboards/45_ats/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/4pplet/aekiso60/rev_a/rules.mk b/keyboards/4pplet/aekiso60/rev_a/rules.mk index b98fb7e33..9ded2ef9b 100644 --- a/keyboards/4pplet/aekiso60/rev_a/rules.mk +++ b/keyboards/4pplet/aekiso60/rev_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/4pplet/bootleg/rev_a/rules.mk b/keyboards/4pplet/bootleg/rev_a/rules.mk index 380c35d4f..d1bf7ce67 100644 --- a/keyboards/4pplet/bootleg/rev_a/rules.mk +++ b/keyboards/4pplet/bootleg/rev_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/4pplet/eagle_viper_rep/rev_a/rules.mk b/keyboards/4pplet/eagle_viper_rep/rev_a/rules.mk index 2a1539ed5..e80e0296a 100644 --- a/keyboards/4pplet/eagle_viper_rep/rev_a/rules.mk +++ b/keyboards/4pplet/eagle_viper_rep/rev_a/rules.mk @@ -4,7 +4,7 @@ MCU = STM32F072 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/4pplet/steezy60/rev_a/rules.mk b/keyboards/4pplet/steezy60/rev_a/rules.mk index b98fb7e33..9ded2ef9b 100644 --- a/keyboards/4pplet/steezy60/rev_a/rules.mk +++ b/keyboards/4pplet/steezy60/rev_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/4pplet/waffling60/rev_a/rules.mk b/keyboards/4pplet/waffling60/rev_a/rules.mk index b98fb7e33..9ded2ef9b 100644 --- a/keyboards/4pplet/waffling60/rev_a/rules.mk +++ b/keyboards/4pplet/waffling60/rev_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/4pplet/waffling60/rev_b/rules.mk b/keyboards/4pplet/waffling60/rev_b/rules.mk index 69c524b73..f945e0c4d 100644 --- a/keyboards/4pplet/waffling60/rev_b/rules.mk +++ b/keyboards/4pplet/waffling60/rev_b/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/6ball/rules.mk b/keyboards/6ball/rules.mk index e4f7093f7..6f7587051 100644 --- a/keyboards/6ball/rules.mk +++ b/keyboards/6ball/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/7c8/framework/rules.mk b/keyboards/7c8/framework/rules.mk index 185a5119c..b308c5b8e 100644 --- a/keyboards/7c8/framework/rules.mk +++ b/keyboards/7c8/framework/rules.mk @@ -1,7 +1,7 @@ MCU = atmega328p BOOTLOADER = USBasp -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no @@ -10,7 +10,6 @@ SLEEP_LED_ENABLE = no NKRO_ENABLE = no BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = no -MIDI_ENABLE = no UNICODE_ENABLE = no BLUETOOTH_ENABLE = no AUDIO_ENABLE = no diff --git a/keyboards/7skb/keymaps/salicylic/keymap.c b/keyboards/7skb/keymaps/salicylic/keymap.c index bf3433b17..ad12f49d5 100644 --- a/keyboards/7skb/keymaps/salicylic/keymap.c +++ b/keyboards/7skb/keymaps/salicylic/keymap.c @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/7skb/rules.mk b/keyboards/7skb/rules.mk index d663af19f..df6d10c0f 100644 --- a/keyboards/7skb/rules.mk +++ b/keyboards/7skb/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 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 diff --git a/keyboards/7splus/keymaps/salicylic/keymap.c b/keyboards/7splus/keymaps/salicylic/keymap.c index 4435bf98c..cbe4e57dc 100644 --- a/keyboards/7splus/keymaps/salicylic/keymap.c +++ b/keyboards/7splus/keymaps/salicylic/keymap.c @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, KC_HOME, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| -LCTL_T(JP_QUOT),JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, KC_END, +LCTL_T(JP_QUOT),JP_HASH,JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, KC_END, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| SFT_T(JP_CIRC),JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, KC_UP, KC_PGUP, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/7splus/rules.mk b/keyboards/7splus/rules.mk index 52da9f00e..f5a065780 100644 --- a/keyboards/7splus/rules.mk +++ b/keyboards/7splus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/8pack/rules.mk b/keyboards/8pack/rules.mk index 4ed443daa..4b00bd2e5 100644 --- a/keyboards/8pack/rules.mk +++ b/keyboards/8pack/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,6 +24,6 @@ NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: htt BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no DEFAULT_FOLDER = 8pack/rev12 diff --git a/keyboards/9key/rules.mk b/keyboards/9key/rules.mk index b6c0c73be..bf6bc8a18 100644 --- a/keyboards/9key/rules.mk +++ b/keyboards/9key/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = yes TAP_DANCE_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/abacus/config.h b/keyboards/abacus/config.h index 70ef55494..eee2f3f91 100644 --- a/keyboards/abacus/config.h +++ b/keyboards/abacus/config.h @@ -106,23 +106,3 @@ along with this program. If not, see . /* disable these deprecated features by default */ #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/abacus/keymaps/unicodemap/keymap.c b/keyboards/abacus/keymaps/unicodemap/keymap.c index 8a2a33889..c31b268ca 100644 --- a/keyboards/abacus/keymaps/unicodemap/keymap.c +++ b/keyboards/abacus/keymaps/unicodemap/keymap.c @@ -108,7 +108,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if(active) { @@ -125,6 +125,7 @@ void dip_switch_update_user(uint8_t index, bool active) { } } } + return true; } diff --git a/keyboards/abacus/rules.mk b/keyboards/abacus/rules.mk index 6d6a2f19a..af4042fd9 100644 --- a/keyboards/abacus/rules.mk +++ b/keyboards/abacus/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 ENCODER_ENABLE = yes diff --git a/keyboards/absinthe/rules.mk b/keyboards/absinthe/rules.mk index 78bf2bf1b..c71d23e8d 100644 --- a/keyboards/absinthe/rules.mk +++ b/keyboards/absinthe/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 ENCODER_ENABLE = yes diff --git a/keyboards/abstract/ellipse/rev1/config.h b/keyboards/abstract/ellipse/rev1/config.h index 57c9456fe..fe3687480 100644 --- a/keyboards/abstract/ellipse/rev1/config.h +++ b/keyboards/abstract/ellipse/rev1/config.h @@ -178,26 +178,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/abstract/ellipse/rev1/rules.mk b/keyboards/abstract/ellipse/rev1/rules.mk index cd55ecdbe..cb241b2c0 100644 --- a/keyboards/abstract/ellipse/rev1/rules.mk +++ b/keyboards/abstract/ellipse/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/acekeyboard/titan60/rules.mk b/keyboards/acekeyboard/titan60/rules.mk index 92f7aba54..3393f3dc5 100644 --- a/keyboards/acekeyboard/titan60/rules.mk +++ b/keyboards/acekeyboard/titan60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/acheron/arctic/rules.mk b/keyboards/acheron/arctic/rules.mk index b38cf0001..fc080cfcc 100644 --- a/keyboards/acheron/arctic/rules.mk +++ b/keyboards/acheron/arctic/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/acheron/austin/keymaps/via/rules.mk b/keyboards/acheron/austin/keymaps/via/rules.mk index ee1e4ceeb..5abd4f5bd 100644 --- a/keyboards/acheron/austin/keymaps/via/rules.mk +++ b/keyboards/acheron/austin/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/acheron/austin/rules.mk b/keyboards/acheron/austin/rules.mk index 57fb9cbb3..b7d446119 100644 --- a/keyboards/acheron/austin/rules.mk +++ b/keyboards/acheron/austin/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -18,7 +18,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 # Enter lower-power sleep mode when on the ChibiOS idle thread diff --git a/keyboards/acheron/elongate/config.h b/keyboards/acheron/elongate/config.h index cc94d5f02..c51c7a821 100644 --- a/keyboards/acheron/elongate/config.h +++ b/keyboards/acheron/elongate/config.h @@ -193,25 +193,6 @@ along with this program. If not, see . /* disable these deprecated features by default */ #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/acheron/elongate/rules.mk b/keyboards/acheron/elongate/rules.mk index 6d5f0fb52..09dd01ea9 100644 --- a/keyboards/acheron/elongate/rules.mk +++ b/keyboards/acheron/elongate/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 LTO_ENABLE = yes diff --git a/keyboards/acheron/keebspcb/rules.mk b/keyboards/acheron/keebspcb/rules.mk index 7a166e84f..cb43e7ab2 100644 --- a/keyboards/acheron/keebspcb/rules.mk +++ b/keyboards/acheron/keebspcb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -18,7 +18,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 # Enter lower-power sleep mode when on the ChibiOS idle thread diff --git a/keyboards/acheron/lasgweloth/rules.mk b/keyboards/acheron/lasgweloth/rules.mk index fb7e49515..2c9fffa01 100644 --- a/keyboards/acheron/lasgweloth/rules.mk +++ b/keyboards/acheron/lasgweloth/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/acheron/shark/config.h b/keyboards/acheron/shark/config.h index e45b69b62..3adcb060d 100644 --- a/keyboards/acheron/shark/config.h +++ b/keyboards/acheron/shark/config.h @@ -204,26 +204,6 @@ B0, which is unconnected on the PCB //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/acheron/shark/keymaps/via/rules.mk b/keyboards/acheron/shark/keymaps/via/rules.mk index ee1e4ceeb..5abd4f5bd 100644 --- a/keyboards/acheron/shark/keymaps/via/rules.mk +++ b/keyboards/acheron/shark/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/acheron/shark/rules.mk b/keyboards/acheron/shark/rules.mk index 455c98f7e..38031a1bf 100644 --- a/keyboards/acheron/shark/rules.mk +++ b/keyboards/acheron/shark/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -19,7 +19,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/acr60/keymaps/mitch/keymap.c b/keyboards/acr60/keymaps/mitch/keymap.c index b7fcb5a04..1567b1481 100644 --- a/keyboards/acr60/keymaps/mitch/keymap.c +++ b/keyboards/acr60/keymaps/mitch/keymap.c @@ -11,8 +11,6 @@ #define GUIOFF MAGIC_NO_GUI #define GUION MAGIC_UNNO_GUI -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - /* TODO: create handy quick-ref list here for easy grokking of the actual shortcuts in place */ /* @@ -64,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Hit MO(_FN) and Alt in that order to lock into the _FN layer. */ [_DFT] = LAYOUT_mitchsplit( /* Basic QWERTY */ - F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_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, \ MO(_FN), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), \ @@ -169,37 +167,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/acr60/rules.mk b/keyboards/acr60/rules.mk index 22fd09140..485f8759c 100644 --- a/keyboards/acr60/rules.mk +++ b/keyboards/acr60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/adelheid/config.h b/keyboards/adelheid/config.h index 1d944949b..fb57c3956 100644 --- a/keyboards/adelheid/config.h +++ b/keyboards/adelheid/config.h @@ -182,23 +182,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/adelheid/rules.mk b/keyboards/adelheid/rules.mk index 77a8471e9..8182e8c1e 100644 --- a/keyboards/adelheid/rules.mk +++ b/keyboards/adelheid/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/adkb96/rules.mk b/keyboards/adkb96/rules.mk index 95fbc1d48..acec579a2 100644 --- a/keyboards/adkb96/rules.mk +++ b/keyboards/adkb96/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/aeboards/aegis/rules.mk b/keyboards/aeboards/aegis/rules.mk index 8b7a0c7f0..826fc8aec 100644 --- a/keyboards/aeboards/aegis/rules.mk +++ b/keyboards/aeboards/aegis/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/aeboards/constellation/rev1/rules.mk b/keyboards/aeboards/constellation/rev1/rules.mk index 2a82012de..b22b64ba7 100755 --- a/keyboards/aeboards/constellation/rev1/rules.mk +++ b/keyboards/aeboards/constellation/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/aeboards/constellation/rev2/rules.mk b/keyboards/aeboards/constellation/rev2/rules.mk index c79b49dbf..51d538fad 100755 --- a/keyboards/aeboards/constellation/rev2/rules.mk +++ b/keyboards/aeboards/constellation/rev2/rules.mk @@ -1,10 +1,13 @@ # MCU name -MCU = STM32L433 +MCU = STM32L422 + +# Bootloader selection +BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/aeboards/ext65/keymaps/default/keymap.c b/keyboards/aeboards/ext65/keymaps/default/keymap.c index af7537925..466b34539 100644 --- a/keyboards/aeboards/ext65/keymaps/default/keymap.c +++ b/keyboards/aeboards/ext65/keymaps/default/keymap.c @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_layer_state(void) { oled_write_ln(PSTR("LAYER"), false); diff --git a/keyboards/aeboards/ext65/keymaps/via/keymap.c b/keyboards/aeboards/ext65/keymaps/via/keymap.c index af7537925..466b34539 100644 --- a/keyboards/aeboards/ext65/keymaps/via/keymap.c +++ b/keyboards/aeboards/ext65/keymaps/via/keymap.c @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_layer_state(void) { oled_write_ln(PSTR("LAYER"), false); diff --git a/keyboards/aeboards/ext65/keymaps/via/rules.mk b/keyboards/aeboards/ext65/keymaps/via/rules.mk index 1e5b99807..e9a8bec87 100644 --- a/keyboards/aeboards/ext65/keymaps/via/rules.mk +++ b/keyboards/aeboards/ext65/keymaps/via/rules.mk @@ -1 +1,3 @@ VIA_ENABLE = yes +OLED_ENABLE = yes +# OLED_DRIVER = not a real thing diff --git a/keyboards/aeboards/ext65/rev1/rules.mk b/keyboards/aeboards/ext65/rev1/rules.mk index 05abcb68f..826fc8aec 100644 --- a/keyboards/aeboards/ext65/rev1/rules.mk +++ b/keyboards/aeboards/ext65/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/aeboards/ext65/rev2/rev2.c b/keyboards/aeboards/ext65/rev2/rev2.c index 5d7658101..ce16eb4c4 100644 --- a/keyboards/aeboards/ext65/rev2/rev2.c +++ b/keyboards/aeboards/ext65/rev2/rev2.c @@ -3,7 +3,7 @@ // Tested and verified working on ext65rev2 void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void board_init(void) { SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); diff --git a/keyboards/aeboards/ext65/rev2/rules.mk b/keyboards/aeboards/ext65/rev2/rules.mk index 8794d357c..4e3d217db 100644 --- a/keyboards/aeboards/ext65/rev2/rules.mk +++ b/keyboards/aeboards/ext65/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/afternoonlabs/breeze/rev0/rules.mk b/keyboards/afternoonlabs/breeze/rev0/rules.mk index f73350f58..64710a26f 100644 --- a/keyboards/afternoonlabs/breeze/rev0/rules.mk +++ b/keyboards/afternoonlabs/breeze/rev0/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/afternoonlabs/breeze/rev1/rules.mk b/keyboards/afternoonlabs/breeze/rev1/rules.mk index 773650d12..644161a8e 100644 --- a/keyboards/afternoonlabs/breeze/rev1/rules.mk +++ b/keyboards/afternoonlabs/breeze/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = caterina # change yes to no to disable # SPLIT_KEYBOARD = yes -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/afternoonlabs/gust/rev1/rules.mk b/keyboards/afternoonlabs/gust/rev1/rules.mk index b00cf4eff..68aa0c485 100644 --- a/keyboards/afternoonlabs/gust/rev1/rules.mk +++ b/keyboards/afternoonlabs/gust/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/afternoonlabs/oceanbreeze/rev1/rules.mk b/keyboards/afternoonlabs/oceanbreeze/rev1/rules.mk index 96875e4ff..1c2532aaf 100644 --- a/keyboards/afternoonlabs/oceanbreeze/rev1/rules.mk +++ b/keyboards/afternoonlabs/oceanbreeze/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/afternoonlabs/southern_breeze/rev1/rules.mk b/keyboards/afternoonlabs/southern_breeze/rev1/rules.mk index f73350f58..64710a26f 100644 --- a/keyboards/afternoonlabs/southern_breeze/rev1/rules.mk +++ b/keyboards/afternoonlabs/southern_breeze/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/afternoonlabs/summer_breeze/rev1/rules.mk b/keyboards/afternoonlabs/summer_breeze/rev1/rules.mk index f73350f58..64710a26f 100644 --- a/keyboards/afternoonlabs/summer_breeze/rev1/rules.mk +++ b/keyboards/afternoonlabs/summer_breeze/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ai03/andromeda/rules.mk b/keyboards/ai03/andromeda/rules.mk index b47c99696..51f82165b 100644 --- a/keyboards/ai03/andromeda/rules.mk +++ b/keyboards/ai03/andromeda/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ai03/equinox/rev0/rules.mk b/keyboards/ai03/equinox/rev0/rules.mk index 668ad9a28..023312ee3 100644 --- a/keyboards/ai03/equinox/rev0/rules.mk +++ b/keyboards/ai03/equinox/rev0/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ai03/equinox/rev1/rules.mk b/keyboards/ai03/equinox/rev1/rules.mk index 668ad9a28..023312ee3 100644 --- a/keyboards/ai03/equinox/rev1/rules.mk +++ b/keyboards/ai03/equinox/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h index 0af48b8c0..499176d39 100644 --- a/keyboards/ai03/lunar/config.h +++ b/keyboards/ai03/lunar/config.h @@ -187,26 +187,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ai03/lunar/rules.mk b/keyboards/ai03/lunar/rules.mk index 74808942f..13a82136b 100644 --- a/keyboards/ai03/lunar/rules.mk +++ b/keyboards/ai03/lunar/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ai03/orbit/config.h b/keyboards/ai03/orbit/config.h index ee907081a..410f63f66 100644 --- a/keyboards/ai03/orbit/config.h +++ b/keyboards/ai03/orbit/config.h @@ -192,26 +192,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ai03/orbit/rules.mk b/keyboards/ai03/orbit/rules.mk index 80bc0eb11..12418dbdd 100644 --- a/keyboards/ai03/orbit/rules.mk +++ b/keyboards/ai03/orbit/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ai03/orbit_x/rules.mk b/keyboards/ai03/orbit_x/rules.mk index c08aa7545..e85961eee 100644 --- a/keyboards/ai03/orbit_x/rules.mk +++ b/keyboards/ai03/orbit_x/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 SPLIT_KEYBOARD = yes # Split keyboard diff --git a/keyboards/ai03/polaris/rules.mk b/keyboards/ai03/polaris/rules.mk index e5ed9276b..c4b1c6dc7 100644 --- a/keyboards/ai03/polaris/rules.mk +++ b/keyboards/ai03/polaris/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ai03/quasar/config.h b/keyboards/ai03/quasar/config.h index f34de690b..0679a45f3 100644 --- a/keyboards/ai03/quasar/config.h +++ b/keyboards/ai03/quasar/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ai03/quasar/rules.mk b/keyboards/ai03/quasar/rules.mk index b16d852aa..8b8b094a3 100644 --- a/keyboards/ai03/quasar/rules.mk +++ b/keyboards/ai03/quasar/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ai03/soyuz/rules.mk b/keyboards/ai03/soyuz/rules.mk index 5af895974..36bf7c4e2 100644 --- a/keyboards/ai03/soyuz/rules.mk +++ b/keyboards/ai03/soyuz/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ai03/vega/rules.mk b/keyboards/ai03/vega/rules.mk index b47c99696..51f82165b 100644 --- a/keyboards/ai03/vega/rules.mk +++ b/keyboards/ai03/vega/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ai03/voyager60_alps/config.h b/keyboards/ai03/voyager60_alps/config.h index 98f37e8cf..cd749cc50 100644 --- a/keyboards/ai03/voyager60_alps/config.h +++ b/keyboards/ai03/voyager60_alps/config.h @@ -23,7 +23,7 @@ along with this program. If not, see . #define PRODUCT Voyager60-Alps #define MATRIX_ROWS 5 -#define MATRIX_COLS 15 +#define MATRIX_COLS 14 #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} diff --git a/keyboards/ai03/voyager60_alps/rules.mk b/keyboards/ai03/voyager60_alps/rules.mk index f49426d51..6c4393757 100644 --- a/keyboards/ai03/voyager60_alps/rules.mk +++ b/keyboards/ai03/voyager60_alps/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ajisai74/keymaps/salicylic/keymap.c b/keyboards/ajisai74/keymaps/salicylic/keymap.c index 03cecb7a0..f8b430af1 100644 --- a/keyboards/ajisai74/keymaps/salicylic/keymap.c +++ b/keyboards/ajisai74/keymaps/salicylic/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| JP_DQUO, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______, _______, + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| _______,JP_CIRC,JP_PERC,JP_AMPR,JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/ajisai74/rules.mk b/keyboards/ajisai74/rules.mk index 9b916f556..2b0933d53 100644 --- a/keyboards/ajisai74/rules.mk +++ b/keyboards/ajisai74/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/akb/eb46/rules.mk b/keyboards/akb/eb46/rules.mk index 13f194d5a..fc6b297de 100644 --- a/keyboards/akb/eb46/rules.mk +++ b/keyboards/akb/eb46/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/akb/raine/rules.mk b/keyboards/akb/raine/rules.mk index 13f194d5a..fc6b297de 100644 --- a/keyboards/akb/raine/rules.mk +++ b/keyboards/akb/raine/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/akegata_denki/device_one/rules.mk b/keyboards/akegata_denki/device_one/rules.mk index 383269654..ec74cb2e8 100644 --- a/keyboards/akegata_denki/device_one/rules.mk +++ b/keyboards/akegata_denki/device_one/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/al1/rules.mk b/keyboards/al1/rules.mk index e218b8cc3..7972db4b4 100644 --- a/keyboards/al1/rules.mk +++ b/keyboards/al1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/aleblazer/zodiark/keymaps/default/config.h b/keyboards/aleblazer/zodiark/keymaps/default/config.h index 0c89f634b..2e8732ecc 100644 --- a/keyboards/aleblazer/zodiark/keymaps/default/config.h +++ b/keyboards/aleblazer/zodiark/keymaps/default/config.h @@ -16,7 +16,7 @@ along with this program. If not, see . */ #pragma once -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #define OLED_DISPLAY_128X64 #define OLED_TIMEOUT 400000 #endif diff --git a/keyboards/aleblazer/zodiark/keymaps/default/keymap.c b/keyboards/aleblazer/zodiark/keymaps/default/keymap.c index c09b483d9..84953ec58 100644 --- a/keyboards/aleblazer/zodiark/keymaps/default/keymap.c +++ b/keyboards/aleblazer/zodiark/keymaps/default/keymap.c @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM qmk_logo[] = { diff --git a/keyboards/aleblazer/zodiark/keymaps/slimoled/config.h b/keyboards/aleblazer/zodiark/keymaps/slimoled/config.h index 36d9637e7..e2df253c3 100644 --- a/keyboards/aleblazer/zodiark/keymaps/slimoled/config.h +++ b/keyboards/aleblazer/zodiark/keymaps/slimoled/config.h @@ -16,7 +16,7 @@ along with this program. If not, see . */ #pragma once -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #define OLED_DISPLAY_128X32 #define OLED_TIMEOUT 400000 #endif diff --git a/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c b/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c index 4f97953fd..99c5c5e4e 100644 --- a/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c +++ b/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM qmk_logo[] = { diff --git a/keyboards/aleblazer/zodiark/keymaps/via/config.h b/keyboards/aleblazer/zodiark/keymaps/via/config.h index 0c89f634b..2e8732ecc 100644 --- a/keyboards/aleblazer/zodiark/keymaps/via/config.h +++ b/keyboards/aleblazer/zodiark/keymaps/via/config.h @@ -16,7 +16,7 @@ along with this program. If not, see . */ #pragma once -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #define OLED_DISPLAY_128X64 #define OLED_TIMEOUT 400000 #endif diff --git a/keyboards/aleblazer/zodiark/keymaps/via/oled.c b/keyboards/aleblazer/zodiark/keymaps/via/oled.c index 037fe2ff7..5e4959ab2 100644 --- a/keyboards/aleblazer/zodiark/keymaps/via/oled.c +++ b/keyboards/aleblazer/zodiark/keymaps/via/oled.c @@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM qmk_logo[] = { diff --git a/keyboards/aleblazer/zodiark/rules.mk b/keyboards/aleblazer/zodiark/rules.mk index 89e4850d8..fbb3e2f59 100644 --- a/keyboards/aleblazer/zodiark/rules.mk +++ b/keyboards/aleblazer/zodiark/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -20,7 +20,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C ENCODER_ENABLE = yes SPLIT_KEYBOARD = yes LTO_ENABLE = yes diff --git a/keyboards/aleth42/rev0/rules.mk b/keyboards/aleth42/rev0/rules.mk index a54fa022f..94e5bb278 100644 --- a/keyboards/aleth42/rev0/rules.mk +++ b/keyboards/aleth42/rev0/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/aleth42/rev1/rules.mk b/keyboards/aleth42/rev1/rules.mk index 9441d4051..d67ab1a68 100644 --- a/keyboards/aleth42/rev1/rules.mk +++ b/keyboards/aleth42/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/alf/dc60/config.h b/keyboards/alf/dc60/config.h index 42c3ebee2..0064da01f 100644 --- a/keyboards/alf/dc60/config.h +++ b/keyboards/alf/dc60/config.h @@ -167,23 +167,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/alf/dc60/rules.mk b/keyboards/alf/dc60/rules.mk index 576ae3cf6..ac57f9939 100644 --- a/keyboards/alf/dc60/rules.mk +++ b/keyboards/alf/dc60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/alf/x11/config.h b/keyboards/alf/x11/config.h index fdc7d72e0..d643cb29a 100644 --- a/keyboards/alf/x11/config.h +++ b/keyboards/alf/x11/config.h @@ -188,26 +188,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/alf/x11/rules.mk b/keyboards/alf/x11/rules.mk index 5d37e73dd..b6b687afb 100644 --- a/keyboards/alf/x11/rules.mk +++ b/keyboards/alf/x11/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/alf/x2/rules.mk b/keyboards/alf/x2/rules.mk index 22fd09140..485f8759c 100644 --- a/keyboards/alf/x2/rules.mk +++ b/keyboards/alf/x2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/alfredslab/swift65/solder/rules.mk b/keyboards/alfredslab/swift65/solder/rules.mk index 2c2853b57..d5207da28 100644 --- a/keyboards/alfredslab/swift65/solder/rules.mk +++ b/keyboards/alfredslab/swift65/solder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/allison/config.h b/keyboards/allison/config.h index f5ec5d90a..450ec893f 100644 --- a/keyboards/allison/config.h +++ b/keyboards/allison/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/allison/rules.mk b/keyboards/allison/rules.mk index c26a68e61..d98f8cd9a 100644 --- a/keyboards/allison/rules.mk +++ b/keyboards/allison/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/allison_numpad/config.h b/keyboards/allison_numpad/config.h index b0d53c132..46a9d1d44 100644 --- a/keyboards/allison_numpad/config.h +++ b/keyboards/allison_numpad/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/allison_numpad/rules.mk b/keyboards/allison_numpad/rules.mk index 3c176844b..d4b734601 100644 --- a/keyboards/allison_numpad/rules.mk +++ b/keyboards/allison_numpad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/alpha/rules.mk b/keyboards/alpha/rules.mk index dceb6e307..22a255138 100755 --- a/keyboards/alpha/rules.mk +++ b/keyboards/alpha/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/alpine65/rules.mk b/keyboards/alpine65/rules.mk index 61f925301..f287f3664 100644 --- a/keyboards/alpine65/rules.mk +++ b/keyboards/alpine65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/alps64/rules.mk b/keyboards/alps64/rules.mk index 7dbe8e7dd..766116e5e 100644 --- a/keyboards/alps64/rules.mk +++ b/keyboards/alps64/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change to no to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/alu84/rules.mk b/keyboards/alu84/rules.mk index 4c272a379..dff294e07 100755 --- a/keyboards/alu84/rules.mk +++ b/keyboards/alu84/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/amag23/rules.mk b/keyboards/amag23/rules.mk index fa292d5cc..e577250aa 100644 --- a/keyboards/amag23/rules.mk +++ b/keyboards/amag23/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/amj40/keymaps/fabian/rules.mk b/keyboards/amj40/keymaps/fabian/rules.mk index 90559e0dd..59a2cb09a 100644 --- a/keyboards/amj40/keymaps/fabian/rules.mk +++ b/keyboards/amj40/keymaps/fabian/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/amj40/keymaps/jetpacktuxedo/rules.mk b/keyboards/amj40/keymaps/jetpacktuxedo/rules.mk index 2b613b28e..780d48a43 100644 --- a/keyboards/amj40/keymaps/jetpacktuxedo/rules.mk +++ b/keyboards/amj40/keymaps/jetpacktuxedo/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/amj40/keymaps/myee/rules.mk b/keyboards/amj40/keymaps/myee/rules.mk index fe07e43d8..b8cc8b42c 100644 --- a/keyboards/amj40/keymaps/myee/rules.mk +++ b/keyboards/amj40/keymaps/myee/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/amj40/rules.mk b/keyboards/amj40/rules.mk index e2f9c8310..b91f40ae3 100755 --- a/keyboards/amj40/rules.mk +++ b/keyboards/amj40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/amj60/rules.mk b/keyboards/amj60/rules.mk index ff6eea50a..16f416140 100644 --- a/keyboards/amj60/rules.mk +++ b/keyboards/amj60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/amj96/config.h b/keyboards/amj96/config.h index 123bc618b..eaa33f628 100644 --- a/keyboards/amj96/config.h +++ b/keyboards/amj96/config.h @@ -151,26 +151,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 16 #define RGB_DI_PIN D3 diff --git a/keyboards/amj96/rules.mk b/keyboards/amj96/rules.mk index 6009b14d8..725e5a884 100644 --- a/keyboards/amj96/rules.mk +++ b/keyboards/amj96/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/amjkeyboard/amj66/rules.mk b/keyboards/amjkeyboard/amj66/rules.mk index 97fa9bc76..dd4b5e0de 100644 --- a/keyboards/amjkeyboard/amj66/rules.mk +++ b/keyboards/amjkeyboard/amj66/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/amjpad/keymaps/max/keymap.c b/keyboards/amjpad/keymaps/max/keymap.c index eb50567e9..7bfaed599 100644 --- a/keyboards/amjpad/keymaps/max/keymap.c +++ b/keyboards/amjpad/keymaps/max/keymap.c @@ -4,9 +4,6 @@ #include "rgblight.h" #endif -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -64,37 +61,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/amjpad/rules.mk b/keyboards/amjpad/rules.mk index f807eddc2..81aaacd2c 100644 --- a/keyboards/amjpad/rules.mk +++ b/keyboards/amjpad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/anavi/macropad2/config.h b/keyboards/anavi/macropad2/config.h deleted file mode 100644 index f0448e4d7..000000000 --- a/keyboards/anavi/macropad2/config.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright 2021 Leon Anavi - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License 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 0xCEEB -#define PRODUCT_ID 0x0002 -#define DEVICE_VER 0x0001 -#define MANUFACTURER ANAVI -#define PRODUCT Macro Pad 2 - -/* matrix size */ -#define MATRIX_ROWS 1 -#define MATRIX_COLS 2 - -/* - * Keyboard Matrix Assignments - * - * On this board we have direct connection: no diodes. - */ -#define DIRECT_PINS {{ B2, B0 }} - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -#define BACKLIGHT_PIN B1 -#define BACKLIGHT_LEVELS 2 -#define RGBLIGHT_SLEEP - -//#define RGBLED_NUM 2 -//#define RGB_DI_PIN B2 - -// Save as much space as we can... -#define LAYER_STATE_8BIT -#define NO_ACTION_LAYER -#define NO_ACTION_TAPPING -#define NO_ACTION_ONESHOT -#define NO_RESET - -// usbconfig.h overrides -#define USB_CFG_IOPORTNAME B -#define USB_CFG_DMINUS_BIT 3 -#define USB_CFG_DPLUS_BIT 4 -#define USB_COUNT_SOF 0 -#define USB_INTR_CFG PCMSK -#define USB_INTR_CFG_SET (1< - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_0, KC_1 - ) -}; - -const uint16_t PROGMEM test_combo[] = {KC_0, KC_1, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO_ACTION(test_combo)}; - -void process_combo_event(uint16_t combo_index, bool pressed) { - backlight_step(); -} diff --git a/keyboards/anavi/macropad2/keymaps/binary/rules.mk b/keyboards/anavi/macropad2/keymaps/binary/rules.mk deleted file mode 100644 index ab1e43818..000000000 --- a/keyboards/anavi/macropad2/keymaps/binary/rules.mk +++ /dev/null @@ -1 +0,0 @@ -COMBO_ENABLE = yes diff --git a/keyboards/anavi/macropad2/keymaps/copypaste/keymap.c b/keyboards/anavi/macropad2/keymaps/copypaste/keymap.c deleted file mode 100644 index cddc14188..000000000 --- a/keyboards/anavi/macropad2/keymaps/copypaste/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2021 Leon Anavi - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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( - C(KC_C), C(KC_V) - ) -}; - -const uint16_t PROGMEM test_combo[] = {C(KC_C), C(KC_V), COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO_ACTION(test_combo)}; - -void process_combo_event(uint16_t combo_index, bool pressed) { - backlight_step(); -} diff --git a/keyboards/anavi/macropad2/keymaps/copypaste/rules.mk b/keyboards/anavi/macropad2/keymaps/copypaste/rules.mk deleted file mode 100644 index ab1e43818..000000000 --- a/keyboards/anavi/macropad2/keymaps/copypaste/rules.mk +++ /dev/null @@ -1 +0,0 @@ -COMBO_ENABLE = yes diff --git a/keyboards/anavi/macropad2/keymaps/default/keymap.c b/keyboards/anavi/macropad2/keymaps/default/keymap.c deleted file mode 100644 index c880ff660..000000000 --- a/keyboards/anavi/macropad2/keymaps/default/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2021 Leon Anavi - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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_A, KC_B - ) -}; - -const uint16_t PROGMEM test_combo[] = {KC_A, KC_B, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO_ACTION(test_combo)}; - -void process_combo_event(uint16_t combo_index, bool pressed) { - backlight_step(); -} diff --git a/keyboards/anavi/macropad2/keymaps/default/rules.mk b/keyboards/anavi/macropad2/keymaps/default/rules.mk deleted file mode 100644 index ab1e43818..000000000 --- a/keyboards/anavi/macropad2/keymaps/default/rules.mk +++ /dev/null @@ -1 +0,0 @@ -COMBO_ENABLE = yes diff --git a/keyboards/anavi/macropad2/keymaps/git/keymap.c b/keyboards/anavi/macropad2/keymaps/git/keymap.c deleted file mode 100644 index 8580af195..000000000 --- a/keyboards/anavi/macropad2/keymaps/git/keymap.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright 2021 Leon Anavi - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H - -enum custom_keycodes { - GITCOMMIT = SAFE_RANGE, - GITPUSH -}; - -void keyboard_post_init_user(void) { - // Set backlight to the maximum brightness - backlight_level(2); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case GITCOMMIT: - if (record->event.pressed) { - SEND_STRING("git commit -s\n"); - } - break; - case GITPUSH: - if (record->event.pressed) { - SEND_STRING("git push\n"); - } - } - return true; -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - GITCOMMIT, GITPUSH - ) -}; diff --git a/keyboards/anavi/macropad2/keymaps/google-meet/keymap.c b/keyboards/anavi/macropad2/keymaps/google-meet/keymap.c deleted file mode 100644 index 03bc38812..000000000 --- a/keyboards/anavi/macropad2/keymaps/google-meet/keymap.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2021 Leon Anavi - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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 - -/* - * The keymap contains the following shortcuts for Google Meet: - * - * Ctrl+D: Mute/unmute my audio - * Ctrl+E: Start/stop video - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - LCTL(KC_D), LCTL(KC_E) - ) -}; - -const uint16_t PROGMEM test_combo[] = {LCTL(KC_D), LCTL(KC_E), COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO_ACTION(test_combo)}; - -void process_combo_event(uint16_t combo_index, bool pressed) { - backlight_step(); -} diff --git a/keyboards/anavi/macropad2/keymaps/google-meet/rules.mk b/keyboards/anavi/macropad2/keymaps/google-meet/rules.mk deleted file mode 100644 index ab1e43818..000000000 --- a/keyboards/anavi/macropad2/keymaps/google-meet/rules.mk +++ /dev/null @@ -1 +0,0 @@ -COMBO_ENABLE = yes diff --git a/keyboards/anavi/macropad2/keymaps/jitsi/keymap.c b/keyboards/anavi/macropad2/keymaps/jitsi/keymap.c deleted file mode 100644 index afd1dd1d1..000000000 --- a/keyboards/anavi/macropad2/keymaps/jitsi/keymap.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2021 Leon Anavi - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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 - -/* - * Jitsi Meet keyboard shortcuts: - * V - Start or stop your camera - * M - Mute or unmute your microphone - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_M, KC_V - ) -}; - -const uint16_t PROGMEM test_combo[] = {KC_M, KC_V, COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO_ACTION(test_combo)}; - -void process_combo_event(uint16_t combo_index, bool pressed) { - backlight_step(); -} diff --git a/keyboards/anavi/macropad2/keymaps/jitsi/rules.mk b/keyboards/anavi/macropad2/keymaps/jitsi/rules.mk deleted file mode 100644 index ab1e43818..000000000 --- a/keyboards/anavi/macropad2/keymaps/jitsi/rules.mk +++ /dev/null @@ -1 +0,0 @@ -COMBO_ENABLE = yes diff --git a/keyboards/anavi/macropad2/keymaps/msteams/keymap.c b/keyboards/anavi/macropad2/keymaps/msteams/keymap.c deleted file mode 100644 index 977b4e65f..000000000 --- a/keyboards/anavi/macropad2/keymaps/msteams/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2021 Leon Anavi - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H - -/* - * This keymap contains the following shortcuts for Microsoft Teams - * on MS Windows and GNU/Linux distributions: - * - * Ctrl+Shift+M: Toggle mute - * Ctrl+Shift+O: Toggle video (doesn't work in a web browser) - * - * NOTE: Mac users should replace Ctrl with Command in all - * shortcuts - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - LCTL(LSFT(KC_M)), LCTL(LSFT(KC_O)) - ) -}; - -const uint16_t PROGMEM test_combo[] = {LCTL(LSFT(KC_M)), LCTL(LSFT(KC_O)), COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO_ACTION(test_combo)}; - -void process_combo_event(uint16_t combo_index, bool pressed) { - backlight_step(); -} diff --git a/keyboards/anavi/macropad2/keymaps/msteams/rules.mk b/keyboards/anavi/macropad2/keymaps/msteams/rules.mk deleted file mode 100644 index ab1e43818..000000000 --- a/keyboards/anavi/macropad2/keymaps/msteams/rules.mk +++ /dev/null @@ -1 +0,0 @@ -COMBO_ENABLE = yes diff --git a/keyboards/anavi/macropad2/keymaps/mute/keymap.c b/keyboards/anavi/macropad2/keymaps/mute/keymap.c deleted file mode 100644 index 642bf66a8..000000000 --- a/keyboards/anavi/macropad2/keymaps/mute/keymap.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2021 Leon Anavi - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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_AUDIO_MUTE, BL_TOGG - ) -}; diff --git a/keyboards/anavi/macropad2/keymaps/mute/rules.mk b/keyboards/anavi/macropad2/keymaps/mute/rules.mk deleted file mode 100644 index a8b145934..000000000 --- a/keyboards/anavi/macropad2/keymaps/mute/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -EXTRAKEY_ENABLE = yes -BACKLIGHT_ENABLE = no diff --git a/keyboards/anavi/macropad2/keymaps/skype/keymap.c b/keyboards/anavi/macropad2/keymaps/skype/keymap.c deleted file mode 100644 index b05137ede..000000000 --- a/keyboards/anavi/macropad2/keymaps/skype/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2021 Leon Anavi - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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 - -/* - * The keymap contains the following shortcuts for Skype on - * MS Windows and GNU/Linux distributions: - * - * Ctrl+M: Mute/unmute microphone - * Ctrl+Shift+K: Start/stop camera - * - * NOTE: Mac users should change the shortcut to toggle the mic - * to Command+Shift+M, for example KC_LGUI(LSFT(KC_M)) - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - LCTL(KC_M), LCTL(LSFT(KC_K)) - ) -}; - -const uint16_t PROGMEM test_combo[] = {LCTL(KC_M), LCTL(LSFT(KC_K)), COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO_ACTION(test_combo)}; - -void process_combo_event(uint16_t combo_index, bool pressed) { - backlight_step(); -} diff --git a/keyboards/anavi/macropad2/keymaps/skype/rules.mk b/keyboards/anavi/macropad2/keymaps/skype/rules.mk deleted file mode 100644 index ab1e43818..000000000 --- a/keyboards/anavi/macropad2/keymaps/skype/rules.mk +++ /dev/null @@ -1 +0,0 @@ -COMBO_ENABLE = yes diff --git a/keyboards/anavi/macropad2/keymaps/tap_dance/keymap.c b/keyboards/anavi/macropad2/keymaps/tap_dance/keymap.c deleted file mode 100644 index 63854a62e..000000000 --- a/keyboards/anavi/macropad2/keymaps/tap_dance/keymap.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2021 Leon Anavi - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H - -enum layers { - _BASE = 0, -}; - -enum { - TD_BC = 0 -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_BC] = ACTION_TAP_DANCE_DOUBLE(KC_B, KC_C) -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT( - KC_A, TD(TD_BC) - ) -}; diff --git a/keyboards/anavi/macropad2/keymaps/volume/keymap.c b/keyboards/anavi/macropad2/keymaps/volume/keymap.c deleted file mode 100644 index f9ad20d5c..000000000 --- a/keyboards/anavi/macropad2/keymaps/volume/keymap.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2021 Leon Anavi - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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_VOLU, KC_VOLD - ) -}; diff --git a/keyboards/anavi/macropad2/keymaps/volume/rules.mk b/keyboards/anavi/macropad2/keymaps/volume/rules.mk deleted file mode 100644 index a8b145934..000000000 --- a/keyboards/anavi/macropad2/keymaps/volume/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -EXTRAKEY_ENABLE = yes -BACKLIGHT_ENABLE = no diff --git a/keyboards/anavi/macropad2/keymaps/zoom/keymap.c b/keyboards/anavi/macropad2/keymaps/zoom/keymap.c deleted file mode 100644 index 4f681d17f..000000000 --- a/keyboards/anavi/macropad2/keymaps/zoom/keymap.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2021 Leon Anavi - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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 - -/* - * The keymap contains the following shortcuts for Zoom meeting: - * - * Alt+A: Mute/unmute my audio - * Alt+V: Start/stop video - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - LALT(KC_A), LALT(KC_V) - ) -}; - -const uint16_t PROGMEM test_combo[] = {LALT(KC_A), LALT(KC_V), COMBO_END}; -combo_t key_combos[COMBO_COUNT] = {COMBO_ACTION(test_combo)}; - -void process_combo_event(uint16_t combo_index, bool pressed) { - backlight_step(); -} diff --git a/keyboards/anavi/macropad2/keymaps/zoom/rules.mk b/keyboards/anavi/macropad2/keymaps/zoom/rules.mk deleted file mode 100644 index ab1e43818..000000000 --- a/keyboards/anavi/macropad2/keymaps/zoom/rules.mk +++ /dev/null @@ -1 +0,0 @@ -COMBO_ENABLE = yes diff --git a/keyboards/anavi/macropad2/macropad2.c b/keyboards/anavi/macropad2/macropad2.c deleted file mode 100644 index 0a95d5d27..000000000 --- a/keyboards/anavi/macropad2/macropad2.c +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2021 Leon Anavi - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include "macropad2.h" diff --git a/keyboards/anavi/macropad2/macropad2.h b/keyboards/anavi/macropad2/macropad2.h deleted file mode 100644 index f3d43ad4f..000000000 --- a/keyboards/anavi/macropad2/macropad2.h +++ /dev/null @@ -1,35 +0,0 @@ -/* -Copyright 2021 Leon Anavi - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include "quantum.h" - -/* This a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ -#define LAYOUT( \ - K01, K02 \ -) \ -{ \ - { K01, K02 }, \ -} diff --git a/keyboards/anavi/macropad2/readme.md b/keyboards/anavi/macropad2/readme.md deleted file mode 100644 index 00d96cf8a..000000000 --- a/keyboards/anavi/macropad2/readme.md +++ /dev/null @@ -1,55 +0,0 @@ -# ANAVI Macro Pad 2 - - -ANAVI Macro Pad 2 is an open source, custom programmable, tiny 2% mechanical keyboard/keypad with backlit. Each of the two keys allows you to reprogram and use it as macro keypad or even dedicated shortcut keys. - -ANAVI Macro Pad 2 can be customized for multiple use cases across various industries. It is the perfect fit for copy and paste as well as video conferencing applications. You can easily turn the camera or microphone on or off. Various keymaps are available, including for Zoom, Jitsi, Skype, Microsoft Teams, Google Meet, and Git. - -Powered by Microchip ATtiny 85 microcontroller and with microUSB connector. Only free and open source software tools like KiCad, OpenSCAD, and Inkscape were used to design ANAVI Macro Pad 2. ANAVI Macro Pad 2 relies on QMK firmware, Micronucleus and V-USB. - -* Keyboard Maintainer: [Leon Anavi](https://github.com/leon-anavi) -* Hardware Supported: ANAVI Macro Pad 2 -* Hardware Availability: [PCB Files](https://github.com/AnaviTechnology/anavi-macro-pad-2) -* [User's Manual](https://github.com/AnaviTechnology/anavi-docs/blob/master/anavi-macro-pad-2/anavi-macro-pad-2.md) - -**Note**: Due to limited firmware space, a _**lot**_ of features have to be disabled to get a functioning QMK based keyboard. - -Make example for this keyboard (after setting up your build environment): - - make anavi/macropad2: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). - -## Flashing -### Prerequisites - -```bash -git clone https://github.com/micronucleus/micronucleus.git -cd micronucleus/commandline/ -sudo make install -``` - -On GNU/Linux distributions, you will need proper privileges to access the MCU. You can either use `sudo` when flashing firmware, or place [these files](https://github.com/micronucleus/micronucleus/blob/master/commandline/49-micronucleus.rules) in /etc/udev/rules.d/. Once added run the following: - -```bash -sudo udevadm control --reload-rules -sudo udevadm trigger -``` - -### Instructions - -* Run one of the following commands: - -```bash -make anavi/macropad2:default:flash - -# or directly with... -micronucleus --run -``` - -* Plug ANAVI Macro Pad 2 to the USB port and the flashing procedure should start - -### Recovery - -* [Original Firmware](https://github.com/AnaviTechnology/anavi-macro-pad-2/tree/main/bootloader) -* [Bootloader Repair](https://digistump.com/wiki/digispark/tutorials/proisp) diff --git a/keyboards/anavi/macropad2/rules.mk b/keyboards/anavi/macropad2/rules.mk deleted file mode 100644 index 984142590..000000000 --- a/keyboards/anavi/macropad2/rules.mk +++ /dev/null @@ -1,34 +0,0 @@ -# MCU name -MCU = attiny85 - -# Bootloader selection -BOOTLOADER = micronucleus -OPT_DEFS += -DBOOTLOADER_SIZE=1862 -PROGRAM_CMD = micronucleus --run $(BUILD_DIR)/$(TARGET).hex - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output - -# Save as much space as we can... -LTO_ENABLE = yes -GRAVE_ESC_ENABLE = no -MAGIC_ENABLE = no -SPACE_CADET_ENABLE = no - -BACKLIGHT_DRIVER = software diff --git a/keyboards/anavi/macropad8/config.h b/keyboards/anavi/macropad8/config.h index fd9d6e357..4ec8c7312 100644 --- a/keyboards/anavi/macropad8/config.h +++ b/keyboards/anavi/macropad8/config.h @@ -64,7 +64,7 @@ along with this program. If not, see . # define RGBLIGHT_LIMIT_VAL 255 #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # define OLED_DISPLAY_128X64 # define OLED_TIMEOUT 60000 # define OLED_FONT_H "keyboards/anavi/macropad8/glcdfont.c" diff --git a/keyboards/anavi/macropad8/keymaps/default/config.h b/keyboards/anavi/macropad8/keymaps/default/config.h new file mode 100644 index 000000000..dd687cad5 --- /dev/null +++ b/keyboards/anavi/macropad8/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define LAYER_STATE_8BIT diff --git a/keyboards/anavi/macropad8/keymaps/default/keymap.c b/keyboards/anavi/macropad8/keymaps/default/keymap.c index 68fbdf0d1..5b69532e1 100644 --- a/keyboards/anavi/macropad8/keymaps/default/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/default/keymap.c @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/anavi/macropad8/keymaps/git/keymap.c b/keyboards/anavi/macropad8/keymaps/git/keymap.c index 0b0099fd5..c1f1681ec 100644 --- a/keyboards/anavi/macropad8/keymaps/git/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/git/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/anavi/macropad8/keymaps/kicad/keymap.c b/keyboards/anavi/macropad8/keymaps/kicad/keymap.c index 938d0d53f..ba4755034 100644 --- a/keyboards/anavi/macropad8/keymaps/kicad/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/kicad/keymap.c @@ -50,7 +50,7 @@ const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {20, 10, 4}; * F1 - zoom in * F2 - zoom out * F4 - zoom center - * + * */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c index 72022a01b..61cedc810 100644 --- a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/anavi/macropad8/keymaps/obs/keymap.c b/keyboards/anavi/macropad8/keymaps/obs/keymap.c index 0c78883cf..e740482bb 100644 --- a/keyboards/anavi/macropad8/keymaps/obs/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/obs/keymap.c @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/anavi/macropad8/keymaps/zoom/keymap.c b/keyboards/anavi/macropad8/keymaps/zoom/keymap.c index 64f4f5b01..ef47102fa 100644 --- a/keyboards/anavi/macropad8/keymaps/zoom/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/zoom/keymap.c @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/anavi/macropad8/rules.mk b/keyboards/anavi/macropad8/rules.mk index d4443e3fe..63a7bb719 100644 --- a/keyboards/anavi/macropad8/rules.mk +++ b/keyboards/anavi/macropad8/rules.mk @@ -14,18 +14,18 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/angel17/alpha/config.h b/keyboards/angel17/alpha/config.h index a6d1fed8a..3a2455327 100644 --- a/keyboards/angel17/alpha/config.h +++ b/keyboards/angel17/alpha/config.h @@ -192,26 +192,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/angel17/alpha/rules.mk b/keyboards/angel17/alpha/rules.mk index a67a6c9a3..6ce1e4f3a 100644 --- a/keyboards/angel17/alpha/rules.mk +++ b/keyboards/angel17/alpha/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/angel17/rev1/config.h b/keyboards/angel17/rev1/config.h index 2364428c5..2d5baa81d 100644 --- a/keyboards/angel17/rev1/config.h +++ b/keyboards/angel17/rev1/config.h @@ -187,26 +187,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/angel17/rev1/rules.mk b/keyboards/angel17/rev1/rules.mk index 430c757c2..fb35bf08a 100644 --- a/keyboards/angel17/rev1/rules.mk +++ b/keyboards/angel17/rev1/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/angel17/rules.mk b/keyboards/angel17/rules.mk index b4a8f4b5f..4dc8b62c0 100644 --- a/keyboards/angel17/rules.mk +++ b/keyboards/angel17/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/angel64/alpha/config.h b/keyboards/angel64/alpha/config.h index 2e4430912..bb6820729 100644 --- a/keyboards/angel64/alpha/config.h +++ b/keyboards/angel64/alpha/config.h @@ -185,26 +185,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/angel64/alpha/keymaps/default/keymap.c b/keyboards/angel64/alpha/keymaps/default/keymap.c index 7e880e18c..802ff138b 100644 --- a/keyboards/angel64/alpha/keymaps/default/keymap.c +++ b/keyboards/angel64/alpha/keymaps/default/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_NO, _______, KC_NO, _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { diff --git a/keyboards/angel64/rev1/config.h b/keyboards/angel64/rev1/config.h index 2e4430912..bb6820729 100644 --- a/keyboards/angel64/rev1/config.h +++ b/keyboards/angel64/rev1/config.h @@ -185,26 +185,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/angel64/rev1/keymaps/default/keymap.c b/keyboards/angel64/rev1/keymaps/default/keymap.c index 905387ac9..ff06e418c 100644 --- a/keyboards/angel64/rev1/keymaps/default/keymap.c +++ b/keyboards/angel64/rev1/keymaps/default/keymap.c @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_RCTL), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { // Host Keyboard LED Status oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); diff --git a/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c b/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c index 6f70dd72c..3780c5e74 100644 --- a/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c +++ b/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c @@ -172,7 +172,7 @@ void matrix_scan_user(void) { #endif } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { diff --git a/keyboards/angel64/rules.mk b/keyboards/angel64/rules.mk index 9bb80ed5b..e5aaef9cb 100644 --- a/keyboards/angel64/rules.mk +++ b/keyboards/angel64/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,11 +25,11 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 CUSTOM_MATRIX = yes SRC += matrix.c diff --git a/keyboards/anomalykb/a65i/rules.mk b/keyboards/anomalykb/a65i/rules.mk index 40f8d3619..11ed41b34 100644 --- a/keyboards/anomalykb/a65i/rules.mk +++ b/keyboards/anomalykb/a65i/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/aos/tkl/rules.mk b/keyboards/aos/tkl/rules.mk index a56c38a8d..cecbc3896 100644 --- a/keyboards/aos/tkl/rules.mk +++ b/keyboards/aos/tkl/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/aplyard/aplx6/rev1/rules.mk b/keyboards/aplyard/aplx6/rev1/rules.mk index 905393fa3..19db5e93d 100644 --- a/keyboards/aplyard/aplx6/rev1/rules.mk +++ b/keyboards/aplyard/aplx6/rev1/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode diff --git a/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c b/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c index 91a76a828..5f3ec5b5d 100644 --- a/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c +++ b/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#if defined(OLED_DRIVER_ENABLE) +#if defined(OLED_ENABLE) static void render_logo(void) { //Logo for _MEDIA static const char PROGMEM logo1[] = { diff --git a/keyboards/aplyard/aplx6/rev2/rules.mk b/keyboards/aplyard/aplx6/rev2/rules.mk index 5a66a6aa9..44c93fe3b 100644 --- a/keyboards/aplyard/aplx6/rev2/rules.mk +++ b/keyboards/aplyard/aplx6/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,5 +21,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = yes # Unicode -OLED_DRIVER_ENABLE = yes # Enable Support for Oled Display +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable Support for Oled Display ENCODER_ENABLE = yes # Enable Support for Encoder diff --git a/keyboards/arabica37/keymaps/default/keymap.c b/keyboards/arabica37/keymaps/default/keymap.c index 877fb7347..5a363152d 100644 --- a/keyboards/arabica37/keymaps/default/keymap.c +++ b/keyboards/arabica37/keymaps/default/keymap.c @@ -139,7 +139,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { diff --git a/keyboards/arabica37/keymaps/default/rules.mk b/keyboards/arabica37/keymaps/default/rules.mk index c58266213..d34d066de 100644 --- a/keyboards/arabica37/keymaps/default/rules.mk +++ b/keyboards/arabica37/keymaps/default/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/arabica37/rev1/rules.mk b/keyboards/arabica37/rev1/rules.mk index 251868bbd..2fcce7f3b 100644 --- a/keyboards/arabica37/rev1/rules.mk +++ b/keyboards/arabica37/rev1/rules.mk @@ -13,7 +13,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/arch_36/keymaps/default/keymap.c b/keyboards/arch_36/keymaps/default/keymap.c index 48412f812..5dff79206 100644 --- a/keyboards/arch_36/keymaps/default/keymap.c +++ b/keyboards/arch_36/keymaps/default/keymap.c @@ -122,7 +122,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; @@ -229,69 +229,69 @@ static void render_status(void) { static void render_logo(void) { static const char PROGMEM logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x1c, 0x1c, 0x38, 0xf8, - 0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, - 0x03, 0x1f, 0x7f, 0xfe, 0xf0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x87, 0x9f, 0x3f, 0xfc, 0xf0, - 0xe0, 0xc0, 0x00, 0x01, 0x07, 0x0f, 0x3f, 0x3f, 0x7f, 0xfe, 0xfe, 0xee, 0xce, 0xfe, 0x8e, 0x0e, - 0xfe, 0x8e, 0x0e, 0xfe, 0x8e, 0x0e, 0xfe, 0xfe, 0x7e, 0xee, 0xdc, 0x9c, 0x38, 0x78, 0xf0, 0xe0, - 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf7, 0xe3, 0xc3, 0xc7, 0x8f, 0x0e, 0x1f, - 0x1f, 0x3f, 0x7f, 0x7f, 0xfe, 0xfc, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xe0, 0xe0, - 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe1, 0xe1, 0xe7, 0xff, 0xdb, 0xff, 0xff, 0x00, 0x00, 0x00, 0x03, - 0x1f, 0xff, 0xfe, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xfc, 0xff, 0xff, 0x8f, 0x8f, 0x0f, 0x0f, 0x0f, 0x0f, - 0x0e, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0f, 0x0f, 0x0c, 0x08, 0x0f, 0x0c, 0x08, - 0x0f, 0x0c, 0x08, 0x0f, 0x0c, 0x08, 0x0f, 0x0f, 0x0e, 0x07, 0x03, 0x01, 0x80, 0xc0, 0xe0, 0x40, - 0x01, 0x03, 0x07, 0x1f, 0xfe, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0xe0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf3, 0xf3, 0xf3, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xf3, 0xff, 0xff, 0x9f, 0x8f, 0x80, 0x80, 0xc0, 0xf0, 0xfc, - 0x7e, 0x1e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0xce, 0xce, 0xef, 0x67, 0x67, 0x6f, 0x6f, 0xef, 0xee, - 0xce, 0x8e, 0x0e, 0x0e, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0x60, - 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfc, 0xff, - 0xbf, 0x83, 0x8f, 0xff, 0xff, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, - 0x1c, 0x0c, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf8, 0xfc, 0x1c, 0x0e, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x0c, 0x06, 0x06, 0x06, - 0x0e, 0xfe, 0xfc, 0xf8, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x31, - 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0xff, - 0xef, 0xc7, 0x80, 0x00, 0x00, 0x00, 0xe0, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0x1b, 0x39, 0x70, 0xf0, - 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x3f, 0x3f, 0x1f, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x07, 0x3f, 0x3f, 0x3c, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x3f, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x1f, 0x1c, 0x38, 0x30, - 0x30, 0x30, 0x30, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x3f, 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x30, 0x30, 0x30, 0x30, 0x30, 0x38, 0x3f, - 0x1f, 0x1f, 0x0f, 0x00, 0x00, 0x00, 0x07, 0x1f, 0x1f, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x1f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xfc, 0x1c, 0x1c, 0x38, 0xf8, + 0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, + 0x03, 0x1f, 0x7f, 0xfe, 0xf0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x87, 0x9f, 0x3f, 0xfc, 0xf0, + 0xe0, 0xc0, 0x00, 0x01, 0x07, 0x0f, 0x3f, 0x3f, 0x7f, 0xfe, 0xfe, 0xee, 0xce, 0xfe, 0x8e, 0x0e, + 0xfe, 0x8e, 0x0e, 0xfe, 0x8e, 0x0e, 0xfe, 0xfe, 0x7e, 0xee, 0xdc, 0x9c, 0x38, 0x78, 0xf0, 0xe0, + 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf7, 0xe3, 0xc3, 0xc7, 0x8f, 0x0e, 0x1f, + 0x1f, 0x3f, 0x7f, 0x7f, 0xfe, 0xfc, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xe0, 0xe0, + 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe1, 0xe1, 0xe7, 0xff, 0xdb, 0xff, 0xff, 0x00, 0x00, 0x00, 0x03, + 0x1f, 0xff, 0xfe, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0xfc, 0xff, 0xff, 0x8f, 0x8f, 0x0f, 0x0f, 0x0f, 0x0f, + 0x0e, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0f, 0x0f, 0x0c, 0x08, 0x0f, 0x0c, 0x08, + 0x0f, 0x0c, 0x08, 0x0f, 0x0c, 0x08, 0x0f, 0x0f, 0x0e, 0x07, 0x03, 0x01, 0x80, 0xc0, 0xe0, 0x40, + 0x01, 0x03, 0x07, 0x1f, 0xfe, 0xfc, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0xe0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf3, 0xf3, 0xf3, 0x03, 0x03, 0x03, 0x03, + 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0xf3, 0xff, 0xff, 0x9f, 0x8f, 0x80, 0x80, 0xc0, 0xf0, 0xfc, + 0x7e, 0x1e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0xce, 0xce, 0xef, 0x67, 0x67, 0x6f, 0x6f, 0xef, 0xee, + 0xce, 0x8e, 0x0e, 0x0e, 0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0x60, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfc, 0xff, + 0xbf, 0x83, 0x8f, 0xff, 0xff, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, + 0x1c, 0x0c, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf8, 0xfc, 0x1c, 0x0e, 0x06, + 0x06, 0x06, 0x06, 0x06, 0x04, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x0c, 0x06, 0x06, 0x06, + 0x0e, 0xfe, 0xfc, 0xf8, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x33, 0x33, 0x33, 0x33, 0x33, 0x31, + 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0xff, + 0xef, 0xc7, 0x80, 0x00, 0x00, 0x00, 0xe0, 0xf8, 0xfc, 0x7e, 0x3f, 0x1f, 0x1b, 0x39, 0x70, 0xf0, + 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x3f, 0x3f, 0x1f, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x07, 0x3f, 0x3f, 0x3c, 0x20, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x0f, 0x1f, 0x1c, 0x38, 0x30, + 0x30, 0x30, 0x30, 0x38, 0x18, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x3f, 0x3f, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x30, 0x30, 0x30, 0x30, 0x30, 0x38, 0x3f, + 0x1f, 0x1f, 0x0f, 0x00, 0x00, 0x00, 0x07, 0x1f, 0x1f, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x3c, 0x1f, 0x0f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/keyboards/arch_36/keymaps/obosob/config.h b/keyboards/arch_36/keymaps/obosob/config.h index 02be7b511..a60cafb5d 100644 --- a/keyboards/arch_36/keymaps/obosob/config.h +++ b/keyboards/arch_36/keymaps/obosob/config.h @@ -16,7 +16,7 @@ #pragma once -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #define OLED_DISPLAY_128X64 #endif diff --git a/keyboards/arch_36/keymaps/obosob/keymap.c b/keyboards/arch_36/keymaps/obosob/keymap.c index a938314ac..00e1a837b 100644 --- a/keyboards/arch_36/keymaps/obosob/keymap.c +++ b/keyboards/arch_36/keymaps/obosob/keymap.c @@ -67,9 +67,9 @@ enum keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Qwerty ________ ________ -// ________| E |________ ________| I |________ +// ________| E |________ ________| I |________ // | W | | R |________ ________| U | | O | -// ________| |________| | T | | Y | |________| |________ +// ________| |________| | T | | Y | |________| |________ // | Q |________| D |________| | | |________| K |________| P | // | | S | | F |________| |________| J | | L | | // |________| |________| | G | | H | |________| |________| @@ -79,9 +79,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // | Z |________| |________| | | |________| |________| ? | // | | | Esc |________| |________| Tab | | / | // |________| | Ctrl | Enter |________ ________| Space | Alt | |________| -// |________| NUM | Del | | BkSp | NAV |________| +// |________| NUM | Del | | BkSp | NAV |________| // ________| Shift | | Shift |________ -// |________| |________| +// |________| |________| [_QWERTY] = LAYOUT_split_3x5_3( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, @@ -90,9 +90,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MY_ESC, MY_ENT, MY_DEL, MY_BSPC, MY_SPC, MY_TAB ), // Colemak (Mod-DH) ________ ________ -// ________| F |________ ________| U |________ +// ________| F |________ ________| U |________ // | W | | P |________ ________| L | | Y | -// ________| |________| | B | | J | |________| |________ +// ________| |________| | B | | J | |________| |________ // | Q |________| S |________| | | |________| E |________| : | // | | R | | T |________| |________| N | | I | ; | // |________| |________| | G | | K | |________| |________| @@ -102,9 +102,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // | Z |________| |________| | | |________| |________| ? | // | | | Esc |________| |________| Tab | | / | // |________| | Ctrl | Enter |________ ________| Space | Alt | |________| -// |________| NUM | Del | | BkSp | NAV |________| +// |________| NUM | Del | | BkSp | NAV |________| // ________| Shift | | Shift |________ -// |________| |________| +// |________| |________| [_COLMAK] = LAYOUT_split_3x5_3( KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, @@ -113,9 +113,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MY_ESC, MY_ENT, MY_DEL, MY_BSPC, MY_SPC, MY_TAB ), // Number ________ ________ -// ________| F3 |________ ________| 8 |________ +// ________| F3 |________ ________| 8 |________ // | F2 | | F4 |________ ________| 7 | | 9 | -// ________| |________| | | | + | |________| |________ +// ________| |________| | | | + | |________| |________ // | F1 |________| F7 |________| | | |________| 5 |________| / | // | | F6 | | F8 |________| |________| 4 | | 6 | | // |________| |________| | | | 0 | |________| |________| @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // | F9 |________| |________| | | |________| |________| * | // | | | |________| |________| | | | // |________| | | |________ ________| ADJUST | | |________| -// |________| **** | | | | |________| +// |________| **** | | | | |________| // |________| | | |________| // |________| |________| [_NUM] = LAYOUT_split_3x5_3( @@ -135,9 +135,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, _______, XXXXXXX, _______, _______, KC_0 ), // Navigation ________ ________ -// ________| OS |________ ________| PgUp |________ +// ________| OS |________ ________| PgUp |________ // | OS | Ctrl | OS |________ ________| PgDn | | End | -// ________| Alt |________| Shift | AltTab | | Home | |________| |________ +// ________| Alt |________| Shift | AltTab | | Home | |________| |________ // | OS |________| Ctrl |________| | | |________| Up |________| PrtScr | // | Super | Alt | | Shift |________| |________| Down | | Right | | // |________| |________| | | | Left | |________| |________| @@ -147,19 +147,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // | |________| |________| | | |________| |________| | // | | | |________| |________| | | | // |________| | | ADJUST |________ ________| | | |________| -// |________| | | | | **** |________| +// |________| | | | | **** |________| // |________| | | |________| -// |________| |________| - [_NAV] = LAYOUT_split_3x5_3( +// |________| |________| + [_NAV] = LAYOUT_split_3x5_3( OS_GUI, OS_ALT, OS_CTL, OS_SFT, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_PSCR, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, AS_TAB, A_TAB, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______, XXXXXXX ), // Symbol ________ ________ -// ________| { |________ ________| |________ +// ________| { |________ ________| |________ // | > | | } |________ ________| | | | -// ________| |________| | ` | | | |________| |________ +// ________| |________| | ` | | | |________| |________ // | < |________| ( |________| | | |________| |________| | | // | | £ | | ) |________| |________| - | | & | | // |________| |________| | ^ | | _ | |________| |________| @@ -169,20 +169,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // | \ |________| |________| | | |________| |________| # | // | | | ? |________| |________| ! | | | // |________| | | ' |________ ________| . | | |________| -// |________| | " | | , | |________| +// |________| | " | | , | |________| // |________| | | |________| -// |________| |________| -// +// |________| |________| +// [_SYM] = LAYOUT_split_3x5_3( KC_LT, KC_GT, KC_LCBR, KC_RCBR, KC_GRV, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NUPI, KC_ASTR, KC_HASH, KC_LPRN, KC_RPRN, KC_CIRC, KC_UNDS, KC_MINS, XXXXXXX, KC_AMPR, KC_PIPE, KC_NUBS, KC_DLR, KC_LBRC, KC_RBRC, KC_DQUO, KC_EQL, KC_PLUS, _______, KC_PERC, KC_NUHS, - KC_QUES, KC_QUOT, KC_AT, KC_COMM, KC_DOT, KC_EXLM + KC_QUES, KC_QUOT, KC_AT, KC_COMM, KC_DOT, KC_EXLM ), // Miscellaneous ________ ________ -// ________| {|} |________ ________| |________ +// ________| {|} |________ ________| |________ // | | | {|} |________ ________| | | | -// ________| |________| | | | | |________| |________ +// ________| |________| | | | | |________| |________ // | <|> |________| (|) |________| | | |________| |________| | // | | | | (|) |________| |________| | | | | // |________| |________| | | | | |________| |________| @@ -192,7 +192,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // | |________| |________| | | |________| |________| | // | | | ?_^ |________| |________| !_^ | | | // |________| | | '|' |________ ________| ._^ | | |________| -// |________| | "|" | | ,_ | |________| +// |________| | "|" | | ,_ | |________| // |________| | | |________| // |________| |________| // @@ -203,9 +203,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { QUESSPC, QUOT, DQUOT, COMMSPC, DOTSPC, EXLMSPC ), // Adjust ________ ________ -// ________| RESET |________ ________| |________ +// ________| RESET |________ ________| |________ // | | EEPROM | RESET |________ ________| | | | -// ________| |________| | | | | |________| |________ +// ________| |________| | | | | |________| |________ // | |________| RGB |________| | | |________| |________| | // | | RGB | Hue+ | RGB |________| |________| | | | | // |________| Toggle |________| Sat+ | RGB | | | |________| |________| @@ -215,13 +215,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // | |________| |________| Bri- | | |________| |________| | // | | | |________| |________| | | | // |________| | | |________ ________| | | |________| -// |________| **** | | | | **** |________| +// |________| **** | | | | **** |________| // |________| | | |________| // |________| |________| [_ADJUST] = LAYOUT_split_3x5_3( - XXXXXXX, WOKE, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, QWERTY, COLEMAK, XXXXXXX, XXXXXXX, - XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, WOKE, EEP_RST, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, QWERTY, COLEMAK, XXXXXXX, XXXXXXX, + XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), }; @@ -235,12 +235,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; case COLEMAK: if (record->event.pressed) { - set_single_persistent_default_layer(_COLMAK); + set_single_persistent_default_layer(_COLMAK); } return false; case SYM: @@ -396,7 +396,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return state; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #define ANIM_NUM_FRAMES 4 #define ANIM_FRAME_DURATION 100 @@ -530,273 +530,273 @@ static void render_logo(void) { static const char PROGMEM frame[ANIM_NUM_FRAMES][1024] = { { // leekspin: frame 0 - 0xff, 0xbf, 0xfb, 0x6f, 0xff, 0xdb, 0x7f, 0xf7, 0xde, 0x7c, 0xf1, 0xc6, 0x98, 0x21, 0x66, 0x9a, - 0xc9, 0x24, 0x33, 0xcf, 0x2f, 0xfd, 0xff, 0x6b, 0x7f, 0x9d, 0x81, 0x76, 0x14, 0x81, 0x67, 0x0f, - 0xfb, 0xff, 0xef, 0xbb, 0xff, 0xef, 0xbb, 0xff, 0xef, 0xbb, 0xff, 0xef, 0xbb, 0xff, 0xef, 0xbb, - 0xff, 0x6f, 0xfb, 0xdf, 0x77, 0xff, 0x0d, 0xe0, 0x3f, 0xc0, 0x0d, 0x37, 0xd0, 0x26, 0xa9, 0xd8, - 0xc7, 0x1d, 0xf0, 0xff, 0xff, 0xf0, 0xc7, 0xb1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf1, 0xc6, - 0xff, 0xf7, 0xf8, 0xf3, 0xcf, 0x90, 0xf7, 0xfc, 0xe3, 0x9b, 0x2e, 0xe2, 0xfc, 0x03, 0xfc, 0x7c, - 0x83, 0x1b, 0x6c, 0xa5, 0xb3, 0x4e, 0x59, 0x64, 0x13, 0xdb, 0xae, 0x20, 0xdf, 0xff, 0xbb, 0xef, - 0xff, 0xbb, 0xef, 0xdf, 0x7b, 0xef, 0xbf, 0xfb, 0x6f, 0xff, 0xdb, 0x7f, 0xf7, 0xdf, 0x7b, 0xef, - 0xff, 0xff, 0xdd, 0x77, 0xff, 0xdd, 0x77, 0xff, 0xdd, 0x77, 0xff, 0xdd, 0x77, 0xfe, 0xdc, 0xf1, - 0xcc, 0x23, 0x99, 0x64, 0x26, 0x98, 0x63, 0x0f, 0x30, 0xcc, 0x33, 0x24, 0xcd, 0x19, 0xe0, 0xff, - 0xff, 0xde, 0x7b, 0xef, 0xbe, 0xfb, 0xef, 0xbe, 0xfb, 0x6f, 0xfe, 0xdb, 0x7f, 0xf6, 0xdf, 0xfd, - 0xb7, 0xff, 0x6d, 0xff, 0xdb, 0xff, 0x00, 0xbd, 0x67, 0x48, 0x13, 0xfc, 0x85, 0xff, 0x5f, 0x3f, - 0xb7, 0x97, 0xcf, 0xcb, 0xeb, 0xcf, 0x97, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xef, 0x9f, 0xd7, 0xcf, 0xcb, 0xdf, 0xd7, 0xcf, 0x8f, 0x3f, 0x1f, 0x7f, 0xff, 0xfe, 0xff, 0xf2, - 0x07, 0xe9, 0x3e, 0x00, 0x35, 0xef, 0xc9, 0x1b, 0xc2, 0xbc, 0x37, 0xc0, 0xff, 0xbf, 0xfb, 0x6e, - 0xef, 0xfb, 0xde, 0xf7, 0xb7, 0xfd, 0xef, 0xbd, 0xf7, 0x77, 0xdd, 0xff, 0xb7, 0xfd, 0xef, 0xbb, - 0xff, 0xff, 0xdd, 0xf7, 0x7f, 0xdd, 0xf7, 0x7f, 0xdd, 0xf7, 0x7f, 0xdd, 0xf7, 0xbf, 0xed, 0xff, - 0xdf, 0xf7, 0xf6, 0x7c, 0xf9, 0xb1, 0xe6, 0xcb, 0x18, 0xa4, 0xb3, 0x09, 0xfc, 0xff, 0xfb, 0x6f, - 0xfe, 0xdf, 0xfb, 0xbf, 0xf7, 0x7e, 0xef, 0xfd, 0xb7, 0xff, 0x6d, 0xff, 0xdb, 0xff, 0xb6, 0xff, - 0x6d, 0xff, 0xdb, 0x7f, 0xf6, 0xdf, 0xf9, 0x21, 0x8e, 0xfb, 0x00, 0x7e, 0xc0, 0xff, 0xfe, 0xff, - 0xf7, 0xff, 0xff, 0xff, 0x3f, 0x3f, 0x7f, 0x7f, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x3f, 0x7f, 0x7f, 0x3f, 0x3f, 0x7f, 0x37, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xef, 0x3f, 0xc0, - 0x6e, 0x3b, 0x09, 0xe0, 0x6f, 0x1a, 0x92, 0x64, 0x6d, 0x99, 0xf2, 0x7f, 0xef, 0xfd, 0xb7, 0xff, - 0x7b, 0xde, 0xf7, 0xbf, 0xfb, 0x7e, 0xef, 0xbf, 0xff, 0xfb, 0xef, 0xbe, 0xfb, 0x6f, 0xfe, 0xdb, - 0xff, 0xff, 0xfe, 0xf7, 0xbf, 0xfb, 0xff, 0xbf, 0xef, 0xfd, 0xdf, 0xf7, 0x7d, 0xff, 0xee, 0x7f, - 0xf7, 0xbd, 0xff, 0xef, 0xfb, 0xbf, 0xfd, 0x77, 0xfe, 0xa0, 0xf9, 0xfe, 0xf0, 0xef, 0xbf, 0xf7, - 0x7f, 0xfb, 0xde, 0xff, 0xbb, 0xff, 0xf7, 0xbe, 0xfb, 0xdf, 0xff, 0xfd, 0xb7, 0xfe, 0xef, 0x7f, - 0xfb, 0xbf, 0xed, 0xff, 0xf7, 0xbe, 0xfb, 0xdf, 0xf0, 0x06, 0x98, 0xe7, 0x3c, 0x03, 0xcf, 0x2f, - 0x1f, 0x9f, 0x7f, 0x7f, 0x7e, 0xf8, 0xf1, 0xe6, 0xf8, 0xc9, 0xca, 0xfa, 0xc8, 0xda, 0xf2, 0xcc, - 0xd9, 0xf2, 0xe0, 0xed, 0xf1, 0xfa, 0xfc, 0x7f, 0x7f, 0x3f, 0xbf, 0x9f, 0x0f, 0xe3, 0x34, 0x8d, - 0xe3, 0x18, 0x17, 0x85, 0xa0, 0x38, 0xcf, 0x13, 0xf8, 0xef, 0xdd, 0x7f, 0xff, 0xf7, 0xfd, 0xef, - 0xbb, 0xff, 0x7f, 0xf7, 0xfd, 0xef, 0xbf, 0xfb, 0xee, 0xff, 0xff, 0xbb, 0xef, 0x7f, 0xfb, 0xee, - 0xff, 0xff, 0xde, 0xf7, 0xff, 0xef, 0xbd, 0xff, 0xdb, 0xff, 0xfe, 0x77, 0x7f, 0xf7, 0xfd, 0x7f, - 0xf7, 0xff, 0xdb, 0x7e, 0xff, 0xef, 0xfb, 0xff, 0xb7, 0xff, 0xc8, 0xff, 0xff, 0xff, 0xfc, 0x27, - 0xff, 0xff, 0xff, 0xed, 0xbf, 0xfe, 0xf7, 0x7f, 0xfb, 0xdf, 0xfe, 0xf7, 0xdf, 0xff, 0xfd, 0x6f, - 0xff, 0xbf, 0xfb, 0xff, 0xde, 0xff, 0xf7, 0xfd, 0xbf, 0x00, 0x77, 0x6c, 0x89, 0x11, 0x04, 0xa2, - 0x08, 0x69, 0x46, 0x90, 0x02, 0x64, 0x94, 0x24, 0x09, 0x91, 0x85, 0x21, 0x09, 0xff, 0xf7, 0xdd, - 0x3d, 0x37, 0x1d, 0x1d, 0x06, 0xc6, 0x07, 0x10, 0x20, 0x83, 0x84, 0x30, 0x66, 0x19, 0x92, 0x06, - 0x40, 0x31, 0x0c, 0xc0, 0x14, 0xb7, 0x09, 0xfa, 0xff, 0xdf, 0xfb, 0xbf, 0xfd, 0xf7, 0xef, 0xef, - 0xff, 0xdf, 0xf7, 0xff, 0x6e, 0xff, 0xff, 0xde, 0xf7, 0xff, 0x7e, 0xdb, 0xff, 0xb7, 0xff, 0xee, - 0xff, 0xff, 0x7f, 0xf6, 0xdf, 0xfd, 0xff, 0xff, 0xef, 0xbb, 0xfe, 0x7f, 0xf7, 0xdf, 0xff, 0xf7, - 0xdd, 0xff, 0xff, 0xbf, 0xed, 0xff, 0xfe, 0xef, 0x3f, 0xde, 0xee, 0xc9, 0xff, 0xff, 0xdf, 0xff, - 0xc9, 0xff, 0x9e, 0xdf, 0xdf, 0xb7, 0xfd, 0xff, 0xef, 0xff, 0xfb, 0xef, 0xfd, 0xbf, 0xf7, 0xff, - 0xbb, 0xef, 0xff, 0xfd, 0xff, 0xef, 0x7e, 0xff, 0xb1, 0x06, 0x7b, 0xc9, 0x00, 0x42, 0x98, 0x31, - 0x46, 0x44, 0x38, 0x89, 0xc4, 0x30, 0x00, 0x42, 0x10, 0x84, 0x20, 0x08, 0x81, 0x03, 0x10, 0x80, - 0x24, 0x00, 0x88, 0x21, 0x04, 0xc0, 0x08, 0xa1, 0x34, 0x4c, 0x03, 0x90, 0x46, 0x00, 0x30, 0xd1, - 0x04, 0x69, 0x88, 0x30, 0x22, 0xcb, 0x04, 0x3f, 0xfb, 0xff, 0xfd, 0x6f, 0xfe, 0xf7, 0xbf, 0xfe, - 0xdb, 0xff, 0xee, 0x7f, 0xf7, 0xbf, 0xfd, 0xef, 0x7e, 0xf7, 0xff, 0xdb, 0xff, 0xb7, 0xfe, 0x7b, - 0xff, 0xff, 0xff, 0xbb, 0xef, 0xff, 0xf6, 0xff, 0xbf, 0xef, 0xff, 0xdf, 0xfd, 0x7f, 0xfe, 0xbf, - 0xef, 0xfe, 0xff, 0xdf, 0xff, 0xfe, 0xff, 0xe4, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xfe, 0xfb, 0x37, 0xfd, 0xfe, 0xff, 0xff, 0x6f, 0xff, 0xf6, 0xff, 0xbf, 0xfb, 0xdf, - 0xff, 0xff, 0x77, 0x7f, 0x9d, 0x9f, 0x27, 0x21, 0xcc, 0x18, 0x63, 0x84, 0x80, 0x2a, 0x29, 0x44, - 0x59, 0x43, 0x94, 0x34, 0x42, 0x49, 0x2c, 0x92, 0x92, 0x64, 0x0c, 0x80, 0xb8, 0x22, 0x86, 0x34, - 0x48, 0x23, 0x34, 0x44, 0xc9, 0x18, 0x46, 0x09, 0x80, 0x72, 0x08, 0x61, 0x80, 0x9b, 0x12, 0x64, - 0x8d, 0x90, 0x23, 0xa8, 0x26, 0x44, 0x59, 0x89, 0x24, 0xd3, 0x1f, 0xff, 0xfd, 0xef, 0xff, 0x7d, - 0xef, 0xfe, 0xf7, 0xbf, 0xfb, 0xdf, 0x7d, 0xff, 0xf7, 0xbf, 0xfe, 0xdb, 0x7f, 0xfd, 0xff, 0xcf, - 0xff, 0xff, 0xfb, 0xff, 0x7f, 0xff, 0xb6, 0xff, 0xff, 0xff, 0xfd, 0xb7, 0xff, 0xfb, 0xbf, 0xff, - 0xef, 0xfb, 0x7e, 0xdf, 0xff, 0xf6, 0xff, 0xdf, 0xff, 0xed, 0xfb, 0xff, 0xef, 0x2f, 0xef, 0xef, - 0xf7, 0xf7, 0x9f, 0xfb, 0xfc, 0xff, 0xf7, 0xdf, 0xbb, 0x7f, 0xff, 0xef, 0xfe, 0xf7, 0x1f, 0x07, - 0xd1, 0x19, 0x22, 0x66, 0x44, 0x98, 0x8b, 0x21, 0x64, 0x1a, 0x42, 0xd4, 0x14, 0x23, 0xa8, 0x4d, - 0x91, 0x92, 0x64, 0x25, 0x99, 0x44, 0x23, 0x88, 0x50, 0x96, 0xa3, 0x18, 0x44, 0x65, 0x99, 0x22, - 0x8a, 0x69, 0x25, 0x86, 0xd8, 0x1d, 0xb7, 0x9a, 0x9e, 0x30, 0x8b, 0xe2, 0xcc, 0xd9, 0xe1, 0xfc, - 0xee, 0xf8, 0xfe, 0xe1, 0xc9, 0x06, 0x98, 0x69, 0x22, 0x92, 0x4c, 0x23, 0xa7, 0x1f, 0x7d, 0xff, - 0xff, 0xbf, 0xef, 0xfb, 0xbe, 0xef, 0x7f, 0xfb, 0xfe, 0x77, 0xff, 0xbf, 0xef, 0xfd, 0xf7, 0xff, + 0xff, 0xbf, 0xfb, 0x6f, 0xff, 0xdb, 0x7f, 0xf7, 0xde, 0x7c, 0xf1, 0xc6, 0x98, 0x21, 0x66, 0x9a, + 0xc9, 0x24, 0x33, 0xcf, 0x2f, 0xfd, 0xff, 0x6b, 0x7f, 0x9d, 0x81, 0x76, 0x14, 0x81, 0x67, 0x0f, + 0xfb, 0xff, 0xef, 0xbb, 0xff, 0xef, 0xbb, 0xff, 0xef, 0xbb, 0xff, 0xef, 0xbb, 0xff, 0xef, 0xbb, + 0xff, 0x6f, 0xfb, 0xdf, 0x77, 0xff, 0x0d, 0xe0, 0x3f, 0xc0, 0x0d, 0x37, 0xd0, 0x26, 0xa9, 0xd8, + 0xc7, 0x1d, 0xf0, 0xff, 0xff, 0xf0, 0xc7, 0xb1, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf1, 0xc6, + 0xff, 0xf7, 0xf8, 0xf3, 0xcf, 0x90, 0xf7, 0xfc, 0xe3, 0x9b, 0x2e, 0xe2, 0xfc, 0x03, 0xfc, 0x7c, + 0x83, 0x1b, 0x6c, 0xa5, 0xb3, 0x4e, 0x59, 0x64, 0x13, 0xdb, 0xae, 0x20, 0xdf, 0xff, 0xbb, 0xef, + 0xff, 0xbb, 0xef, 0xdf, 0x7b, 0xef, 0xbf, 0xfb, 0x6f, 0xff, 0xdb, 0x7f, 0xf7, 0xdf, 0x7b, 0xef, + 0xff, 0xff, 0xdd, 0x77, 0xff, 0xdd, 0x77, 0xff, 0xdd, 0x77, 0xff, 0xdd, 0x77, 0xfe, 0xdc, 0xf1, + 0xcc, 0x23, 0x99, 0x64, 0x26, 0x98, 0x63, 0x0f, 0x30, 0xcc, 0x33, 0x24, 0xcd, 0x19, 0xe0, 0xff, + 0xff, 0xde, 0x7b, 0xef, 0xbe, 0xfb, 0xef, 0xbe, 0xfb, 0x6f, 0xfe, 0xdb, 0x7f, 0xf6, 0xdf, 0xfd, + 0xb7, 0xff, 0x6d, 0xff, 0xdb, 0xff, 0x00, 0xbd, 0x67, 0x48, 0x13, 0xfc, 0x85, 0xff, 0x5f, 0x3f, + 0xb7, 0x97, 0xcf, 0xcb, 0xeb, 0xcf, 0x97, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xef, 0x9f, 0xd7, 0xcf, 0xcb, 0xdf, 0xd7, 0xcf, 0x8f, 0x3f, 0x1f, 0x7f, 0xff, 0xfe, 0xff, 0xf2, + 0x07, 0xe9, 0x3e, 0x00, 0x35, 0xef, 0xc9, 0x1b, 0xc2, 0xbc, 0x37, 0xc0, 0xff, 0xbf, 0xfb, 0x6e, + 0xef, 0xfb, 0xde, 0xf7, 0xb7, 0xfd, 0xef, 0xbd, 0xf7, 0x77, 0xdd, 0xff, 0xb7, 0xfd, 0xef, 0xbb, + 0xff, 0xff, 0xdd, 0xf7, 0x7f, 0xdd, 0xf7, 0x7f, 0xdd, 0xf7, 0x7f, 0xdd, 0xf7, 0xbf, 0xed, 0xff, + 0xdf, 0xf7, 0xf6, 0x7c, 0xf9, 0xb1, 0xe6, 0xcb, 0x18, 0xa4, 0xb3, 0x09, 0xfc, 0xff, 0xfb, 0x6f, + 0xfe, 0xdf, 0xfb, 0xbf, 0xf7, 0x7e, 0xef, 0xfd, 0xb7, 0xff, 0x6d, 0xff, 0xdb, 0xff, 0xb6, 0xff, + 0x6d, 0xff, 0xdb, 0x7f, 0xf6, 0xdf, 0xf9, 0x21, 0x8e, 0xfb, 0x00, 0x7e, 0xc0, 0xff, 0xfe, 0xff, + 0xf7, 0xff, 0xff, 0xff, 0x3f, 0x3f, 0x7f, 0x7f, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, + 0x3f, 0x7f, 0x7f, 0x3f, 0x3f, 0x7f, 0x37, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xef, 0x3f, 0xc0, + 0x6e, 0x3b, 0x09, 0xe0, 0x6f, 0x1a, 0x92, 0x64, 0x6d, 0x99, 0xf2, 0x7f, 0xef, 0xfd, 0xb7, 0xff, + 0x7b, 0xde, 0xf7, 0xbf, 0xfb, 0x7e, 0xef, 0xbf, 0xff, 0xfb, 0xef, 0xbe, 0xfb, 0x6f, 0xfe, 0xdb, + 0xff, 0xff, 0xfe, 0xf7, 0xbf, 0xfb, 0xff, 0xbf, 0xef, 0xfd, 0xdf, 0xf7, 0x7d, 0xff, 0xee, 0x7f, + 0xf7, 0xbd, 0xff, 0xef, 0xfb, 0xbf, 0xfd, 0x77, 0xfe, 0xa0, 0xf9, 0xfe, 0xf0, 0xef, 0xbf, 0xf7, + 0x7f, 0xfb, 0xde, 0xff, 0xbb, 0xff, 0xf7, 0xbe, 0xfb, 0xdf, 0xff, 0xfd, 0xb7, 0xfe, 0xef, 0x7f, + 0xfb, 0xbf, 0xed, 0xff, 0xf7, 0xbe, 0xfb, 0xdf, 0xf0, 0x06, 0x98, 0xe7, 0x3c, 0x03, 0xcf, 0x2f, + 0x1f, 0x9f, 0x7f, 0x7f, 0x7e, 0xf8, 0xf1, 0xe6, 0xf8, 0xc9, 0xca, 0xfa, 0xc8, 0xda, 0xf2, 0xcc, + 0xd9, 0xf2, 0xe0, 0xed, 0xf1, 0xfa, 0xfc, 0x7f, 0x7f, 0x3f, 0xbf, 0x9f, 0x0f, 0xe3, 0x34, 0x8d, + 0xe3, 0x18, 0x17, 0x85, 0xa0, 0x38, 0xcf, 0x13, 0xf8, 0xef, 0xdd, 0x7f, 0xff, 0xf7, 0xfd, 0xef, + 0xbb, 0xff, 0x7f, 0xf7, 0xfd, 0xef, 0xbf, 0xfb, 0xee, 0xff, 0xff, 0xbb, 0xef, 0x7f, 0xfb, 0xee, + 0xff, 0xff, 0xde, 0xf7, 0xff, 0xef, 0xbd, 0xff, 0xdb, 0xff, 0xfe, 0x77, 0x7f, 0xf7, 0xfd, 0x7f, + 0xf7, 0xff, 0xdb, 0x7e, 0xff, 0xef, 0xfb, 0xff, 0xb7, 0xff, 0xc8, 0xff, 0xff, 0xff, 0xfc, 0x27, + 0xff, 0xff, 0xff, 0xed, 0xbf, 0xfe, 0xf7, 0x7f, 0xfb, 0xdf, 0xfe, 0xf7, 0xdf, 0xff, 0xfd, 0x6f, + 0xff, 0xbf, 0xfb, 0xff, 0xde, 0xff, 0xf7, 0xfd, 0xbf, 0x00, 0x77, 0x6c, 0x89, 0x11, 0x04, 0xa2, + 0x08, 0x69, 0x46, 0x90, 0x02, 0x64, 0x94, 0x24, 0x09, 0x91, 0x85, 0x21, 0x09, 0xff, 0xf7, 0xdd, + 0x3d, 0x37, 0x1d, 0x1d, 0x06, 0xc6, 0x07, 0x10, 0x20, 0x83, 0x84, 0x30, 0x66, 0x19, 0x92, 0x06, + 0x40, 0x31, 0x0c, 0xc0, 0x14, 0xb7, 0x09, 0xfa, 0xff, 0xdf, 0xfb, 0xbf, 0xfd, 0xf7, 0xef, 0xef, + 0xff, 0xdf, 0xf7, 0xff, 0x6e, 0xff, 0xff, 0xde, 0xf7, 0xff, 0x7e, 0xdb, 0xff, 0xb7, 0xff, 0xee, + 0xff, 0xff, 0x7f, 0xf6, 0xdf, 0xfd, 0xff, 0xff, 0xef, 0xbb, 0xfe, 0x7f, 0xf7, 0xdf, 0xff, 0xf7, + 0xdd, 0xff, 0xff, 0xbf, 0xed, 0xff, 0xfe, 0xef, 0x3f, 0xde, 0xee, 0xc9, 0xff, 0xff, 0xdf, 0xff, + 0xc9, 0xff, 0x9e, 0xdf, 0xdf, 0xb7, 0xfd, 0xff, 0xef, 0xff, 0xfb, 0xef, 0xfd, 0xbf, 0xf7, 0xff, + 0xbb, 0xef, 0xff, 0xfd, 0xff, 0xef, 0x7e, 0xff, 0xb1, 0x06, 0x7b, 0xc9, 0x00, 0x42, 0x98, 0x31, + 0x46, 0x44, 0x38, 0x89, 0xc4, 0x30, 0x00, 0x42, 0x10, 0x84, 0x20, 0x08, 0x81, 0x03, 0x10, 0x80, + 0x24, 0x00, 0x88, 0x21, 0x04, 0xc0, 0x08, 0xa1, 0x34, 0x4c, 0x03, 0x90, 0x46, 0x00, 0x30, 0xd1, + 0x04, 0x69, 0x88, 0x30, 0x22, 0xcb, 0x04, 0x3f, 0xfb, 0xff, 0xfd, 0x6f, 0xfe, 0xf7, 0xbf, 0xfe, + 0xdb, 0xff, 0xee, 0x7f, 0xf7, 0xbf, 0xfd, 0xef, 0x7e, 0xf7, 0xff, 0xdb, 0xff, 0xb7, 0xfe, 0x7b, + 0xff, 0xff, 0xff, 0xbb, 0xef, 0xff, 0xf6, 0xff, 0xbf, 0xef, 0xff, 0xdf, 0xfd, 0x7f, 0xfe, 0xbf, + 0xef, 0xfe, 0xff, 0xdf, 0xff, 0xfe, 0xff, 0xe4, 0x3f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xfe, 0xfb, 0x37, 0xfd, 0xfe, 0xff, 0xff, 0x6f, 0xff, 0xf6, 0xff, 0xbf, 0xfb, 0xdf, + 0xff, 0xff, 0x77, 0x7f, 0x9d, 0x9f, 0x27, 0x21, 0xcc, 0x18, 0x63, 0x84, 0x80, 0x2a, 0x29, 0x44, + 0x59, 0x43, 0x94, 0x34, 0x42, 0x49, 0x2c, 0x92, 0x92, 0x64, 0x0c, 0x80, 0xb8, 0x22, 0x86, 0x34, + 0x48, 0x23, 0x34, 0x44, 0xc9, 0x18, 0x46, 0x09, 0x80, 0x72, 0x08, 0x61, 0x80, 0x9b, 0x12, 0x64, + 0x8d, 0x90, 0x23, 0xa8, 0x26, 0x44, 0x59, 0x89, 0x24, 0xd3, 0x1f, 0xff, 0xfd, 0xef, 0xff, 0x7d, + 0xef, 0xfe, 0xf7, 0xbf, 0xfb, 0xdf, 0x7d, 0xff, 0xf7, 0xbf, 0xfe, 0xdb, 0x7f, 0xfd, 0xff, 0xcf, + 0xff, 0xff, 0xfb, 0xff, 0x7f, 0xff, 0xb6, 0xff, 0xff, 0xff, 0xfd, 0xb7, 0xff, 0xfb, 0xbf, 0xff, + 0xef, 0xfb, 0x7e, 0xdf, 0xff, 0xf6, 0xff, 0xdf, 0xff, 0xed, 0xfb, 0xff, 0xef, 0x2f, 0xef, 0xef, + 0xf7, 0xf7, 0x9f, 0xfb, 0xfc, 0xff, 0xf7, 0xdf, 0xbb, 0x7f, 0xff, 0xef, 0xfe, 0xf7, 0x1f, 0x07, + 0xd1, 0x19, 0x22, 0x66, 0x44, 0x98, 0x8b, 0x21, 0x64, 0x1a, 0x42, 0xd4, 0x14, 0x23, 0xa8, 0x4d, + 0x91, 0x92, 0x64, 0x25, 0x99, 0x44, 0x23, 0x88, 0x50, 0x96, 0xa3, 0x18, 0x44, 0x65, 0x99, 0x22, + 0x8a, 0x69, 0x25, 0x86, 0xd8, 0x1d, 0xb7, 0x9a, 0x9e, 0x30, 0x8b, 0xe2, 0xcc, 0xd9, 0xe1, 0xfc, + 0xee, 0xf8, 0xfe, 0xe1, 0xc9, 0x06, 0x98, 0x69, 0x22, 0x92, 0x4c, 0x23, 0xa7, 0x1f, 0x7d, 0xff, + 0xff, 0xbf, 0xef, 0xfb, 0xbe, 0xef, 0x7f, 0xfb, 0xfe, 0x77, 0xff, 0xbf, 0xef, 0xfd, 0xf7, 0xff, }, { // leekspin: frame 1 - 0xff, 0xbf, 0xfb, 0xcf, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0xff, 0xff, 0xdf, - 0x77, 0xff, 0xdb, 0xff, 0xb7, 0xff, 0xfb, 0x6f, 0xff, 0xff, 0xdd, 0xf7, 0xff, 0xff, 0xff, 0xbb, - 0xef, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0x6f, 0xff, 0xbb, 0xef, - 0xff, 0xbb, 0xef, 0x7f, 0xdb, 0xff, 0x27, 0xd0, 0x5f, 0x60, 0x8d, 0x37, 0xe0, 0x8d, 0x31, 0xd8, - 0xc7, 0x1d, 0xf0, 0xff, 0xff, 0xf0, 0xcf, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf9, 0xc1, - 0xff, 0xfe, 0xf9, 0xe7, 0xcc, 0x91, 0xf7, 0xfc, 0xe3, 0x99, 0x2e, 0xe2, 0xfc, 0x03, 0xfc, 0x7c, - 0x03, 0x3b, 0xec, 0x85, 0x33, 0x76, 0xcd, 0xa8, 0x23, 0x5b, 0xee, 0x20, 0x9f, 0xff, 0x7b, 0xef, - 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0x6f, 0xff, 0xdb, 0xff, 0xb7, - 0xff, 0xff, 0x76, 0xdf, 0xfd, 0x77, 0xde, 0xfb, 0xbf, 0xf6, 0xdf, 0xfd, 0xb7, 0xff, 0x6d, 0xff, - 0xfe, 0xfb, 0xdf, 0xf6, 0xbf, 0xed, 0xff, 0xef, 0xbf, 0xf6, 0xff, 0xef, 0xfb, 0xbf, 0xee, 0xfb, - 0xbf, 0xee, 0xfb, 0xbf, 0xee, 0xfb, 0xbf, 0xee, 0xfb, 0xbf, 0xee, 0x7b, 0xdf, 0xfd, 0xb7, 0xfe, - 0xef, 0xbd, 0xf7, 0x7f, 0xed, 0xff, 0x00, 0x6e, 0xdb, 0x91, 0x24, 0xee, 0x09, 0xff, 0x5f, 0x3f, - 0xa7, 0x9f, 0xcb, 0xcb, 0xef, 0xcb, 0x9f, 0xb7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x8f, 0xd7, 0xdf, 0xcb, 0xcf, 0xd7, 0xdf, 0x8f, 0x3f, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xf0, - 0x07, 0xb3, 0xec, 0x08, 0x33, 0xf7, 0x8c, 0x66, 0x11, 0xdb, 0x2e, 0xa0, 0xff, 0xdf, 0xf7, 0xbd, - 0xef, 0xfe, 0xbb, 0xef, 0x7e, 0xdb, 0xff, 0xb6, 0xff, 0x6d, 0xff, 0xdb, 0xff, 0xb6, 0xff, 0x6d, - 0xff, 0xff, 0xb7, 0xfd, 0xef, 0xbb, 0xff, 0x6e, 0xfb, 0xdf, 0x76, 0xff, 0xdd, 0x77, 0xff, 0xef, - 0xbf, 0xfb, 0xf6, 0x7f, 0xef, 0xff, 0x7f, 0xed, 0xfd, 0xf7, 0xbf, 0xff, 0xde, 0xf7, 0xfd, 0xbf, - 0xf7, 0xde, 0xfb, 0xbf, 0xee, 0xfb, 0xdf, 0x76, 0xff, 0xed, 0xbf, 0xfb, 0x6f, 0xfe, 0xdb, 0xff, - 0xb6, 0xff, 0xed, 0xbf, 0xfb, 0x6f, 0xfc, 0x83, 0x32, 0xde, 0x00, 0xbf, 0xc0, 0xff, 0xfe, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xef, 0x3f, 0xc0, - 0xde, 0x33, 0x0c, 0xe0, 0xb7, 0x1c, 0x85, 0x70, 0x6f, 0x8d, 0xf0, 0x7f, 0xdf, 0xf7, 0xfe, 0xbb, - 0xef, 0x7f, 0xd9, 0xff, 0xbf, 0xf7, 0xff, 0x6f, 0xff, 0xfb, 0xff, 0xb6, 0xff, 0x6d, 0xff, 0xdb, - 0xff, 0xff, 0xff, 0xed, 0xbf, 0xfb, 0xff, 0xdf, 0xf7, 0xfd, 0x7f, 0xef, 0xbb, 0xff, 0xdd, 0xff, - 0x77, 0xfe, 0xef, 0xbb, 0xff, 0x7d, 0xef, 0xff, 0xb6, 0xff, 0xdd, 0xff, 0x7b, 0xde, 0xff, 0xed, - 0x7f, 0xfb, 0xde, 0xff, 0xb7, 0xfd, 0xff, 0xdb, 0x7f, 0xfe, 0xbb, 0xef, 0x7f, 0xdb, 0xfe, 0xef, - 0x7b, 0xfe, 0xef, 0x7d, 0xf7, 0xbf, 0xed, 0x7f, 0xf8, 0x02, 0xc6, 0xbd, 0x34, 0x47, 0x47, 0x9f, - 0x1f, 0x3f, 0x3f, 0x7f, 0x7e, 0xff, 0xff, 0xfe, 0xff, 0xfd, 0xfd, 0xff, 0xfe, 0xff, 0xfd, 0xff, - 0xfe, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0xff, 0x3f, 0x7f, 0x9f, 0x9f, 0x0d, 0xe3, 0x3a, 0x8c, - 0x63, 0x58, 0x17, 0x84, 0x21, 0xb8, 0xcf, 0x63, 0xd8, 0xff, 0xef, 0xbb, 0xff, 0xff, 0xfd, 0xf7, - 0xdd, 0xff, 0xbf, 0x7b, 0xff, 0xf6, 0xdf, 0xff, 0xb7, 0xfd, 0xff, 0xef, 0x7d, 0xdf, 0xfb, 0xee, - 0xff, 0xff, 0xbe, 0xef, 0xfb, 0x7f, 0xef, 0xbe, 0xfb, 0xff, 0x77, 0xff, 0xef, 0x7d, 0xff, 0xfb, - 0xff, 0xed, 0xff, 0xdf, 0x7d, 0xef, 0xff, 0xf6, 0x7f, 0xdf, 0xfd, 0xb7, 0xff, 0xfb, 0xdf, 0xfd, - 0xff, 0xb7, 0xff, 0xed, 0x7f, 0xfe, 0xb7, 0xff, 0xfb, 0xdf, 0xff, 0xf7, 0xff, 0xef, 0xff, 0x7d, - 0xef, 0xff, 0xb7, 0xff, 0xfd, 0xff, 0xdf, 0x77, 0xff, 0x80, 0x36, 0xed, 0x09, 0x12, 0x44, 0x21, - 0x0c, 0x51, 0x51, 0x86, 0x00, 0x58, 0x46, 0x30, 0x24, 0x85, 0x09, 0x21, 0x85, 0xff, 0x7b, 0xed, - 0x3d, 0x1d, 0x1d, 0x47, 0x0e, 0x8e, 0x23, 0x00, 0x22, 0x02, 0xc4, 0xb0, 0x26, 0x19, 0x4c, 0x03, - 0xc0, 0x18, 0x06, 0x60, 0x89, 0xbd, 0x02, 0xfa, 0xff, 0xff, 0xb6, 0xff, 0xfb, 0xbe, 0xf7, 0xf7, - 0xdf, 0x7f, 0xf7, 0xff, 0x6f, 0xfe, 0xff, 0xdf, 0xfb, 0x6f, 0xfe, 0xdf, 0x7b, 0xff, 0xf7, 0xde, - 0x23, 0xcf, 0x9f, 0x37, 0x7d, 0xff, 0xff, 0xf7, 0xff, 0xfb, 0x6f, 0xff, 0xdb, 0xff, 0xbf, 0xfe, - 0xdb, 0xef, 0xff, 0xff, 0xb7, 0xfd, 0x7f, 0xff, 0xef, 0xfb, 0x7f, 0xf7, 0xbd, 0xff, 0xde, 0xdf, - 0xfb, 0xdf, 0xde, 0xd7, 0xbf, 0xef, 0xfb, 0xf7, 0xfe, 0xfb, 0xfb, 0xfd, 0x7c, 0x7f, 0xfd, 0xfe, - 0x7d, 0xfd, 0x9e, 0x62, 0x6f, 0xff, 0xff, 0x7f, 0xd2, 0x08, 0xef, 0x31, 0x00, 0x42, 0x48, 0x39, - 0x86, 0x60, 0x0c, 0xd9, 0x90, 0x20, 0x02, 0x10, 0x44, 0x08, 0x02, 0x10, 0x40, 0x03, 0x11, 0x80, - 0x20, 0x24, 0x81, 0x08, 0x42, 0x90, 0x04, 0xc1, 0x78, 0x06, 0x24, 0x09, 0x42, 0x40, 0x98, 0x22, - 0x30, 0xc9, 0x88, 0x32, 0x44, 0x4d, 0x80, 0x3f, 0xff, 0xfe, 0xf7, 0x7f, 0xed, 0xbf, 0xfe, 0xf7, - 0xbf, 0xfb, 0xdf, 0xfd, 0xef, 0x7f, 0xfb, 0xde, 0xff, 0xef, 0xfb, 0xbf, 0xff, 0x6d, 0xff, 0xf6, - 0x92, 0x24, 0x65, 0x99, 0xc6, 0x30, 0x8b, 0x67, 0x37, 0x87, 0x6f, 0xff, 0xf5, 0x77, 0x7f, 0xfe, - 0xff, 0xef, 0xfe, 0x7f, 0xf7, 0xed, 0x0f, 0xfe, 0xfe, 0xfb, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0x7f, 0xb6, 0xec, 0xfe, 0xff, 0x7e, 0xef, 0xff, 0x7f, 0xf7, 0xff, 0xbf, - 0xef, 0xff, 0xf7, 0x7f, 0x1f, 0x9f, 0x63, 0x03, 0xdc, 0x90, 0x23, 0x8a, 0x20, 0x05, 0xc9, 0x5a, - 0x11, 0xa4, 0x8b, 0x30, 0x24, 0x4b, 0x48, 0x26, 0x34, 0xc1, 0x8c, 0x22, 0x98, 0x91, 0x66, 0x08, - 0x32, 0xc4, 0x99, 0x12, 0x62, 0xcc, 0x00, 0x33, 0x04, 0xc0, 0x38, 0x83, 0x40, 0x96, 0x19, 0x61, - 0x86, 0x18, 0x60, 0x93, 0x4c, 0x24, 0x93, 0x48, 0x6c, 0x83, 0x3f, 0xff, 0xfb, 0xff, 0xdd, 0xff, - 0xf7, 0xfd, 0xff, 0xde, 0xf7, 0x7f, 0xfb, 0xbf, 0xee, 0xff, 0xbd, 0xf7, 0x7f, 0xfb, 0xff, 0xde, - 0xfe, 0xff, 0xde, 0xfe, 0xfe, 0xfe, 0x6f, 0xfe, 0xff, 0xff, 0xff, 0xb7, 0xff, 0xdf, 0x7f, 0xff, - 0xd7, 0xfd, 0xef, 0xff, 0x7d, 0xff, 0xdf, 0xff, 0xf5, 0x7f, 0xf7, 0xff, 0xef, 0xef, 0xe7, 0x7f, - 0xfb, 0xfb, 0xfe, 0xfd, 0xff, 0xfb, 0xef, 0xfd, 0xdf, 0x7f, 0xff, 0xfb, 0xdf, 0xff, 0x0b, 0x07, - 0x35, 0xc9, 0x48, 0x92, 0x93, 0x6c, 0x08, 0x93, 0xc4, 0x30, 0x46, 0x99, 0xa1, 0x26, 0x48, 0x8c, - 0x33, 0xc4, 0x28, 0x0b, 0xd1, 0x34, 0x01, 0xc3, 0x18, 0x64, 0x86, 0x30, 0x4d, 0x90, 0xa6, 0x29, - 0x49, 0x44, 0xb4, 0x83, 0x5a, 0x9c, 0x37, 0x56, 0x9e, 0x21, 0xcc, 0xd1, 0xd6, 0xe4, 0xc9, 0xfc, - 0xec, 0xef, 0xf8, 0xe4, 0xc3, 0x19, 0xa4, 0x26, 0xd0, 0x0d, 0x24, 0xd3, 0x47, 0x1f, 0x7e, 0xff, - 0xff, 0x6f, 0xff, 0xd9, 0xff, 0xbf, 0xe7, 0xff, 0xf9, 0x7f, 0xff, 0xdf, 0xdf, 0xf5, 0xff, 0xfb, + 0xff, 0xbf, 0xfb, 0xcf, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0xff, 0xff, 0xdf, + 0x77, 0xff, 0xdb, 0xff, 0xb7, 0xff, 0xfb, 0x6f, 0xff, 0xff, 0xdd, 0xf7, 0xff, 0xff, 0xff, 0xbb, + 0xef, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0x6f, 0xff, 0xbb, 0xef, + 0xff, 0xbb, 0xef, 0x7f, 0xdb, 0xff, 0x27, 0xd0, 0x5f, 0x60, 0x8d, 0x37, 0xe0, 0x8d, 0x31, 0xd8, + 0xc7, 0x1d, 0xf0, 0xff, 0xff, 0xf0, 0xcf, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf9, 0xc1, + 0xff, 0xfe, 0xf9, 0xe7, 0xcc, 0x91, 0xf7, 0xfc, 0xe3, 0x99, 0x2e, 0xe2, 0xfc, 0x03, 0xfc, 0x7c, + 0x03, 0x3b, 0xec, 0x85, 0x33, 0x76, 0xcd, 0xa8, 0x23, 0x5b, 0xee, 0x20, 0x9f, 0xff, 0x7b, 0xef, + 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0x6f, 0xff, 0xdb, 0xff, 0xb7, + 0xff, 0xff, 0x76, 0xdf, 0xfd, 0x77, 0xde, 0xfb, 0xbf, 0xf6, 0xdf, 0xfd, 0xb7, 0xff, 0x6d, 0xff, + 0xfe, 0xfb, 0xdf, 0xf6, 0xbf, 0xed, 0xff, 0xef, 0xbf, 0xf6, 0xff, 0xef, 0xfb, 0xbf, 0xee, 0xfb, + 0xbf, 0xee, 0xfb, 0xbf, 0xee, 0xfb, 0xbf, 0xee, 0xfb, 0xbf, 0xee, 0x7b, 0xdf, 0xfd, 0xb7, 0xfe, + 0xef, 0xbd, 0xf7, 0x7f, 0xed, 0xff, 0x00, 0x6e, 0xdb, 0x91, 0x24, 0xee, 0x09, 0xff, 0x5f, 0x3f, + 0xa7, 0x9f, 0xcb, 0xcb, 0xef, 0xcb, 0x9f, 0xb7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x8f, 0xd7, 0xdf, 0xcb, 0xcf, 0xd7, 0xdf, 0x8f, 0x3f, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xf0, + 0x07, 0xb3, 0xec, 0x08, 0x33, 0xf7, 0x8c, 0x66, 0x11, 0xdb, 0x2e, 0xa0, 0xff, 0xdf, 0xf7, 0xbd, + 0xef, 0xfe, 0xbb, 0xef, 0x7e, 0xdb, 0xff, 0xb6, 0xff, 0x6d, 0xff, 0xdb, 0xff, 0xb6, 0xff, 0x6d, + 0xff, 0xff, 0xb7, 0xfd, 0xef, 0xbb, 0xff, 0x6e, 0xfb, 0xdf, 0x76, 0xff, 0xdd, 0x77, 0xff, 0xef, + 0xbf, 0xfb, 0xf6, 0x7f, 0xef, 0xff, 0x7f, 0xed, 0xfd, 0xf7, 0xbf, 0xff, 0xde, 0xf7, 0xfd, 0xbf, + 0xf7, 0xde, 0xfb, 0xbf, 0xee, 0xfb, 0xdf, 0x76, 0xff, 0xed, 0xbf, 0xfb, 0x6f, 0xfe, 0xdb, 0xff, + 0xb6, 0xff, 0xed, 0xbf, 0xfb, 0x6f, 0xfc, 0x83, 0x32, 0xde, 0x00, 0xbf, 0xc0, 0xff, 0xfe, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xef, 0x3f, 0xc0, + 0xde, 0x33, 0x0c, 0xe0, 0xb7, 0x1c, 0x85, 0x70, 0x6f, 0x8d, 0xf0, 0x7f, 0xdf, 0xf7, 0xfe, 0xbb, + 0xef, 0x7f, 0xd9, 0xff, 0xbf, 0xf7, 0xff, 0x6f, 0xff, 0xfb, 0xff, 0xb6, 0xff, 0x6d, 0xff, 0xdb, + 0xff, 0xff, 0xff, 0xed, 0xbf, 0xfb, 0xff, 0xdf, 0xf7, 0xfd, 0x7f, 0xef, 0xbb, 0xff, 0xdd, 0xff, + 0x77, 0xfe, 0xef, 0xbb, 0xff, 0x7d, 0xef, 0xff, 0xb6, 0xff, 0xdd, 0xff, 0x7b, 0xde, 0xff, 0xed, + 0x7f, 0xfb, 0xde, 0xff, 0xb7, 0xfd, 0xff, 0xdb, 0x7f, 0xfe, 0xbb, 0xef, 0x7f, 0xdb, 0xfe, 0xef, + 0x7b, 0xfe, 0xef, 0x7d, 0xf7, 0xbf, 0xed, 0x7f, 0xf8, 0x02, 0xc6, 0xbd, 0x34, 0x47, 0x47, 0x9f, + 0x1f, 0x3f, 0x3f, 0x7f, 0x7e, 0xff, 0xff, 0xfe, 0xff, 0xfd, 0xfd, 0xff, 0xfe, 0xff, 0xfd, 0xff, + 0xfe, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0xff, 0x3f, 0x7f, 0x9f, 0x9f, 0x0d, 0xe3, 0x3a, 0x8c, + 0x63, 0x58, 0x17, 0x84, 0x21, 0xb8, 0xcf, 0x63, 0xd8, 0xff, 0xef, 0xbb, 0xff, 0xff, 0xfd, 0xf7, + 0xdd, 0xff, 0xbf, 0x7b, 0xff, 0xf6, 0xdf, 0xff, 0xb7, 0xfd, 0xff, 0xef, 0x7d, 0xdf, 0xfb, 0xee, + 0xff, 0xff, 0xbe, 0xef, 0xfb, 0x7f, 0xef, 0xbe, 0xfb, 0xff, 0x77, 0xff, 0xef, 0x7d, 0xff, 0xfb, + 0xff, 0xed, 0xff, 0xdf, 0x7d, 0xef, 0xff, 0xf6, 0x7f, 0xdf, 0xfd, 0xb7, 0xff, 0xfb, 0xdf, 0xfd, + 0xff, 0xb7, 0xff, 0xed, 0x7f, 0xfe, 0xb7, 0xff, 0xfb, 0xdf, 0xff, 0xf7, 0xff, 0xef, 0xff, 0x7d, + 0xef, 0xff, 0xb7, 0xff, 0xfd, 0xff, 0xdf, 0x77, 0xff, 0x80, 0x36, 0xed, 0x09, 0x12, 0x44, 0x21, + 0x0c, 0x51, 0x51, 0x86, 0x00, 0x58, 0x46, 0x30, 0x24, 0x85, 0x09, 0x21, 0x85, 0xff, 0x7b, 0xed, + 0x3d, 0x1d, 0x1d, 0x47, 0x0e, 0x8e, 0x23, 0x00, 0x22, 0x02, 0xc4, 0xb0, 0x26, 0x19, 0x4c, 0x03, + 0xc0, 0x18, 0x06, 0x60, 0x89, 0xbd, 0x02, 0xfa, 0xff, 0xff, 0xb6, 0xff, 0xfb, 0xbe, 0xf7, 0xf7, + 0xdf, 0x7f, 0xf7, 0xff, 0x6f, 0xfe, 0xff, 0xdf, 0xfb, 0x6f, 0xfe, 0xdf, 0x7b, 0xff, 0xf7, 0xde, + 0x23, 0xcf, 0x9f, 0x37, 0x7d, 0xff, 0xff, 0xf7, 0xff, 0xfb, 0x6f, 0xff, 0xdb, 0xff, 0xbf, 0xfe, + 0xdb, 0xef, 0xff, 0xff, 0xb7, 0xfd, 0x7f, 0xff, 0xef, 0xfb, 0x7f, 0xf7, 0xbd, 0xff, 0xde, 0xdf, + 0xfb, 0xdf, 0xde, 0xd7, 0xbf, 0xef, 0xfb, 0xf7, 0xfe, 0xfb, 0xfb, 0xfd, 0x7c, 0x7f, 0xfd, 0xfe, + 0x7d, 0xfd, 0x9e, 0x62, 0x6f, 0xff, 0xff, 0x7f, 0xd2, 0x08, 0xef, 0x31, 0x00, 0x42, 0x48, 0x39, + 0x86, 0x60, 0x0c, 0xd9, 0x90, 0x20, 0x02, 0x10, 0x44, 0x08, 0x02, 0x10, 0x40, 0x03, 0x11, 0x80, + 0x20, 0x24, 0x81, 0x08, 0x42, 0x90, 0x04, 0xc1, 0x78, 0x06, 0x24, 0x09, 0x42, 0x40, 0x98, 0x22, + 0x30, 0xc9, 0x88, 0x32, 0x44, 0x4d, 0x80, 0x3f, 0xff, 0xfe, 0xf7, 0x7f, 0xed, 0xbf, 0xfe, 0xf7, + 0xbf, 0xfb, 0xdf, 0xfd, 0xef, 0x7f, 0xfb, 0xde, 0xff, 0xef, 0xfb, 0xbf, 0xff, 0x6d, 0xff, 0xf6, + 0x92, 0x24, 0x65, 0x99, 0xc6, 0x30, 0x8b, 0x67, 0x37, 0x87, 0x6f, 0xff, 0xf5, 0x77, 0x7f, 0xfe, + 0xff, 0xef, 0xfe, 0x7f, 0xf7, 0xed, 0x0f, 0xfe, 0xfe, 0xfb, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x7f, 0xb6, 0xec, 0xfe, 0xff, 0x7e, 0xef, 0xff, 0x7f, 0xf7, 0xff, 0xbf, + 0xef, 0xff, 0xf7, 0x7f, 0x1f, 0x9f, 0x63, 0x03, 0xdc, 0x90, 0x23, 0x8a, 0x20, 0x05, 0xc9, 0x5a, + 0x11, 0xa4, 0x8b, 0x30, 0x24, 0x4b, 0x48, 0x26, 0x34, 0xc1, 0x8c, 0x22, 0x98, 0x91, 0x66, 0x08, + 0x32, 0xc4, 0x99, 0x12, 0x62, 0xcc, 0x00, 0x33, 0x04, 0xc0, 0x38, 0x83, 0x40, 0x96, 0x19, 0x61, + 0x86, 0x18, 0x60, 0x93, 0x4c, 0x24, 0x93, 0x48, 0x6c, 0x83, 0x3f, 0xff, 0xfb, 0xff, 0xdd, 0xff, + 0xf7, 0xfd, 0xff, 0xde, 0xf7, 0x7f, 0xfb, 0xbf, 0xee, 0xff, 0xbd, 0xf7, 0x7f, 0xfb, 0xff, 0xde, + 0xfe, 0xff, 0xde, 0xfe, 0xfe, 0xfe, 0x6f, 0xfe, 0xff, 0xff, 0xff, 0xb7, 0xff, 0xdf, 0x7f, 0xff, + 0xd7, 0xfd, 0xef, 0xff, 0x7d, 0xff, 0xdf, 0xff, 0xf5, 0x7f, 0xf7, 0xff, 0xef, 0xef, 0xe7, 0x7f, + 0xfb, 0xfb, 0xfe, 0xfd, 0xff, 0xfb, 0xef, 0xfd, 0xdf, 0x7f, 0xff, 0xfb, 0xdf, 0xff, 0x0b, 0x07, + 0x35, 0xc9, 0x48, 0x92, 0x93, 0x6c, 0x08, 0x93, 0xc4, 0x30, 0x46, 0x99, 0xa1, 0x26, 0x48, 0x8c, + 0x33, 0xc4, 0x28, 0x0b, 0xd1, 0x34, 0x01, 0xc3, 0x18, 0x64, 0x86, 0x30, 0x4d, 0x90, 0xa6, 0x29, + 0x49, 0x44, 0xb4, 0x83, 0x5a, 0x9c, 0x37, 0x56, 0x9e, 0x21, 0xcc, 0xd1, 0xd6, 0xe4, 0xc9, 0xfc, + 0xec, 0xef, 0xf8, 0xe4, 0xc3, 0x19, 0xa4, 0x26, 0xd0, 0x0d, 0x24, 0xd3, 0x47, 0x1f, 0x7e, 0xff, + 0xff, 0x6f, 0xff, 0xd9, 0xff, 0xbf, 0xe7, 0xff, 0xf9, 0x7f, 0xff, 0xdf, 0xdf, 0xf5, 0xff, 0xfb, }, { // leekspin: frame 2 - 0xff, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0x6f, 0xff, 0xff, 0xef, - 0xbf, 0xfb, 0xdf, 0xf7, 0xbf, 0xfb, 0x7f, 0x7f, 0xdb, 0xff, 0xbf, 0xfb, 0xef, 0xff, 0x7f, 0xdf, - 0xff, 0xf3, 0xbf, 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xef, - 0xfb, 0xbf, 0xef, 0x7b, 0xdf, 0xf7, 0x2f, 0x60, 0xdf, 0x80, 0x2d, 0x57, 0xd0, 0x93, 0x24, 0xfc, - 0xc3, 0x1b, 0xf4, 0xf7, 0xff, 0xf0, 0xcf, 0xb0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf9, 0xc1, - 0xff, 0xfe, 0xf9, 0xe7, 0xcc, 0x91, 0xf7, 0xfc, 0xe3, 0x99, 0x2e, 0xe2, 0xfc, 0x03, 0xec, 0x7c, - 0x93, 0x2b, 0x6c, 0x95, 0x53, 0xce, 0x39, 0xc4, 0x33, 0x6b, 0xce, 0x90, 0xbf, 0xef, 0xfb, 0xbf, - 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xed, - 0xff, 0xff, 0xee, 0xbb, 0xff, 0x6e, 0xfb, 0xdf, 0x76, 0xff, 0xdd, 0xf7, 0xbf, 0xed, 0xff, 0xff, - 0xee, 0xff, 0x75, 0xdf, 0xff, 0xf6, 0xdf, 0xff, 0xb7, 0xff, 0xfb, 0xef, 0xfd, 0xb7, 0xff, 0xdb, - 0xfe, 0x6f, 0xfb, 0xbe, 0xef, 0xfb, 0xbe, 0xef, 0xfb, 0xbe, 0xef, 0xfb, 0xbe, 0xef, 0x7b, 0xde, - 0xf7, 0x7d, 0xdf, 0xf7, 0xbd, 0xff, 0x00, 0xf7, 0x9c, 0x21, 0x27, 0xd8, 0x46, 0xff, 0x5f, 0x3f, - 0xa7, 0x9f, 0xcb, 0xcb, 0xef, 0xcb, 0xdf, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xef, 0x9f, 0xd7, 0xcf, 0xcb, 0xdf, 0xd7, 0xcf, 0x8f, 0x3f, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xf0, - 0x07, 0x73, 0xdc, 0x01, 0x6e, 0x99, 0x73, 0x4e, 0x88, 0xf3, 0x1e, 0xc0, 0xff, 0x7f, 0xde, 0xf3, - 0xbf, 0xee, 0xfb, 0xbf, 0xee, 0xfb, 0xbf, 0xee, 0xfb, 0xbf, 0xee, 0x7b, 0xdf, 0xf6, 0xbf, 0xed, - 0xff, 0xff, 0x76, 0xdf, 0xfd, 0xb7, 0xff, 0xed, 0xbf, 0xfb, 0x6e, 0xff, 0xbd, 0xef, 0xfe, 0xf7, - 0xbf, 0xfd, 0xf7, 0xdf, 0x7f, 0xff, 0xb7, 0xfc, 0xef, 0xff, 0xf7, 0xbf, 0xfa, 0xdf, 0xfd, 0xef, - 0x7b, 0xff, 0xed, 0x7f, 0xde, 0xfb, 0xef, 0xbe, 0xfb, 0xdf, 0xf6, 0x7f, 0xdd, 0xf7, 0xbf, 0xed, - 0xff, 0xbb, 0xef, 0x7e, 0xdb, 0xff, 0x76, 0xc0, 0x1d, 0x77, 0x00, 0x7f, 0xc0, 0xff, 0xfe, 0xff, - 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xef, 0x3f, 0xc0, - 0xbb, 0x37, 0x04, 0xf0, 0xce, 0x39, 0x07, 0x70, 0xdd, 0x86, 0xf2, 0x7f, 0xdf, 0xf7, 0xfd, 0xbf, - 0xef, 0x79, 0xff, 0xef, 0xfd, 0xdf, 0x7b, 0xef, 0xbf, 0xfd, 0xff, 0xfb, 0xdf, 0xf6, 0xbf, 0xed, - 0xff, 0xff, 0xef, 0x7d, 0xff, 0xfb, 0xdf, 0xfd, 0xff, 0x6f, 0xfb, 0xbf, 0xfd, 0xef, 0x7e, 0xf7, - 0xbf, 0xee, 0xfb, 0x7f, 0xdf, 0xfb, 0xbf, 0xfd, 0xef, 0xfe, 0xdf, 0xfb, 0xef, 0xfe, 0xbf, 0xed, - 0xff, 0xf7, 0xbd, 0xff, 0x6f, 0xfb, 0xfe, 0xdf, 0xf7, 0xfd, 0xbf, 0xfb, 0x6f, 0xfe, 0xf7, 0xff, - 0xdd, 0x7f, 0xfb, 0xef, 0xfd, 0xdf, 0x7b, 0xff, 0xe4, 0x09, 0xc9, 0xb6, 0x36, 0x4b, 0x47, 0x9f, - 0x1f, 0x3f, 0x3f, 0x7f, 0x7f, 0xff, 0xfe, 0xfe, 0xff, 0xfd, 0xff, 0xfe, 0xfd, 0xff, 0xfd, 0xff, - 0xfe, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0xff, 0x3f, 0x3f, 0x9f, 0xdf, 0x0d, 0xa3, 0x3a, 0x4c, - 0xe3, 0x18, 0x17, 0x06, 0x60, 0xd8, 0xcf, 0x33, 0xd8, 0xfe, 0xef, 0x7b, 0xdf, 0xff, 0x7f, 0xfd, - 0xfd, 0xf7, 0xdf, 0xff, 0xbe, 0xfb, 0xff, 0xb7, 0xdf, 0xfd, 0xff, 0x6e, 0xff, 0xdd, 0xf7, 0xbe, - 0xff, 0xff, 0xdd, 0xff, 0xef, 0x7b, 0xfe, 0xbf, 0xef, 0x7b, 0xff, 0xbd, 0x37, 0xff, 0xfb, 0x7f, - 0xf7, 0xfd, 0xef, 0xff, 0xbb, 0xff, 0xf7, 0xfe, 0xdb, 0xff, 0xee, 0xff, 0xfb, 0xbe, 0xff, 0xef, - 0xfb, 0x7e, 0xdf, 0xf7, 0xff, 0xbd, 0xff, 0xee, 0xff, 0xdb, 0xff, 0xf7, 0x7f, 0xff, 0xf7, 0xbe, - 0xff, 0x77, 0xff, 0xbb, 0xfe, 0xff, 0xff, 0xb7, 0xff, 0x00, 0xb6, 0xed, 0x09, 0x02, 0x64, 0x81, - 0x0c, 0x31, 0xc5, 0x48, 0x02, 0x24, 0x98, 0x62, 0x24, 0x05, 0x89, 0x21, 0x05, 0xff, 0xfb, 0x6d, - 0x3d, 0x9d, 0x17, 0x1c, 0x4d, 0x07, 0x26, 0x80, 0x11, 0x41, 0x84, 0xb0, 0x66, 0x19, 0x0b, 0x82, - 0x10, 0x64, 0x09, 0x90, 0xc6, 0x3b, 0x08, 0xf6, 0xff, 0xbf, 0xfb, 0xef, 0xff, 0xdd, 0xff, 0xbb, - 0xff, 0x77, 0xf7, 0xbf, 0xfb, 0xfe, 0xb7, 0xff, 0xdf, 0xfd, 0xef, 0x7f, 0xdd, 0xf7, 0xff, 0x6d, - 0xff, 0xff, 0x7b, 0xfe, 0xdf, 0xf7, 0xf7, 0x7d, 0xe9, 0xbe, 0xfe, 0xff, 0xff, 0xfd, 0xff, 0xf7, - 0xfd, 0xcf, 0xff, 0x7f, 0xef, 0xbe, 0xfb, 0xdf, 0xbd, 0xbf, 0xbb, 0xbe, 0xff, 0xbf, 0xef, 0x7d, - 0x77, 0xff, 0xff, 0xdb, 0xfe, 0xff, 0xef, 0x7b, 0xfe, 0xff, 0xbf, 0xfd, 0xef, 0xff, 0xfb, 0xef, - 0xff, 0x7b, 0xff, 0xff, 0xfe, 0xbf, 0xef, 0xff, 0xd8, 0x03, 0xbd, 0x64, 0x00, 0x89, 0xa8, 0x22, - 0x1c, 0xe1, 0x08, 0x56, 0x90, 0x20, 0x04, 0x90, 0x02, 0x20, 0x04, 0x10, 0x41, 0x03, 0x88, 0x20, - 0x04, 0x40, 0x08, 0x81, 0x30, 0x02, 0x10, 0xc4, 0x30, 0x8e, 0x21, 0x08, 0x22, 0xc1, 0x18, 0xc0, - 0x31, 0x0c, 0x60, 0x98, 0xc2, 0x23, 0x0c, 0x5f, 0xff, 0xfb, 0xef, 0xfe, 0x77, 0xfd, 0xff, 0xdb, - 0xff, 0x6f, 0xfb, 0xbf, 0xfd, 0xef, 0xff, 0xdb, 0xfe, 0x7f, 0xf7, 0xdf, 0xfd, 0xef, 0xfb, 0xbf, - 0xff, 0xff, 0xff, 0xf7, 0xff, 0xdd, 0xff, 0xef, 0xff, 0x7b, 0xff, 0xde, 0xff, 0xff, 0x7b, 0xff, - 0xf7, 0xff, 0xef, 0xef, 0xde, 0x73, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xfe, 0xfe, 0xff, 0x89, 0xbf, 0xff, 0xbf, 0xf7, 0x7f, 0x7d, 0xff, 0xef, 0x7e, 0xff, 0xfb, - 0xdf, 0xff, 0xef, 0x7d, 0x1f, 0x97, 0xa7, 0x21, 0x1c, 0xd0, 0x23, 0x0a, 0x40, 0x14, 0xa4, 0x93, - 0x99, 0x24, 0x62, 0x8a, 0x19, 0x51, 0x46, 0xb0, 0x8c, 0x43, 0x18, 0xc4, 0x30, 0x26, 0xc4, 0x18, - 0xc9, 0x26, 0x98, 0x41, 0x4c, 0xb3, 0x80, 0x0d, 0x02, 0x70, 0x88, 0x23, 0xc4, 0x10, 0x96, 0x64, - 0x09, 0x93, 0x24, 0x68, 0x44, 0x95, 0x89, 0x6a, 0x10, 0xc7, 0x3f, 0xfb, 0xff, 0xff, 0x6e, 0xfb, - 0xbf, 0xff, 0xfb, 0xef, 0xff, 0x76, 0xff, 0x9f, 0xfd, 0xdf, 0xff, 0xbb, 0xee, 0xff, 0x3d, 0xff, - 0xff, 0xff, 0xde, 0xfb, 0xff, 0xff, 0xef, 0xbe, 0xff, 0xff, 0xff, 0x77, 0xfd, 0xff, 0xdf, 0xff, - 0xfb, 0x7e, 0xdf, 0xf7, 0xff, 0xff, 0xfe, 0xdf, 0xfd, 0xfb, 0xfb, 0xf7, 0xdf, 0xd9, 0xbf, 0xbf, - 0xd7, 0xf7, 0xfb, 0xfc, 0xff, 0xfb, 0xfb, 0xef, 0xb7, 0x7f, 0xff, 0xf7, 0xff, 0xee, 0x0f, 0x0e, - 0xae, 0x6f, 0x8c, 0x90, 0x53, 0x8c, 0x28, 0x23, 0x99, 0x48, 0x66, 0x91, 0x19, 0x66, 0x48, 0x92, - 0x94, 0x65, 0x24, 0x89, 0x69, 0x46, 0x12, 0xc4, 0x88, 0x32, 0x93, 0x4c, 0x48, 0x33, 0x84, 0x32, - 0xca, 0x0c, 0xb1, 0x22, 0xce, 0x9c, 0x33, 0x96, 0xdf, 0x18, 0xa1, 0xe6, 0xd8, 0xc6, 0xf1, 0xf8, - 0xee, 0xfd, 0xf9, 0xf2, 0xc2, 0x0c, 0x66, 0x90, 0x93, 0x4c, 0x48, 0x33, 0x87, 0x9f, 0x7f, 0xff, - 0xff, 0xff, 0xd7, 0x7d, 0xfd, 0xf7, 0xdf, 0xfb, 0xbf, 0xfe, 0x7b, 0xdf, 0xff, 0xf7, 0xf7, 0xfd, + 0xff, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0x6f, 0xff, 0xff, 0xef, + 0xbf, 0xfb, 0xdf, 0xf7, 0xbf, 0xfb, 0x7f, 0x7f, 0xdb, 0xff, 0xbf, 0xfb, 0xef, 0xff, 0x7f, 0xdf, + 0xff, 0xf3, 0xbf, 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xef, + 0xfb, 0xbf, 0xef, 0x7b, 0xdf, 0xf7, 0x2f, 0x60, 0xdf, 0x80, 0x2d, 0x57, 0xd0, 0x93, 0x24, 0xfc, + 0xc3, 0x1b, 0xf4, 0xf7, 0xff, 0xf0, 0xcf, 0xb0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf9, 0xc1, + 0xff, 0xfe, 0xf9, 0xe7, 0xcc, 0x91, 0xf7, 0xfc, 0xe3, 0x99, 0x2e, 0xe2, 0xfc, 0x03, 0xec, 0x7c, + 0x93, 0x2b, 0x6c, 0x95, 0x53, 0xce, 0x39, 0xc4, 0x33, 0x6b, 0xce, 0x90, 0xbf, 0xef, 0xfb, 0xbf, + 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xef, 0xfb, 0xbf, 0xed, + 0xff, 0xff, 0xee, 0xbb, 0xff, 0x6e, 0xfb, 0xdf, 0x76, 0xff, 0xdd, 0xf7, 0xbf, 0xed, 0xff, 0xff, + 0xee, 0xff, 0x75, 0xdf, 0xff, 0xf6, 0xdf, 0xff, 0xb7, 0xff, 0xfb, 0xef, 0xfd, 0xb7, 0xff, 0xdb, + 0xfe, 0x6f, 0xfb, 0xbe, 0xef, 0xfb, 0xbe, 0xef, 0xfb, 0xbe, 0xef, 0xfb, 0xbe, 0xef, 0x7b, 0xde, + 0xf7, 0x7d, 0xdf, 0xf7, 0xbd, 0xff, 0x00, 0xf7, 0x9c, 0x21, 0x27, 0xd8, 0x46, 0xff, 0x5f, 0x3f, + 0xa7, 0x9f, 0xcb, 0xcb, 0xef, 0xcb, 0xdf, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xef, 0x9f, 0xd7, 0xcf, 0xcb, 0xdf, 0xd7, 0xcf, 0x8f, 0x3f, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xf0, + 0x07, 0x73, 0xdc, 0x01, 0x6e, 0x99, 0x73, 0x4e, 0x88, 0xf3, 0x1e, 0xc0, 0xff, 0x7f, 0xde, 0xf3, + 0xbf, 0xee, 0xfb, 0xbf, 0xee, 0xfb, 0xbf, 0xee, 0xfb, 0xbf, 0xee, 0x7b, 0xdf, 0xf6, 0xbf, 0xed, + 0xff, 0xff, 0x76, 0xdf, 0xfd, 0xb7, 0xff, 0xed, 0xbf, 0xfb, 0x6e, 0xff, 0xbd, 0xef, 0xfe, 0xf7, + 0xbf, 0xfd, 0xf7, 0xdf, 0x7f, 0xff, 0xb7, 0xfc, 0xef, 0xff, 0xf7, 0xbf, 0xfa, 0xdf, 0xfd, 0xef, + 0x7b, 0xff, 0xed, 0x7f, 0xde, 0xfb, 0xef, 0xbe, 0xfb, 0xdf, 0xf6, 0x7f, 0xdd, 0xf7, 0xbf, 0xed, + 0xff, 0xbb, 0xef, 0x7e, 0xdb, 0xff, 0x76, 0xc0, 0x1d, 0x77, 0x00, 0x7f, 0xc0, 0xff, 0xfe, 0xff, + 0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xef, 0x3f, 0xc0, + 0xbb, 0x37, 0x04, 0xf0, 0xce, 0x39, 0x07, 0x70, 0xdd, 0x86, 0xf2, 0x7f, 0xdf, 0xf7, 0xfd, 0xbf, + 0xef, 0x79, 0xff, 0xef, 0xfd, 0xdf, 0x7b, 0xef, 0xbf, 0xfd, 0xff, 0xfb, 0xdf, 0xf6, 0xbf, 0xed, + 0xff, 0xff, 0xef, 0x7d, 0xff, 0xfb, 0xdf, 0xfd, 0xff, 0x6f, 0xfb, 0xbf, 0xfd, 0xef, 0x7e, 0xf7, + 0xbf, 0xee, 0xfb, 0x7f, 0xdf, 0xfb, 0xbf, 0xfd, 0xef, 0xfe, 0xdf, 0xfb, 0xef, 0xfe, 0xbf, 0xed, + 0xff, 0xf7, 0xbd, 0xff, 0x6f, 0xfb, 0xfe, 0xdf, 0xf7, 0xfd, 0xbf, 0xfb, 0x6f, 0xfe, 0xf7, 0xff, + 0xdd, 0x7f, 0xfb, 0xef, 0xfd, 0xdf, 0x7b, 0xff, 0xe4, 0x09, 0xc9, 0xb6, 0x36, 0x4b, 0x47, 0x9f, + 0x1f, 0x3f, 0x3f, 0x7f, 0x7f, 0xff, 0xfe, 0xfe, 0xff, 0xfd, 0xff, 0xfe, 0xfd, 0xff, 0xfd, 0xff, + 0xfe, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x7f, 0xff, 0x3f, 0x3f, 0x9f, 0xdf, 0x0d, 0xa3, 0x3a, 0x4c, + 0xe3, 0x18, 0x17, 0x06, 0x60, 0xd8, 0xcf, 0x33, 0xd8, 0xfe, 0xef, 0x7b, 0xdf, 0xff, 0x7f, 0xfd, + 0xfd, 0xf7, 0xdf, 0xff, 0xbe, 0xfb, 0xff, 0xb7, 0xdf, 0xfd, 0xff, 0x6e, 0xff, 0xdd, 0xf7, 0xbe, + 0xff, 0xff, 0xdd, 0xff, 0xef, 0x7b, 0xfe, 0xbf, 0xef, 0x7b, 0xff, 0xbd, 0x37, 0xff, 0xfb, 0x7f, + 0xf7, 0xfd, 0xef, 0xff, 0xbb, 0xff, 0xf7, 0xfe, 0xdb, 0xff, 0xee, 0xff, 0xfb, 0xbe, 0xff, 0xef, + 0xfb, 0x7e, 0xdf, 0xf7, 0xff, 0xbd, 0xff, 0xee, 0xff, 0xdb, 0xff, 0xf7, 0x7f, 0xff, 0xf7, 0xbe, + 0xff, 0x77, 0xff, 0xbb, 0xfe, 0xff, 0xff, 0xb7, 0xff, 0x00, 0xb6, 0xed, 0x09, 0x02, 0x64, 0x81, + 0x0c, 0x31, 0xc5, 0x48, 0x02, 0x24, 0x98, 0x62, 0x24, 0x05, 0x89, 0x21, 0x05, 0xff, 0xfb, 0x6d, + 0x3d, 0x9d, 0x17, 0x1c, 0x4d, 0x07, 0x26, 0x80, 0x11, 0x41, 0x84, 0xb0, 0x66, 0x19, 0x0b, 0x82, + 0x10, 0x64, 0x09, 0x90, 0xc6, 0x3b, 0x08, 0xf6, 0xff, 0xbf, 0xfb, 0xef, 0xff, 0xdd, 0xff, 0xbb, + 0xff, 0x77, 0xf7, 0xbf, 0xfb, 0xfe, 0xb7, 0xff, 0xdf, 0xfd, 0xef, 0x7f, 0xdd, 0xf7, 0xff, 0x6d, + 0xff, 0xff, 0x7b, 0xfe, 0xdf, 0xf7, 0xf7, 0x7d, 0xe9, 0xbe, 0xfe, 0xff, 0xff, 0xfd, 0xff, 0xf7, + 0xfd, 0xcf, 0xff, 0x7f, 0xef, 0xbe, 0xfb, 0xdf, 0xbd, 0xbf, 0xbb, 0xbe, 0xff, 0xbf, 0xef, 0x7d, + 0x77, 0xff, 0xff, 0xdb, 0xfe, 0xff, 0xef, 0x7b, 0xfe, 0xff, 0xbf, 0xfd, 0xef, 0xff, 0xfb, 0xef, + 0xff, 0x7b, 0xff, 0xff, 0xfe, 0xbf, 0xef, 0xff, 0xd8, 0x03, 0xbd, 0x64, 0x00, 0x89, 0xa8, 0x22, + 0x1c, 0xe1, 0x08, 0x56, 0x90, 0x20, 0x04, 0x90, 0x02, 0x20, 0x04, 0x10, 0x41, 0x03, 0x88, 0x20, + 0x04, 0x40, 0x08, 0x81, 0x30, 0x02, 0x10, 0xc4, 0x30, 0x8e, 0x21, 0x08, 0x22, 0xc1, 0x18, 0xc0, + 0x31, 0x0c, 0x60, 0x98, 0xc2, 0x23, 0x0c, 0x5f, 0xff, 0xfb, 0xef, 0xfe, 0x77, 0xfd, 0xff, 0xdb, + 0xff, 0x6f, 0xfb, 0xbf, 0xfd, 0xef, 0xff, 0xdb, 0xfe, 0x7f, 0xf7, 0xdf, 0xfd, 0xef, 0xfb, 0xbf, + 0xff, 0xff, 0xff, 0xf7, 0xff, 0xdd, 0xff, 0xef, 0xff, 0x7b, 0xff, 0xde, 0xff, 0xff, 0x7b, 0xff, + 0xf7, 0xff, 0xef, 0xef, 0xde, 0x73, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xfe, 0xfe, 0xff, 0x89, 0xbf, 0xff, 0xbf, 0xf7, 0x7f, 0x7d, 0xff, 0xef, 0x7e, 0xff, 0xfb, + 0xdf, 0xff, 0xef, 0x7d, 0x1f, 0x97, 0xa7, 0x21, 0x1c, 0xd0, 0x23, 0x0a, 0x40, 0x14, 0xa4, 0x93, + 0x99, 0x24, 0x62, 0x8a, 0x19, 0x51, 0x46, 0xb0, 0x8c, 0x43, 0x18, 0xc4, 0x30, 0x26, 0xc4, 0x18, + 0xc9, 0x26, 0x98, 0x41, 0x4c, 0xb3, 0x80, 0x0d, 0x02, 0x70, 0x88, 0x23, 0xc4, 0x10, 0x96, 0x64, + 0x09, 0x93, 0x24, 0x68, 0x44, 0x95, 0x89, 0x6a, 0x10, 0xc7, 0x3f, 0xfb, 0xff, 0xff, 0x6e, 0xfb, + 0xbf, 0xff, 0xfb, 0xef, 0xff, 0x76, 0xff, 0x9f, 0xfd, 0xdf, 0xff, 0xbb, 0xee, 0xff, 0x3d, 0xff, + 0xff, 0xff, 0xde, 0xfb, 0xff, 0xff, 0xef, 0xbe, 0xff, 0xff, 0xff, 0x77, 0xfd, 0xff, 0xdf, 0xff, + 0xfb, 0x7e, 0xdf, 0xf7, 0xff, 0xff, 0xfe, 0xdf, 0xfd, 0xfb, 0xfb, 0xf7, 0xdf, 0xd9, 0xbf, 0xbf, + 0xd7, 0xf7, 0xfb, 0xfc, 0xff, 0xfb, 0xfb, 0xef, 0xb7, 0x7f, 0xff, 0xf7, 0xff, 0xee, 0x0f, 0x0e, + 0xae, 0x6f, 0x8c, 0x90, 0x53, 0x8c, 0x28, 0x23, 0x99, 0x48, 0x66, 0x91, 0x19, 0x66, 0x48, 0x92, + 0x94, 0x65, 0x24, 0x89, 0x69, 0x46, 0x12, 0xc4, 0x88, 0x32, 0x93, 0x4c, 0x48, 0x33, 0x84, 0x32, + 0xca, 0x0c, 0xb1, 0x22, 0xce, 0x9c, 0x33, 0x96, 0xdf, 0x18, 0xa1, 0xe6, 0xd8, 0xc6, 0xf1, 0xf8, + 0xee, 0xfd, 0xf9, 0xf2, 0xc2, 0x0c, 0x66, 0x90, 0x93, 0x4c, 0x48, 0x33, 0x87, 0x9f, 0x7f, 0xff, + 0xff, 0xff, 0xd7, 0x7d, 0xfd, 0xf7, 0xdf, 0xfb, 0xbf, 0xfe, 0x7b, 0xdf, 0xff, 0xf7, 0xf7, 0xfd, }, { // leekspin: frame 3 - 0xff, 0xef, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0x6f, 0xff, 0xdb, 0x7f, 0xff, 0xff, - 0xbb, 0xef, 0x7f, 0xdb, 0xff, 0xb7, 0xfd, 0x5d, 0x02, 0xb8, 0xc6, 0x12, 0x30, 0xc4, 0x32, 0x4a, - 0x0c, 0xf1, 0xfd, 0xbf, 0xfb, 0x6d, 0xfb, 0xbb, 0x77, 0x77, 0xbb, 0xef, 0x6f, 0xfb, 0xcf, 0xdf, - 0xbb, 0x6f, 0x7f, 0xdb, 0xff, 0xf7, 0x0f, 0xe0, 0x3f, 0xc0, 0x0d, 0xb7, 0xe0, 0x0d, 0xa9, 0xf8, - 0xc7, 0x1d, 0xf0, 0xff, 0xff, 0xf0, 0xc7, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf1, 0xc6, - 0xff, 0xf7, 0xf8, 0xf3, 0xcf, 0x90, 0xf7, 0xfc, 0xe3, 0x99, 0x2e, 0xe2, 0xfc, 0x03, 0xfc, 0x78, - 0x13, 0x27, 0xec, 0x19, 0x53, 0xe6, 0x2d, 0xd8, 0x83, 0x3b, 0xee, 0x00, 0x7f, 0xff, 0xbb, 0xef, - 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0x7f, 0xdb, 0xff, 0xb7, - 0xff, 0xfb, 0x6f, 0xfe, 0xdb, 0x7f, 0xf6, 0xdf, 0xfd, 0xb7, 0xff, 0x6d, 0xff, 0xdb, 0xff, 0xf7, - 0xff, 0xfd, 0x9f, 0xfb, 0xf7, 0xff, 0xbb, 0x00, 0x66, 0x99, 0x4c, 0x63, 0x99, 0x8c, 0x63, 0x7c, - 0x1f, 0xce, 0x26, 0x35, 0xc9, 0x0b, 0x30, 0x4c, 0x83, 0xb0, 0xfc, 0x6f, 0xef, 0xdb, 0xbf, 0x6e, - 0x7b, 0xdf, 0xf7, 0xbe, 0xee, 0xfd, 0x00, 0xd9, 0x7b, 0x02, 0x86, 0x7c, 0x09, 0xff, 0x5f, 0x3f, - 0xa7, 0x9f, 0xcb, 0xcb, 0xef, 0xcb, 0xdb, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xef, 0x9f, 0xd7, 0xcf, 0xcb, 0xdf, 0xd7, 0xcf, 0x8f, 0x3f, 0x1f, 0x7f, 0xff, 0xff, 0xfb, 0x72, - 0x87, 0xb9, 0x6c, 0x03, 0x3b, 0xcc, 0xd3, 0x36, 0x88, 0xdb, 0x75, 0x84, 0xff, 0xfb, 0xef, 0xbe, - 0xfb, 0xef, 0xfe, 0x7b, 0xef, 0xfe, 0xdb, 0xff, 0xb6, 0xff, 0xed, 0xbf, 0xfb, 0x6f, 0xfe, 0xdb, - 0xff, 0xff, 0x77, 0xfd, 0xef, 0x7b, 0xff, 0xb6, 0xff, 0xed, 0x7f, 0xfb, 0xdf, 0xfe, 0xb7, 0xff, - 0xee, 0xfe, 0xb7, 0xff, 0x7f, 0xef, 0xf9, 0x02, 0x66, 0x99, 0x92, 0x66, 0x49, 0x98, 0xa6, 0xb1, - 0xcd, 0xe4, 0xf3, 0xf9, 0xbc, 0xef, 0xfd, 0xde, 0x77, 0xff, 0xed, 0xbb, 0xfb, 0xf6, 0x6f, 0x1f, - 0x37, 0x4e, 0xce, 0x31, 0x93, 0x63, 0x4c, 0x84, 0x32, 0x59, 0x45, 0x22, 0xaa, 0xc8, 0xfe, 0xff, - 0xf7, 0xf7, 0xdf, 0x7f, 0x3f, 0x3f, 0x7f, 0x7f, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, - 0x7f, 0x3f, 0x7f, 0x7f, 0x3f, 0x3f, 0x77, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xef, 0x3f, 0xc4, - 0xdd, 0x33, 0x82, 0xc8, 0x3f, 0x32, 0x82, 0xec, 0x33, 0x86, 0xf8, 0x7f, 0xf7, 0xdd, 0xff, 0xbb, - 0xee, 0x7f, 0xdd, 0xf7, 0xff, 0xee, 0xbb, 0xff, 0xf7, 0xbf, 0xfe, 0xff, 0xed, 0xbf, 0xfb, 0x6e, - 0xff, 0xff, 0xbf, 0xed, 0xff, 0xff, 0xb7, 0xff, 0xfd, 0xdf, 0xf7, 0xff, 0x6e, 0xfb, 0xff, 0xb7, - 0xfe, 0xef, 0x7d, 0xf7, 0xbf, 0xfd, 0xdf, 0xf0, 0x06, 0x99, 0xe4, 0x26, 0xff, 0xfd, 0xdf, 0xff, - 0xf6, 0xbf, 0xff, 0xee, 0xfb, 0x7f, 0xdd, 0xff, 0x37, 0x9f, 0xce, 0x27, 0x31, 0xcc, 0x62, 0x9b, - 0x89, 0x26, 0xb2, 0x98, 0x71, 0x46, 0x9e, 0x1d, 0x70, 0x86, 0x89, 0x33, 0x94, 0x87, 0x2f, 0x4f, - 0x1f, 0xbf, 0x3f, 0x7f, 0x7e, 0xf9, 0xe4, 0x60, 0xdb, 0xd8, 0xc6, 0xf8, 0xc9, 0xda, 0xf2, 0xcc, - 0xc8, 0xf3, 0xf4, 0xe0, 0xfb, 0xf8, 0xfe, 0x7f, 0x7f, 0x3f, 0x9f, 0x5f, 0x0f, 0xc9, 0x72, 0x0e, - 0xe1, 0x3c, 0x06, 0x09, 0x61, 0xb4, 0xd7, 0x4c, 0xf1, 0xbf, 0xff, 0xfd, 0xe7, 0xbf, 0xff, 0x7d, - 0xf7, 0xff, 0xed, 0xff, 0xfe, 0xcf, 0xff, 0xbe, 0xf7, 0xdd, 0xff, 0xef, 0xfe, 0x7b, 0xdf, 0xf7, - 0xff, 0xff, 0x7b, 0xdf, 0xfe, 0xfb, 0xdf, 0xfd, 0xef, 0xfe, 0xf7, 0xdf, 0xfb, 0xff, 0x76, 0xff, - 0xef, 0xfd, 0xff, 0xf7, 0xdf, 0x7d, 0xff, 0xff, 0xb0, 0xbf, 0xff, 0xff, 0xf6, 0x9f, 0xff, 0xfb, - 0xfe, 0xdf, 0xf7, 0xfd, 0x9f, 0xef, 0xf1, 0xf4, 0x66, 0xc9, 0xfc, 0xf3, 0xf9, 0xfc, 0xb6, 0xf8, - 0xf1, 0xf6, 0xdc, 0xf1, 0xf2, 0xee, 0xf1, 0xf4, 0x64, 0x01, 0xb4, 0x26, 0x49, 0x10, 0x24, 0x81, - 0x12, 0x94, 0x65, 0x08, 0x02, 0x64, 0x18, 0x42, 0x24, 0x19, 0x01, 0x85, 0x21, 0xbf, 0xff, 0x6d, - 0x5d, 0x37, 0x1d, 0x1d, 0x86, 0x26, 0x07, 0x10, 0x40, 0x09, 0x21, 0xd2, 0x4c, 0x19, 0x42, 0x13, - 0x40, 0x4c, 0x11, 0xc0, 0x0e, 0xbb, 0x80, 0xfe, 0xff, 0x6f, 0xfb, 0xbe, 0xf7, 0xdf, 0xfb, 0xff, - 0xbd, 0xef, 0xfb, 0xff, 0xbd, 0xef, 0xfb, 0xff, 0xdf, 0xfb, 0xef, 0x7e, 0xf7, 0xbf, 0xff, 0x6d, - 0xff, 0xff, 0xef, 0xfb, 0xbf, 0xfe, 0xef, 0x7b, 0xfe, 0xdf, 0xff, 0xf6, 0xdf, 0x7f, 0xf7, 0xdf, - 0xfe, 0xfb, 0xdf, 0x77, 0xff, 0xef, 0xfd, 0xff, 0x6f, 0xfc, 0xa7, 0xbf, 0xff, 0xff, 0xd9, 0xdf, - 0xbe, 0xbf, 0x77, 0x7e, 0xff, 0xdf, 0xfb, 0xfc, 0x7f, 0xdf, 0xff, 0xff, 0xbe, 0xfb, 0xff, 0xfd, - 0xdf, 0xfe, 0xff, 0x7b, 0xfe, 0xbf, 0xff, 0xef, 0xd9, 0x11, 0xef, 0x28, 0x00, 0x41, 0x4c, 0x31, - 0xc4, 0x0c, 0x68, 0x93, 0x10, 0x64, 0x01, 0x10, 0x04, 0x41, 0x10, 0x04, 0x00, 0x43, 0x11, 0x00, - 0x88, 0x22, 0x00, 0x48, 0x82, 0x90, 0x11, 0xc4, 0x30, 0x0d, 0x43, 0x10, 0x24, 0xc1, 0x10, 0xb4, - 0x81, 0x68, 0x24, 0x90, 0x4a, 0x2b, 0x80, 0x3f, 0xff, 0xdb, 0xff, 0xf7, 0xfd, 0xbf, 0xee, 0xff, - 0x7b, 0xef, 0xbe, 0xff, 0xed, 0x7f, 0xf6, 0xbf, 0xfb, 0xfe, 0x6f, 0xff, 0xdb, 0xff, 0xfd, 0x6f, - 0xff, 0xff, 0xfb, 0xfe, 0xef, 0xff, 0xbd, 0xff, 0xf7, 0xff, 0xbd, 0xff, 0xef, 0xff, 0xdf, 0xfe, - 0xff, 0xbd, 0xff, 0xdf, 0xff, 0xff, 0xf7, 0x9c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xf9, 0xdf, 0x5f, 0xe6, 0xfd, 0xff, 0xff, 0xf7, 0xbf, 0xfb, 0xff, 0xfd, 0xdf, 0xfe, 0xff, - 0xf7, 0xbd, 0xff, 0x5f, 0x37, 0x9f, 0x47, 0x61, 0x9c, 0x10, 0x63, 0x06, 0xc0, 0x09, 0x64, 0x93, - 0x18, 0x66, 0x82, 0x59, 0x11, 0xa6, 0xa4, 0x19, 0x42, 0x32, 0x8c, 0x44, 0x20, 0x98, 0x47, 0x68, - 0x08, 0xd2, 0x93, 0x24, 0x8c, 0x70, 0x02, 0x0d, 0xc0, 0x32, 0x08, 0xe1, 0x82, 0x0a, 0x3a, 0xc0, - 0x16, 0x44, 0x61, 0x19, 0x46, 0xc8, 0x31, 0x06, 0xd8, 0x43, 0x3f, 0xfe, 0xff, 0xf7, 0xbd, 0xff, - 0xdb, 0xff, 0xf7, 0xff, 0xfd, 0xbf, 0xef, 0xef, 0xff, 0x6d, 0xff, 0xf7, 0xfe, 0xfb, 0xaf, 0xff, - 0xff, 0xff, 0xbe, 0xef, 0xfd, 0xff, 0xff, 0xdf, 0xfd, 0xff, 0x7f, 0xfb, 0xdf, 0xfe, 0xef, 0xfd, - 0x7f, 0xff, 0xdb, 0xff, 0xfd, 0xdf, 0xfe, 0x7e, 0xfb, 0xef, 0xef, 0xdf, 0x9f, 0xff, 0xdf, 0xdf, - 0x6f, 0xef, 0xf3, 0xfc, 0xfd, 0xff, 0xf7, 0xef, 0xbf, 0x7d, 0xff, 0xfe, 0xef, 0xdf, 0x1b, 0x26, - 0x27, 0xc9, 0x98, 0x12, 0x63, 0x2c, 0x82, 0x5a, 0x41, 0x94, 0x93, 0x2c, 0x20, 0xd3, 0x8c, 0x24, - 0x53, 0x48, 0x25, 0xb4, 0x83, 0x28, 0x24, 0xc5, 0x11, 0x52, 0x8c, 0x20, 0x9b, 0xa0, 0x26, 0x59, - 0x82, 0x2a, 0x68, 0x86, 0x99, 0x5c, 0x37, 0x96, 0x5e, 0xb1, 0x84, 0xcc, 0xf1, 0xc6, 0xc9, 0xf8, - 0xfe, 0xed, 0xf8, 0xeb, 0xc2, 0x14, 0x51, 0x4d, 0xa4, 0x92, 0x18, 0x63, 0x47, 0x9f, 0x3f, 0xff, - 0xff, 0xff, 0xf7, 0xdc, 0xff, 0xbb, 0xff, 0xf6, 0xdf, 0x7f, 0xff, 0xde, 0xf7, 0xff, 0xfb, 0xfe + 0xff, 0xef, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0xef, 0xbf, 0xfb, 0x6f, 0xff, 0xdb, 0x7f, 0xff, 0xff, + 0xbb, 0xef, 0x7f, 0xdb, 0xff, 0xb7, 0xfd, 0x5d, 0x02, 0xb8, 0xc6, 0x12, 0x30, 0xc4, 0x32, 0x4a, + 0x0c, 0xf1, 0xfd, 0xbf, 0xfb, 0x6d, 0xfb, 0xbb, 0x77, 0x77, 0xbb, 0xef, 0x6f, 0xfb, 0xcf, 0xdf, + 0xbb, 0x6f, 0x7f, 0xdb, 0xff, 0xf7, 0x0f, 0xe0, 0x3f, 0xc0, 0x0d, 0xb7, 0xe0, 0x0d, 0xa9, 0xf8, + 0xc7, 0x1d, 0xf0, 0xff, 0xff, 0xf0, 0xc7, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf1, 0xc6, + 0xff, 0xf7, 0xf8, 0xf3, 0xcf, 0x90, 0xf7, 0xfc, 0xe3, 0x99, 0x2e, 0xe2, 0xfc, 0x03, 0xfc, 0x78, + 0x13, 0x27, 0xec, 0x19, 0x53, 0xe6, 0x2d, 0xd8, 0x83, 0x3b, 0xee, 0x00, 0x7f, 0xff, 0xbb, 0xef, + 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0xff, 0xbb, 0xef, 0x7f, 0xdb, 0xff, 0xb7, + 0xff, 0xfb, 0x6f, 0xfe, 0xdb, 0x7f, 0xf6, 0xdf, 0xfd, 0xb7, 0xff, 0x6d, 0xff, 0xdb, 0xff, 0xf7, + 0xff, 0xfd, 0x9f, 0xfb, 0xf7, 0xff, 0xbb, 0x00, 0x66, 0x99, 0x4c, 0x63, 0x99, 0x8c, 0x63, 0x7c, + 0x1f, 0xce, 0x26, 0x35, 0xc9, 0x0b, 0x30, 0x4c, 0x83, 0xb0, 0xfc, 0x6f, 0xef, 0xdb, 0xbf, 0x6e, + 0x7b, 0xdf, 0xf7, 0xbe, 0xee, 0xfd, 0x00, 0xd9, 0x7b, 0x02, 0x86, 0x7c, 0x09, 0xff, 0x5f, 0x3f, + 0xa7, 0x9f, 0xcb, 0xcb, 0xef, 0xcb, 0xdb, 0xbf, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xef, 0x9f, 0xd7, 0xcf, 0xcb, 0xdf, 0xd7, 0xcf, 0x8f, 0x3f, 0x1f, 0x7f, 0xff, 0xff, 0xfb, 0x72, + 0x87, 0xb9, 0x6c, 0x03, 0x3b, 0xcc, 0xd3, 0x36, 0x88, 0xdb, 0x75, 0x84, 0xff, 0xfb, 0xef, 0xbe, + 0xfb, 0xef, 0xfe, 0x7b, 0xef, 0xfe, 0xdb, 0xff, 0xb6, 0xff, 0xed, 0xbf, 0xfb, 0x6f, 0xfe, 0xdb, + 0xff, 0xff, 0x77, 0xfd, 0xef, 0x7b, 0xff, 0xb6, 0xff, 0xed, 0x7f, 0xfb, 0xdf, 0xfe, 0xb7, 0xff, + 0xee, 0xfe, 0xb7, 0xff, 0x7f, 0xef, 0xf9, 0x02, 0x66, 0x99, 0x92, 0x66, 0x49, 0x98, 0xa6, 0xb1, + 0xcd, 0xe4, 0xf3, 0xf9, 0xbc, 0xef, 0xfd, 0xde, 0x77, 0xff, 0xed, 0xbb, 0xfb, 0xf6, 0x6f, 0x1f, + 0x37, 0x4e, 0xce, 0x31, 0x93, 0x63, 0x4c, 0x84, 0x32, 0x59, 0x45, 0x22, 0xaa, 0xc8, 0xfe, 0xff, + 0xf7, 0xf7, 0xdf, 0x7f, 0x3f, 0x3f, 0x7f, 0x7f, 0x3f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, + 0x7f, 0x3f, 0x7f, 0x7f, 0x3f, 0x3f, 0x77, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xff, 0xef, 0x3f, 0xc4, + 0xdd, 0x33, 0x82, 0xc8, 0x3f, 0x32, 0x82, 0xec, 0x33, 0x86, 0xf8, 0x7f, 0xf7, 0xdd, 0xff, 0xbb, + 0xee, 0x7f, 0xdd, 0xf7, 0xff, 0xee, 0xbb, 0xff, 0xf7, 0xbf, 0xfe, 0xff, 0xed, 0xbf, 0xfb, 0x6e, + 0xff, 0xff, 0xbf, 0xed, 0xff, 0xff, 0xb7, 0xff, 0xfd, 0xdf, 0xf7, 0xff, 0x6e, 0xfb, 0xff, 0xb7, + 0xfe, 0xef, 0x7d, 0xf7, 0xbf, 0xfd, 0xdf, 0xf0, 0x06, 0x99, 0xe4, 0x26, 0xff, 0xfd, 0xdf, 0xff, + 0xf6, 0xbf, 0xff, 0xee, 0xfb, 0x7f, 0xdd, 0xff, 0x37, 0x9f, 0xce, 0x27, 0x31, 0xcc, 0x62, 0x9b, + 0x89, 0x26, 0xb2, 0x98, 0x71, 0x46, 0x9e, 0x1d, 0x70, 0x86, 0x89, 0x33, 0x94, 0x87, 0x2f, 0x4f, + 0x1f, 0xbf, 0x3f, 0x7f, 0x7e, 0xf9, 0xe4, 0x60, 0xdb, 0xd8, 0xc6, 0xf8, 0xc9, 0xda, 0xf2, 0xcc, + 0xc8, 0xf3, 0xf4, 0xe0, 0xfb, 0xf8, 0xfe, 0x7f, 0x7f, 0x3f, 0x9f, 0x5f, 0x0f, 0xc9, 0x72, 0x0e, + 0xe1, 0x3c, 0x06, 0x09, 0x61, 0xb4, 0xd7, 0x4c, 0xf1, 0xbf, 0xff, 0xfd, 0xe7, 0xbf, 0xff, 0x7d, + 0xf7, 0xff, 0xed, 0xff, 0xfe, 0xcf, 0xff, 0xbe, 0xf7, 0xdd, 0xff, 0xef, 0xfe, 0x7b, 0xdf, 0xf7, + 0xff, 0xff, 0x7b, 0xdf, 0xfe, 0xfb, 0xdf, 0xfd, 0xef, 0xfe, 0xf7, 0xdf, 0xfb, 0xff, 0x76, 0xff, + 0xef, 0xfd, 0xff, 0xf7, 0xdf, 0x7d, 0xff, 0xff, 0xb0, 0xbf, 0xff, 0xff, 0xf6, 0x9f, 0xff, 0xfb, + 0xfe, 0xdf, 0xf7, 0xfd, 0x9f, 0xef, 0xf1, 0xf4, 0x66, 0xc9, 0xfc, 0xf3, 0xf9, 0xfc, 0xb6, 0xf8, + 0xf1, 0xf6, 0xdc, 0xf1, 0xf2, 0xee, 0xf1, 0xf4, 0x64, 0x01, 0xb4, 0x26, 0x49, 0x10, 0x24, 0x81, + 0x12, 0x94, 0x65, 0x08, 0x02, 0x64, 0x18, 0x42, 0x24, 0x19, 0x01, 0x85, 0x21, 0xbf, 0xff, 0x6d, + 0x5d, 0x37, 0x1d, 0x1d, 0x86, 0x26, 0x07, 0x10, 0x40, 0x09, 0x21, 0xd2, 0x4c, 0x19, 0x42, 0x13, + 0x40, 0x4c, 0x11, 0xc0, 0x0e, 0xbb, 0x80, 0xfe, 0xff, 0x6f, 0xfb, 0xbe, 0xf7, 0xdf, 0xfb, 0xff, + 0xbd, 0xef, 0xfb, 0xff, 0xbd, 0xef, 0xfb, 0xff, 0xdf, 0xfb, 0xef, 0x7e, 0xf7, 0xbf, 0xff, 0x6d, + 0xff, 0xff, 0xef, 0xfb, 0xbf, 0xfe, 0xef, 0x7b, 0xfe, 0xdf, 0xff, 0xf6, 0xdf, 0x7f, 0xf7, 0xdf, + 0xfe, 0xfb, 0xdf, 0x77, 0xff, 0xef, 0xfd, 0xff, 0x6f, 0xfc, 0xa7, 0xbf, 0xff, 0xff, 0xd9, 0xdf, + 0xbe, 0xbf, 0x77, 0x7e, 0xff, 0xdf, 0xfb, 0xfc, 0x7f, 0xdf, 0xff, 0xff, 0xbe, 0xfb, 0xff, 0xfd, + 0xdf, 0xfe, 0xff, 0x7b, 0xfe, 0xbf, 0xff, 0xef, 0xd9, 0x11, 0xef, 0x28, 0x00, 0x41, 0x4c, 0x31, + 0xc4, 0x0c, 0x68, 0x93, 0x10, 0x64, 0x01, 0x10, 0x04, 0x41, 0x10, 0x04, 0x00, 0x43, 0x11, 0x00, + 0x88, 0x22, 0x00, 0x48, 0x82, 0x90, 0x11, 0xc4, 0x30, 0x0d, 0x43, 0x10, 0x24, 0xc1, 0x10, 0xb4, + 0x81, 0x68, 0x24, 0x90, 0x4a, 0x2b, 0x80, 0x3f, 0xff, 0xdb, 0xff, 0xf7, 0xfd, 0xbf, 0xee, 0xff, + 0x7b, 0xef, 0xbe, 0xff, 0xed, 0x7f, 0xf6, 0xbf, 0xfb, 0xfe, 0x6f, 0xff, 0xdb, 0xff, 0xfd, 0x6f, + 0xff, 0xff, 0xfb, 0xfe, 0xef, 0xff, 0xbd, 0xff, 0xf7, 0xff, 0xbd, 0xff, 0xef, 0xff, 0xdf, 0xfe, + 0xff, 0xbd, 0xff, 0xdf, 0xff, 0xff, 0xf7, 0x9c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xf9, 0xdf, 0x5f, 0xe6, 0xfd, 0xff, 0xff, 0xf7, 0xbf, 0xfb, 0xff, 0xfd, 0xdf, 0xfe, 0xff, + 0xf7, 0xbd, 0xff, 0x5f, 0x37, 0x9f, 0x47, 0x61, 0x9c, 0x10, 0x63, 0x06, 0xc0, 0x09, 0x64, 0x93, + 0x18, 0x66, 0x82, 0x59, 0x11, 0xa6, 0xa4, 0x19, 0x42, 0x32, 0x8c, 0x44, 0x20, 0x98, 0x47, 0x68, + 0x08, 0xd2, 0x93, 0x24, 0x8c, 0x70, 0x02, 0x0d, 0xc0, 0x32, 0x08, 0xe1, 0x82, 0x0a, 0x3a, 0xc0, + 0x16, 0x44, 0x61, 0x19, 0x46, 0xc8, 0x31, 0x06, 0xd8, 0x43, 0x3f, 0xfe, 0xff, 0xf7, 0xbd, 0xff, + 0xdb, 0xff, 0xf7, 0xff, 0xfd, 0xbf, 0xef, 0xef, 0xff, 0x6d, 0xff, 0xf7, 0xfe, 0xfb, 0xaf, 0xff, + 0xff, 0xff, 0xbe, 0xef, 0xfd, 0xff, 0xff, 0xdf, 0xfd, 0xff, 0x7f, 0xfb, 0xdf, 0xfe, 0xef, 0xfd, + 0x7f, 0xff, 0xdb, 0xff, 0xfd, 0xdf, 0xfe, 0x7e, 0xfb, 0xef, 0xef, 0xdf, 0x9f, 0xff, 0xdf, 0xdf, + 0x6f, 0xef, 0xf3, 0xfc, 0xfd, 0xff, 0xf7, 0xef, 0xbf, 0x7d, 0xff, 0xfe, 0xef, 0xdf, 0x1b, 0x26, + 0x27, 0xc9, 0x98, 0x12, 0x63, 0x2c, 0x82, 0x5a, 0x41, 0x94, 0x93, 0x2c, 0x20, 0xd3, 0x8c, 0x24, + 0x53, 0x48, 0x25, 0xb4, 0x83, 0x28, 0x24, 0xc5, 0x11, 0x52, 0x8c, 0x20, 0x9b, 0xa0, 0x26, 0x59, + 0x82, 0x2a, 0x68, 0x86, 0x99, 0x5c, 0x37, 0x96, 0x5e, 0xb1, 0x84, 0xcc, 0xf1, 0xc6, 0xc9, 0xf8, + 0xfe, 0xed, 0xf8, 0xeb, 0xc2, 0x14, 0x51, 0x4d, 0xa4, 0x92, 0x18, 0x63, 0x47, 0x9f, 0x3f, 0xff, + 0xff, 0xff, 0xf7, 0xdc, 0xff, 0xbb, 0xff, 0xf6, 0xdf, 0x7f, 0xff, 0xde, 0xf7, 0xff, 0xfb, 0xfe } }; diff --git a/keyboards/arch_36/rules.mk b/keyboards/arch_36/rules.mk index 588ef01e3..8f4e7a81a 100644 --- a/keyboards/arch_36/rules.mk +++ b/keyboards/arch_36/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -18,7 +18,8 @@ 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 -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output SPLIT_KEYBOARD = yes # Split common diff --git a/keyboards/ares/rules.mk b/keyboards/ares/rules.mk index d24b74c95..e9aa75f14 100644 --- a/keyboards/ares/rules.mk +++ b/keyboards/ares/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/arisu/config.h b/keyboards/arisu/config.h index b1f9cf86d..227b71419 100644 --- a/keyboards/arisu/config.h +++ b/keyboards/arisu/config.h @@ -182,23 +182,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/arisu/rules.mk b/keyboards/arisu/rules.mk index a83e4649f..7eff22648 100644 --- a/keyboards/arisu/rules.mk +++ b/keyboards/arisu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -18,6 +18,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/arrayperipherals/1x4p1/rules.mk b/keyboards/arrayperipherals/1x4p1/rules.mk index 3bbc6dbf8..5e6cb36ac 100644 --- a/keyboards/arrayperipherals/1x4p1/rules.mk +++ b/keyboards/arrayperipherals/1x4p1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ash1800/config.h b/keyboards/ash1800/config.h index fe839e47f..b1f5182b0 100644 --- a/keyboards/ash1800/config.h +++ b/keyboards/ash1800/config.h @@ -196,26 +196,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ash1800/rules.mk b/keyboards/ash1800/rules.mk index dc36b11b9..0a0c18a08 100644 --- a/keyboards/ash1800/rules.mk +++ b/keyboards/ash1800/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ash_xiix/rules.mk b/keyboards/ash_xiix/rules.mk index 32981133b..efca6bac6 100644 --- a/keyboards/ash_xiix/rules.mk +++ b/keyboards/ash_xiix/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ashpil/modelm_usbc/rules.mk b/keyboards/ashpil/modelm_usbc/rules.mk index 714408a2e..4ea75ce5b 100644 --- a/keyboards/ashpil/modelm_usbc/rules.mk +++ b/keyboards/ashpil/modelm_usbc/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/at101_bh/rules.mk b/keyboards/at101_bh/rules.mk index af0606f6d..dc6e8143e 100644 --- a/keyboards/at101_bh/rules.mk +++ b/keyboards/at101_bh/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/at_at/660m/rules.mk b/keyboards/at_at/660m/rules.mk index f0465ceb2..e0d442ed3 100644 --- a/keyboards/at_at/660m/rules.mk +++ b/keyboards/at_at/660m/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/atomic/keymaps/pvc/rules.mk b/keyboards/atomic/keymaps/pvc/rules.mk index fa693923e..9385227ef 100644 --- a/keyboards/atomic/keymaps/pvc/rules.mk +++ b/keyboards/atomic/keymaps/pvc/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/atomic/rules.mk b/keyboards/atomic/rules.mk index 71d5f924e..bae5d5b7f 100644 --- a/keyboards/atomic/rules.mk +++ b/keyboards/atomic/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 151288edc..c261e892d 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -1,6 +1,3 @@ -// this is the style you want to emulate. -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, - #include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -23,21 +20,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, KC_TAB , KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, _______, KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, - _______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, KC_DEL , TG(MOUS), _______, _______, _______, _______, _______, _______ ), [MOUS] = LAYOUT( /* Mouse and Media Keys */ KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_R, KC_WH_U, KC_WH_D, KC_WH_L, KC_F2, - _______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1 + _______, _______ , _______, _______, _______, _______, _______, KC_BTN1, TO(BASE), RESET , KC_F12 , KC_F1 ), }; - - -// I prefer this layer switching strategy to the TG and MO functions. -// so that I can get out of mouse mode just by tapping/holding my base layer FN key. -const uint16_t PROGMEM fn_actions[] = { - [BASE] = ACTION_LAYER_OFF(2, 1), // switch back to layer 0 - [MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2 -}; diff --git a/keyboards/atreus/keymaps/khitsule/keymap.c b/keyboards/atreus/keymaps/khitsule/keymap.c index e6a536691..1190efa3c 100644 --- a/keyboards/atreus/keymaps/khitsule/keymap.c +++ b/keyboards/atreus/keymaps/khitsule/keymap.c @@ -16,12 +16,6 @@ enum layers { #define KM_DRIGHT LGUI(LCTL(KC_RIGHT)) #define TSKMGR LCTL(LSFT(KC_ESC)) -#define tap_mod_macro(record, mod, macro) ( ((record)->event.pressed) ? \ - ( ((record)->tap.count <= 0 || (record)->tap.interrupted) ? MACRO(D(mod), END) : MACRO_NONE ) : \ - ( ((record)->tap.count > 0 && !((record)->tap.interrupted)) ? (macro) : MACRO(U(mod), END) ) ) - - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [ALPH] = LAYOUT( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, @@ -54,21 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_MACRO_TAP(1), - [2] = ACTION_MACRO_TAP(2) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case 1: - return tap_mod_macro(record, LGUI, MACRO( D(LSFT), T(9), U(LSFT), END)); - break; - case 2: - return tap_mod_macro(record, LALT, MACRO( D(LSFT), T(0), U(LSFT), END)); - break; - - } - return MACRO_NONE; -}; diff --git a/keyboards/atreus/keymaps/ridingqwerty/rules.mk b/keyboards/atreus/keymaps/ridingqwerty/rules.mk index a41ef5f10..ecead0e01 100644 --- a/keyboards/atreus/keymaps/ridingqwerty/rules.mk +++ b/keyboards/atreus/keymaps/ridingqwerty/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/atreus/keymaps/xk/rules.mk b/keyboards/atreus/keymaps/xk/rules.mk index 5b69426ac..a2c5143ef 100644 --- a/keyboards/atreus/keymaps/xk/rules.mk +++ b/keyboards/atreus/keymaps/xk/rules.mk @@ -11,5 +11,5 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk index cc58cd464..a9a3e2e71 100644 --- a/keyboards/atreus/rules.mk +++ b/keyboards/atreus/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -12,7 +12,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/atreus62/keymaps/194h/keymap.c b/keyboards/atreus62/keymaps/194h/keymap.c index 1d069e9d4..b9587b03e 100644 --- a/keyboards/atreus62/keymaps/194h/keymap.c +++ b/keyboards/atreus62/keymaps/194h/keymap.c @@ -31,7 +31,7 @@ #define NO_RCBR RALT(KC_0) // } #define NO_COLN LSFT(KC_DOT) // : #define NO_SCLN LSFT(KC_COMM) // ; -#define NO_MU RALT(KC_M) // µ +#define NO_MICR RALT(KC_M) // µ #define NO_EURO RALT(KC_E) // € #define NO_SECT LSFT(KC_GRV) // § #define NO_GERC RALT(KC_COMM) // ¸ diff --git a/keyboards/atreus62/rules.mk b/keyboards/atreus62/rules.mk index 5f9cd6c78..10bacba0a 100644 --- a/keyboards/atreus62/rules.mk +++ b/keyboards/atreus62/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 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 UNICODE_ENABLE = yes # Unicode #BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/atxkb/1894/rules.mk b/keyboards/atxkb/1894/rules.mk index cdd4a7324..8cddc866b 100644 --- a/keyboards/atxkb/1894/rules.mk +++ b/keyboards/atxkb/1894/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 LTO_ENABLE = yes diff --git a/keyboards/aves65/rules.mk b/keyboards/aves65/rules.mk index d88fb91dd..8aa3f6bbb 100644 --- a/keyboards/aves65/rules.mk +++ b/keyboards/aves65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/axolstudio/helpo/rules.mk b/keyboards/axolstudio/helpo/rules.mk index 307616647..bbf233bd4 100644 --- a/keyboards/axolstudio/helpo/rules.mk +++ b/keyboards/axolstudio/helpo/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/axolstudio/yeti/rules.mk b/keyboards/axolstudio/yeti/rules.mk index 4253e34a7..91aac93e2 100644 --- a/keyboards/axolstudio/yeti/rules.mk +++ b/keyboards/axolstudio/yeti/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/baguette/config.h b/keyboards/baguette/config.h index 7ec18109c..153260947 100644 --- a/keyboards/baguette/config.h +++ b/keyboards/baguette/config.h @@ -164,23 +164,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/baguette/rules.mk b/keyboards/baguette/rules.mk index 0bd78643c..316dce7bc 100644 --- a/keyboards/baguette/rules.mk +++ b/keyboards/baguette/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bakeneko60/rules.mk b/keyboards/bakeneko60/rules.mk index cc1b100ec..a344e5105 100644 --- a/keyboards/bakeneko60/rules.mk +++ b/keyboards/bakeneko60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bakeneko65/bakeneko65.c b/keyboards/bakeneko65/bakeneko65.c deleted file mode 100644 index aa1ba8e66..000000000 --- a/keyboards/bakeneko65/bakeneko65.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright 2020 Koichi Katano - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "bakeneko65.h" diff --git a/keyboards/bakeneko65/config.h b/keyboards/bakeneko65/config.h deleted file mode 100644 index 65b3ff88e..000000000 --- a/keyboards/bakeneko65/config.h +++ /dev/null @@ -1,109 +0,0 @@ -/* -Copyright 2020 Koichi Katano - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License 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 0x3A0E -#define PRODUCT_ID 0x4C82 -#define DEVICE_VER 0x0001 -#define MANUFACTURER kkatano -#define PRODUCT Bakeneko 65 - -/* 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 { E6, B7, F7, F4, F5 } -#define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } -#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 - -/* Bootmagic Lite key configuration */ -//#define BOOTMAGIC_LITE_ROW 0 -//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/bakeneko65/info.json b/keyboards/bakeneko65/info.json deleted file mode 100644 index 25b438c29..000000000 --- a/keyboards/bakeneko65/info.json +++ /dev/null @@ -1,313 +0,0 @@ -{ - "keyboard_name": "Bakeneko 65", - "url": "https://github.com/kkatano/bakeneko-65-pcb", - "maintainer": "kkatano", - "width": 16, - "height": 5, - "layouts": { - "LAYOUT_65_ansi_split_bs": { - "layout": [ - { "x":0, "y":0 }, - { "x":1, "y":0 }, - { "x":2, "y":0 }, - { "x":3, "y":0 }, - { "x":4, "y":0 }, - { "x":5, "y":0 }, - { "x":6, "y":0 }, - { "x":7, "y":0 }, - { "x":8, "y":0 }, - { "x":9, "y":0 }, - { "x":10, "y":0 }, - { "x":11, "y":0 }, - { "x":12, "y":0 }, - { "x":13, "y":0 }, - { "x":14, "y":0 }, - { "x":15, "y":0 }, - - { "x":0, "y":1, "w":1.5 }, - { "x":1.5, "y":1 }, - { "x":2.5, "y":1 }, - { "x":3.5, "y":1 }, - { "x":4.5, "y":1 }, - { "x":5.5, "y":1 }, - { "x":6.5, "y":1 }, - { "x":7.5, "y":1 }, - { "x":8.5, "y":1 }, - { "x":9.5, "y":1 }, - { "x":10.5, "y":1 }, - { "x":11.5, "y":1 }, - { "x":12.5, "y":1 }, - { "x":13.5, "y":1, "w":1.5 }, - { "x":15, "y":1 }, - - { "x":0, "y":2, "w":1.75 }, - { "x":1.75, "y":2 }, - { "x":2.75, "y":2 }, - { "x":3.75, "y":2 }, - { "x":4.75, "y":2 }, - { "x":5.75, "y":2 }, - { "x":6.75, "y":2 }, - { "x":7.75, "y":2 }, - { "x":8.75, "y":2 }, - { "x":9.75, "y":2 }, - { "x":10.75, "y":2 }, - { "x":11.75, "y":2 }, - { "x":12.75, "y":2, "w":2.25 }, - { "x":15, "y":2 }, - - { "x":0, "y":3, "w":2.25 }, - { "x":2.25, "y":3 }, - { "x":3.25, "y":3 }, - { "x":4.25, "y":3 }, - { "x":5.25, "y":3 }, - { "x":6.25, "y":3 }, - { "x":7.25, "y":3 }, - { "x":8.25, "y":3 }, - { "x":9.25, "y":3 }, - { "x":10.25, "y":3 }, - { "x":11.25, "y":3 }, - { "x":12.25, "y":3, "w":1.75 }, - { "x":14, "y":3 }, - { "x":15, "y":3 }, - - { "x":0, "y":4, "w":1.25 }, - { "x":1.25, "y":4, "w":1.25 }, - { "x":2.5, "y":4, "w":1.25 }, - { "x":3.75, "y":4, "w":6.25 }, - { "x":10, "y":4 }, - { "x":11, "y":4 }, - { "x":12, "y":4 }, - { "x":13, "y":4 }, - { "x":14, "y":4 }, - { "x":15, "y":4 } - ] - }, - "LAYOUT_65_ansi": { - "layout": [ - { "x":0, "y":0 }, - { "x":1, "y":0 }, - { "x":2, "y":0 }, - { "x":3, "y":0 }, - { "x":4, "y":0 }, - { "x":5, "y":0 }, - { "x":6, "y":0 }, - { "x":7, "y":0 }, - { "x":8, "y":0 }, - { "x":9, "y":0 }, - { "x":10, "y":0 }, - { "x":11, "y":0 }, - { "x":12, "y":0 }, - { "x":13, "y":0, "w": 2 }, - { "x":15, "y":0 }, - - { "x":0, "y":1, "w":1.5 }, - { "x":1.5, "y":1 }, - { "x":2.5, "y":1 }, - { "x":3.5, "y":1 }, - { "x":4.5, "y":1 }, - { "x":5.5, "y":1 }, - { "x":6.5, "y":1 }, - { "x":7.5, "y":1 }, - { "x":8.5, "y":1 }, - { "x":9.5, "y":1 }, - { "x":10.5, "y":1 }, - { "x":11.5, "y":1 }, - { "x":12.5, "y":1 }, - { "x":13.5, "y":1, "w":1.5 }, - { "x":15, "y":1 }, - - { "x":0, "y":2, "w":1.75 }, - { "x":1.75, "y":2 }, - { "x":2.75, "y":2 }, - { "x":3.75, "y":2 }, - { "x":4.75, "y":2 }, - { "x":5.75, "y":2 }, - { "x":6.75, "y":2 }, - { "x":7.75, "y":2 }, - { "x":8.75, "y":2 }, - { "x":9.75, "y":2 }, - { "x":10.75, "y":2 }, - { "x":11.75, "y":2 }, - { "x":12.75, "y":2, "w":2.25 }, - { "x":15, "y":2 }, - - { "x":0, "y":3, "w":2.25 }, - { "x":2.25, "y":3 }, - { "x":3.25, "y":3 }, - { "x":4.25, "y":3 }, - { "x":5.25, "y":3 }, - { "x":6.25, "y":3 }, - { "x":7.25, "y":3 }, - { "x":8.25, "y":3 }, - { "x":9.25, "y":3 }, - { "x":10.25, "y":3 }, - { "x":11.25, "y":3 }, - { "x":12.25, "y":3, "w":1.75 }, - { "x":14, "y":3 }, - { "x":15, "y":3 }, - - { "x":0, "y":4, "w":1.25 }, - { "x":1.25, "y":4, "w":1.25 }, - { "x":2.5, "y":4, "w":1.25 }, - { "x":3.75, "y":4, "w":6.25 }, - { "x":10, "y":4 }, - { "x":11, "y":4 }, - { "x":12, "y":4 }, - { "x":13, "y":4 }, - { "x":14, "y":4 }, - { "x":15, "y":4 } - ] - }, - "LAYOUT_65_ansi_split_bs_2_right_mods": { - "layout": [ - { "x":0, "y":0 }, - { "x":1, "y":0 }, - { "x":2, "y":0 }, - { "x":3, "y":0 }, - { "x":4, "y":0 }, - { "x":5, "y":0 }, - { "x":6, "y":0 }, - { "x":7, "y":0 }, - { "x":8, "y":0 }, - { "x":9, "y":0 }, - { "x":10, "y":0 }, - { "x":11, "y":0 }, - { "x":12, "y":0 }, - { "x":13, "y":0 }, - { "x":14, "y":0 }, - { "x":15, "y":0 }, - - { "x":0, "y":1, "w":1.5 }, - { "x":1.5, "y":1 }, - { "x":2.5, "y":1 }, - { "x":3.5, "y":1 }, - { "x":4.5, "y":1 }, - { "x":5.5, "y":1 }, - { "x":6.5, "y":1 }, - { "x":7.5, "y":1 }, - { "x":8.5, "y":1 }, - { "x":9.5, "y":1 }, - { "x":10.5, "y":1 }, - { "x":11.5, "y":1 }, - { "x":12.5, "y":1 }, - { "x":13.5, "y":1, "w":1.5 }, - { "x":15, "y":1 }, - - { "x":0, "y":2, "w":1.75 }, - { "x":1.75, "y":2 }, - { "x":2.75, "y":2 }, - { "x":3.75, "y":2 }, - { "x":4.75, "y":2 }, - { "x":5.75, "y":2 }, - { "x":6.75, "y":2 }, - { "x":7.75, "y":2 }, - { "x":8.75, "y":2 }, - { "x":9.75, "y":2 }, - { "x":10.75, "y":2 }, - { "x":11.75, "y":2 }, - { "x":12.75, "y":2, "w":2.25 }, - { "x":15, "y":2 }, - - { "x":0, "y":3, "w":2.25 }, - { "x":2.25, "y":3 }, - { "x":3.25, "y":3 }, - { "x":4.25, "y":3 }, - { "x":5.25, "y":3 }, - { "x":6.25, "y":3 }, - { "x":7.25, "y":3 }, - { "x":8.25, "y":3 }, - { "x":9.25, "y":3 }, - { "x":10.25, "y":3 }, - { "x":11.25, "y":3 }, - { "x":12.25, "y":3, "w":1.75 }, - { "x":14, "y":3 }, - { "x":15, "y":3 }, - - { "x":0, "y":4, "w":1.25 }, - { "x":1.25, "y":4, "w":1.25 }, - { "x":2.5, "y":4, "w":1.25 }, - { "x":3.75, "y":4, "w":6.25 }, - { "x":10, "y":4, "w":1.5 }, - { "x":11.5, "y":4, "w":1.5 }, - { "x":13, "y":4 }, - { "x":14, "y":4 }, - { "x":15, "y":4 } - ] - }, - "LAYOUT_65_ansi_2_right_mods": { - "layout": [ - { "x":0, "y":0 }, - { "x":1, "y":0 }, - { "x":2, "y":0 }, - { "x":3, "y":0 }, - { "x":4, "y":0 }, - { "x":5, "y":0 }, - { "x":6, "y":0 }, - { "x":7, "y":0 }, - { "x":8, "y":0 }, - { "x":9, "y":0 }, - { "x":10, "y":0 }, - { "x":11, "y":0 }, - { "x":12, "y":0 }, - { "x":13, "y":0, "w": 2 }, - { "x":15, "y":0 }, - - { "x":0, "y":1, "w":1.5 }, - { "x":1.5, "y":1 }, - { "x":2.5, "y":1 }, - { "x":3.5, "y":1 }, - { "x":4.5, "y":1 }, - { "x":5.5, "y":1 }, - { "x":6.5, "y":1 }, - { "x":7.5, "y":1 }, - { "x":8.5, "y":1 }, - { "x":9.5, "y":1 }, - { "x":10.5, "y":1 }, - { "x":11.5, "y":1 }, - { "x":12.5, "y":1 }, - { "x":13.5, "y":1, "w":1.5 }, - { "x":15, "y":1 }, - - { "x":0, "y":2, "w":1.75 }, - { "x":1.75, "y":2 }, - { "x":2.75, "y":2 }, - { "x":3.75, "y":2 }, - { "x":4.75, "y":2 }, - { "x":5.75, "y":2 }, - { "x":6.75, "y":2 }, - { "x":7.75, "y":2 }, - { "x":8.75, "y":2 }, - { "x":9.75, "y":2 }, - { "x":10.75, "y":2 }, - { "x":11.75, "y":2 }, - { "x":12.75, "y":2, "w":2.25 }, - { "x":15, "y":2 }, - - { "x":0, "y":3, "w":2.25 }, - { "x":2.25, "y":3 }, - { "x":3.25, "y":3 }, - { "x":4.25, "y":3 }, - { "x":5.25, "y":3 }, - { "x":6.25, "y":3 }, - { "x":7.25, "y":3 }, - { "x":8.25, "y":3 }, - { "x":9.25, "y":3 }, - { "x":10.25, "y":3 }, - { "x":11.25, "y":3 }, - { "x":12.25, "y":3, "w":1.75 }, - { "x":14, "y":3 }, - { "x":15, "y":3 }, - - { "x":0, "y":4, "w":1.25 }, - { "x":1.25, "y":4, "w":1.25 }, - { "x":2.5, "y":4, "w":1.25 }, - { "x":3.75, "y":4, "w":6.25 }, - { "x":10, "y":4, "w":1.5 }, - { "x":11.5, "y":4, "w":1.5 }, - { "x":13, "y":4 }, - { "x":14, "y":4 }, - { "x":15, "y":4 } - ] - } - } -} diff --git a/keyboards/bakeneko65/keymaps/default/readme.md b/keyboards/bakeneko65/keymaps/default/readme.md deleted file mode 100644 index 34d1b4e93..000000000 --- a/keyboards/bakeneko65/keymaps/default/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The default keymap for Bakeneko 65 diff --git a/keyboards/bakeneko65/readme.md b/keyboards/bakeneko65/readme.md deleted file mode 100644 index 87960d2f1..000000000 --- a/keyboards/bakeneko65/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -# Bakeneko 65 - -A simple 65% keyboard - -* Keyboard Maintainer: [kkatano](https://github.com/kkatano) -* Hardware Supported: Bakeneko 65 -* Hardware Availability: [Open source on GitHub](https://github.com/kkatano/bakeneko-65) - -Make example for this keyboard (after setting up your build environment): - - make bakeneko65:default - -Flashing example for this keyboard: - - make bakeneko65:default:flash - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bakeneko65/rev2/config.h b/keyboards/bakeneko65/rev2/config.h new file mode 100644 index 000000000..6639e8239 --- /dev/null +++ b/keyboards/bakeneko65/rev2/config.h @@ -0,0 +1,109 @@ +/* +Copyright 2020 Koichi Katano + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x3A0E +#define PRODUCT_ID 0x4C82 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kkatano +#define PRODUCT Bakeneko 65 V2 + +/* 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 { E6, B7, F7, F4, F5 } +#define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } +#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 + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/bakeneko65/rev2/info.json b/keyboards/bakeneko65/rev2/info.json new file mode 100644 index 000000000..cbaadc3c3 --- /dev/null +++ b/keyboards/bakeneko65/rev2/info.json @@ -0,0 +1,313 @@ +{ + "keyboard_name": "Bakeneko 65 V2", + "url": "https://github.com/kkatano/bakeneko-65", + "maintainer": "kkatano", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_65_ansi_split_bs": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0 }, + { "x":14, "y":0 }, + { "x":15, "y":0 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":13.5, "y":1, "w":1.5 }, + { "x":15, "y":1 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2, "w":2.25 }, + { "x":15, "y":2 }, + + { "x":0, "y":3, "w":2.25 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":1.75 }, + { "x":14, "y":3 }, + { "x":15, "y":3 }, + + { "x":0, "y":4, "w":1.25 }, + { "x":1.25, "y":4, "w":1.25 }, + { "x":2.5, "y":4, "w":1.25 }, + { "x":3.75, "y":4, "w":6.25 }, + { "x":10, "y":4 }, + { "x":11, "y":4 }, + { "x":12, "y":4 }, + { "x":13, "y":4 }, + { "x":14, "y":4 }, + { "x":15, "y":4 } + ] + }, + "LAYOUT_65_ansi": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0, "w": 2 }, + { "x":15, "y":0 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":13.5, "y":1, "w":1.5 }, + { "x":15, "y":1 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2, "w":2.25 }, + { "x":15, "y":2 }, + + { "x":0, "y":3, "w":2.25 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":1.75 }, + { "x":14, "y":3 }, + { "x":15, "y":3 }, + + { "x":0, "y":4, "w":1.25 }, + { "x":1.25, "y":4, "w":1.25 }, + { "x":2.5, "y":4, "w":1.25 }, + { "x":3.75, "y":4, "w":6.25 }, + { "x":10, "y":4 }, + { "x":11, "y":4 }, + { "x":12, "y":4 }, + { "x":13, "y":4 }, + { "x":14, "y":4 }, + { "x":15, "y":4 } + ] + }, + "LAYOUT_65_ansi_split_bs_2_right_mods": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0 }, + { "x":14, "y":0 }, + { "x":15, "y":0 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":13.5, "y":1, "w":1.5 }, + { "x":15, "y":1 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2, "w":2.25 }, + { "x":15, "y":2 }, + + { "x":0, "y":3, "w":2.25 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":1.75 }, + { "x":14, "y":3 }, + { "x":15, "y":3 }, + + { "x":0, "y":4, "w":1.25 }, + { "x":1.25, "y":4, "w":1.25 }, + { "x":2.5, "y":4, "w":1.25 }, + { "x":3.75, "y":4, "w":6.25 }, + { "x":10, "y":4, "w":1.5 }, + { "x":11.5, "y":4, "w":1.5 }, + { "x":13, "y":4 }, + { "x":14, "y":4 }, + { "x":15, "y":4 } + ] + }, + "LAYOUT_65_ansi_2_right_mods": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0, "w": 2 }, + { "x":15, "y":0 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":13.5, "y":1, "w":1.5 }, + { "x":15, "y":1 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2, "w":2.25 }, + { "x":15, "y":2 }, + + { "x":0, "y":3, "w":2.25 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":1.75 }, + { "x":14, "y":3 }, + { "x":15, "y":3 }, + + { "x":0, "y":4, "w":1.25 }, + { "x":1.25, "y":4, "w":1.25 }, + { "x":2.5, "y":4, "w":1.25 }, + { "x":3.75, "y":4, "w":6.25 }, + { "x":10, "y":4, "w":1.5 }, + { "x":11.5, "y":4, "w":1.5 }, + { "x":13, "y":4 }, + { "x":14, "y":4 }, + { "x":15, "y":4 } + ] + } + } +} diff --git a/keyboards/bakeneko65/keymaps/default/keymap.c b/keyboards/bakeneko65/rev2/keymaps/default/keymap.c similarity index 100% rename from keyboards/bakeneko65/keymaps/default/keymap.c rename to keyboards/bakeneko65/rev2/keymaps/default/keymap.c diff --git a/keyboards/bakeneko65/rev2/keymaps/default/readme.md b/keyboards/bakeneko65/rev2/keymaps/default/readme.md new file mode 100644 index 000000000..71ad76773 --- /dev/null +++ b/keyboards/bakeneko65/rev2/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Bakeneko 65 V2 diff --git a/keyboards/bakeneko65/keymaps/via/keymap.c b/keyboards/bakeneko65/rev2/keymaps/via/keymap.c similarity index 100% rename from keyboards/bakeneko65/keymaps/via/keymap.c rename to keyboards/bakeneko65/rev2/keymaps/via/keymap.c diff --git a/keyboards/bakeneko65/keymaps/via/rules.mk b/keyboards/bakeneko65/rev2/keymaps/via/rules.mk similarity index 100% rename from keyboards/bakeneko65/keymaps/via/rules.mk rename to keyboards/bakeneko65/rev2/keymaps/via/rules.mk diff --git a/keyboards/bakeneko65/rev2/readme.md b/keyboards/bakeneko65/rev2/readme.md new file mode 100644 index 000000000..8d2fa6bc5 --- /dev/null +++ b/keyboards/bakeneko65/rev2/readme.md @@ -0,0 +1,17 @@ +# Bakeneko 65 V2 + +A simple 65% keyboard + +* Keyboard Maintainer: [kkatano](https://github.com/kkatano) +* Hardware Supported: Bakeneko 65 V2 +* Hardware Availability: [Open source on GitHub](https://github.com/kkatano/bakeneko-65) + +Make example for this keyboard (after setting up your build environment): + + make bakeneko65/rev2:default + +Flashing example for this keyboard: + + make bakeneko65/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/keyboards/bakeneko65/rev2/rev2.c b/keyboards/bakeneko65/rev2/rev2.c new file mode 100644 index 000000000..a48665079 --- /dev/null +++ b/keyboards/bakeneko65/rev2/rev2.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Koichi Katano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "rev2.h" diff --git a/keyboards/bakeneko65/bakeneko65.h b/keyboards/bakeneko65/rev2/rev2.h similarity index 100% rename from keyboards/bakeneko65/bakeneko65.h rename to keyboards/bakeneko65/rev2/rev2.h diff --git a/keyboards/bakeneko65/rev2/rules.mk b/keyboards/bakeneko65/rev2/rules.mk new file mode 100644 index 000000000..ea1826e24 --- /dev/null +++ b/keyboards/bakeneko65/rev2/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 # Enable Bootmagic Lite +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 diff --git a/keyboards/bakeneko65/rev3/config.h b/keyboards/bakeneko65/rev3/config.h new file mode 100644 index 000000000..6001ce315 --- /dev/null +++ b/keyboards/bakeneko65/rev3/config.h @@ -0,0 +1,109 @@ +/* +Copyright 2020 Koichi Katano + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x3A0E +#define PRODUCT_ID 0x4C83 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kkatano +#define PRODUCT Bakeneko 65 V3 + +/* 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 { E6, B7, F7, F4, F5 } +#define MATRIX_COL_PINS { F6, B0, F1, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 } +#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 + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/bakeneko65/rev3/info.json b/keyboards/bakeneko65/rev3/info.json new file mode 100644 index 000000000..7e63af038 --- /dev/null +++ b/keyboards/bakeneko65/rev3/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Bakeneko 65 V3", + "url": "https://github.com/kkatano/bakeneko-65", + "maintainer": "kkatano", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0.25}, {"x":1, "y":0.25}, {"x":2, "y":0.25}, {"x":3, "y":0.25}, {"x":4, "y":0.25}, {"x":5, "y":0.25}, {"x":6, "y":0.25}, {"x":7, "y":0.25}, {"x":8, "y":0.25}, {"x":9, "y":0.25}, {"x":10, "y":0.25}, {"x":11, "y":0.25}, {"x":12, "y":0.25}, {"x":13, "y":0.25}, {"x":14, "y":0.25}, {"x":15, "y":0.25}, {"x":0, "y":1.25, "w":1.5}, {"x":1.5, "y":1.25}, {"x":2.5, "y":1.25}, {"x":3.5, "y":1.25}, {"x":4.5, "y":1.25}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25}, {"x":7.5, "y":1.25}, {"x":8.5, "y":1.25}, {"x":9.5, "y":1.25}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.25}, {"x":12.5, "y":1.25}, {"x":13.5, "y":1.25, "w":1.5}, {"x":15, "y":1.25}, {"x":0, "y":2.25, "w":1.75}, {"x":1.75, "y":2.25}, {"x":2.75, "y":2.25}, {"x":3.75, "y":2.25}, {"x":4.75, "y":2.25}, {"x":5.75, "y":2.25}, {"x":6.75, "y":2.25}, {"x":7.75, "y":2.25}, {"x":8.75, "y":2.25}, {"x":9.75, "y":2.25}, {"x":10.75, "y":2.25}, {"x":11.75, "y":2.25}, {"x":12.75, "y":2.25, "w":2.25}, {"x":15, "y":2.25}, {"x":0, "y":3.25, "w":2.25}, {"x":2.25, "y":3.25}, {"x":3.25, "y":3.25}, {"x":4.25, "y":3.25}, {"x":5.25, "y":3.25}, {"x":6.25, "y":3.25}, {"x":7.25, "y":3.25}, {"x":8.25, "y":3.25}, {"x":9.25, "y":3.25}, {"x":10.25, "y":3.25}, {"x":11.25, "y":3.25}, {"x":12.25, "y":3.25, "w":1.75}, {"x":14, "y":3.25}, {"x":15, "y":3.25}, {"x":0, "y":4.25, "w":1.25}, {"x":1.25, "y":4.25, "w":1.25}, {"x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"x":10, "y":4.25, "w":1.25}, {"x":11.25, "y":4.25, "w":1.25}, {"x":13, "y":4.25}, {"x":14, "y":4.25}, {"x":15, "y":4.25}] + } + } +} diff --git a/keyboards/bakeneko65/rev3/keymaps/default/keymap.c b/keyboards/bakeneko65/rev3/keymaps/default/keymap.c new file mode 100644 index 000000000..eb745e15c --- /dev/null +++ b/keyboards/bakeneko65/rev3/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2020 kkatano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = 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_INS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/bakeneko65/rev3/keymaps/default/readme.md b/keyboards/bakeneko65/rev3/keymaps/default/readme.md new file mode 100644 index 000000000..ecac9e3df --- /dev/null +++ b/keyboards/bakeneko65/rev3/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Bakeneko 65 V3 diff --git a/keyboards/bakeneko65/rev3/keymaps/via/keymap.c b/keyboards/bakeneko65/rev3/keymaps/via/keymap.c new file mode 100644 index 000000000..aed067bf1 --- /dev/null +++ b/keyboards/bakeneko65/rev3/keymaps/via/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2020 kkatano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 { + _L0, + _L1, + _L2, + _L3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_L0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_L1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [_L1] = 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_INS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_L3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/bm40hsrgb/keymaps/via/rules.mk b/keyboards/bakeneko65/rev3/keymaps/via/rules.mk similarity index 100% rename from keyboards/bm40hsrgb/keymaps/via/rules.mk rename to keyboards/bakeneko65/rev3/keymaps/via/rules.mk diff --git a/keyboards/bakeneko65/rev3/readme.md b/keyboards/bakeneko65/rev3/readme.md new file mode 100644 index 000000000..e147b11e6 --- /dev/null +++ b/keyboards/bakeneko65/rev3/readme.md @@ -0,0 +1,17 @@ +# Bakeneko 65 V3 + +A simple 65% keyboard + +* Keyboard Maintainer: [kkatano](https://github.com/kkatano) +* Hardware Supported: Bakeneko 65 V3 +* Hardware Availability: [Open source on GitHub](https://github.com/kkatano/bakeneko-65) + +Make example for this keyboard (after setting up your build environment): + + make bakeneko65/rev3:default + +Flashing example for this keyboard: + + make bakeneko65/rev3:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bakeneko65/rev3/rev3.c b/keyboards/bakeneko65/rev3/rev3.c new file mode 100644 index 000000000..cf1084d49 --- /dev/null +++ b/keyboards/bakeneko65/rev3/rev3.c @@ -0,0 +1,17 @@ +/* Copyright 2020 Koichi Katano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "rev3.h" diff --git a/keyboards/bakeneko65/rev3/rev3.h b/keyboards/bakeneko65/rev3/rev3.h new file mode 100644 index 000000000..3e46097e3 --- /dev/null +++ b/keyboards/bakeneko65/rev3/rev3.h @@ -0,0 +1,33 @@ +/* Copyright 2020 Koichi Katano + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ + k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ + k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ + k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ + k400, k401, k402, k406, k409, k411, k412, k413, k415 \ +) { \ + { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \ + { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \ + { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ + { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ + { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, KC_NO, k411, k412, k413, KC_NO, k415 } \ +} diff --git a/keyboards/bakeneko65/rev3/rules.mk b/keyboards/bakeneko65/rev3/rules.mk new file mode 100644 index 000000000..c98974aba --- /dev/null +++ b/keyboards/bakeneko65/rev3/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 # Enable Bootmagic Lite +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/keyboards/bakeneko65/rules.mk b/keyboards/bakeneko65/rules.mk deleted file mode 100644 index f8a290cad..000000000 --- a/keyboards/bakeneko65/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# 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 = 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 diff --git a/keyboards/bakeneko80/config.h b/keyboards/bakeneko80/config.h index bda679f5c..8daafeeca 100644 --- a/keyboards/bakeneko80/config.h +++ b/keyboards/bakeneko80/config.h @@ -193,25 +193,6 @@ along with this program. If not, see . /* disable these deprecated features by default */ #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/bakeneko80/rules.mk b/keyboards/bakeneko80/rules.mk index 653fcdb38..b5d7a7300 100644 --- a/keyboards/bakeneko80/rules.mk +++ b/keyboards/bakeneko80/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bantam44/rules.mk b/keyboards/bantam44/rules.mk index e0fbf5a8c..88533bacb 100644 --- a/keyboards/bantam44/rules.mk +++ b/keyboards/bantam44/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -23,6 +23,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend # NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls +MIDI_ENABLE = no # MIDI support # UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/barleycorn/rules.mk b/keyboards/barleycorn/rules.mk index be005ab29..82a406da1 100644 --- a/keyboards/barleycorn/rules.mk +++ b/keyboards/barleycorn/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/barleycorn_smd/rules.mk b/keyboards/barleycorn_smd/rules.mk index fba31123d..f85860018 100644 --- a/keyboards/barleycorn_smd/rules.mk +++ b/keyboards/barleycorn_smd/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/barracuda/rules.mk b/keyboards/barracuda/rules.mk index 09a21e9e0..0706cef85 100644 --- a/keyboards/barracuda/rules.mk +++ b/keyboards/barracuda/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/basekeys/slice/keymaps/default/keymap.c b/keyboards/basekeys/slice/keymaps/default/keymap.c index ffb64998e..ad5e9d9ff 100644 --- a/keyboards/basekeys/slice/keymaps/default/keymap.c +++ b/keyboards/basekeys/slice/keymaps/default/keymap.c @@ -103,7 +103,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return result; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE const char *read_logo(void) { static char logo[] = { diff --git a/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c b/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c index 331dfc0fe..54d41cc38 100644 --- a/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c +++ b/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c @@ -103,7 +103,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return result; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE const char *read_logo(void) { static char logo[] = { diff --git a/keyboards/basekeys/slice/rev1/rules.mk b/keyboards/basekeys/slice/rev1/rules.mk index 16d1ed71e..7dbe9cc98 100644 --- a/keyboards/basekeys/slice/rev1/rules.mk +++ b/keyboards/basekeys/slice/rev1/rules.mk @@ -17,7 +17,7 @@ SPLIT_KEYBOARD = yes # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c index 36bfb79ab..55d914cbc 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c @@ -187,7 +187,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return result; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE const char *read_logo(void) { static char logo[] = { diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c index 5670f275e..d0893ae86 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_qmk_logo(void) { static const char PROGMEM qmk_logo[] = { diff --git a/keyboards/basekeys/slice/rev1_rgb/rules.mk b/keyboards/basekeys/slice/rev1_rgb/rules.mk index 8bf833d3e..2b8982384 100644 --- a/keyboards/basekeys/slice/rev1_rgb/rules.mk +++ b/keyboards/basekeys/slice/rev1_rgb/rules.mk @@ -17,7 +17,7 @@ SPLIT_KEYBOARD = yes # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -27,7 +27,8 @@ 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 RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -OLED_DRIVER_ENABLE = yes # Disable OLED driver. +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Disable OLED driver. UNICODE_ENABLE = no # Unicode -LTO_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/basekeys/trifecta/config.h b/keyboards/basekeys/trifecta/config.h index 8a9529126..28c9c18fb 100644 --- a/keyboards/basekeys/trifecta/config.h +++ b/keyboards/basekeys/trifecta/config.h @@ -80,11 +80,11 @@ # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -//# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +//# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. # define RGB_MATRIX_HUE_STEP 8 # define RGB_MATRIX_SAT_STEP 8 # define RGB_MATRIX_VAL_STEP 8 diff --git a/keyboards/basekeys/trifecta/rules.mk b/keyboards/basekeys/trifecta/rules.mk index 975fe8462..e21560e91 100644 --- a/keyboards/basekeys/trifecta/rules.mk +++ b/keyboards/basekeys/trifecta/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/basketweave/rules.mk b/keyboards/basketweave/rules.mk index 1dfab0792..49e925ef0 100644 --- a/keyboards/basketweave/rules.mk +++ b/keyboards/basketweave/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bastardkb/scylla/config.h b/keyboards/bastardkb/scylla/config.h index 2a4972ea1..d04dcb97f 100644 --- a/keyboards/bastardkb/scylla/config.h +++ b/keyboards/bastardkb/scylla/config.h @@ -52,8 +52,6 @@ # define RGB_MATRIX_SPLIT { 29, 29 } # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50 # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS -# ifndef RGB_DISABLE_WHEN_USB_SUSPENDED -# define RGB_DISABLE_WHEN_USB_SUSPENDED true -# endif +# define RGB_DISABLE_WHEN_USB_SUSPENDED # define RGB_MATRIX_KEYPRESSES #endif diff --git a/keyboards/bastardkb/scylla/rules.mk b/keyboards/bastardkb/scylla/rules.mk index 70e6f13e0..a74b61f9b 100644 --- a/keyboards/bastardkb/scylla/rules.mk +++ b/keyboards/bastardkb/scylla/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -23,3 +23,4 @@ RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output SPLIT_KEYBOARD = yes +LTO_ENABLE = yes diff --git a/keyboards/bastardkb/skeletyl/config.h b/keyboards/bastardkb/skeletyl/config.h index 2431f59df..33f3a5010 100644 --- a/keyboards/bastardkb/skeletyl/config.h +++ b/keyboards/bastardkb/skeletyl/config.h @@ -1,4 +1,4 @@ -/* +/* * Copyright 2021 Quentin LEBASTARD * * This program is free software: you can redistribute it and/or modify @@ -50,8 +50,6 @@ # define RGB_MATRIX_SPLIT { 18, 18 } # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50 # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS -# ifndef RGB_DISABLE_WHEN_USB_SUSPENDED -# define RGB_DISABLE_WHEN_USB_SUSPENDED true -# endif +# define RGB_DISABLE_WHEN_USB_SUSPENDED # define RGB_MATRIX_KEYPRESSES #endif diff --git a/keyboards/bastardkb/tbk/rules.mk b/keyboards/bastardkb/tbk/rules.mk index cc88208e3..fc12eaf0f 100644 --- a/keyboards/bastardkb/tbk/rules.mk +++ b/keyboards/bastardkb/tbk/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bastardkb/tbkmini/config.h b/keyboards/bastardkb/tbkmini/config.h index adda76174..a09dafe48 100644 --- a/keyboards/bastardkb/tbkmini/config.h +++ b/keyboards/bastardkb/tbkmini/config.h @@ -53,8 +53,6 @@ # define RGB_MATRIX_SPLIT { 21, 21 } # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50 # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS -# ifndef RGB_DISABLE_WHEN_USB_SUSPENDED -# define RGB_DISABLE_WHEN_USB_SUSPENDED true -# endif +# define RGB_DISABLE_WHEN_USB_SUSPENDED # define RGB_MATRIX_KEYPRESSES #endif diff --git a/keyboards/bastardkb/tbkmini/rules.mk b/keyboards/bastardkb/tbkmini/rules.mk index f76568dad..0addc90dc 100644 --- a/keyboards/bastardkb/tbkmini/rules.mk +++ b/keyboards/bastardkb/tbkmini/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bat43/config.h b/keyboards/bat43/config.h index 645509e43..08eac7661 100644 --- a/keyboards/bat43/config.h +++ b/keyboards/bat43/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/bat43/rules.mk b/keyboards/bat43/rules.mk index 8ecfbf9f2..e2082d224 100644 --- a/keyboards/bat43/rules.mk +++ b/keyboards/bat43/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bear_face/rules.mk b/keyboards/bear_face/rules.mk index 499388ed1..285f6cf42 100644 --- a/keyboards/bear_face/rules.mk +++ b/keyboards/bear_face/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -17,7 +17,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI controls BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output6 diff --git a/keyboards/beatervan/rules.mk b/keyboards/beatervan/rules.mk index fd23f3301..20c018d95 100644 --- a/keyboards/beatervan/rules.mk +++ b/keyboards/beatervan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -17,7 +17,6 @@ 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/keyboards/bemeier/bmek/rev1/rules.mk b/keyboards/bemeier/bmek/rev1/rules.mk index 17d390f22..c2c08206c 100755 --- a/keyboards/bemeier/bmek/rev1/rules.mk +++ b/keyboards/bemeier/bmek/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/bemeier/bmek/rev2/rules.mk b/keyboards/bemeier/bmek/rev2/rules.mk index 17d390f22..c2c08206c 100755 --- a/keyboards/bemeier/bmek/rev2/rules.mk +++ b/keyboards/bemeier/bmek/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/bemeier/bmek/rev3/rules.mk b/keyboards/bemeier/bmek/rev3/rules.mk index 17d390f22..c2c08206c 100755 --- a/keyboards/bemeier/bmek/rev3/rules.mk +++ b/keyboards/bemeier/bmek/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/bfake/rules.mk b/keyboards/bfake/rules.mk index c25b22249..8b4ecb5ae 100644 --- a/keyboards/bfake/rules.mk +++ b/keyboards/bfake/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/bigseries/1key/rules.mk b/keyboards/bigseries/1key/rules.mk index 18863477f..2957feb55 100755 --- a/keyboards/bigseries/1key/rules.mk +++ b/keyboards/bigseries/1key/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,6 +25,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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/bigseries/2key/rules.mk b/keyboards/bigseries/2key/rules.mk index 18863477f..2957feb55 100755 --- a/keyboards/bigseries/2key/rules.mk +++ b/keyboards/bigseries/2key/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,6 +25,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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/bigseries/3key/rules.mk b/keyboards/bigseries/3key/rules.mk index 18863477f..2957feb55 100755 --- a/keyboards/bigseries/3key/rules.mk +++ b/keyboards/bigseries/3key/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,6 +25,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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/bigseries/4key/rules.mk b/keyboards/bigseries/4key/rules.mk index 18863477f..2957feb55 100755 --- a/keyboards/bigseries/4key/rules.mk +++ b/keyboards/bigseries/4key/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,6 +25,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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/binepad/bn003/rules.mk b/keyboards/binepad/bn003/rules.mk index 7b15ae065..207aad746 100644 --- a/keyboards/binepad/bn003/rules.mk +++ b/keyboards/binepad/bn003/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/bioi/g60/rules.mk b/keyboards/bioi/g60/rules.mk index dc1a000f3..ed9d49370 100644 --- a/keyboards/bioi/g60/rules.mk +++ b/keyboards/bioi/g60/rules.mk @@ -18,7 +18,7 @@ OPT_DEFS += -DUSART1_ENABLED # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bioi/g60ble/rules.mk b/keyboards/bioi/g60ble/rules.mk index 464a6d136..cb577434c 100644 --- a/keyboards/bioi/g60ble/rules.mk +++ b/keyboards/bioi/g60ble/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bioi/morgan65/rules.mk b/keyboards/bioi/morgan65/rules.mk index dc1a000f3..ed9d49370 100644 --- a/keyboards/bioi/morgan65/rules.mk +++ b/keyboards/bioi/morgan65/rules.mk @@ -18,7 +18,7 @@ OPT_DEFS += -DUSART1_ENABLED # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bioi/s65/rules.mk b/keyboards/bioi/s65/rules.mk index 2c7c89112..7d43ac7a0 100644 --- a/keyboards/bioi/s65/rules.mk +++ b/keyboards/bioi/s65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/blackplum/rules.mk b/keyboards/blackplum/rules.mk index 76aeee6ec..cef551c0f 100644 --- a/keyboards/blackplum/rules.mk +++ b/keyboards/blackplum/rules.mk @@ -13,7 +13,7 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/blank_tehnologii/manibus/rules.mk b/keyboards/blank_tehnologii/manibus/rules.mk index bf50c05dd..039bcb0ab 100644 --- a/keyboards/blank_tehnologii/manibus/rules.mk +++ b/keyboards/blank_tehnologii/manibus/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/blockey/config.h b/keyboards/blockey/config.h index 44a3f0a55..c79c58398 100644 --- a/keyboards/blockey/config.h +++ b/keyboards/blockey/config.h @@ -162,24 +162,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/blockey/rules.mk b/keyboards/blockey/rules.mk index e32a36be8..7a27e26b7 100644 --- a/keyboards/blockey/rules.mk +++ b/keyboards/blockey/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bm16a/config.h b/keyboards/bm16a/config.h deleted file mode 100644 index 496ac4a74..000000000 --- a/keyboards/bm16a/config.h +++ /dev/null @@ -1,214 +0,0 @@ -/* Copyright 2019 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0x016A -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPrepublic -#define PRODUCT bm16a - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 4 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { D3, D5, D1, D2} -#define MATRIX_COL_PINS { D6, D4, D7, B4} -#define UNUSED_PINS - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ -//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 - -#define BACKLIGHT_PIN B6 -// #define BACKLIGHT_BREATHING -#define BACKLIGHT_LEVELS 5 - -#define RGB_DI_PIN E2 -#define RGBLED_NUM 4 -#define RGBLIGHT_ANIMATIONS -// #ifdef RGB_DI_PIN -// #define RGBLED_NUM 16 -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 -// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -// /*== all animations enable ==*/ -// #define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ -// #define RGBLIGHT_EFFECT_BREATHING -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL -// #define RGBLIGHT_EFFECT_SNAKE -// #define RGBLIGHT_EFFECT_KNIGHT -// #define RGBLIGHT_EFFECT_CHRISTMAS -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -// #endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -/* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP H -//#define MAGIC_KEY_HELP_ALT SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER0_ALT GRAVE -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER B -//#define MAGIC_KEY_BOOTLOADER_ALT ESC -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_EEPROM_CLEAR BSPACE -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - -/* Bootmagic Lite key configuration */ -// #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/bm16a/readme.md b/keyboards/bm16a/readme.md deleted file mode 100644 index 8d43b7014..000000000 --- a/keyboards/bm16a/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# bm16a - -![bm16a](https://ae01.alicdn.com/kf/HTB1RRRQaZfrK1RjSszcq6xGGFXaY.jpg) - -A 16 key macropad, with USB C, RGB underglow and backlight. - -Keyboard Maintainer: QMK Community -Hardware Supported: The PCBs, controllers supported -Hardware Availability: [KPrepublic](https://kprepublic.com/products/bm16a-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx); [AliExpress](https://www.aliexpress.com/store/product/bm16a-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom/3034003_32970629907.html) - -Make example for this keyboard (after setting up your build environment): - - make bm16a:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bm16a/rules.mk b/keyboards/bm16a/rules.mk deleted file mode 100644 index cd6f78f43..000000000 --- a/keyboards/bm16a/rules.mk +++ /dev/null @@ -1,33 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 - -LAYOUTS = ortho_4x4 diff --git a/keyboards/bm16s/readme.md b/keyboards/bm16s/readme.md deleted file mode 100644 index 097a38008..000000000 --- a/keyboards/bm16s/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -# bm16s - -A 16-key macropad, with USB C and per-key RGB backlighting. This is a variant of the BM16A, but with low profile Choc switches. - -Keyboard Maintainer: QMK Community -Hardware Supported: The PCBs, controllers supported -Hardware Availability: [KPrepublic](https://kprepublic.com/collections/pcb/products/bm16s-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-switch-leds-choc-switch); [AliExpress](https://www.aliexpress.com/item/bm16s-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-switch/32999247908.html); [Massdrop](https://www.massdrop.com/buy/78169) - -Make example for this keyboard (after setting up your build environment): - - make bm16s:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bm16s/rules.mk b/keyboards/bm16s/rules.mk deleted file mode 100755 index 23573664d..000000000 --- a/keyboards/bm16s/rules.mk +++ /dev/null @@ -1,28 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes - -LAYOUTS = ortho_4x4 diff --git a/keyboards/bm40hsrgb/config.h b/keyboards/bm40hsrgb/config.h deleted file mode 100755 index dd66d3b39..000000000 --- a/keyboards/bm40hsrgb/config.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright 2020 tominabox1 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 0x4B50 // "KP" -#define PRODUCT_ID 0x3430 // "40" -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT BM40 Hotswap RGB - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 12 - -/* key matrix pins */ -#define MATRIX_ROW_PINS { B3, B2, E6, B5 } -#define MATRIX_COL_PINS { B6, C6, B4, D7, D4, D6, C7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE - -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -#define RGB_DI_PIN E2 -#define DRIVER_LED_TOTAL 53 -#ifdef RGB_DI_PIN -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses -# define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value -#endif -#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value -#endif diff --git a/keyboards/bm40hsrgb/keymaps/signynt/rules.mk b/keyboards/bm40hsrgb/keymaps/signynt/rules.mk deleted file mode 100644 index 29b992b60..000000000 --- a/keyboards/bm40hsrgb/keymaps/signynt/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -#rules - -MOUSEKEY_ENABLE = yes # Mouse keys -BOOTMAGIC_ENABLE = full -EXTRAKEY_ENABLE = yes # Audio control and System control -TAP_DANCE_ENABLE = yes -#RGB_MATRIX_ENABLE = no diff --git a/keyboards/bm40hsrgb/keymaps/signynt_2_loud/rules.mk b/keyboards/bm40hsrgb/keymaps/signynt_2_loud/rules.mk deleted file mode 100644 index 29b992b60..000000000 --- a/keyboards/bm40hsrgb/keymaps/signynt_2_loud/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -#rules - -MOUSEKEY_ENABLE = yes # Mouse keys -BOOTMAGIC_ENABLE = full -EXTRAKEY_ENABLE = yes # Audio control and System control -TAP_DANCE_ENABLE = yes -#RGB_MATRIX_ENABLE = no diff --git a/keyboards/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk b/keyboards/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk deleted file mode 100644 index 29b992b60..000000000 --- a/keyboards/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -#rules - -MOUSEKEY_ENABLE = yes # Mouse keys -BOOTMAGIC_ENABLE = full -EXTRAKEY_ENABLE = yes # Audio control and System control -TAP_DANCE_ENABLE = yes -#RGB_MATRIX_ENABLE = no diff --git a/keyboards/bm40hsrgb/readme.md b/keyboards/bm40hsrgb/readme.md deleted file mode 100644 index a2448f957..000000000 --- a/keyboards/bm40hsrgb/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# bm40hsrgb - -![BM40 RGB](https://rgoulter.com/images/keyboards/bm40rgb/bm40rgb_large.jpg) - -An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. - -This firmware was originally taken from a kbfirmware.json and manually converted. You may find the original `.json` files [here](https://drive.google.com/drive/folders/1tlTHQIFcluK2mjZ4UbbKCsdRLgSRSPw6). - -* Keyboard Maintainer: [rgoulter](https://github.com/rgoulter) -* Hardware Supported: bm40hsrgb PCB -* Hardware Availability: [KPRepublic](https://www.aliexpress.com/item/4001147779116.html) - -Make example for this keyboard (after setting up your build environment): - - make bm40hsrgb:default - -Flashing example for this keyboard: - - make bm40hsrgb:default:flash - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bm40hsrgb/rules.mk b/keyboards/bm40hsrgb/rules.mk deleted file mode 100755 index 426c99c98..000000000 --- a/keyboards/bm40hsrgb/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# 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 = no # Enable keyboard backlight functionality -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 - -LAYOUTS = planck_mit -LAYOUTS_HAS_RGB = yes diff --git a/keyboards/bm43a/keymaps/stevexyz/rules.mk b/keyboards/bm43a/keymaps/stevexyz/rules.mk deleted file mode 100644 index fa2ef5c2b..000000000 --- a/keyboards/bm43a/keymaps/stevexyz/rules.mk +++ /dev/null @@ -1,8 +0,0 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -COMMAND_ENABLE = no # Commands for debug and configuration -CONSOLE_ENABLE = no # Console for debug - -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/bm43a/readme.md b/keyboards/bm43a/readme.md deleted file mode 100644 index ee5c17333..000000000 --- a/keyboards/bm43a/readme.md +++ /dev/null @@ -1,16 +0,0 @@ -# bm43a - -A 40% mechanical keyboard. - -This firmware was originally taken from a kbfirmware.json and converted through [kbf_qmk_converter](https://noroadsleft.github.io/kbf_qmk_converter/). You may find the original `.json` files [here](https://drive.google.com/drive/folders/11DowBYrFN_uCNa9Q9bXwuMn91vmZYBcG). - - -Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: bm43a PCB -Hardware Availability: [KPRepublic](https://kprepublic.com/products/bm43a-bm43-43-keys-40-custom-mechanical-keyboard-pcb-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx) - -Make example for this keyboard (after setting up your build environment): - - make bm43a:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bm43a/rules.mk b/keyboards/bm43a/rules.mk deleted file mode 100644 index 2b32bbee9..000000000 --- a/keyboards/bm43a/rules.mk +++ /dev/null @@ -1,31 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bm60poker/readme.md b/keyboards/bm60poker/readme.md deleted file mode 100644 index 62dde405c..000000000 --- a/keyboards/bm60poker/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# BM60 Poker 60% Mechanical Keyboard RGB PCB - -A 60% hotswap inswitch RGB (north facing) keyboard from KP Republic. - -* Keyboard Maintainer: [ipetepete](https://github.com/ipetepete) -* Hardware Supported: BM60 POKER RGB -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-poker-60-gh60-hot-swap-custom-mechanical-keyboard-pcb-program-qmk-underglow-type-c) - -Make example for this keyboard (after setting up your build environment): - - make bm60poker: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). - -Video tutorials for customizing the layout: [QMK Tutorials](https://www.youtube.com/playlist?list=PLZlceRZZjRugJFL-vnenYnDrbMc6wu_e_) - By MechMerlin diff --git a/keyboards/bm60poker/rules.mk b/keyboards/bm60poker/rules.mk deleted file mode 100644 index 74364ace1..000000000 --- a/keyboards/bm60poker/rules.mk +++ /dev/null @@ -1,25 +0,0 @@ -# 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 = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 -LAYOUTS = 60_ansi diff --git a/keyboards/bm60rgb/readme.md b/keyboards/bm60rgb/readme.md deleted file mode 100644 index dc093c7b4..000000000 --- a/keyboards/bm60rgb/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -# BM60 RGB - -A 60% hotswap inswitch RGB keyboard from KP Republic. - -* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -* Hardware Supported: BM60 RGB -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-60-gh60-hot-swappable-pcb-programmed-qmk-firmware-type-c) - -Make example for this keyboard (after setting up your build environment): - - make bm60rgb:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bm60rgb/rules.mk b/keyboards/bm60rgb/rules.mk deleted file mode 100644 index 49f18fcbf..000000000 --- a/keyboards/bm60rgb/rules.mk +++ /dev/null @@ -1,39 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 -LTO_ENABLE = yes - -LAYOUTS = 60_ansi_arrow - -# partially generated by KBFirmware JSON to QMK Parser -# https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/bm60rgb_iso/readme.md b/keyboards/bm60rgb_iso/readme.md deleted file mode 100644 index 8ae86e4a6..000000000 --- a/keyboards/bm60rgb_iso/readme.md +++ /dev/null @@ -1,19 +0,0 @@ -# BM60 RGB ISO - -![BM60 RGB ISO](https://i.imgur.com/i3gk2vql.jpg) - -A 60% ISO hotswap inswitch RGB keyboard. - -* Keyboard Maintainer: [markva](https://github.com/markva) -* Hardware Supported: BM60 RGB ISO -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-iso-uk-eu-rgb-60-hot-swappable-pcb-qmk-firmware-rgb-underglow-type-c) - -Make example for this keyboard (after setting up your build environment): - - make bm60rgb_iso:default - -Flashing example for this keyboard: - - make bm60rgb_iso:default:flash - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bm60rgb_iso/rules.mk b/keyboards/bm60rgb_iso/rules.mk deleted file mode 100644 index 8a550e633..000000000 --- a/keyboards/bm60rgb_iso/rules.mk +++ /dev/null @@ -1,25 +0,0 @@ -# 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 = 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 = yes -RGB_MATRIX_DRIVER = WS2812 -LTO_ENABLE = yes diff --git a/keyboards/bm65iso/readme.md b/keyboards/bm65iso/readme.md deleted file mode 100644 index 5b6083ba4..000000000 --- a/keyboards/bm65iso/readme.md +++ /dev/null @@ -1,24 +0,0 @@ -# bm65iso - -![bm65iso](https://ae01.alicdn.com/kf/He2fd118856c7490292bc3c299049fdbcp.jpg) - -A 65% hotswap in switch RGB keyboard from KPRepublic. - -* Keyboard Maintainer: [deadolus](https://github.com/deadolus) -* Hardware Supported: BM65 ISO -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm65rgb-bm65-iso-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-rgb-switch-underglow-type-c) - -Make example for this keyboard (after setting up your build environment): - - make bm65iso:default - -Flashing example for this keyboard: - - make bm65iso:default:flash - -To reset the board into bootloader mode, do one of the following: - -* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in -* Hold the Esc key while connecting the USB cable (also erases persistent settings) - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bm65iso/rules.mk b/keyboards/bm65iso/rules.mk deleted file mode 100644 index a3376d2db..000000000 --- a/keyboards/bm65iso/rules.mk +++ /dev/null @@ -1,27 +0,0 @@ -# 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 = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 -LTO_ENABLE = yes - -LAYOUTS = 65_iso_blocker diff --git a/keyboards/bm68rgb/keymaps/peepeetee/config.h b/keyboards/bm68rgb/keymaps/peepeetee/config.h deleted file mode 100644 index 53eebce7f..000000000 --- a/keyboards/bm68rgb/keymaps/peepeetee/config.h +++ /dev/null @@ -1,132 +0,0 @@ -/* Copyright 2021 peepeetee - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 MODS_SHIFT (get_mods() & MOD_MASK_SHIFT) -// #define MODS_CTRL (get_mods() & MOD_MASK_CTRL) -// #define MODS_ALT (get_mods() & MOD_MASK_ALT) - -// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) // Key combination that allows the use of magic commands (useful for debugging) - -// #define NO_DEBUG // Disable debugging -// #define NO_PRINT // Disable printing/debugging using hid_listen -// #define NO_ACTION_LAYER // Disable layers -// #define NO_ACTION_TAPPING // Disable tap dance and other tapping features -// #define NO_ACTION_ONESHOT // Disable one-shot modifiers -// #define NO_ACTION_MACRO // Disable old style macro handling: MACRO() & action_get_macro -// #define TERMINAL_HELP -// #define MOUSEKEY_INTERVAL 20 -// #define MOUSEKEY_DELAY 0 -// #define MOUSEKEY_TIME_TO_MAX 60 -// #define MOUSEKEY_MAX_SPEED 10 -// #define MOUSEKEY_WHEEL_DELAY 0 -#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. -// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. -// #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) -// #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap -// #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state - #define TAPPING_TERM 200 // How long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too -// #define TAPPING_TERM_PER_KEY // Enables handling for per key TAPPING_TERM settings -// #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release -// #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle -// #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details -// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details -// #define TAPPING_FORCE_HOLD // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) -// #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. -// #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall -// #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. -// #define ONESHOT_TIMEOUT 300 // How long before oneshot times out -// #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered -// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. -// #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. -// #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. -// #define TAP_HOLD_CAPS_DELAY 80 // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPSLOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. - -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_MATRIX_KEYPRESSES // reacts to keypresses -// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_ALPHAS_MODS // Sets the default mode, if none has been set -// #define RGBLIGHT_HUE_STEP 12 // Units to step when in/decreasing hue -// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation -// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) -// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended -// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) -// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -// #define RGBLIGHT_ANIMATIONS // Run RGB animations -// #define RGBLIGHT_ANIMATIONS // Enable all additional animation modes. -// #define RGBLIGHT_EFFECT_ALTERNATING // Enable alternating animation mode. -// #define RGBLIGHT_EFFECT_BREATHING // Enable breathing animation mode. -// #define RGBLIGHT_EFFECT_CHRISTMAS // Enable christmas animation mode. -// #define RGBLIGHT_EFFECT_KNIGHT // Enable knight animation mode. -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD // Enable rainbow mood animation mode. -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL // Enable rainbow swirl animation mode. -// #define RGBLIGHT_EFFECT_RGB_TEST // Enable RGB test animation mode. -// #define RGBLIGHT_EFFECT_SNAKE // Enable snake animation mode. -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT // Enable static gradient mode. - -// #define RGBLIGHT_EFFECT_BREATHE_CENTER // If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 -// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // The maximum brightness for the breathing mode. Valid values are 1 to 255 -// #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 // How long to wait between light changes for the "Christmas" animation, in milliseconds -// #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 // The number of LEDs to group the red/green colors by for the "Christmas" animation -// #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM // The number of LEDs to have the "Knight" animation travel -// #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // The number of LEDs to light up for the "Knight" animation -// #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 // The number of LEDs to start the "Knight" animation from the start of the strip by -// #define RGBLIGHT_RAINBOW_SWIRL_RANGE 255 // Range adjustment for the rainbow swirl effect to get different swirls -// #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation - -// This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. -// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient top to bottom, speed controls how much gradient changes -#define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -//#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard - #define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue - #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -// =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -// =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out diff --git a/keyboards/bm68rgb/readme.md b/keyboards/bm68rgb/readme.md deleted file mode 100644 index 4087fd866..000000000 --- a/keyboards/bm68rgb/readme.md +++ /dev/null @@ -1,24 +0,0 @@ -# bm68rgb - -![bm68rgb](https://i.imgur.com/uuYP8OIl.jpeg) - -A 65% hotswap in switch RGB keyboard from KPRepublic. - -* Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) -* Hardware Supported: BM68 RGB -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm68rgb-bm68-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c) - -Make example for this keyboard (after setting up your build environment): - - make bm68rgb:default - -Flashing example for this keyboard: - - make bm68rgb:default:flash - -To reset the board into bootloader mode, do one of the following: - -* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in -* Hold the Esc key while connecting the USB cable (also erases persistent settings) - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bm68rgb/rules.mk b/keyboards/bm68rgb/rules.mk deleted file mode 100644 index ce5ad8447..000000000 --- a/keyboards/bm68rgb/rules.mk +++ /dev/null @@ -1,27 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 -LTO_ENABLE = yes - -LAYOUTS = 65_ansi diff --git a/keyboards/boardrun/bizarre/rules.mk b/keyboards/boardrun/bizarre/rules.mk index f841c16c3..62115da7a 100644 --- a/keyboards/boardrun/bizarre/rules.mk +++ b/keyboards/boardrun/bizarre/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardrun/classic/rules.mk b/keyboards/boardrun/classic/rules.mk index 065bd5403..69352048d 100644 --- a/keyboards/boardrun/classic/rules.mk +++ b/keyboards/boardrun/classic/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardsource/3x4/config.h b/keyboards/boardsource/3x4/config.h index c997f72a9..a07968a44 100644 --- a/keyboards/boardsource/3x4/config.h +++ b/keyboards/boardsource/3x4/config.h @@ -15,7 +15,7 @@ #define MATRIX_ROWS 3 #define MATRIX_COLS 4 -#define MATRIX_ROW_PINS { F7, F6, F5,} +#define MATRIX_ROW_PINS {F7, F6, F5} #define MATRIX_COL_PINS {B6, B2, B3, B1} #define DIODE_DIRECTION COL2ROW @@ -118,23 +118,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/boardsource/3x4/rules.mk b/keyboards/boardsource/3x4/rules.mk index 9c9acfda2..69987ba49 100644 --- a/keyboards/boardsource/3x4/rules.mk +++ b/keyboards/boardsource/3x4/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/boardsource/4x12/config.h b/keyboards/boardsource/4x12/config.h index 6125260cd..2ba19356d 100644 --- a/keyboards/boardsource/4x12/config.h +++ b/keyboards/boardsource/4x12/config.h @@ -116,23 +116,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/boardsource/4x12/rules.mk b/keyboards/boardsource/4x12/rules.mk index 6799d7072..42a4bba7c 100644 --- a/keyboards/boardsource/4x12/rules.mk +++ b/keyboards/boardsource/4x12/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/boardsource/5x12/config.h b/keyboards/boardsource/5x12/config.h index 3628431d7..80ac30072 100644 --- a/keyboards/boardsource/5x12/config.h +++ b/keyboards/boardsource/5x12/config.h @@ -117,23 +117,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/boardsource/5x12/rules.mk b/keyboards/boardsource/5x12/rules.mk index 4a60507b4..8dc8fe1cc 100644 --- a/keyboards/boardsource/5x12/rules.mk +++ b/keyboards/boardsource/5x12/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/boardsource/beiwagon/rules.mk b/keyboards/boardsource/beiwagon/rules.mk index 1654fb4a6..5084dcf81 100644 --- a/keyboards/boardsource/beiwagon/rules.mk +++ b/keyboards/boardsource/beiwagon/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c b/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c index 44b234e4a..a9065fdfa 100644 --- a/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c +++ b/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c @@ -27,44 +27,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_MOD, KC_VOLD, KC_F1 ), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } static void render_RIP(void) { static const char PROGMEM my_logo[] = { -0xff, 0xff, 0x07, 0x1e, 0x70, 0xc0, 0x00, 0x00, 0xe0, 0x78, 0x1e, 0x07, 0xff, 0xfe, 0x00, 0x00, -0x00, 0x00, 0x03, 0x06, 0x1c, 0xb8, 0xf0, 0xe0, 0xb8, 0x1c, 0x0e, 0x07, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x3e, 0x66, 0x63, 0x63, 0x43, 0x43, 0xc3, 0xc2, 0x82, -0x00, 0x00, 0x00, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0xc0, 0xf0, 0x30, 0xf0, 0x80, 0x00, 0x00, 0xc0, -0xf0, 0x10, 0x00, 0x00, 0x00, 0xf3, 0xf3, 0x00, 0x00, 0x10, 0x18, 0xfe, 0x18, 0x10, 0x10, 0x10, -0x00, 0x00, 0xc0, 0xe0, 0x30, 0x10, 0x18, 0x18, 0x18, 0x10, 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, -0x30, 0x10, 0x18, 0x18, 0x18, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0xf0, 0x90, 0x90, 0x98, -0x98, 0x98, 0xb0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x90, 0x98, 0x98, 0x18, 0x18, 0x10, 0x00, -0x1f, 0x1f, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, -0x00, 0x10, 0x1c, 0x0e, 0x07, 0x01, 0x00, 0x00, 0x01, 0x07, 0x0e, 0x1c, 0x18, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x18, 0x18, 0x10, 0x10, 0x18, 0x18, 0x0d, 0x0f, -0x03, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x1e, 0x1e, 0x07, 0x00, 0x00, 0x01, 0x0f, 0x1c, 0x1e, 0x07, -0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x18, 0x18, 0x18, -0x00, 0x00, 0x03, 0x0f, 0x0c, 0x18, 0x10, 0x10, 0x10, 0x18, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x1f, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x08, 0x18, 0x10, -0x10, 0x10, 0x18, 0x18, 0x08, 0x00, 0x00, 0x08, 0x18, 0x10, 0x11, 0x11, 0x11, 0x19, 0x0f, 0x0e, -0x00, 0x30, 0x30, 0x10, 0x10, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf0, -0x30, 0x10, 0x18, 0x18, 0x10, 0x70, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x40, 0xf0, 0xb0, 0x10, 0x18, -0x18, 0x10, 0x30, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x70, 0x10, 0x18, 0x18, 0x10, 0x30, -0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x18, 0x18, 0x18, -0x10, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0x30, 0x10, 0x18, 0x10, 0x30, 0xf0, -0xe0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x18, 0x18, 0x10, 0x30, 0xf0, 0xe0, 0x00, 0x00, -0x00, 0x00, 0xc0, 0xe0, 0x30, 0x10, 0x18, 0x18, 0x10, 0x30, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc7, -0xc4, 0x8c, 0x8c, 0xcc, 0xc4, 0x77, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x7d, 0xc7, 0xc3, 0x82, -0x82, 0xc3, 0xc7, 0x7d, 0x7c, 0x00, 0x00, 0x00, 0x0f, 0x3f, 0x70, 0xc0, 0x80, 0x80, 0xc0, 0xc0, -0x7f, 0x3f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, -0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xf0, 0xd8, 0xcc, -0xc6, 0xc3, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x0f, 0x3f, 0x70, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0x70, -0x3f, 0x0f, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xd8, 0xcc, 0xcc, 0xc7, 0xc3, 0xc1, 0x00, 0x00, +0xff, 0xff, 0x07, 0x1e, 0x70, 0xc0, 0x00, 0x00, 0xe0, 0x78, 0x1e, 0x07, 0xff, 0xfe, 0x00, 0x00, +0x00, 0x00, 0x03, 0x06, 0x1c, 0xb8, 0xf0, 0xe0, 0xb8, 0x1c, 0x0e, 0x07, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x3e, 0x66, 0x63, 0x63, 0x43, 0x43, 0xc3, 0xc2, 0x82, +0x00, 0x00, 0x00, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0xc0, 0xf0, 0x30, 0xf0, 0x80, 0x00, 0x00, 0xc0, +0xf0, 0x10, 0x00, 0x00, 0x00, 0xf3, 0xf3, 0x00, 0x00, 0x10, 0x18, 0xfe, 0x18, 0x10, 0x10, 0x10, +0x00, 0x00, 0xc0, 0xe0, 0x30, 0x10, 0x18, 0x18, 0x18, 0x10, 0x10, 0x00, 0x00, 0x00, 0xff, 0xff, +0x30, 0x10, 0x18, 0x18, 0x18, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0xf0, 0x90, 0x90, 0x98, +0x98, 0x98, 0xb0, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x90, 0x98, 0x98, 0x18, 0x18, 0x10, 0x00, +0x1f, 0x1f, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, +0x00, 0x10, 0x1c, 0x0e, 0x07, 0x01, 0x00, 0x00, 0x01, 0x07, 0x0e, 0x1c, 0x18, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x18, 0x18, 0x10, 0x10, 0x18, 0x18, 0x0d, 0x0f, +0x03, 0x00, 0x00, 0x00, 0x01, 0x0f, 0x1e, 0x1e, 0x07, 0x00, 0x00, 0x01, 0x0f, 0x1c, 0x1e, 0x07, +0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0c, 0x18, 0x18, 0x18, +0x00, 0x00, 0x03, 0x0f, 0x0c, 0x18, 0x10, 0x10, 0x10, 0x18, 0x08, 0x00, 0x00, 0x00, 0x1f, 0x1f, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x0f, 0x08, 0x18, 0x10, +0x10, 0x10, 0x18, 0x18, 0x08, 0x00, 0x00, 0x08, 0x18, 0x10, 0x11, 0x11, 0x11, 0x19, 0x0f, 0x0e, +0x00, 0x30, 0x30, 0x10, 0x10, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf0, +0x30, 0x10, 0x18, 0x18, 0x10, 0x70, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x40, 0xf0, 0xb0, 0x10, 0x18, +0x18, 0x10, 0x30, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x70, 0x10, 0x18, 0x18, 0x10, 0x30, +0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x18, 0x18, 0x18, +0x10, 0x30, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0x30, 0x10, 0x18, 0x10, 0x30, 0xf0, +0xe0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x10, 0x10, 0x18, 0x18, 0x10, 0x30, 0xf0, 0xe0, 0x00, 0x00, +0x00, 0x00, 0xc0, 0xe0, 0x30, 0x10, 0x18, 0x18, 0x10, 0x30, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xff, 0xff, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc7, +0xc4, 0x8c, 0x8c, 0xcc, 0xc4, 0x77, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x7d, 0xc7, 0xc3, 0x82, +0x82, 0xc3, 0xc7, 0x7d, 0x7c, 0x00, 0x00, 0x00, 0x0f, 0x3f, 0x70, 0xc0, 0x80, 0x80, 0xc0, 0xc0, +0x7f, 0x3f, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, +0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xf0, 0xd8, 0xcc, +0xc6, 0xc3, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x0f, 0x3f, 0x70, 0xc0, 0xc0, 0x80, 0xc0, 0xc0, 0x70, +0x3f, 0x0f, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xd8, 0xcc, 0xcc, 0xc7, 0xc3, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0xe0, 0xc0, 0x80, 0x80, 0xc0, 0x60, 0x7f, 0x1f, 0x00, 0x00, 0x00, 0x00 }; diff --git a/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/rules.mk b/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/rules.mk index c58266213..d34d066de 100644 --- a/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/rules.mk +++ b/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c b/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c index 88fc47a1d..c50e0b4b3 100644 --- a/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c +++ b/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c @@ -27,44 +27,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RGB_MOD, KC_3,KC_4 ), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } static void render_RIP(void) { static const char PROGMEM my_logo[] = { -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x04, -0x04, 0x7c, 0xfc, 0xf0, 0x00, 0x00, 0x40, 0x20, 0xf0, 0x7c, 0x06, 0x00, 0x41, 0xc0, 0x00, 0x00, -0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0xc0, 0x00, -0x00, 0x00, 0xe0, 0x60, 0x00, 0x80, 0x40, 0x20, 0x20, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x3c, 0x02, -0x01, 0xc1, 0xf8, 0x0e, 0x00, 0x01, 0xc0, 0x00, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x50, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x08, -0x03, 0x00, 0x00, 0x0f, 0x06, 0x01, 0x00, 0x1e, 0x1f, 0x10, 0x00, 0x00, 0x1e, 0x1f, 0x08, 0xc0, -0x3e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1e, 0x11, 0x08, 0x04, 0x1e, 0x11, 0x00, -0x08, 0x06, 0x01, 0x00, 0x1e, 0x19, 0x08, 0x00, 0x1e, 0x0b, 0x08, 0x00, 0x1f, 0x1b, 0x08, 0x00, -0x18, 0x1f, 0x00, 0x00, 0x00, 0x1f, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x19, 0x08, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, -0x84, 0x84, 0x84, 0xcc, 0x38, 0x00, 0x00, 0x00, 0xf0, 0x18, 0x04, 0x05, 0x0f, 0x79, 0xe1, 0x00, -0x00, 0x00, 0xc0, 0x78, 0x0c, 0x00, 0x00, 0x0c, 0x84, 0x84, 0xcc, 0xf8, 0x30, 0x00, 0x00, 0xe0, -0xf8, 0x0c, 0x04, 0x04, 0x0c, 0xf8, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0x08, 0x0c, -0x04, 0x04, 0xcc, 0x78, 0x00, 0x00, 0x00, 0xf0, 0x18, 0x0c, 0x04, 0x0c, 0x18, 0xf0, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, -0x10, 0x10, 0x10, 0x19, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x18, 0x10, 0x10, 0x18, 0x0f, 0x07, 0x00, -0x20, 0x1e, 0x03, 0x00, 0x00, 0x00, 0x18, 0x10, 0x10, 0x10, 0x10, 0x1d, 0x0f, 0x00, 0x00, 0x03, -0x0f, 0x18, 0x10, 0x10, 0x18, 0x0f, 0x00, 0x00, 0x38, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x18, 0x1c, -0x16, 0x13, 0x10, 0x10, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x10, 0x10, 0x10, 0x0c, 0x07, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x08, 0x04, +0x04, 0x7c, 0xfc, 0xf0, 0x00, 0x00, 0x40, 0x20, 0xf0, 0x7c, 0x06, 0x00, 0x41, 0xc0, 0x00, 0x00, +0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0xc0, 0x00, +0x00, 0x00, 0xe0, 0x60, 0x00, 0x80, 0x40, 0x20, 0x20, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x3c, 0x02, +0x01, 0xc1, 0xf8, 0x0e, 0x00, 0x01, 0xc0, 0x00, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x50, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x08, +0x03, 0x00, 0x00, 0x0f, 0x06, 0x01, 0x00, 0x1e, 0x1f, 0x10, 0x00, 0x00, 0x1e, 0x1f, 0x08, 0xc0, +0x3e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x1e, 0x11, 0x08, 0x04, 0x1e, 0x11, 0x00, +0x08, 0x06, 0x01, 0x00, 0x1e, 0x19, 0x08, 0x00, 0x1e, 0x0b, 0x08, 0x00, 0x1f, 0x1b, 0x08, 0x00, +0x18, 0x1f, 0x00, 0x00, 0x00, 0x1f, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x19, 0x08, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, +0x84, 0x84, 0x84, 0xcc, 0x38, 0x00, 0x00, 0x00, 0xf0, 0x18, 0x04, 0x05, 0x0f, 0x79, 0xe1, 0x00, +0x00, 0x00, 0xc0, 0x78, 0x0c, 0x00, 0x00, 0x0c, 0x84, 0x84, 0xcc, 0xf8, 0x30, 0x00, 0x00, 0xe0, +0xf8, 0x0c, 0x04, 0x04, 0x0c, 0xf8, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x00, 0x00, 0x08, 0x0c, +0x04, 0x04, 0xcc, 0x78, 0x00, 0x00, 0x00, 0xf0, 0x18, 0x0c, 0x04, 0x0c, 0x18, 0xf0, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, +0x10, 0x10, 0x10, 0x19, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x18, 0x10, 0x10, 0x18, 0x0f, 0x07, 0x00, +0x20, 0x1e, 0x03, 0x00, 0x00, 0x00, 0x18, 0x10, 0x10, 0x10, 0x10, 0x1d, 0x0f, 0x00, 0x00, 0x03, +0x0f, 0x18, 0x10, 0x10, 0x18, 0x0f, 0x00, 0x00, 0x38, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x18, 0x1c, +0x16, 0x13, 0x10, 0x10, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x10, 0x10, 0x10, 0x0c, 0x07, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; diff --git a/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/rules.mk b/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/rules.mk index c58266213..d34d066de 100644 --- a/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/rules.mk +++ b/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/boardsource/holiday/spooky/rules.mk b/keyboards/boardsource/holiday/spooky/rules.mk index 2fd07c241..fd2dc07c6 100644 --- a/keyboards/boardsource/holiday/spooky/rules.mk +++ b/keyboards/boardsource/holiday/spooky/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardsource/microdox/keymaps/cole/keymap.c b/keyboards/boardsource/microdox/keymaps/cole/keymap.c index 62d728000..8ea96e8f9 100644 --- a/keyboards/boardsource/microdox/keymaps/cole/keymap.c +++ b/keyboards/boardsource/microdox/keymaps/cole/keymap.c @@ -38,27 +38,27 @@ enum layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_split_3x5_3( - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - CTRL_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_CTSC, - SHFT_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SHIFT_SLASH, + [_QWERTY] = LAYOUT_split_3x5_3( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + CTRL_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_CTSC, + SHFT_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SHIFT_SLASH, MO(_LOWER),KC_LGUI, RASE_ENT, RASE_BACK, LOWER_SPC, KC_TAB ), - [_RAISE] = 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_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, - KC_LSFT, KC_GRV, PREVWINDOW, NEXTWINDOW, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + [_RAISE] = 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_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, + KC_LSFT, KC_GRV, PREVWINDOW, NEXTWINDOW, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_LGUI, KC_ENT, KC_BSPC, KC_SPC, _______ ), - [_LOWER] = LAYOUT_split_3x5_3( + [_LOWER] = LAYOUT_split_3x5_3( KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, - KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DQT, - KC_ESC, KC_TILD, PREVWINDOW, NEXTWINDOW, RGB_MODE_FORWARD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DQT, + KC_ESC, KC_TILD, PREVWINDOW, NEXTWINDOW, RGB_MODE_FORWARD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_LGUI, KC_ENT, KC_BSPC, KC_SPC, _______ ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) return OLED_ROTATION_180; @@ -73,7 +73,7 @@ static void render_logo(void) { 0 }; oled_write_P(qmk_logo, false); -} +} static void render_status(void) { switch (get_highest_layer(layer_state)) { diff --git a/keyboards/boardsource/microdox/keymaps/cole/rules.mk b/keyboards/boardsource/microdox/keymaps/cole/rules.mk index 48a51b225..d34d066de 100644 --- a/keyboards/boardsource/microdox/keymaps/cole/rules.mk +++ b/keyboards/boardsource/microdox/keymaps/cole/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes \ No newline at end of file +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/boardsource/microdox/keymaps/via/keymap.c b/keyboards/boardsource/microdox/keymaps/via/keymap.c index 2f4785ad2..96e0a024f 100644 --- a/keyboards/boardsource/microdox/keymaps/via/keymap.c +++ b/keyboards/boardsource/microdox/keymaps/via/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) return OLED_ROTATION_180; diff --git a/keyboards/boardsource/microdox/keymaps/via/rules.mk b/keyboards/boardsource/microdox/keymaps/via/rules.mk index fc32a8b11..c84c1f417 100644 --- a/keyboards/boardsource/microdox/keymaps/via/rules.mk +++ b/keyboards/boardsource/microdox/keymaps/via/rules.mk @@ -1,4 +1,5 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 VIA_ENABLE = yes EXTRAKEY_ENABLE = yes RGBLIGHT_ENABLE = yes diff --git a/keyboards/boardsource/microdox/rules.mk b/keyboards/boardsource/microdox/rules.mk index 0cb636df6..f35fc6804 100644 --- a/keyboards/boardsource/microdox/rules.mk +++ b/keyboards/boardsource/microdox/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardsource/technik_o/rules.mk b/keyboards/boardsource/technik_o/rules.mk index 3468a7101..d27b823b0 100644 --- a/keyboards/boardsource/technik_o/rules.mk +++ b/keyboards/boardsource/technik_o/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardsource/technik_s/rules.mk b/keyboards/boardsource/technik_s/rules.mk index 293f8de84..412923e4a 100644 --- a/keyboards/boardsource/technik_s/rules.mk +++ b/keyboards/boardsource/technik_s/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardsource/the_mark/config.h b/keyboards/boardsource/the_mark/config.h index 5888452ce..cbfe4cd51 100644 --- a/keyboards/boardsource/the_mark/config.h +++ b/keyboards/boardsource/the_mark/config.h @@ -41,8 +41,8 @@ along with this program. If not, see . * */ -#define MATRIX_ROW_PINS {B0, B1, B2, B3, B4,} -#define MATRIX_COL_PINS { B5, B6, B7, F5, C7, D0, D1, D2, D3, D4, D5, D6, D7,F0, F1, F4} +#define MATRIX_ROW_PINS {B0, B1, B2, B3, B4} +#define MATRIX_COL_PINS {B5, B6, B7, F5, C7, D0, D1, D2, D3, D4, D5, D6, D7,F0, F1, F4} #define UNUSED_PINS /* COL2ROW, ROW2COL */ @@ -56,11 +56,9 @@ along with this program. If not, see . /* RGB matrix support */ #ifdef RGB_MATRIX_ENABLE -#define DRIVER_LED_TOTAL 24 // Number of LEDs -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -# ifndef RGB_DISABLE_WHEN_USB_SUSPENDED -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended -# endif +# define DRIVER_LED_TOTAL 24 // Number of LEDs +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #endif /* diff --git a/keyboards/boardsource/the_mark/rules.mk b/keyboards/boardsource/the_mark/rules.mk index 8fb8f42bc..b5aa34173 100644 --- a/keyboards/boardsource/the_mark/rules.mk +++ b/keyboards/boardsource/the_mark/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardwalk/keymaps/mcallaster/keymap.c b/keyboards/boardwalk/keymaps/mcallaster/keymap.c index 9ec6f9267..ac1df1b03 100644 --- a/keyboards/boardwalk/keymaps/mcallaster/keymap.c +++ b/keyboards/boardwalk/keymaps/mcallaster/keymap.c @@ -49,6 +49,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _FN); } diff --git a/keyboards/boardwalk/keymaps/niclake/rules.mk b/keyboards/boardwalk/keymaps/niclake/rules.mk index 000a2e121..0b4dadb10 100644 --- a/keyboards/boardwalk/keymaps/niclake/rules.mk +++ b/keyboards/boardwalk/keymaps/niclake/rules.mk @@ -1,3 +1,3 @@ COMMAND_ENABLE = no RGBLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/boardwalk/rules.mk b/keyboards/boardwalk/rules.mk index 88cce1631..f861731c2 100644 --- a/keyboards/boardwalk/rules.mk +++ b/keyboards/boardwalk/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/bop/rules.mk b/keyboards/bop/rules.mk index 2ddb011e1..74f58ddfd 100644 --- a/keyboards/bop/rules.mk +++ b/keyboards/bop/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boston/rules.mk b/keyboards/boston/rules.mk index 24e1dbe3c..e6eaba0d7 100644 --- a/keyboards/boston/rules.mk +++ b/keyboards/boston/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boston_meetup/2019/config.h b/keyboards/boston_meetup/2019/config.h index d9fd93da6..a1f4fc456 100644 --- a/keyboards/boston_meetup/2019/config.h +++ b/keyboards/boston_meetup/2019/config.h @@ -113,26 +113,6 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ - -#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 2 /* Haptic Driver initialization settings * Feedback Control Settings */ diff --git a/keyboards/boston_meetup/2019/rules.mk b/keyboards/boston_meetup/2019/rules.mk index aa1920ae5..236f28c4e 100644 --- a/keyboards/boston_meetup/2019/rules.mk +++ b/keyboards/boston_meetup/2019/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/botanicalkeyboards/fm2u/rules.mk b/keyboards/botanicalkeyboards/fm2u/rules.mk index be4309735..7b528f558 100644 --- a/keyboards/botanicalkeyboards/fm2u/rules.mk +++ b/keyboards/botanicalkeyboards/fm2u/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/box75/rules.mk b/keyboards/box75/rules.mk index f444528f1..a4f84f999 100644 --- a/keyboards/box75/rules.mk +++ b/keyboards/box75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/bpiphany/frosty_flake/config.h b/keyboards/bpiphany/frosty_flake/config.h index 344db5f0d..ae19184a6 100644 --- a/keyboards/bpiphany/frosty_flake/config.h +++ b/keyboards/bpiphany/frosty_flake/config.h @@ -40,7 +40,12 @@ along with this program. If not, see . /* * Keyboard Matrix Assignments + * + * MATRIX_ROW_PINS and MATRIX_COL_PINS aren't actually used and are included + * for data driven compatibility. */ +#define MATRIX_COL_PINS { B0, B3, B2, B1, B6, B4, B5, C7 } +#define MATRIX_ROW_PINS { NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } #define UNUSED_PINS { C0, C1, C2, C3, C4, D2, D7 } /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/bpiphany/frosty_flake/frosty_flake.h b/keyboards/bpiphany/frosty_flake/frosty_flake.h index cc870c277..f4f69f1a3 100644 --- a/keyboards/bpiphany/frosty_flake/frosty_flake.h +++ b/keyboards/bpiphany/frosty_flake/frosty_flake.h @@ -111,12 +111,26 @@ KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ -) LAYOUT_tkl( \ - KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ - KN2, KC_NO, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ -) +) \ +{ \ +/* 0 1 2 3 4 5 6 7 */ \ +/* A */ { KC_NO, KA1, KC_NO, KC_NO, KA4, KA5, KC_NO, KA7, }, \ +/* B */ { KB0, KB1, KB2, KB3, KB4, KC_NO, KB6, KB7, }, \ +/* C */ { KC0, KC_NO, KC_NO, KC_NO, KC_NO, KC5, KC6, KC7, }, \ +/* D */ { KD0, KD1, KD2, KD3, KD4, KD5, KC_NO, KD7, }, \ +/* E */ { KC_NO, KE1, KE2, KE3, KE4, KE5, KE6, KE7, }, \ +/* F */ { KF0, KF1, KF2, KF3, KF4, KF5, KF6, KF7, }, \ +/* G */ { KG0, KG1, KG2, KG3, KG4, KG5, KG6, KG7, }, \ +/* H */ { KC_NO, KH1, KH2, KH3, KH4, KH5, KH6, KH7, }, \ +/* I */ { KC_NO, KI1, KI2, KI3, KI4, KI5, KC_NO, KI7, }, \ +/* J */ { KC_NO, KJ1, KJ2, KJ3, KJ4, KJ5, KJ6, KJ7, }, \ +/* K */ { KK0, KC_NO, KC_NO, KC_NO, KK4, KC_NO, KK6, KC_NO, }, \ +/* L */ { KL0, KC_NO, KC_NO, KC_NO, KL4, KC_NO, KC_NO, KC_NO, }, \ +/* M */ { KC_NO, KC_NO, KC_NO, KM3, KC_NO, KC_NO, KC_NO, KC_NO, }, \ +/* N */ { KC_NO, KC_NO, KN2, KN3, KC_NO, KC_NO, KC_NO, KC_NO, }, \ +/* O */ { KO0, KC_NO, KC_NO, KC_NO, KO4, KC_NO, KO6, KO7, }, \ +/* P */ { KC_NO, KC_NO, KP2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, \ +/* Q */ { KC_NO, KC_NO, KC_NO, KC_NO, KQ4, KC_NO, KC_NO, KQ7, }, \ +/* R */ { KR0, KC_NO, KR2, KR3, KR4, KR5, KR6, KR7, }, \ +} diff --git a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/rules.mk b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/rules.mk index 1b0aead1d..2c5d53c82 100644 --- a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/rules.mk +++ b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/bpiphany/frosty_flake/keymaps/default/rules.mk b/keyboards/bpiphany/frosty_flake/keymaps/default/rules.mk index a5a411e8f..e7945ceb9 100644 --- a/keyboards/bpiphany/frosty_flake/keymaps/default/rules.mk +++ b/keyboards/bpiphany/frosty_flake/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bpiphany/frosty_flake/keymaps/nikchi/rules.mk b/keyboards/bpiphany/frosty_flake/keymaps/nikchi/rules.mk index de0f30e48..c2682fb1b 100644 --- a/keyboards/bpiphany/frosty_flake/keymaps/nikchi/rules.mk +++ b/keyboards/bpiphany/frosty_flake/keymaps/nikchi/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/bpiphany/frosty_flake/keymaps/tkl/rules.mk b/keyboards/bpiphany/frosty_flake/keymaps/tkl/rules.mk index c76a5a80e..1d89eaf91 100644 --- a/keyboards/bpiphany/frosty_flake/keymaps/tkl/rules.mk +++ b/keyboards/bpiphany/frosty_flake/keymaps/tkl/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/bpiphany/frosty_flake/rules.mk b/keyboards/bpiphany/frosty_flake/rules.mk index 8756a89b6..05aa3dcc7 100644 --- a/keyboards/bpiphany/frosty_flake/rules.mk +++ b/keyboards/bpiphany/frosty_flake/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c index e2b56132b..cc4d0bca6 100644 --- a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c +++ b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c @@ -1,12 +1,6 @@ #include QMK_KEYBOARD_H #include "mousekey.h" -#undef C -#undef S -#define C(kc) LCTL(KC_##kc) -#define S(kc) LSFT(KC_##kc) -#define RA(kc) RALT(KC_##kc) -#define KC_SLCT KC_SELECT #define MEDAPP LT(MEDIA, KC_APP) uint8_t current_layer_global = 255; @@ -21,19 +15,16 @@ enum layers { MISC, }; -enum function_id { - LSHFT_PAREN, +enum custom_keycodes { + LSHFT_PAREN = SAFE_RANGE, RSHFT_PAREN, LCTRL_BRACKET, RCTRL_BRACKET, LALT_CURLY, RALT_CURLY, - CTRL_CLICK -}; - -enum macro_id { - GRV, - CFLEX + CTRL_CLICK, + M_GRV, + M_CFLEX }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -42,25 +33,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9,KC_PPLS, \ TT(MOUSE1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \ - F(8),KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, F(9), KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \ - F(1),KC_LGUI, F(3), LT(MISC, KC_SPC), F(4),TT(PROG1), MEDAPP, F(2), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT), + LSHFT_PAREN,KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, RSHFT_PAREN, KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \ + LCTRL_BRACKET,KC_LGUI, LALT_CURLY, LT(MISC, KC_SPC), RALT_CURLY,TT(PROG1), MEDAPP, RCTRL_BRACKET, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT), /* Layer 1: Programming Layer 1, emulating US l ayout */ [PROG1] = LAYOUT(\ KC_ESC,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \ - M(GRV),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_SLSH, S(0),_______, _______,_______,_______, _______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______, KC_Z,_______,_______,_______,_______, RA(8), RA(9),RA(MINS), _______,_______,_______, _______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,S(COMM),S(BSLS), _______, _______,_______,_______, \ - MO(PROG2),_______, KC_Y,_______,_______,_______,_______,_______,_______,_______,_______, S(7), MO(PROG2), _______, _______,_______,_______,_______, \ + M_GRV,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_SLSH,S(KC_0),_______, _______,_______,_______, _______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______, KC_Z,_______,_______,_______,_______,ALGR(KC_8),ALGR(KC_9),ALGR(KC_MINS), _______,_______,_______, _______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,S(KC_COMM),S(KC_BSLS), _______, _______,_______,_______, \ + MO(PROG2),_______, KC_Y,_______,_______,_______,_______,_______,_______,_______,_______, S(KC_7), MO(PROG2), _______, _______,_______,_______,_______, \ _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______, _______,_______), /* Layer 2: programming layer 2 all keys that are not FN keys are sent as LSFT+key on this layer */ [PROG2] = LAYOUT(\ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \ - RA(RBRC),_______, RA(Q),KC_BSLS,_______,_______,M(CFLEX), S(6),S(RBRC), S(8), S(9),S(SLSH),KC_RBRC,_______, _______,_______,_______, _______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, RA(7), RA(0),RA(NUBS), _______,_______,_______, _______,_______,_______,_______, \ - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, S(DOT), S(2), _______, _______,_______,_______, \ - _______,S(NUBS),_______,_______,_______,_______,_______,_______,_______,KC_NUBS,S(NUBS),S(MINS), _______, _______, _______,_______,_______,_______, \ + ALGR(KC_RBRC),_______, ALGR(KC_Q),KC_BSLS,_______,_______,M_CFLEX, S(KC_6),S(KC_RBRC), S(KC_8),S(KC_9),S(KC_SLSH),KC_RBRC,_______, _______,_______,_______, _______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, ALGR(KC_7),ALGR(KC_0),ALGR(KC_NUBS), _______,_______,_______, _______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, S(KC_DOT), S(KC_2), _______, _______,_______,_______, \ + _______,S(KC_NUBS),_______,_______,_______,_______,_______,_______,_______,KC_NUBS,S(KC_NUBS),S(KC_MINS), _______, _______, _______,_______,_______,_______, \ _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______, _______,_______), /* Layer 3: media layer */ [MEDIA] = LAYOUT(\ @@ -72,11 +63,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX,_______,XXXXXXX, KC_MRWD,KC_MSTP,KC_MFFD, XXXXXXX,XXXXXXX), /* Layer 4: Mouse layer */ [MOUSE1] = LAYOUT(\ - F(6),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \ + TO(DEFAULT),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \ _______,KC_ACL0,KC_ACL1,KC_ACL2,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______,_______,_______,_______, \ - _______,KC_BTN4,KC_WH_D,KC_MS_U,KC_WH_U,_______, C(Z),_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______,_______,_______,_______, \ - _______,KC_BTN5,KC_MS_L,KC_MS_D,KC_MS_R, F(7),KC_WH_L,KC_WH_D,KC_WH_U,KC_WH_R,_______,_______, _______, _______,_______,_______, \ - MO(MOUSE2),_______, C(Y), C(X), C(C), C(V),_______,KC_BTN2,KC_BTN3,C(PGUP),C(PGDN),_______, KC_RSFT, _______, _______,_______,_______,_______, \ + _______,KC_BTN4,KC_WH_D,KC_MS_U,KC_WH_U,_______, C(KC_Z),_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______,_______,_______,_______, \ + _______,KC_BTN5,KC_MS_L,KC_MS_D,KC_MS_R, CTRL_CLICK,KC_WH_L,KC_WH_D,KC_WH_U,KC_WH_R,_______,_______, _______, _______,_______,_______, \ + MO(MOUSE2),_______,C(KC_Y),C(KC_X),C(KC_C),C(KC_V),_______,KC_BTN2,KC_BTN3,C(KC_PGUP),C(KC_PGDN),_______, KC_RSFT, _______, _______,_______,_______,_______, \ KC_LCTL,_______,KC_LALT, KC_BTN1, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, _______,_______,_______, _______,_______), /* Layer 5: Mouse layer 2*/ [MOUSE2] = LAYOUT(\ @@ -90,44 +81,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MISC] = LAYOUT(\ _______, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, _______,_______,_______, \ _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, _______,_______,_______,_______, \ - _______,KC_SLCT, C(W), KC_UP,_______,_______,_______,_______,KC_BSPC, KC_DEL,_______,_______,_______,_______, _______,_______,_______, _______,_______,_______,_______, \ + _______,KC_SLCT, C(KC_W), KC_UP,_______,_______,_______,_______,KC_BSPC, KC_DEL,_______,_______,_______,_______, _______,_______,_______, _______,_______,_______,_______, \ _______,_______,KC_LEFT,KC_DOWN,KC_RGHT,_______,KC_HOME,KC_PGDN,KC_PGUP,_______,_______,_______, _______, _______,_______,_______, \ - KC_LSFT,_______, C(Y), C(X), C(C), C(V), KC_SPC, KC_END,_______,C(PGUP),C(PGDN),_______, _______, _______, _______,_______,_______,_______, \ + KC_LSFT,_______,C(KC_Y),C(KC_X),C(KC_C),C(KC_V), KC_SPC, KC_END,_______,C(KC_PGUP),C(KC_PGDN),_______, _______, _______, _______,_______,_______,_______, \ _______,_______,_______, LT(MISC, KC_SPC), _______,_______,_______,_______, _______,_______,_______, _______,_______), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_FUNCTION_TAP(LCTRL_BRACKET), // tap to print [ - [2] = ACTION_FUNCTION_TAP(RCTRL_BRACKET), // tap to print ] - [3] = ACTION_FUNCTION_TAP(LALT_CURLY), // tap to print { - [4] = ACTION_FUNCTION_TAP(RALT_CURLY), // tap to print } - [6] = ACTION_LAYER_SET_CLEAR(DEFAULT), - [7] = ACTION_FUNCTION_TAP(CTRL_CLICK), - [8] = ACTION_FUNCTION_TAP(LSHFT_PAREN), // tap to print ( - [9] = ACTION_FUNCTION_TAP(RSHFT_PAREN), // tap to print ) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case GRV: // macro to print accent grave - return (record->event.pressed ? - MACRO( D(LSFT), T(EQL), U(RALT), T(SPC), END) : - MACRO_NONE ); - case CFLEX: // print accent circonflex - return (record->event.pressed ? - MACRO( T(GRV), T(SPC), END ) : - MACRO_NONE ); - } - return MACRO_NONE; -}; - - -void matrix_init_user(void) { - -} - void matrix_scan_user(void) { uint8_t layer; layer = biton32(layer_state); @@ -147,10 +106,6 @@ void matrix_scan_user(void) { } } -void led_set_user(uint8_t usb_led) { - -} - void tap_helper(keyrecord_t *record, uint16_t orig_mod, uint16_t macro_mod, uint16_t macro_kc ) { if (record->event.pressed) { if (record->tap.count > 0 && !record->tap.interrupted) { @@ -175,47 +130,6 @@ void tap_helper(keyrecord_t *record, uint16_t orig_mod, uint16_t macro_mod, uint } } -/* if LCTRL is tabbed, print (, or ) if RCTRL is tabbed, same for LALT/RALT and [/] */ -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - // The code is copied from keymap_hasu.c in the tmk keyboards hhkb folder - switch (id) { - case LCTRL_BRACKET: - tap_helper(record, KC_LCTL, KC_RALT, KC_8); - break; - case RCTRL_BRACKET: - tap_helper(record, KC_RCTL, KC_RALT, KC_9); - break; - case LALT_CURLY: - tap_helper(record, KC_LALT, KC_RALT, KC_7); - break; - case RALT_CURLY: - tap_helper(record, KC_RALT, KC_RALT, KC_0); - break; - case LSHFT_PAREN: - tap_helper(record, KC_LSFT, KC_LSFT, KC_8); - break; - case RSHFT_PAREN: - tap_helper(record, KC_RSFT, KC_LSFT, KC_9); - break; - case CTRL_CLICK: - if (record->event.pressed) { - mousekey_clear(); - register_mods(MOD_BIT(KC_LCTL)); - send_keyboard_report(); - wait_ms(5); - mousekey_on(KC_BTN1); - mousekey_send(); - wait_ms(10); - mousekey_off(KC_BTN1); - mousekey_send(); - wait_ms(5); - unregister_mods(MOD_BIT(KC_LCTL)); - send_keyboard_report(); - } - break; - } -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { uint8_t layer; layer = biton32(layer_state); @@ -235,5 +149,51 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } } + + switch (keycode) { + case LCTRL_BRACKET: + tap_helper(record, KC_LCTL, KC_RALT, KC_8); + return false; + case RCTRL_BRACKET: + tap_helper(record, KC_RCTL, KC_RALT, KC_9); + return false; + case LALT_CURLY: + tap_helper(record, KC_LALT, KC_RALT, KC_7); + return false; + case RALT_CURLY: + tap_helper(record, KC_RALT, KC_RALT, KC_0); + return false; + case LSHFT_PAREN: + tap_helper(record, KC_LSFT, KC_LSFT, KC_8); + return false; + case RSHFT_PAREN: + tap_helper(record, KC_RSFT, KC_LSFT, KC_9); + return false; + case CTRL_CLICK: + if (record->event.pressed) { + mousekey_clear(); + register_mods(MOD_BIT(KC_LCTL)); + send_keyboard_report(); + wait_ms(5); + mousekey_on(KC_BTN1); + mousekey_send(); + wait_ms(10); + mousekey_off(KC_BTN1); + mousekey_send(); + wait_ms(5); + unregister_mods(MOD_BIT(KC_LCTL)); + send_keyboard_report(); + } + return false; + case M_GRV: + tap_code16(S(KC_EQL)); + tap_code(KC_SPC); + return false; + case M_CFLEX: + tap_code(KC_GRV); + tap_code(KC_SPC); + return false; + } + return true; } diff --git a/keyboards/bpiphany/kitten_paw/rules.mk b/keyboards/bpiphany/kitten_paw/rules.mk index 23546e4f0..9fe5e488f 100644 --- a/keyboards/bpiphany/kitten_paw/rules.mk +++ b/keyboards/bpiphany/kitten_paw/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bpiphany/pegasushoof/2013/2013.h b/keyboards/bpiphany/pegasushoof/2013/2013.h index b3e911ab4..7a4d7f0b5 100644 --- a/keyboards/bpiphany/pegasushoof/2013/2013.h +++ b/keyboards/bpiphany/pegasushoof/2013/2013.h @@ -45,14 +45,16 @@ along with this program. If not, see . KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \ - ) LAYOUT( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ - KB2,KC_NO,KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0 \ - ) + ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ + /* 0 */ { KC_NO , KC_NO , KC0 , KC_NO , KC_NO , KF0 , KC_NO , KC_NO , KC_NO , KJ0 , KK0 , KC_NO , KM0 , KN0 , KO0 , KC_NO , KQ0 , KR0 }, \ + /* 1 */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KG1 , KH1 , KI1 , KJ1 , KK1 , KL1 , KM1 , KC_NO , KO1 , KP1 , KC_NO , KC_NO }, \ + /* 2 */ { KC_NO , KB2 , KC_NO , KD2 , KC_NO , KF2 , KG2 , KH2 , KI2 , KJ2 , KK2 , KL2 , KM2 , KC_NO , KO2 , KC_NO , KC_NO , KC_NO }, \ + /* 3 */ { KA3 , KB3 , KC_NO , KC_NO , KC_NO , KF3 , KG3 , KH3 , KI3 , KJ3 , KK3 , KL3 , KM3 , KC_NO , KO3 , KC_NO , KC_NO , KC_NO }, \ + /* 4 */ { KC_NO , KC_NO , KC4 , KC_NO , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , KM4 , KC_NO , KO4 , KP4 , KQ4 , KR4 }, \ + /* 5 */ { KC_NO , KC_NO , KC5 , KC_NO , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , KK5 , KL5 , KM5 , KN5 , KO5 , KP5 , KC_NO , KC_NO }, \ + /* 6 */ { KC_NO , KC_NO , KC6 , KC_NO , KC_NO , KF6 , KG6 , KC_NO , KI6 , KJ6 , KK6 , KL6 , KC_NO , KN6 , KO6 , KC_NO , KQ6 , KC_NO }, \ + /* 7 */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KF7 , KG7 , KH7 , KI7 , KJ7 , KK7 , KL7 , KM7 , KN7 , KC_NO , KP7 , KC_NO , KC_NO } \ + } #define LAYOUT_tkl_jis( \ KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ diff --git a/keyboards/bpiphany/pegasushoof/2015/2015.h b/keyboards/bpiphany/pegasushoof/2015/2015.h index 8a0084d40..418772aa2 100644 --- a/keyboards/bpiphany/pegasushoof/2015/2015.h +++ b/keyboards/bpiphany/pegasushoof/2015/2015.h @@ -47,14 +47,16 @@ along with this program. If not, see . KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ - ) LAYOUT( \ - KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ - KN2,KC_NO,KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ - ) + ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ + /* 0 */ { ___ , KB0 , KC0 , KD0 , ___ , KF0 , KG0 , ___ , ___ , ___ , KK0 , KL0 , ___ , ___ , KO0 , ___ , ___ , KR0 }, \ + /* 1 */ { KA1 , KB1 , ___ , KD1 , KE1 , KF1 , KG1 , KH1 , KI1 , KJ1 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ }, \ + /* 2 */ { ___ , KB2 , ___ , KD2 , KE2 , KF2 , KG2 , KH2 , KI2 , KJ2 , ___ , ___ , ___ , KN2 , ___ , KP2 , ___ , KR2 }, \ + /* 3 */ { ___ , KB3 , ___ , KD3 , KE3 , KF3 , KG3 , KH3 , KI3 , KJ3 , ___ , ___ , KM3 , KN3 , ___ , ___ , ___ , KR3 }, \ + /* 4 */ { KA4 , KB4 , ___ , KD4 , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , ___ , ___ , KO4 , ___ , KQ4 , KR4 }, \ + /* 5 */ { KA5 , ___ , KC5 , KD5 , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , KR5 }, \ + /* 6 */ { ___ , KB6 , KC6 , ___ , KE6 , KF6 , KG6 , KH6 , ___ , KJ6 , KK6 , ___ , ___ , ___ , KO6 , ___ , ___ , KR6 }, \ + /* 7 */ { KA7 , KB7 , KC7 , KD7 , KE7 , KF7 , KG7 , KH7 , KI7 , KJ7 , ___ , ___ , ___ , ___ , KO7 , ___ , KQ7 , KR7 } \ + } #define LAYOUT_tkl_iso( \ KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ @@ -63,14 +65,16 @@ along with this program. If not, see . KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB3, KB1, \ KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ - ) LAYOUT( \ - KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ - KN2, KI6 ,KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ - ) + ) { /* 00-A 01-B 02-C 03-D 04-E 05-F 06-G 07-H 08-I 09-J 10-K 11-L 12-M 13-N 14-O 15-P 16-Q 17-R */ \ + /* 0 */ { ___ , KB0 , KC0 , KD0 , ___ , KF0 , KG0 , ___ , ___ , ___ , KK0 , KL0 , ___ , ___ , KO0 , ___ , ___ , KR0 }, \ + /* 1 */ { KA1 , KB1 , ___ , KD1 , KE1 , KF1 , KG1 , KH1 , KI1 , KJ1 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , ___ }, \ + /* 2 */ { ___ , KB2 , ___ , KD2 , KE2 , KF2 , KG2 , KH2 , KI2 , KJ2 , ___ , ___ , ___ , KN2 , ___ , KP2 , ___ , KR2 }, \ + /* 3 */ { ___ , KB3 , ___ , KD3 , KE3 , KF3 , KG3 , KH3 , KI3 , KJ3 , ___ , ___ , KM3 , KN3 , ___ , ___ , ___ , KR3 }, \ + /* 4 */ { KA4 , KB4 , ___ , KD4 , KE4 , KF4 , KG4 , KH4 , KI4 , KJ4 , KK4 , KL4 , ___ , ___ , KO4 , ___ , KQ4 , KR4 }, \ + /* 5 */ { KA5 , ___ , KC5 , KD5 , KE5 , KF5 , KG5 , KH5 , KI5 , KJ5 , ___ , ___ , ___ , ___ , ___ , ___ , ___ , KR5 }, \ + /* 6 */ { ___ , KB6 , KC6 , ___ , KE6 , KF6 , KG6 , KH6 , KI6 , KJ6 , KK6 , ___ , ___ , ___ , KO6 , ___ , ___ , KR6 }, \ + /* 7 */ { KA7 , KB7 , KC7 , KD7 , KE7 , KF7 , KG7 , KH7 , KI7 , KJ7 , ___ , ___ , ___ , ___ , KO7 , ___ , KQ7 , KR7 } \ + } #define LAYOUT_tkl_jis( \ KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ diff --git a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c index f9234a7b2..788446202 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c +++ b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/keymap.c @@ -24,8 +24,8 @@ along with this program. If not, see . #define SE_AO KC_LBRC #define SE_CIRC KC_RBRC #define SE_QUOT KC_BSLS -#define SE_OE KC_SCLN -#define SE_AE KC_QUOT +#define SE_ODIA KC_SCLN +#define SE_ADIA KC_QUOT #define SE_MINS KC_SLSH #define SE_LTGT KC_NUBS #define SE_LCBR RALT(KC_7) @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [KM_BLOWRAK] = LAYOUT( \ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ SE_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,SE_ACUT,KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \ - KC_TAB, SE_AO, SE_AE, SE_OE, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM,SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ + KC_TAB, SE_AO, SE_ADIA,SE_ODIA,KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_COMM,SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ KC_LCTRL,KC_A, KC_O, KC_E, KC_U, KC_I, KC_H, KC_D, KC_T, KC_N, KC_S, SE_MINS, KC_ENT, \ KC_LSFT, SE_LTGT,KC_DOT, KC_Q, KC_J, KC_K, KC_B, KC_X, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_UP, \ MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,TG(KM_QWERTY), KC_LEFT,KC_DOWN,KC_RGHT), @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \ SE_HALF, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS,SE_ACUT,KC_BSPC, KC_INS, KC_HOME,KC_PGUP, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AO, SE_CIRC,SE_QUOT, KC_DEL, KC_END, KC_PGDN, \ - KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_OE, SE_AE, KC_ENT, \ + KC_LCTRL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_ODIA,SE_ADIA, KC_ENT, \ KC_LSFT, SE_LTGT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, SE_MINS, KC_RSFT, KC_UP, \ MO(KM_MEDIA),KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_MENU,TG(KM_QWERTY), KC_LEFT,KC_DOWN,KC_RGHT), /* Layer 2: Media layer */ diff --git a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/rules.mk b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/rules.mk index a605a865e..9af05bb3d 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/rules.mk +++ b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/bpiphany/pegasushoof/keymaps/citadel/rules.mk b/keyboards/bpiphany/pegasushoof/keymaps/citadel/rules.mk index 3eb289a71..294a245aa 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/citadel/rules.mk +++ b/keyboards/bpiphany/pegasushoof/keymaps/citadel/rules.mk @@ -1,7 +1,7 @@ # Build Options # change to "no" to disable the options # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/bpiphany/pegasushoof/keymaps/default/rules.mk b/keyboards/bpiphany/pegasushoof/keymaps/default/rules.mk index 972b7fc71..af0923a91 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/default/rules.mk +++ b/keyboards/bpiphany/pegasushoof/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/bpiphany/pegasushoof/keymaps/default_jis/rules.mk b/keyboards/bpiphany/pegasushoof/keymaps/default_jis/rules.mk index a605a865e..9af05bb3d 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/default_jis/rules.mk +++ b/keyboards/bpiphany/pegasushoof/keymaps/default_jis/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/bpiphany/pegasushoof/rules.mk b/keyboards/bpiphany/pegasushoof/rules.mk index ffc4fc0e8..4dd5a8908 100644 --- a/keyboards/bpiphany/pegasushoof/rules.mk +++ b/keyboards/bpiphany/pegasushoof/rules.mk @@ -14,14 +14,13 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite 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 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 diff --git a/keyboards/bpiphany/sixshooter/rules.mk b/keyboards/bpiphany/sixshooter/rules.mk index 0aafb9099..10d7086bb 100644 --- a/keyboards/bpiphany/sixshooter/rules.mk +++ b/keyboards/bpiphany/sixshooter/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bpiphany/tiger_lily/config.h b/keyboards/bpiphany/tiger_lily/config.h index a86cffd16..d3e2464be 100644 --- a/keyboards/bpiphany/tiger_lily/config.h +++ b/keyboards/bpiphany/tiger_lily/config.h @@ -40,7 +40,12 @@ along with this program. If not, see . /* * Keyboard Matrix Assignments + * + * MATRIX_ROW_PINS and MATRIX_COL_PINS aren't actually used and are included + * for data driven compatibility. */ +#define MATRIX_ROW_PINS { C2, B3, B4, B2, B1, C7, B6, B5 } +#define MATRIX_COL_PINS { NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } #define UNUSED_PINS { B0, C4, D3 } #define LED_NUM_LOCK_PIN C5 diff --git a/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk b/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk index 46af5cd7b..eb94d17f0 100644 --- a/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk +++ b/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bpiphany/tiger_lily/keymaps/default_ansi/rules.mk b/keyboards/bpiphany/tiger_lily/keymaps/default_ansi/rules.mk index 7a331cd53..93e7cd8bb 100644 --- a/keyboards/bpiphany/tiger_lily/keymaps/default_ansi/rules.mk +++ b/keyboards/bpiphany/tiger_lily/keymaps/default_ansi/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/bpiphany/tiger_lily/rules.mk b/keyboards/bpiphany/tiger_lily/rules.mk index 23546e4f0..9fe5e488f 100644 --- a/keyboards/bpiphany/tiger_lily/rules.mk +++ b/keyboards/bpiphany/tiger_lily/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bpiphany/unloved_bastard/config.h b/keyboards/bpiphany/unloved_bastard/config.h index 5bd8e532a..61a86d723 100644 --- a/keyboards/bpiphany/unloved_bastard/config.h +++ b/keyboards/bpiphany/unloved_bastard/config.h @@ -141,24 +141,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/bpiphany/unloved_bastard/rules.mk b/keyboards/bpiphany/unloved_bastard/rules.mk index d6c3d6232..fbe74c644 100644 --- a/keyboards/bpiphany/unloved_bastard/rules.mk +++ b/keyboards/bpiphany/unloved_bastard/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ 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 = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bt66tech/bt66tech60/rules.mk b/keyboards/bt66tech/bt66tech60/rules.mk index e043210f3..cab321ea9 100644 --- a/keyboards/bt66tech/bt66tech60/rules.mk +++ b/keyboards/bt66tech/bt66tech60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/bthlabs/geekpad/config.h b/keyboards/bthlabs/geekpad/config.h index 85fa2f00b..411930a24 100644 --- a/keyboards/bthlabs/geekpad/config.h +++ b/keyboards/bthlabs/geekpad/config.h @@ -165,26 +165,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/bthlabs/geekpad/rules.mk b/keyboards/bthlabs/geekpad/rules.mk index 1a7800dd1..5555eede6 100644 --- a/keyboards/bthlabs/geekpad/rules.mk +++ b/keyboards/bthlabs/geekpad/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/buildakb/potato65/rules.mk b/keyboards/buildakb/potato65/rules.mk index 468d4dbce..f9a47bfa7 100644 --- a/keyboards/buildakb/potato65/rules.mk +++ b/keyboards/buildakb/potato65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/buildakb/potato65hs/rules.mk b/keyboards/buildakb/potato65hs/rules.mk index c538b0c21..aa6be8e4a 100644 --- a/keyboards/buildakb/potato65hs/rules.mk +++ b/keyboards/buildakb/potato65hs/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/business_card/alpha/config.h b/keyboards/business_card/alpha/config.h index b9bb67f05..239a6c8cc 100644 --- a/keyboards/business_card/alpha/config.h +++ b/keyboards/business_card/alpha/config.h @@ -186,26 +186,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/business_card/alpha/keymaps/default/keymap.c b/keyboards/business_card/alpha/keymaps/default/keymap.c index 4c7b4237c..d238d651c 100644 --- a/keyboards/business_card/alpha/keymaps/default/keymap.c +++ b/keyboards/business_card/alpha/keymaps/default/keymap.c @@ -35,7 +35,7 @@ void keyboard_post_init_user(void) { rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_MOOD); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE 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, diff --git a/keyboards/business_card/alpha/rules.mk b/keyboards/business_card/alpha/rules.mk index 19083c8c4..288fa6a8d 100644 --- a/keyboards/business_card/alpha/rules.mk +++ b/keyboards/business_card/alpha/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,8 +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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/business_card/beta/config.h b/keyboards/business_card/beta/config.h index 1db0abbc9..e4b0ead7f 100644 --- a/keyboards/business_card/beta/config.h +++ b/keyboards/business_card/beta/config.h @@ -186,26 +186,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/business_card/beta/keymaps/default/keymap.c b/keyboards/business_card/beta/keymaps/default/keymap.c index c317a236c..8f8f84e57 100644 --- a/keyboards/business_card/beta/keymaps/default/keymap.c +++ b/keyboards/business_card/beta/keymaps/default/keymap.c @@ -38,7 +38,7 @@ void led_set_user(uint8_t usb_led) {} void keyboard_post_init_user(void) {} -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE 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, diff --git a/keyboards/business_card/beta/rules.mk b/keyboards/business_card/beta/rules.mk index 19083c8c4..288fa6a8d 100644 --- a/keyboards/business_card/beta/rules.mk +++ b/keyboards/business_card/beta/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,8 +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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/business_card/rules.mk b/keyboards/business_card/rules.mk index 598907734..7bbfbf221 100644 --- a/keyboards/business_card/rules.mk +++ b/keyboards/business_card/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/c39/keymaps/drashna/keymap.c b/keyboards/c39/keymaps/drashna/keymap.c index 88065263c..6fd1f1298 100755 --- a/keyboards/c39/keymaps/drashna/keymap.c +++ b/keyboards/c39/keymaps/drashna/keymap.c @@ -39,54 +39,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_base_wrapper( + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ ), - [_COLEMAK] = LAYOUT_base_wrapper( + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ ), - [_DVORAK] = LAYOUT_base_wrapper( + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), - [_WORKMAN] = LAYOUT_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - [_LOWER] = LAYOUT_wrapper( KC_TILD, _________________LOWER_L1__________________, _______, _________________LOWER_R1__________________, KC_BSPC, KC_DEL, _________________LOWER_L2__________________, _______, _________________LOWER_R2__________________, KC_PIPE, diff --git a/keyboards/c39/keymaps/drashna/rules.mk b/keyboards/c39/keymaps/drashna/rules.mk index a11acc240..2cfa2e483 100644 --- a/keyboards/c39/keymaps/drashna/rules.mk +++ b/keyboards/c39/keymaps/drashna/rules.mk @@ -5,7 +5,7 @@ BOARD = QMK_PROTON_C # Bootloader selection BOOTLOADER = stm32-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/c39/keymaps/kuchosauronad0/rules.mk b/keyboards/c39/keymaps/kuchosauronad0/rules.mk index ac7c77dd4..a6304cdf4 100644 --- a/keyboards/c39/keymaps/kuchosauronad0/rules.mk +++ b/keyboards/c39/keymaps/kuchosauronad0/rules.mk @@ -1,5 +1,5 @@ BOOTLOADER = caterina -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/c39/rules.mk b/keyboards/c39/rules.mk index ed3554aac..daecfb2f7 100755 --- a/keyboards/c39/rules.mk +++ b/keyboards/c39/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/caffeinated/serpent65/rules.mk b/keyboards/caffeinated/serpent65/rules.mk index 612d7e4cc..806bdbabb 100644 --- a/keyboards/caffeinated/serpent65/rules.mk +++ b/keyboards/caffeinated/serpent65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cannonkeys/aella/rules.mk b/keyboards/cannonkeys/aella/rules.mk index 7b9130744..909806553 100644 --- a/keyboards/cannonkeys/aella/rules.mk +++ b/keyboards/cannonkeys/aella/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/an_c/rules.mk b/keyboards/cannonkeys/an_c/rules.mk index 55e03edea..66e6b6577 100644 --- a/keyboards/cannonkeys/an_c/rules.mk +++ b/keyboards/cannonkeys/an_c/rules.mk @@ -12,7 +12,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/atlas/rules.mk b/keyboards/cannonkeys/atlas/rules.mk index 0f13950c6..5f1bbe885 100644 --- a/keyboards/cannonkeys/atlas/rules.mk +++ b/keyboards/cannonkeys/atlas/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = stm32-dfu # Build Options # comment out to disable the options. -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/atlas_alps/rules.mk b/keyboards/cannonkeys/atlas_alps/rules.mk index 8fbc75bf2..d89b31033 100644 --- a/keyboards/cannonkeys/atlas_alps/rules.mk +++ b/keyboards/cannonkeys/atlas_alps/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cannonkeys/balance/rules.mk b/keyboards/cannonkeys/balance/rules.mk index ab0e32356..97ec216b0 100644 --- a/keyboards/cannonkeys/balance/rules.mk +++ b/keyboards/cannonkeys/balance/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -p FFFF -v FFFF # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/bluepill/keyboard.c b/keyboards/cannonkeys/bluepill/keyboard.c deleted file mode 100644 index 6a8edd4a9..000000000 --- a/keyboards/cannonkeys/bluepill/keyboard.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -#include "util.h" -#include "quantum.h" - -#ifdef BOARD_STM32_F103_STM32DUINO -#define LED_ON() do { palClearPad(GPIOC, 13) ;} while (0) -#define LED_OFF() do { palSetPad(GPIOC, 13); } while (0) -#define LED_TGL() do { palTogglePad(GPIOC, 13); } while (0) -#else -#define LED_ON() -#define LED_OFF() -#define LED_TGL() -#endif - -void matrix_init_kb(void){ - LED_ON(); - wait_ms(500); - LED_OFF(); -} diff --git a/keyboards/cannonkeys/bluepill/ws2812.c b/keyboards/cannonkeys/bluepill/ws2812.c deleted file mode 100644 index 779e90519..000000000 --- a/keyboards/cannonkeys/bluepill/ws2812.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * LEDDriver.c - * - * Created on: Aug 26, 2013 - * Author: Omri Iluz - */ - -#include "ws2812.h" -#include - -#define BYTES_FOR_LED_BYTE 4 -#define NB_COLORS 3 -#define BYTES_FOR_LED BYTES_FOR_LED_BYTE*NB_COLORS -#define DATA_SIZE BYTES_FOR_LED*NB_LEDS -#define RESET_SIZE 200 -#define PREAMBLE_SIZE 4 -// Define the spi your LEDs are plugged to here -#define WS2812_SPI SPID2 -// Define the number of LEDs you wish to control in your LED strip -#define NB_LEDS RGBLED_NUM - - #define LED_SPIRAL 1 - - static uint8_t txbuf[PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE]; -static uint8_t get_protocol_eq(uint8_t data, int pos); - - /* - * This lib is meant to be used asynchronously, thus the colors contained in - * the txbuf will be sent in loop, so that the colors are always the ones you - * put in the table (the user thus have less to worry about) - * - * Since the data are sent via DMA, and the call to spiSend is a blocking one, - * the processor ressources are not used to much, if you see your program being - * too slow, simply add a: - * chThdSleepMilliseconds(x); - * after the spiSend, where you increment x untill you are satisfied with your - * program speed, another trick may be to lower this thread priority : your call - */ -static THD_WORKING_AREA(LEDS_THREAD_WA, 128); -static THD_FUNCTION(ledsThread, arg) { - (void) arg; - while(1){ - spiSend(&WS2812_SPI, PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE, txbuf); - } -} - - static const SPIConfig spicfg = { - false, - NULL, - PORT_WS2812, - PIN_WS2812, - SPI_CR1_BR_1|SPI_CR1_BR_0 // baudrate : fpclk / 8 => 1tick is 0.32us (2.25 MHz) -}; - - /* - * Function used to initialize the driver. - * - * Starts by shutting off all the LEDs. - * Then gets access on the LED_SPI driver. - * May eventually launch an animation on the LEDs (e.g. a thread setting the - * txbuff values) - */ -void leds_init(void){ - /* MOSI pin*/ - palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_STM32_ALTERNATE_PUSHPULL); - for(int i = 0; i < RESET_SIZE; i++) - txbuf[DATA_SIZE+i] = 0x00; - for (int i=0; i # include diff --git a/keyboards/cassette42/common/oled_helper.h b/keyboards/cassette42/common/oled_helper.h index 6c2680664..daeb7bfa4 100644 --- a/keyboards/cassette42/common/oled_helper.h +++ b/keyboards/cassette42/common/oled_helper.h @@ -1,4 +1,4 @@ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_logo(void); @@ -19,4 +19,4 @@ void render_led_status(void); # define UPDATE_LED_STATUS() # define RENDER_LED_STATUS(a) -#endif \ No newline at end of file +#endif diff --git a/keyboards/cassette42/keymaps/default/keymap.c b/keyboards/cassette42/keymaps/default/keymap.c index 4dc46d74e..a04626db9 100644 --- a/keyboards/cassette42/keymaps/default/keymap.c +++ b/keyboards/cassette42/keymaps/default/keymap.c @@ -64,7 +64,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include # include diff --git a/keyboards/cassette42/rules.mk b/keyboards/cassette42/rules.mk index 4fd8e384b..08200eb82 100644 --- a/keyboards/cassette42/rules.mk +++ b/keyboards/cassette42/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,6 +21,7 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 SRC += ./common/oled_helper.c diff --git a/keyboards/catch22/rules.mk b/keyboards/catch22/rules.mk index 1622b95c5..7ca07d007 100644 --- a/keyboards/catch22/rules.mk +++ b/keyboards/catch22/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk index 2469d244a..bdf945b0e 100644 --- a/keyboards/centromere/rules.mk +++ b/keyboards/centromere/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -27,7 +27,6 @@ CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/cest73/tkm/config.h b/keyboards/cest73/tkm/config.h index deef979b2..e925f3971 100644 --- a/keyboards/cest73/tkm/config.h +++ b/keyboards/cest73/tkm/config.h @@ -34,7 +34,7 @@ #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7, C6, C7, D0 } /* column handy ruler: c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 */ #define MATRIX_COL_PINS { D1, D2, D3, D4, D5, D6, D7, F0, F1, F4 } -#define UNUSED_PINS { AF } +#define UNUSED_PINS { } //NOTE: if D6 pin shows any issues in exploatation the LED on the Teensy is to be removed diff --git a/keyboards/cest73/tkm/rules.mk b/keyboards/cest73/tkm/rules.mk index 43420532f..193b9b700 100644 --- a/keyboards/cest73/tkm/rules.mk +++ b/keyboards/cest73/tkm/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/charue/sunsetter/rules.mk b/keyboards/charue/sunsetter/rules.mk index dde961d7a..51f82165b 100644 --- a/keyboards/charue/sunsetter/rules.mk +++ b/keyboards/charue/sunsetter/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/chavdai40/rev1/rules.mk b/keyboards/chavdai40/rev1/rules.mk index 379bdb6c6..46fec5dd9 100644 --- a/keyboards/chavdai40/rev1/rules.mk +++ b/keyboards/chavdai40/rev1/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/chavdai40/rev2/rules.mk b/keyboards/chavdai40/rev2/rules.mk index 379bdb6c6..46fec5dd9 100644 --- a/keyboards/chavdai40/rev2/rules.mk +++ b/keyboards/chavdai40/rev2/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/checkerboards/axon40/rules.mk b/keyboards/checkerboards/axon40/rules.mk index f49426d51..6c4393757 100644 --- a/keyboards/checkerboards/axon40/rules.mk +++ b/keyboards/checkerboards/axon40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/checkerboards/candybar_ortho/rules.mk b/keyboards/checkerboards/candybar_ortho/rules.mk index 8f0f91d05..048738b24 100644 --- a/keyboards/checkerboards/candybar_ortho/rules.mk +++ b/keyboards/checkerboards/candybar_ortho/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/checkerboards/g_idb60/rules.mk b/keyboards/checkerboards/g_idb60/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/checkerboards/g_idb60/rules.mk +++ b/keyboards/checkerboards/g_idb60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/checkerboards/nop60/info.json b/keyboards/checkerboards/nop60/info.json index ab68c0cda..b8d081c26 100644 --- a/keyboards/checkerboards/nop60/info.json +++ b/keyboards/checkerboards/nop60/info.json @@ -1,9 +1,9 @@ { "keyboard_name": "nop60", - "url": "", "maintainer": "nasp", - "width": 15, "height": 5, + "width": 15, + "url": "", "layout_aliases": { "LAYOUT_2x3u": "LAYOUT_60_tsangan_hhkb_split_space", "LAYOUT_7u": "LAYOUT_60_tsangan_hhkb" diff --git a/keyboards/checkerboards/nop60/rules.mk b/keyboards/checkerboards/nop60/rules.mk index b78caef5e..befbc73ed 100644 --- a/keyboards/checkerboards/nop60/rules.mk +++ b/keyboards/checkerboards/nop60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cherrybstudio/cb1800/rules.mk b/keyboards/cherrybstudio/cb1800/rules.mk index 47167c6f7..4572a7aa6 100644 --- a/keyboards/cherrybstudio/cb1800/rules.mk +++ b/keyboards/cherrybstudio/cb1800/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cherrybstudio/cb87/rules.mk b/keyboards/cherrybstudio/cb87/rules.mk index 43a7e336c..2004c92ab 100644 --- a/keyboards/cherrybstudio/cb87/rules.mk +++ b/keyboards/cherrybstudio/cb87/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cheshire/curiosity/rules.mk b/keyboards/cheshire/curiosity/rules.mk index b0bca5a89..6de036f0d 100644 --- a/keyboards/cheshire/curiosity/rules.mk +++ b/keyboards/cheshire/curiosity/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/chidori/config.h b/keyboards/chidori/config.h index 69292e7f9..9d8bc3e26 100644 --- a/keyboards/chidori/config.h +++ b/keyboards/chidori/config.h @@ -196,26 +196,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/chidori/keymaps/oled_sample/keymap.c b/keyboards/chidori/keymaps/oled_sample/keymap.c index 6c9b7869b..a3bb7c280 100644 --- a/keyboards/chidori/keymaps/oled_sample/keymap.c +++ b/keyboards/chidori/keymaps/oled_sample/keymap.c @@ -181,7 +181,7 @@ bool led_update_user(led_t led_state) { return false; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_write_layer_state(void) { oled_write_P(PSTR("Layer: "), false); diff --git a/keyboards/chidori/keymaps/oled_sample/rules.mk b/keyboards/chidori/keymaps/oled_sample/rules.mk index cc60236ca..7a7b1acc0 100644 --- a/keyboards/chidori/keymaps/oled_sample/rules.mk +++ b/keyboards/chidori/keymaps/oled_sample/rules.mk @@ -1,2 +1,3 @@ # Enable SSD1306 OLED -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/chidori/rules.mk b/keyboards/chidori/rules.mk index 312a4a372..f09bede13 100644 --- a/keyboards/chidori/rules.mk +++ b/keyboards/chidori/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/chili/config.h b/keyboards/chili/config.h index 08c247587..b9eff3c48 100644 --- a/keyboards/chili/config.h +++ b/keyboards/chili/config.h @@ -158,23 +158,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/chili/rules.mk b/keyboards/chili/rules.mk index a99c946d2..c889438df 100644 --- a/keyboards/chili/rules.mk +++ b/keyboards/chili/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output diff --git a/keyboards/chimera_ergo/rules.mk b/keyboards/chimera_ergo/rules.mk index b7084b4a1..59af1ede0 100644 --- a/keyboards/chimera_ergo/rules.mk +++ b/keyboards/chimera_ergo/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,7 @@ CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/chimera_ls/rules.mk b/keyboards/chimera_ls/rules.mk index 2f414ba81..f443b3866 100644 --- a/keyboards/chimera_ls/rules.mk +++ b/keyboards/chimera_ls/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,7 @@ CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/chimera_ortho/rules.mk b/keyboards/chimera_ortho/rules.mk index d97cff59f..ebdd2dc15 100644 --- a/keyboards/chimera_ortho/rules.mk +++ b/keyboards/chimera_ortho/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,7 @@ CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/chimera_ortho_plus/rules.mk b/keyboards/chimera_ortho_plus/rules.mk index c11b5c601..32042b4b5 100644 --- a/keyboards/chimera_ortho_plus/rules.mk +++ b/keyboards/chimera_ortho_plus/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = yes diff --git a/keyboards/chlx/merro60/rules.mk b/keyboards/chlx/merro60/rules.mk index 40b1e5fc9..bbf18ab1c 100644 --- a/keyboards/chlx/merro60/rules.mk +++ b/keyboards/chlx/merro60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/choc_taro/config.h b/keyboards/choc_taro/config.h index 7dee9d336..3b1ad493a 100644 --- a/keyboards/choc_taro/config.h +++ b/keyboards/choc_taro/config.h @@ -191,26 +191,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/choc_taro/rules.mk b/keyboards/choc_taro/rules.mk index 19b81990a..48f42de49 100644 --- a/keyboards/choc_taro/rules.mk +++ b/keyboards/choc_taro/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/choco60/rev1/rules.mk b/keyboards/choco60/rev1/rules.mk index 12453d839..aa5c9d06e 100644 --- a/keyboards/choco60/rev1/rules.mk +++ b/keyboards/choco60/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/choco60/rev2/rules.mk b/keyboards/choco60/rev2/rules.mk index b93b9467a..44937cdcb 100644 --- a/keyboards/choco60/rev2/rules.mk +++ b/keyboards/choco60/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/christmas_tree/rules.mk b/keyboards/christmas_tree/rules.mk index da85eb372..dfb837e89 100644 --- a/keyboards/christmas_tree/rules.mk +++ b/keyboards/christmas_tree/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/ck60i/rules.mk b/keyboards/ck60i/rules.mk index 1138f462e..18b4e737f 100644 --- a/keyboards/ck60i/rules.mk +++ b/keyboards/ck60i/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ckeys/handwire_101/config.h b/keyboards/ckeys/handwire_101/config.h index 663f5e343..11ec21e2f 100755 --- a/keyboards/ckeys/handwire_101/config.h +++ b/keyboards/ckeys/handwire_101/config.h @@ -64,26 +64,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* * Force NKRO * diff --git a/keyboards/ckeys/handwire_101/rules.mk b/keyboards/ckeys/handwire_101/rules.mk index 3d4751330..a9d18b634 100755 --- a/keyboards/ckeys/handwire_101/rules.mk +++ b/keyboards/ckeys/handwire_101/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -18,7 +18,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -#MIDI_ENABLE = yes # MIDI controls +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/ckeys/nakey/config.h b/keyboards/ckeys/nakey/config.h index 9fa59689d..54775de72 100644 --- a/keyboards/ckeys/nakey/config.h +++ b/keyboards/ckeys/nakey/config.h @@ -157,24 +157,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/ckeys/nakey/rules.mk b/keyboards/ckeys/nakey/rules.mk index 6910997e8..5e88087b1 100644 --- a/keyboards/ckeys/nakey/rules.mk +++ b/keyboards/ckeys/nakey/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ckeys/obelus/rules.mk b/keyboards/ckeys/obelus/rules.mk index 706cfd61f..134248c30 100644 --- a/keyboards/ckeys/obelus/rules.mk +++ b/keyboards/ckeys/obelus/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = yes # MIDI controls +MIDI_ENABLE = yes # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 diff --git a/keyboards/ckeys/thedora/config.h b/keyboards/ckeys/thedora/config.h index c7557aa62..cd09be3f7 100755 --- a/keyboards/ckeys/thedora/config.h +++ b/keyboards/ckeys/thedora/config.h @@ -62,26 +62,6 @@ #define DAC_SAMPLE_MAX 65535U -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* * Force NKRO * diff --git a/keyboards/ckeys/thedora/rules.mk b/keyboards/ckeys/thedora/rules.mk index 265e6b347..3feda7540 100755 --- a/keyboards/ckeys/thedora/rules.mk +++ b/keyboards/ckeys/thedora/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -17,6 +17,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration #SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover AUDIO_ENABLE = yes -MIDI_ENABLE = yes # MIDI controls +MIDI_ENABLE = yes # MIDI support RGBLIGHT_ENABLE = no ENCODER_ENABLE = yes diff --git a/keyboards/ckeys/washington/config.h b/keyboards/ckeys/washington/config.h index 1f4fb8f9d..5b28b8d8b 100644 --- a/keyboards/ckeys/washington/config.h +++ b/keyboards/ckeys/washington/config.h @@ -195,26 +195,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ckeys/washington/keymaps/default/keymap.c b/keyboards/ckeys/washington/keymaps/default/keymap.c index 7adac3c43..a83a28e95 100644 --- a/keyboards/ckeys/washington/keymaps/default/keymap.c +++ b/keyboards/ckeys/washington/keymaps/default/keymap.c @@ -58,7 +58,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); diff --git a/keyboards/ckeys/washington/rules.mk b/keyboards/ckeys/washington/rules.mk index 65f610505..d75947c87 100644 --- a/keyboards/ckeys/washington/rules.mk +++ b/keyboards/ckeys/washington/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,8 +25,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 ENCODER_ENABLE = yes # Enable support for encoders -OLED_DRIVER_ENABLE = yes # Enable support for OLED displays +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable support for OLED displays diff --git a/keyboards/claw44/keymaps/oled/keymap.c b/keyboards/claw44/keymaps/oled/keymap.c index 5a5903416..07cb58171 100644 --- a/keyboards/claw44/keymaps/oled/keymap.c +++ b/keyboards/claw44/keymaps/oled/keymap.c @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_layer_state(void) { switch (get_highest_layer(layer_state)) { diff --git a/keyboards/claw44/keymaps/oled/rules.mk b/keyboards/claw44/keymaps/oled/rules.mk index c58266213..d34d066de 100644 --- a/keyboards/claw44/keymaps/oled/rules.mk +++ b/keyboards/claw44/keymaps/oled/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/claw44/rev1/rules.mk b/keyboards/claw44/rev1/rules.mk index b1af22c59..12aa20282 100644 --- a/keyboards/claw44/rev1/rules.mk +++ b/keyboards/claw44/rev1/rules.mk @@ -1,5 +1,5 @@ # Build Options -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -15,5 +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 -OLED_DRIVER_ENABLE = no # Add OLED displays support +OLED_ENABLE = no # Add OLED displays support SPLIT_KEYBOARD = yes diff --git a/keyboards/claw44/rules.mk b/keyboards/claw44/rules.mk index f4d44b23b..1cb730182 100644 --- a/keyboards/claw44/rules.mk +++ b/keyboards/claw44/rules.mk @@ -15,7 +15,7 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/clawsome/bookerboard/rules.mk b/keyboards/clawsome/bookerboard/rules.mk index 92a342799..5ead4f763 100644 --- a/keyboards/clawsome/bookerboard/rules.mk +++ b/keyboards/clawsome/bookerboard/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/clawsome/coupe/rules.mk b/keyboards/clawsome/coupe/rules.mk index dba2a63d4..ae186b3d7 100644 --- a/keyboards/clawsome/coupe/rules.mk +++ b/keyboards/clawsome/coupe/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -18,7 +18,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/clawsome/doodle/rules.mk b/keyboards/clawsome/doodle/rules.mk index 64d67049f..e847ae36b 100644 --- a/keyboards/clawsome/doodle/rules.mk +++ b/keyboards/clawsome/doodle/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/fightpad/rules.mk b/keyboards/clawsome/fightpad/rules.mk index fd76a5247..7f0fa90fd 100644 --- a/keyboards/clawsome/fightpad/rules.mk +++ b/keyboards/clawsome/fightpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/clawsome/gamebuddy/config.h b/keyboards/clawsome/gamebuddy/config.h deleted file mode 100644 index d5fad415f..000000000 --- a/keyboards/clawsome/gamebuddy/config.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2020 AAClawson (AlisGraveNil) - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License 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 0x17B9 -#define DEVICE_VER 0x0001 -#define MANUFACTURER AlisGraveNil -#define PRODUCT GameBuddy - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 7 - -#define MATRIX_ROW_PINS { D1, D0, E6, B3, B2 } -#define MATRIX_COL_PINS { F5, F6, F7, B1, C6, D7, B6 } - -#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/clawsome/gamebuddy/gamebuddy.c b/keyboards/clawsome/gamebuddy/gamebuddy.c deleted file mode 100644 index 464bdef89..000000000 --- a/keyboards/clawsome/gamebuddy/gamebuddy.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright 2020 AAClawson (AlisGraveNil) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "gamebuddy.h" \ No newline at end of file diff --git a/keyboards/clawsome/gamebuddy/info.json b/keyboards/clawsome/gamebuddy/info.json deleted file mode 100644 index 5562f0615..000000000 --- a/keyboards/clawsome/gamebuddy/info.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "keyboard_name": "GameBuddy", - "url": "", - "maintainer": "qmk", - "width": 7, - "height": 5, - "layouts": { - "LAYOUT": { - "layout": [ - {"label":"K00 (D1,F5)", "x":0, "y":0}, - {"label":"K01 (D1,F6)", "x":1, "y":0}, - {"label":"K02 (D1,F7)", "x":2, "y":0}, - {"label":"K03 (D1,B1)", "x":3, "y":0}, - {"label":"K04 (D1,C6)", "x":4, "y":0}, - {"label":"K05 (D1,D7)", "x":5, "y":0}, - {"label":"K10 (D0,F5)", "x":0, "y":1}, - {"label":"K11 (D0,F6)", "x":1, "y":1}, - {"label":"K12 (D0,F7)", "x":2, "y":1}, - {"label":"K13 (D0,B1)", "x":3, "y":1}, - {"label":"K14 (D0,C6)", "x":4, "y":1}, - {"label":"K15 (D0,D7)", "x":5, "y":1}, - {"label":"K20 (E6,F5)", "x":0, "y":2, "w":2}, - {"label":"K22 (E6,F7)", "x":2, "y":2}, - {"label":"K23 (E6,B1)", "x":3, "y":2}, - {"label":"K24 (E6,C6)", "x":4, "y":2}, - {"label":"K25 (E6,D7)", "x":5, "y":2}, - {"label":"K30 (B3,F5)", "x":0, "y":3}, - {"label":"K31 (B3,F6)", "x":1, "y":3}, - {"label":"K32 (B3,F7)", "x":2, "y":3}, - {"label":"K33 (B3,B1)", "x":3, "y":3}, - {"label":"K34 (B3,C6)", "x":4, "y":3}, - {"label":"K35 (B3,D7)", "x":5, "y":3}, - {"label":"K46 (B2,B6)", "x":6, "y":3, "h":2}, - {"label":"K44 (B2,C6)", "x":4, "y":4}, - {"label":"K45 (B2,D7)", "x":5, "y":4} - ] - } - } - ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" -} - diff --git a/keyboards/clawsome/gamebuddy/rules.mk b/keyboards/clawsome/gamebuddy/rules.mk deleted file mode 100644 index a3a91009b..000000000 --- a/keyboards/clawsome/gamebuddy/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = caterina - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/clawsome/gamebuddy/v1_0/config.h b/keyboards/clawsome/gamebuddy/v1_0/config.h new file mode 100644 index 000000000..91b6fc637 --- /dev/null +++ b/keyboards/clawsome/gamebuddy/v1_0/config.h @@ -0,0 +1,36 @@ +/* +Copyright 2020 AAClawson (AlisGraveNil) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x17B9 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AlisGraveNil +#define PRODUCT GameBuddy1_0 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 7 + +#define MATRIX_ROW_PINS { D1, D0, E6, B3, B2 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, C6, D7, B6 } + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/clawsome/gamebuddy/v1_0/info.json b/keyboards/clawsome/gamebuddy/v1_0/info.json new file mode 100644 index 000000000..59c4d9348 --- /dev/null +++ b/keyboards/clawsome/gamebuddy/v1_0/info.json @@ -0,0 +1,41 @@ +{ + "keyboard_name": "GameBuddy1_0", + "url": "www.clawboards.xyz", + "maintainer": "AA Clawson (AlisGraveNil)", + "width": 7, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K00 (D1,F5)", "x":0, "y":0}, + {"label":"K01 (D1,F6)", "x":1, "y":0}, + {"label":"K02 (D1,F7)", "x":2, "y":0}, + {"label":"K03 (D1,B1)", "x":3, "y":0}, + {"label":"K04 (D1,C6)", "x":4, "y":0}, + {"label":"K05 (D1,D7)", "x":5, "y":0}, + {"label":"K10 (D0,F5)", "x":0, "y":1}, + {"label":"K11 (D0,F6)", "x":1, "y":1}, + {"label":"K12 (D0,F7)", "x":2, "y":1}, + {"label":"K13 (D0,B1)", "x":3, "y":1}, + {"label":"K14 (D0,C6)", "x":4, "y":1}, + {"label":"K15 (D0,D7)", "x":5, "y":1}, + {"label":"K20 (E6,F5)", "x":0, "y":2, "w":2}, + {"label":"K22 (E6,F7)", "x":2, "y":2}, + {"label":"K23 (E6,B1)", "x":3, "y":2}, + {"label":"K24 (E6,C6)", "x":4, "y":2}, + {"label":"K25 (E6,D7)", "x":5, "y":2}, + {"label":"K30 (B3,F5)", "x":0, "y":3}, + {"label":"K31 (B3,F6)", "x":1, "y":3}, + {"label":"K32 (B3,F7)", "x":2, "y":3}, + {"label":"K33 (B3,B1)", "x":3, "y":3}, + {"label":"K34 (B3,C6)", "x":4, "y":3}, + {"label":"K35 (B3,D7)", "x":5, "y":3}, + {"label":"K46 (B2,B6)", "x":6, "y":3, "h":2}, + {"label":"K44 (B2,C6)", "x":4, "y":4}, + {"label":"K45 (B2,D7)", "x":5, "y":4} + ] + } + } + ,"meta": "https://noroadsleft.github.io/kbf_qmk_converter/" +} + diff --git a/keyboards/clawsome/gamebuddy/keymaps/default/keymap.c b/keyboards/clawsome/gamebuddy/v1_0/keymaps/default/keymap.c similarity index 100% rename from keyboards/clawsome/gamebuddy/keymaps/default/keymap.c rename to keyboards/clawsome/gamebuddy/v1_0/keymaps/default/keymap.c diff --git a/keyboards/clawsome/gamebuddy/readme.md b/keyboards/clawsome/gamebuddy/v1_0/readme.md similarity index 100% rename from keyboards/clawsome/gamebuddy/readme.md rename to keyboards/clawsome/gamebuddy/v1_0/readme.md diff --git a/keyboards/clawsome/gamebuddy/v1_0/rules.mk b/keyboards/clawsome/gamebuddy/v1_0/rules.mk new file mode 100644 index 000000000..b51dafa80 --- /dev/null +++ b/keyboards/clawsome/gamebuddy/v1_0/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/clawsome/gamebuddy/v1_0/v1_0.c b/keyboards/clawsome/gamebuddy/v1_0/v1_0.c new file mode 100644 index 000000000..b63474c28 --- /dev/null +++ b/keyboards/clawsome/gamebuddy/v1_0/v1_0.c @@ -0,0 +1,16 @@ +/* Copyright 2020 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "v1_0.h" diff --git a/keyboards/clawsome/gamebuddy/gamebuddy.h b/keyboards/clawsome/gamebuddy/v1_0/v1_0.h similarity index 100% rename from keyboards/clawsome/gamebuddy/gamebuddy.h rename to keyboards/clawsome/gamebuddy/v1_0/v1_0.h diff --git a/keyboards/clawsome/gamebuddy/v1_m/config.h b/keyboards/clawsome/gamebuddy/v1_m/config.h new file mode 100644 index 000000000..748e35237 --- /dev/null +++ b/keyboards/clawsome/gamebuddy/v1_m/config.h @@ -0,0 +1,45 @@ +/* Copyright 2021 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x7767 +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER AlisGraveNil +#define PRODUCT GameBuddy1_M + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { C6, D7, B5, B3, B2 } +#define MATRIX_COL_PINS { B1, F7, F6, F5, E6, B4, B6 } + +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/clawsome/gamebuddy/v1_m/info.json b/keyboards/clawsome/gamebuddy/v1_m/info.json new file mode 100644 index 000000000..411e19c67 --- /dev/null +++ b/keyboards/clawsome/gamebuddy/v1_m/info.json @@ -0,0 +1,41 @@ +{ + "keyboard_name": "GameBuddy1_M", + "url": "www.clawboards.xyz", + "maintainer": "AAClawson (AlisGraveNil)", + "width": 7, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K00 (C6,B1)", "x":0, "y":0}, + {"label":"K01 (C6,F7)", "x":1, "y":0}, + {"label":"K02 (C6,F6)", "x":2, "y":0}, + {"label":"K03 (C6,F5)", "x":3, "y":0}, + {"label":"K04 (C6,E6)", "x":4, "y":0}, + {"label":"K05 (C6,B4)", "x":5, "y":0}, + {"label":"K10 (D7,B1)", "x":0, "y":1}, + {"label":"K11 (D7,F7)", "x":1, "y":1}, + {"label":"K12 (D7,F6)", "x":2, "y":1}, + {"label":"K13 (D7,F5)", "x":3, "y":1}, + {"label":"K14 (D7,E6)", "x":4, "y":1}, + {"label":"K15 (D7,B4)", "x":5, "y":1}, + {"label":"K20 (B5,B1)", "x":0, "y":2}, + {"label":"K21 (B5,F7)", "x":1, "y":2}, + {"label":"K22 (B5,F6)", "x":2, "y":2}, + {"label":"K23 (B5,F5)", "x":3, "y":2}, + {"label":"K24 (B5,E6)", "x":4, "y":2}, + {"label":"K25 (B5,B4)", "x":5, "y":2}, + {"label":"K30 (B3,B1)", "x":0, "y":3}, + {"label":"K31 (B3,F7)", "x":1, "y":3}, + {"label":"K32 (B3,F6)", "x":2, "y":3}, + {"label":"K33 (B3,F5)", "x":3, "y":3}, + {"label":"K34 (B3,E6)", "x":4, "y":3}, + {"label":"K35 (B3,B4)", "x":5, "y":3}, + {"label":"K46 (B2,B6)", "x":6, "y":3, "h":2}, + {"label":"K44 (B2,E6)", "x":4, "y":4}, + {"label":"K45 (B2,B4)", "x":5, "y":4} + ] + } + } +} + diff --git a/keyboards/clawsome/gamebuddy/v1_m/keymaps/default/keymap.c b/keyboards/clawsome/gamebuddy/v1_m/keymaps/default/keymap.c new file mode 100644 index 000000000..88f40733d --- /dev/null +++ b/keyboards/clawsome/gamebuddy/v1_m/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* Copyright 2021 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_TAB, KC_V, KC_Q, KC_W, KC_E, KC_R, + KC_LSFT, KC_LSFT, KC_A, KC_S, KC_D, KC_G, + KC_LCTL, KC_N, KC_X, KC_F, KC_C, KC_M, KC_SPC, + KC_LALT, KC_LGUI + ), + +}; + diff --git a/keyboards/clawsome/gamebuddy/v1_m/readme.md b/keyboards/clawsome/gamebuddy/v1_m/readme.md new file mode 100644 index 000000000..add8b04ea --- /dev/null +++ b/keyboards/clawsome/gamebuddy/v1_m/readme.md @@ -0,0 +1,13 @@ +# GameBuddy + +This is a 5x7 macropad designed for left OR right hand usage in videogames, with special focus on FPS layouts! + +* Keyboard Maintainer: [AAClawson](https://github.com/AlisGraveNil) +* Hardware Supported: GameBuddy, Pro Micro, Elite-C, nice!nano +* Hardware Availability: www.clawboards.xyz + +Make example for this keyboard (after setting up your build environment): + + make clawsome/gamebuddy/v1_m:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/clawsome/gamebuddy/v1_m/rules.mk b/keyboards/clawsome/gamebuddy/v1_m/rules.mk new file mode 100644 index 000000000..e847ae36b --- /dev/null +++ b/keyboards/clawsome/gamebuddy/v1_m/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output \ No newline at end of file diff --git a/keyboards/clawsome/gamebuddy/v1_m/v1_m.c b/keyboards/clawsome/gamebuddy/v1_m/v1_m.c new file mode 100644 index 000000000..88db72d27 --- /dev/null +++ b/keyboards/clawsome/gamebuddy/v1_m/v1_m.c @@ -0,0 +1,16 @@ +/* Copyright 2021 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "v1_m.h" diff --git a/keyboards/clawsome/gamebuddy/v1_m/v1_m.h b/keyboards/clawsome/gamebuddy/v1_m/v1_m.h new file mode 100644 index 000000000..23e4d03bb --- /dev/null +++ b/keyboards/clawsome/gamebuddy/v1_m/v1_m.h @@ -0,0 +1,33 @@ +/* Copyright 2021 AAClawson (AlisGraveNil) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, \ + K10, K11, K12, K13, K14, K15, \ + K20, K21, K22, K23, K24, K25, \ + K30, K31, K32, K33, K34, K35, K46, \ + K44, K45 \ +) { \ + { K00, K01, K02, K03, K04, K05, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K44, K45, K46 }, \ +} diff --git a/keyboards/clawsome/hatchback/rules.mk b/keyboards/clawsome/hatchback/rules.mk index 6b8d1b5f0..eda367da7 100644 --- a/keyboards/clawsome/hatchback/rules.mk +++ b/keyboards/clawsome/hatchback/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/luggage_rack/rules.mk b/keyboards/clawsome/luggage_rack/rules.mk index 6b8d1b5f0..eda367da7 100644 --- a/keyboards/clawsome/luggage_rack/rules.mk +++ b/keyboards/clawsome/luggage_rack/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/numeros/rules.mk b/keyboards/clawsome/numeros/rules.mk index c0d663b11..32603db3b 100644 --- a/keyboards/clawsome/numeros/rules.mk +++ b/keyboards/clawsome/numeros/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/roadster/rules.mk b/keyboards/clawsome/roadster/rules.mk index 6b8d1b5f0..eda367da7 100644 --- a/keyboards/clawsome/roadster/rules.mk +++ b/keyboards/clawsome/roadster/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/sedan/rules.mk b/keyboards/clawsome/sedan/rules.mk index 47532471a..00ee7f891 100644 --- a/keyboards/clawsome/sedan/rules.mk +++ b/keyboards/clawsome/sedan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -18,7 +18,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/clawsome/sidekick/rules.mk b/keyboards/clawsome/sidekick/rules.mk index 8c9c905e6..bf89504ce 100644 --- a/keyboards/clawsome/sidekick/rules.mk +++ b/keyboards/clawsome/sidekick/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -18,7 +18,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/clawsome/suv/rules.mk b/keyboards/clawsome/suv/rules.mk index 64d67049f..e847ae36b 100644 --- a/keyboards/clawsome/suv/rules.mk +++ b/keyboards/clawsome/suv/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c index 54420d31b..56d4c4707 100644 --- a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c +++ b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c @@ -40,8 +40,9 @@ // CTRL when held, ESC when tapped #define CTL_ESC CTL_T(KC_ESC) -// Reset RGB mode to layer signalling -#define RGB_RST F(0) +enum custom_keycodes { + RGB_RST = SAFE_RANGE +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ @@ -103,21 +104,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif }; -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case 0: - if (record->event.pressed) { - rgblight_mode(1); - rgblight_sethsv(206, 255, 255); - } - } +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RGB_RST: + if (record->event.pressed) { + rgblight_mode(1); + rgblight_sethsv(206, 255, 255); + } + return false; + } + return true; } enum layer_id { diff --git a/keyboards/clueboard/66/keymaps/tetris/keymap.c b/keyboards/clueboard/66/keymaps/tetris/keymap.c index ef3abd667..26dd97fee 100644 --- a/keyboards/clueboard/66/keymaps/tetris/keymap.c +++ b/keyboards/clueboard/66/keymaps/tetris/keymap.c @@ -1,9 +1,6 @@ #include QMK_KEYBOARD_H #include "tetris_text.h" -// Helpful defines -#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) - // 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 @@ -12,11 +9,15 @@ #define _FL 1 #define _CL 2 +enum custom_keycodes { + TETRIS_START = SAFE_RANGE +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: Base Layer (Default Layer) */ [_BL] = LAYOUT( - F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_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_NUHS, KC_ENT, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, @@ -41,71 +42,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; -/* This is a list of user defined functions. F(N) corresponds to item N - of this list. - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), // Calls action_function() - [1] = ACTION_FUNCTION(1) -}; - static uint8_t tetris_key_presses = 0; static uint16_t tetris_timer = 0; static uint8_t tetris_running = 0; static int tetris_keypress = 0; -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t mods_pressed; - static bool mod_flag; - - switch (id) { - case 0: - // clueboard specific hook to make escape quite tetris - if (tetris_running) { - tetris_running = 0; - return; - } - - /* Handle the combined Grave/Esc key - */ - mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed - - if (record->event.pressed) { - /* The key is being pressed. - */ - if (mods_pressed) { - mod_flag = true; - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - /* The key is being released. - */ - if (mod_flag) { - mod_flag = false; - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - case 1: - if (record->event.pressed) { - tetris_running = 1; - tetris_timer = 0; - tetris_keypress = 0; - // set randomness using total number of key presses - tetris_start(tetris_key_presses); - } - break; - } -} - /* * Set up tetris */ @@ -130,6 +71,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } + switch (keycode) { + case KC_GESC: + // clueboard specific hook to make escape quite tetris + if (tetris_running) { + tetris_running = 0; + return false; + } + break; + case TETRIS_START: + if (record->event.pressed) { + tetris_running = 1; + tetris_timer = 0; + tetris_keypress = 0; + // set randomness using total number of key presses + tetris_start(tetris_key_presses); + } + return false; + } + return true; } @@ -148,57 +108,45 @@ void matrix_scan_user(void) { } } -void send_keycode(uint16_t keycode) { - register_code(keycode); - unregister_code(keycode); -} - -void send_keycode_shift(uint16_t keycode) { - register_code(KC_LSFT); - register_code(keycode); - unregister_code(keycode); - unregister_code(KC_LSFT); -} - void tetris_send_up(void) { - send_keycode(KC_UP); + tap_code(KC_UP); } void tetris_send_left(void) { - send_keycode(KC_LEFT); + tap_code(KC_LEFT); } void tetris_send_down(void) { - send_keycode(KC_DOWN); + tap_code(KC_DOWN); } void tetris_send_right(void) { - send_keycode(KC_RGHT); + tap_code(KC_RGHT); } void tetris_send_backspace(void) { - send_keycode(KC_BSPC); + tap_code(KC_BSPC); } void tetris_send_delete(void) { - send_keycode(KC_DEL); + tap_code(KC_DEL); } void tetris_send_string(const char *s) { for (int i = 0; s[i] != 0; i++) { if (s[i] >= 'a' && s[i] <= 'z') { - send_keycode(KC_A + (s[i] - 'a')); + tap_code(KC_A + (s[i] - 'a')); } else if (s[i] >= 'A' && s[i] <= 'Z') { - send_keycode_shift(KC_A + (s[i] - 'A')); + tap_code16(S(KC_A + (s[i] - 'A'))); } else if (s[i] >= '1' && s[i] <= '9') { - send_keycode(KC_1 + (s[i] - '1')); + tap_code(KC_1 + (s[i] - '1')); } else { switch (s[i]) { - case ' ': send_keycode(KC_SPACE); break; - case '.': send_keycode(KC_DOT); break; - case '0': send_keycode(KC_0); break; + case ' ': tap_code(KC_SPACE); break; + case '.': tap_code(KC_DOT); break; + case '0': tap_code(KC_0); break; } } } } void tetris_send_newline(void) { - send_keycode(KC_ENT); + tap_code(KC_ENT); } int tetris_get_keypress(void) { diff --git a/keyboards/clueboard/66/rev4/rev4.c b/keyboards/clueboard/66/rev4/rev4.c index 00d4f325e..510181827 100644 --- a/keyboards/clueboard/66/rev4/rev4.c +++ b/keyboards/clueboard/66/rev4/rev4.c @@ -1,12 +1,6 @@ #include "rev4.h" -void matrix_init_kb(void) { - led_init_ports(); - - matrix_init_user(); -} - -void led_init_ports() { +void led_init_ports(void) { // Set our LED pins as output setPinOutput(B13); // LED1 writePinLow(B13); diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h index e0e69a2ba..7e53e0a01 100644 --- a/keyboards/clueboard/66_hotswap/gen1/config.h +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -65,26 +65,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Backlight configuration */ #define BACKLIGHT_LEVELS 10 diff --git a/keyboards/clueboard/66_hotswap/gen1/gen1.c b/keyboards/clueboard/66_hotswap/gen1/gen1.c index 339bd78d5..8e3db70d0 100644 --- a/keyboards/clueboard/66_hotswap/gen1/gen1.c +++ b/keyboards/clueboard/66_hotswap/gen1/gen1.c @@ -16,7 +16,7 @@ #include "gen1.h" #ifdef LED_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | LED address diff --git a/keyboards/clueboard/card/keymaps/default/rules.mk b/keyboards/clueboard/card/keymaps/default/rules.mk index 82ee482be..c61fcbef8 100644 --- a/keyboards/clueboard/card/keymaps/default/rules.mk +++ b/keyboards/clueboard/card/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk b/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk index 54d74abbe..8e5ad40ce 100644 --- a/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk +++ b/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/cmm_studio/saka68/hotswap/rules.mk b/keyboards/cmm_studio/saka68/hotswap/rules.mk index 14b22efbd..552479e96 100644 --- a/keyboards/cmm_studio/saka68/hotswap/rules.mk +++ b/keyboards/cmm_studio/saka68/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cmm_studio/saka68/solder/rules.mk b/keyboards/cmm_studio/saka68/solder/rules.mk index a90eef1fc..23ba502fc 100644 --- a/keyboards/cmm_studio/saka68/solder/rules.mk +++ b/keyboards/cmm_studio/saka68/solder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/coarse/cordillera/rules.mk b/keyboards/coarse/cordillera/rules.mk index 70d00be2f..df87d4de7 100644 --- a/keyboards/coarse/cordillera/rules.mk +++ b/keyboards/coarse/cordillera/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/peiorisboards/ixora/chconf.h b/keyboards/coarse/ixora/chconf.h similarity index 100% rename from keyboards/peiorisboards/ixora/chconf.h rename to keyboards/coarse/ixora/chconf.h diff --git a/keyboards/peiorisboards/ixora/config.h b/keyboards/coarse/ixora/config.h similarity index 100% rename from keyboards/peiorisboards/ixora/config.h rename to keyboards/coarse/ixora/config.h diff --git a/keyboards/peiorisboards/ixora/halconf.h b/keyboards/coarse/ixora/halconf.h similarity index 100% rename from keyboards/peiorisboards/ixora/halconf.h rename to keyboards/coarse/ixora/halconf.h diff --git a/keyboards/peiorisboards/ixora/info.json b/keyboards/coarse/ixora/info.json similarity index 100% rename from keyboards/peiorisboards/ixora/info.json rename to keyboards/coarse/ixora/info.json diff --git a/keyboards/peiorisboards/ixora/ixora.c b/keyboards/coarse/ixora/ixora.c similarity index 100% rename from keyboards/peiorisboards/ixora/ixora.c rename to keyboards/coarse/ixora/ixora.c diff --git a/keyboards/peiorisboards/ixora/ixora.h b/keyboards/coarse/ixora/ixora.h similarity index 100% rename from keyboards/peiorisboards/ixora/ixora.h rename to keyboards/coarse/ixora/ixora.h diff --git a/keyboards/peiorisboards/ixora/keymaps/default/keymap.c b/keyboards/coarse/ixora/keymaps/default/keymap.c similarity index 100% rename from keyboards/peiorisboards/ixora/keymaps/default/keymap.c rename to keyboards/coarse/ixora/keymaps/default/keymap.c diff --git a/keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c b/keyboards/coarse/ixora/keymaps/wntrmln/keymap.c similarity index 100% rename from keyboards/peiorisboards/ixora/keymaps/wntrmln/keymap.c rename to keyboards/coarse/ixora/keymaps/wntrmln/keymap.c diff --git a/keyboards/coarse/ixora/readme.md b/keyboards/coarse/ixora/readme.md new file mode 100644 index 000000000..a094bbd5e --- /dev/null +++ b/keyboards/coarse/ixora/readme.md @@ -0,0 +1,22 @@ +Ixora +========= + +[Ixora](https://i.imgur.com/GqDk3XY.png) + + +Ixora is an ARM-powered 6-key macropad with a USB connector, hotswap sockets, and indicator LEDs. + +Keyboard Maintainer: [Coarse](https://github.com/coarse) +Hardware Supported: Ixora PCB +Hardware Availability: [Coarse](https://github.com/coarse) + +Make example for this keyboard (after setting up your build environment): + + make coarse/ixora:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. + +#### Developer's Note + +STM32F042xx chips does not allow jumping to bootloader without BOOT0 being set to high, therefore it is impossible to enter the bootloader from sending a `RESET` keycode nor using bootmagic or bootmagic lite. +The only way to enter bootloader is to hold the BOOT0 button while the keyboard is powering up or after a power reset (done by pressing the reset switch or sending a `RESET` keycode). diff --git a/keyboards/coarse/ixora/rules.mk b/keyboards/coarse/ixora/rules.mk new file mode 100644 index 000000000..339fdee92 --- /dev/null +++ b/keyboards/coarse/ixora/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = STM32F042 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/vinta/chconf.h b/keyboards/coarse/vinta/chconf.h similarity index 100% rename from keyboards/vinta/chconf.h rename to keyboards/coarse/vinta/chconf.h diff --git a/keyboards/vinta/config.h b/keyboards/coarse/vinta/config.h similarity index 100% rename from keyboards/vinta/config.h rename to keyboards/coarse/vinta/config.h diff --git a/keyboards/vinta/halconf.h b/keyboards/coarse/vinta/halconf.h similarity index 100% rename from keyboards/vinta/halconf.h rename to keyboards/coarse/vinta/halconf.h diff --git a/keyboards/vinta/info.json b/keyboards/coarse/vinta/info.json similarity index 100% rename from keyboards/vinta/info.json rename to keyboards/coarse/vinta/info.json diff --git a/keyboards/vinta/keymaps/default/keymap.c b/keyboards/coarse/vinta/keymaps/default/keymap.c similarity index 100% rename from keyboards/vinta/keymaps/default/keymap.c rename to keyboards/coarse/vinta/keymaps/default/keymap.c diff --git a/keyboards/coarse/vinta/readme.md b/keyboards/coarse/vinta/readme.md new file mode 100644 index 000000000..42291cd1f --- /dev/null +++ b/keyboards/coarse/vinta/readme.md @@ -0,0 +1,22 @@ +Vinta +========= + +[Vinta](https://i.imgur.com/huX3lff.jpg) + + +This is an ARM-powered 65% keyboard PCB with USB Mini B connector and breakout for optional RGB underglow. + +Keyboard Maintainer: [Coarse](https://github.com/coarse) +Hardware Supported: Vinta with STM32F042K6T6 +Hardware Availability: Private Groupbuy + +Make example for this keyboard (after setting up your build environment): + + make coarse/vinta:default + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. + +#### Developer's Note + +STM32F042xx chips does not allow jumping to bootloader without BOOT0 being set to high, therefore it is impossible to enter the bootloader from sending a `RESET` keycode nor using bootmagic or bootmagic lite. +The only way to enter bootloader is to hold the BOOT0 button while the keyboard is powering up or after a power reset (done by pressing the reset switch or sending a `RESET` keycode). diff --git a/keyboards/coarse/vinta/rules.mk b/keyboards/coarse/vinta/rules.mk new file mode 100644 index 000000000..e887eb098 --- /dev/null +++ b/keyboards/coarse/vinta/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = STM32F042 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +LAYOUTS = 65_ansi_blocker + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/vinta/vinta.c b/keyboards/coarse/vinta/vinta.c similarity index 100% rename from keyboards/vinta/vinta.c rename to keyboards/coarse/vinta/vinta.c diff --git a/keyboards/vinta/vinta.h b/keyboards/coarse/vinta/vinta.h similarity index 100% rename from keyboards/vinta/vinta.h rename to keyboards/coarse/vinta/vinta.h diff --git a/keyboards/cocoa40/rules.mk b/keyboards/cocoa40/rules.mk index 5d56f07fa..fafb0d573 100644 --- a/keyboards/cocoa40/rules.mk +++ b/keyboards/cocoa40/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE =no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/comet46/keymaps/default-rgbled/keymap.c b/keyboards/comet46/keymaps/default-rgbled/keymap.c index a576cc36b..d1e5b663d 100644 --- a/keyboards/comet46/keymaps/default-rgbled/keymap.c +++ b/keyboards/comet46/keymaps/default-rgbled/keymap.c @@ -140,7 +140,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); } diff --git a/keyboards/comet46/keymaps/satt/keymap.c b/keyboards/comet46/keymaps/satt/keymap.c index 98c3c175b..57aa63593 100644 --- a/keyboards/comet46/keymaps/satt/keymap.c +++ b/keyboards/comet46/keymaps/satt/keymap.c @@ -30,7 +30,7 @@ enum custom_keycodes { }; // JIS keycodes -#define KC_JZHT JP_ZHTG // hankaku/zenkaku|kanzi +#define KC_JZHT JP_ZKHK // hankaku/zenkaku|kanzi #define KC_JCIR JP_CIRC // ^, ~ #define KC_JAT JP_AT // @, ` #define KC_JLBR JP_LBRC // [, { @@ -40,8 +40,8 @@ enum custom_keycodes { #define KC_JMHE JP_MHEN // muhenkan #define KC_JHEN JP_HENK // henkan #define KC_JKAN JP_KANA // katakana/hiragana|ro-mazi -#define KC_JMKA JP_MKANA //kana on MacOSX -#define KC_JMEI JP_MEISU //eisu on MacOSX +#define KC_JMKA JP_LANG1 //kana on MacOSX +#define KC_JMEI KC_LANG2 //eisu on MacOSX #define KC_JAMP JP_AMPR // & #define KC_JQUO JP_QUOT // ' #define KC_JLPR JP_LPRN // ( @@ -164,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case _PSEUDO_US_LOWER: case _PSEUDO_US_RAISE: diff --git a/keyboards/comet46/rules.mk b/keyboards/comet46/rules.mk index 1f22b7535..08acbefe1 100644 --- a/keyboards/comet46/rules.mk +++ b/keyboards/comet46/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,7 @@ CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/compound/rules.mk b/keyboards/compound/rules.mk index a90eef1fc..23ba502fc 100644 --- a/keyboards/compound/rules.mk +++ b/keyboards/compound/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/contra/keymaps/dana/rules.mk b/keyboards/contra/keymaps/dana/rules.mk index cf891fad3..bd29e0f41 100644 --- a/keyboards/contra/keymaps/dana/rules.mk +++ b/keyboards/contra/keymaps/dana/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/contra/keymaps/deastiny/keymap.c b/keyboards/contra/keymaps/deastiny/keymap.c index 846cbe9c7..026db263e 100644 --- a/keyboards/contra/keymaps/deastiny/keymap.c +++ b/keyboards/contra/keymaps/deastiny/keymap.c @@ -46,9 +46,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { `-----------------------------------------------------------------------------------' **/ [_DVORAK] = LAYOUT_planck_mit( - KC_ESC, DE_UE, DE_COMM, DE_DOT, DE_P, DE_Y, DE_F, DE_G, DE_C, DE_T, DE_Z, KC_BSPC, + KC_ESC, DE_UDIA, DE_COMM, DE_DOT, DE_P, DE_Y, DE_F, DE_G, DE_C, DE_T, DE_Z, KC_BSPC, KC_TAB, DE_A, DE_O, DE_E, DE_I, DE_U, DE_H, DE_D, DE_R, DE_N, DE_S, DE_L, - KC_LSFT, DE_AE, DE_OE, DE_Q, DE_J, DE_K, DE_X, DE_B, DE_M, DE_W, DE_V, KC_ENT , + KC_LSFT, DE_ADIA, DE_ODIA, DE_Q, DE_J, DE_K, DE_X, DE_B, DE_M, DE_W, DE_V, KC_ENT , KC_LCTL, KC_LGUI, KC_LALT, MO(3), LOWER, KC_SPC, RAISE, KC_LEFT, KC_RIGHT, KC_UP, KC_DOWN ), @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_planck_mit( DE_TILD, DE_EXLM, DE_AT, DE_HASH, DE_DLR, DE_PERC, DE_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, KC_DEL, KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, DE_QST, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, DE_QUES, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), diff --git a/keyboards/contra/keymaps/losinggeneration/rules.mk b/keyboards/contra/keymaps/losinggeneration/rules.mk index 17ef68483..34b0ba318 100644 --- a/keyboards/contra/keymaps/losinggeneration/rules.mk +++ b/keyboards/contra/keymaps/losinggeneration/rules.mk @@ -5,7 +5,7 @@ AUDIO_ENABLE = no # Audio output on port C6 BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no # Console for debug(+400) MIDI_ENABLE = no # MIDI controls diff --git a/keyboards/contra/keymaps/maxr1998/keymap.c b/keyboards/contra/keymaps/maxr1998/keymap.c index c32a85661..044ed0c0c 100644 --- a/keyboards/contra/keymaps/maxr1998/keymap.c +++ b/keyboards/contra/keymaps/maxr1998/keymap.c @@ -65,8 +65,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_FN] = { - {_______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, _______, KC_DEL }, - {KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______}, + {_______, _______, _______, _______, _______, _______, _______, DE_UDIA, _______, DE_ODIA, _______, KC_DEL }, + {KC_LOCK, DE_ADIA, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______}, {_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______}, {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END } }, @@ -85,13 +85,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NR] = { {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______}, - {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______}, + {_______, DE_LABK, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______}, {_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______} }, [_NR_L3] = { {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS }, {_______, DE_Q, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______}, + {_______, DE_LABK, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______}, {_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______} }, diff --git a/keyboards/contra/rules.mk b/keyboards/contra/rules.mk index 9bd4c0851..a2feb720b 100755 --- a/keyboards/contra/rules.mk +++ b/keyboards/contra/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/converter/a1200/teensy2pp/rules.mk b/keyboards/converter/a1200/teensy2pp/rules.mk index 007e40f3b..2758f0d6b 100644 --- a/keyboards/converter/a1200/teensy2pp/rules.mk +++ b/keyboards/converter/a1200/teensy2pp/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/converter/adb_usb/rules.mk b/keyboards/converter/adb_usb/rules.mk index 70df2561d..e7bfb3f2f 100644 --- a/keyboards/converter/adb_usb/rules.mk +++ b/keyboards/converter/adb_usb/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboards/converter/hp_46010a/rules.mk b/keyboards/converter/hp_46010a/rules.mk index b7199d7f9..5d8379aea 100644 --- a/keyboards/converter/hp_46010a/rules.mk +++ b/keyboards/converter/hp_46010a/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = halfkay # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no SPLIT_KEYBOARD = no WAIT_FOR_USB = yes LAYOUTS_HAS_RGB = no diff --git a/keyboards/converter/ibm_5291/config.h b/keyboards/converter/ibm_5291/config.h deleted file mode 100644 index adf66cc69..000000000 --- a/keyboards/converter/ibm_5291/config.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2018 listofoptions - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include "config_common.h" - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER QMK -#define PRODUCT 5291 keyboard converter - -#define MATRIX_ROWS 24 -#define MATRIX_COLS 4 - -#define MATRIX_ROW_PINS {B2, B3, B4, B5, B6} -#define MATRIX_COL_PINS {B0, B1} -#define MATRIX_DATA_PIN D0 -#define MATRIX_STROBE_PIN D1 -#define LED_PIN D6 - - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 0 diff --git a/keyboards/converter/ibm_5291/ibm_5291.c b/keyboards/converter/ibm_5291/ibm_5291.c deleted file mode 100644 index 9b937a545..000000000 --- a/keyboards/converter/ibm_5291/ibm_5291.c +++ /dev/null @@ -1,3 +0,0 @@ -#include "ibm_5291.h" -#include -#include "quantum.h" \ No newline at end of file diff --git a/keyboards/converter/ibm_5291/ibm_5291.h b/keyboards/converter/ibm_5291/ibm_5291.h deleted file mode 100644 index aa1b40324..000000000 --- a/keyboards/converter/ibm_5291/ibm_5291.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright 2018 listofoptions - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License 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" - -/* - * ,-------. ,--------------------------------------------------------------------------. - * | F1| F2| |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS |NumLck |ScrLck | - * |-------| |--------------------------------------------------------------------------| - * | F3| F4| | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ] | | 7| 8| 9| -| - * |-------| |------------------------------------------------------|Ent|---------------| - * | F5| F6| | Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | 4| 5| 6| | - * |-------| |----------------------------------------------------------------------| | - * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift|PrS| 1| 2| 3| +| - * |-------| |----------------------------------------------------------------------| | - * | F9|F10| | Alt | Space |CapsLck| 0 | . | | - * `-------' `--------------------------------------------------------------------------' -*/ - -#define LAYOUT_5291( \ - KEY_F1,KEY_F2, KEY_ESC, KEY_1, KEY_2,KEY_3,KEY_4,KEY_5,KEY_6,KEY_7,KEY_8,KEY_9, KEY_0, KEY_MIN, KEY_EQU, KEY_BACK, KEY_NLOCK, KEY_SLOCK, \ - KEY_F3,KEY_F4, KEY_TAB, KEY_Q, KEY_W,KEY_E,KEY_R,KEY_T,KEY_Y,KEY_U,KEY_I,KEY_O, KEY_P, KEY_LBRC,KEY_RBRC, KEY_PAD7,KEY_PAD8, KEY_PAD9,KEY_PMIN, \ - KEY_F5,KEY_F6, KEY_LCTR,KEY_A, KEY_S,KEY_D,KEY_F,KEY_G,KEY_H,KEY_J,KEY_K,KEY_L, KEY_SEMI,KEY_QUOT,KEY_TICK, KEY_ENTR,KEY_PAD4,KEY_PAD5, KEY_PAD6, \ - KEY_F7,KEY_F8, KEY_LSFS,KEY_BSLS,KEY_Z,KEY_X,KEY_C,KEY_V,KEY_B,KEY_N,KEY_M,KEY_COMM,KEY_DOT, KEY_SLS,KEY_RSFS, KEY_PAST,KEY_PAD1,KEY_PAD2, KEY_PAD3,KEY_PPLS, \ - KEY_F9,KEY_F10, KEY_LALT, KEY_SPACE, KEY_CLOCK, KEY_PAD0, KEY_PDOT \ -) \ -{ {KEY_Z, KEY_S, KEY_W, KEY_3 }\ -, {KEY_X, KEY_D, KEY_E, KEY_4 }\ -, {KEY_C, KEY_F, KEY_R, KEY_5 }\ -, {KEY_V, KEY_G, KEY_T, KEY_6 }\ -, {KEY_B, KEY_H, KEY_Y, KEY_7 }\ -, {KEY_N, KEY_J, KEY_U, KEY_8 }\ -, {KEY_PAD2, KEY_PAD5,KEY_PAD8,KEY_NLOCK }\ -, {KEY_M, KEY_K, KEY_I, KEY_9 }\ -, {KEY_COMM, KEY_L, KEY_O, KEY_0 }\ -, {KEY_DOT, KEY_SEMI,KEY_P, KEY_MIN }\ -, {KEY_SLS, KEY_QUOT,KEY_LBRC,KEY_EQU }\ -, {KEY_SPACE, KEY_RSFS,KEY_TICK,KEY_RBRC }\ -, {KEY_CLOCK, KEY_PAST,KEY_ENTR,KEY_BACK }\ -, {KEY_PAD0, KEY_PAD1,KEY_PAD4,KEY_PAD7 }\ -, {KEY_PPLS, KC_NO, KEY_PMIN,KEY_SLOCK }\ -, {KEY_PDOT, KEY_PAD3,KEY_PAD6,KEY_PAD9 }\ -, {KEY_BSLS, KEY_A, KEY_Q, KEY_2 }\ -, {KEY_LALT, KC_NO, KC_NO, KEY_1 }\ -, {KEY_F7, KEY_F5, KEY_F3, KEY_F1 }\ -, {KEY_F8, KEY_F6, KEY_F4, KEY_F2 }\ -, {KC_F10, KC_NO, KC_NO, KC_NO }\ -, {KC_F9, KC_NO, KC_NO, KC_NO }\ -, {KEY_LSFS, KEY_LCTR,KEY_TAB, KEY_ESC }\ -, {KC_NO, KC_NO, KC_NO, KC_NO }\ -} - -#define LAYOUT LAYOUT_5291 \ No newline at end of file diff --git a/keyboards/converter/ibm_5291/info.json b/keyboards/converter/ibm_5291/info.json deleted file mode 100644 index dca1ca6f0..000000000 --- a/keyboards/converter/ibm_5291/info.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "keyboard_name": "IBM 5291", - "url": "https://deskthority.net/wiki/IBM_Model_F#IBM_5291_Keyboard", - "maintainer": "listofoptions", - "width": 21, - "height": 5, - "layouts": { - "LAYOUT_5291": { - "layout": [ - {"label":"Sys Req", "x":0, "y":0}, - {"label":"Cmd", "x":1, "y":0}, - {"label":"`", "x":2.25, "y":0}, - {"label":"1", "x":3.25, "y":0}, - {"label":"2", "x":4.25, "y":0}, - {"label":"3", "x":5.25, "y":0}, - {"label":"4", "x":6.25, "y":0}, - {"label":"5", "x":7.25, "y":0}, - {"label":"6", "x":8.25, "y":0}, - {"label":"7", "x":9.25, "y":0}, - {"label":"8", "x":10.25, "y":0}, - {"label":"9", "x":11.25, "y":0}, - {"label":"0", "x":12.25, "y":0}, - {"label":"-", "x":13.25, "y":0}, - {"label":"=", "x":14.25, "y":0}, - {"label":"Backspace", "x":15.25, "y":0, "w":1.75}, - {"label":"Reverse Tab", "x":17, "y":0, "w":2}, - {"label":"Dup", "x":19, "y":0, "w":2}, - {"label":"Del", "x":0, "y":1}, - {"label":"Erase Input", "x":1, "y":1}, - {"label":"Tab", "x":2.25, "y":1, "w":1.5}, - {"label":"Q", "x":3.75, "y":1}, - {"label":"W", "x":4.75, "y":1}, - {"label":"E", "x":5.75, "y":1}, - {"label":"R", "x":6.75, "y":1}, - {"label":"T", "x":7.75, "y":1}, - {"label":"Y", "x":8.75, "y":1}, - {"label":"U", "x":9.75, "y":1}, - {"label":"I", "x":10.75, "y":1}, - {"label":"O", "x":11.75, "y":1}, - {"label":"P", "x":12.75, "y":1}, - {"label":"¢", "x":13.75, "y":1}, - {"label":"\\", "x":14.75, "y":1, "w":1.25}, - {"label":"7", "x":17, "y":1}, - {"label":"8", "x":18, "y":1}, - {"label":"9", "x":19, "y":1}, - {"label":"Field -", "x":20, "y":1}, - {"label":"Print", "x":0, "y":2}, - {"label":"Help", "x":1, "y":2}, - {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, - {"label":"A", "x":4, "y":2}, - {"label":"S", "x":5, "y":2}, - {"label":"D", "x":6, "y":2}, - {"label":"F", "x":7, "y":2}, - {"label":"G", "x":8, "y":2}, - {"label":"H", "x":9, "y":2}, - {"label":"J", "x":10, "y":2}, - {"label":"K", "x":11, "y":2}, - {"label":"L", "x":12, "y":2}, - {"label":";", "x":13, "y":2}, - {"label":"'", "x":14, "y":2}, - {"label":"{", "x":15, "y":2}, - {"label":"Field Exit", "x":16, "y":1, "h":2}, - {"label":"4", "x":17, "y":2}, - {"label":"5", "x":18, "y":2}, - {"label":"6", "x":19, "y":2}, - {"label":"Roll Up", "x":0, "y":3}, - {"label":"Roll Down", "x":1, "y":3}, - {"label":"Shift", "x":2.25, "y":3, "w":1.25}, - {"label":"<", "x":3.5, "y":3}, - {"label":"Z", "x":4.5, "y":3}, - {"label":"X", "x":5.5, "y":3}, - {"label":"C", "x":6.5, "y":3}, - {"label":"V", "x":7.5, "y":3}, - {"label":"B", "x":8.5, "y":3}, - {"label":"N", "x":9.5, "y":3}, - {"label":"M", "x":10.5, "y":3}, - {"label":",", "x":11.5, "y":3}, - {"label":".", "x":12.5, "y":3}, - {"label":"/", "x":13.5, "y":3}, - {"label":"Shift", "x":14.5, "y":3, "w":1.5}, - {"label":"Return", "x":16, "y":3}, - {"label":"1", "x":17, "y":3}, - {"label":"2", "x":18, "y":3}, - {"label":"3", "x":19, "y":3}, - {"label":"Field +", "x":20, "y":2, "h":3}, - {"label":"Left", "x":0, "y":4}, - {"label":"Right", "x":1, "y":4}, - {"label":"Error Reset", "x":2.25, "y":4, "w":2}, - {"label":"Space", "x":4.25, "y":4, "w":9.75}, - {"label":"Enter Rec Adv", "x":14, "y":4, "w":2}, - {"label":"0", "x":16, "y":4, "w":2}, - {"label":".", "x":18, "y":4, "w":2} - ] - } - } -} diff --git a/keyboards/converter/ibm_5291/keymaps/default/keymap.c b/keyboards/converter/ibm_5291/keymaps/default/keymap.c deleted file mode 100644 index 9b286c887..000000000 --- a/keyboards/converter/ibm_5291/keymaps/default/keymap.c +++ /dev/null @@ -1,233 +0,0 @@ -/* -Copyright 2018 listofoptions - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public 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 xt_keycodes - { XT_PAST = SAFE_RANGE // XT pad asterisk / print screen - , XT_SLCK // XT scroll lock / break - , XT_F6 // F6 / app key - , XT_F5 // F5 / gui - , XT_F9 // F9 / F11 - , XT_F10 // F10 / F12 - } ; - -static bool shift_pressed = false , - alt_pressed = false , - ctrl_pressed = false , - xt_pscr_pressed = false , - xt_brk_pressed = false , - xt_app_pressed = false , - xt_gui_pressed = false , - xt_lout_pressed = false , - xt_f11_pressed = false , - xt_f12_pressed = false ; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_LSFT: - case KC_RSFT: - if (record->event.pressed) { - shift_pressed = true ; - } else { - shift_pressed = false ; - } - return true; - break; - - case KC_LALT: - if (record->event.pressed) { - alt_pressed = true ; - } else { - alt_pressed = false ; - } - return true; - break; - - case KC_LCTL: - if (record->event.pressed) { - ctrl_pressed = true ; - } else { - ctrl_pressed = false ; - } - return true; - break; - - case XT_PAST: - if (record->event.pressed) { - if (shift_pressed) { - xt_pscr_pressed = true ; - register_code(KC_PSCR); - } else { - register_code(KC_PAST); - } - } else { - if (xt_pscr_pressed) { - xt_pscr_pressed = false ; - unregister_code(KC_PSCR); - } else { - unregister_code(KC_PAST); - } - } - return false; - break; - - case XT_SLCK: - if (record->event.pressed) { - if (ctrl_pressed) { - xt_brk_pressed = true ; - register_code(KC_BRK); - } else { - register_code(KC_SLCK); - } - } else { - if (xt_brk_pressed) { - xt_brk_pressed = false ; - unregister_code(KC_BRK); - } else { - unregister_code(KC_SLCK); - } - } - return false; - break; - - case XT_F6: - if (record->event.pressed) { - if (shift_pressed) { - xt_app_pressed = true ; - register_code(KC_APP); - } else { - register_code(KC_F6); - } - } else { - if (xt_app_pressed) { - xt_app_pressed = false ; - unregister_code(KC_APP); - } else { - unregister_code(KC_F6); - } - } - return false; - break; - - case XT_F5: - if (record->event.pressed) { - if (shift_pressed) { - xt_gui_pressed = true ; - register_code(KC_LGUI); - } else if (ctrl_pressed) { - xt_lout_pressed = true ; - register_code (KC_LGUI) ; - register_code (KC_L) ; - } else { - register_code(KC_F5); - } - } else { - if (xt_gui_pressed) { - xt_gui_pressed = false ; - unregister_code(KC_LGUI); - } else if (xt_lout_pressed) { - xt_lout_pressed = false ; - unregister_code (KC_LGUI) ; - unregister_code (KC_L) ; - } else { - unregister_code(KC_F5); - } - } - return false; - break; - - case XT_F9: - if (record->event.pressed) { - if (shift_pressed) { - xt_f11_pressed = true ; - register_code(KC_F11); - } else { - register_code(KC_F9); - } - } else { - if (xt_f11_pressed) { - xt_f11_pressed = false ; - unregister_code(KC_F11); - } else { - unregister_code(KC_F9); - } - } - return false; - break; - - case XT_F10: - if (record->event.pressed) { - if (shift_pressed) { - xt_f12_pressed = true ; - register_code(KC_F12); - } else { - register_code(KC_F10); - } - } else { - if (xt_f12_pressed) { - xt_f12_pressed = false ; - unregister_code(KC_F12); - } else { - unregister_code(KC_F10); - } - } - return false; - break; - - default: - return true; - break; - } - - return true; -} -*/ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -// default layout is the standard XT layout -/* - * ,-------. ,--------------------------------------------------------------------------. - * | F1| F2| |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BS |NumLck |ScrLck | - * |-------| |--------------------------------------------------------------------------| - * | F3| F4| | Tab | Q| W| E| R| T| Y| U| I| O| P| [| ] | | 7| 8| 9| -| - * |-------| |------------------------------------------------------|Ent|---------------| - * | F5| F6| | Ctrl | A| S| D| F| G| H| J| K| L| ;| '| `| | 4| 5| 6| | - * |-------| |----------------------------------------------------------------------| | - * | F7| F8| |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift| *| 1| 2| 3| +| - * |-------| |----------------------------------------------------------------------| | - * | F9|F10| | Alt | Space |CapsLck| 0 | . | | - * `-------' `--------------------------------------------------------------------------' -*/ -/* - [0] = LAYOUT ( - KC_F1,KC_F2, KC_ESC, KC_1, KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_NLCK, XT_SLCK, - KC_F3,KC_F4, KC_TAB, KC_Q, KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O, KC_P, KC_LBRC,KC_RBRC, KC_P7,KC_P8, KC_P9, KC_PMNS, - XT_F5,XT_F6, KC_LCTL,KC_A, KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L, KC_SCLN,KC_QUOT,KC_GRV, KC_ENT, KC_P4,KC_P5, KC_P6, - KC_F7,KC_F8, KC_LSFT,KC_BSLS,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,XT_PAST,KC_P1,KC_P2, KC_P3, KC_PPLS, - XT_F9,XT_F10,KC_LALT, KC_SPACE, KC_CAPS, KC_P0, KC_PDOT - ) -*/ - [0] = LAYOUT ( - KC_F1,KC_F2, KC_ESC, KC_1, KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, KC_NLCK, KC_SLCK, - KC_F3,KC_F4, KC_TAB, KC_Q, KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O, KC_P, KC_LBRC,KC_RBRC, KC_P7,KC_P8, KC_P9, KC_PMNS, - KC_F5,KC_F6, KC_LCTL,KC_A, KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L, KC_SCLN,KC_QUOT,KC_GRV, KC_ENT, KC_P4,KC_P5, KC_P6, - KC_F7,KC_F8, KC_LSFT,KC_BSLS,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_PAST,KC_P1,KC_P2, KC_P3, KC_PPLS, - KC_F9,KC_F10,KC_LALT, KC_SPACE, KC_CAPS, KC_P0, KC_PDOT - ) -} ; - diff --git a/keyboards/converter/ibm_5291/keymaps/kbdbabel_doc_ibm5291_kbd.pdf b/keyboards/converter/ibm_5291/keymaps/kbdbabel_doc_ibm5291_kbd.pdf deleted file mode 100644 index 3560598f0..000000000 Binary files a/keyboards/converter/ibm_5291/keymaps/kbdbabel_doc_ibm5291_kbd.pdf and /dev/null differ diff --git a/keyboards/converter/ibm_5291/matrix.c b/keyboards/converter/ibm_5291/matrix.c deleted file mode 100644 index 3946d02e5..000000000 --- a/keyboards/converter/ibm_5291/matrix.c +++ /dev/null @@ -1,284 +0,0 @@ -/* -Copyright 2018 listofoptions - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include -#include -#include -#if defined(__AVR__) -#include -#endif -#include - -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "timer.h" - -#include "config.h" - - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif - -#define print_matrix_header() print("\nr/c 01234567\n") -#define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -#define matrix_bitpop(i) bitpop(matrix[i]) -#define ROW_SHIFTER ((uint8_t)1) -#define check_bit(var,pos) ((var) & (1<<(pos))) - -#define NUM_ROW_PINS 5 -#define NUM_COL_PINS 2 - -static const uint8_t row_pins [NUM_ROW_PINS] = MATRIX_ROW_PINS ; -static const uint8_t col_pins [NUM_ROW_PINS] = MATRIX_COL_PINS ; - -#if ( DEBOUNCE > 0 ) -static uint16_t debouncing_time ; -static bool debouncing = false ; -#endif - -static uint8_t matrix [MATRIX_ROWS] = {0}; - -#if ( DEBOUNCE > 0 ) -static uint8_t matrix_debounce [MATRIX_ROWS] = {0}; -#endif - -static -inline -void toggle_led(void) { - uint8_t pin = LED_PIN ; - _SFR_IO8((pin >> 4) + 2) ^= _BV(pin & 0xF); -} - -static -inline -void init_led(void) { - uint8_t pin = LED_PIN ; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static -inline -void init_data(void) { - uint8_t pin = MATRIX_DATA_PIN ; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // LO -} - -static -inline -void init_strobe(void) { - uint8_t pin = MATRIX_STROBE_PIN ; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static -inline -void init_rows(void) { - for ( uint8_t i = 0 ; i < NUM_ROW_PINS; ++i ) { - uint8_t pin = row_pins[i]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW - } -} - -static -inline -void init_cols(void) { - for ( uint8_t i = 0 ; i < NUM_COL_PINS; ++i ) { - uint8_t pin = col_pins[i]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW - } -} - -static -inline -void select_row(uint8_t current_row) { - for ( uint8_t i = 0 ; i < NUM_ROW_PINS; ++i ) { - uint8_t pin = row_pins[i] ; - if ( check_bit( current_row, i ) ) { - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } else { - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW - } - } - wait_us(30) ; -} - -static -inline -void select_col(uint8_t current_col) { - for ( uint8_t i = 0 ; i < NUM_COL_PINS; ++i ) { - uint8_t pin = col_pins[i] ; - if ( check_bit( current_col, i ) ) { - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } else { - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW - } - } - wait_us(30) ; -} - -static -inline -uint8_t matrix_strobe(uint8_t col_index) { - uint8_t strobe_pin = MATRIX_STROBE_PIN ; - uint8_t data_pin = MATRIX_DATA_PIN ; - - // set strobe pin low - _SFR_IO8((strobe_pin >> 4) + 2) &= ~_BV(strobe_pin & 0xF); - - wait_us(30) ; - - // read data - uint8_t data = (_SFR_IO8(data_pin >> 4) & _BV(data_pin & 0xF)) ; - - // set strobe pin hi - _SFR_IO8((strobe_pin >> 4) + 2) |= _BV(strobe_pin & 0xF); - - uint8_t out = data ? (1 << col_index) : 0 ; - return out ; -} - -static -bool matrix_read(uint8_t current_matrix[], uint8_t current_row) { - // Store last value of row prior to reading - uint8_t last_row_value = current_matrix[current_row]; - - // Clear data in matrix row - current_matrix[current_row] = 0; - - select_row(current_row); - - // For each col... - for(uint8_t col_index = 0; col_index < MATRIX_COLS; ++col_index) { - - select_col(col_index) ; - - // strobe the matrix - // Populate the matrix row with the state of the data pin - current_matrix[current_row] |= matrix_strobe(col_index) ; - } - - bool test = last_row_value != current_matrix[current_row] ; - return test ; -} - -__attribute__ ((weak)) -void matrix_init_quantum(void) { - matrix_init_kb(); -} - -__attribute__ ((weak)) -void matrix_scan_quantum(void) { - matrix_scan_kb(); -} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) { - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) { - return MATRIX_COLS; -} - -inline -uint8_t matrix_get_row(uint8_t row) { - return matrix[row]; -} - -void matrix_init(void) { - init_led() ; - init_rows() ; - init_cols() ; - init_data() ; - init_strobe() ; - - // initialize matrix state: all keys off - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; -# if (DEBOUNCE > 0) - matrix_debounce [i] = 0; -# endif - } - - matrix_init_quantum() ; -} - -uint8_t matrix_scan(void) { - for ( uint8_t current_row = 0; current_row < MATRIX_ROWS; ++current_row ) { -# if (DEBOUNCE > 0) - bool matrix_changed = matrix_read(matrix_debounce, current_row); - - if (matrix_changed) { - debouncing = true ; - debouncing_time = timer_read(); - } - -# else - matrix_read(matrix, current_row); -# endif - } - -# if (DEBOUNCE > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debounce[i]; - } - debouncing = false; - } -# endif - - matrix_scan_quantum(); - return 1; -} - -void matrix_print(void) { - print_matrix_header(); - - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - print_hex8(row); print(": "); - print_matrix_row(row); - print("\n"); - } -} diff --git a/keyboards/converter/ibm_5291/matrix.csv b/keyboards/converter/ibm_5291/matrix.csv deleted file mode 100644 index 40462c214..000000000 --- a/keyboards/converter/ibm_5291/matrix.csv +++ /dev/null @@ -1,96 +0,0 @@ -0,Z -1,S -2,W -3,3 -4,X -5,D -6,E -7,4 -8,C -9,F -10,R -11,5 -12,V -13,G -14,T -15,6 -16,B -17,H -18,Y -19,7 -20,N -21,J -22,U -23,8 -24,PAD_2 -25,PAD_5 -26,PAD_8 -27,NUM_LOCK -28,M -29,K -30,I -31,9 -32,COMMA -33,L -34,O -35,0 -36,PERIOD -37,SEMICOLON -38,P -39,MINUS -40,SLASH -41,QUOTE -42,LEFT_BRACE -43,EQUAL -44,SPACE -45,RSHIFT -46,BACK_QUOTE -47,RIGHT_BRACE -48,CAPS_LOCK -49,PAD_ASTERIX -50,ENTER -51,BACKSPACE -52,PAD_0 -53,PAD_1 -54,PAD_4 -55,PAD_7 -56,PAD_PLUS -57,UNASSIGNED -58,PAD_MINUS -59,SCROLL_LOCK -60,PAD_PERIOD -61,PAD_3 -62,PAD_6 -63,PAD_9 -64,BACKSLASH -65,A -66,Q -67,2 -68,LALT -69,UNASSIGNED -70,UNASSIGNED -71,1 -72,F7 -73,F5 -74,F3 -75,F1 -76,F8 -77,F6 -78,F4 -79,F2 -80,F10 -81,UNASSIGNED -82,UNASSIGNED -83,UNASSIGNED -84,F9 -85,UNASSIGNED -86,UNASSIGNED -87,UNASSIGNED -88,LSHIFT -89,LCTRL -90,TAB -91,ESC -92,UNASSIGNED -93,UNASSIGNED -94,UNASSIGNED -95,UNASSIGNED diff --git a/keyboards/converter/ibm_5291/readme.md b/keyboards/converter/ibm_5291/readme.md deleted file mode 100644 index 03406d3f9..000000000 --- a/keyboards/converter/ibm_5291/readme.md +++ /dev/null @@ -1,72 +0,0 @@ -# IBM 5291 keyboard converter - -[IBM 5291](https://deskthority.net/wiki/IBM_Model_F#IBM_5291_Keyboard) - -A converter for the eponymous keyboard. - -Keyboard Maintainer: [Listofoptions](https://github.com/listofoptions) -Hardware Supported: IBM 5291, Teensy 2.0 - -Make example for this keyboard (after setting up your build environment): - - make converter/ibm_5291: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). - - -The pinout is as follows: - -IBM−5291−Cable to Pinhead−14 - -| pin | description -----|------------------------ -1 | GND -2 | NC -3 | GND -4 | GN) -5 | +5V -6 | D0 -7 | D1 -8 | D2 -9 | D3 -10| D4 -11| D5 -12| D6 -13| Strobe -14| Out - -The pins on this connector are organized -![here](https://geekhack.org/index.php?action=dlattach;topic=48950.0;attach=36759;image) - -IBM−5291−2 Cable with DB15M connector - -| pin | description -----|------------- -|1,2,3 | GND -|4 | +5V -|5 | D0 -|6 | D1 -|7 | D2 -|8 | D3 -|9 | D4 -|10 | D5 -|11 | D6 -|12 | Strobe -|13 | Out -|14 | PE -|15 | NC - -The above connector is actually numbered so it should be easier to determine -where the needed connections are. - -To connect to the teensy, the following are pins are needed (if you should choose not set your own): - -* PB0 -> PB6 are connected to D0 -> D6 -* +5V is connected to the corresponding teensy pin -* gnd is as well, only one of the gnd pins needs to be connected though. -* strobe is connected to pin PD1 -* data is connected to PD0 -* PE does not need to be connected to anything, but it could also be connected to gnd - -sources: - http://www.retrocomputing.eu/documents/5291_MaintenanceLibrary.pdf diff --git a/keyboards/converter/ibm_5291/rules.mk b/keyboards/converter/ibm_5291/rules.mk deleted file mode 100644 index 0b53753eb..000000000 --- a/keyboards/converter/ibm_5291/rules.mk +++ /dev/null @@ -1,38 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = halfkay - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no -SPLIT_KEYBOARD = no -WAIT_FOR_USB = yes -LAYOUTS_HAS_RGB = no -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = yes - -SRC = matrix.c diff --git a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk index 749b93312..14325edd7 100644 --- a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk +++ b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -15,7 +15,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_USE_USART = yes -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk b/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk index 76d349920..8c5f3d703 100644 --- a/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -16,7 +16,6 @@ UNICODEMAP_ENABLE = yes BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_USE_USART = yes -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/converter/ibm_terminal/rules.mk b/keyboards/converter/ibm_terminal/rules.mk index 059d7b303..f2fc3c9c8 100644 --- a/keyboards/converter/ibm_terminal/rules.mk +++ b/keyboards/converter/ibm_terminal/rules.mk @@ -15,20 +15,18 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_USE_USART = yes -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes diff --git a/keyboards/converter/m0110_usb/rules.mk b/keyboards/converter/m0110_usb/rules.mk index a0f0c5ce4..a89400d08 100644 --- a/keyboards/converter/m0110_usb/rules.mk +++ b/keyboards/converter/m0110_usb/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboards/converter/modelm101/rules.mk b/keyboards/converter/modelm101/rules.mk index 24ee74d0b..84090086d 100644 --- a/keyboards/converter/modelm101/rules.mk +++ b/keyboards/converter/modelm101/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/converter/numeric_keypad_IIe/rules.mk b/keyboards/converter/numeric_keypad_IIe/rules.mk index b828d7c36..a684ff876 100644 --- a/keyboards/converter/numeric_keypad_IIe/rules.mk +++ b/keyboards/converter/numeric_keypad_IIe/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk index 15114192e..de70a45c0 100644 --- a/keyboards/converter/palm_usb/rules.mk +++ b/keyboards/converter/palm_usb/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/converter/periboard_512/rules.mk b/keyboards/converter/periboard_512/rules.mk index c1cb4919a..522fb5108 100644 --- a/keyboards/converter/periboard_512/rules.mk +++ b/keyboards/converter/periboard_512/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/converter/siemens_tastatur/config.h b/keyboards/converter/siemens_tastatur/config.h index ae6f1a209..cd54ed3d8 100644 --- a/keyboards/converter/siemens_tastatur/config.h +++ b/keyboards/converter/siemens_tastatur/config.h @@ -26,11 +26,11 @@ along with this program. If not, see . #define PRODUCT Siemens Tastatur /* key matrix size */ -#define MATRIX_ROWS 4 +#define MATRIX_ROWS 5 #define MATRIX_COLS 19 //This is all fake and not used -#define MATRIX_COL_PINS { B11, B10, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, C15, C14 } +#define MATRIX_COL_PINS { B11, B10, B1, B0, A7, A6, A5, A4, A3, A2, A1, A0, C15, C14, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } #define MATRIX_ROW_PINS { B3, B4, B5, B6, B7 } #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/converter/siemens_tastatur/rules.mk b/keyboards/converter/siemens_tastatur/rules.mk index ff54cf24e..08cc9741a 100644 --- a/keyboards/converter/siemens_tastatur/rules.mk +++ b/keyboards/converter/siemens_tastatur/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = stm32duino SRC = matrix.c -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/converter/sun_usb/rules.mk b/keyboards/converter/sun_usb/rules.mk index 5a1a117c0..8e7e3514c 100644 --- a/keyboards/converter/sun_usb/rules.mk +++ b/keyboards/converter/sun_usb/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = lufa-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/converter/usb_usb/ble/rules.mk b/keyboards/converter/usb_usb/ble/rules.mk index 93e85832d..76af3e1fa 100644 --- a/keyboards/converter/usb_usb/ble/rules.mk +++ b/keyboards/converter/usb_usb/ble/rules.mk @@ -1,7 +1,7 @@ # Processor frequency F_CPU = 8000000 -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -12,7 +12,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/converter/usb_usb/rules.mk b/keyboards/converter/usb_usb/rules.mk index d2b991837..9a39ef7da 100644 --- a/keyboards/converter/usb_usb/rules.mk +++ b/keyboards/converter/usb_usb/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite #MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control #CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/converter/usb_usb/usb_usb.h b/keyboards/converter/usb_usb/usb_usb.h index e0c7c9c0d..1d1b6770d 100644 --- a/keyboards/converter/usb_usb/usb_usb.h +++ b/keyboards/converter/usb_usb/usb_usb.h @@ -127,15 +127,40 @@ along with this program. If not, see . K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K28, K5C,K5D,K5E,K57, \ KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B, \ KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58 \ -) LAYOUT_all( \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - K29, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K42, K43, K44, K45, K46, K47, K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - K35, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K2D, K2E, KC_NO, K2A, K49, K4A, K4B, K53, K54, K55, K56, KC_NO, KC_NO, \ - K2B, K14, K1A, K08, K15, K17, K1C, K18, K0C, K12, K13, K2F, K30, K31, K4C, K4D, K4E, K5F, K60, K61, K57, KC_NO, KC_NO, \ - K39, K04, K16, K07, K09, K0A, K0B, K0D, K0E, K0F, K33, K34, KC_NO, K28, K5C, K5D, K5E, KC_NO, KC_NO, KC_NO, \ - KE1, KC_NO, K1D, K1B, K06, K19, K05, K11, K10, K36, K37, K38, KC_NO, KE5, K52, K59, K5A, K5B, KC_NO, KC_NO, KC_NO, \ - KE0, KE3, KE2, KC_NO, KC_NO, K2C, KC_NO, KC_NO, KC_NO, KE6, KE7, K65, KE4, K50, K51, K4F, K62, K63, K58, KC_NO, KC_NO \ -) +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ + K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ + { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ + K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ + { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ + K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ + { K30, K31, KC_NO, K33, K34, K35, K36, K37, /* 30-37 */ \ + K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ + { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ + K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ + { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ + K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ + { K60, K61, K62, K63, KC_NO, K65, KC_NO, KC_NO, /* 60-67 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 68-6F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 70-77 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 78-7F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 80-87 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ + { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ +} /* ,---. ,---------------. ,---------------. ,---------------. ,-----------. * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| @@ -159,15 +184,40 @@ along with this program. If not, see . K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,K32, K5C,K5D,K5E, \ KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B,K58, \ KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63 \ -) LAYOUT_all( \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - K29, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K42, K43, K44, K45, K46, K47, K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - K35, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K2D, K2E, KC_NO, K2A, K49, K4A, K4B, K53, K54, K55, K56, KC_NO, KC_NO, \ - K2B, K14, K1A, K08, K15, K17, K1C, K18, K0C, K12, K13, K2F, K30, K32, K4C, K4D, K4E, K5F, K60, K61, K57, KC_NO, KC_NO, \ - K39, K04, K16, K07, K09, K0A, K0B, K0D, K0E, K0F, K33, K34, K32, K28, K5C, K5D, K5E, KC_NO, KC_NO, KC_NO, \ - KE1, K64, K1D, K1B, K06, K19, K05, K11, K10, K36, K37, K38, KC_NO, KE5, K52, K59, K5A, K5B, KC_NO, KC_NO, KC_NO, \ - KE0, KE3, KE2, KC_NO, KC_NO, K2C, KC_NO, KC_NO, KC_NO, KE6, KE7, K65, KE4, K50, K51, K4F, K62, K63, K58, KC_NO, KC_NO \ -) +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ + K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ + { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ + K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ + { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ + K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ + { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \ + K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ + { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ + K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ + { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ + K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ + { K60, K61, K62, K63, K64, K65, KC_NO, KC_NO, /* 60-67 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 68-6F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 70-77 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 78-7F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 80-87 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ + { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ +} /* ,---. ,---------------. ,---------------. ,---------------. ,-----------. * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| @@ -191,13 +241,38 @@ along with this program. If not, see . K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,K32, K5C,K5D,K5E, \ KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,K58, \ KE0,KE3,KE2,K8B, K2C, K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63 \ -) LAYOUT_all( \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - K29, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K42, K43, K44, K45, K46, K47, K48, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - K35, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K2D, K2E, K89, K2A, K49, K4A, K4B, K53, K54, K55, K56, KC_NO, KC_NO, \ - K2B, K14, K1A, K08, K15, K17, K1C, K18, K0C, K12, K13, K2F, K30, K32, K4C, K4D, K4E, K5F, K60, K61, K57, KC_NO, KC_NO, \ - K39, K04, K16, K07, K09, K0A, K0B, K0D, K0E, K0F, K33, K34, K32, K28, K5C, K5D, K5E, KC_NO, KC_NO, KC_NO, \ - KE1, KC_NO, K1D, K1B, K06, K19, K05, K11, K10, K36, K37, K38, K87, KE5, K52, K59, K5A, K5B, KC_NO, KC_NO, KC_NO, \ - KE0, KE3, KE2, K8B, KC_NO, K2C, KC_NO, K8A, K88, KE6, KE7, K65, KE4, K50, K51, K4F, K62, K63, K58, KC_NO, KC_NO \ -) +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ + K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ + { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ + K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ + { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ + K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ + { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \ + K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ + { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ + K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ + { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ + K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ + { K60, K61, K62, K63, K64, K65, KC_NO, KC_NO, /* 60-67 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 68-6F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 70-77 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 78-7F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K87, /* 80-87 */ \ + K88, K89, K8A, K8B, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ + { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ +} #endif diff --git a/keyboards/converter/xt_usb/rules.mk b/keyboards/converter/xt_usb/rules.mk index ca9382f8a..9f84d6ac0 100644 --- a/keyboards/converter/xt_usb/rules.mk +++ b/keyboards/converter/xt_usb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cool836a/rules.mk b/keyboards/cool836a/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/cool836a/rules.mk +++ b/keyboards/cool836a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/copenhagen_click/click_pad_v1/config.h b/keyboards/copenhagen_click/click_pad_v1/config.h index 62d08fab2..95d56bb66 100755 --- a/keyboards/copenhagen_click/click_pad_v1/config.h +++ b/keyboards/copenhagen_click/click_pad_v1/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/copenhagen_click/click_pad_v1/rules.mk b/keyboards/copenhagen_click/click_pad_v1/rules.mk index 2bfc5d095..65e75d14c 100755 --- a/keyboards/copenhagen_click/click_pad_v1/rules.mk +++ b/keyboards/copenhagen_click/click_pad_v1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/coseyfannitutti/discipad/config.h b/keyboards/coseyfannitutti/discipad/config.h index 01b12cf3a..056239a09 100644 --- a/keyboards/coseyfannitutti/discipad/config.h +++ b/keyboards/coseyfannitutti/discipad/config.h @@ -191,26 +191,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/coseyfannitutti/discipad/rules.mk b/keyboards/coseyfannitutti/discipad/rules.mk index 057bea42b..f7985448d 100644 --- a/keyboards/coseyfannitutti/discipad/rules.mk +++ b/keyboards/coseyfannitutti/discipad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/coseyfannitutti/discipline/config.h b/keyboards/coseyfannitutti/discipline/config.h index af2bc452b..3efe9a5c3 100644 --- a/keyboards/coseyfannitutti/discipline/config.h +++ b/keyboards/coseyfannitutti/discipline/config.h @@ -189,26 +189,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/coseyfannitutti/discipline/rules.mk b/keyboards/coseyfannitutti/discipline/rules.mk index c5153c876..91228adfe 100644 --- a/keyboards/coseyfannitutti/discipline/rules.mk +++ b/keyboards/coseyfannitutti/discipline/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/coseyfannitutti/mullet/config.h b/keyboards/coseyfannitutti/mullet/config.h index 9d92d0839..b186aa82d 100644 --- a/keyboards/coseyfannitutti/mullet/config.h +++ b/keyboards/coseyfannitutti/mullet/config.h @@ -118,23 +118,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/coseyfannitutti/mullet/rules.mk b/keyboards/coseyfannitutti/mullet/rules.mk index 6efa76cb9..7ae4a35f4 100644 --- a/keyboards/coseyfannitutti/mullet/rules.mk +++ b/keyboards/coseyfannitutti/mullet/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/coseyfannitutti/mulletpad/config.h b/keyboards/coseyfannitutti/mulletpad/config.h index 782bc16e7..b2a930357 100644 --- a/keyboards/coseyfannitutti/mulletpad/config.h +++ b/keyboards/coseyfannitutti/mulletpad/config.h @@ -41,7 +41,7 @@ along with this program. If not, see . * */ #define MATRIX_ROW_PINS { F4, F1, F5, F6, F7 } -#define MATRIX_COL_PINS { F0, C7, C6, B6, } +#define MATRIX_COL_PINS { F0, C7, C6, B6 } #define UNUSED_PINS /* COL2ROW, ROW2COL */ @@ -118,23 +118,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/coseyfannitutti/mulletpad/rules.mk b/keyboards/coseyfannitutti/mulletpad/rules.mk index 4a4a7e1e7..d5b87e9c1 100644 --- a/keyboards/coseyfannitutti/mulletpad/rules.mk +++ b/keyboards/coseyfannitutti/mulletpad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/coseyfannitutti/mysterium/config.h b/keyboards/coseyfannitutti/mysterium/config.h index 9b657d5bd..4e23392ee 100644 --- a/keyboards/coseyfannitutti/mysterium/config.h +++ b/keyboards/coseyfannitutti/mysterium/config.h @@ -187,26 +187,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/coseyfannitutti/mysterium/rules.mk b/keyboards/coseyfannitutti/mysterium/rules.mk index 65dbecf21..69714fb89 100644 --- a/keyboards/coseyfannitutti/mysterium/rules.mk +++ b/keyboards/coseyfannitutti/mysterium/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/coseyfannitutti/romeo/config.h b/keyboards/coseyfannitutti/romeo/config.h index 8be834db8..f87b9ea6d 100644 --- a/keyboards/coseyfannitutti/romeo/config.h +++ b/keyboards/coseyfannitutti/romeo/config.h @@ -190,26 +190,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/coseyfannitutti/romeo/rules.mk b/keyboards/coseyfannitutti/romeo/rules.mk index 51d0b1ef7..d8018fa31 100644 --- a/keyboards/coseyfannitutti/romeo/rules.mk +++ b/keyboards/coseyfannitutti/romeo/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h deleted file mode 100644 index fd7baf1b8..000000000 --- a/keyboards/cospad/config.h +++ /dev/null @@ -1,223 +0,0 @@ -/* -Copyright 2020 - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License 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 0x4B5C // "KP" -#define PRODUCT_ID 0xB1E5 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPrepublic -#define PRODUCT Cospad - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 4 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 } -#define MATRIX_COL_PINS { F0, F1, E6, C7 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ -#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 - -#define LED_NUM_LOCK_PIN B2 -#define LED_PIN_ON_STATE 0 - -#define BACKLIGHT_PIN F7 -// #define BACKLIGHT_BREATHING -#define BACKLIGHT_LEVELS 3 -#define BACKLIGHT_ON_STATE 0 - -#define RGB_DI_PIN F6 -#ifdef RGB_DI_PIN - #define RGBLED_NUM 4 -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 -// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -// /*== all animations enable ==*/ - #define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ -// #define RGBLIGHT_EFFECT_BREATHING -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL -// #define RGBLIGHT_EFFECT_SNAKE -// #define RGBLIGHT_EFFECT_KNIGHT -// #define RGBLIGHT_EFFECT_CHRISTMAS -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -// /*== customize breathing effect ==*/ -// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ -// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 -// /*==== use exp() and sin() ====*/ -// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 -// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 -#endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -/* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP H -//#define MAGIC_KEY_HELP_ALT SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER0_ALT GRAVE -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER B -//#define MAGIC_KEY_BOOTLOADER_ALT ESC -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_EEPROM_CLEAR BSPACE -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -/* disable these deprecated features by default */ -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - -/* Bootmagic Lite key configuration */ -// #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/cospad/keymaps/detrus/keymap.c b/keyboards/cospad/keymaps/detrus/keymap.c deleted file mode 100644 index 93f95bb01..000000000 --- a/keyboards/cospad/keymaps/detrus/keymap.c +++ /dev/null @@ -1,367 +0,0 @@ -#include QMK_KEYBOARD_H -#include "led.h" -#include - -#ifdef RGBLIGHT_ENABLE -#include "rgblight.h" -#endif - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -enum cospad_layers { - _QWERTY_LAYER, - _QWERTZ_LAYER, - _COLEMA_LAYER, - _DVORAK_LAYER, - _QWERTY_LOWER_LAYER, - _QWERTZ_LOWER_LAYER, - _COLEMA_LOWER_LAYER, - _DVORAK_LOWER_LAYER, - _RAISE_LAYER, - _ALTER_LAYER, -}; - -// To switch the default layer used for the layout, there are special keycodes. -// Which onces detected below serve to switch it. -enum cospad_keycodes { - QWERTY = SAFE_RANGE, - QWERTZ, - COLEMAK, - DVORAK -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* Keymap _QWERTY_LAYER: Default layer - * ,-----------------------. - * | T | G | B | Alt | - * |-----|-----|-----|-----| - * | R | F | V | LOW | - * |-----|-----|-----|-----| - * | E | D | C | | - * |-----|-----|-----| Spc | - * | W | S | X | | - * |-----|-----|-----|-----| - * | Q | A | Z | RAI | - * |-----|-----|-----|-----| - * | Esc | Tab | Sft | Ctl | - * `-----------------------' - * - * And it's LOWER layer - * ,-----------------------. - * | P | ; | / | Alt | - * |-----|-----|-----|-----| - * | O | L | . | LOW | - * |-----|-----|-----|-----| - * | I | K | , | | - * |-----|-----|-----| Ent | - * | U | J | M | | - * |-----|-----|-----|-----| - * | Y | H | N | RAI | - * |-----|-----|-----|-----| - * | Esc | Tab | Sft | Ctl | - * `-----------------------' - */ - [_QWERTY_LAYER] = LAYOUT_gamepad_6x4( - KC_T, KC_G, KC_B, KC_LALT, \ - KC_R, KC_F, KC_V, MO(_QWERTY_LOWER_LAYER),\ - KC_E, KC_D, KC_C, \ - KC_W, KC_S, KC_X, KC_SPACE, \ - KC_Q, KC_A, KC_Z, MO(_RAISE_LAYER),\ - KC_GESC, KC_TAB, KC_LSFT, KC_LCTRL), - [_QWERTY_LOWER_LAYER] = LAYOUT_gamepad_6x4( - KC_P, KC_SCLN, KC_SLSH, KC_LALT, \ - KC_O, KC_L, KC_DOT, _______, \ - KC_I, KC_K, KC_COMM, \ - KC_U, KC_J, KC_M, KC_ENTER, \ - KC_Y, KC_H, KC_N, _______, \ - _______, _______, _______, _______), - - - - /* Keymap _QWERTZ_LAYER: Alternate default layer - * ,-----------------------. - * | T | G | B | Alt | - * |-----|-----|-----|-----| - * | R | F | V | LOW | - * |-----|-----|-----|-----| - * | E | D | C | | - * |-----|-----|-----| Spc | - * | W | S | X | | - * |-----|-----|-----|-----| - * | Q | A | Y | RAI | - * |-----|-----|-----|-----| - * | Esc | Tab | Sft | Ctl | - * `-----------------------' - * - * And it's LOWER layer - * ,-----------------------. - * | P | ; | / | Alt | - * |-----|-----|-----|-----| - * | O | L | > | LOW | - * |-----|-----|-----|-----| - * | I | K | < | | - * |-----|-----|-----| Ent | - * | U | J | M | | - * |-----|-----|-----|-----| - * | Z | H | N | RAI | - * |-----|-----|-----|-----| - * | Esc | Tab | Sft | Ctl | - * `-----------------------' - */ - [_QWERTZ_LAYER] = LAYOUT_gamepad_6x4( - KC_T, KC_G, KC_B, KC_LALT, \ - KC_R, KC_F, KC_V, MO(_QWERTZ_LOWER_LAYER),\ - KC_E, KC_D, KC_C, \ - KC_W, KC_S, KC_X, KC_SPACE, \ - KC_Q, KC_A, KC_Y, MO(_RAISE_LAYER),\ - KC_GESC, KC_TAB, KC_LSFT, KC_LCTRL), - [_QWERTZ_LOWER_LAYER] = LAYOUT_gamepad_6x4( - KC_P, KC_SCLN, KC_SLSH, KC_LALT, \ - KC_O, KC_L, KC_DOT, _______, \ - KC_I, KC_K, KC_COMM, \ - KC_U, KC_J, KC_M, KC_ENTER, \ - KC_Z, KC_H, KC_N, _______, \ - _______, _______, _______, _______), - - - - /* Keymap _COLEMA_LAYER: Alternate default layer - * ,-----------------------. - * | G | D | B | Alt | - * |-----|-----|-----|-----| - * | P | T | V | LOW | - * |-----|-----|-----|-----| - * | F | S | C | | - * |-----|-----|-----| Spc | - * | W | R | X | | - * |-----|-----|-----|-----| - * | Q | A | Z | RAI | - * |-----|-----|-----|-----| - * | Esc | Tab | Sft | Ctl | - * `-----------------------' - * - * And it's LOWER layer - * ,-----------------------. - * | ; | O | / | Alt | - * |-----|-----|-----|-----| - * | Y | I | . | LOW | - * |-----|-----|-----|-----| - * | U | E | , | | - * |-----|-----|-----| Ent | - * | L | N | M | | - * |-----|-----|-----|-----| - * | J | H | K | RAI | - * |-----|-----|-----|-----| - * | Esc | Tab | Sft | Ctl | - * `-----------------------' - */ - [_COLEMA_LAYER] = LAYOUT_gamepad_6x4( - KC_T, KC_D, KC_B, KC_LALT, \ - KC_R, KC_T, KC_V, MO(_COLEMA_LOWER_LAYER),\ - KC_E, KC_S, KC_C, \ - KC_W, KC_R, KC_X, KC_SPACE, \ - KC_Q, KC_A, KC_Z, MO(_RAISE_LAYER),\ - KC_GESC, KC_TAB, KC_LSFT, KC_LCTRL), - [_COLEMA_LOWER_LAYER] = LAYOUT_gamepad_6x4( - KC_SCLN, KC_O, KC_SLSH, _______, \ - KC_Y, KC_I, KC_DOT, _______, \ - KC_U, KC_E, KC_COMM, \ - KC_L, KC_N, KC_M, KC_ENTER, \ - KC_J, KC_H, KC_K, _______, \ - KC_F, KC_G, _______, _______), - - - - /* Keymap _DVORAK_LAYER: Alternate default layer - * ,-----------------------. - * | Y | I | X | Alt | - * |-----|-----|-----|-----| - * | P | U | K | LOW | - * |-----|-----|-----|-----| - * | . | E | J | | - * |-----|-----|-----| Spc | - * | , | O | Q | | - * |-----|-----|-----|-----| - * | ' | A | ; | RAI | - * |-----|-----|-----|-----| - * | Esc | Tab | Sft | Ctl | - * `-----------------------' - * - * And it's LOWER layer - * ,-----------------------. - * | L | S | Z | Alt | - * |-----|-----|-----|-----| - * | R | N | V | LOW | - * |-----|-----|-----|-----| - * | C | T | W | | - * |-----|-----|-----| Ent | - * | G | H | M | | - * |-----|-----|-----|-----| - * | F | D | B | RAI | - * |-----|-----|-----|-----| - * | Esc | Tab | Sft | Ctl | - * `-----------------------' - */ - [_DVORAK_LAYER] = LAYOUT_gamepad_6x4( - KC_Y, KC_I, KC_X, KC_LALT, \ - KC_P, KC_U, KC_K, MO(_DVORAK_LOWER_LAYER),\ - KC_DOT, KC_E, KC_J, \ - KC_COMM, KC_O, KC_A, KC_SPACE, \ - KC_QUOT, KC_A, KC_SCLN, MO(_RAISE_LAYER),\ - KC_GESC, KC_TAB, KC_LSFT, KC_LCTRL), - [_DVORAK_LOWER_LAYER] = LAYOUT_gamepad_6x4( - KC_L, KC_S, KC_Z, KC_LALT, \ - KC_R, KC_N, KC_V, _______, \ - KC_C, KC_T, KC_W, \ - KC_G, KC_H, KC_M, KC_ENTER,\ - KC_F, KC_D, KC_B, _______, \ - _______, _______, _______, _______), - - - - /* Keymap _RAISE_LAYER: Additional layer to access more - * ,-----------------------. - * | 5 | 0 | del | Alt | - * |-----|-----|-----|-----| - * | 4 | 9 | -> | LOW | - * |-----|-----|-----|-----| - * | 3 | 8 | <- | | - * |-----|-----|-----| Spc | - * | 2 | 7 | -> | | - * |-----|-----|-----|-----| - * | 1 | 6 | <- | RAI | - * |-----|-----|-----|-----| - * | Esc | Tab | Sft | Ctl | - * `-----------------------' - */ - [_RAISE_LAYER] = LAYOUT_gamepad_6x4( - KC_5, KC_0, KC_BSPC, _______, \ - KC_4, KC_9, KC_RIGHT, _______, \ - KC_3, KC_8, KC_UP, \ - KC_2, KC_7, KC_DOWN, _______, \ - KC_1, KC_6, KC_LEFT, _______, \ - _______, _______, _______, _______), - - - - /* Keymap _ALTER_LAYER: Function layer used to control the Leds - * and use media buttons - * ,----------------------------------------. - * | Val Dec | Bl Toggle | Qwertz | Super | - * |---------|------------|---------|-------| - * | Val Inc | Bl Off | Qwerty | | - * |---------|------------|---------|-------| - * | Sat Dec | Bl On | Colemak | | - * |---------|------------|---------| | - * | Sat Inc | RGB Toggle | Dvorak | | - * |---------|------------|---------|-------| - * | Hue Dec | RGB Next | Vol Dwn | | - * |---------|------------|---------|-------| - * | Hue Inc | RGB Prev | Vol Up | Reset | - * `----------------------------------------' - */ - [_ALTER_LAYER] = LAYOUT_gamepad_6x4( - RGB_VAD, BL_TOGG, QWERTZ, KC_LGUI, \ - RGB_VAI, BL_OFF, QWERTY, _______, \ - RGB_SAD, BL_ON, COLEMAK, \ - RGB_SAI, RGB_TOG, DVORAK, _______, \ - RGB_HUD, RGB_MOD, KC_VOLD, _______, \ - RGB_HUI, RGB_RMOD, KC_VOLU, RESET), -}; - -// Makes sure to update the good tri-layer if a layer changes -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(default_layer_state)) { - case _QWERTY_LAYER: - state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER); - break; - case _QWERTZ_LAYER: - state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER); - break; - case _COLEMA_LAYER: - state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER); - break; - case _DVORAK_LAYER: - state = update_tri_layer_state(state, _RAISE_LAYER, _DVORAK_LOWER_LAYER, _ALTER_LAYER); - break; - } - return state; -} - -// Makes the tri-layer -uint32_t default_layer_state_set_kb(uint32_t state) { - switch (biton32(state)) { - case _QWERTY_LAYER: - state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER); - state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER); - state = update_tri_layer_state(state, _RAISE_LAYER, _DVORAK_LOWER_LAYER, _ALTER_LAYER); - layer_move(_QWERTY_LAYER); - break; - case _QWERTZ_LAYER: - state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER); - state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER); - state = update_tri_layer_state(state, _RAISE_LAYER, _DVORAK_LOWER_LAYER, _ALTER_LAYER); - layer_move(_QWERTZ_LAYER); - break; - case _COLEMA_LAYER: - state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER); - state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER); - state = update_tri_layer_state(state, _RAISE_LAYER, _DVORAK_LOWER_LAYER, _ALTER_LAYER); - layer_move(_COLEMA_LAYER); - break; - case _DVORAK_LAYER: - state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER); - state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER); - state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER); - layer_move(_DVORAK_LAYER); - break; - } - return state; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case BL_TOGG: - if (record->event.pressed) { - cospad_bl_led_togg(); - } - return false; - case BL_ON: - if (record->event.pressed) { - cospad_bl_led_on(); - } - return false; - case BL_OFF: - if (record->event.pressed) { - cospad_bl_led_off(); - } - return false; - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY_LAYER); - print("switched to QWERTY layout\n"); - } - return false; - break; - case QWERTZ: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTZ_LAYER); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMA_LAYER); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_DVORAK_LAYER); - } - return false; - break; - default: - return true; - } -} diff --git a/keyboards/cospad/readme.md b/keyboards/cospad/readme.md deleted file mode 100644 index 9bb3dfdc0..000000000 --- a/keyboards/cospad/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -# Cospad - -A DIY keypad kit sold by KPRepublic, runs TKG natively. - -* Keyboard Maintainer: QMK Community -* Hardware Supported: Cospad PCB -* Hardware Availability: [KPrepublic on Aliexpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html) - -Supported Layouts: - -![Numpad layouts](https://i.imgur.com/t03lXJ4.png) -![Ortholinear layouts](https://i.imgur.com/mliUcCc.png) - -Make example for this keyboard (after setting up your build environment): - - make cospad:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cospad/rules.mk b/keyboards/cospad/rules.mk deleted file mode 100644 index fd79af01f..000000000 --- a/keyboards/cospad/rules.mk +++ /dev/null @@ -1,32 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 - -LAYOUTS = numpad_6x4 ortho_6x4 diff --git a/keyboards/cozykeys/bloomer/v2/rules.mk b/keyboards/cozykeys/bloomer/v2/rules.mk index d23e95512..5efc225b8 100644 --- a/keyboards/cozykeys/bloomer/v2/rules.mk +++ b/keyboards/cozykeys/bloomer/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cozykeys/bloomer/v3/rules.mk b/keyboards/cozykeys/bloomer/v3/rules.mk index 806a19af3..88ed45787 100644 --- a/keyboards/cozykeys/bloomer/v3/rules.mk +++ b/keyboards/cozykeys/bloomer/v3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cozykeys/speedo/v2/rules.mk b/keyboards/cozykeys/speedo/v2/rules.mk index 53127aafb..9cd5ae0f8 100644 --- a/keyboards/cozykeys/speedo/v2/rules.mk +++ b/keyboards/cozykeys/speedo/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cozykeys/speedo/v3/rules.mk b/keyboards/cozykeys/speedo/v3/rules.mk index 15eb4da91..d9ccdee93 100644 --- a/keyboards/cozykeys/speedo/v3/rules.mk +++ b/keyboards/cozykeys/speedo/v3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/craftwalk/rules.mk b/keyboards/craftwalk/rules.mk index f5b6bc72c..7f15b7d03 100644 --- a/keyboards/craftwalk/rules.mk +++ b/keyboards/craftwalk/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/crawlpad/rules.mk b/keyboards/crawlpad/rules.mk index 1d4019b7a..8fd8b37e7 100755 --- a/keyboards/crawlpad/rules.mk +++ b/keyboards/crawlpad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/crazy_keyboard_68/rules.mk b/keyboards/crazy_keyboard_68/rules.mk index 5a51c94e7..f7a193ca5 100644 --- a/keyboards/crazy_keyboard_68/rules.mk +++ b/keyboards/crazy_keyboard_68/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/crbn/rules.mk b/keyboards/crbn/rules.mk index 9e4750290..3c181d522 100644 --- a/keyboards/crbn/rules.mk +++ b/keyboards/crbn/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/crin/rules.mk b/keyboards/crin/rules.mk index 8f7a0fa27..efc33163f 100644 --- a/keyboards/crin/rules.mk +++ b/keyboards/crin/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/crkbd/keymaps/armand1m/keymap.c b/keyboards/crkbd/keymaps/armand1m/keymap.c index 190cb4cf3..a37862fad 100644 --- a/keyboards/crkbd/keymaps/armand1m/keymap.c +++ b/keyboards/crkbd/keymaps/armand1m/keymap.c @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { @@ -133,4 +133,4 @@ void oled_render_amsterdam_flag(void) { void oled_task_user(void) { oled_render_amsterdam_flag(); } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/armand1m/rules.mk b/keyboards/crkbd/keymaps/armand1m/rules.mk index 9444b88d5..d34d066de 100644 --- a/keyboards/crkbd/keymaps/armand1m/rules.mk +++ b/keyboards/crkbd/keymaps/armand1m/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/curry/rules.mk b/keyboards/crkbd/keymaps/curry/rules.mk index a75335782..fc0e7e192 100644 --- a/keyboards/crkbd/keymaps/curry/rules.mk +++ b/keyboards/crkbd/keymaps/curry/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no COMMAND_ENABLE = no @@ -10,7 +10,7 @@ COMMAND_ENABLE = no RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes BOOTLOADER = atmel-dfu SPLIT_TRANSPORT = mirror diff --git a/keyboards/crkbd/keymaps/davidrambo/config.h b/keyboards/crkbd/keymaps/davidrambo/config.h index 25f5f3b22..82057151d 100644 --- a/keyboards/crkbd/keymaps/davidrambo/config.h +++ b/keyboards/crkbd/keymaps/davidrambo/config.h @@ -41,8 +41,8 @@ along with this program. If not, see . #define RGB_MATRIX_TYPING_MEATMAP_DECREASE_DELAY_MS 50 // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects - #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended - #define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 0bc459126..88d40ee40 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand @@ -172,4 +172,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/default/rules.mk b/keyboards/crkbd/keymaps/default/rules.mk index 9444b88d5..d34d066de 100644 --- a/keyboards/crkbd/keymaps/default/rules.mk +++ b/keyboards/crkbd/keymaps/default/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/devdev/config.h b/keyboards/crkbd/keymaps/devdev/config.h index 793c7b020..c858f8f2d 100644 --- a/keyboards/crkbd/keymaps/devdev/config.h +++ b/keyboards/crkbd/keymaps/devdev/config.h @@ -32,7 +32,7 @@ along with this program. If not, see . #define CUSTOM_FONT -#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding +#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding #define TAPPING_FORCE_HOLD #define TAPPING_TERM 200 @@ -43,7 +43,7 @@ along with this program. If not, see . #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM - + //#define RGBLIGHT_ANIMATIONS #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD @@ -55,11 +55,11 @@ along with this program. If not, see . //#define RGBLIGHT_EFFECT_RGB_TEST //#define RGBLIGHT_EFFECT_ALTERNATING //#define RGBLIGHT_EFFECT_TWINKLE - + //#define RGBLED_NUM 54 //#define RGBLED_SPLIT 27 - //#define RGBLED_SPLIT { 27, 27 } // haven't figured out how to use this yet - + //#define RGBLED_SPLIT { 27, 27 } // haven't figured out how to use this yet + #define RGBLED_NUM 27 #define RGBLIGHT_LIMIT_VAL 120 #define RGBLIGHT_HUE_STEP 10 @@ -71,11 +71,11 @@ along with this program. If not, see . # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT diff --git a/keyboards/crkbd/keymaps/devdev/keymap.c b/keyboards/crkbd/keymaps/devdev/keymap.c index 4da3fcaa6..aa4d39a25 100644 --- a/keyboards/crkbd/keymaps/devdev/keymap.c +++ b/keyboards/crkbd/keymaps/devdev/keymap.c @@ -1,18 +1,18 @@ /* Copyright 2020 Dane Evans - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ // CRKBD @@ -20,12 +20,12 @@ char layer_state_str[24]; - - + + enum userspace_layers { _DEFAULTS = 0, _COLEMAK = 0, - _COLEMAKDH, + _COLEMAKDH, _QWERTY, _NUM, _SYM, @@ -33,37 +33,37 @@ char layer_state_str[24]; _NUMPAD, _SWITCH, _MOVE, - + }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - // colemak + + // colemak [_COLEMAK] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. LT(_NUMPAD,KC_TAB), KC_Q, KC_W, KC_F, KC_P, KC_G, LT(_SWITCH,KC_J), KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LSFT, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I,LT(_NUMPAD,KC_O),KC_QUOT, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| KC_LGUI, MO(_NUM), KC_SPC, KC_ENT, MO(_SYM), KC_LALT //`--------------------------' `--------------------------' ), - + // colemak DH [_COLEMAKDH] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. LT(_NUMPAD,KC_TAB), KC_Q, KC_W, KC_F, KC_P, KC_B, LT(_SWITCH,KC_J), KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LSFT, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I,LT(_NUMPAD,KC_O),KC_QUOT, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_LCTL, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LGUI, MO(_NUM), KC_SPC, KC_ENT, MO(_SYM), KC_LALT + KC_LGUI, MO(_NUM), KC_SPC, KC_ENT, MO(_SYM), KC_LALT //`--------------------------' `--------------------------' ), - + // qwerty [_QWERTY] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. @@ -77,9 +77,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`--------------------------' `--------------------------' ), - - - // numbers - L thumb + + + // numbers - L thumb [_NUM] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, @@ -91,8 +91,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_COMMAND), KC_TRNS //`--------------------------' `--------------------------' ), - - // symbols - R thumb + + // symbols - R thumb [_SYM] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, @@ -104,8 +104,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, MO(_COMMAND), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //`--------------------------' `--------------------------' ), - - // commands - both thumbs + + // commands - both thumbs [_COMMAND] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, @@ -114,24 +114,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, DF(2), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS //`--------------------------' `--------------------------' ), - - // numpad + + // numpad [_NUMPAD] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. LT(0,KC_NO), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_CIRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_BSPC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS, KC_P4, KC_P5, KC_P6, KC_EQL, KC_DEL, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PLUS, KC_P1, KC_P2, KC_P3, KC_SLSH, KC_NO, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| OSM(MOD_MEH), KC_NO, KC_TRNS, KC_ENT, KC_P0, KC_PDOT //`--------------------------' `--------------------------' - ), - - // layer switcher + ), + + // layer switcher [_SWITCH] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. TO(0), TO(1), TO(2), TO(3), TO(4), TO(5), KC_NO, TO(7), KC_NO, KC_NO, KC_NO, RESET, @@ -139,62 +139,62 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_BRIU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, EEP_RST, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_SYSTEM_SLEEP, KC_NO, KC_BRID, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO //`--------------------------' `--------------------------' - - ), - - // amovement + + ), + + // amovement [_MOVE] = LAYOUT( //,-----------------------------------------------------. ,-----------------------------------------------------. LT(0,KC_NO), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME, KC_UP, KC_PGUP, KC_NO, KC_NO, KC_NO, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_ENT, KC_RGHT, KC_NO, KC_NO, KC_NO, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| KC_APP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_END, KC_DOWN, KC_PGDN, KC_DEL, KC_NO, KC_NO, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO //`--------------------------' `--------------------------' ) }; -// it appears that these are different to the board numbering. -// when you specify n here, it lightss up n+1 on the board diagram - actually may be an entirely different pattern +// it appears that these are different to the board numbering. +// when you specify n here, it lightss up n+1 on the board diagram - actually may be an entirely different pattern // _QWERTY, -// Light on inner column and underglow +// Light on inner column and underglow const rgblight_segment_t PROGMEM layer_qwerty_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_AZURE} ); // _COLEMAKDH, -// Light on inner column and underglow +// Light on inner column and underglow const rgblight_segment_t PROGMEM layer_colemakdh_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_RED} ); // _NUM, -// Light on inner column and underglow +// Light on inner column and underglow const rgblight_segment_t PROGMEM layer_num_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_TEAL} ); // _SYMBOL, -// Light on inner column and underglow +// Light on inner column and underglow const rgblight_segment_t PROGMEM layer_symbol_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_BLUE} ); // _COMMAND, -// Light on inner column and underglow +// Light on inner column and underglow const rgblight_segment_t PROGMEM layer_command_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_PURPLE} ); //_NUMPAD -//havent worked out how to do each side individually either +//havent worked out how to do each side individually either const rgblight_segment_t PROGMEM layer_numpad_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_ORANGE} ); @@ -206,13 +206,13 @@ const rgblight_segment_t PROGMEM layer_numpad_rh_lights[] = RGBLIGHT_LAYER_SEGME ); // _MOVE, -// Light on inner column and underglow +// Light on inner column and underglow const rgblight_segment_t PROGMEM layer_move_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 10, HSV_PINK} ); // _SWITCHER // light up top row -const rgblight_segment_t PROGMEM layer_switcher_lights[] = RGBLIGHT_LAYER_SEGMENTS( +const rgblight_segment_t PROGMEM layer_switcher_lights[] = RGBLIGHT_LAYER_SEGMENTS( {0, 6, HSV_GREEN}, {9, 2, HSV_GREEN}, {17, 2, HSV_GREEN}, @@ -222,12 +222,12 @@ const rgblight_segment_t PROGMEM layer_switcher_lights[] = RGBLIGHT_LAYER_SEGMEN // Now define the array of layers. Later layers take precedence const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - layer_qwerty_lights, + layer_qwerty_lights, layer_colemakdh_lights, layer_num_lights,// overrides layer 1 layer_symbol_lights, - layer_command_lights, - layer_numpad_lights, + layer_command_lights, + layer_numpad_lights, layer_numpad_rh_lights, layer_move_lights, layer_switcher_lights // Overrides other layers @@ -236,7 +236,7 @@ const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( void keyboard_post_init_user(void) { // Enable the LED layers rgblight_layers = my_rgb_layers; - rgblight_mode(10);// haven't found a way to set this in a more useful way + rgblight_mode(10);// haven't found a way to set this in a more useful way } @@ -244,7 +244,7 @@ void keyboard_post_init_user(void) { layer_state_t layer_state_set_user(layer_state_t state) { rgblight_set_layer_state(0, layer_state_cmp(state, _DEFAULTS) && layer_state_cmp(default_layer_state,_QWERTY)); rgblight_set_layer_state(1, layer_state_cmp(state, _DEFAULTS) && layer_state_cmp(default_layer_state,_QWERTY)); - + rgblight_set_layer_state(2, layer_state_cmp(state, _NUM)); rgblight_set_layer_state(3, layer_state_cmp(state, _SYM)); rgblight_set_layer_state(4, layer_state_cmp(state, _COMMAND)); @@ -266,7 +266,7 @@ bool led_update_user(led_t led_state) { //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand @@ -288,7 +288,7 @@ const char *read_mode_icon(bool swap); void oled_render_layer_state(void) { - char string [24]; + char string [24]; switch (get_highest_layer(default_layer_state|layer_state)) { case _QWERTY: @@ -296,10 +296,10 @@ void oled_render_layer_state(void) { break; case _COLEMAK: oled_write_ln_P(PSTR("Layer: COLEMAK"),false); - break; + break; case _COLEMAKDH: oled_write_ln_P(PSTR("Layer: COLEMAKDH"),false); - break; + break; case _NUM: oled_write_ln_P(PSTR("Layer: Numbers"),false); break; @@ -311,13 +311,13 @@ void oled_render_layer_state(void) { break; case _NUMPAD: oled_write_ln_P(PSTR("Layer: Numpad"),false); - break; + break; case _MOVE: oled_write_ln_P(PSTR("Layer: Movement"),false); break; case _SWITCH: oled_write_ln_P(PSTR("Layer: Layer Switch"),false); - break; + break; default: snprintf(string, sizeof(string), "%ld",layer_state); oled_write_P(PSTR("Layer: Undef-"),false); @@ -407,4 +407,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE \ No newline at end of file +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/devdev/rules.mk b/keyboards/crkbd/keymaps/devdev/rules.mk index 58e90c811..4aaf22fd0 100644 --- a/keyboards/crkbd/keymaps/devdev/rules.mk +++ b/keyboards/crkbd/keymaps/devdev/rules.mk @@ -1,4 +1,5 @@ MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes RGBLIGHT_ENABLE = yes -OLED_DRIVER_ENABLE = yes \ No newline at end of file +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c index 9a48ee259..11690b029 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c +++ b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c @@ -71,11 +71,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_left()) return OLED_ROTATION_180; // flips the display 180 to see it from my side diff --git a/keyboards/crkbd/keymaps/dsanchezseco/rules.mk b/keyboards/crkbd/keymaps/dsanchezseco/rules.mk index 0de806971..161517dd8 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/rules.mk +++ b/keyboards/crkbd/keymaps/dsanchezseco/rules.mk @@ -3,7 +3,7 @@ SRC += ./logo_reader.c # enable OLED displays -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no # enable media keys EXTRAKEY_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/edvorakjp/oled.c b/keyboards/crkbd/keymaps/edvorakjp/oled.c index 2e0fed47e..3a3748c69 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/oled.c +++ b/keyboards/crkbd/keymaps/edvorakjp/oled.c @@ -2,7 +2,7 @@ #include #include "oled.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_host_led_state(void) { oled_write(read_host_led_state(), false); } void render_layer_state(void) { @@ -52,4 +52,4 @@ void oled_task_user(void) { render_logo(); } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/edvorakjp/rules.mk b/keyboards/crkbd/keymaps/edvorakjp/rules.mk index 111f6de27..1291d50e9 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/rules.mk +++ b/keyboards/crkbd/keymaps/edvorakjp/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -16,7 +16,8 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing TAP_DANCE_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/crkbd/keymaps/gotham/config.h b/keyboards/crkbd/keymaps/gotham/config.h index dd58a0fe0..05b04e0aa 100644 --- a/keyboards/crkbd/keymaps/gotham/config.h +++ b/keyboards/crkbd/keymaps/gotham/config.h @@ -39,7 +39,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_KEYPRESSES // reacts to keypresses -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. # define RGB_MATRIX_HUE_STEP 32 # define RGB_MATRIX_SAT_STEP 64 diff --git a/keyboards/crkbd/keymaps/gotham/keymap.c b/keyboards/crkbd/keymaps/gotham/keymap.c index 8b864277c..7cf4b7fd5 100644 --- a/keyboards/crkbd/keymaps/gotham/keymap.c +++ b/keyboards/crkbd/keymaps/gotham/keymap.c @@ -1,7 +1,7 @@ #include QMK_KEYBOARD_H #include "keycodes.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include "oled.c" #endif @@ -78,7 +78,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { #endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE if (record->event.pressed) { oled_timer = timer_read(); add_keylog(keycode); diff --git a/keyboards/crkbd/keymaps/gotham/rules.mk b/keyboards/crkbd/keymaps/gotham/rules.mk index eaf8f89fd..48a2c1d72 100644 --- a/keyboards/crkbd/keymaps/gotham/rules.mk +++ b/keyboards/crkbd/keymaps/gotham/rules.mk @@ -2,5 +2,6 @@ MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes AUDIO_ENABLE = yes RGBLIGHT_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/jarred/rules.mk b/keyboards/crkbd/keymaps/jarred/rules.mk index 5806ce093..c5a73d5bd 100644 --- a/keyboards/crkbd/keymaps/jarred/rules.mk +++ b/keyboards/crkbd/keymaps/jarred/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/crkbd/keymaps/kidbrazil/config.h b/keyboards/crkbd/keymaps/kidbrazil/config.h index be1777e57..752ea862e 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/config.h +++ b/keyboards/crkbd/keymaps/kidbrazil/config.h @@ -56,7 +56,7 @@ along with this program. If not, see . //# define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects - #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended + #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) diff --git a/keyboards/crkbd/keymaps/kidbrazil/keymap.c b/keyboards/crkbd/keymaps/kidbrazil/keymap.c index 952fb669b..7cb08f40d 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/keymap.c +++ b/keyboards/crkbd/keymaps/kidbrazil/keymap.c @@ -73,7 +73,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { default: // Use process_record_keymap to reset timer on all other keypresses to awaken from idle. if (record->event.pressed) { - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE oled_timer = timer_read32(); #endif // Restore LEDs if they are enabled by user @@ -125,7 +125,7 @@ void matrix_scan_user(void) { } } // [OLED Configuration] ------------------------------------------------------// -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE // Init Oled and Rotate.... oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) diff --git a/keyboards/crkbd/keymaps/kidbrazil/rules.mk b/keyboards/crkbd/keymaps/kidbrazil/rules.mk index c58f43c2b..5566a6130 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/rules.mk +++ b/keyboards/crkbd/keymaps/kidbrazil/rules.mk @@ -5,7 +5,8 @@ AUDIO_ENABLE = no # Audio output on port C6 MOUSEKEY_ENABLE = no RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # If you want to change the display of OLED, you need to change here SRC += logo_reader.c \ diff --git a/keyboards/crkbd/keymaps/mcrown/rules.mk b/keyboards/crkbd/keymaps/mcrown/rules.mk index df09acc6c..922e246ba 100644 --- a/keyboards/crkbd/keymaps/mcrown/rules.mk +++ b/keyboards/crkbd/keymaps/mcrown/rules.mk @@ -5,8 +5,9 @@ # MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) -RGB_MATRIX_ENABLE = yes # Enable RGB Matrix. -OLED_DRIVER_ENABLE = yes +RGB_MATRIX_ENABLE = yes # Enable RGB Matrix. +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend diff --git a/keyboards/crkbd/keymaps/ninjonas/rules.mk b/keyboards/crkbd/keymaps/ninjonas/rules.mk index 3c3bf923e..c40a82779 100644 --- a/keyboards/crkbd/keymaps/ninjonas/rules.mk +++ b/keyboards/crkbd/keymaps/ninjonas/rules.mk @@ -1,6 +1,7 @@ RGB_MATRIX_ENABLE = yes MOUSEKEY_ENABLE = no -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/crkbd/keymaps/oled_sample/keymap.c b/keyboards/crkbd/keymaps/oled_sample/keymap.c index b8c3985fb..14b453585 100644 --- a/keyboards/crkbd/keymaps/oled_sample/keymap.c +++ b/keyboards/crkbd/keymaps/oled_sample/keymap.c @@ -74,7 +74,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) { return OLED_ROTATION_270; diff --git a/keyboards/crkbd/keymaps/oled_sample/rules.mk b/keyboards/crkbd/keymaps/oled_sample/rules.mk index fb480bba8..d9db223cf 100644 --- a/keyboards/crkbd/keymaps/oled_sample/rules.mk +++ b/keyboards/crkbd/keymaps/oled_sample/rules.mk @@ -4,4 +4,5 @@ # the appropriate keymap folder that will get included automatically # RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/oo/keymap.c b/keyboards/crkbd/keymaps/oo/keymap.c index 17d5788d6..c0416d972 100644 --- a/keyboards/crkbd/keymaps/oo/keymap.c +++ b/keyboards/crkbd/keymaps/oo/keymap.c @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { @@ -163,4 +163,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/oo/rules.mk b/keyboards/crkbd/keymaps/oo/rules.mk index c58266213..d34d066de 100644 --- a/keyboards/crkbd/keymaps/oo/rules.mk +++ b/keyboards/crkbd/keymaps/oo/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/rjhilgefort/keymap.c b/keyboards/crkbd/keymaps/rjhilgefort/keymap.c index e1e051874..7ca234a0e 100644 --- a/keyboards/crkbd/keymaps/rjhilgefort/keymap.c +++ b/keyboards/crkbd/keymaps/rjhilgefort/keymap.c @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include oled_rotation_t oled_init_user(oled_rotation_t rotation) { @@ -219,4 +219,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/rjhilgefort/rules.mk b/keyboards/crkbd/keymaps/rjhilgefort/rules.mk index a1b6e79e7..c6c258e25 100644 --- a/keyboards/crkbd/keymaps/rjhilgefort/rules.mk +++ b/keyboards/crkbd/keymaps/rjhilgefort/rules.mk @@ -4,4 +4,5 @@ BOOTLOADER = atmel-dfu # https://www.reddit.com/r/olkb/comments/9pyc0u/qmk_media_keys_are_not_working/ EXTRAKEY_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/rpbaptist/config.h b/keyboards/crkbd/keymaps/rpbaptist/config.h index 6bd16725f..3c5222eda 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/config.h +++ b/keyboards/crkbd/keymaps/rpbaptist/config.h @@ -25,7 +25,7 @@ along with this program. If not, see . /* Select hand configuration */ #define EE_HANDS -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # undef SSD1306OLED # define OLED_TIMEOUT 600000 #endif @@ -42,7 +42,7 @@ along with this program. If not, see . #define NO_ACTION_ONESHOT #ifdef RGB_MATRIX_ENABLE -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 # define RGB_MATRIX_HUE_STEP 8 diff --git a/keyboards/crkbd/keymaps/rpbaptist/keymap.c b/keyboards/crkbd/keymaps/rpbaptist/keymap.c index 2dafbd2a7..d632e255d 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/keymap.c +++ b/keyboards/crkbd/keymaps/rpbaptist/keymap.c @@ -180,7 +180,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return state; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) { return OLED_ROTATION_270; diff --git a/keyboards/crkbd/keymaps/rpbaptist/rules.mk b/keyboards/crkbd/keymaps/rpbaptist/rules.mk index 623de8c94..2366f669a 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/rules.mk +++ b/keyboards/crkbd/keymaps/rpbaptist/rules.mk @@ -11,7 +11,7 @@ NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: http MOUSEKEY_ENABLE = no # Mouse keys(+4700) RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality @@ -28,7 +28,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend BOOTLOADER = qmk-dfu -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ifeq ($(strip $(THEME)), godspeed) OPT_DEFS += -DTHEME_GODSPEED diff --git a/keyboards/crkbd/keymaps/rs/oled.c b/keyboards/crkbd/keymaps/rs/oled.c index c94dff9ed..bd8ae7d29 100644 --- a/keyboards/crkbd/keymaps/rs/oled.c +++ b/keyboards/crkbd/keymaps/rs/oled.c @@ -61,7 +61,7 @@ void keylog_set_keymap(uint16_t keycode, keyrecord_t *record) { set_keylog(keycode, record); } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { for (layer_name_idx = 0; layer_name_idx < LAYER_DISPLAY_MAX; ++layer_name_idx) { if (state == 0 && layer_display_name[layer_name_idx].state == default_layer_state) { break; diff --git a/keyboards/crkbd/keymaps/rs/rules.mk b/keyboards/crkbd/keymaps/rs/rules.mk index 8c9897ffb..c754ebdcb 100644 --- a/keyboards/crkbd/keymaps/rs/rules.mk +++ b/keyboards/crkbd/keymaps/rs/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/crkbd/keymaps/snowe/rules.mk b/keyboards/crkbd/keymaps/snowe/rules.mk index fac462a68..ce3b5928f 100644 --- a/keyboards/crkbd/keymaps/snowe/rules.mk +++ b/keyboards/crkbd/keymaps/snowe/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -13,7 +13,8 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID SWAP_HANDS_ENABLE = no # Enable one-hand typing RGBLIGHT_TWINKLE = no -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 RGB_MATRIX_ENABLE = yes OCEAN_DREAM_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/soundmonster/config.h b/keyboards/crkbd/keymaps/soundmonster/config.h index 1e58af3ab..8235b4869 100644 --- a/keyboards/crkbd/keymaps/soundmonster/config.h +++ b/keyboards/crkbd/keymaps/soundmonster/config.h @@ -59,11 +59,11 @@ along with this program. If not, see . # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. # define RGB_MATRIX_HUE_STEP 8 # define RGB_MATRIX_SAT_STEP 8 # define RGB_MATRIX_VAL_STEP 8 diff --git a/keyboards/crkbd/keymaps/soundmonster/keymap.c b/keyboards/crkbd/keymaps/soundmonster/keymap.c index 144586969..67cfa78f9 100644 --- a/keyboards/crkbd/keymaps/soundmonster/keymap.c +++ b/keyboards/crkbd/keymaps/soundmonster/keymap.c @@ -7,7 +7,7 @@ extern keymap_config_t keymap_config; extern rgblight_config_t rgblight_config; #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static uint32_t oled_timer = 0; #endif @@ -102,7 +102,7 @@ void matrix_init_user(void) { #endif } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } void render_space(void) { @@ -319,7 +319,7 @@ void oled_task_user(void) { #endif bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_timer = timer_read32(); #endif // set_timelog(); diff --git a/keyboards/crkbd/keymaps/soundmonster/rules.mk b/keyboards/crkbd/keymaps/soundmonster/rules.mk index a73e6fe02..62971258e 100644 --- a/keyboards/crkbd/keymaps/soundmonster/rules.mk +++ b/keyboards/crkbd/keymaps/soundmonster/rules.mk @@ -2,5 +2,6 @@ RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes MOUSEKEY_ENABLE = no NKRO_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/sulrich/keymap.c b/keyboards/crkbd/keymaps/sulrich/keymap.c index 4e75d5bdd..f1cd60c52 100644 --- a/keyboards/crkbd/keymaps/sulrich/keymap.c +++ b/keyboards/crkbd/keymaps/sulrich/keymap.c @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand @@ -152,5 +152,5 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/sulrich/rules.mk b/keyboards/crkbd/keymaps/sulrich/rules.mk index 5ec4f0587..24d83947a 100644 --- a/keyboards/crkbd/keymaps/sulrich/rules.mk +++ b/keyboards/crkbd/keymaps/sulrich/rules.mk @@ -1,2 +1,3 @@ EXTRAKEY_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/keymaps/thumb_ctrl/rules.mk b/keyboards/crkbd/keymaps/thumb_ctrl/rules.mk index b2014be78..e1d691834 100755 --- a/keyboards/crkbd/keymaps/thumb_ctrl/rules.mk +++ b/keyboards/crkbd/keymaps/thumb_ctrl/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/crkbd/keymaps/vayashiko/keymap.c b/keyboards/crkbd/keymaps/vayashiko/keymap.c index e9befa555..a1a8f7e9f 100644 --- a/keyboards/crkbd/keymaps/vayashiko/keymap.c +++ b/keyboards/crkbd/keymaps/vayashiko/keymap.c @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_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 @@ -179,4 +179,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/via/keymap.c b/keyboards/crkbd/keymaps/via/keymap.c index 4735255ea..cbaeb93f6 100644 --- a/keyboards/crkbd/keymaps/via/keymap.c +++ b/keyboards/crkbd/keymaps/via/keymap.c @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include oled_rotation_t oled_init_user(oled_rotation_t rotation) { @@ -173,4 +173,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/via/rules.mk b/keyboards/crkbd/keymaps/via/rules.mk index 93b2afed4..69841c235 100644 --- a/keyboards/crkbd/keymaps/via/rules.mk +++ b/keyboards/crkbd/keymaps/via/rules.mk @@ -1,5 +1,6 @@ MOUSEKEY_ENABLE = no # Mouse keys RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. VIA_ENABLE = yes # Enable VIA -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes diff --git a/keyboards/crkbd/keymaps/vxid/rules.mk b/keyboards/crkbd/keymaps/vxid/rules.mk index 8cc80475e..cb104fb34 100644 --- a/keyboards/crkbd/keymaps/vxid/rules.mk +++ b/keyboards/crkbd/keymaps/vxid/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/crkbd/keymaps/xyverz/keymap.c b/keyboards/crkbd/keymaps/xyverz/keymap.c index ff9d258f0..d99d9d6ba 100644 --- a/keyboards/crkbd/keymaps/xyverz/keymap.c +++ b/keyboards/crkbd/keymaps/xyverz/keymap.c @@ -100,7 +100,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand @@ -202,4 +202,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/xyverz/rules.mk b/keyboards/crkbd/keymaps/xyverz/rules.mk index 1d320c0f3..d34d066de 100644 --- a/keyboards/crkbd/keymaps/xyverz/rules.mk +++ b/keyboards/crkbd/keymaps/xyverz/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes \ No newline at end of file +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/crkbd/readme.md b/keyboards/crkbd/readme.md index 72d44fbbd..f3bf152d2 100644 --- a/keyboards/crkbd/readme.md +++ b/keyboards/crkbd/readme.md @@ -44,7 +44,7 @@ And in your `config.h` file, add the following: # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) diff --git a/keyboards/crkbd/rules.mk b/keyboards/crkbd/rules.mk index 3adf9adb9..7e25a39d3 100644 --- a/keyboards/crkbd/rules.mk +++ b/keyboards/crkbd/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cu24/config.h b/keyboards/cu24/config.h index b6443ab99..7d1bae604 100644 --- a/keyboards/cu24/config.h +++ b/keyboards/cu24/config.h @@ -160,24 +160,4 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/cu24/rules.mk b/keyboards/cu24/rules.mk index 36641e4c3..744d85429 100644 --- a/keyboards/cu24/rules.mk +++ b/keyboards/cu24/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/cu75/keymaps/default/rules.mk b/keyboards/cu75/keymaps/default/rules.mk index 5eb2a0e80..4fdcf66b3 100644 --- a/keyboards/cu75/keymaps/default/rules.mk +++ b/keyboards/cu75/keymaps/default/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cu75/keymaps/iso/rules.mk b/keyboards/cu75/keymaps/iso/rules.mk index 9407f1103..e38f6665d 100644 --- a/keyboards/cu75/keymaps/iso/rules.mk +++ b/keyboards/cu75/keymaps/iso/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/cu80/rules.mk b/keyboards/cu80/rules.mk index 7c27fe7f9..3ea5d6bf8 100644 --- a/keyboards/cu80/rules.mk +++ b/keyboards/cu80/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/custommk/genesis/rules.mk b/keyboards/custommk/genesis/rules.mk index 17f46c043..43a13f1aa 100644 --- a/keyboards/custommk/genesis/rules.mk +++ b/keyboards/custommk/genesis/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cutie_club/borsdorf/rules.mk b/keyboards/cutie_club/borsdorf/rules.mk index 6d815e4ff..072ef384f 100644 --- a/keyboards/cutie_club/borsdorf/rules.mk +++ b/keyboards/cutie_club/borsdorf/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cutie_club/giant_macro_pad/rules.mk b/keyboards/cutie_club/giant_macro_pad/rules.mk index 6d815e4ff..072ef384f 100755 --- a/keyboards/cutie_club/giant_macro_pad/rules.mk +++ b/keyboards/cutie_club/giant_macro_pad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cutie_club/wraith/config.h b/keyboards/cutie_club/wraith/config.h index 1f3e172d0..ffac21743 100644 --- a/keyboards/cutie_club/wraith/config.h +++ b/keyboards/cutie_club/wraith/config.h @@ -190,26 +190,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/cutie_club/wraith/rules.mk b/keyboards/cutie_club/wraith/rules.mk index a42fd4257..f226d5274 100644 --- a/keyboards/cutie_club/wraith/rules.mk +++ b/keyboards/cutie_club/wraith/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/cx60/rules.mk b/keyboards/cx60/rules.mk index 5a286ce0f..b91f40ae3 100644 --- a/keyboards/cx60/rules.mk +++ b/keyboards/cx60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cybergear/macro25/rules.mk b/keyboards/cybergear/macro25/rules.mk index e4ffb10d0..f0e9a7a83 100644 --- a/keyboards/cybergear/macro25/rules.mk +++ b/keyboards/cybergear/macro25/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/daisy/config.h b/keyboards/daisy/config.h deleted file mode 100644 index ea56f948e..000000000 --- a/keyboards/daisy/config.h +++ /dev/null @@ -1,222 +0,0 @@ -/* -Copyright 2020 - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License 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 0x4B50 -#define PRODUCT_ID 0xD7DC -#define DEVICE_VER 0x0501 -#define MANUFACTURER KTEC -#define PRODUCT Daisy - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 11 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { D2, D3, D5, B7 } -#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6 } -#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 LED_CAPS_LOCK_PIN C6 -#define LED_PIN_ON_STATE 0 - -#define BACKLIGHT_PIN D0 -// #define BACKLIGHT_BREATHING -#define BACKLIGHT_LEVELS 6 - -#define RGB_DI_PIN C7 -#ifdef RGB_DI_PIN -# define RGBLED_NUM 8 -# define RGBLIGHT_HUE_STEP 12 -# define RGBLIGHT_SAT_STEP 25 -# define RGBLIGHT_VAL_STEP 12 -// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -// /*== all animations enable ==*/ -# define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ -// #define RGBLIGHT_EFFECT_BREATHING -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL -// #define RGBLIGHT_EFFECT_SNAKE -// #define RGBLIGHT_EFFECT_KNIGHT -// #define RGBLIGHT_EFFECT_CHRISTMAS -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -// /*== customize breathing effect ==*/ -// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ -// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 -// /*==== use exp() and sin() ====*/ -// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 -// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 -#endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -/* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP H -//#define MAGIC_KEY_HELP_ALT SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER0_ALT GRAVE -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER B -//#define MAGIC_KEY_BOOTLOADER_ALT ESC -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_EEPROM_CLEAR BSPACE -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -/* disable these deprecated features by default */ -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - -/* Bootmagic Lite key configuration */ -// #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/daisy/readme.md b/keyboards/daisy/readme.md deleted file mode 100644 index a8a93bf79..000000000 --- a/keyboards/daisy/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# Daisy - -![Daisy PCB](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB1Pj1UggMPMeJjy1Xcq6xpppXa7_1024x1024.jpg) - -A 40% keyboard kit sold by KPrepublic. - -* Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) -* Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2 -* Hardware Availability: [KPrepublic](https://kprepublic.com/products/daisy-40-custom-keyboard-pcb) - -Make example for this keyboard (after setting up your build environment): - - make daisy:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/daisy/rules.mk b/keyboards/daisy/rules.mk deleted file mode 100644 index 7d2d6d405..000000000 --- a/keyboards/daisy/rules.mk +++ /dev/null @@ -1,30 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/daji/seis_cinco/rules.mk b/keyboards/daji/seis_cinco/rules.mk index f2f3619b5..46a164767 100644 --- a/keyboards/daji/seis_cinco/rules.mk +++ b/keyboards/daji/seis_cinco/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/db/db63/rules.mk b/keyboards/db/db63/rules.mk index 3d51be113..b5853beab 100644 --- a/keyboards/db/db63/rules.mk +++ b/keyboards/db/db63/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/dc01/arrow/rules.mk b/keyboards/dc01/arrow/rules.mk index 17de05bc7..9565f5c72 100644 --- a/keyboards/dc01/arrow/rules.mk +++ b/keyboards/dc01/arrow/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/dc01/left/config.h b/keyboards/dc01/left/config.h index 57614e84a..bc934e4a3 100644 --- a/keyboards/dc01/left/config.h +++ b/keyboards/dc01/left/config.h @@ -42,7 +42,7 @@ along with this program. If not, see . * */ #define MATRIX_ROW_PINS { B6, B5, B4, D7, D6 } -#define MATRIX_COL_PINS { F4, F1, F0, F7, F6, F5 } +#define MATRIX_COL_PINS { F4, F1, F0, F7, F6, F5, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } #define UNUSED_PINS #define F_SCL 350000UL @@ -122,23 +122,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/dc01/left/matrix.c b/keyboards/dc01/left/matrix.c index c3b3b39a4..bf5aba849 100644 --- a/keyboards/dc01/left/matrix.c +++ b/keyboards/dc01/left/matrix.c @@ -26,6 +26,7 @@ along with this program. If not, see . #include "wait.h" #include "print.h" #include "debug.h" +#include "gpio.h" #include "util.h" #include "matrix.h" #include "timer.h" @@ -71,7 +72,7 @@ along with this program. If not, see . #if (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS_SCANNED] = MATRIX_COL_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; #endif /* matrix state(1:on, 0:off) */ @@ -451,4 +452,4 @@ error: i2c_stop(); return (status < 0) ? status : I2C_STATUS_SUCCESS; -} \ No newline at end of file +} diff --git a/keyboards/dc01/left/rules.mk b/keyboards/dc01/left/rules.mk index cd440a494..0c5fabb1c 100644 --- a/keyboards/dc01/left/rules.mk +++ b/keyboards/dc01/left/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/dc01/numpad/rules.mk b/keyboards/dc01/numpad/rules.mk index b60a646e1..a693b0bdd 100644 --- a/keyboards/dc01/numpad/rules.mk +++ b/keyboards/dc01/numpad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/dc01/right/rules.mk b/keyboards/dc01/right/rules.mk index 17de05bc7..9565f5c72 100644 --- a/keyboards/dc01/right/rules.mk +++ b/keyboards/dc01/right/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/dekunukem/duckypad/rules.mk b/keyboards/dekunukem/duckypad/rules.mk index 1a7031eff..ad34fd0d6 100644 --- a/keyboards/dekunukem/duckypad/rules.mk +++ b/keyboards/dekunukem/duckypad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,4 +25,5 @@ WS2812_DRIVER = bitbang RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/delikeeb/flatbread60/rules.mk b/keyboards/delikeeb/flatbread60/rules.mk index 4012c6ac3..5fdb14f40 100644 --- a/keyboards/delikeeb/flatbread60/rules.mk +++ b/keyboards/delikeeb/flatbread60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/delikeeb/vaguettelite/rules.mk b/keyboards/delikeeb/vaguettelite/rules.mk index 5fff90dec..2863e7f53 100644 --- a/keyboards/delikeeb/vaguettelite/rules.mk +++ b/keyboards/delikeeb/vaguettelite/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/delikeeb/vanana/rules.mk b/keyboards/delikeeb/vanana/rules.mk index f4aa79909..9926ad395 100644 --- a/keyboards/delikeeb/vanana/rules.mk +++ b/keyboards/delikeeb/vanana/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/delikeeb/vaneela/rules.mk b/keyboards/delikeeb/vaneela/rules.mk index fd76a5247..7f0fa90fd 100644 --- a/keyboards/delikeeb/vaneela/rules.mk +++ b/keyboards/delikeeb/vaneela/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/delikeeb/vaneelaex/rules.mk b/keyboards/delikeeb/vaneelaex/rules.mk index fd76a5247..7f0fa90fd 100644 --- a/keyboards/delikeeb/vaneelaex/rules.mk +++ b/keyboards/delikeeb/vaneelaex/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/delikeeb/waaffle/rev3/rules.mk b/keyboards/delikeeb/waaffle/rev3/rules.mk index 775a28193..7d64ba44c 100644 --- a/keyboards/delikeeb/waaffle/rev3/rules.mk +++ b/keyboards/delikeeb/waaffle/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/delilah/rules.mk b/keyboards/delilah/rules.mk index 41a0abee9..59c60ebbe 100644 --- a/keyboards/delilah/rules.mk +++ b/keyboards/delilah/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/deltasplit75/rules.mk b/keyboards/deltasplit75/rules.mk index 5df20f03f..34079ee3e 100644 --- a/keyboards/deltasplit75/rules.mk +++ b/keyboards/deltasplit75/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/dichotomy/rules.mk b/keyboards/dichotomy/rules.mk index a9a01d867..fe5ed813e 100755 --- a/keyboards/dichotomy/rules.mk +++ b/keyboards/dichotomy/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite #MOUSEKEY_ENABLE = yes # Mouse keys POINTING_DEVICE_ENABLE = yes # Generic Pointer, not as big as mouse keys hopefully. EXTRAKEY_ENABLE = yes # Audio control and System control @@ -25,7 +25,7 @@ CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/dinofizz/fnrow/v1/rules.mk b/keyboards/dinofizz/fnrow/v1/rules.mk index 3ee041a7f..dd61b6690 100644 --- a/keyboards/dinofizz/fnrow/v1/rules.mk +++ b/keyboards/dinofizz/fnrow/v1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/diverge3/config.h b/keyboards/diverge3/config.h index 7357b146e..5df77b42c 100644 --- a/keyboards/diverge3/config.h +++ b/keyboards/diverge3/config.h @@ -160,23 +160,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/diverge3/rules.mk b/keyboards/diverge3/rules.mk index 0b5ad749a..1e5a388fe 100644 --- a/keyboards/diverge3/rules.mk +++ b/keyboards/diverge3/rules.mk @@ -14,14 +14,13 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/divergetm2/keymaps/xtonhasvim/keymap.c b/keyboards/divergetm2/keymaps/xtonhasvim/keymap.c index 9d5135baa..5f478c1df 100644 --- a/keyboards/divergetm2/keymaps/xtonhasvim/keymap.c +++ b/keyboards/divergetm2/keymaps/xtonhasvim/keymap.c @@ -150,6 +150,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); } diff --git a/keyboards/divergetm2/rules.mk b/keyboards/divergetm2/rules.mk index 25f872bd0..4f5f40145 100644 --- a/keyboards/divergetm2/rules.mk +++ b/keyboards/divergetm2/rules.mk @@ -14,14 +14,13 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/dk60/dk60.c b/keyboards/dk60/dk60.c index 6d72ff6bd..7d9f79386 100644 --- a/keyboards/dk60/dk60.c +++ b/keyboards/dk60/dk60.c @@ -34,7 +34,6 @@ void dk60_blink_all_leds(void) { } void matrix_init_kb(void) { - led_init_ports(); dk60_blink_all_leds(); matrix_init_user(); diff --git a/keyboards/dk60/rules.mk b/keyboards/dk60/rules.mk index bd7843a9b..10c46d87e 100644 --- a/keyboards/dk60/rules.mk +++ b/keyboards/dk60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dm9records/ergoinu/keymaps/default/rules.mk b/keyboards/dm9records/ergoinu/keymaps/default/rules.mk index b2eff12b0..88fb26e57 100644 --- a/keyboards/dm9records/ergoinu/keymaps/default/rules.mk +++ b/keyboards/dm9records/ergoinu/keymaps/default/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dm9records/ergoinu/keymaps/default_jis/rules.mk b/keyboards/dm9records/ergoinu/keymaps/default_jis/rules.mk index 92dde90ff..b41dcdeb4 100644 --- a/keyboards/dm9records/ergoinu/keymaps/default_jis/rules.mk +++ b/keyboards/dm9records/ergoinu/keymaps/default_jis/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/dm9records/ergoinu/rules.mk b/keyboards/dm9records/ergoinu/rules.mk index 493046ffa..8dcfeaf4f 100644 --- a/keyboards/dm9records/ergoinu/rules.mk +++ b/keyboards/dm9records/ergoinu/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/dm9records/plaid/config.h b/keyboards/dm9records/plaid/config.h index 49bdf6ce2..bbe974e3f 100644 --- a/keyboards/dm9records/plaid/config.h +++ b/keyboards/dm9records/plaid/config.h @@ -191,26 +191,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c b/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c index 20b6eac68..646a942c5 100644 --- a/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c @@ -227,7 +227,7 @@ void keyboard_post_init_user(void) { } } -void eeconfig_init_user(void) { // EEPROM is getting reset! +void eeconfig_init_user(void) { // EEPROM is getting reset! led_config.raw = 0; led_config.red_mode = LEDMODE_ON; led_config.green_mode = LEDMODE_MODS; @@ -235,7 +235,7 @@ void eeconfig_init_user(void) { // EEPROM is getting reset! eeconfig_update_user(led_config.raw); } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -289,7 +289,7 @@ void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrec bool process_record_user(uint16_t keycode, keyrecord_t *record) { /* If the either led mode is keypressed based, call the led updater - then let it fall through the keypress handlers. Just to keep + then let it fall through the keypress handlers. Just to keep the logic out of this procedure */ if (led_config.red_mode >= LEDMODE_MODS && led_config.red_mode <= LEDMODE_ENTER) { led_keypress_update(LED_RED, led_config.red_mode, keycode, record); diff --git a/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c index bdf6c54c3..6dcabb160 100644 --- a/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/thehalfdeafchef/keymap.c @@ -125,7 +125,7 @@ void eeconfig_init_user(void) { // EEPROM is getting reset! } // When LOWER and RAISE are held together, go to the FUNCTION layer -uint32_t layer_state_set_user(uint32_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _FUNCTION); } +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _FUNCTION); } // Runs constantly in the background, in a loop. void matrix_scan_user(void) { diff --git a/keyboards/dm9records/plaid/rules.mk b/keyboards/dm9records/plaid/rules.mk index 756cfc1fe..474e627d6 100644 --- a/keyboards/dm9records/plaid/rules.mk +++ b/keyboards/dm9records/plaid/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/dm9records/tartan/config.h b/keyboards/dm9records/tartan/config.h index 06f346c7e..544ab4a64 100644 --- a/keyboards/dm9records/tartan/config.h +++ b/keyboards/dm9records/tartan/config.h @@ -189,26 +189,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/dm9records/tartan/rules.mk b/keyboards/dm9records/tartan/rules.mk index a4bffe29d..78ac49c53 100644 --- a/keyboards/dm9records/tartan/rules.mk +++ b/keyboards/dm9records/tartan/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c b/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c index 4760011da..181de5621 100644 --- a/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c +++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c @@ -160,7 +160,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { //This will run every return state; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static const char *ANIMATION_NAMES[] = { "unknown", diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/rules.mk b/keyboards/dmqdesign/spin/keymaps/gorbachev/rules.mk index 553adac19..6af3117b9 100644 --- a/keyboards/dmqdesign/spin/keymaps/gorbachev/rules.mk +++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/rules.mk @@ -1,3 +1,4 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 MOUSEKEY_ENABLE = no MIDI_ENABLE = no diff --git a/keyboards/dmqdesign/spin/keymaps/spidey3_pad/rules.mk b/keyboards/dmqdesign/spin/keymaps/spidey3_pad/rules.mk index 6df20e871..00b815f56 100644 --- a/keyboards/dmqdesign/spin/keymaps/spidey3_pad/rules.mk +++ b/keyboards/dmqdesign/spin/keymaps/spidey3_pad/rules.mk @@ -1,6 +1,6 @@ MOUSEKEY_ENABLE = no MIDI_ENABLE = no -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite LTO_ENABLE = yes CONSOLE_ENABLE = yes # Console for debug GRAVE_ESC_ENABLE = no diff --git a/keyboards/dmqdesign/spin/rules.mk b/keyboards/dmqdesign/spin/rules.mk index a299f2da5..d5a4923c5 100644 --- a/keyboards/dmqdesign/spin/rules.mk +++ b/keyboards/dmqdesign/spin/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/do60/rules.mk b/keyboards/do60/rules.mk index 106a1f06d..ea4d60ba2 100644 --- a/keyboards/do60/rules.mk +++ b/keyboards/do60/rules.mk @@ -15,11 +15,10 @@ BOOTLOADER = atmel-dfu AUDIO_ENABLE = no # Audio output on port C6 BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no # Console for debug EXTRAKEY_ENABLE = yes # Audio control and System control -MIDI_ENABLE = no # MIDI controls MOUSEKEY_ENABLE = yes # Mouse keys NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/donutcables/budget96/rules.mk b/keyboards/donutcables/budget96/rules.mk index 3d51be113..b5853beab 100644 --- a/keyboards/donutcables/budget96/rules.mk +++ b/keyboards/donutcables/budget96/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/doodboard/duckboard/keymaps/default/keymap.c b/keyboards/doodboard/duckboard/keymaps/default/keymap.c index 9c849a8a1..e25280ff6 100644 --- a/keyboards/doodboard/duckboard/keymaps/default/keymap.c +++ b/keyboards/doodboard/duckboard/keymaps/default/keymap.c @@ -50,7 +50,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } diff --git a/keyboards/doodboard/duckboard/rules.mk b/keyboards/doodboard/duckboard/rules.mk index 09a60d8a7..9ac16351c 100644 --- a/keyboards/doodboard/duckboard/rules.mk +++ b/keyboards/doodboard/duckboard/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,4 +22,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c b/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c index 40b685d1d..ea603cdb2 100644 --- a/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c +++ b/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c @@ -50,7 +50,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } diff --git a/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c b/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c index 521f374c3..9afc12185 100644 --- a/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c +++ b/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c @@ -57,7 +57,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } diff --git a/keyboards/doodboard/duckboard_r2/rules.mk b/keyboards/doodboard/duckboard_r2/rules.mk index 09a60d8a7..9ac16351c 100644 --- a/keyboards/doodboard/duckboard_r2/rules.mk +++ b/keyboards/doodboard/duckboard_r2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,4 +22,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/doppelganger/config.h b/keyboards/doppelganger/config.h index fa909feea..6e1fa957e 100644 --- a/keyboards/doppelganger/config.h +++ b/keyboards/doppelganger/config.h @@ -200,26 +200,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 2 diff --git a/keyboards/doppelganger/rules.mk b/keyboards/doppelganger/rules.mk index e10f6450b..931849602 100644 --- a/keyboards/doppelganger/rules.mk +++ b/keyboards/doppelganger/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/doro67/multi/keymaps/konstantin/rules.mk b/keyboards/doro67/multi/keymaps/konstantin/rules.mk index 50c3f77dd..9abe61915 100644 --- a/keyboards/doro67/multi/keymaps/konstantin/rules.mk +++ b/keyboards/doro67/multi/keymaps/konstantin/rules.mk @@ -1,5 +1,5 @@ # Generic features -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/doro67/multi/rules.mk b/keyboards/doro67/multi/rules.mk index fa93c56d2..3310064e1 100644 --- a/keyboards/doro67/multi/rules.mk +++ b/keyboards/doro67/multi/rules.mk @@ -13,7 +13,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/doro67/regular/rules.mk b/keyboards/doro67/regular/rules.mk index 037b1d978..4ade2b2b9 100644 --- a/keyboards/doro67/regular/rules.mk +++ b/keyboards/doro67/regular/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/doro67/rgb/rules.mk b/keyboards/doro67/rgb/rules.mk index 7f2494316..bba7114da 100644 --- a/keyboards/doro67/rgb/rules.mk +++ b/keyboards/doro67/rgb/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/dozen0/config.h b/keyboards/dozen0/config.h index 11a8e1966..ab60fe2d1 100644 --- a/keyboards/dozen0/config.h +++ b/keyboards/dozen0/config.h @@ -165,26 +165,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/dozen0/rules.mk b/keyboards/dozen0/rules.mk index 271ccf470..2d03ab394 100644 --- a/keyboards/dozen0/rules.mk +++ b/keyboards/dozen0/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/dp60/dp60.c b/keyboards/dp60/dp60.c index 475084b04..87543b2a1 100644 --- a/keyboards/dp60/dp60.c +++ b/keyboards/dp60/dp60.c @@ -17,7 +17,7 @@ #include "dp60.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/dp60/rules.mk b/keyboards/dp60/rules.mk index c18d9605e..d1164b6ea 100644 --- a/keyboards/dp60/rules.mk +++ b/keyboards/dp60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/draculad/config.h b/keyboards/draculad/config.h index 8a27fdea4..abcdc76b4 100644 --- a/keyboards/draculad/config.h +++ b/keyboards/draculad/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . #define USE_SERIAL #define SOFT_SERIAL_PIN D2 -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #define OLED_DISPLAY_128X64 #define OLED_TIMEOUT 30000 #endif @@ -65,3 +65,5 @@ along with this program. If not, see . #define UNUSED_PINS #define EE_HANDS + +#define LAYER_STATE_8BIT diff --git a/keyboards/draculad/keymaps/default/keymap.c b/keyboards/draculad/keymaps/default/keymap.c index 1d3591ce9..657ef2048 100644 --- a/keyboards/draculad/keymaps/default/keymap.c +++ b/keyboards/draculad/keymaps/default/keymap.c @@ -17,7 +17,6 @@ along with this program. If not, see . #include QMK_KEYBOARD_H - enum layer_number { _BASE, _NUM, @@ -26,9 +25,6 @@ enum layer_number { _ADJ }; - -char wpm_as_str[8]; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, @@ -67,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { @@ -155,14 +151,20 @@ static void render_logo(void) { } static void render_status(void) { - oled_write_P(PSTR("This is\n~~~~~~~~~\nDracu\nLad\n~~~~~~~~~\nv1.0\n~~~~~~~~~\n"), false); - sprintf(wpm_as_str, "WPM %03d", get_current_wpm()); - oled_write(wpm_as_str,false); - led_t led_state = host_keyboard_led_state(); - oled_write_P(PSTR("\nCaps: "), false); - oled_write_P(led_state.caps_lock ? PSTR("on ") : PSTR("off"), false); - oled_write_P(PSTR("\n"),false); - switch (get_highest_layer(layer_state)) { + oled_write_P(PSTR("This is\n~~~~~~~~~\nDracu\nLad\n~~~~~~~~~\nv1.0\n~~~~~~~~~\n"), false); + uint8_t n = get_current_wpm(); + char wpm_counter[4]; + wpm_counter[3] = '\0'; + wpm_counter[2] = '0' + n % 10; + wpm_counter[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; + wpm_counter[0] = n / 10 ? '0' + n / 10 : ' '; + oled_write_P(PSTR("WPM:"), false); + oled_write(wpm_counter, false); + led_t led_state = host_keyboard_led_state(); + oled_write_P(PSTR("\nCaps: "), false); + oled_write_P(led_state.caps_lock ? PSTR("on ") : PSTR("off"), false); + oled_write_P(PSTR("\n"), false); + switch (get_highest_layer(layer_state)) { case _BASE: oled_write_P(PSTR("Base "), false); break; diff --git a/keyboards/draculad/keymaps/pimoroni/keymap.c b/keyboards/draculad/keymaps/pimoroni/keymap.c index 87cbe3cd3..c7b6cd35d 100644 --- a/keyboards/draculad/keymaps/pimoroni/keymap.c +++ b/keyboards/draculad/keymaps/pimoroni/keymap.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H -#include "pimoroni_trackball.h" +#include "drivers/sensors/pimoroni_trackball.h" #include "pointing_device.h" @@ -38,9 +38,6 @@ enum custom_keycodes { BALL_MCL,//middle click }; - -char wpm_as_str[8]; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, @@ -80,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { @@ -168,14 +165,20 @@ static void render_logo(void) { } static void render_status(void) { - oled_write_P(PSTR("This is\n~~~~~~~~~\nDracu\nLad\n~~~~~~~~~\nv1.0\n~~~~~~~~~\n"), false); - sprintf(wpm_as_str, "WPM %03d", get_current_wpm()); - oled_write(wpm_as_str,false); - led_t led_state = host_keyboard_led_state(); - oled_write_P(PSTR("\nCaps: "), false); - oled_write_P(led_state.caps_lock ? PSTR("on ") : PSTR("off"), false); - oled_write_P(PSTR("\n"),false); - switch (get_highest_layer(layer_state)) { + oled_write_P(PSTR("This is\n~~~~~~~~~\nDracu\nLad\n~~~~~~~~~\nv1.0\n~~~~~~~~~\n"), false); + uint8_t n = get_current_wpm(); + char wpm_counter[4]; + wpm_counter[3] = '\0'; + wpm_counter[2] = '0' + n % 10; + wpm_counter[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; + wpm_counter[0] = n / 10 ? '0' + n / 10 : ' '; + oled_write_P(PSTR("WPM:"), false); + oled_write(wpm_counter, false); + led_t led_state = host_keyboard_led_state(); + oled_write_P(PSTR("\nCaps: "), false); + oled_write_P(led_state.caps_lock ? PSTR("on ") : PSTR("off"), false); + oled_write_P(PSTR("\n"), false); + switch (get_highest_layer(layer_state)) { case _BASE: oled_write_P(PSTR("Base "), false); break; diff --git a/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.c b/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.c deleted file mode 100644 index c4f4a0441..000000000 --- a/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.c +++ /dev/null @@ -1,177 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "pimoroni_trackball.h" -#include "i2c_master.h" - -static uint8_t scrolling = 0; -static int16_t x_offset = 0; -static int16_t y_offset = 0; -static int16_t h_offset = 0; -static int16_t v_offset = 0; -static float precisionSpeed = 1; - -static uint16_t i2c_timeout_timer; - -#ifndef I2C_TIMEOUT -# define I2C_TIMEOUT 100 -#endif -#ifndef I2C_WAITCHECK -# define I2C_WAITCHECK 1000 -#endif -#ifndef MOUSE_DEBOUNCE -# define MOUSE_DEBOUNCE 5 -#endif - -void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) { - uint8_t data[] = {0x00, red, green, blue, white}; - i2c_transmit(TRACKBALL_WRITE, data, sizeof(data), I2C_TIMEOUT); -} - -int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) { - int16_t offset = (int16_t)positive - (int16_t)negative; - int16_t magnitude = (int16_t)(scale * offset * offset * precisionSpeed); - return offset < 0 ? -magnitude : magnitude; -} - -void update_member(int8_t* member, int16_t* offset) { - if (*offset > 127) { - *member = 127; - *offset -= 127; - } else if (*offset < -127) { - *member = -127; - *offset += 127; - } else { - *member = *offset; - *offset = 0; - } -} - -__attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* mouse) { - if (pressed) { - mouse->buttons |= MOUSE_BTN1; - } else { - mouse->buttons &= ~MOUSE_BTN1; - } -} - -bool process_record_kb(uint16_t keycode, keyrecord_t* record) { - if (true) { - xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); - } - - - if (!process_record_user(keycode, record)) { return false; } - -/* If Mousekeys is disabled, then use handle the mouse button - * keycodes. This makes things simpler, and allows usage of - * the keycodes in a consistent manner. But only do this if - * Mousekeys is not enable, so it's not handled twice. - */ -#ifndef MOUSEKEY_ENABLE - if (IS_MOUSEKEY_BUTTON(keycode)) { - report_mouse_t currentReport = pointing_device_get_report(); - if (record->event.pressed) { - currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); - } else { - currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); - } - pointing_device_set_report(currentReport); - pointing_device_send(); - } -#endif - - return true; -} - -void trackball_register_button(bool pressed, enum mouse_buttons button) { - report_mouse_t currentReport = pointing_device_get_report(); - if (pressed) { - currentReport.buttons |= button; - } else { - currentReport.buttons &= ~button; - } - pointing_device_set_report(currentReport); -} - -float trackball_get_precision(void) { return precisionSpeed; } -void trackball_set_precision(float precision) { precisionSpeed = precision; } -bool trackball_is_scrolling(void) { return scrolling; } -void trackball_set_scrolling(bool scroll) { scrolling = scroll; } - - -__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x80, 0x00, 0x00, 0x00); } - -void pointing_device_task(void) { - static bool debounce; - static uint16_t debounce_timer; - uint8_t state[5] = {}; - if (timer_elapsed(i2c_timeout_timer) > I2C_WAITCHECK) { - if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) { - if (!state[4] && !debounce) { - if (scrolling) { -#ifdef PIMORONI_TRACKBALL_INVERT_X - h_offset += mouse_offset(state[2], state[3], 1); -#else - h_offset -= mouse_offset(state[2], state[3], 1); -#endif -#ifdef PIMORONI_TRACKBALL_INVERT_Y - v_offset += mouse_offset(state[1], state[0], 1); -#else - v_offset -= mouse_offset(state[1], state[0], 1); -#endif - } else { -#ifdef PIMORONI_TRACKBALL_INVERT_X - x_offset -= mouse_offset(state[2], state[3], 5); -#else - x_offset += mouse_offset(state[2], state[3], 5); -#endif -#ifdef PIMORONI_TRACKBALL_INVERT_Y - y_offset -= mouse_offset(state[1], state[0], 5); -#else - y_offset += mouse_offset(state[1], state[0], 5); -#endif - } - } else { - if (state[4]) { - debounce = true; - debounce_timer = timer_read(); - } - } - } else { - i2c_timeout_timer = timer_read(); - } - } - - if (timer_elapsed(debounce_timer) > MOUSE_DEBOUNCE) debounce = false; - - report_mouse_t mouse = pointing_device_get_report(); - // trackball_check_click(state[4] & (1 << 7), &mouse); - -#ifndef PIMORONI_TRACKBALL_ROTATE - update_member(&mouse.x, &x_offset); - update_member(&mouse.y, &y_offset); - update_member(&mouse.h, &h_offset); - update_member(&mouse.v, &v_offset); -#else - update_member(&mouse.x, &y_offset); - update_member(&mouse.y, &x_offset); - update_member(&mouse.h, &v_offset); - update_member(&mouse.v, &h_offset); -#endif - pointing_device_set_report(mouse); - pointing_device_send(); -} diff --git a/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.h b/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.h deleted file mode 100644 index cfcd5a47a..000000000 --- a/keyboards/draculad/keymaps/pimoroni/pimoroni_trackball.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . - */ - -#pragma once - -#include "quantum.h" -#include "pointing_device.h" - -#ifndef TRACKBALL_ADDRESS -# define TRACKBALL_ADDRESS 0x0A -#endif -#define TRACKBALL_WRITE ((TRACKBALL_ADDRESS << 1) | I2C_WRITE) -#define TRACKBALL_READ ((TRACKBALL_ADDRESS << 1) | I2C_READ) - -void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); -void trackball_check_click(bool pressed, report_mouse_t *mouse); -void trackball_register_button(bool pressed, enum mouse_buttons button); - -float trackball_get_precision(void); -void trackball_set_precision(float precision); -bool trackball_is_scrolling(void); -void trackball_set_scrolling(bool scroll); \ No newline at end of file diff --git a/keyboards/draculad/keymaps/pimoroni/rules.mk b/keyboards/draculad/keymaps/pimoroni/rules.mk index 547a02f26..704aad070 100644 --- a/keyboards/draculad/keymaps/pimoroni/rules.mk +++ b/keyboards/draculad/keymaps/pimoroni/rules.mk @@ -1,6 +1,7 @@ # only uncomment on the side you have your trackball on POINTING_DEVICE_ENABLE = yes -SRC += pimoroni_trackball.c +SRC += drivers/sensors/pimoroni_trackball.c QUANTUM_LIB_SRC += i2c_master.c -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 MOUSEKEY_ENABLE = no diff --git a/keyboards/draculad/rules.mk b/keyboards/draculad/rules.mk index d8596006c..666657cfe 100644 --- a/keyboards/draculad/rules.mk +++ b/keyboards/draculad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,7 +21,8 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output SPLIT_KEYBOARD = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 WPM_ENABLE = yes ENCODER_ENABLE = yes LTO_ENABLE = yes diff --git a/keyboards/draytronics/daisy/rules.mk b/keyboards/draytronics/daisy/rules.mk index f826ee618..d26c9754e 100644 --- a/keyboards/draytronics/daisy/rules.mk +++ b/keyboards/draytronics/daisy/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/draytronics/elise/rules.mk b/keyboards/draytronics/elise/rules.mk index 6a12b67fa..aaaa23482 100644 --- a/keyboards/draytronics/elise/rules.mk +++ b/keyboards/draytronics/elise/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/draytronics/scarlet/rules.mk b/keyboards/draytronics/scarlet/rules.mk index 43f524034..e7f155ff8 100644 --- a/keyboards/draytronics/scarlet/rules.mk +++ b/keyboards/draytronics/scarlet/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dubba175/rules.mk b/keyboards/dubba175/rules.mk index f9c2a3c5e..b51c96496 100644 --- a/keyboards/dubba175/rules.mk +++ b/keyboards/dubba175/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/duck/eagle_viper/v2/rules.mk b/keyboards/duck/eagle_viper/v2/rules.mk index d934e7772..ac00f7600 100644 --- a/keyboards/duck/eagle_viper/v2/rules.mk +++ b/keyboards/duck/eagle_viper/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/duck/jetfire/config.h b/keyboards/duck/jetfire/config.h index 37e81e830..593f064bd 100644 --- a/keyboards/duck/jetfire/config.h +++ b/keyboards/duck/jetfire/config.h @@ -143,23 +143,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/duck/jetfire/rules.mk b/keyboards/duck/jetfire/rules.mk index 1fd9c3e82..8fc989331 100644 --- a/keyboards/duck/jetfire/rules.mk +++ b/keyboards/duck/jetfire/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -26,7 +26,6 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_DRIVER = custom RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/duck/lightsaver/rules.mk b/keyboards/duck/lightsaver/rules.mk index 6c6a77677..db7cf818e 100644 --- a/keyboards/duck/lightsaver/rules.mk +++ b/keyboards/duck/lightsaver/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_DRIVER = custom -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/duck/octagon/v1/rules.mk b/keyboards/duck/octagon/v1/rules.mk index 18b7d73dd..c49527390 100644 --- a/keyboards/duck/octagon/v1/rules.mk +++ b/keyboards/duck/octagon/v1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_DRIVER = custom -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/duck/octagon/v2/rules.mk b/keyboards/duck/octagon/v2/rules.mk index 1fdf9c77e..ee17ab998 100644 --- a/keyboards/duck/octagon/v2/rules.mk +++ b/keyboards/duck/octagon/v2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_DRIVER = custom -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/duck/orion/v3/rules.mk b/keyboards/duck/orion/v3/rules.mk index a120d0c08..1ccf955ec 100644 --- a/keyboards/duck/orion/v3/rules.mk +++ b/keyboards/duck/orion/v3/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_DRIVER = custom -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/duck/tcv3/rules.mk b/keyboards/duck/tcv3/rules.mk index 58de5294c..e342b1fbb 100644 --- a/keyboards/duck/tcv3/rules.mk +++ b/keyboards/duck/tcv3/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/dumbo/keymaps/default/keymap.c b/keyboards/dumbo/keymaps/default/keymap.c index 63b993603..f3ee89521 100644 --- a/keyboards/dumbo/keymaps/default/keymap.c +++ b/keyboards/dumbo/keymaps/default/keymap.c @@ -130,7 +130,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _NN, _MS, _SP); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM qmk_logo[] = { diff --git a/keyboards/dumbo/keymaps/default/rules.mk b/keyboards/dumbo/keymaps/default/rules.mk index 16913b421..a2d6e788f 100644 --- a/keyboards/dumbo/keymaps/default/rules.mk +++ b/keyboards/dumbo/keymaps/default/rules.mk @@ -1,2 +1,3 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays ENCODER_ENABLE = yes # Enables the use of one or more encoders diff --git a/keyboards/dumbo/keymaps/trip-trap/keymap.c b/keyboards/dumbo/keymaps/trip-trap/keymap.c index 03825db03..fc1092ca6 100644 --- a/keyboards/dumbo/keymaps/trip-trap/keymap.c +++ b/keyboards/dumbo/keymaps/trip-trap/keymap.c @@ -207,7 +207,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _NN, _MS, _SP); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE char wpm_str[10]; // static void render_logo(void) { diff --git a/keyboards/dumbo/keymaps/trip-trap/rules.mk b/keyboards/dumbo/keymaps/trip-trap/rules.mk index 1eb566bbe..1913e10c4 100644 --- a/keyboards/dumbo/keymaps/trip-trap/rules.mk +++ b/keyboards/dumbo/keymaps/trip-trap/rules.mk @@ -1,3 +1,4 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays ENCODER_ENABLE = yes # Enables the use of one or more encoders WPM_ENABLE = yes diff --git a/keyboards/dumbo/rules.mk b/keyboards/dumbo/rules.mk index ffc7dc55d..b9bfe22fd 100644 --- a/keyboards/dumbo/rules.mk +++ b/keyboards/dumbo/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dumbpad/v0x/rules.mk b/keyboards/dumbpad/v0x/rules.mk index 309e3d48c..11e22f36e 100644 --- a/keyboards/dumbpad/v0x/rules.mk +++ b/keyboards/dumbpad/v0x/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/dumbpad/v0x_dualencoder/rules.mk b/keyboards/dumbpad/v0x_dualencoder/rules.mk index 309e3d48c..11e22f36e 100644 --- a/keyboards/dumbpad/v0x_dualencoder/rules.mk +++ b/keyboards/dumbpad/v0x_dualencoder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/dumbpad/v0x_right/rules.mk b/keyboards/dumbpad/v0x_right/rules.mk index 309e3d48c..11e22f36e 100644 --- a/keyboards/dumbpad/v0x_right/rules.mk +++ b/keyboards/dumbpad/v0x_right/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/dumbpad/v1x/rules.mk b/keyboards/dumbpad/v1x/rules.mk index 309e3d48c..11e22f36e 100644 --- a/keyboards/dumbpad/v1x/rules.mk +++ b/keyboards/dumbpad/v1x/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/dumbpad/v1x_dualencoder/rules.mk b/keyboards/dumbpad/v1x_dualencoder/rules.mk index 309e3d48c..11e22f36e 100644 --- a/keyboards/dumbpad/v1x_dualencoder/rules.mk +++ b/keyboards/dumbpad/v1x_dualencoder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/dumbpad/v1x_right/rules.mk b/keyboards/dumbpad/v1x_right/rules.mk index 309e3d48c..11e22f36e 100644 --- a/keyboards/dumbpad/v1x_right/rules.mk +++ b/keyboards/dumbpad/v1x_right/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/durgod/dgk6x/config.h b/keyboards/durgod/dgk6x/config.h new file mode 100644 index 000000000..53f824b98 --- /dev/null +++ b/keyboards/durgod/dgk6x/config.h @@ -0,0 +1,93 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0xD60D +#define MANUFACTURER Hoksi Technology + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +// Dynamic EEPROM +// Something sensible or else VIA may crash +// Users may enable more if they wish +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095 + +// Increase VIA layer count +#define DYNAMIC_KEYMAP_LAYER_COUNT 16 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Bootmagic Lite key configuration */ +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* LED indicator pins */ +#define LED_CAPS_LOCK_PIN C4 +#define LED_WIN_LOCK_PIN C5 +#define LED_SCROLL_LOCK_PIN A8 +#define LED_MR_LOCK_PIN LED_SCROLL_LOCK_PIN +#define LED_PIN_ON_STATE 0 + +#ifdef RGB_MATRIX_ENABLE +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 00 <-> GND +// 01 <-> SCL +// 10 <-> SDA +// 11 <-> VCC +// ADDR1 represents A1:A0 of the 7-bit address. +// ADDR2 represents A3:A2 of the 7-bit address. +// The result is: 0b101(ADDR2)(ADDR1) + +#define DRIVER_ADDR_1 0b1010000 +#define DRIVER_ADDR_2 0b1010011 + +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) + +/* I2C Alternate function settings */ +#define I2C1_SCL_PAL_MODE 1 +#define I2C1_SDA_PAL_MODE 1 + +/* Set I2C speed to 400kHz, 300ns Tr, 14ns Tf */ +#define I2C1_TIMINGR_PRESC 0x1U +#define I2C1_TIMINGR_SCLDEL 0x9U +#define I2C1_TIMINGR_SDADEL 0x0U +#define I2C1_TIMINGR_SCLH 0x0cU +#define I2C1_TIMINGR_SCLL 0x22U + +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +# define RGB_MATRIX_KEYPRESSES +# define RGB_MATRIX_LED_PROCESS_LIMIT 4 +# define RGB_MATRIX_LED_FLUSH_LIMIT 26 + +# define DISABLE_RGB_MATRIX_HUE_BREATHING +# define DISABLE_RGB_MATRIX_HUE_PENDULUM +# define DISABLE_RGB_MATRIX_HUE_WAVE + +// This allows VIA to control RGB Matrix settings in the 'Lighting' section. +#define VIA_QMK_RGBLIGHT_ENABLE + +#endif /* RGB_MATRIX_ENABLE */ diff --git a/keyboards/durgod/dgk6x/dgk6x.c b/keyboards/durgod/dgk6x/dgk6x.c new file mode 100644 index 000000000..d7e871327 --- /dev/null +++ b/keyboards/durgod/dgk6x/dgk6x.c @@ -0,0 +1,73 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "dgk6x.h" + +/* Private Functions */ +void off_all_leds(void) { + writePinHigh(LED_CAPS_LOCK_PIN); + writePinHigh(LED_WIN_LOCK_PIN); + writePinHigh(LED_MR_LOCK_PIN); +} + +void on_all_leds(void) { + writePinLow(LED_CAPS_LOCK_PIN); + writePinLow(LED_WIN_LOCK_PIN); + writePinLow(LED_MR_LOCK_PIN); +} + +/* WinLock and MR LEDs are non-standard. Need to override led init */ +void led_init_ports(void) { + setPinOutput(LED_CAPS_LOCK_PIN); + setPinOutput(LED_WIN_LOCK_PIN); + setPinOutput(LED_MR_LOCK_PIN); + off_all_leds(); +} + + +#ifndef WINLOCK_DISABLED +static bool win_key_locked = false; + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_TGUI: + if (record->event.pressed) { + // Toggle GUI lock on key press + win_key_locked = !win_key_locked; + writePin(LED_WIN_LOCK_PIN, !win_key_locked); + } + break; + case KC_LGUI: + if (win_key_locked) { return false; } + break; + } + return process_record_user(keycode, record); +} +#endif /* WINLOCK_DISABLED */ + +#ifdef RGB_MATRIX_ENABLE + +__attribute__ ((weak)) +void rgb_matrix_indicators_user(void) +{ + if (host_keyboard_led_state().caps_lock) + { + rgb_matrix_set_color(CAPS_LED, 0xFF, 0xFF, 0xFF); + } +} +#endif /* RGB_MATRIX_ENABLE */ + + diff --git a/keyboards/durgod/dgk6x/dgk6x.h b/keyboards/durgod/dgk6x/dgk6x.h new file mode 100644 index 000000000..e2c6d19c2 --- /dev/null +++ b/keyboards/durgod/dgk6x/dgk6x.h @@ -0,0 +1,47 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +#ifdef KEYBOARD_durgod_dgk6x_hades +# include "hades.h" +#elif defined KEYBOARD_durgod_dgk6x_venus +# include "venus.h" +#elif defined KEYBOARD_durgod_dgk6x_galaxy +# include "galaxy.h" +#endif + +#ifndef WINLOCK_DISABLED +// Define the TGUI key here so it is available in QMK configurator +enum DGK6X_keycodes { +#ifdef VIA_ENABLE + KC_TGUI = USER00, // Toggle between GUI Lock or Unlock + NEW_SAFE_RANGE = SAFE_RANGE +#else + KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock + NEW_SAFE_RANGE +#endif +}; + +#undef SAFE_RANGE +#define SAFE_RANGE NEW_SAFE_RANGE +#endif /* WINLOCK_DISABLED */ + +/* Function Prototype */ +void off_all_leds(void); +void on_all_leds(void); + diff --git a/keyboards/durgod/dgk6x/galaxy/config.h b/keyboards/durgod/dgk6x/galaxy/config.h new file mode 100644 index 000000000..e8108f7d1 --- /dev/null +++ b/keyboards/durgod/dgk6x/galaxy/config.h @@ -0,0 +1,37 @@ +/* Copyright 2021 Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PRODUCT_ID 0x6A1A +#define DEVICE_VER 0x0001 +#define PRODUCT Galaxy 84 HK gaming x DURGOD (QMK) + +/* key matrix rows */ +#define MATRIX_ROWS 6 +#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4, A5 } + +/* key matrix columns */ +#define MATRIX_COLS 16 +#define MATRIX_COL_PINS { B0, B1, B2, B10, B11, B12, B13, B14, B15, C6, C7, C8, C9, C10, C11, C12 } + +#ifdef RGB_MATRIX_ENABLE +#define DRIVER_1_LED_TOTAL 58 +#define DRIVER_2_LED_TOTAL 26 +#endif diff --git a/keyboards/durgod/dgk6x/galaxy/galaxy.c b/keyboards/durgod/dgk6x/galaxy/galaxy.c new file mode 100644 index 000000000..5f793ed85 --- /dev/null +++ b/keyboards/durgod/dgk6x/galaxy/galaxy.c @@ -0,0 +1,142 @@ +/* Copyright 2021 Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "galaxy.h" + +#ifdef RGB_MATRIX_ENABLE + +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + + {0, C_1, B_1, A_1}, // Esc + {0, C_2, B_2, A_2}, // F1 + {0, C_3, B_3, A_3}, // F2 + {0, C_4, B_4, A_4}, // F3 + {0, C_5, B_5, A_5}, // F4 + {0, C_6, B_6, A_6}, // F5 + {0, C_7, B_7, A_7}, // F6 + {0, C_8, B_8, A_8}, // F7 + {0, C_9, B_9, A_9}, // F8 + {0, C_10, B_10, A_10}, // F9 + {0, C_11, B_11, A_11}, // F10 + {0, C_12, B_12, A_12}, // F11 + {0, C_13, B_13, A_13}, // F12 + {0, C_14, B_14, A_14}, // PrtSc + {0, C_15, B_15, A_15}, // Pause + {0, C_16, B_16, A_16}, // Del + + {0, F_1, E_1, D_1}, // ` + {0, F_2, E_2, D_2}, // 1 + {0, F_3, E_3, D_3}, // 2 + {0, F_4, E_4, D_4}, // 3 + {0, F_5, E_5, D_5}, // 4 + {0, F_6, E_6, D_6}, // 5 + {0, F_7, E_7, D_7}, // 6 + {0, F_8, E_8, D_8}, // 7 + {0, F_9, E_9, D_9}, // 8 + {0, F_10, E_10, D_10}, // 9 + {0, F_11, E_11, D_11}, // 0 + {0, F_12, E_12, D_12}, // - + {0, F_13, E_13, D_13}, // = + {0, F_14, E_14, D_14}, // Bksp + {0, F_15, E_15, D_15}, // Home + + {0, I_1, H_1, G_1}, // Tab + {0, I_2, H_2, G_2}, // Q + {0, I_3, H_3, G_3}, // W + {0, I_4, H_4, G_4}, // E + {0, I_5, H_5, G_5}, // R + {0, I_6, H_6, G_6}, // T + {0, I_7, H_7, G_7}, // Y + {0, I_8, H_8, G_8}, // U + {0, I_9, H_9, G_9}, // I + {0, I_10, H_10, G_10}, // O + {0, I_11, H_11, G_11}, // P + {0, I_12, H_12, G_12}, // [ + {0, I_13, H_13, G_13}, // ] + {0, I_14, H_14, G_14}, // Pipe + {0, I_15, H_15, G_15}, // End + + {0, L_1, K_1, J_1}, // Caps + {0, L_2, K_2, J_2}, // A + {0, L_3, K_3, J_3}, // S + {0, L_4, K_4, J_4}, // D + {0, L_5, K_5, J_5}, // F + {0, L_6, K_6, J_6}, // G + {0, L_7, K_7, J_7}, // H + {0, L_8, K_8, J_8}, // J + {0, L_9, K_9, J_9}, // K + {0, L_10, K_10, J_10}, // L + {0, L_11, K_11, J_11}, // : + {0, L_12, K_12, J_12}, // ' + {0, L_14, K_14, J_14}, // Enter + {0, L_15, K_15, J_15}, // PgUp + + {1, C_1, B_1, A_1}, // LShift + {1, C_3, B_3, A_3}, // Z + {1, C_4, B_4, A_4}, // X + {1, C_5, B_5, A_5}, // C + {1, C_6, B_6, A_6}, // V + {1, C_7, B_7, A_7}, // B + {1, C_8, B_8, A_8}, // N + {1, C_9, B_9, A_9}, // M + {1, C_10, B_10, A_10}, // < + {1, C_11, B_11, A_11}, // > + {1, C_12, B_12, A_12}, // ? + {1, C_13, B_13, A_13}, // RShift + {1, C_14, B_14, A_14}, // Up + {1, C_15, B_15, A_15}, // PgDn + + {1, F_1, E_1, D_1}, // LCtrl + {1, F_2, E_2, D_2}, // LAlt + {1, F_3, E_3, D_3}, // LGUI + {1, F_7, E_7, D_7}, // Space + {1, F_10, E_10, D_10}, // RAlt + {1, F_11, E_11, D_11}, // Fn1 + {1, F_12, E_12, D_12}, // Fn2 + {1, F_13, E_13, D_13}, // Left + {1, F_14, E_14, D_14}, // Down + {1, F_15, E_15, D_15} // Right +}; + +led_config_t g_led_config = {{ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, + { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, NO_LED }, + { 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, NO_LED }, + { 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, NO_LED, 58, 59, NO_LED }, + { 60, NO_LED, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, NO_LED }, + { 74, 75, 76, NO_LED, NO_LED, NO_LED, 77, NO_LED, NO_LED, 78, 79, 80, 81, 82, 83, NO_LED } +}, { + { 0, 0 }, { 16, 0 }, { 32, 0 }, { 48, 0 }, { 64, 0 }, { 80, 0 }, { 96, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, { 224, 0 }, { 240, 0 }, + { 0, 13 }, { 16, 13 }, { 32, 13 }, { 48, 13 }, { 64, 13 }, { 80, 13 }, { 96, 13 }, { 112, 13 }, { 128, 13 }, { 144, 13 }, { 160, 13 }, { 176, 13 }, { 192, 13 }, { 216, 13 }, { 240, 13 }, + { 4, 26 }, { 24, 26 }, { 40, 26 }, { 56, 26 }, { 72, 26 }, { 88, 26 }, { 104, 26 }, { 120, 26 }, { 136, 26 }, { 152, 26 }, { 168, 26 }, { 184, 26 }, { 200, 26 }, { 220, 26 }, { 240, 26 }, + { 6, 38 }, { 28, 38 }, { 44, 38 }, { 60, 38 }, { 76, 38 }, { 92, 38 }, { 108, 38 }, { 124, 38 }, { 140, 38 }, { 156, 38 }, { 172, 38 }, { 188, 38 }, { 214, 38 }, { 240, 38 }, + { 10, 51 }, { 36, 51 }, { 52, 51 }, { 68, 51 }, { 84, 51 }, { 100, 51 }, { 116, 51 }, { 132, 51 }, { 148, 51 }, { 164, 51 }, { 180, 51 }, { 202, 51 }, { 224, 51 }, { 240, 51 }, + { 2, 64 }, { 22, 64 }, { 42, 64 }, { 101, 64 }, { 160, 64 }, { 176, 64 }, { 192, 64 }, { 208, 64 }, { 224, 64 }, { 240, 64 } +}, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, + 1, 1, 1, 4, 1, 1, 1, 4, 4, 4 +}}; +#endif /* RGB_MATRIX_ENABLE */ diff --git a/keyboards/durgod/dgk6x/galaxy/galaxy.h b/keyboards/durgod/dgk6x/galaxy/galaxy.h new file mode 100644 index 000000000..3ba96aaf7 --- /dev/null +++ b/keyboards/durgod/dgk6x/galaxy/galaxy.h @@ -0,0 +1,40 @@ +/* Copyright 2021 Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 CAPS_LED 46 + +#define XXX KC_NO + +// This a shortcut to help you visually see your layout. +#define LAYOUT_75_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, \ + K50, K51, K52, K56, K59, K5A, K5B, K5C, K5D, K5E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, XXX }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, XXX }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, XXX }, \ + { K40, XXX, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, XXX }, \ + { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, K59, K5A, K5B, K5C, K5D, K5E, XXX }, \ +} + diff --git a/keyboards/durgod/dgk6x/galaxy/info.json b/keyboards/durgod/dgk6x/galaxy/info.json new file mode 100644 index 000000000..9d7ebc665 --- /dev/null +++ b/keyboards/durgod/dgk6x/galaxy/info.json @@ -0,0 +1,102 @@ +{ + "keyboard_name": "DURGOD Galaxy", + "url": "https://www.amazon.com/Galaxy-75-Modular-Mechanical-Keyboard/dp/B08PDRD8MP", + "maintainer": "dkjer", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT_75_ansi": { + "layout": [ + { "label": "Esc", "x": 0, "y": 1 }, + { "label": "F1", "x": 1, "y": 1 }, + { "label": "F2", "x": 2, "y": 1 }, + { "label": "F3", "x": 3, "y": 1 }, + { "label": "F4", "x": 4, "y": 1 }, + { "label": "F5", "x": 5, "y": 1 }, + { "label": "F6", "x": 6, "y": 1 }, + { "label": "F7", "x": 7, "y": 1 }, + { "label": "F8", "x": 8, "y": 1 }, + { "label": "F9", "x": 9, "y": 1 }, + { "label": "F10", "x": 10, "y": 1 }, + { "label": "F11", "x": 11, "y": 1 }, + { "label": "F12", "x": 12, "y": 1 }, + { "label": "PrintScreen", "x": 13, "y": 1 }, + { "label": "ScrollLock", "x": 14, "y": 1 }, + { "label": "Delete", "x": 15, "y": 1 }, + + { "label": "~", "x": 0, "y": 1 }, + { "label": "!", "x": 1, "y": 1 }, + { "label": "@", "x": 2, "y": 1 }, + { "label": "#", "x": 3, "y": 1 }, + { "label": "$", "x": 4, "y": 1 }, + { "label": "%", "x": 5, "y": 1 }, + { "label": "^", "x": 6, "y": 1 }, + { "label": "&", "x": 7, "y": 1 }, + { "label": "*", "x": 8, "y": 1 }, + { "label": "(", "x": 9, "y": 1 }, + { "label": ")", "x": 10, "y": 1 }, + { "label": "_", "x": 11, "y": 1 }, + { "label": "+", "x": 12, "y": 1 }, + { "label": "Backspace", "x": 13, "y": 1, "w": 2 }, + { "label": "Home", "x": 15, "y": 1 }, + + { "label": "Tab", "x": 0, "y": 2, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2 }, + { "label": "W", "x": 2.5, "y": 2 }, + { "label": "E", "x": 3.5, "y": 2 }, + { "label": "R", "x": 4.5, "y": 2 }, + { "label": "T", "x": 5.5, "y": 2 }, + { "label": "Y", "x": 6.5, "y": 2 }, + { "label": "U", "x": 7.5, "y": 2 }, + { "label": "I", "x": 8.5, "y": 2 }, + { "label": "O", "x": 9.5, "y": 2 }, + { "label": "P", "x": 10.5, "y": 2 }, + { "label": "{", "x": 11.5, "y": 2 }, + { "label": "}", "x": 12.5, "y": 2 }, + { "label": "|", "x": 13.5, "y": 2, "w": 1.5 }, + { "label": "End", "x": 15, "y": 2 }, + + { "label": "CapsLock", "x": 0, "y": 3, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3 }, + { "label": "S", "x": 2.75, "y": 3 }, + { "label": "D", "x": 3.75, "y": 3 }, + { "label": "F", "x": 4.75, "y": 3 }, + { "label": "G", "x": 5.75, "y": 3 }, + { "label": "H", "x": 6.75, "y": 3 }, + { "label": "J", "x": 7.75, "y": 3 }, + { "label": "K", "x": 8.75, "y": 3 }, + { "label": "L", "x": 9.75, "y": 3 }, + { "label": ":", "x": 10.75, "y": 3 }, + { "label": "\"", "x": 11.75, "y": 3 }, + { "label": "Enter", "x": 12.75, "y": 3, "w": 2.25 }, + { "label": "PgUp", "x": 15, "y": 3 }, + + { "label": "Shift", "x": 0, "y": 4, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 4 }, + { "label": "X", "x": 3.25, "y": 4 }, + { "label": "C", "x": 4.25, "y": 4 }, + { "label": "V", "x": 5.25, "y": 4 }, + { "label": "B", "x": 6.25, "y": 4 }, + { "label": "N", "x": 7.25, "y": 4 }, + { "label": "M", "x": 8.25, "y": 4 }, + { "label": "<", "x": 9.25, "y": 4 }, + { "label": ">", "x": 10.25, "y": 4 }, + { "label": "?", "x": 11.25, "y": 4 }, + { "label": "Shift", "x": 12.25, "y": 4, "w": 1.75 }, + { "label": "Up", "x": 14, "y": 4 }, + { "label": "PgDn", "x": 15, "y": 4 }, + + { "label": "Ctrl", "x": 0, "y": 5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5, "w": 1.25 }, + { "x": 3.75, "y": 5, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5 }, + { "label": "Fn1", "x": 11, "y": 5 }, + { "label": "Fn2", "x": 12, "y": 5 }, + { "label": "Left", "x": 13, "y": 5 }, + { "label": "Down", "x": 14, "y": 5 }, + { "label": "Right", "x": 15, "y": 5 } + ] + } + } +} diff --git a/keyboards/durgod/dgk6x/galaxy/keymaps/default/keymap.json b/keyboards/durgod/dgk6x/galaxy/keymaps/default/keymap.json new file mode 100644 index 000000000..70e31cc5d --- /dev/null +++ b/keyboards/durgod/dgk6x/galaxy/keymaps/default/keymap.json @@ -0,0 +1,42 @@ +{ + "keyboard": "durgod/dgk6x/galaxy", + "keymap": "default", + "layout": "LAYOUT_75_ansi", + "layers": [ + [ + "KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SLCK", "KC_DEL", + "KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_HOME", + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_END", + "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_ENT", "KC_PGUP", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_UP", "KC_PGDN", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "MO(2)", "KC_LEFT", "KC_DOWN", "KC_RIGHT" + ], + [ + "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_RMOD","RGB_MOD", "RGB_TOG", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_VAI", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "RGB_SPD", "RGB_VAD", "RGB_SPI" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_SAI", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_HUD", "RGB_SAD", "RGB_HUI" + ] + ], + "author":"dkjer", + "notes":"", + "version":1 +} diff --git a/keyboards/durgod/dgk6x/galaxy/keymaps/default/readme.md b/keyboards/durgod/dgk6x/galaxy/keymaps/default/readme.md new file mode 100644 index 000000000..72ba9da6e --- /dev/null +++ b/keyboards/durgod/dgk6x/galaxy/keymaps/default/readme.md @@ -0,0 +1,14 @@ +![Durgod Galaxy Layout Image](https://i.imgur.com/KrcXUSK.png) + +# The default keymap for Durgod Galaxy. + +Currently only supports ANSI + +This keymap is intended to closely follow the stock Durgod Galaxy layout. RGB Hue and Saturation can be changed Fn1 + Fn2 + arrow keys. + +## Windows key lock + +You can hold down Fn1 + Windows key to disable the Windows key while in locked mode. +The 'Lock' LED indicates if the Windows key is locked. + +This is similar to the stock Galaxy Windows key lock functionality. diff --git a/keyboards/durgod/dgk6x/galaxy/keymaps/via/keymap.json b/keyboards/durgod/dgk6x/galaxy/keymaps/via/keymap.json new file mode 100644 index 000000000..5e472baad --- /dev/null +++ b/keyboards/durgod/dgk6x/galaxy/keymaps/via/keymap.json @@ -0,0 +1,138 @@ +{ + "keyboard": "durgod/dgk6x/galaxy", + "keymap": "via", + "layout": "LAYOUT_75_ansi", + "layers": [ + [ + "KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SLCK", "KC_DEL", + "KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_HOME", + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_END", + "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_ENT", "KC_PGUP", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_UP", "KC_PGDN", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "MO(2)", "KC_LEFT", "KC_DOWN", "KC_RIGHT" + ], + [ + "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_RMOD","RGB_MOD", "RGB_TOG", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_VAI", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "RGB_SPD", "RGB_VAD", "RGB_SPI" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_SAI", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_HUD", "RGB_SAD", "RGB_HUI" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ] + ], + "author":"dkjer", + "notes":"", + "version":1 +} diff --git a/keyboards/durgod/dgk6x/galaxy/keymaps/via/readme.md b/keyboards/durgod/dgk6x/galaxy/keymaps/via/readme.md new file mode 100644 index 000000000..1a9953a1d --- /dev/null +++ b/keyboards/durgod/dgk6x/galaxy/keymaps/via/readme.md @@ -0,0 +1,14 @@ +![Durgod Galaxy Layout Image](https://i.imgur.com/KrcXUSK.png) + +# The via keymap for Durgod Galaxy. + +Currently only supports ANSI + +This keymap is intended to closely follow the stock Durgod Galaxy layout. RGB Hue and Saturation can be changed Fn1 + Fn2 + arrow keys. + +## Windows key lock + +You can hold down Fn1 + Windows key to disable the Windows key while in locked mode. +The 'Lock' LED indicates if the Windows key is locked. + +This is similar to the stock Galaxy Windows key lock functionality. diff --git a/keyboards/bm68rgb/keymaps/via/rules.mk b/keyboards/durgod/dgk6x/galaxy/keymaps/via/rules.mk similarity index 100% rename from keyboards/bm68rgb/keymaps/via/rules.mk rename to keyboards/durgod/dgk6x/galaxy/keymaps/via/rules.mk diff --git a/keyboards/durgod/dgk6x/galaxy/readme.md b/keyboards/durgod/dgk6x/galaxy/readme.md new file mode 100644 index 000000000..9d1b3840c --- /dev/null +++ b/keyboards/durgod/dgk6x/galaxy/readme.md @@ -0,0 +1,26 @@ +# Galaxy + +This is a standard off-the-shelf Durgod Galaxy 75% ANSI layout keyboard with RGB matrix. + +* Keyboard Maintainer: [dkjer](https://github.com/dkjer) +* Hardware Supported: Durgod Galaxy board with STM32F070RBT6 +* Hardware Availability: https://www.amazon.com/Galaxy-75-Modular-Mechanical-Keyboard/dp/B08PDRD8MP + +## Instructions + +### Build + +Make command example for this keyboard (after setting up your build environment): + + make durgod/galaxy:default + +Flashing example for this keyboard: + + make durgod/galaxy: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). + +### Initial Flash + +Instructions for Flashing from initial Stock Firmware: +* [Initial Flashing](../readme.md#initial-flash) diff --git a/keyboards/durgod/dgk6x/galaxy/rules.mk b/keyboards/durgod/dgk6x/galaxy/rules.mk new file mode 100644 index 000000000..255352f11 --- /dev/null +++ b/keyboards/durgod/dgk6x/galaxy/rules.mk @@ -0,0 +1 @@ +LAYOUTS = 75_ansi diff --git a/keyboards/durgod/dgk6x/hades/config.h b/keyboards/durgod/dgk6x/hades/config.h new file mode 100644 index 000000000..c148ae1b1 --- /dev/null +++ b/keyboards/durgod/dgk6x/hades/config.h @@ -0,0 +1,37 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PRODUCT_ID 0x4AD3 +#define DEVICE_VER 0x0001 +#define PRODUCT DURGOD Hades (QMK) + +/* key matrix rows */ +#define MATRIX_ROWS 5 +#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4 } + +/* key matrix columns */ +#define MATRIX_COLS 15 +#define MATRIX_COL_PINS { B0, B1, B2, B10, B11, B12, B13, B14, B15, C6, C7, C8, C9, C10, C11 } + +#ifdef RGB_MATRIX_ENABLE +#define DRIVER_1_LED_TOTAL 58 +#define DRIVER_2_LED_TOTAL 10 +#endif diff --git a/keyboards/durgod/dgk6x/hades/hades.c b/keyboards/durgod/dgk6x/hades/hades.c new file mode 100644 index 000000000..3e235683f --- /dev/null +++ b/keyboards/durgod/dgk6x/hades/hades.c @@ -0,0 +1,123 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "hades.h" + +#ifdef RGB_MATRIX_ENABLE + + +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + + {0, C_1, B_1, A_1}, // Esc + {0, C_2, B_2, A_2}, // 1 + {0, C_3, B_3, A_3}, // 2 + {0, C_4, B_4, A_4}, // 3 + {0, C_5, B_5, A_5}, // 4 + {0, C_6, B_6, A_6}, // 5 + {0, C_7, B_7, A_7}, // 6 + {0, C_8, B_8, A_8}, // 7 + {0, C_9, B_9, A_9}, // 8 + {0, C_10, B_10, A_10}, // 9 + {0, C_11, B_11, A_11}, // 0 + {0, C_12, B_12, A_12}, // - + {0, C_13, B_13, A_13}, // = + {0, C_14, B_14, A_14}, // Bksp + {0, C_15, B_15, A_15}, // Del + + {0, F_1, E_1, D_1}, // Tab + {0, F_2, E_2, D_2}, // Q + {0, F_3, E_3, D_3}, // W + {0, F_4, E_4, D_4}, // E + {0, F_5, E_5, D_5}, // R + {0, F_6, E_6, D_6}, // T + {0, F_7, E_7, D_7}, // Y + {0, F_8, E_8, D_8}, // U + {0, F_9, E_9, D_9}, // I + {0, F_10, E_10, D_10}, // O + {0, F_11, E_11, D_11}, // P + {0, F_12, E_12, D_12}, // [ + {0, F_13, E_13, D_13}, // ] + {0, F_14, E_14, D_14}, // Pipe + {0, F_15, E_15, D_15}, // Home + + {0, I_1, H_1, G_1}, // Caps + {0, I_2, H_2, G_2}, // A + {0, I_3, H_3, G_3}, // S + {0, I_4, H_4, G_4}, // D + {0, I_5, H_5, G_5}, // F + {0, I_6, H_6, G_6}, // G + {0, I_7, H_7, G_7}, // H + {0, I_8, H_8, G_8}, // J + {0, I_9, H_9, G_9}, // K + {0, I_10, H_10, G_10}, // L + {0, I_11, H_11, G_11}, // : + {0, I_12, H_12, G_12}, // ' + {0, I_14, H_14, G_14}, // Enter + {0, I_15, H_15, G_15}, // PgUp + + {0, L_1, K_1, J_1}, // LShift + {0, L_2, K_2, J_2}, // Z + {0, L_3, K_3, J_3}, // X + {0, L_4, K_4, J_4}, // C + {0, L_5, K_5, J_5}, // V + {0, L_6, K_6, J_6}, // B + {0, L_7, K_7, J_7}, // N + {0, L_8, K_8, J_8}, // M + {0, L_9, K_9, J_9}, // < + {0, L_10, K_10, J_10}, // > + {0, L_11, K_11, J_11}, // ? + {0, L_12, K_12, J_12}, // RShift + {0, L_14, K_14, J_14}, // Up + {0, L_15, K_15, J_15}, // PgOn + + {1, C_1, B_1, A_1}, // LCtrl + {1, C_2, B_2, A_2}, // LAlt + {1, C_3, B_3, A_3}, // Windows + {1, C_6, B_6, A_6}, // Space + {1, C_10, B_10, A_10}, // Fn1/RAlt hades/venus + {1, C_11, B_11, A_11}, // Fn2/Fn1 + {1, C_12, B_12, A_12}, // RCtrl/Fn2 + {1, C_13, B_13, A_13}, // LEFT/RCtrl + {1, C_14, B_14, A_14}, // DOWN + {1, C_15, B_15, A_15} // RIGHT +}; + +led_config_t g_led_config = {{ + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, + { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, + { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 }, + { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, 57 }, + { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 } +}, { + { 0, 0 }, { 16, 0 }, { 32, 0 }, { 48, 0 }, { 64, 0 }, { 80, 0 }, { 96, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 216, 0 }, { 240, 0 }, + { 4, 16 }, { 24, 16 }, { 40, 16 }, { 56, 16 }, { 72, 16 }, { 88, 16 }, { 104, 16 }, { 120, 16 }, { 136, 16 }, { 152, 16 }, { 168, 16 }, { 184, 16 }, { 200, 16 }, { 220, 16 }, { 240, 16 }, + { 6, 32 }, { 28, 32 }, { 44, 32 }, { 60, 32 }, { 76, 32 }, { 92, 32 }, { 108, 32 }, { 124, 32 }, { 140, 32 }, { 156, 32 }, { 172, 32 }, { 188, 32 }, { 214, 32 }, { 240, 32 }, + { 10, 48 }, { 36, 48 }, { 52, 48 }, { 68, 48 }, { 84, 48 }, { 100, 48 }, { 116, 48 }, { 132, 48 }, { 148, 48 }, { 164, 48 }, { 180, 48 }, { 202, 48 }, { 224, 48 }, { 240, 48 }, + { 2, 64 }, { 22, 64 }, { 42, 64 }, { 101, 64 }, { 160, 64 }, { 176, 64 }, { 192, 64 }, { 208, 64 }, { 224, 64 }, { 240, 64 } +}, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, + 1, 1, 1, 4, 1, 1, 1, 4, 4, 4 +}}; +#endif /* RGB_MATRIX_ENABLE */ diff --git a/keyboards/durgod/dgk6x/hades/hades.h b/keyboards/durgod/dgk6x/hades/hades.h new file mode 100644 index 000000000..630f7e92b --- /dev/null +++ b/keyboards/durgod/dgk6x/hades/hades.h @@ -0,0 +1,39 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 CAPS_LED 30 + +#define XXX KC_NO + +// This a shortcut to help you visually see your layout. +#define LAYOUT_65_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, K4C, K4D, K4E }, \ +} + + diff --git a/keyboards/durgod/dgk6x/hades/info.json b/keyboards/durgod/dgk6x/hades/info.json new file mode 100644 index 000000000..1666a1f02 --- /dev/null +++ b/keyboards/durgod/dgk6x/hades/info.json @@ -0,0 +1,85 @@ +{ + "keyboard_name": "DURGOD Hades", + "url": "https://www.amazon.com/gp/product/B08562392T", + "maintainer": "J-Sully", + "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": "Delete", "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": "Home", "x": 15, "y": 1 }, + + { "label": "CapsLock", "x": 0, "y": 2, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 2 }, + { "label": "S", "x": 2.75, "y": 2 }, + { "label": "D", "x": 3.75, "y": 2 }, + { "label": "F", "x": 4.75, "y": 2 }, + { "label": "G", "x": 5.75, "y": 2 }, + { "label": "H", "x": 6.75, "y": 2 }, + { "label": "J", "x": 7.75, "y": 2 }, + { "label": "K", "x": 8.75, "y": 2 }, + { "label": "L", "x": 9.75, "y": 2 }, + { "label": ":", "x": 10.75, "y": 2 }, + { "label": "\"", "x": 11.75, "y": 2 }, + { "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 }, + { "label": "PgUp", "x": 15, "y": 2 }, + + { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 3 }, + { "label": "X", "x": 3.25, "y": 3 }, + { "label": "C", "x": 4.25, "y": 3 }, + { "label": "V", "x": 5.25, "y": 3 }, + { "label": "B", "x": 6.25, "y": 3 }, + { "label": "N", "x": 7.25, "y": 3 }, + { "label": "M", "x": 8.25, "y": 3 }, + { "label": "<", "x": 9.25, "y": 3 }, + { "label": ">", "x": 10.25, "y": 3 }, + { "label": "?", "x": 11.25, "y": 3 }, + { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, + { "label": "Up", "x": 14, "y": 3 }, + { "label": "PgDn", "x": 15, "y": 3 }, + + { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 4, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, + { "x": 3.75, "y": 4, "w": 6.25 }, + { "label": "Fn1", "x": 10, "y": 4 }, + { "label": "Fn2", "x": 11, "y": 4 }, + { "label": "Ctrl", "x": 12, "y": 4 }, + { "label": "Left", "x": 13, "y": 4 }, + { "label": "Down", "x": 14, "y": 4 }, + { "label": "Right", "x": 15, "y": 4 } + ] + } + } +} diff --git a/keyboards/durgod/dgk6x/hades/keymaps/default/keymap.json b/keyboards/durgod/dgk6x/hades/keymaps/default/keymap.json new file mode 100644 index 000000000..4794aa7d9 --- /dev/null +++ b/keyboards/durgod/dgk6x/hades/keymaps/default/keymap.json @@ -0,0 +1,38 @@ +{ + "keyboard": "durgod/dgk6x/hades", + "keymap": "default", + "layout": "LAYOUT_65_ansi", + "layers": [ + [ + "KC_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_DEL", + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_HOME", + "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_ENT", "KC_PGUP", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_UP", "KC_PGDN", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "MO(1)", "MO(2)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RIGHT" + ], + [ + "KC_GRV", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_SLCK", "KC_PAUS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_INS", "KC_END", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_APP", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_MUTE", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_RMOD", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_VAI", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS", "RGB_SPD", "RGB_VAD", "RGB_SPI" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_SAI", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_HUD", "RGB_SAD", "RGB_HUI" + ] + ], + "author":"J-Sully", + "notes":"", + "version":1 +} diff --git a/keyboards/durgod/dgk6x/hades/keymaps/default/readme.md b/keyboards/durgod/dgk6x/hades/keymaps/default/readme.md new file mode 100644 index 000000000..83bc67936 --- /dev/null +++ b/keyboards/durgod/dgk6x/hades/keymaps/default/readme.md @@ -0,0 +1,14 @@ +![Durgod Hades Layout Image](https://i.imgur.com/vsi6sdK.png) + +# The default keymap for Durgod Hades. + +Currently only supports ANSI + +This keymap is intended to closely follow the stock Durgod Hades layout. RGB Hue and Saturation can be changed Fn1 + Fn2 + arrow keys. + +## Windows key lock + +You can hold down Fn1 + Windows key to disable the Windows key while in locked mode. +The 'Lock' LED indicates if the Windows key is locked. + +This is similar to the stock Hades Windows key lock functionality. diff --git a/keyboards/durgod/dgk6x/hades/keymaps/via/keymap.json b/keyboards/durgod/dgk6x/hades/keymaps/via/keymap.json new file mode 100644 index 000000000..f1ed0ecef --- /dev/null +++ b/keyboards/durgod/dgk6x/hades/keymaps/via/keymap.json @@ -0,0 +1,122 @@ +{ + "keyboard": "durgod/dgk6x/hades", + "keymap": "via", + "layout": "LAYOUT_65_ansi", + "layers": [ + [ + "KC_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_DEL", + "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_HOME", + "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_ENT", "KC_PGUP", + "KC_LSFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_UP", "KC_PGDN", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "MO(1)", "MO(2)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RIGHT" + ], + [ + "KC_GRV", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_SLCK", "KC_PAUS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_INS", "KC_END", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_APP", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_MUTE", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_RMOD", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_VAI", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS", "RGB_SPD", "RGB_VAD", "RGB_SPI" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_SAI", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_HUD", "RGB_SAD", "RGB_HUI" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ] + ], + "author":"J-Sully", + "notes":"", + "version":1 +} diff --git a/keyboards/durgod/dgk6x/hades/keymaps/via/readme.md b/keyboards/durgod/dgk6x/hades/keymaps/via/readme.md new file mode 100644 index 000000000..4a1ff85a7 --- /dev/null +++ b/keyboards/durgod/dgk6x/hades/keymaps/via/readme.md @@ -0,0 +1,14 @@ +![Durgod Hades Layout Image](https://i.imgur.com/vsi6sdK.png) + +# The via keymap for Durgod Hades. + +Currently only supports ANSI + +This keymap is intended to closely follow the stock Durgod Hades layout. RGB Hue and Saturation can be changed Fn1 + Fn2 + arrow keys. + +## Windows key lock + +You can hold down Fn1 + Windows key to disable the Windows key while in locked mode. +The 'Lock' LED indicates if the Windows key is locked. + +This is similar to the stock Hades Windows key lock functionality. diff --git a/keyboards/gmmk/pro/keymaps/via/rules.mk b/keyboards/durgod/dgk6x/hades/keymaps/via/rules.mk similarity index 100% rename from keyboards/gmmk/pro/keymaps/via/rules.mk rename to keyboards/durgod/dgk6x/hades/keymaps/via/rules.mk diff --git a/keyboards/durgod/dgk6x/hades/readme.md b/keyboards/durgod/dgk6x/hades/readme.md new file mode 100644 index 000000000..950696186 --- /dev/null +++ b/keyboards/durgod/dgk6x/hades/readme.md @@ -0,0 +1,26 @@ +# Hades + +This is a standard off-the-shelf Durgod Hades 65% ANSI layout keyboard with RGB matrix. + +* Keyboard Maintainer: [J-Sully](https://github.com/J-Sully) and [dkjer](https://github.com/dkjer) +* Hardware Supported: Durgod Hades board with STM32F070RBT6 +* Hardware Availability: https://www.amazon.com/gp/product/B08562392T + +## Instructions + +### Build + +Make command example for this keyboard (after setting up your build environment): + + make durgod/hades:default + +Flashing example for this keyboard: + + make durgod/hades: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). + +### Initial Flash + +Instructions for Flashing from initial Stock Firmware: +* [Initial Flashing](../readme.md#initial-flash) diff --git a/keyboards/durgod/dgk6x/hades/rules.mk b/keyboards/durgod/dgk6x/hades/rules.mk new file mode 100644 index 000000000..41f77628c --- /dev/null +++ b/keyboards/durgod/dgk6x/hades/rules.mk @@ -0,0 +1 @@ +LAYOUTS = 65_ansi diff --git a/keyboards/durgod/dgk6x/halconf.h b/keyboards/durgod/dgk6x/halconf.h new file mode 100644 index 000000000..1772f8e41 --- /dev/null +++ b/keyboards/durgod/dgk6x/halconf.h @@ -0,0 +1,22 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 RGB_MATRIX_ENABLE +#define HAL_USE_I2C TRUE +#endif +#include_next diff --git a/keyboards/durgod/dgk6x/mcuconf.h b/keyboards/durgod/dgk6x/mcuconf.h new file mode 100644 index 000000000..45c06a6f4 --- /dev/null +++ b/keyboards/durgod/dgk6x/mcuconf.h @@ -0,0 +1,28 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_next + +#ifdef RGB_MATRIX_ENABLE +#undef STM32_I2C_USE_DMA +#define STM32_I2C_USE_DMA FALSE + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE +#endif /* RGB_MATRIX_ENABLE */ diff --git a/keyboards/durgod/dgk6x/readme.md b/keyboards/durgod/dgk6x/readme.md new file mode 100644 index 000000000..06ce96569 --- /dev/null +++ b/keyboards/durgod/dgk6x/readme.md @@ -0,0 +1,55 @@ +# DGK6X = Venus, Hades, Galaxy, etc. + +This DGK6X code is shared between the ANSI variants of Venus, Hades and Galaxy keyboards. + +* Keyboard Maintainer: [J-Sully](https://github.com/J-Sully) and [dkjer](https://github.com/dkjer) +* Hardware Supported: Durgod Venus, Hades or Galaxy board with STM32F070RBT6 +* Hardware Availability: [Venus](https://www.amazon.com/dp/B07XFP5MMZ), [Hades](https://www.amazon.com/gp/product/B08562392T) and [Galaxy](https://www.amazon.com/Galaxy-75-Modular-Mechanical-Keyboard/dp/B08PDRD8MP) + +## Instructions + +### Build + +Instructions for building the Venus, Hades and Galaxy firmware can be found here: +* [Venus](venus/readme.md) +* [Hades](hades/readme.md) +* [Galaxy](galaxy/readme.md) + +### Initial Flash + +For first Flashing from initial Stock's Firmware + +1. Back up original Firmware Image: +- Unplug +- Short Boot0 to Vdd (See below) +- Plug In USB +- Make a Flash Image's Backup in case you wanted to restore the Keyboard to Stock's Image: + - Using dfu-util: + + dfu-util --list + dfu-util --alt 0 --dfuse-address 0x08000000 --upload ${OLD_STOCK_BIN} + +2. Flash the QMK Firmware Image. +- Put board into Bootloader mode, using the same method as when backing up the original Firmware (above) +- Here are a few options for performing the initial Flash: + - Using [QMK Toolbox](https://github.com/qmk/qmk_toolbox) + - Using dfu-util: + + dfu-util --alt 0 --dfuse-address 0x08000000 --download ${NEW_QMK_BIN} + +You can short Boot0 to Vdd by shorting R19 to C30 on the sides closest to the processor, as shown: + +* Hades & Venus: +Shorting Boot0 to Vdd on Hades or Venus + +* Galaxy 75 +Shorting Boot0 to Vdd on Galaxy 75 + +### Subsequent Flashing + +For repeating Flashing you can use BootMagic: +- BootMagic Lite has been enabled with Assigned "Esc" key +- Unplug USB Cable +- Holding Esc Button +- Plug in USB Cable, Keyboard should be in ST-Bootloader state + diff --git a/keyboards/durgod/dgk6x/rules.mk b/keyboards/durgod/dgk6x/rules.mk new file mode 100644 index 000000000..97e253012 --- /dev/null +++ b/keyboards/durgod/dgk6x/rules.mk @@ -0,0 +1,31 @@ +# MCU name +# Actually F070, but close enough +MCU = STM32F072 + +BOARD = DURGOD_STM32_F070 + +# Do not put the microcontroller into power saving mode +NO_SUSPEND_POWER_DOWN = yes + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes + +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = IS31FL3733 + +DEFAULT_FOLDER=durgod/dgk6x/hades diff --git a/keyboards/durgod/dgk6x/venus/config.h b/keyboards/durgod/dgk6x/venus/config.h new file mode 100644 index 000000000..3bef1ea7e --- /dev/null +++ b/keyboards/durgod/dgk6x/venus/config.h @@ -0,0 +1,37 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PRODUCT_ID 0x7EC5 +#define DEVICE_VER 0x0001 +#define PRODUCT DURGOD Venus (QMK) + +/* key matrix rows */ +#define MATRIX_ROWS 5 +#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4 } + +/* key matrix columns */ +#define MATRIX_COLS 14 +#define MATRIX_COL_PINS { B0, B1, B2, B10, B11, B12, B13, B14, B15, C6, C7, C8, C9, C10 } + +#ifdef RGB_MATRIX_ENABLE +#define DRIVER_1_LED_TOTAL 53 +#define DRIVER_2_LED_TOTAL 8 +#endif diff --git a/keyboards/durgod/dgk6x/venus/info.json b/keyboards/durgod/dgk6x/venus/info.json new file mode 100644 index 000000000..cd6962359 --- /dev/null +++ b/keyboards/durgod/dgk6x/venus/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "DURGOD Venus", + "url": "https://www.amazon.com/dp/B07XFP5MMZ", + "maintainer": "J-Sully", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_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":"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":"CapsLock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"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":"Gui", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":" ", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Gui", "x":11.25, "y":4, "w":1.25}, + {"label":"Win", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/durgod/dgk6x/venus/keymaps/default/keymap.json b/keyboards/durgod/dgk6x/venus/keymaps/default/keymap.json new file mode 100644 index 000000000..00742818f --- /dev/null +++ b/keyboards/durgod/dgk6x/venus/keymaps/default/keymap.json @@ -0,0 +1,38 @@ +{ + "keyboard": "durgod/venus", + "keymap": "default", + "layout": "LAYOUT_60_ansi", + "layers": [ + [ + "KC_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", + "KC_TAB", "KC_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", "RSFT_T(KC_UP)", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT","LT(1,KC_LEFT)","LT(2,KC_DOWN)","RCTL_T(KC_RIGHT)" + ], + [ + "KC_GRV", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_INS", "KC_HOME", "KC_END", "KC_DEL", + "KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT","KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGUP", "KC_PGDN", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_RMOD", + "KC_TRNS", "KC_TRNS", "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", "RGB_SPD", "RGB_VAD", "RGB_SPI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS" + ], + [ + "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", + "XXXXXXX", "XXXXXXX", "RGB_SAI", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", + "XXXXXXX", "RGB_HUD", "RGB_SAD", "RGB_HUI", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", + "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", + "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "KC_TRNS", "KC_TRNS", "XXXXXXX" + ] + ], + "author":"dkjer", + "notes":"", + "version":1 +} diff --git a/keyboards/durgod/dgk6x/venus/keymaps/default/readme.md b/keyboards/durgod/dgk6x/venus/keymaps/default/readme.md new file mode 100644 index 000000000..da166eb60 --- /dev/null +++ b/keyboards/durgod/dgk6x/venus/keymaps/default/readme.md @@ -0,0 +1,11 @@ +![Durgod Venus Layout Image](https://i.imgur.com/eYjuTLy.png) + +# The default keymap for Durgod Venus. + +Layer 0 : Standard ANSI 60 Keys layout + +Layer 1 : F1-12 and additional navigation keys. + +Layer 2 : Media and RGB matrix control + +Layer 3 : RGB matrix hue and saturation diff --git a/keyboards/durgod/dgk6x/venus/keymaps/via/keymap.json b/keyboards/durgod/dgk6x/venus/keymaps/via/keymap.json new file mode 100644 index 000000000..9d9bcf746 --- /dev/null +++ b/keyboards/durgod/dgk6x/venus/keymaps/via/keymap.json @@ -0,0 +1,122 @@ +{ + "keyboard": "durgod/venus", + "keymap": "via", + "layout": "LAYOUT_60_ansi", + "layers": [ + [ + "KC_GESC", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", + "KC_TAB", "KC_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", "RSFT_T(KC_UP)", + "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT","LT(1,KC_LEFT)","LT(2,KC_DOWN)","RCTL_T(KC_RIGHT)" + ], + [ + "KC_GRV", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_UP", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PSCR", "KC_INS", "KC_HOME", "KC_END", "KC_DEL", + "KC_TRNS", "KC_LEFT", "KC_DOWN", "KC_RIGHT","KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_PGUP", "KC_PGDN", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_RMOD", + "KC_TRNS", "KC_TRNS", "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", "RGB_SPD", "RGB_VAD", "RGB_SPI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "MO(3)", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "RGB_SAI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "RGB_HUD", "RGB_SAD", "RGB_HUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ], + [ + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", + "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" + ] + ], + "author":"dkjer", + "notes":"", + "version":1 +} diff --git a/keyboards/durgod/dgk6x/venus/keymaps/via/readme.md b/keyboards/durgod/dgk6x/venus/keymaps/via/readme.md new file mode 100644 index 000000000..b23f4eccf --- /dev/null +++ b/keyboards/durgod/dgk6x/venus/keymaps/via/readme.md @@ -0,0 +1,12 @@ +![Durgod Venus Layout Image](https://i.imgur.com/eYjuTLy.png) + +# The via keymap for Durgod Venus. + +Layer 0 : Standard ANSI 60 Keys layout + +Layer 1 : F1-12 and additional navigation keys. + +Layer 2 : Media and RGB matrix control + +Layer 3 : RGB matrix hue and saturation + diff --git a/keyboards/jj4x4/keymaps/via/rules.mk b/keyboards/durgod/dgk6x/venus/keymaps/via/rules.mk similarity index 100% rename from keyboards/jj4x4/keymaps/via/rules.mk rename to keyboards/durgod/dgk6x/venus/keymaps/via/rules.mk diff --git a/keyboards/durgod/dgk6x/venus/readme.md b/keyboards/durgod/dgk6x/venus/readme.md new file mode 100644 index 000000000..9e37d4963 --- /dev/null +++ b/keyboards/durgod/dgk6x/venus/readme.md @@ -0,0 +1,26 @@ +# Venus + +This is a standard off-the-shelf Durgod Venus 60% ANSI Layout keyboard with RGB matrix. + +* Keyboard Maintainer: [J-Sully](https://github.com/J-Sully) and [dkjer](https://github.com/dkjer) +* Hardware Supported: Durgod Venus board with STM32F070RBT6 +* Hardware Availability: https://www.amazon.com/dp/B07XFP5MMZ + +## Instructions + +### Build + +Make command example for this keyboard (after setting up your build environment): + + make durgod/venus:default + +Flashing example for this keyboard: + + make durgod/venus: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). + +### Initial Flash + +Instructions for Flashing from initial Stock Firmware: +* [Initial Flashing](../readme.md#initial-flash) diff --git a/keyboards/durgod/dgk6x/venus/rules.mk b/keyboards/durgod/dgk6x/venus/rules.mk new file mode 100644 index 000000000..cdf5ba34a --- /dev/null +++ b/keyboards/durgod/dgk6x/venus/rules.mk @@ -0,0 +1 @@ +LAYOUTS = 60_ansi diff --git a/keyboards/durgod/dgk6x/venus/venus.c b/keyboards/durgod/dgk6x/venus/venus.c new file mode 100644 index 000000000..3398acb19 --- /dev/null +++ b/keyboards/durgod/dgk6x/venus/venus.c @@ -0,0 +1,115 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "venus.h" + +#ifdef RGB_MATRIX_ENABLE + +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + + {0, C_1, B_1, A_1}, // Esc + {0, C_2, B_2, A_2}, // 1 + {0, C_3, B_3, A_3}, // 2 + {0, C_4, B_4, A_4}, // 3 + {0, C_5, B_5, A_5}, // 4 + {0, C_6, B_6, A_6}, // 5 + {0, C_7, B_7, A_7}, // 6 + {0, C_8, B_8, A_8}, // 7 + {0, C_9, B_9, A_9}, // 8 + {0, C_10, B_10, A_10}, // 9 + {0, C_11, B_11, A_11}, // 0 + {0, C_12, B_12, A_12}, // - + {0, C_13, B_13, A_13}, // = + {0, C_14, B_14, A_14}, // Bksp + + {0, F_1, E_1, D_1}, // Tab + {0, F_2, E_2, D_2}, // Q + {0, F_3, E_3, D_3}, // W + {0, F_4, E_4, D_4}, // E + {0, F_5, E_5, D_5}, // R + {0, F_6, E_6, D_6}, // T + {0, F_7, E_7, D_7}, // Y + {0, F_8, E_8, D_8}, // U + {0, F_9, E_9, D_9}, // I + {0, F_10, E_10, D_10}, // O + {0, F_11, E_11, D_11}, // P + {0, F_12, E_12, D_12}, // [ + {0, F_13, E_13, D_13}, // ] + {0, F_14, E_14, D_14}, // Pipe + + {0, I_1, H_1, G_1}, // Caps + {0, I_2, H_2, G_2}, // A + {0, I_3, H_3, G_3}, // S + {0, I_4, H_4, G_4}, // D + {0, I_5, H_5, G_5}, // F + {0, I_6, H_6, G_6}, // G + {0, I_7, H_7, G_7}, // H + {0, I_8, H_8, G_8}, // J + {0, I_9, H_9, G_9}, // K + {0, I_10, H_10, G_10}, // L + {0, I_11, H_11, G_11}, // : + {0, I_12, H_12, G_12}, // ' + {0, I_14, H_14, G_14}, // Enter + + {0, L_1, K_1, J_1}, // LShift + {0, L_2, K_2, J_2}, // Z + {0, L_3, K_3, J_3}, // X + {0, L_4, K_4, J_4}, // C + {0, L_5, K_5, J_5}, // V + {0, L_6, K_6, J_6}, // B + {0, L_7, K_7, J_7}, // N + {0, L_8, K_8, J_8}, // M + {0, L_9, K_9, J_9}, // < + {0, L_10, K_10, J_10}, // > + {0, L_11, K_11, J_11}, // ? + {0, L_12, K_12, J_12}, // RShift + + {1, C_1, B_1, A_1}, // LCtrl + {1, C_2, B_2, A_2}, // LAlt + {1, C_3, B_3, A_3}, // Windows + {1, C_6, B_6, A_6}, // Space + {1, C_10, B_10, A_10}, // Fn1/RAlt hades/venus + {1, C_11, B_11, A_11}, // Fn2/Fn1 + {1, C_12, B_12, A_12}, // RCtrl/Fn2 + {1, C_13, B_13, A_13}, // LEFT/RCtrl +}; + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, + { 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, NO_LED, 40 }, + { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, NO_LED, NO_LED }, + { 53, 54, 55, NO_LED, NO_LED, 56, NO_LED, NO_LED, NO_LED, 57, 58, 59, 60, NO_LED } +}, { + { 0, 0 }, { 16, 0 }, { 32, 0 }, { 48, 0 }, { 64, 0 }, { 80, 0 }, { 96, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 216, 0 }, + { 4, 16 }, { 24, 16 }, { 40, 16 }, { 56, 16 }, { 72, 16 }, { 88, 16 }, { 104, 16 }, { 120, 16 }, { 136, 16 }, { 152, 16 }, { 168, 16 }, { 184, 16 }, { 200, 16 }, { 220, 16 }, + { 6, 32 }, { 28, 32 }, { 44, 32 }, { 60, 32 }, { 76, 32 }, { 92, 32 }, { 108, 32 }, { 124, 32 }, { 140, 32 }, { 156, 32 }, { 172, 32 }, { 188, 32 }, { 214, 32 }, + { 10, 48 }, { 36, 48 }, { 52, 48 }, { 68, 48 }, { 84, 48 }, { 100, 48 }, { 116, 48 }, { 132, 48 }, { 148, 48 }, { 164, 48 }, { 180, 48 }, { 210, 48 }, + { 2, 64 }, { 22, 64 }, { 42, 64 }, { 102, 64 }, { 162, 64 }, { 182, 64 }, { 202, 64 }, { 222, 64 }, +}, { + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 4, 1, 1, 1, 1 +} }; +#endif /* RGB_MATRIX_ENABLE */ diff --git a/keyboards/durgod/dgk6x/venus/venus.h b/keyboards/durgod/dgk6x/venus/venus.h new file mode 100644 index 000000000..6103c531d --- /dev/null +++ b/keyboards/durgod/dgk6x/venus/venus.h @@ -0,0 +1,37 @@ +/* Copyright 2021 Jessica Sullivan and Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 CAPS_LED 28 + +#define XXX KC_NO + +// This a shortcut to help you visually see your layout. +#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, K3B, \ + K40, K41, K42, K45, K49, K4A, K4B, K4C \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, XXX }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, K4B, K4C, XXX }, \ +} diff --git a/keyboards/durgod/galaxy/readme.md b/keyboards/durgod/galaxy/readme.md new file mode 100644 index 000000000..a85bf3f73 --- /dev/null +++ b/keyboards/durgod/galaxy/readme.md @@ -0,0 +1,3 @@ +# Galaxy 75 + +See: [Galaxy 75](../dgk6x/galaxy/readme.md) diff --git a/keyboards/durgod/galaxy/rules.mk b/keyboards/durgod/galaxy/rules.mk new file mode 100644 index 000000000..ff1e1ff20 --- /dev/null +++ b/keyboards/durgod/galaxy/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER=durgod/dgk6x/galaxy diff --git a/keyboards/durgod/hades/readme.md b/keyboards/durgod/hades/readme.md new file mode 100644 index 000000000..c132a99bf --- /dev/null +++ b/keyboards/durgod/hades/readme.md @@ -0,0 +1,3 @@ +# Hades + +See: [Hades](../dgk6x/hades/readme.md) diff --git a/keyboards/durgod/hades/rules.mk b/keyboards/durgod/hades/rules.mk new file mode 100644 index 000000000..b5a326f34 --- /dev/null +++ b/keyboards/durgod/hades/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER=durgod/dgk6x/hades diff --git a/keyboards/durgod/k310/base/readme.md b/keyboards/durgod/k310/base/readme.md new file mode 100644 index 000000000..1f818dacc --- /dev/null +++ b/keyboards/durgod/k310/base/readme.md @@ -0,0 +1,6 @@ +# Taurus K310 + +Base Model - no backlight leds + +See: [K310](../../k3x0/k310/base/readme.md) + diff --git a/keyboards/durgod/k310/base/rules.mk b/keyboards/durgod/k310/base/rules.mk new file mode 100644 index 000000000..ff432cc4a --- /dev/null +++ b/keyboards/durgod/k310/base/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER=durgod/k3x0/k310/base diff --git a/keyboards/durgod/k310/readme.md b/keyboards/durgod/k310/readme.md new file mode 100644 index 000000000..234fcc875 --- /dev/null +++ b/keyboards/durgod/k310/readme.md @@ -0,0 +1,4 @@ +# K310 + +See: [K310](../k3x0/k310/readme.md) + diff --git a/keyboards/durgod/k310/rules.mk b/keyboards/durgod/k310/rules.mk new file mode 100644 index 000000000..e200539b2 --- /dev/null +++ b/keyboards/durgod/k310/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER=durgod/k3x0/k310 diff --git a/keyboards/durgod/k320/base/readme.md b/keyboards/durgod/k320/base/readme.md new file mode 100644 index 000000000..8b74e28e5 --- /dev/null +++ b/keyboards/durgod/k320/base/readme.md @@ -0,0 +1,6 @@ +# Taurus K320 + +Base Model - no backlight leds + +See: [K320](../../k3x0/k320/base/readme.md) + diff --git a/keyboards/durgod/k320/base/rules.mk b/keyboards/durgod/k320/base/rules.mk new file mode 100644 index 000000000..de33470cc --- /dev/null +++ b/keyboards/durgod/k320/base/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER=durgod/k3x0/k320/base diff --git a/keyboards/durgod/k320/config.h b/keyboards/durgod/k320/config.h deleted file mode 100644 index 323a9ccff..000000000 --- a/keyboards/durgod/k320/config.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright 2021 kuenhlee and Don Kjer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 0xD60D -#define PRODUCT_ID 0x3200 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Hoksi Technology -#define PRODUCT DURGOD Taurus K320 (QMK) - -/* key matrix size */ -#define MATRIX_ROWS 7 -#define MATRIX_COLS 16 - -#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4, A5, A6 } -#define MATRIX_COL_PINS { C4, C5, B0, B1, B2, B10, B11, B12, B13, B14, B15, C6, C7, C10, C11, C12 } - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION ROW2COL - -// Dynamic EEPROM -// Something sensible or else VIA may crash -// Users may enable more if they wish -#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095 - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* Bootmagic Lite key configuration */ -#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE -#define BOOTMAGIC_LITE_ROW 0 -#define BOOTMAGIC_LITE_COLUMN 0 - -/* LED indicator pins */ -#define LED_CAPS_LOCK_PIN C9 -#define LED_SCROLL_LOCK_PIN A8 -#define LED_WIN_LOCK_PIN A9 -#define LED_MR_LOCK_PIN A10 -#define LED_PIN_ON_STATE 0 diff --git a/keyboards/durgod/k320/info.json b/keyboards/durgod/k320/info.json deleted file mode 100644 index 6c67c3d45..000000000 --- a/keyboards/durgod/k320/info.json +++ /dev/null @@ -1,300 +0,0 @@ -{ - "keyboard_name": "DURGOD Taurus K320", - "url": "https://www.durgod.com/page9?product_id=47&_l=en", - "maintainer": "dkjer", - "width": 18.25, - "height": 6.5, - "layouts": { - "LAYOUT_tkl_ansi": { - "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "F1", "x": 2, "y": 0 }, - { "label": "F2", "x": 3, "y": 0 }, - { "label": "F3", "x": 4, "y": 0 }, - { "label": "F4", "x": 5, "y": 0 }, - { "label": "F5", "x": 6.5, "y": 0 }, - { "label": "F6", "x": 7.5, "y": 0 }, - { "label": "F7", "x": 8.5, "y": 0 }, - { "label": "F8", "x": 9.5, "y": 0 }, - { "label": "F9", "x": 11, "y": 0 }, - { "label": "F10", "x": 12, "y": 0 }, - { "label": "F11", "x": 13, "y": 0 }, - { "label": "F12", "x": 14, "y": 0 }, - { "label": "PrtSc", "x": 15.25, "y": 0 }, - { "label": "Scroll Lock", "x": 16.25, "y": 0 }, - { "label": "Pause", "x": 17.25, "y": 0 }, - - { "label": "~", "x": 0, "y": 1.5 }, - { "label": "!", "x": 1, "y": 1.5 }, - { "label": "@", "x": 2, "y": 1.5 }, - { "label": "#", "x": 3, "y": 1.5 }, - { "label": "$", "x": 4, "y": 1.5 }, - { "label": "%", "x": 5, "y": 1.5 }, - { "label": "^", "x": 6, "y": 1.5 }, - { "label": "&", "x": 7, "y": 1.5 }, - { "label": "*", "x": 8, "y": 1.5 }, - { "label": "(", "x": 9, "y": 1.5 }, - { "label": ")", "x": 10, "y": 1.5 }, - { "label": "_", "x": 11, "y": 1.5 }, - { "label": "+", "x": 12, "y": 1.5 }, - { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, - { "label": "Insert", "x": 15.25, "y": 1.5 }, - { "label": "Home", "x": 16.25, "y": 1.5 }, - { "label": "PgUp", "x": 17.25, "y": 1.5 }, - - { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 2.5 }, - { "label": "W", "x": 2.5, "y": 2.5 }, - { "label": "E", "x": 3.5, "y": 2.5 }, - { "label": "R", "x": 4.5, "y": 2.5 }, - { "label": "T", "x": 5.5, "y": 2.5 }, - { "label": "Y", "x": 6.5, "y": 2.5 }, - { "label": "U", "x": 7.5, "y": 2.5 }, - { "label": "I", "x": 8.5, "y": 2.5 }, - { "label": "O", "x": 9.5, "y": 2.5 }, - { "label": "P", "x": 10.5, "y": 2.5 }, - { "label": "{", "x": 11.5, "y": 2.5 }, - { "label": "}", "x": 12.5, "y": 2.5 }, - { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, - { "label": "Delete", "x": 15.25, "y": 2.5 }, - { "label": "End", "x": 16.25, "y": 2.5 }, - { "label": "PgDn", "x": 17.25, "y": 2.5 }, - - { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 3.5 }, - { "label": "S", "x": 2.75, "y": 3.5 }, - { "label": "D", "x": 3.75, "y": 3.5 }, - { "label": "F", "x": 4.75, "y": 3.5 }, - { "label": "G", "x": 5.75, "y": 3.5 }, - { "label": "H", "x": 6.75, "y": 3.5 }, - { "label": "J", "x": 7.75, "y": 3.5 }, - { "label": "K", "x": 8.75, "y": 3.5 }, - { "label": "L", "x": 9.75, "y": 3.5 }, - { "label": ":", "x": 10.75, "y": 3.5 }, - { "label": "\"", "x": 11.75, "y": 3.5 }, - { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, - - { "label": "Shift", "x": 0, "y": 4.5, "w": 2.25 }, - { "label": "Z", "x": 2.25, "y": 4.5 }, - { "label": "X", "x": 3.25, "y": 4.5 }, - { "label": "C", "x": 4.25, "y": 4.5 }, - { "label": "V", "x": 5.25, "y": 4.5 }, - { "label": "B", "x": 6.25, "y": 4.5 }, - { "label": "N", "x": 7.25, "y": 4.5 }, - { "label": "M", "x": 8.25, "y": 4.5 }, - { "label": "<", "x": 9.25, "y": 4.5 }, - { "label": ">", "x": 10.25, "y": 4.5 }, - { "label": "?", "x": 11.25, "y": 4.5 }, - { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, - { "label": "\u2191", "x": 16.25, "y": 4.5 }, - - { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, - { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, - { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, - { "x": 3.75, "y": 5.5, "w": 6.25 }, - { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, - { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, - { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, - { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, - { "label": "\u2190", "x": 15.25, "y": 5.5 }, - { "label": "\u2193", "x": 16.25, "y": 5.5 }, - { "label": "\u2192", "x": 17.25, "y": 5.5 } - ] - }, - "LAYOUT_tkl_iso": { - "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "F1", "x": 2, "y": 0 }, - { "label": "F2", "x": 3, "y": 0 }, - { "label": "F3", "x": 4, "y": 0 }, - { "label": "F4", "x": 5, "y": 0 }, - { "label": "F5", "x": 6.5, "y": 0 }, - { "label": "F6", "x": 7.5, "y": 0 }, - { "label": "F7", "x": 8.5, "y": 0 }, - { "label": "F8", "x": 9.5, "y": 0 }, - { "label": "F9", "x": 11, "y": 0 }, - { "label": "F10", "x": 12, "y": 0 }, - { "label": "F11", "x": 13, "y": 0 }, - { "label": "F12", "x": 14, "y": 0 }, - { "label": "PrtSc", "x": 15.25, "y": 0 }, - { "label": "Scroll Lock", "x": 16.25, "y": 0 }, - { "label": "Pause", "x": 17.25, "y": 0 }, - - { "label": "~", "x": 0, "y": 1.5 }, - { "label": "!", "x": 1, "y": 1.5 }, - { "label": "@", "x": 2, "y": 1.5 }, - { "label": "#", "x": 3, "y": 1.5 }, - { "label": "$", "x": 4, "y": 1.5 }, - { "label": "%", "x": 5, "y": 1.5 }, - { "label": "^", "x": 6, "y": 1.5 }, - { "label": "&", "x": 7, "y": 1.5 }, - { "label": "*", "x": 8, "y": 1.5 }, - { "label": "(", "x": 9, "y": 1.5 }, - { "label": ")", "x": 10, "y": 1.5 }, - { "label": "_", "x": 11, "y": 1.5 }, - { "label": "+", "x": 12, "y": 1.5 }, - { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, - { "label": "Insert", "x": 15.25, "y": 1.5 }, - { "label": "Home", "x": 16.25, "y": 1.5 }, - { "label": "PgUp", "x": 17.25, "y": 1.5 }, - - { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 2.5 }, - { "label": "W", "x": 2.5, "y": 2.5 }, - { "label": "E", "x": 3.5, "y": 2.5 }, - { "label": "R", "x": 4.5, "y": 2.5 }, - { "label": "T", "x": 5.5, "y": 2.5 }, - { "label": "Y", "x": 6.5, "y": 2.5 }, - { "label": "U", "x": 7.5, "y": 2.5 }, - { "label": "I", "x": 8.5, "y": 2.5 }, - { "label": "O", "x": 9.5, "y": 2.5 }, - { "label": "P", "x": 10.5, "y": 2.5 }, - { "label": "{", "x": 11.5, "y": 2.5 }, - { "label": "}", "x": 12.5, "y": 2.5 }, - { "label": "Delete", "x": 15.25, "y": 2.5 }, - { "label": "End", "x": 16.25, "y": 2.5 }, - { "label": "PgDn", "x": 17.25, "y": 2.5 }, - - { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 3.5 }, - { "label": "S", "x": 2.75, "y": 3.5 }, - { "label": "D", "x": 3.75, "y": 3.5 }, - { "label": "F", "x": 4.75, "y": 3.5 }, - { "label": "G", "x": 5.75, "y": 3.5 }, - { "label": "H", "x": 6.75, "y": 3.5 }, - { "label": "J", "x": 7.75, "y": 3.5 }, - { "label": "K", "x": 8.75, "y": 3.5 }, - { "label": "L", "x": 9.75, "y": 3.5 }, - { "label": ":", "x": 10.75, "y": 3.5 }, - { "label": "\"", "x": 11.75, "y": 3.5 }, - { "label": "#", "x": 12.75, "y": 3.5 }, - { "label": "Enter", "x": 13.75, "y": 2.5, "w": 1.25, "h": 2 }, - - { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, - { "label": "\\", "x": 1.25, "y": 4.5 }, - { "label": "Z", "x": 2.25, "y": 4.5 }, - { "label": "X", "x": 3.25, "y": 4.5 }, - { "label": "C", "x": 4.25, "y": 4.5 }, - { "label": "V", "x": 5.25, "y": 4.5 }, - { "label": "B", "x": 6.25, "y": 4.5 }, - { "label": "N", "x": 7.25, "y": 4.5 }, - { "label": "M", "x": 8.25, "y": 4.5 }, - { "label": "<", "x": 9.25, "y": 4.5 }, - { "label": ">", "x": 10.25, "y": 4.5 }, - { "label": "?", "x": 11.25, "y": 4.5 }, - { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, - { "label": "\u2191", "x": 16.25, "y": 4.5 }, - - { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, - { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, - { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, - { "x": 3.75, "y": 5.5, "w": 6.25 }, - { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, - { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, - { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, - { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, - { "label": "\u2190", "x": 15.25, "y": 5.5 }, - { "label": "\u2193", "x": 16.25, "y": 5.5 }, - { "label": "\u2192", "x": 17.25, "y": 5.5 } - ] - }, - "LAYOUT_all": { - "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "F1", "x": 2, "y": 0 }, - { "label": "F2", "x": 3, "y": 0 }, - { "label": "F3", "x": 4, "y": 0 }, - { "label": "F4", "x": 5, "y": 0 }, - { "label": "F5", "x": 6.5, "y": 0 }, - { "label": "F6", "x": 7.5, "y": 0 }, - { "label": "F7", "x": 8.5, "y": 0 }, - { "label": "F8", "x": 9.5, "y": 0 }, - { "label": "F9", "x": 11, "y": 0 }, - { "label": "F10", "x": 12, "y": 0 }, - { "label": "F11", "x": 13, "y": 0 }, - { "label": "F12", "x": 14, "y": 0 }, - { "label": "PrtSc", "x": 15.25, "y": 0 }, - { "label": "Scroll Lock", "x": 16.25, "y": 0 }, - { "label": "Pause", "x": 17.25, "y": 0 }, - - { "label": "~", "x": 0, "y": 1.5 }, - { "label": "!", "x": 1, "y": 1.5 }, - { "label": "@", "x": 2, "y": 1.5 }, - { "label": "#", "x": 3, "y": 1.5 }, - { "label": "$", "x": 4, "y": 1.5 }, - { "label": "%", "x": 5, "y": 1.5 }, - { "label": "^", "x": 6, "y": 1.5 }, - { "label": "&", "x": 7, "y": 1.5 }, - { "label": "*", "x": 8, "y": 1.5 }, - { "label": "(", "x": 9, "y": 1.5 }, - { "label": ")", "x": 10, "y": 1.5 }, - { "label": "_", "x": 11, "y": 1.5 }, - { "label": "+", "x": 12, "y": 1.5 }, - { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, - { "label": "Insert", "x": 15.25, "y": 1.5 }, - { "label": "Home", "x": 16.25, "y": 1.5 }, - { "label": "PgUp", "x": 17.25, "y": 1.5 }, - - { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 2.5 }, - { "label": "W", "x": 2.5, "y": 2.5 }, - { "label": "E", "x": 3.5, "y": 2.5 }, - { "label": "R", "x": 4.5, "y": 2.5 }, - { "label": "T", "x": 5.5, "y": 2.5 }, - { "label": "Y", "x": 6.5, "y": 2.5 }, - { "label": "U", "x": 7.5, "y": 2.5 }, - { "label": "I", "x": 8.5, "y": 2.5 }, - { "label": "O", "x": 9.5, "y": 2.5 }, - { "label": "P", "x": 10.5, "y": 2.5 }, - { "label": "{", "x": 11.5, "y": 2.5 }, - { "label": "}", "x": 12.5, "y": 2.5 }, - { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, - { "label": "Delete", "x": 15.25, "y": 2.5 }, - { "label": "End", "x": 16.25, "y": 2.5 }, - { "label": "PgDn", "x": 17.25, "y": 2.5 }, - - { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 3.5 }, - { "label": "S", "x": 2.75, "y": 3.5 }, - { "label": "D", "x": 3.75, "y": 3.5 }, - { "label": "F", "x": 4.75, "y": 3.5 }, - { "label": "G", "x": 5.75, "y": 3.5 }, - { "label": "H", "x": 6.75, "y": 3.5 }, - { "label": "J", "x": 7.75, "y": 3.5 }, - { "label": "K", "x": 8.75, "y": 3.5 }, - { "label": "L", "x": 9.75, "y": 3.5 }, - { "label": ":", "x": 10.75, "y": 3.5 }, - { "label": "\"", "x": 11.75, "y": 3.5 }, - { "label": "#", "x": 12.75, "y": 3.5 }, - { "label": "Enter", "x": 13.75, "y": 3.5, "w": 1.25 }, - - { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, - { "label": "\\", "x": 1.25, "y": 4.5 }, - { "label": "Z", "x": 2.25, "y": 4.5 }, - { "label": "X", "x": 3.25, "y": 4.5 }, - { "label": "C", "x": 4.25, "y": 4.5 }, - { "label": "V", "x": 5.25, "y": 4.5 }, - { "label": "B", "x": 6.25, "y": 4.5 }, - { "label": "N", "x": 7.25, "y": 4.5 }, - { "label": "M", "x": 8.25, "y": 4.5 }, - { "label": "<", "x": 9.25, "y": 4.5 }, - { "label": ">", "x": 10.25, "y": 4.5 }, - { "label": "?", "x": 11.25, "y": 4.5 }, - { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, - { "label": "\u2191", "x": 16.25, "y": 4.5 }, - - { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, - { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, - { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, - { "x": 3.75, "y": 5.5, "w": 6.25 }, - { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, - { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, - { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, - { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, - { "label": "\u2190", "x": 15.25, "y": 5.5 }, - { "label": "\u2193", "x": 16.25, "y": 5.5 }, - { "label": "\u2192", "x": 17.25, "y": 5.5 } - ] - } - } -} diff --git a/keyboards/durgod/k320/k320.c b/keyboards/durgod/k320/k320.c deleted file mode 100644 index 42091f36c..000000000 --- a/keyboards/durgod/k320/k320.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright 2021 kuenhlee and Don Kjer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "k320.h" - -/* Private Functions */ -void off_all_leds(void) { - writePinHigh(LED_CAPS_LOCK_PIN); - writePinHigh(LED_SCROLL_LOCK_PIN); - writePinHigh(LED_WIN_LOCK_PIN); - writePinHigh(LED_MR_LOCK_PIN); -} - -void on_all_leds(void) { - writePinLow(LED_CAPS_LOCK_PIN); - writePinLow(LED_SCROLL_LOCK_PIN); - writePinLow(LED_WIN_LOCK_PIN); - writePinLow(LED_MR_LOCK_PIN); -} - -/* WinLock and MR LEDs are non-standard. Need to override led init */ -void led_init_ports(void) { - setPinOutput(LED_CAPS_LOCK_PIN); - setPinOutput(LED_SCROLL_LOCK_PIN); - setPinOutput(LED_WIN_LOCK_PIN); - setPinOutput(LED_MR_LOCK_PIN); - off_all_leds(); -} - - -#ifndef WINLOCK_DISABLED -static bool win_key_locked = false; - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_TGUI: - if (record->event.pressed) { - // Toggle GUI lock on key press - win_key_locked = !win_key_locked; - writePin(LED_WIN_LOCK_PIN, !win_key_locked); - } - break; - case KC_LGUI: - if (win_key_locked) { return false; } - break; - } - return process_record_user(keycode, record); -} -#endif /* WINLOCK_DISABLED */ diff --git a/keyboards/durgod/k320/k320.h b/keyboards/durgod/k320/k320.h deleted file mode 100644 index c504f5a2b..000000000 --- a/keyboards/durgod/k320/k320.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright 2021 kuenhlee and Don Kjer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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" - -#ifndef WINLOCK_DISABLED -// Define the TGUI key here so it is available in QMK configurator -enum K320_keycodes { - KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock - NEW_SAFE_RANGE -}; - -#undef SAFE_RANGE -#define SAFE_RANGE NEW_SAFE_RANGE -#endif /* WINLOCK_DISABLED */ - -/* Function Prototype */ -void off_all_leds(void); -void on_all_leds(void); - - -#define XXX KC_NO - -// This a shortcut to help you visually see your layout. -#define LAYOUT_tkl_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K4E, \ - K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ - K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, K3F }, \ - { K40, XXX, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \ - { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \ - { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \ -} - - -// This a shortcut to help you visually see your layout. -#define LAYOUT_tkl_iso( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K3D, K3E, K3F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K4E, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ - K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \ - { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \ - { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \ -} - - -// This a shortcut to help you visually see your layout. -#define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K4E, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ - K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \ - { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \ - { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \ -} diff --git a/keyboards/durgod/k320/keymaps/default/keymap.json b/keyboards/durgod/k320/keymaps/default/keymap.json deleted file mode 100644 index d8242ae76..000000000 --- a/keyboards/durgod/k320/keymaps/default/keymap.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "keyboard": "durgod/k320", - "keymap": "default", - "layout": "LAYOUT_all", - "layers": [ - [ - "KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SLCK", "KC_PAUS", - "KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_INS", "KC_HOME", "KC_PGUP", - "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_DEL", "KC_END", "KC_PGDN", - "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_NUHS", "KC_ENT", - "KC_LSFT", "KC_NUBS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_UP", - "KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_APP", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT" - ], - [ - "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TGUI", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" - ] - ], - "author":"dkjer", - "notes":"", - "version":1 -} diff --git a/keyboards/durgod/k320/keymaps/default/readme.md b/keyboards/durgod/k320/keymaps/default/readme.md deleted file mode 100644 index c94943a83..000000000 --- a/keyboards/durgod/k320/keymaps/default/readme.md +++ /dev/null @@ -1,16 +0,0 @@ -# The default keymap for Durgod Taurus K320. - -Supports both ANSI and ISO layouts. - -Layer 0 : Standard 87/88 keys TKL layout (Windows) - -Layer 1 : Media control and Windows lock key -- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7 -- Fn + Windows to toggle Windows lock key functionality - -## Windows key lock - -You can hold down Fn + Windows key to disable the Windows key while in locked mode. -The 'Lock' LED indicates if the Windows key is locked. - -This is similar to the stock K320 Windows key lock functionality. diff --git a/keyboards/durgod/k320/keymaps/default_mac/keymap.json b/keyboards/durgod/k320/keymaps/default_mac/keymap.json deleted file mode 100644 index dc5d3d3fd..000000000 --- a/keyboards/durgod/k320/keymaps/default_mac/keymap.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "keyboard": "durgod/k320", - "keymap": "default_mac", - "layout": "LAYOUT_all", - "layers": [ - [ - "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_F13", "KC_F14", "KC_F15", - "KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_INS", "KC_HOME", "KC_PGUP", - "KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_DEL", "KC_END", "KC_PGDN", - "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_NUHS", "KC_ENT", - "KC_LSFT", "KC_NUBS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_UP", - "KC_LCTL", "KC_LALT", "KC_LGUI", "KC_SPC", "KC_RGUI", "KC_RALT", "MO(1)", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT" - ], - [ - "KC_TRNS", "KC_MPLY", "KC_MSTP", "KC_MPRV", "KC_MNXT", "KC_MUTE", "KC_VOLD", "KC_VOLU", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", - "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS" - ] - ], - "author":"AlCutter", - "notes":"", - "version":1 -} diff --git a/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/keymap.c b/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/keymap.c deleted file mode 100644 index 8494fbe03..000000000 --- a/keyboards/durgod/k320/keymaps/default_toggle_mac_windows/keymap.c +++ /dev/null @@ -1,367 +0,0 @@ -/* Copyright 2021 kuenhlee and Don Kjer - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -// Layer shorthand -enum _layer { - _WBL, - _WFL, - _WSL, - _MBL, - _MFL, - _MSL -}; - -#ifndef DEFAULT_LAYOUT -# define DEFAULT_LAYOUT _WBL // Change to _MBL to boot into Mac layout. -#endif -#ifndef ALT_LAYOUT -# define ALT_LAYOUT _MBL // Layout to display 'MR' led when active. -#endif - -static bool win_key_locked = false; -static bool mac_media_locked = false; -static bool win_appkey_pressed = false; -static bool mac_fnkey_pressed = false; - - -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock (Windows) - KC_TMED, // Toggle between Fx keys or Media keys (Mac) - KC_WFN, // Windows function key - KC_MFN, // Mac function key - MO_WSL, // Windows system key - MO_MSL, // Mac system key - DF_W2MBL, // Change layout from Windows to Mac - DF_M2WBL // Change layout from Mac to Windows -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _WBL: Windows Base Layer (Default Layer) - * ,-----------------------------------------------------------. ,--------------. - * |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11|f12| |Prnt|ScLk|Paus| - * |-----------------------------------------------------------| |--------------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backsp | | Ins|Home|PgUp| - * |-----------------------------------------------------------| |--------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | Del| End|PgDn| - * |-----------------------------------------------------------| `--------------' - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #|Ret | - * |-----------------------------------------------------------| ,----. - * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | | Up | - * |-----------------------------------------------------------| ,-------------. - * |Ctrl|Gui |Alt | Space |Alt |Func |App|Ctrl | |Lft| Dn |Rig | - * `-----------------------------------------------------------' `-------------' - */ - [_WBL] = LAYOUT_all( /* Windows Base Layer */ - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WFN, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - /* Keymap _WFL: Windows Function Layer - * ,-----------------------------------------------------------. ,--------------. - * | |Play|Stop|Prev|Next| |Mute|Vol+|Vol-| | | | | | | | | | | - * |-----------------------------------------------------------| |--------------| - * | | | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| |--------------| - * | | | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| `--------------' - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| ,----. - * | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| ,-------------. - * | |Lock| | | |Func |Sys| | | | | | - * `-----------------------------------------------------------' `-------------' - */ - [_WFL] = LAYOUT_all( /* Windows First Layer */ - _______, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_TGUI, _______, _______, _______, _______, MO_WSL, _______, _______, _______, _______ - ), - /* Keymap _WSL: Windows System Layer - * ,-----------------------------------------------------------. ,--------------. - * |Reset |Sleep| | |Power| | | | | | | | | |MAC| | | - * |-----------------------------------------------------------| |--------------| - * | | | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| |--------------| - * | | | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| `--------------' - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| ,----. - * | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| ,-------------. - * | | | | | |Func |Sys| | | | | | - * `-----------------------------------------------------------' `-------------' - */ - [_WSL] = LAYOUT_all( /* Windows Second / System Layer */ - RESET, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_W2MBL, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - ), - - /* Keymap _MBL: Mac Base Layer (Alternate Layout) - * ,-----------------------------------------------------------. ,--------------. - * |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11|f12| | f13| f14| f15| - * |-----------------------------------------------------------| |--------------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backsp | | Ins|Home|PgUp| - * |-----------------------------------------------------------| |--------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | Del| End|PgDn| - * |-----------------------------------------------------------| `--------------' - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #|Ret | - * |-----------------------------------------------------------| ,----. - * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | | Up | - * |-----------------------------------------------------------| ,-------------. - * |Ctrl|Alt |Gui | Space |Gui |Alt|Func |Ctrl | |Lft| Dn |Rig | - * `-----------------------------------------------------------' `-------------' - */ - [_MBL] = LAYOUT_all( /* Mac Base Layer */ - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MFN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - /* Keymap _MFL: Mac Function Layer - * ,-----------------------------------------------------------. ,--------------. - * | |Bri-|Bri+|MCon|LPad| | | |Prv|Ply| |Nxt|Mute|Vol-|Vol+| |TMed| | | - * |-----------------------------------------------------------| |--------------| - * | | | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| |--------------| - * | | | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| `--------------' - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| ,----. - * | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| ,-------------. - * | | | | | |Sys|Func | | | | | | - * `-----------------------------------------------------------' `-------------' - */ - [_MFL] = LAYOUT_all( /* Mac First Layer */ - _______, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TMED, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, MO_MSL, _______, _______, _______, _______, _______ - ), - /* Keymap _MSL: Mac System Layer - * ,-----------------------------------------------------------. ,--------------. - * |Reset | | | |Sleep| | | | | | | | | |WIN| | | - * |-----------------------------------------------------------| |--------------| - * | | | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| |--------------| - * | | | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| `--------------' - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| ,----. - * | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| ,-------------. - * | | | | | |Sys|Func | | | | | | - * `-----------------------------------------------------------' `-------------' - */ - [_MSL] = LAYOUT_all( /* Mac Second / System Layer */ - RESET, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_M2WBL, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX - ) -}; - -void unlock_win_key(void) { - win_key_locked = false; - mac_media_locked = false; - writePinHigh(LED_WIN_LOCK_PIN); -} - -void toggle_lock_win_key(void) { - win_key_locked = !win_key_locked; - writePin(LED_WIN_LOCK_PIN, !win_key_locked); -} - -void toggle_lock_media_key(void) { - mac_media_locked = !mac_media_locked; - writePin(LED_WIN_LOCK_PIN, !mac_media_locked); -} - -#ifdef CONSOLE_ENABLE -void dprint_global_layers(void) { - dprint("Global Layers:"); - if (IS_LAYER_ON(_WFL)) { dprint(" _WFL"); } - if (IS_LAYER_ON(_WSL)) { dprint(" _WSL"); } - if (IS_LAYER_ON(_MFL)) { dprint(" _MFL"); } - if (IS_LAYER_ON(_MSL)) { dprint(" _MSL"); } - dprintf("\n"); -} - -void dprint_layers(layer_state_t state) { - dprint("Layers:"); - if (IS_LAYER_ON_STATE(state, _WFL)) { dprint(" _WFL"); } - if (IS_LAYER_ON_STATE(state, _WSL)) { dprint(" _WSL"); } - if (IS_LAYER_ON_STATE(state, _MFL)) { dprint(" _MFL"); } - if (IS_LAYER_ON_STATE(state, _MSL)) { dprint(" _MSL"); } - dprintf("\n"); -} -#endif - -layer_state_t default_layer_state_set_user(layer_state_t state) { -#ifdef CONSOLE_ENABLE - dprintf("default_layer_state_set_user: 0x%x\n", state); - dprint_global_layers(); -#endif - // Disable windows key lock on default layer transition. - unlock_win_key(); - win_appkey_pressed = false; - mac_fnkey_pressed = false; - writePin(LED_MR_LOCK_PIN, !IS_LAYER_ON_STATE(state, ALT_LAYOUT)); - return state; -} - -layer_state_t layer_state_set_user(layer_state_t state) { -#ifdef CONSOLE_ENABLE - dprintf("layer_state_set_user: 0x%x\n", state); - dprint_layers(state); -#endif - return state; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_TGUI: - if (!record->event.pressed) { - // Toggle GUI lock on key release - toggle_lock_win_key(); - } - break; - case KC_TMED: - // Only trigger when Fn key is also held down, to avoid accidental unlock. - if (!mac_fnkey_pressed) { return false; } - if (!record->event.pressed) { - // Toggle Media Lock on key release - toggle_lock_media_key(); - } - break; - case KC_LGUI: - if (win_key_locked) { return false; } - break; - case KC_WFN: - // Like MO(_WFL), but also enables _WSL if KC_APP is already pressed down. - if (record->event.pressed) { - layer_on(_WFL); - if (win_appkey_pressed) { - // Also enable Secondary layer if App key is being held down. - win_appkey_pressed = false; - layer_on(_WSL); - } - } else { - if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); } - if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); } - } - break; - case KC_APP: - if (record->event.pressed) { - // Don't actually press down the app menu key - win_appkey_pressed = true; - } else { - if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); } - if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); } - if (win_appkey_pressed) { - win_appkey_pressed = false; - // Tap the KC_APP key on key release. - tap_code(KC_APP); - } - } - return false; - break; - case KC_MFN: - // Mac Fn key. Emit Fn keycode, and also transition layers similar to KC_WFN. - if (record->event.pressed) { - mac_fnkey_pressed = true; - layer_on(_MFL); - // Also enable Secondary layer if Right-Alt key is being held down. - if (get_mods() & MOD_BIT(KC_RALT)) { - layer_on(_MSL); - } - } else { - mac_fnkey_pressed = false; - if (!mac_media_locked) { - if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); } - if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); } - } - } - break; - case KC_RALT: - // Disable MSL/WFL layer on key-up. - if (!record->event.pressed) { - if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); } - if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); } - } - break; - case MO_WSL: - if (record->event.pressed) { - layer_on(_WSL); - } else { - if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); } - if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); } - } - break; - case MO_MSL: - if (record->event.pressed) { - layer_on(_MSL); - } else { - if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); } - if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); } - } - break; - case DF_W2MBL: - if (!record->event.pressed) { - // Switch base layer, but preserve first/secondary layers. - default_layer_set(1UL<<_MBL); - layer_state_set(1UL<<_MFL | 1UL<<_MSL); - } - break; - case DF_M2WBL: - if (!record->event.pressed) { - // Switch base layer, but preserve first/secondary layers. - default_layer_set(1UL<<_WBL); - layer_state_set(1UL<<_WFL | 1UL<<_WSL); - } - break; - case RESET: - if (record->event.pressed) { - // Flash LEDs to indicate bootloader mode is enabled. - on_all_leds(); - } - break; - } - return true; -} - -void keyboard_post_init_user(void) { - default_layer_set(1UL<. - */ -#include QMK_KEYBOARD_H - -// Layer shorthand -enum _layer { - _BASE, - _FUNC, - _LAYER3, - _LAYER4 -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BASE: Base Layer (Default Layer) - * ,-----------------------------------------------------------. ,--------------. - * |Esc |f1| f2| f3| f4| | f5| f6| f7| f8| | f9|f10|f11|f12| |Prnt|ScLk|Paus| - * |-----------------------------------------------------------| |--------------| - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backsp | | Ins|Home|PgUp| - * |-----------------------------------------------------------| |--------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | Del| End|PgDn| - * |------------------------------------------------------ Ret | `--------------' - * |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| | - * |-----------------------------------------------------------| ,----. - * |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | | Up | - * |-----------------------------------------------------------| ,-------------. - * |Ctrl|Gui |Alt | Space |Alt | Fn |App |Ctrl| |Lft| Dn |Rig | - * `-----------------------------------------------------------' `-------------' - */ - [_BASE] = LAYOUT_all( /* Base Layer */ - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FUNC),KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - /* Keymap _FUNC: Function Layer - * ,-----------------------------------------------------------. ,--------------. - * | |Play|Stop|Prev|Next| |Mute|Vol+|Vol-| | | | | | | | | | | - * |-----------------------------------------------------------| |--------------| - * | | | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| |--------------| - * | | | | | | | | | | | | | | | | | | | - * |------------------------------------------------------- | `--------------' - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| ,----. - * | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------| ,-------------. - * | | | | | |Func | | | | | | | - * `-----------------------------------------------------------' `-------------' - */ - [_FUNC] = LAYOUT_all( /* Function Layer */ - _______, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [_LAYER3] = LAYOUT_all( /* Layer 3 */ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [_LAYER4] = LAYOUT_all( /* Layer 4 */ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) -}; - diff --git a/keyboards/durgod/k320/keymaps/via/readme.md b/keyboards/durgod/k320/keymaps/via/readme.md deleted file mode 100644 index d1b2ac191..000000000 --- a/keyboards/durgod/k320/keymaps/via/readme.md +++ /dev/null @@ -1,12 +0,0 @@ -# The default keymap for Durgod Taurus K320. - -Layer 0 : Standard 87/88 keys TKL layout - -Layer 1 : Media control -- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7 - -## Supported PCBs - -This firmware was tested on a Durgod K320 ISO with the PCB marked "DGK320ST-Single v1.0 HS20181227". - -The pcb features switch holes for ANSI layout, so this firmware might be compatible with with the Durgod K320 ANSI. diff --git a/keyboards/durgod/k320/keymaps/via/rules.mk b/keyboards/durgod/k320/keymaps/via/rules.mk deleted file mode 100644 index 8815b6a0a..000000000 --- a/keyboards/durgod/k320/keymaps/via/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -OPT_DEFS += -DWINLOCK_DISABLED - -VIA_ENABLE = yes -LTO_ENABLE = yes diff --git a/keyboards/durgod/k320/readme.md b/keyboards/durgod/k320/readme.md index 551a29282..b8ca5b6da 100644 --- a/keyboards/durgod/k320/readme.md +++ b/keyboards/durgod/k320/readme.md @@ -1,57 +1,4 @@ # K320 -This is a standard off-the-shelf Durgod Taurus K320 TKL (87/88-key) keyboard without backlight. +See: [K320](../k3x0/k320/readme.md) -* Keyboard Maintainer: [dkjer](https://github.com/dkjer) -* Hardware Supported: Durgod Taurus K320 board with STM32F070RBT6 -* Hardware Availability: https://www.durgod.com/page9?product_id=47&_l=en - -## Instructions - -### Build - -Make command example for this keyboard (after setting up your build environment): - - make durgod/k320:default - -Flashing example for this keyboard: - - make durgod/k320: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). - -### Initial Flash - -For first Flashing from initial Stock's Firmware - -1. Back up original Firmware Image: -- Unplug -- Short Boot0 to Vdd (See below) -- Plug In USB -- Make a Flash Image's Backup in case you wanted to restore the Keyboard to Stock's Image: - - Using DFUseDemo.exe from ST's STSW-STM32080: https://www.st.com/en/development-tools/stsw-stm32080.html - - Using dfu-util: - - dfu-util --list - dfu-util --alt 0 --dfuse-address 0x08000000 --upload ${OLD_STOCK_BIN} - -2. Flash the QMK Firmware Image. -- Put board into Bootloader mode, using the same method as when backing up the original Firmware (above) -- Here are a few options for performing the initial Flash: - - Using [QMK Toolbox](https://github.com/qmk/qmk_toolbox) - - Using DFuseDemo.exe if STTub30 driver is used. - - Using dfu-util: - - dfu-util --alt 0 --dfuse-address 0x08000000 --download ${NEW_QMK_BIN} - -You can short Boot0 to Vdd by shorting R21 to C27 on the sides closest to the processor, as shown: - -Shorting Boot0 to Vdd on K320 - -### Subsequent Flashing - -For repeating Flashing you can use BootMagic: -- BootMagic Lite has been enabled with Assigned "Esc" key -- Unplug USB Cable -- Holding Esc Button -- Plug in USB Cable, Keyboard should be in ST-Bootloader state diff --git a/keyboards/durgod/k320/rules.mk b/keyboards/durgod/k320/rules.mk index e6f0007fd..d3f7b1194 100644 --- a/keyboards/durgod/k320/rules.mk +++ b/keyboards/durgod/k320/rules.mk @@ -1,29 +1 @@ -# MCU name -# Actually F070, but close enough -MCU = STM32F072 -BOARD = DURGOD_STM32_F070 - -# Bootloader selection -BOOTLOADER = stm32-dfu - -# Do not put the microcontroller into power saving mode -OPT_DEFS += -DNO_SUSPEND_POWER_DOWN - -# 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 = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output - -LAYOUTS = tkl_ansi tkl_iso +DEFAULT_FOLDER=durgod/k3x0/k320 diff --git a/keyboards/durgod/k3x0/config.h b/keyboards/durgod/k3x0/config.h new file mode 100644 index 000000000..ef73a7101 --- /dev/null +++ b/keyboards/durgod/k3x0/config.h @@ -0,0 +1,56 @@ +/* Copyright 2021 kuenhlee, Don Kjer, Tyler Tidman + * Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0xD60D +#define MANUFACTURER Hoksi Technology + +/* key matrix size (rows in specific keyboard variant) */ +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { C4, C5, B0, B1, B2, B10, B11, B12, B13, B14, B15, C6, C7, C10, C11, C12 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +// Dynamic EEPROM +// Something sensible or else VIA may crash +// Users may enable more if they wish +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 +// #define USB_POLLING_INTERVAL_MS 1 + +/* Bootmagic Lite key configuration */ +#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 + +/* LED indicator pins */ +#define LED_CAPS_LOCK_PIN C9 +#define LED_SCROLL_LOCK_PIN A8 +#define LED_WIN_LOCK_PIN A9 +#define LED_MR_LOCK_PIN A10 +#define LED_PIN_ON_STATE 0 + +/* Original hardware "reset" button on pin D2 */ +#define HARDWARE_RESET_PIN D2 diff --git a/keyboards/durgod/k3x0/halconf.h b/keyboards/durgod/k3x0/halconf.h new file mode 100644 index 000000000..fa20fe30a --- /dev/null +++ b/keyboards/durgod/k3x0/halconf.h @@ -0,0 +1,22 @@ +/* Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 HAL_USE_PAL TRUE +#define PAL_USE_CALLBACKS TRUE + +#include_next diff --git a/keyboards/durgod/k3x0/k310/base/config.h b/keyboards/durgod/k3x0/k310/base/config.h new file mode 100644 index 000000000..025369acd --- /dev/null +++ b/keyboards/durgod/k3x0/k310/base/config.h @@ -0,0 +1,23 @@ +/* Copyright 2021 Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PRODUCT DURGOD Taurus K310 (QMK) +#define DEVICE_VER 0x0001 // Base (no backlight) diff --git a/keyboards/durgod/k3x0/k310/base/readme.md b/keyboards/durgod/k3x0/k310/base/readme.md new file mode 100644 index 000000000..9f4654043 --- /dev/null +++ b/keyboards/durgod/k3x0/k310/base/readme.md @@ -0,0 +1,27 @@ +# K310 + +This is a standard off-the-shelf Durgod Taurus K310 full-sized 104/105-key +keyboard without backlight. This supports both the ANSI and ISO variants. + +* Keyboard Maintainers: [dkjer](https://github.com/dkjer) and [tylert](https://github.com/tylert) +* Hardware Supported: Durgod Taurus K310 board with STM32F070RBT6 +* Hardware Availability: K310 https://www.durgod.com/page9?product_id=53&_l=en + +## Instructions + +### Build + +Make command example for this keyboard (after setting up your build environment): + + make durgod/k310:default + +Flashing example for this keyboard: + + make durgod/k310: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). + +### Initial Flash + +Instructions for Flashing from initial Stock Firmware: +* [Initial Flashing](../../readme.md#initial-flash) diff --git a/keyboards/durgod/k3x0/k310/base/rules.mk b/keyboards/durgod/k3x0/k310/base/rules.mk new file mode 100644 index 000000000..323c12fc6 --- /dev/null +++ b/keyboards/durgod/k3x0/k310/base/rules.mk @@ -0,0 +1 @@ +# see common rules.mk diff --git a/keyboards/durgod/k3x0/k310/config.h b/keyboards/durgod/k3x0/k310/config.h new file mode 100644 index 000000000..1eadb8e52 --- /dev/null +++ b/keyboards/durgod/k3x0/k310/config.h @@ -0,0 +1,36 @@ +/* Copyright 2021 Don Kjer and Tyler Tidman + * Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PRODUCT_ID 0x3100 +// Taurus K310 models: +//#define DEVICE_VER 0x0001 // Base (no backlight) +//#define DEVICE_VER 0x0002 // Corona (white led matrix) +//#define DEVICE_VER 0x0003 // Aurora (red & blue led matrix) +//#define DEVICE_VER 0x0004 // Nebula (rgb led matrix) + +/* key matrix size (cols in generic keyboard config) */ +#define MATRIX_ROWS 8 + +#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4, A5, A6, A7 } + +/* LED indicator pins */ +#define LED_NUM_LOCK_PIN C8 diff --git a/keyboards/durgod/k3x0/k310/info.json b/keyboards/durgod/k3x0/k310/info.json new file mode 100644 index 000000000..35cd59bec --- /dev/null +++ b/keyboards/durgod/k3x0/k310/info.json @@ -0,0 +1,351 @@ +{ + "keyboard_name": "DURGOD Taurus K310", + "url": "https://www.durgod.com/page9?product_id=53&_l=en", + "maintainer": "tylert", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_fullsize_ansi": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + { "label": "Num Lock", "x": 18.5, "y": 1.5 }, + { "label": "/", "x": 19.5, "y": 1.5 }, + { "label": "*", "x": 20.5, "y": 1.5 }, + { "label": "-", "x": 21.5, "y": 1.5 }, + + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + { "label": "7", "x": 18.5, "y": 2.5 }, + { "label": "8", "x": 19.5, "y": 2.5 }, + { "label": "9", "x": 20.5, "y": 2.5 }, + { "label": "+", "x": 21.5, "y": 2.5, "h": 2 }, + + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, + { "label": "4", "x": 18.5, "y": 3.5 }, + { "label": "5", "x": 19.5, "y": 3.5 }, + { "label": "6", "x": 20.5, "y": 3.5 }, + + { "label": "Shift", "x": 0, "y": 4.5, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "\u2191", "x": 16.25, "y": 4.5 }, + { "label": "1", "x": 18.5, "y": 4.5 }, + { "label": "2", "x": 19.5, "y": 4.5 }, + { "label": "3", "x": 20.5, "y": 4.5 }, + { "label": "Enter", "x": 21.5, "y": 4.5, "h": 2 }, + + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, + { "x": 3.75, "y": 5.5, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, + { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "x": 17.25, "y": 5.5 }, + { "label": "0", "x": 18.5, "y": 5.5, "w": 2 }, + { "label": ".", "x": 20.5, "y": 5.5 } + ] + }, + "LAYOUT_fullsize_iso": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + { "label": "Num Lock", "x": 18.5, "y": 1.5 }, + { "label": "/", "x": 19.5, "y": 1.5 }, + { "label": "*", "x": 20.5, "y": 1.5 }, + { "label": "-", "x": 21.5, "y": 1.5 }, + + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + { "label": "7", "x": 18.5, "y": 2.5 }, + { "label": "8", "x": 19.5, "y": 2.5 }, + { "label": "9", "x": 20.5, "y": 2.5 }, + { "label": "+", "x": 21.5, "y": 2.5, "h": 2 }, + + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "#", "x": 12.75, "y": 3.5 }, + { "label": "Enter", "x": 13.75, "y": 2.5, "w": 1.25, "h": 2 }, + { "label": "4", "x": 18.5, "y": 3.5 }, + { "label": "5", "x": 19.5, "y": 3.5 }, + { "label": "6", "x": 20.5, "y": 3.5 }, + + { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "label": "\\", "x": 1.25, "y": 4.5 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "\u2191", "x": 16.25, "y": 4.5 }, + { "label": "1", "x": 18.5, "y": 4.5 }, + { "label": "2", "x": 19.5, "y": 4.5 }, + { "label": "3", "x": 20.5, "y": 4.5 }, + { "label": "Enter", "x": 21.5, "y": 4.5, "h": 2 }, + + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, + { "x": 3.75, "y": 5.5, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, + { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "x": 17.25, "y": 5.5 }, + { "label": "0", "x": 18.5, "y": 5.5, "w": 2 }, + { "label": ".", "x": 20.5, "y": 5.5 } + ] + }, + "LAYOUT_all": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + { "label": "Num Lock", "x": 18.5, "y": 1.5 }, + { "label": "/", "x": 19.5, "y": 1.5 }, + { "label": "*", "x": 20.5, "y": 1.5 }, + { "label": "-", "x": 21.5, "y": 1.5 }, + + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + { "label": "7", "x": 18.5, "y": 2.5 }, + { "label": "8", "x": 19.5, "y": 2.5 }, + { "label": "9", "x": 20.5, "y": 2.5 }, + { "label": "+", "x": 21.5, "y": 2.5, "h": 2 }, + + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "#", "x": 12.75, "y": 3.5 }, + { "label": "Enter", "x": 13.75, "y": 3.5, "w": 1.25 }, + { "label": "4", "x": 18.5, "y": 3.5 }, + { "label": "5", "x": 19.5, "y": 3.5 }, + { "label": "6", "x": 20.5, "y": 3.5 }, + + { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "label": "\\", "x": 1.25, "y": 4.5 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "\u2191", "x": 16.25, "y": 4.5 }, + { "label": "1", "x": 18.5, "y": 4.5 }, + { "label": "2", "x": 19.5, "y": 4.5 }, + { "label": "3", "x": 20.5, "y": 4.5 }, + { "label": "Enter", "x": 21.5, "y": 4.5, "h": 2 }, + + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, + { "x": 3.75, "y": 5.5, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, + { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "x": 17.25, "y": 5.5 }, + { "label": "0", "x": 18.5, "y": 5.5, "w": 2 }, + { "label": ".", "x": 20.5, "y": 5.5 } + ] + } + } +} diff --git a/keyboards/durgod/k3x0/k310/k310.h b/keyboards/durgod/k3x0/k310/k310.h new file mode 100644 index 000000000..2d82ee155 --- /dev/null +++ b/keyboards/durgod/k3x0/k310/k310.h @@ -0,0 +1,78 @@ +/* Copyright 2021 Don Kjer and Tyler Tidman + * Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 XXX KC_NO + +// This a shortcut to help you visually see your layout. +#define LAYOUT_fullsize_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, K6A, K69, K68, K67, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, K7A, K79, K78, K6B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K4E, K7E, K7D, K7C, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, K6E, K6D, K6C, K7B, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F, K7F, K77 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, K3F }, \ + { K40, XXX, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \ + { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K77, K78, K79, K7A, K7B, K7C, K7D, K7E, K7F } \ +} + +// This a shortcut to help you visually see your layout. +#define LAYOUT_fullsize_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, K6A, K69, K68, K67, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K3D, K3E, K3F, K7A, K79, K78, K6B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K4E, K7E, K7D, K7C, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, K6E, K6D, K6C, K7B, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F, K7F, K77 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \ + { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K77, K78, K79, K7A, K7B, K7C, K7D, K7E, K7F } \ +} + +// This a shortcut to help you visually see your layout. +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, K6A, K69, K68, K67, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, K7A, K79, K78, K6B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K4E, K7E, K7D, K7C, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, K6E, K6D, K6C, K7B, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F, K7F, K77 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \ + { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K77, K78, K79, K7A, K7B, K7C, K7D, K7E, K7F } \ +} + diff --git a/keyboards/durgod/k3x0/k310/readme.md b/keyboards/durgod/k3x0/k310/readme.md new file mode 100644 index 000000000..bee903b88 --- /dev/null +++ b/keyboards/durgod/k3x0/k310/readme.md @@ -0,0 +1,10 @@ +# Taurus K310 + +This code is shared between all K310 variants. Currently only the base model with no backlight is supported. + +* Keyboard Maintainers: [dkjer](https://github.com/dkjer) and [tylert](https://github.com/tylert) +* Hardware Supported: Durgod Taurus K310 board with STM32F070RBT6 +* Hardware Availability: Base https://www.durgod.com/page9?product_id=53&_l=en + +Instructions for building the K310 firmware can be found here: +* [No Backlight](base/readme.md) diff --git a/keyboards/durgod/k3x0/k310/rules.mk b/keyboards/durgod/k3x0/k310/rules.mk new file mode 100644 index 000000000..2df1aff9c --- /dev/null +++ b/keyboards/durgod/k3x0/k310/rules.mk @@ -0,0 +1,4 @@ +# Default to the base model +DEFAULT_FOLDER=durgod/k3x0/k310/base + +LAYOUTS = fullsize_ansi fullsize_iso diff --git a/keyboards/durgod/k3x0/k320/base/config.h b/keyboards/durgod/k3x0/k320/base/config.h new file mode 100644 index 000000000..d4eb732b9 --- /dev/null +++ b/keyboards/durgod/k3x0/k320/base/config.h @@ -0,0 +1,23 @@ +/* Copyright 2021 Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PRODUCT DURGOD Taurus K320 (QMK) +#define DEVICE_VER 0x0001 // Base (no backlight) diff --git a/keyboards/durgod/k3x0/k320/base/readme.md b/keyboards/durgod/k3x0/k320/base/readme.md new file mode 100644 index 000000000..8f46cc122 --- /dev/null +++ b/keyboards/durgod/k3x0/k320/base/readme.md @@ -0,0 +1,27 @@ +# K320 + +This is a standard off-the-shelf Durgod Taurus K320 TKL (87/88-key) +keyboard without backlight. This supports both the ANSI and ISO variants. + +* Keyboard Maintainers: [dkjer](https://github.com/dkjer) and [tylert](https://github.com/tylert) +* Hardware Supported: Durgod Taurus K320 board with STM32F070RBT6 +* Hardware Availability: https://www.durgod.com/page9?product_id=47&_l=en + +## Instructions + +### Build + +Make command example for this keyboard (after setting up your build environment): + + make durgod/k320:default + +Flashing example for this keyboard: + + make durgod/k320: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). + +### Initial Flash + +Instructions for Flashing from initial Stock Firmware: +* [Initial Flashing](../../readme.md#initial-flash) diff --git a/keyboards/durgod/k3x0/k320/base/rules.mk b/keyboards/durgod/k3x0/k320/base/rules.mk new file mode 100644 index 000000000..323c12fc6 --- /dev/null +++ b/keyboards/durgod/k3x0/k320/base/rules.mk @@ -0,0 +1 @@ +# see common rules.mk diff --git a/keyboards/durgod/k3x0/k320/config.h b/keyboards/durgod/k3x0/k320/config.h new file mode 100644 index 000000000..25b4c6303 --- /dev/null +++ b/keyboards/durgod/k3x0/k320/config.h @@ -0,0 +1,33 @@ +/* Copyright 2021 Don Kjer and Tyler Tidman + * Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 PRODUCT_ID 0x3200 +// Taurus K320 models: +//#define DEVICE_VER 0x0001 // Base (no backlight) +//#define DEVICE_VER 0x0002 // Corona (white led matrix) +//#define DEVICE_VER 0x0003 // Aurora (red & blue led matrix) +//#define DEVICE_VER 0x0004 // Nebula (rgb led matrix) + +/* key matrix size (cols in generic keyboard config) */ +#define MATRIX_ROWS 7 + +#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4, A5, A6 } diff --git a/keyboards/durgod/k3x0/k320/info.json b/keyboards/durgod/k3x0/k320/info.json new file mode 100644 index 000000000..d360778ed --- /dev/null +++ b/keyboards/durgod/k3x0/k320/info.json @@ -0,0 +1,415 @@ +{ + "keyboard_name": "DURGOD Taurus K320", + "url": "https://www.durgod.com/page9?product_id=47&_l=en", + "maintainer": "dkjer", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "Enter", "x": 12.75, "y": 3.5, "w": 2.25 }, + + { "label": "Shift", "x": 0, "y": 4.5, "w": 2.25 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "\u2191", "x": 16.25, "y": 4.5 }, + + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, + { "x": 3.75, "y": 5.5, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, + { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "x": 17.25, "y": 5.5 } + ] + }, + "LAYOUT_tkl_iso": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "#", "x": 12.75, "y": 3.5 }, + { "label": "Enter", "x": 13.75, "y": 2.5, "w": 1.25, "h": 2 }, + + { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "label": "\\", "x": 1.25, "y": 4.5 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "\u2191", "x": 16.25, "y": 4.5 }, + + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, + { "x": 3.75, "y": 5.5, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, + { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "x": 17.25, "y": 5.5 } + ] + }, + "LAYOUT_tkl": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "#", "x": 12.75, "y": 3.5 }, + { "label": "Enter", "x": 13.75, "y": 3.5, "w": 1.25 }, + + { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "label": "\\", "x": 1.25, "y": 4.5 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "\u2191", "x": 16.25, "y": 4.5 }, + + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, + { "x": 3.75, "y": 5.5, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, + { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "x": 17.25, "y": 5.5 } + ] + }, + "LAYOUT_all": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + + { "label": "~", "x": 0, "y": 1.5 }, + { "label": "!", "x": 1, "y": 1.5 }, + { "label": "@", "x": 2, "y": 1.5 }, + { "label": "#", "x": 3, "y": 1.5 }, + { "label": "$", "x": 4, "y": 1.5 }, + { "label": "%", "x": 5, "y": 1.5 }, + { "label": "^", "x": 6, "y": 1.5 }, + { "label": "&", "x": 7, "y": 1.5 }, + { "label": "*", "x": 8, "y": 1.5 }, + { "label": "(", "x": 9, "y": 1.5 }, + { "label": ")", "x": 10, "y": 1.5 }, + { "label": "_", "x": 11, "y": 1.5 }, + { "label": "+", "x": 12, "y": 1.5 }, + { "label": "Backspace", "x": 13, "y": 1.5, "w": 2 }, + { "label": "Insert", "x": 15.25, "y": 1.5 }, + { "label": "Home", "x": 16.25, "y": 1.5 }, + { "label": "PgUp", "x": 17.25, "y": 1.5 }, + { "label": "Num Lock", "x": 18.5, "y": 1.5 }, + { "label": "/", "x": 19.5, "y": 1.5 }, + { "label": "*", "x": 20.5, "y": 1.5 }, + { "label": "-", "x": 21.5, "y": 1.5 }, + + { "label": "Tab", "x": 0, "y": 2.5, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.5 }, + { "label": "W", "x": 2.5, "y": 2.5 }, + { "label": "E", "x": 3.5, "y": 2.5 }, + { "label": "R", "x": 4.5, "y": 2.5 }, + { "label": "T", "x": 5.5, "y": 2.5 }, + { "label": "Y", "x": 6.5, "y": 2.5 }, + { "label": "U", "x": 7.5, "y": 2.5 }, + { "label": "I", "x": 8.5, "y": 2.5 }, + { "label": "O", "x": 9.5, "y": 2.5 }, + { "label": "P", "x": 10.5, "y": 2.5 }, + { "label": "{", "x": 11.5, "y": 2.5 }, + { "label": "}", "x": 12.5, "y": 2.5 }, + { "label": "|", "x": 13.5, "y": 2.5, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.5 }, + { "label": "End", "x": 16.25, "y": 2.5 }, + { "label": "PgDn", "x": 17.25, "y": 2.5 }, + { "label": "7", "x": 18.5, "y": 2.5 }, + { "label": "8", "x": 19.5, "y": 2.5 }, + { "label": "9", "x": 20.5, "y": 2.5 }, + { "label": "+", "x": 21.5, "y": 2.5, "h": 2 }, + + { "label": "Caps Lock", "x": 0, "y": 3.5, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.5 }, + { "label": "S", "x": 2.75, "y": 3.5 }, + { "label": "D", "x": 3.75, "y": 3.5 }, + { "label": "F", "x": 4.75, "y": 3.5 }, + { "label": "G", "x": 5.75, "y": 3.5 }, + { "label": "H", "x": 6.75, "y": 3.5 }, + { "label": "J", "x": 7.75, "y": 3.5 }, + { "label": "K", "x": 8.75, "y": 3.5 }, + { "label": "L", "x": 9.75, "y": 3.5 }, + { "label": ":", "x": 10.75, "y": 3.5 }, + { "label": "\"", "x": 11.75, "y": 3.5 }, + { "label": "#", "x": 12.75, "y": 3.5 }, + { "label": "Enter", "x": 13.75, "y": 3.5, "w": 1.25 }, + { "label": "4", "x": 18.5, "y": 3.5 }, + { "label": "5", "x": 19.5, "y": 3.5 }, + { "label": "6", "x": 20.5, "y": 3.5 }, + + { "label": "Shift", "x": 0, "y": 4.5, "w": 1.25 }, + { "label": "\\", "x": 1.25, "y": 4.5 }, + { "label": "Z", "x": 2.25, "y": 4.5 }, + { "label": "X", "x": 3.25, "y": 4.5 }, + { "label": "C", "x": 4.25, "y": 4.5 }, + { "label": "V", "x": 5.25, "y": 4.5 }, + { "label": "B", "x": 6.25, "y": 4.5 }, + { "label": "N", "x": 7.25, "y": 4.5 }, + { "label": "M", "x": 8.25, "y": 4.5 }, + { "label": "<", "x": 9.25, "y": 4.5 }, + { "label": ">", "x": 10.25, "y": 4.5 }, + { "label": "?", "x": 11.25, "y": 4.5 }, + { "label": "Shift", "x": 12.25, "y": 4.5, "w": 2.75 }, + { "label": "\u2191", "x": 16.25, "y": 4.5 }, + { "label": "1", "x": 18.5, "y": 4.5 }, + { "label": "2", "x": 19.5, "y": 4.5 }, + { "label": "3", "x": 20.5, "y": 4.5 }, + { "label": "Enter", "x": 21.5, "y": 4.5, "h": 2 }, + + { "label": "Ctrl", "x": 0, "y": 5.5, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.5, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.5, "w": 1.25 }, + { "x": 3.75, "y": 5.5, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.5, "w": 1.25 }, + { "label": "Fn", "x": 11.25, "y": 5.5, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.5, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.5, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.5 }, + { "label": "\u2193", "x": 16.25, "y": 5.5 }, + { "label": "\u2192", "x": 17.25, "y": 5.5 }, + { "label": "0", "x": 18.5, "y": 5.5, "w": 2 }, + { "label": ".", "x": 20.5, "y": 5.5 } + ] + } + } +} diff --git a/keyboards/durgod/k3x0/k320/k320.h b/keyboards/durgod/k3x0/k320/k320.h new file mode 100644 index 000000000..23b48d0f3 --- /dev/null +++ b/keyboards/durgod/k3x0/k320/k320.h @@ -0,0 +1,92 @@ +/* Copyright 2021 Don Kjer and Tyler Tidman + * Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 XXX KC_NO + +// This a shortcut to help you visually see your layout. +#define LAYOUT_tkl_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K4E, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E, K3F }, \ + { K40, XXX, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \ + { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \ +} + +// This a shortcut to help you visually see your layout. +#define LAYOUT_tkl_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K3D, K3E, K3F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K4E, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, XXX, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \ + { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \ +} + +// This a shortcut to help you visually see your layout. +#define LAYOUT_tkl( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K4E, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \ + { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, K6F } \ +} + +// This a shortcut to help you visually see your layout. +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K2E, K2F, K1F, K6A, K69, K68, K67, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K3D, K3E, K3F, K7A, K79, K78, K6B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K4E, K7E, K7D, K7C, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4F, K6E, K6D, K6C, K7B, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E, K5F, K6F, K7F, K77 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, XXX, K4D, K4E, K4F }, \ + { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F } \ +} diff --git a/keyboards/durgod/k320/keymaps/kuenhlee/keymap.c b/keyboards/durgod/k3x0/k320/keymaps/kuenhlee/keymap.c similarity index 100% rename from keyboards/durgod/k320/keymaps/kuenhlee/keymap.c rename to keyboards/durgod/k3x0/k320/keymaps/kuenhlee/keymap.c diff --git a/keyboards/durgod/k320/keymaps/kuenhlee/readme.md b/keyboards/durgod/k3x0/k320/keymaps/kuenhlee/readme.md similarity index 100% rename from keyboards/durgod/k320/keymaps/kuenhlee/readme.md rename to keyboards/durgod/k3x0/k320/keymaps/kuenhlee/readme.md diff --git a/keyboards/durgod/k320/keymaps/kuenhlee/rules.mk b/keyboards/durgod/k3x0/k320/keymaps/kuenhlee/rules.mk similarity index 100% rename from keyboards/durgod/k320/keymaps/kuenhlee/rules.mk rename to keyboards/durgod/k3x0/k320/keymaps/kuenhlee/rules.mk diff --git a/keyboards/durgod/k3x0/k320/readme.md b/keyboards/durgod/k3x0/k320/readme.md new file mode 100644 index 000000000..e584bd187 --- /dev/null +++ b/keyboards/durgod/k3x0/k320/readme.md @@ -0,0 +1,10 @@ +# Taurus K320 + +This code is shared between all K320 variants. Currently only the base model with no backlight is supported. + +* Keyboard Maintainers: [dkjer](https://github.com/dkjer) and [tylert](https://github.com/tylert) +* Hardware Supported: Durgod Taurus K320 board with STM32F070RBT6 +* Hardware Availability: Base https://www.amazon.com/Durgod-Taurus-Corona-Mechanical-Keyboard/dp/B078H3WPHM + +Instructions for building the K320 firmware can be found here: +* [No Backlight](base/readme.md) diff --git a/keyboards/durgod/k3x0/k320/rules.mk b/keyboards/durgod/k3x0/k320/rules.mk new file mode 100644 index 000000000..fabc0854f --- /dev/null +++ b/keyboards/durgod/k3x0/k320/rules.mk @@ -0,0 +1,4 @@ +# Default to the base model +DEFAULT_FOLDER=durgod/k3x0/k320/base + +LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/durgod/k3x0/k3x0.c b/keyboards/durgod/k3x0/k3x0.c new file mode 100644 index 000000000..d12b46bc5 --- /dev/null +++ b/keyboards/durgod/k3x0/k3x0.c @@ -0,0 +1,96 @@ +/* Copyright 2021 kuenhlee, Don Kjer, Tyler Tidman + * Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "k3x0.h" +#include +#include + +/* Private Functions */ +void off_all_leds(void) { +#ifdef LED_NUM_LOCK_PIN + writePinHigh(LED_NUM_LOCK_PIN); +#endif + writePinHigh(LED_CAPS_LOCK_PIN); + writePinHigh(LED_SCROLL_LOCK_PIN); + writePinHigh(LED_WIN_LOCK_PIN); + writePinHigh(LED_MR_LOCK_PIN); +} + +void on_all_leds(void) { +#ifdef LED_NUM_LOCK_PIN + writePinLow(LED_NUM_LOCK_PIN); +#endif + writePinLow(LED_CAPS_LOCK_PIN); + writePinLow(LED_SCROLL_LOCK_PIN); + writePinLow(LED_WIN_LOCK_PIN); + writePinLow(LED_MR_LOCK_PIN); +} + +/* WinLock and MR LEDs are non-standard. Need to override led init */ +void led_init_ports(void) { +#ifdef LED_NUM_LOCK_PIN + setPinOutput(LED_NUM_LOCK_PIN); +#endif + setPinOutput(LED_CAPS_LOCK_PIN); + setPinOutput(LED_SCROLL_LOCK_PIN); + setPinOutput(LED_WIN_LOCK_PIN); + setPinOutput(LED_MR_LOCK_PIN); + off_all_leds(); +} + +#ifndef WINLOCK_DISABLED +static bool win_key_locked = false; + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_TGUI: + if (record->event.pressed) { + // Toggle GUI lock on key press + win_key_locked = !win_key_locked; + writePin(LED_WIN_LOCK_PIN, !win_key_locked); + } + break; + case KC_LGUI: + if (win_key_locked) { return false; } + break; + } + return process_record_user(keycode, record); +} +#endif /* WINLOCK_DISABLED */ + +#ifndef HW_RESET_PIN_DISABLED +static void hardware_reset_cb(void *arg) { + chSysLockFromISR(); + bootloader_jump(); + chSysUnlockFromISR(); +} +#endif + +void keyboard_pre_init_kb(void) { + setPinInputHigh(HARDWARE_RESET_PIN); + +#ifndef HW_RESET_PIN_DISABLED + /* Jump to bootloader when the hardware reset button is pressed */ + palEnablePadEvent(PAL_PORT(HARDWARE_RESET_PIN), PAL_PAD(HARDWARE_RESET_PIN), PAL_EVENT_MODE_FALLING_EDGE); + palSetPadCallback(PAL_PORT(HARDWARE_RESET_PIN), PAL_PAD(HARDWARE_RESET_PIN), hardware_reset_cb, NULL); + + /* The interrupt is edge-triggered so check that it's not already pressed */ + if (!readPin(HARDWARE_RESET_PIN)) { + bootloader_jump(); + } +#endif +} diff --git a/keyboards/durgod/k3x0/k3x0.h b/keyboards/durgod/k3x0/k3x0.h new file mode 100644 index 000000000..93740a551 --- /dev/null +++ b/keyboards/durgod/k3x0/k3x0.h @@ -0,0 +1,47 @@ +/* Copyright 2021 kuenhlee, Don Kjer, Tyler Tidman + * Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +#ifdef KEYBOARD_durgod_k3x0_k310 +# include "k310.h" +#elif KEYBOARD_durgod_k3x0_k320 +# include "k320.h" +#endif + +#ifndef WINLOCK_DISABLED +// Define the TGUI key here so it is available in QMK configurator +enum K3x0_keycodes { +#ifdef VIA_ENABLE + KC_TGUI = USER00, // Toggle between GUI Lock or Unlock + NEW_SAFE_RANGE = SAFE_RANGE +#else + KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock + NEW_SAFE_RANGE +#endif +}; + +#undef SAFE_RANGE +#define SAFE_RANGE NEW_SAFE_RANGE +#endif /* WINLOCK_DISABLED */ + +/* Function Prototype */ +void off_all_leds(void); +void on_all_leds(void); + diff --git a/keyboards/durgod/k3x0/keymaps/chimera/keymap.c b/keyboards/durgod/k3x0/keymaps/chimera/keymap.c new file mode 100644 index 000000000..8053da351 --- /dev/null +++ b/keyboards/durgod/k3x0/keymaps/chimera/keymap.c @@ -0,0 +1,373 @@ +/* Copyright 2021 Don Kjer and Tyler Tidman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +// Layer shorthand +enum _layer { + _WBL, + _WFL, + _WSL, + _MBL, + _MFL, + _MSL +}; + +#ifndef DEFAULT_LAYOUT +# define DEFAULT_LAYOUT _WBL // Change to _MBL to boot into Mac layout. +#endif +#ifndef ALT_LAYOUT +# define ALT_LAYOUT _MBL // Layout to display 'MR' led when active. +#endif + +static bool win_key_locked = false; +static bool mac_media_locked = false; +static bool win_appkey_pressed = false; +static bool mac_fnkey_pressed = false; + + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock (Windows) + KC_TMED, // Toggle between Fx keys or Media keys (Mac) + KC_WFN, // Windows function key + KC_MFN, // Mac function key + MO_WSL, // Windows system key + MO_MSL, // Mac system key + DF_W2MBL, // Change layout from Windows to Mac + DF_M2WBL // Change layout from Mac to Windows +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _WBL: Windows Base Layer (Default Layer) + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│GUI │Alt │ │ Alt│Func│ App│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_WBL] = LAYOUT_all( /* Windows Base Layer */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WFN, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + /* Keymap _WFL: Windows Function Layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │ │ │Ply│Stp│Prv│Nxt│ │Mut│Vo+│Vo-│ │ │ │ │ │ │ │ │ │Mut│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo+│ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo-│ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ + * │ │Lock│ │ │ │Func│ Sys│ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_WFL] = LAYOUT_all( /* Windows Function Layer */ + _______, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_TGUI, _______, _______, _______, _______, MO_WSL, _______, _______, _______, _______, _______, _______ + ), + /* Keymap _WSL: Windows System Layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Rst│ │Slp│ │ │Pwr│ │ │ │ │ │ │ │ │ │MAC│ │ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │ + * │ │ │ │DBG│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_WSL] = LAYOUT_all( /* Windows Second / System Layer */ + RESET, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_W2MBL, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* Keymap _MBL: Mac Base Layer (Alternate Layout) + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │F13│F14│F15│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│Alt │GUI │ │ GUI│ Alt│Func│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_MBL] = LAYOUT_all( /* Mac Base Layer */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MFN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + /* Keymap _MFL: Mac Function Layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │ │ │Br-│Br+│ │ │ │ │ │Prv│Ply│ │Nxt│Mut│Vo-│Vo+│ │TMd│ │Mut│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo+│ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo-│ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ + * │ │ │ │ │ │ Sys│Func│ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_MFL] = LAYOUT_all( /* Mac Function Layer */ + _______, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TMED, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, MO_MSL, _______, _______, _______, _______, _______, _______, _______ + ), + /* Keymap _MSL: Mac System Layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Rst│ │ │ │ │Slp│ │ │ │ │ │ │ │ │ │WIN│ │ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │ + * │ │ │ │DBG│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ + * │ │ │ │ │ │ Sys│Func│ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_MSL] = LAYOUT_all( /* Mac Second / System Layer */ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_M2WBL, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +void unlock_win_key(void) { + win_key_locked = false; + mac_media_locked = false; + writePinHigh(LED_WIN_LOCK_PIN); +} + +void toggle_lock_win_key(void) { + win_key_locked = !win_key_locked; + writePin(LED_WIN_LOCK_PIN, !win_key_locked); +} + +void toggle_lock_media_key(void) { + mac_media_locked = !mac_media_locked; + writePin(LED_WIN_LOCK_PIN, !mac_media_locked); +} + +#ifdef CONSOLE_ENABLE +void dprint_global_layers(void) { + dprint("Global Layers:"); + if (IS_LAYER_ON(_WFL)) { dprint(" _WFL"); } + if (IS_LAYER_ON(_WSL)) { dprint(" _WSL"); } + if (IS_LAYER_ON(_MFL)) { dprint(" _MFL"); } + if (IS_LAYER_ON(_MSL)) { dprint(" _MSL"); } + dprintf("\n"); +} + +void dprint_layers(layer_state_t state) { + dprint("Layers:"); + if (IS_LAYER_ON_STATE(state, _WFL)) { dprint(" _WFL"); } + if (IS_LAYER_ON_STATE(state, _WSL)) { dprint(" _WSL"); } + if (IS_LAYER_ON_STATE(state, _MFL)) { dprint(" _MFL"); } + if (IS_LAYER_ON_STATE(state, _MSL)) { dprint(" _MSL"); } + dprintf("\n"); +} +#endif + +layer_state_t default_layer_state_set_user(layer_state_t state) { +#ifdef CONSOLE_ENABLE + dprintf("default_layer_state_set_user: 0x%x\n", state); + dprint_global_layers(); +#endif + // Disable windows key lock on default layer transition. + unlock_win_key(); + win_appkey_pressed = false; + mac_fnkey_pressed = false; + writePin(LED_MR_LOCK_PIN, !IS_LAYER_ON_STATE(state, ALT_LAYOUT)); + return state; +} + +layer_state_t layer_state_set_user(layer_state_t state) { +#ifdef CONSOLE_ENABLE + dprintf("layer_state_set_user: 0x%x\n", state); + dprint_layers(state); +#endif + return state; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_TGUI: + if (!record->event.pressed) { + // Toggle GUI lock on key release + toggle_lock_win_key(); + } + break; + case KC_TMED: + // Only trigger when Fn key is also held down, to avoid accidental unlock. + if (!mac_fnkey_pressed) { return false; } + if (!record->event.pressed) { + // Toggle Media Lock on key release + toggle_lock_media_key(); + } + break; + case KC_LGUI: + if (win_key_locked) { return false; } + break; + case KC_WFN: + // Like MO(_WFL), but also enables _WSL if KC_APP is already pressed down. + if (record->event.pressed) { + layer_on(_WFL); + if (win_appkey_pressed) { + // Also enable Secondary layer if App key is being held down. + win_appkey_pressed = false; + layer_on(_WSL); + } + } else { + if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); } + if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); } + } + break; + case KC_APP: + if (record->event.pressed) { + // Don't actually press down the app menu key + win_appkey_pressed = true; + } else { + if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); } + if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); } + if (win_appkey_pressed) { + win_appkey_pressed = false; + // Tap the KC_APP key on key release. + tap_code(KC_APP); + } + } + return false; + break; + case KC_MFN: + // Mac Fn key. Emit Fn keycode, and also transition layers similar to KC_WFN. + if (record->event.pressed) { + mac_fnkey_pressed = true; + layer_on(_MFL); + // Also enable Secondary layer if Right-Alt key is being held down. + if (get_mods() & MOD_BIT(KC_RALT)) { + layer_on(_MSL); + } + } else { + mac_fnkey_pressed = false; + if (!mac_media_locked) { + if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); } + if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); } + } + } + break; + case KC_RALT: + // Disable MSL/WFL layer on key-up. + if (!record->event.pressed) { + if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); } + if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); } + } + break; + case MO_WSL: + if (record->event.pressed) { + layer_on(_WSL); + } else { + if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); } + if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); } + } + break; + case MO_MSL: + if (record->event.pressed) { + layer_on(_MSL); + } else { + if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); } + if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); } + } + break; + case DF_W2MBL: + if (!record->event.pressed) { + // Switch base layer, but preserve first/secondary layers. + default_layer_set(1UL<<_MBL); + layer_state_set(1UL<<_MFL | 1UL<<_MSL); + } + break; + case DF_M2WBL: + if (!record->event.pressed) { + // Switch base layer, but preserve first/secondary layers. + default_layer_set(1UL<<_WBL); + layer_state_set(1UL<<_WFL | 1UL<<_WSL); + } + break; + case RESET: + if (record->event.pressed) { + // Flash LEDs to indicate bootloader mode is enabled. + on_all_leds(); + } + break; + } + return true; +} + +void keyboard_post_init_user(void) { + default_layer_set(1UL<. + */ + +#include QMK_KEYBOARD_H + +// Layer shorthand +enum _layer { + _WBL, + _WFL, + _WSL, + _MBL, + _MFL, + _MSL +}; + +#ifndef DEFAULT_LAYOUT +# define DEFAULT_LAYOUT _WBL // Change to _MBL to boot into Mac layout. +#endif +#ifndef ALT_LAYOUT +# define ALT_LAYOUT _MBL // Layout to display 'MR' led when active. +#endif + +static bool win_key_locked = false; +static bool mac_media_locked = false; +static bool win_appkey_pressed = false; +static bool mac_fnkey_pressed = false; + + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock (Windows) + KC_TMED, // Toggle between Fx keys or Media keys (Mac) + KC_WFN, // Windows function key + KC_MFN, // Mac function key + MO_WSL, // Windows system key + MO_MSL, // Mac system key + DF_W2MBL, // Change layout from Windows to Mac + DF_M2WBL // Change layout from Mac to Windows +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _WBL: Windows Base Layer (Default Layer) + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│ │M1 │M3 │M2 │M4 │ │M1 │M3 │M2 │M4 │ │M1 │M3 │M2 │M4 │ │PSc│Slk│Pse│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│GUI │Alt │ │ Alt│Func│ App│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_WBL] = LAYOUT_all( /* Windows Base Layer */ + KC_ESC, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WFN, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + /* Keymap _WFL: Windows Function Layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │ │ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │ │ │Mut│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo+│ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo-│ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ + * │ │Lock│ │ │ │Func│ Sys│ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_WFL] = LAYOUT_all( /* Windows Function Layer */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_TGUI, _______, _______, _______, _______, MO_WSL, _______, _______, _______, _______, _______, _______ + ), + /* Keymap _WSL: Windows System Layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Rst│ │Slp│ │ │Pwr│ │ │ │ │ │ │ │ │ │MAC│ │ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │ + * │ │ │ │DBG│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_WSL] = LAYOUT_all( /* Windows Second / System Layer */ + RESET, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_W2MBL, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* Keymap _MBL: Mac Base Layer (Alternate Layout) + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│ │M1 │M3 │M2 │M4 │ │M1 │M3 │M2 │M4 │ │M1 │M3 │M2 │M4 │ │F13│F14│F15│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│Alt │GUI │ │ GUI│ Alt│Func│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_MBL] = LAYOUT_all( /* Mac Base Layer */ + KC_ESC, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_F13, KC_F14, KC_F15, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MFN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + /* Keymap _MFL: Mac Function Layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │ │ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │TMd│ │Mut│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo+│ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo-│ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ + * │ │ │ │ │ │ Sys│Func│ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_MFL] = LAYOUT_all( /* Mac Function Layer */ + _______, 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_TMED, _______, KC_MUTE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, MO_MSL, _______, _______, _______, _______, _______, _______, _______ + ), + /* Keymap _MSL: Mac System Layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Rst│ │ │ │ │Slp│ │ │ │ │ │ │ │ │ │WIN│ │ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │ + * │ │ │ │DBG│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ + * │ │ │ │ │ │ Sys│Func│ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_MSL] = LAYOUT_all( /* Mac Second / System Layer */ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_M2WBL, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ) +}; + +void unlock_win_key(void) { + win_key_locked = false; + mac_media_locked = false; + writePinHigh(LED_WIN_LOCK_PIN); +} + +void toggle_lock_win_key(void) { + win_key_locked = !win_key_locked; + writePin(LED_WIN_LOCK_PIN, !win_key_locked); +} + +void toggle_lock_media_key(void) { + mac_media_locked = !mac_media_locked; + writePin(LED_WIN_LOCK_PIN, !mac_media_locked); +} + +#ifdef CONSOLE_ENABLE +void dprint_global_layers(void) { + dprint("Global Layers:"); + if (IS_LAYER_ON(_WFL)) { dprint(" _WFL"); } + if (IS_LAYER_ON(_WSL)) { dprint(" _WSL"); } + if (IS_LAYER_ON(_MFL)) { dprint(" _MFL"); } + if (IS_LAYER_ON(_MSL)) { dprint(" _MSL"); } + dprintf("\n"); +} + +void dprint_layers(layer_state_t state) { + dprint("Layers:"); + if (IS_LAYER_ON_STATE(state, _WFL)) { dprint(" _WFL"); } + if (IS_LAYER_ON_STATE(state, _WSL)) { dprint(" _WSL"); } + if (IS_LAYER_ON_STATE(state, _MFL)) { dprint(" _MFL"); } + if (IS_LAYER_ON_STATE(state, _MSL)) { dprint(" _MSL"); } + dprintf("\n"); +} +#endif + +layer_state_t default_layer_state_set_user(layer_state_t state) { +#ifdef CONSOLE_ENABLE + dprintf("default_layer_state_set_user: 0x%x\n", state); + dprint_global_layers(); +#endif + // Disable windows key lock on default layer transition. + unlock_win_key(); + win_appkey_pressed = false; + mac_fnkey_pressed = false; + writePin(LED_MR_LOCK_PIN, !IS_LAYER_ON_STATE(state, ALT_LAYOUT)); + return state; +} + +layer_state_t layer_state_set_user(layer_state_t state) { +#ifdef CONSOLE_ENABLE + dprintf("layer_state_set_user: 0x%x\n", state); + dprint_layers(state); +#endif + return state; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_TGUI: + if (!record->event.pressed) { + // Toggle GUI lock on key release + toggle_lock_win_key(); + } + break; + case KC_TMED: + // Only trigger when Fn key is also held down, to avoid accidental unlock. + if (!mac_fnkey_pressed) { return false; } + if (!record->event.pressed) { + // Toggle Media Lock on key release + toggle_lock_media_key(); + } + break; + case KC_LGUI: + if (win_key_locked) { return false; } + break; + case KC_WFN: + // Like MO(_WFL), but also enables _WSL if KC_APP is already pressed down. + if (record->event.pressed) { + layer_on(_WFL); + if (win_appkey_pressed) { + // Also enable Secondary layer if App key is being held down. + win_appkey_pressed = false; + layer_on(_WSL); + } + } else { + if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); } + if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); } + } + break; + case KC_APP: + if (record->event.pressed) { + // Don't actually press down the app menu key + win_appkey_pressed = true; + } else { + if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); } + if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); } + if (win_appkey_pressed) { + win_appkey_pressed = false; + // Tap the KC_APP key on key release. + tap_code(KC_APP); + } + } + return false; + break; + case KC_MFN: + // Mac Fn key. Emit Fn keycode, and also transition layers similar to KC_WFN. + if (record->event.pressed) { + mac_fnkey_pressed = true; + layer_on(_MFL); + // Also enable Secondary layer if Right-Alt key is being held down. + if (get_mods() & MOD_BIT(KC_RALT)) { + layer_on(_MSL); + } + } else { + mac_fnkey_pressed = false; + if (!mac_media_locked) { + if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); } + if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); } + } + } + break; + case KC_RALT: + // Disable MSL/WFL layer on key-up. + if (!record->event.pressed) { + if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); } + if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); } + } + break; + case MO_WSL: + if (record->event.pressed) { + layer_on(_WSL); + } else { + if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); } + if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); } + } + break; + case MO_MSL: + if (record->event.pressed) { + layer_on(_MSL); + } else { + if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); } + if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); } + } + break; + case DF_W2MBL: + if (!record->event.pressed) { + // Switch base layer, but preserve first/secondary layers. + default_layer_set(1UL<<_MBL); + layer_state_set(1UL<<_MFL | 1UL<<_MSL); + } + break; + case DF_M2WBL: + if (!record->event.pressed) { + // Switch base layer, but preserve first/secondary layers. + default_layer_set(1UL<<_WBL); + layer_state_set(1UL<<_WFL | 1UL<<_WSL); + } + break; + case RESET: + if (record->event.pressed) { + // Flash LEDs to indicate bootloader mode is enabled. + on_all_leds(); + } + break; + } + return true; +} + +void keyboard_post_init_user(void) { + default_layer_set(1UL<. + */ + +#include QMK_KEYBOARD_H + +// Layer shorthand +enum _layer { + _BASE, + _FN, + _LAYER3, + _LAYER4 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BASE: Base Layer (Default Layer) + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │ + * │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│ + * │Ctrl│GUI │Alt │ │ Alt│Func│ App│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_BASE] = LAYOUT_all( /* Base Layer */ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT + ), + /* Keymap _FN: Function Layer + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │ │ │Ply│Stp│Prv│Nxt│ │Mut│Vo+│Vo-│ │ │ │ │ │ │ │ │ │ │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │ + * │ │Lock│ │ │ │Func│ Sys│ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ + */ + [_FN] = LAYOUT_all( /* Function Layer */ + _______, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_TGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_LAYER3] = LAYOUT_all( /* Layer 3 */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_LAYER4] = LAYOUT_all( /* Layer 4 */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/durgod/k3x0/keymaps/via/readme.md b/keyboards/durgod/k3x0/keymaps/via/readme.md new file mode 100644 index 000000000..ffa1c4ce0 --- /dev/null +++ b/keyboards/durgod/k3x0/keymaps/via/readme.md @@ -0,0 +1,6 @@ +# The via keymap for Durgod Taurus K310/K320. + +Layer 0 : Standard layout + +Layer 1 : Media control +- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7 diff --git a/keyboards/tokyo60/keymaps/via/rules.mk b/keyboards/durgod/k3x0/keymaps/via/rules.mk similarity index 100% rename from keyboards/tokyo60/keymaps/via/rules.mk rename to keyboards/durgod/k3x0/keymaps/via/rules.mk diff --git a/keyboards/durgod/k3x0/readme.md b/keyboards/durgod/k3x0/readme.md new file mode 100644 index 000000000..cbb170160 --- /dev/null +++ b/keyboards/durgod/k3x0/readme.md @@ -0,0 +1,51 @@ +# K3X0 = K310, K320, etc. + +This K3X0 code is shared between both the ANSI and ISO variants of both the +K310 full-sized 104/105-key and K320 TKL 87/88-key keyboards. + +* Keyboard Maintainers: [dkjer](https://github.com/dkjer) and [tylert](https://github.com/tylert) +* Hardware Supported: Durgod Taurus K310 or K320 board with STM32F070RBT6 +* Hardware Availability: K310 https://www.durgod.com/page9?product_id=53&_l=en + and K320 https://www.durgod.com/page9?product_id=47&_l=en + +## Instructions + +### Build + +Instructions for building the K310 and K320 firmware can be found here: +* [K310](k310/readme.md) +* [K320](k320/readme.md) + +### Initial Flash + +For first Flashing from initial Stock Firmware + +1. Back up original Firmware Image: +- Unplug +- Short Boot0 to Vdd (See below) +- Plug In USB +- Make a Flash Image's Backup in case you wanted to restore the Keyboard to Stock's Image: + - Using dfu-util: + + dfu-util --list + dfu-util --alt 0 --dfuse-address 0x08000000 --upload ${OLD_STOCK_BIN} + +2. Flash the QMK Firmware Image. +- Put board into Bootloader mode, using the same method as when backing up the original Firmware (above) +- Here are a few options for performing the initial Flash: + - Using [QMK Toolbox](https://github.com/qmk/qmk_toolbox) + - Using dfu-util: + + dfu-util --alt 0 --dfuse-address 0x08000000 --download ${NEW_QMK_BIN} + +You can short Boot0 to Vdd by shorting R21 to C27 on the sides closest to the processor, as shown: + +Shorting Boot0 to Vdd on K320 + +### Subsequent Flashing + +For repeating Flashing you can use BootMagic: +- BootMagic Lite has been enabled with Assigned "Esc" key +- Unplug USB Cable +- Holding Esc Button +- Plug in USB Cable, Keyboard should be in ST-Bootloader state diff --git a/keyboards/durgod/k3x0/rules.mk b/keyboards/durgod/k3x0/rules.mk new file mode 100644 index 000000000..558faef53 --- /dev/null +++ b/keyboards/durgod/k3x0/rules.mk @@ -0,0 +1,28 @@ +# Default to K310 variant, since it will also work on a K320 +DEFAULT_FOLDER=durgod/k3x0/k310 + +# MCU name +# Actually F070, but close enough +MCU = STM32F072 +BOARD = DURGOD_STM32_F070 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes diff --git a/keyboards/durgod/venus/readme.md b/keyboards/durgod/venus/readme.md new file mode 100644 index 000000000..c2228583a --- /dev/null +++ b/keyboards/durgod/venus/readme.md @@ -0,0 +1,3 @@ +# Venus + +See: [Venus](../dgk6x/venus/readme.md) diff --git a/keyboards/durgod/venus/rules.mk b/keyboards/durgod/venus/rules.mk new file mode 100644 index 000000000..57acf2a48 --- /dev/null +++ b/keyboards/durgod/venus/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER=durgod/dgk6x/venus diff --git a/keyboards/dz60/keymaps/LEdiodes/rules.mk b/keyboards/dz60/keymaps/LEdiodes/rules.mk index 251d25fad..2dbd6bd5d 100644 --- a/keyboards/dz60/keymaps/LEdiodes/rules.mk +++ b/keyboards/dz60/keymaps/LEdiodes/rules.mk @@ -1,7 +1,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/dz60/keymaps/billypython/rules.mk b/keyboards/dz60/keymaps/billypython/rules.mk index 332613604..3b7016f57 100644 --- a/keyboards/dz60/keymaps/billypython/rules.mk +++ b/keyboards/dz60/keymaps/billypython/rules.mk @@ -1,5 +1,5 @@ BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/dz60/keymaps/coppertop/rules.mk b/keyboards/dz60/keymaps/coppertop/rules.mk index 279054837..7b4abdbc1 100644 --- a/keyboards/dz60/keymaps/coppertop/rules.mk +++ b/keyboards/dz60/keymaps/coppertop/rules.mk @@ -1 +1 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite diff --git a/keyboards/dz60/keymaps/default_abnt2/keymap.c b/keyboards/dz60/keymaps/default_abnt2/keymap.c index d6273780f..3ed1484bd 100644 --- a/keyboards/dz60/keymaps/default_abnt2/keymap.c +++ b/keyboards/dz60/keymaps/default_abnt2/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_60_abnt2( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BR_ACUT, BR_LBRC, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCDL, BR_TILD, BR_RBRC, KC_ENT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCED, BR_TILD, BR_RBRC, KC_ENT, KC_LSFT, BR_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, BR_SCLN, BR_SLSH, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL), diff --git a/keyboards/dz60/keymaps/hailbreno/rules.mk b/keyboards/dz60/keymaps/hailbreno/rules.mk index ad188f7dd..975bfbbbc 100644 --- a/keyboards/dz60/keymaps/hailbreno/rules.mk +++ b/keyboards/dz60/keymaps/hailbreno/rules.mk @@ -1,2 +1,2 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) \ No newline at end of file diff --git a/keyboards/dz60/keymaps/iso_de_andys8/rules.mk b/keyboards/dz60/keymaps/iso_de_andys8/rules.mk index b5f45d7aa..0aa5b7946 100644 --- a/keyboards/dz60/keymaps/iso_de_andys8/rules.mk +++ b/keyboards/dz60/keymaps/iso_de_andys8/rules.mk @@ -1,7 +1,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/dz60/keymaps/iso_de_root/rules.mk b/keyboards/dz60/keymaps/iso_de_root/rules.mk index 0dcfa1b71..2f8792070 100644 --- a/keyboards/dz60/keymaps/iso_de_root/rules.mk +++ b/keyboards/dz60/keymaps/iso_de_root/rules.mk @@ -1,7 +1,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/dz60/keymaps/iso_vim_arrow/rules.mk b/keyboards/dz60/keymaps/iso_vim_arrow/rules.mk index b5f45d7aa..0aa5b7946 100644 --- a/keyboards/dz60/keymaps/iso_vim_arrow/rules.mk +++ b/keyboards/dz60/keymaps/iso_vim_arrow/rules.mk @@ -1,7 +1,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/rules.mk b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/rules.mk index 3bfdaadaf..4b8068fe7 100644 --- a/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/rules.mk +++ b/keyboards/dz60/keymaps/iso_vim_arrow_split_rs/rules.mk @@ -1,7 +1,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no diff --git a/keyboards/dz60/keymaps/kifinnsson/rules.mk b/keyboards/dz60/keymaps/kifinnsson/rules.mk index 5fb201c88..187425861 100644 --- a/keyboards/dz60/keymaps/kifinnsson/rules.mk +++ b/keyboards/dz60/keymaps/kifinnsson/rules.mk @@ -1,6 +1,6 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) \ No newline at end of file diff --git a/keyboards/dz60/keymaps/konstantin_b/rules.mk b/keyboards/dz60/keymaps/konstantin_b/rules.mk index a6e88d49b..6006b7263 100644 --- a/keyboards/dz60/keymaps/konstantin_b/rules.mk +++ b/keyboards/dz60/keymaps/konstantin_b/rules.mk @@ -1,5 +1,5 @@ BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/dz60/keymaps/krusli/rules.mk b/keyboards/dz60/keymaps/krusli/rules.mk index 1e7c0f745..c6a19afa4 100644 --- a/keyboards/dz60/keymaps/krusli/rules.mk +++ b/keyboards/dz60/keymaps/krusli/rules.mk @@ -1,7 +1,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/dz60/keymaps/marianas/customLogic.c b/keyboards/dz60/keymaps/marianas/customLogic.c index b7dbcac95..f22bd882e 100644 --- a/keyboards/dz60/keymaps/marianas/customLogic.c +++ b/keyboards/dz60/keymaps/marianas/customLogic.c @@ -9,7 +9,7 @@ static int16_t fnTimer = 0; -uint32_t layer_state_set_user(uint32_t state) +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { @@ -40,34 +40,34 @@ bool printSqlVerbs(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case S_LFTJN: - SEND_STRING("LEFT JOIN"); + case S_LFTJN: + SEND_STRING("LEFT JOIN"); activateRelativity(); return false; - case S_INRJN: - SEND_STRING("INNER JOIN "); + case S_INRJN: + SEND_STRING("INNER JOIN "); activateRelativity(); return false; - case S_SLCT: - SEND_STRING("SELECT "); return + case S_SLCT: + SEND_STRING("SELECT "); return false; - case S_FROM: - SEND_STRING("FROM "); return + case S_FROM: + SEND_STRING("FROM "); return false; - case S_DSNCT: - SEND_STRING("DISTINCT "); return + case S_DSNCT: + SEND_STRING("DISTINCT "); return false; - case S_ORDER: - SEND_STRING("ORDER BY "); return + case S_ORDER: + SEND_STRING("ORDER BY "); return false; - case S_WHERE: - SEND_STRING("WHERE "); return + case S_WHERE: + SEND_STRING("WHERE "); return false; - case S_ALTER: + case S_ALTER: SEND_STRING("ALTER SESSION SET CURRENT_SCHEMA = SUPPLY;"); return false; - case S_ASTRK: + case S_ASTRK: SEND_STRING("* "); return false; - + } } return true; diff --git a/keyboards/dz60/keymaps/marianas/customLogic.h b/keyboards/dz60/keymaps/marianas/customLogic.h index f0e6ecdca..29198d60b 100644 --- a/keyboards/dz60/keymaps/marianas/customLogic.h +++ b/keyboards/dz60/keymaps/marianas/customLogic.h @@ -1,7 +1,7 @@ #define fnTimeout 500 -uint32_t layer_state_set_user(uint32_t state); +layer_state_t layer_state_set_user(layer_state_t state); bool printSqlVerbs(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/dz60/keymaps/marianas/rules.mk b/keyboards/dz60/keymaps/marianas/rules.mk index b68cc80cf..d647c9de8 100644 --- a/keyboards/dz60/keymaps/marianas/rules.mk +++ b/keyboards/dz60/keymaps/marianas/rules.mk @@ -3,7 +3,7 @@ # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/dz60/keymaps/niclake/rules.mk b/keyboards/dz60/keymaps/niclake/rules.mk index 000a2e121..0b4dadb10 100644 --- a/keyboards/dz60/keymaps/niclake/rules.mk +++ b/keyboards/dz60/keymaps/niclake/rules.mk @@ -1,3 +1,3 @@ COMMAND_ENABLE = no RGBLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/dz60/keymaps/pinpox/rules.mk b/keyboards/dz60/keymaps/pinpox/rules.mk index fcf3767e1..855a1e5e6 100644 --- a/keyboards/dz60/keymaps/pinpox/rules.mk +++ b/keyboards/dz60/keymaps/pinpox/rules.mk @@ -1 +1 @@ -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/dz60/keymaps/split_space_arrows/rules.mk b/keyboards/dz60/keymaps/split_space_arrows/rules.mk index 5d38b9d36..81c7b3f26 100644 --- a/keyboards/dz60/keymaps/split_space_arrows/rules.mk +++ b/keyboards/dz60/keymaps/split_space_arrows/rules.mk @@ -1,6 +1,6 @@ # Build Options # override the options specified in dz60/rules.mk -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/dz60/keymaps/spotpuff/rules.mk b/keyboards/dz60/keymaps/spotpuff/rules.mk index 279054837..7b4abdbc1 100644 --- a/keyboards/dz60/keymaps/spotpuff/rules.mk +++ b/keyboards/dz60/keymaps/spotpuff/rules.mk @@ -1 +1 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite diff --git a/keyboards/dz60/keymaps/twschum_b_4_10/rules.mk b/keyboards/dz60/keymaps/twschum_b_4_10/rules.mk index 1610eace7..b3e56546a 100644 --- a/keyboards/dz60/keymaps/twschum_b_4_10/rules.mk +++ b/keyboards/dz60/keymaps/twschum_b_4_10/rules.mk @@ -1,6 +1,6 @@ # Build Options # override the options specified in dz60/rules.mk -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dz60/keymaps/xtonhasvim/keymap.c b/keyboards/dz60/keymaps/xtonhasvim/keymap.c index 34b724aaa..9a482686d 100644 --- a/keyboards/dz60/keymaps/xtonhasvim/keymap.c +++ b/keyboards/dz60/keymaps/xtonhasvim/keymap.c @@ -69,7 +69,7 @@ void matrix_init_user(void) { user_led_off(); } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { static uint32_t last_state = 0; if(last_state != state) { diff --git a/keyboards/dz60/rules.mk b/keyboards/dz60/rules.mk index 1671c42e9..f04673321 100644 --- a/keyboards/dz60/rules.mk +++ b/keyboards/dz60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/bocc/rules.mk b/keyboards/dztech/bocc/rules.mk index 2668874ea..b91f40ae3 100644 --- a/keyboards/dztech/bocc/rules.mk +++ b/keyboards/dztech/bocc/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index aa02fb902..a7fc3dbc5 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -1,7 +1,7 @@ #include "dz60rgb.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { { 0, K_14, J_14, L_14 }, { 0, K_13, J_13, L_13 }, { 0, K_12, J_12, L_12 }, diff --git a/keyboards/dztech/dz60rgb/keymaps/via/config.h b/keyboards/dztech/dz60rgb/keymaps/via/config.h new file mode 100644 index 000000000..1beb7130f --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/via/config.h @@ -0,0 +1,21 @@ +/* Copyright 2021 DZTECH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 DISABLE_RGB_MATRIX_PIXEL_FLOW +#define DISABLE_RGB_MATRIX_PIXEL_FRACTAL +#define DISABLE_RGB_MATRIX_PIXEL_RAIN diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h index 6e5b3da6f..f6ee7c4e2 100644 --- a/keyboards/dztech/dz60rgb/v1/config.h +++ b/keyboards/dztech/dz60rgb/v1/config.h @@ -37,7 +37,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/dztech/dz60rgb/v1/rules.mk b/keyboards/dztech/dz60rgb/v1/rules.mk index 678eb385c..56b9cf2dd 100644 --- a/keyboards/dztech/dz60rgb/v1/rules.mk +++ b/keyboards/dztech/dz60rgb/v1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -19,7 +19,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGB_MATRIX_ENABLE = yes # Use RGB matrix diff --git a/keyboards/dztech/dz60rgb/v2/config.h b/keyboards/dztech/dz60rgb/v2/config.h index df84fff59..6108e9903 100644 --- a/keyboards/dztech/dz60rgb/v2/config.h +++ b/keyboards/dztech/dz60rgb/v2/config.h @@ -37,7 +37,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/dztech/dz60rgb/v2/rules.mk b/keyboards/dztech/dz60rgb/v2/rules.mk index f35c9f40c..abad180c8 100644 --- a/keyboards/dztech/dz60rgb/v2/rules.mk +++ b/keyboards/dztech/dz60rgb/v2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGB_MATRIX_ENABLE = yes # Use RGB matrix diff --git a/keyboards/dztech/dz60rgb/v2_1/config.h b/keyboards/dztech/dz60rgb/v2_1/config.h index 6928ad50a..06d504e39 100644 --- a/keyboards/dztech/dz60rgb/v2_1/config.h +++ b/keyboards/dztech/dz60rgb/v2_1/config.h @@ -53,7 +53,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN @@ -72,7 +72,7 @@ # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. # define DRIVER_COUNT 2 # define DRIVER_1_LED_TOTAL 63 # define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz60rgb/v2_1/rules.mk b/keyboards/dztech/dz60rgb/v2_1/rules.mk index d8d17811c..f5fbed890 100644 --- a/keyboards/dztech/dz60rgb/v2_1/rules.mk +++ b/keyboards/dztech/dz60rgb/v2_1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER_SIZE = 6144 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,3 +25,6 @@ RGB_MATRIX_ENABLE = yes # Use RGB matrix RGB_MATRIX_DRIVER = IS31FL3733 NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in LTO_ENABLE = yes + +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no diff --git a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c index 4bb5938b6..ab2441091 100644 --- a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c +++ b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c @@ -1,7 +1,7 @@ #include "dz60rgb_ansi.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { { 0, K_14, J_14, L_14 }, { 0, K_13, J_13, L_13 }, { 0, K_12, J_12, L_12 }, diff --git a/keyboards/dztech/dz60rgb_ansi/v1/config.h b/keyboards/dztech/dz60rgb_ansi/v1/config.h index 8710f8d07..dc2a6f4bc 100644 --- a/keyboards/dztech/dz60rgb_ansi/v1/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v1/config.h @@ -37,7 +37,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/dztech/dz60rgb_ansi/v1/rules.mk b/keyboards/dztech/dz60rgb_ansi/v1/rules.mk index 678eb385c..56b9cf2dd 100644 --- a/keyboards/dztech/dz60rgb_ansi/v1/rules.mk +++ b/keyboards/dztech/dz60rgb_ansi/v1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -19,7 +19,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGB_MATRIX_ENABLE = yes # Use RGB matrix diff --git a/keyboards/dztech/dz60rgb_ansi/v2/config.h b/keyboards/dztech/dz60rgb_ansi/v2/config.h index f3c9b73fb..6c1e00682 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v2/config.h @@ -37,7 +37,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/dztech/dz60rgb_ansi/v2/rules.mk b/keyboards/dztech/dz60rgb_ansi/v2/rules.mk index f35c9f40c..abad180c8 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2/rules.mk +++ b/keyboards/dztech/dz60rgb_ansi/v2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGB_MATRIX_ENABLE = yes # Use RGB matrix diff --git a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c index b57560bac..455624471 100644 --- a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c +++ b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c @@ -1,7 +1,7 @@ #include "dz60rgb_wkl.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { { 0, H_15, G_15, I_15 }, { 0, K_14, J_14, L_14 }, { 0, K_13, J_13, L_13 }, diff --git a/keyboards/dztech/dz60rgb_wkl/v1/config.h b/keyboards/dztech/dz60rgb_wkl/v1/config.h index 9c630c75b..12317c2d3 100644 --- a/keyboards/dztech/dz60rgb_wkl/v1/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v1/config.h @@ -37,7 +37,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/dztech/dz60rgb_wkl/v1/rules.mk b/keyboards/dztech/dz60rgb_wkl/v1/rules.mk index 6a9af2dee..e69cd9cc3 100644 --- a/keyboards/dztech/dz60rgb_wkl/v1/rules.mk +++ b/keyboards/dztech/dz60rgb_wkl/v1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -19,7 +19,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGB_MATRIX_ENABLE = yes # Use RGB matrix diff --git a/keyboards/dztech/dz60rgb_wkl/v2/config.h b/keyboards/dztech/dz60rgb_wkl/v2/config.h index a6145c274..945b591ce 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v2/config.h @@ -37,7 +37,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/dztech/dz60rgb_wkl/v2/rules.mk b/keyboards/dztech/dz60rgb_wkl/v2/rules.mk index 5386768c2..34288e102 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2/rules.mk +++ b/keyboards/dztech/dz60rgb_wkl/v2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGB_MATRIX_ENABLE = yes # Use RGB matrix diff --git a/keyboards/dztech/dz60rgb_wkl/v2_1/config.h b/keyboards/dztech/dz60rgb_wkl/v2_1/config.h index c4d9e6c9a..76b0b6ea5 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2_1/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v2_1/config.h @@ -53,7 +53,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN @@ -71,9 +71,9 @@ # define DISABLE_RGB_MATRIX_SOLID_SPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 +# define DRIVER_ADDR_1 0b1010000 +# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +# define DRIVER_COUNT 2 # define DRIVER_1_LED_TOTAL 62 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL #endif diff --git a/keyboards/dztech/dz65rgb/keymaps/via/config.h b/keyboards/dztech/dz65rgb/keymaps/via/config.h new file mode 100644 index 000000000..1beb7130f --- /dev/null +++ b/keyboards/dztech/dz65rgb/keymaps/via/config.h @@ -0,0 +1,21 @@ +/* Copyright 2021 DZTECH + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 DISABLE_RGB_MATRIX_PIXEL_FLOW +#define DISABLE_RGB_MATRIX_PIXEL_FRACTAL +#define DISABLE_RGB_MATRIX_PIXEL_RAIN diff --git a/keyboards/dztech/dz65rgb/v1/config.h b/keyboards/dztech/dz65rgb/v1/config.h index adfa934b0..1ecd9002c 100644 --- a/keyboards/dztech/dz65rgb/v1/config.h +++ b/keyboards/dztech/dz65rgb/v1/config.h @@ -51,9 +51,9 @@ # define RGB_MATRIX_LED_FLUSH_LIMIT 26 # define DEBOUNCE 3 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define DISABLE_RGB_MATRIX_BAND_SAT # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT # define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/keyboards/dztech/dz65rgb/v1/rules.mk b/keyboards/dztech/dz65rgb/v1/rules.mk index 5468deb71..b970b96c7 100644 --- a/keyboards/dztech/dz65rgb/v1/rules.mk +++ b/keyboards/dztech/dz65rgb/v1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -19,7 +19,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGB_MATRIX_ENABLE = yes # Use RGB matrix diff --git a/keyboards/dztech/dz65rgb/v1/v1.c b/keyboards/dztech/dz65rgb/v1/v1.c index 8a3f0e27b..aabe41c31 100644 --- a/keyboards/dztech/dz65rgb/v1/v1.c +++ b/keyboards/dztech/dz65rgb/v1/v1.c @@ -16,7 +16,7 @@ #include "v1.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { { 0, C8_8, C7_8, C6_8 }, { 0, C9_8, C7_7, C6_7 }, { 0, C9_7, C8_7, C6_6 }, diff --git a/keyboards/dztech/dz65rgb/v2/config.h b/keyboards/dztech/dz65rgb/v2/config.h index f86d65cd0..1e1e21f5e 100644 --- a/keyboards/dztech/dz65rgb/v2/config.h +++ b/keyboards/dztech/dz65rgb/v2/config.h @@ -51,7 +51,7 @@ # define RGB_MATRIX_LED_FLUSH_LIMIT 26 # define DEBOUNCE 3 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define DISABLE_RGB_MATRIX_BAND_SAT diff --git a/keyboards/dztech/dz65rgb/v2/rules.mk b/keyboards/dztech/dz65rgb/v2/rules.mk index 4267e7080..5d4f3a894 100644 --- a/keyboards/dztech/dz65rgb/v2/rules.mk +++ b/keyboards/dztech/dz65rgb/v2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGB_MATRIX_ENABLE = yes # Use RGB matrix diff --git a/keyboards/dztech/dz65rgb/v2/v2.c b/keyboards/dztech/dz65rgb/v2/v2.c index 788709d98..dce167c73 100644 --- a/keyboards/dztech/dz65rgb/v2/v2.c +++ b/keyboards/dztech/dz65rgb/v2/v2.c @@ -16,7 +16,7 @@ #include "v2.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { { 0, C8_8, C7_8, C6_8 }, { 0, C9_8, C7_7, C6_7 }, { 0, C9_7, C8_7, C6_6 }, diff --git a/keyboards/dztech/dz65rgb/v3/config.h b/keyboards/dztech/dz65rgb/v3/config.h index c348e323d..dbf2f5b3c 100755 --- a/keyboards/dztech/dz65rgb/v3/config.h +++ b/keyboards/dztech/dz65rgb/v3/config.h @@ -42,16 +42,16 @@ #define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended -#define USB_SUSPEND_WAKEUP_DELAY 5000 -#define RGB_MATRIX_KEYPRESSES -#define RGB_MATRIX_LED_PROCESS_LIMIT 4 -#define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL -#define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. -#define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 68 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL -#define DRIVER_INDICATOR_LED_TOTAL 0 +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +# define USB_SUSPEND_WAKEUP_DELAY 5000 +# define RGB_MATRIX_KEYPRESSES +# define RGB_MATRIX_LED_PROCESS_LIMIT 4 +# define RGB_MATRIX_LED_FLUSH_LIMIT 26 +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL +# define DRIVER_ADDR_1 0b0110000 +# define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. +# define DRIVER_COUNT 1 +# define DRIVER_1_LED_TOTAL 68 +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_INDICATOR_LED_TOTAL 0 #endif diff --git a/keyboards/dztech/dz65rgb/v3/rules.mk b/keyboards/dztech/dz65rgb/v3/rules.mk index 10a6be57f..bde27b83d 100755 --- a/keyboards/dztech/dz65rgb/v3/rules.mk +++ b/keyboards/dztech/dz65rgb/v3/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER_SIZE = 6144 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz65rgb/v3/v3.c b/keyboards/dztech/dz65rgb/v3/v3.c index dec75814c..c3719bfa5 100755 --- a/keyboards/dztech/dz65rgb/v3/v3.c +++ b/keyboards/dztech/dz65rgb/v3/v3.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS21_SW1, CS20_SW1, CS19_SW1}, {0, CS21_SW2, CS20_SW2, CS19_SW2}, {0, CS21_SW3, CS20_SW3, CS19_SW3}, diff --git a/keyboards/dztech/dz96/rules.mk b/keyboards/dztech/dz96/rules.mk index 6e53d4cab..bbdf52f86 100644 --- a/keyboards/dztech/dz96/rules.mk +++ b/keyboards/dztech/dz96/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/volcano660/readme.md b/keyboards/dztech/volcano660/readme.md deleted file mode 100644 index f6a4e822c..000000000 --- a/keyboards/dztech/volcano660/readme.md +++ /dev/null @@ -1,12 +0,0 @@ -# Volcano660 - -* Keyboard Maintainer: DZTECH -* Hardware Supported: DZTECH -* Hardware Availability: iLumkb - -Make example for this keyboard (after setting up your build environment): - - make dztech/volcano660:default - make dztech/volcano660:via - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/dztech/volcano660/rules.mk b/keyboards/dztech/volcano660/rules.mk deleted file mode 100644 index e7aea4087..000000000 --- a/keyboards/dztech/volcano660/rules.mk +++ /dev/null @@ -1,22 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output diff --git a/keyboards/e88/rules.mk b/keyboards/e88/rules.mk index dc1dcdb85..7d6e8d360 100644 --- a/keyboards/e88/rules.mk +++ b/keyboards/e88/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ealdin/quadrant/rules.mk b/keyboards/ealdin/quadrant/rules.mk index c3d0a548c..02b4cba32 100644 --- a/keyboards/ealdin/quadrant/rules.mk +++ b/keyboards/ealdin/quadrant/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/earth_rover/rules.mk b/keyboards/earth_rover/rules.mk index fd76a5247..7f0fa90fd 100644 --- a/keyboards/earth_rover/rules.mk +++ b/keyboards/earth_rover/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ebastler/isometria_75/rev1/rules.mk b/keyboards/ebastler/isometria_75/rev1/rules.mk index ec05abff0..a56e69254 100644 --- a/keyboards/ebastler/isometria_75/rev1/rules.mk +++ b/keyboards/ebastler/isometria_75/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/eco/keymaps/default/rules.mk b/keyboards/eco/keymaps/default/rules.mk index 3898578a8..f36b6ac91 100644 --- a/keyboards/eco/keymaps/default/rules.mk +++ b/keyboards/eco/keymaps/default/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/eco/keymaps/fsck/rules.mk b/keyboards/eco/keymaps/fsck/rules.mk index 8fb2adf38..e48f4aec5 100644 --- a/keyboards/eco/keymaps/fsck/rules.mk +++ b/keyboards/eco/keymaps/fsck/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/eco/keymaps/that_canadian/rules.mk b/keyboards/eco/keymaps/that_canadian/rules.mk index 83d1175db..c76a07e24 100644 --- a/keyboards/eco/keymaps/that_canadian/rules.mk +++ b/keyboards/eco/keymaps/that_canadian/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/eco/keymaps/xyverz/rules.mk b/keyboards/eco/keymaps/xyverz/rules.mk index 9e7b9c202..d8d012a9f 100644 --- a/keyboards/eco/keymaps/xyverz/rules.mk +++ b/keyboards/eco/keymaps/xyverz/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/eco/rules.mk b/keyboards/eco/rules.mk index 078131da7..8629910b7 100644 --- a/keyboards/eco/rules.mk +++ b/keyboards/eco/rules.mk @@ -15,19 +15,18 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = yes # MIDI controls +MIDI_ENABLE = yes # MIDI support AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/edc40/rules.mk b/keyboards/edc40/rules.mk index c5128a8f2..5667e531d 100644 --- a/keyboards/edc40/rules.mk +++ b/keyboards/edc40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/edi/hardlight/mk1/rules.mk b/keyboards/edi/hardlight/mk1/rules.mk index 33595b42e..8800c342f 100644 --- a/keyboards/edi/hardlight/mk1/rules.mk +++ b/keyboards/edi/hardlight/mk1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/eek/rules.mk b/keyboards/eek/rules.mk index ce3df8f21..2636e39bf 100644 --- a/keyboards/eek/rules.mk +++ b/keyboards/eek/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/efreet/rules.mk b/keyboards/efreet/rules.mk index eeacc5199..b84ae5312 100644 --- a/keyboards/efreet/rules.mk +++ b/keyboards/efreet/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/eggman/rules.mk b/keyboards/eggman/rules.mk index 131c62bd1..3df5eb032 100644 --- a/keyboards/eggman/rules.mk +++ b/keyboards/eggman/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/emajesty/eiri/rules.mk b/keyboards/emajesty/eiri/rules.mk index fd76a5247..7f0fa90fd 100644 --- a/keyboards/emajesty/eiri/rules.mk +++ b/keyboards/emajesty/eiri/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/emi20/rules.mk b/keyboards/emi20/rules.mk index 81598c2f7..2f690df8c 100644 --- a/keyboards/emi20/rules.mk +++ b/keyboards/emi20/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/emptystring/NQG/rules.mk b/keyboards/emptystring/NQG/rules.mk index 45f2f6155..ab274deb8 100644 --- a/keyboards/emptystring/NQG/rules.mk +++ b/keyboards/emptystring/NQG/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/eniigmakeyboards/ek65/rules.mk b/keyboards/eniigmakeyboards/ek65/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/eniigmakeyboards/ek65/rules.mk +++ b/keyboards/eniigmakeyboards/ek65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/eniigmakeyboards/ek87/config.h b/keyboards/eniigmakeyboards/ek87/config.h index 21298bd29..52a30917e 100644 --- a/keyboards/eniigmakeyboards/ek87/config.h +++ b/keyboards/eniigmakeyboards/ek87/config.h @@ -193,25 +193,6 @@ along with this program. If not, see . /* disable these deprecated features by default */ #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/eniigmakeyboards/ek87/rules.mk b/keyboards/eniigmakeyboards/ek87/rules.mk index cb477d066..1dc37611d 100644 --- a/keyboards/eniigmakeyboards/ek87/rules.mk +++ b/keyboards/eniigmakeyboards/ek87/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ep/40/rules.mk b/keyboards/ep/40/rules.mk index a818ddd62..34e2adb72 100644 --- a/keyboards/ep/40/rules.mk +++ b/keyboards/ep/40/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ep/96/config.h b/keyboards/ep/96/config.h index 3df6a968e..7c63e38d1 100644 --- a/keyboards/ep/96/config.h +++ b/keyboards/ep/96/config.h @@ -152,23 +152,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/ep/96/rules.mk b/keyboards/ep/96/rules.mk index a818ddd62..34e2adb72 100644 --- a/keyboards/ep/96/rules.mk +++ b/keyboards/ep/96/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ep/comsn/hs68/rules.mk b/keyboards/ep/comsn/hs68/rules.mk index 276a85cbc..e7b73f7f9 100644 --- a/keyboards/ep/comsn/hs68/rules.mk +++ b/keyboards/ep/comsn/hs68/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ep/comsn/mollydooker/config.h b/keyboards/ep/comsn/mollydooker/config.h index 8b0e5930b..97481783e 100644 --- a/keyboards/ep/comsn/mollydooker/config.h +++ b/keyboards/ep/comsn/mollydooker/config.h @@ -161,23 +161,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/ep/comsn/mollydooker/rules.mk b/keyboards/ep/comsn/mollydooker/rules.mk index 08b69dae9..1b88e3a50 100644 --- a/keyboards/ep/comsn/mollydooker/rules.mk +++ b/keyboards/ep/comsn/mollydooker/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ep/comsn/tf_longeboye/rules.mk b/keyboards/ep/comsn/tf_longeboye/rules.mk index 13f194d5a..fc6b297de 100644 --- a/keyboards/ep/comsn/tf_longeboye/rules.mk +++ b/keyboards/ep/comsn/tf_longeboye/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/epoch80/rules.mk b/keyboards/epoch80/rules.mk index 277cde08e..9f81430cd 100644 --- a/keyboards/epoch80/rules.mk +++ b/keyboards/epoch80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ergo42/keymaps/hdbx/keymap.c b/keyboards/ergo42/keymaps/hdbx/keymap.c index da579de01..0931ce86b 100644 --- a/keyboards/ergo42/keymaps/hdbx/keymap.c +++ b/keyboards/ergo42/keymaps/hdbx/keymap.c @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = LAYOUT( \ _______, KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, JP_UNDS, JP_GRV, JP_CIRC, JP_AMPR, KC_INS, JP_YEN, KC_ALPS, _______, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, JP_LCBR, JP_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, JP_DQT, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, JP_LCBR, JP_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, JP_DQUO, \ KC_LSFT, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_PGUP, XXXXXXX, XXXXXXX, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ _______, _______, JP_PIPE, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______ \ ), @@ -145,7 +145,7 @@ void matrix_init_user(void) { #endif } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); #ifdef RGBLIGHT_ENABLE switch (biton32(state)) { diff --git a/keyboards/ergo42/keymaps/shinze/keymap.c b/keyboards/ergo42/keymaps/shinze/keymap.c index e07ff9f9e..f5cc3c520 100644 --- a/keyboards/ergo42/keymaps/shinze/keymap.c +++ b/keyboards/ergo42/keymaps/shinze/keymap.c @@ -15,15 +15,15 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( \ - KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_ESC, KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, \ + KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_ESC, KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, \ BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMM, _______, _______, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, \ - KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, _______, _______, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED, \ + KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, _______, _______, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, BP_CCED, \ MO(SHORT), KC_LCTL, _______, KC_LALT, KC_LGUI, KC_SPC, MO(NUMB), KC_ENT , KC_RSFT, KC_SPC, _______, _______, _______, _______ \ ), [NUMB] = LAYOUT( \ - BP_HASH, BP_DQOT, BP_LDQU, BP_RDQU, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, BP_PERC, KC_BSPC, \ - BP_DLR, BP_1, BP_2, BP_3, BP_4, BP_5, KC_LBRC, KC_RBRC, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEGR, \ + BP_HASH, BP_DQUO, BP_LDQU, BP_RDQU, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, BP_PERC, KC_BSPC, \ + BP_DLR, BP_1, BP_2, BP_3, BP_4, BP_5, KC_LBRC, KC_RBRC, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEG, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), diff --git a/keyboards/ergo42/rules.mk b/keyboards/ergo42/rules.mk index b593de2be..4aabe7e98 100644 --- a/keyboards/ergo42/rules.mk +++ b/keyboards/ergo42/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,12 +25,9 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 SPLIT_KEYBOARD = yes -LAYOUTS = ortho_4x14 - DEFAULT_FOLDER = ergo42/rev1 diff --git a/keyboards/ergoarrows/keymaps/salicylic/keymap.c b/keyboards/ergoarrows/keymaps/salicylic/keymap.c index a8211e65a..c841371db 100644 --- a/keyboards/ergoarrows/keymaps/salicylic/keymap.c +++ b/keyboards/ergoarrows/keymaps/salicylic/keymap.c @@ -52,7 +52,7 @@ LALT_T(KC_ZKHK),KC_LGUI, KC_UP, KC_MHEN,LT(_LOWER,KC_ENT),KC_BSPC,KC_DEL,KC_BSP //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| JP_DQUO, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, _______, _______, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, _______, _______, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, _______, _______, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/ergoarrows/rules.mk b/keyboards/ergoarrows/rules.mk index abffa14b3..9aaba6721 100644 --- a/keyboards/ergoarrows/rules.mk +++ b/keyboards/ergoarrows/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ergodash/rev1/keymaps/m47ch4n/keymap.c b/keyboards/ergodash/rev1/keymaps/m47ch4n/keymap.c index 4d1d0131f..4b102157d 100644 --- a/keyboards/ergodash/rev1/keymaps/m47ch4n/keymap.c +++ b/keyboards/ergodash/rev1/keymaps/m47ch4n/keymap.c @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( \ KC_ESC, CSTM_1, CSTM_2, CSTM_3, CSTM_4, CSTM_5, JP_KANA, JP_KANA, CSTM_6, CSTM_7, CSTM_8, CSTM_9, CSTM_0, GRV , \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, JP_MHEN, JP_HENK, KC_Y, KC_U, KC_I, KC_O, KC_P, BSLS , \ - KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, JP_MEISU, JP_MKANA,KC_H, KC_J, KC_K, KC_L, SCLN, QUOT , \ + KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LANG2, JP_LANG1,KC_H, KC_J, KC_K, KC_L, SCLN, QUOT , \ SHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SHIFT , SHIFT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFT , \ SHIFT, ADJUST, KC_LALT, KC_LCTL, LOWER, KC_SPC ,XXXXXXX, XXXXXXX,KC_ENT , RAISE, KC_LCTL, KC_LALT, ADJUST, SHIFT \ ), diff --git a/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk b/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk index 6ba6c5b22..a7d4fcaac 100644 --- a/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk +++ b/keyboards/ergodash/rev1/keymaps/yet-another-developer/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite # Device AUDIO_ENABLE = no diff --git a/keyboards/ergodash/rules.mk b/keyboards/ergodash/rules.mk index de06b3427..2019dd1db 100644 --- a/keyboards/ergodash/rules.mk +++ b/keyboards/ergodash/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/ergodone/keymaps/erovia/keymap.c b/keyboards/ergodone/keymaps/erovia/keymap.c deleted file mode 100644 index 697e91711..000000000 --- a/keyboards/ergodone/keymaps/erovia/keymap.c +++ /dev/null @@ -1,229 +0,0 @@ -#include QMK_KEYBOARD_H -#include "version.h" -#include "bootmagic.h" - -#define QWERTY 0 // qwerty layer -#define COLEMAK 1 // colemak layer -#define FN 2 // function layer - -enum custom_keycodes { - QWRTY = SAFE_RANGE, // can always be here - CLMK, - VRSN, - FNCTN -}; - -/* false: Caps Lock LED is off - true: Caps Lock LED is on */ -bool CAPS_LED = false; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Qwerty layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Copy | | Paste| 6 | 7 | 8 | 9 | 0 | Sleep | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | Mute | | { | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | [ |------+------+------+------+------+--------| - * | Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | - * |--------+------+------+------+------+------| Fn1 | | } |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | | | ] | N | M | , | . | / | RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |LCtrl | LGui | LAlt | Left | Right| | Down | Up | - | = | RCtrl | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | Caps | LGui | | Ins | Del | - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -[QWERTY] = LAYOUT_ergodox( // layer 0 : qwerty - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_COPY, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MUTE, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, TT(FN), - KC_LCTL, KC_LGUI, KC_LALT, KC_LEFT, KC_RGHT, - KC_CAPS, KC_LGUI, - KC_HOME, - KC_SPC, KC_BSPC, KC_END, - // right hand - KC_PASTE, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLEP, - KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOTE, - KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_DOWN, KC_UP, KC_MINS, KC_EQL, KC_RCTL, - KC_INS, KC_DEL, - KC_PGUP, - KC_PGDN, KC_TAB, KC_ENT -), -/* Keymap 1: Colemak layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | Copy | | Paste| 6 | 7 | 8 | 9 | 0 | Sleep | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | F | P | B | Mute | | { | J | L | U | Y | ; | \ | - * |--------+------+------+------+------+------| | | [ |------+------+------+------+------+--------| - * | Esc | A | R | S | T | G |------| |------| M | N | E | I | O | ' | - * |--------+------+------+------+------+------| Fn1 | | } |------+------+------+------+------+--------| - * | LShift | Z | X | C | D | V | | | ] | K | H | , | . | / | RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |LCtrl | LGui | LAlt | Left | Right| | Down | Up | - | = | RCtrl | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | Caps | LGui | | Ins | Del | - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `----------------------' - */ -[COLEMAK] = LAYOUT_ergodox( // layer 1 : colemak - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_COPY, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_MUTE, - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_D, KC_V, TT(FN), - KC_LCTL, KC_LGUI, KC_LALT, KC_LEFT, KC_RGHT, - KC_CAPS, KC_LGUI, - KC_HOME, - KC_SPC, KC_BSPC, KC_END, - // right hand - KC_PASTE, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLEP, - KC_LBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOTE, - KC_RBRC, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_DOWN, KC_UP, KC_MINS, KC_EQL, KC_RCTL, - KC_INS, KC_DEL, - KC_PGUP, - KC_PGDN, KC_TAB, KC_ENT -), -/* Keymap 2: Function Layer - * - * ,---------------------------------------------------. ,--------------------------------------------------. - * |Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | | - * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| - * | | | | Prev | Play | Next | | | | | | | | | | - * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | |VolDn | VolUp|------| |------| |QWRTY | CLMK | | | | - * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `-----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// Functions -[FN] = LAYOUT_ergodox( - // left hand - VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - KC_F12, 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, QWRTY, CLMK, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case VRSN: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - break; - case QWRTY: - if (record->event.pressed) { - set_single_persistent_default_layer(QWERTY); - } - return false; - break; - case CLMK: - if (record->event.pressed) { - set_single_persistent_default_layer(COLEMAK); - } - return false; - break; - case KC_CAPS: - if (record->event.pressed) { - // Turn LED1 On/Off for Caps Lock - if (CAPS_LED) { - ergodox_right_led_1_off(); - CAPS_LED = false; - } else { - ergodox_right_led_1_on(); - CAPS_LED = true; - } - } - return true; - break; - } - return true; -}; - -// Set LED according to the default layer -void default_layer_led_set(void) { - switch (biton32(eeconfig_read_default_layer())) { - case COLEMAK: - // LED2 for COLEMAK - ergodox_right_led_2_on(); - break; - case QWERTY: - // LED3 for QWERTY - ergodox_right_led_3_on(); - break; - }; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - default_layer_led_set(); -}; - -uint32_t layer_state_set_user(uint32_t state) { - ergodox_led_all_off(); - switch (biton32(state)) { - case FN: - // Red led on Pro Micro for Fn layer - ergodox_board_led_on(); - break; - }; - - if (CAPS_LED) { - ergodox_right_led_1_on(); - } - - default_layer_led_set(); - - return state; -}; - -void suspend_power_down_user(void) { - ergodox_led_all_off(); -}; - -void suspend_wakeup_init_user(void) { - default_layer_led_set(); -}; diff --git a/keyboards/ergodone/readme.md b/keyboards/ergodone/readme.md deleted file mode 100644 index 82c1043da..000000000 --- a/keyboards/ergodone/readme.md +++ /dev/null @@ -1,33 +0,0 @@ -ErgoDone -======== - -![ErgoDone](https://i.imgur.com/QERsQGQ.jpg) - -The ErgoDone is a modified version of the ErgoDox, made by K.T.E.C., with pre-soldered components. It has different wiring and uses a SparkFun Pro Micro instead of Teensy. - -- Keyboard maintainer: [Yu He](http://github.com/yuhe00) -- Hardware supported: - - ErgoDone v1.3 (tested) -- Hardware availability: - - [AliExpress](https://www.aliexpress.com/store/product/ergodone-Custom-Mechanical-Keyboard-TKG-TOOLS-PCB-programmed-Ergonomic-Keyboard-Kit-similar-with-infinity-ergodox/3034003_32830050940.html) - - [KBDfans](https://kbdfans.myshopify.com/collections/pcb/products/ergodone-keyboard-pcb-1pcs-free-shipping) - -# Building the firmware - -[Install the build tools.](https://docs.qmk.fm/#/getting_started_build_tools) - -In the root directory of the repository, build the firmware with a command like: - - make ergodone:default - -For more information on the layout option and other ones, see the [`make` guide](https://docs.qmk.fm/#/getting_started_make_guide). - -# Flashing the firmware onto the keyboard - -The ErgoDone uses a customized HID bootloader rather than the Teensy one. It doesn't need an OS driver, and the required actions before flashing are a little different than with an ErgoDox. - -1. To enter flash mode, disconnect the keyboard first. Then, on the left-hand device, in the top row, press and hold the two rightmost keys while reconnecting the keyboard. -![Ergodone Flash Mode](https://i.imgur.com/sNivAnr.jpg) -2. To flash the .hex file, use the `hid_bootloader_cli` utlity from the [TKG Toolkit](https://github.com/kairyu/tkg-toolkit) (as of 2017-10-03, only [this old version](https://github.com/kairyu/tkg-toolkit/blob/b14c67ca8bc84c07e5fc6b2e01ae4002b808243a/windows/bin/hid_bootloader_cli.exe) works under Windows): - - hid_bootloader_cli -mmcu=atmega32u4 ergodone_default.hex diff --git a/keyboards/ergodone/rules.mk b/keyboards/ergodone/rules.mk deleted file mode 100644 index acd485f2f..000000000 --- a/keyboards/ergodone/rules.mk +++ /dev/null @@ -1,38 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = caterina - -# Build Options -# comment out to disable the options. -# -CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDone -UNICODE_ENABLE = yes # Unicode -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -USB_6KRO_ENABLE = no # USB 6key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -SWAP_HANDS_ENABLE = no # Disable Onehand -RGBLIGHT_ENABLE = no -MIDI_ENABLE = no - -# project specific files -SRC = \ - twimaster.c \ - matrix.c \ - expander.c \ - -LAYOUTS = ergodox diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index bc63f6108..9dcfc341e 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -129,7 +129,7 @@ along with this program. If not, see . #define RGB_MATRIX_LED_PROCESS_LIMIT 5 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED // #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF /* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */ diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 47dd1b0cc..7af76cb62 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -243,7 +243,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { #ifdef RGB_MATRIX_ENABLE // clang-format off -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* driver * | R location * | | G location diff --git a/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c b/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c index b9c65944f..a5b107baa 100755 --- a/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c +++ b/keyboards/ergodox_ez/keymaps/bepo_tm_style/keymap.c @@ -54,19 +54,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Layer 0: basic keys. [BASE] = LAYOUT_ergodox( /* left hand */ - BP_DLR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL, - KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, + BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, + KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC, KC_LSFT, BP_A, BP_U, BP_I, BP_E, BP_COMM, KC_LCTRL, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, - ESC_FN, BP_ECRC, KC_LGUI, KC_LALT, SPC_RALT, + ESC_FN, BP_ECIR, KC_LGUI, KC_LALT, SPC_RALT, TT(SWAP), KC_MNXT, KC_MPLY, TT(FN), TT(NUMS), KC_MPRV, /* right hand */ KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, - KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, + KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_C, BP_T, BP_S, BP_R, BP_N, M_RSFT, - KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, W_RCTL, + KC_ENT, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, W_RCTL, SPC_RALT, KC_LALT, TT(SYSLEDS), BP_CCED, PERC_FN, KC_LEFT, KC_RIGHT, KC_UP, @@ -191,7 +191,7 @@ static bool is_macro1_recording = false; // There is a global 'layer_state' variable but it is set after the call // to layer_state_set_user(). static uint32_t current_layer_state = 0; -uint32_t layer_state_set_user(uint32_t state); +layer_state_t layer_state_set_user(layer_state_t state); // Method called at the end of the tap dance on the TAP_MACRO key. That key is // used to start recording a macro (double tap or more), to stop recording (any @@ -315,7 +315,7 @@ void led_set_user(uint8_t usb_led) { } } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { current_layer_state = state; swap_hands = LAYER_ON(SWAP); diff --git a/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk b/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk index 6d20fcf76..9c24dadd7 100755 --- a/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk +++ b/keyboards/ergodox_ez/keymaps/bepo_tm_style/rules.mk @@ -7,9 +7,8 @@ KEY_LOCK_ENABLE = yes # Enable the KC_LOCK key TAP_DANCE_ENABLE = yes # Enable the tap dance feature. CONSOLE_ENABLE = yes # Console for debug -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite UNICODE_ENABLE = no SLEEP_LED_ENABLE = no -API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = no RGBLIGHT_ANIMATION = no diff --git a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c index ec77b6aa0..229ece0d7 100644 --- a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c +++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c @@ -99,7 +99,7 @@ static bool is_macro1_recording = false; // There is a global 'layer_state' variable but it is set after the call // to layer_state_set_user(). static uint32_t current_layer_state = 0; -uint32_t layer_state_set_user(uint32_t state); +layer_state_t layer_state_set_user(layer_state_t state); // Method called at the end of the tap dance on the TAP_MACRO key. That key is // used to start recording a macro (double tap or more), to stop recording (any @@ -202,7 +202,7 @@ void led_3_off(void) { ergodox_right_led_3_off(); } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { current_layer_state = state; if (is_macro1_recording) { diff --git a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk index 6ed55e72b..a7f524fa4 100644 --- a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk +++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk @@ -2,14 +2,13 @@ MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - for issues, see github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -ONEHAND_ENABLE = yes # Allow swapping hands of keyboard +SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard KEY_LOCK_ENABLE = yes # Enable the KC_LOCK key TAP_DANCE_ENABLE = yes # Enable the tap dance feature. CONSOLE_ENABLE = yes # Console for debug -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite UNICODE_ENABLE = no SLEEP_LED_ENABLE = no -API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = no RGBLIGHT_ANIMATION = no diff --git a/keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c b/keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c index 0abd028a0..a505fc2b6 100644 --- a/keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c +++ b/keyboards/ergodox_ez/keymaps/colemak_es_osx/keymap.c @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT_ergodox( // left hand - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, ES_LESS, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, ES_LABK, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_HOME, KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, @@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand ES_IEXL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_END, KC_J, KC_L, KC_U, KC_Y, ES_NTIL, ES_APOS, + KC_END, KC_J, KC_L, KC_U, KC_Y, ES_NTIL, ES_QUOT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT, ES_MINS, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, GUI_T(ES_ACUT), ALT_T(KC_BSLS), KC_LEFT, KC_DOWN, KC_RIGHT, @@ -358,7 +358,7 @@ void led_3_on(void) { ergodox_right_led_3_set(max_led_value); } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { if(layer_state_cmp(state ,IDEA)) { led_1_on(); diff --git a/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c b/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c index dc33e4e0a..55bf4209f 100644 --- a/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c +++ b/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c @@ -175,7 +175,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Right hand MDIA_SYMB_KP_LAYERS, ___SYMBOL_BEPO_R___, BP_EQL, - BP_DCRC, ___BEPO_FR_R1___, BP_W, + BP_DCIR, ___BEPO_FR_R1___, BP_W, /* */ ___BEPO_FR_R2___, BP_CCED, BP_C, ___BEPO_FR_R3___, KC_RSFT, diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h index a0ba655ed..da2082078 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/config.h @@ -14,7 +14,7 @@ #undef IGNORE_MOD_TAP_INTERRUPT #define IGNORE_MOD_TAP_INTERRUPT -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #undef FORCE_NKRO #define FORCE_NKRO diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk index 184a90228..9da5278ed 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/rules.mk @@ -21,8 +21,6 @@ SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard. # SLEEP_LED_ENABLE = no # Turn off leds when computer is sleeping. # KEY_LOCK_ENABLE = no # (+1730b) # CONSOLE_ENABLE = no # Console for debug(+400b) -# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000b) -# API_SYSEX_ENABLE = no # MIDI_ENABLE = no # BLUETOOTH_ENABLE = no # AUDIO_ENABLE = no diff --git a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c index c0b3b9c99..fd022681b 100644 --- a/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c +++ b/keyboards/ergodox_ez/keymaps/hacker_dvorak/user/layer_set_state_user.c @@ -1,5 +1,5 @@ -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { uint8_t layer = biton32(state); switch (layer) { diff --git a/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk b/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk index 6f40259b6..3cd837d56 100644 --- a/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk +++ b/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE=no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE=no SLEEP_LED_ENABLE=no NKRO_ENABLE = yes diff --git a/keyboards/ergodox_ez/keymaps/lukaus/keymap.c b/keyboards/ergodox_ez/keymaps/lukaus/keymap.c index 40156b3ff..5d797beb1 100644 --- a/keyboards/ergodox_ez/keymaps/lukaus/keymap.c +++ b/keyboards/ergodox_ez/keymaps/lukaus/keymap.c @@ -8,7 +8,7 @@ enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here - // Programmer's Dvorak "macros" : + // Programmer's Dvorak "macros" : // To be paired with get_mods to enable both // Shift functionality and Programmer's Dvorak @@ -50,19 +50,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Programmer's Dvorak layer [0] = LAYOUT_ergodox( DVP_ESC, DVP_AMPR, DVP_LBRACKET, DVP_LCBR, DVP_RCBR, DVP_LPRN, DVP_AT, - KC_TAB, KC_SCOLON, KC_COMMA, KC_DOT, KC_P, KC_Y, MO(4), - MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, + KC_TAB, KC_SCOLON, KC_COMMA, KC_DOT, KC_P, KC_Y, MO(4), + MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSHIFT, KC_QUOTE, KC_Q, KC_J, KC_K, KC_X, KC_HYPR, KC_LCTL, KC_LALT, KC_LGUI, LCTL(KC_C), LCTL(KC_V), - + KC_MS_BTN3, TO(1), KC_HOME, KC_SPACE, MO(4), KC_END, - + DVP_EQUAL, DVP_ASTERISK, DVP_RPRN, DVP_PLUS, DVP_RBRACKET, DVP_EXLM, DVP_HASH, TT(4), KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, KC_MEH, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(3), KC_DELETE, KC_BSLASH, KC_RGUI, KC_RCTL, LCTL(KC_F), - + KC_F17, KC_F18, KC_PGUP, KC_PGDOWN, KC_ENTER, KC_BSPACE ), // Gaming QWERTY layer @@ -72,9 +72,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F24, KC_LCTL, KC_F8, KC_LALT, KC_F14, KC_F13, - + KC_HOME, TO(0), KC_F15, KC_SPACE, KC_LCTL, KC_LALT, - + KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, KC_EQUAL, KC_F24, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, @@ -89,9 +89,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(3), KC_1, KC_2, KC_3, KC_4, KC_5, KC_LSHIFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, KC_LCTL, KC_F8, KC_LALT, KC_I, KC_S, - + KC_MS_BTN3, TO(1), KC_HOME, KC_SPACE, KC_LSHIFT, KC_END, - + KC_NO, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_NO, KC_NO, TO(0), KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_NO, KC_NO, KC_KP_4, KC_KP_5, KC_KP_6, KC_EQUAL, KC_NO, KC_NO, @@ -115,20 +115,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRANSPARENT, KC_TRANSPARENT, MEH_T(KC_NO), KC_CALCULATOR, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRANSPARENT, KC_RSHIFT, KC_DELETE, KC_INSERT, KC_TRANSPARENT, KC_F19, KC_RCTL, - + TO(2),KC_TRANSPARENT,KC_TRANSPARENT,LALT(KC_F10),KC_ENTER,KC_BSPACE ), // Keypad, Lighting, and Mouse emulation layer - ///* + ///* [4] = LAYOUT_ergodox( KC_ESCAPE, KC_NO, KC_NO, KC_MS_BTN3, KC_NO, KC_NO, KC_NO, KC_TAB, KC_NO, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_WH_UP, TO(0), KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN, KC_LSHIFT, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, TO(5), KC_LCTL, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, - + KC_MS_BTN3, TO(1), KC_HOME, KC_SPACE, KC_LSHIFT, KC_END, - + KC_NO, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_CALCULATOR, KC_NO, RGB_VAI, TO(0), KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_MINUS, KC_NO, RGB_VAD, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_NO, RGB_HUI, @@ -146,9 +146,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_WH_DOWN, KC_LSHIFT, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, TO(5), KC_LCTL, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, - + KC_MS_BTN3, TO(1), KC_HOME, KC_SPACE, KC_LSHIFT, KC_END, - + KC_NO, KC_I, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_CALCULATOR, RGB_VAI, TO(0), KC_G, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_MINUS, RGB_VAD, SHFT_COMMA, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, RGB_HUI, @@ -162,11 +162,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void led_set_keymap(uint8_t usb_led) { - + } void matrix_init_user (void) { - + } @@ -176,7 +176,7 @@ bool right_shift_down = false; bool numlock = false; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - + switch (keycode) { case KC_LSHIFT: if (record->event.pressed) @@ -205,7 +205,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case KC_NUMLOCK: - if (record->event.pressed) + if (record->event.pressed) { numlock = !numlock; } @@ -213,7 +213,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case DVP_ESC: if (left_shift_down || right_shift_down) - { + { if(record->event.pressed) SEND_STRING("~"); return false; @@ -229,7 +229,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case DVP_AMPR: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -244,7 +244,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; - break; + break; case SHFT_DOT: if(record->event.pressed) @@ -257,7 +257,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case DVP_LBRACKET: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -283,13 +283,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; return false; - break; - + break; + case DVP_LCBR: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) - { + { if(left_shift_down) unregister_code(KC_LSHIFT); if(right_shift_down) @@ -297,7 +297,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_5); unregister_code(KC_5); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -310,10 +310,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("{"); } return false; - break; - + break; + case DVP_RCBR: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -324,7 +324,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_3); unregister_code(KC_3); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -337,10 +337,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("}"); } return false; - break; - + break; + case DVP_LPRN: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -351,7 +351,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_1); unregister_code(KC_1); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -364,10 +364,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("("); } return false; - break; - + break; + case DVP_AT: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -380,7 +380,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_6); unregister_code(KC_6); unregister_code(KC_LSHIFT); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -393,11 +393,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("@"); } return false; - break; + break; + - case DVP_EQUAL: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -408,7 +408,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_9); unregister_code(KC_9); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -421,10 +421,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("="); } return false; - break; - + break; + case DVP_ASTERISK: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -435,7 +435,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_0); unregister_code(KC_0); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -448,10 +448,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("*"); } return false; - break; - + break; + case DVP_RPRN: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -462,7 +462,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_2); unregister_code(KC_2); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -475,10 +475,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(")"); } return false; - break; - + break; + case DVP_PLUS: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -489,7 +489,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_4); unregister_code(KC_4); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -502,10 +502,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("+"); } return false; - break; - + break; + case DVP_RBRACKET: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -516,7 +516,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_6); unregister_code(KC_6); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -529,10 +529,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("]"); } return false; - break; - + break; + case DVP_EXLM: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -543,7 +543,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_8); unregister_code(KC_8); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -556,10 +556,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("!"); } return false; - break; - + break; + case DVP_HASH: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -570,7 +570,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_GRAVE); unregister_code(KC_GRAVE); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -583,11 +583,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("#"); } return false; - break; + break; - // Russian + // Russian case RU_2: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -598,7 +598,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_GRAVE); unregister_code(KC_GRAVE); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -611,9 +611,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING("#"); } return false; - break; + break; case RU_3: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -624,7 +624,7 @@ case RU_3: register_code(KC_GRAVE); unregister_code(KC_GRAVE); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -637,9 +637,9 @@ case RU_3: SEND_STRING("#"); } return false; - break; + break; case RU_4: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -650,7 +650,7 @@ case RU_4: register_code(KC_GRAVE); unregister_code(KC_GRAVE); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -663,9 +663,9 @@ case RU_4: SEND_STRING("#"); } return false; - break; + break; case RU_6: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -676,7 +676,7 @@ case RU_6: register_code(KC_GRAVE); unregister_code(KC_GRAVE); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -689,9 +689,9 @@ case RU_6: SEND_STRING("#"); } return false; - break; + break; case RU_7: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -702,7 +702,7 @@ case RU_7: register_code(KC_GRAVE); unregister_code(KC_GRAVE); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -715,10 +715,10 @@ case RU_7: SEND_STRING("#"); } return false; - break; + break; case RU_DOT: - if (left_shift_down || right_shift_down) + if (left_shift_down || right_shift_down) { if(record->event.pressed) { @@ -729,7 +729,7 @@ case RU_7: register_code(KC_GRAVE); unregister_code(KC_GRAVE); - + if(left_shift_down) register_code(KC_LSHIFT); if(right_shift_down) @@ -742,7 +742,7 @@ case RU_7: SEND_STRING("#"); } return false; - break; + break; case RGB_SLD: @@ -751,7 +751,7 @@ case RU_7: } return false; break; - + case RGB_FF0000: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE @@ -762,7 +762,7 @@ case RU_7: } return false; break; - + case RGB_008000: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE @@ -773,7 +773,7 @@ case RU_7: } return false; break; - + case RGB_0000FF: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE @@ -784,7 +784,7 @@ case RU_7: } return false; break; - + case RGB_FFFFFF: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE @@ -795,7 +795,7 @@ case RU_7: } return false; break; - + case RGB_800080: if (record->event.pressed) { #ifdef RGBLIGHT_ENABLE @@ -806,12 +806,12 @@ case RU_7: } return false; break; - + } return true; } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { uint8_t layer = biton32(state); @@ -823,7 +823,7 @@ uint32_t layer_state_set_user(uint32_t state) { case 0: break; case 1: - ergodox_right_led_1_on(); + ergodox_right_led_1_on(); break; case 2: ergodox_right_led_2_on(); diff --git a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c index e06d0b769..18d6e667c 100644 --- a/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c +++ b/keyboards/ergodox_ez/keymaps/nathanvercaemert/keymap.c @@ -20,8 +20,8 @@ #define KC_PC_CUT LCTL(KC_X) #define KC_PC_COPY LCTL(KC_C) #define KC_PC_PASTE LCTL(KC_V) -#define ES_LESS_MAC KC_GRAVE -#define ES_GRTR_MAC LSFT(KC_GRAVE) +#define ES_LABK_MAC KC_GRAVE +#define ES_RABK_MAC LSFT(KC_GRAVE) #define ES_BSLS_MAC ALGR(KC_6) #define NO_PIPE_ALT KC_GRAVE #define NO_BSLS_ALT KC_EQUAL @@ -217,7 +217,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { uint8_t layer = biton32(state); ergodox_board_led_off(); ergodox_right_led_1_off(); diff --git a/keyboards/ergodox_ez/keymaps/nfriend/keymap.c b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c index ccea63c97..1d12093ba 100644 --- a/keyboards/ergodox_ez/keymaps/nfriend/keymap.c +++ b/keyboards/ergodox_ez/keymaps/nfriend/keymap.c @@ -1056,7 +1056,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { uint8_t layer = biton32(state); ergodox_board_led_off(); diff --git a/keyboards/ergodox_ez/keymaps/nfriend/rules.mk b/keyboards/ergodox_ez/keymaps/nfriend/rules.mk index 7e037f641..721d80360 100644 --- a/keyboards/ergodox_ez/keymaps/nfriend/rules.mk +++ b/keyboards/ergodox_ez/keymaps/nfriend/rules.mk @@ -1,6 +1,6 @@ # Set any rules.mk overrides for your specific keymap here. # See rules at https://docs.qmk.fm/#/config_options?id=the-rulesmk-file -DEBOUNCE_TYPE = eager_pk +DEBOUNCE_TYPE = sym_eager_pk LTO_ENABLE = yes COMMAND_ENABLE = no UNICODE_ENABLE = no diff --git a/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c b/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c index 2c90c02a6..3e607edb3 100644 --- a/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c +++ b/keyboards/ergodox_ez/keymaps/rgb_layer/keymap.c @@ -223,7 +223,7 @@ void matrix_scan_user(void) { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); diff --git a/keyboards/ergodox_ez/keymaps/skug/keymap.c b/keyboards/ergodox_ez/keymaps/skug/keymap.c index bebb8c6a6..1446ea746 100644 --- a/keyboards/ergodox_ez/keymaps/skug/keymap.c +++ b/keyboards/ergodox_ez/keymaps/skug/keymap.c @@ -27,9 +27,6 @@ #define MDIA 2 // media keys #define ARRW 3 // arrow + soon mouse -#define SE_LT SE_LESS -#define SE_GT LSFT(SE_LESS) - enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, @@ -73,15 +70,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_WBAK, - CTL_T(SE_APOS), SE_ACUT, KC_LALT, KC_BSPC, KC_SPC, - SE_LESS, KC_END, + CTL_T(SE_QUOT), SE_ACUT, KC_LALT, KC_BSPC, KC_SPC, + SE_LABK, KC_END, KC_LEFT, KC_RIGHT, KC_PGDN, CTL_T(KC_ENT), ALT_T(KC_ESC), KC_LGUI, // right hand TO(ARRW), KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, SE_OSLH), LT(SYMB, SE_AE), + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, SE_ODIA), LT(SYMB, SE_ADIA), KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSPC, KC_SPC, KC_BSPC, KC_ALGR, SE_ASTR, CTL_T(SE_TILD), KC_HOME, SE_CIRC, @@ -116,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,KC_EXLM,SE_AT, SE_LCBR,SE_RCBR,SE_PIPE,_______, _______,KC_HASH,SE_DLR, SE_LPRN,SE_RPRN,SE_GRV, _______,KC_PERC,SE_CIRC,SE_LBRC,SE_RBRC,SE_TILD,_______, - EPRM, _______, _______, SE_LT , SE_GT, + EPRM, _______, _______, SE_LABK , SE_RABK, _______,_______, _______,_______,_______, _______,_______,_______, diff --git a/keyboards/ergodox_ez/keymaps/stamm/keymap.c b/keyboards/ergodox_ez/keymaps/stamm/keymap.c index 890fbdc02..19eecae03 100644 --- a/keyboards/ergodox_ez/keymaps/stamm/keymap.c +++ b/keyboards/ergodox_ez/keymaps/stamm/keymap.c @@ -24,8 +24,8 @@ #define KC_PC_CUT LCTL(KC_X) #define KC_PC_COPY LCTL(KC_C) #define KC_PC_PASTE LCTL(KC_V) -#define ES_LESS_MAC KC_GRAVE -#define ES_GRTR_MAC LSFT(KC_GRAVE) +#define ES_LABK_MAC KC_GRAVE +#define ES_RABK_MAC LSFT(KC_GRAVE) #define ES_BSLS_MAC ALGR(KC_6) #define NO_PIPE_ALT KC_GRAVE #define NO_BSLS_ALT KC_EQUAL diff --git a/keyboards/ergodox_ez/keymaps/testing/keymap.c b/keyboards/ergodox_ez/keymaps/testing/keymap.c index a90458cef..5c1fc4af2 100644 --- a/keyboards/ergodox_ez/keymaps/testing/keymap.c +++ b/keyboards/ergodox_ez/keymaps/testing/keymap.c @@ -60,7 +60,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { uint8_t layer = biton32(layer_state); diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk index dce2aff80..25e51ae4e 100644 --- a/keyboards/ergodox_ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk @@ -12,7 +12,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,11 +22,10 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: ht UNICODE_ENABLE = yes # Unicode SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard SLEEP_LED_ENABLE = no -API_SYSEX_ENABLE = no RGB_MATRIX_ENABLE = no # enable later RGB_MATRIX_DRIVER = IS31FL3731 -DEBOUNCE_TYPE = eager_pr +DEBOUNCE_TYPE = sym_eager_pr # project specific files SRC += matrix.c \ diff --git a/keyboards/ergodox_infinity/config.h b/keyboards/ergodox_infinity/config.h index a64f3f4a1..4bee8c3d9 100644 --- a/keyboards/ergodox_infinity/config.h +++ b/keyboards/ergodox_infinity/config.h @@ -54,7 +54,19 @@ along with this program. If not, see . /* key matrix size */ #define MATRIX_ROWS 18 #define MATRIX_COLS 5 -#define LOCAL_MATRIX_ROWS 9 + +// For some reason, the rows are colums in the schematic, and vice versa +#define MATRIX_ROW_PINS { B2, B3, B18, B19, C0, C9, C10, C11, D0 } +#define MATRIX_COL_PINS { D1, D4, D5, D6, D7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Serial config (for communication between halves) */ +#define SERIAL_USART_DRIVER SD1 // Only true for the master half +#define SERIAL_USART_CONFIG { (SERIAL_USART_SPEED), } // Only field is speed +#define SERIAL_USART_FULL_DUPLEX /* number of backlight levels */ #define BACKLIGHT_LEVELS 3 @@ -62,16 +74,49 @@ along with this program. If not, see . #define LED_BRIGHTNESS_LO 100 #define LED_BRIGHTNESS_HI 255 +/* LED matrix driver */ +#define LED_DRIVER_ADDR_1 0x74 +#define LED_DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 76 +#define LED_MATRIX_SPLIT { 38, 38 } +#define LED_DISABLE_WHEN_USB_SUSPENDED + +/* i2c (for LED matrix) */ +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_BANK GPIOB +#define I2C1_SCL 0 +#define I2C1_SDA 1 + +#ifdef ST7565_ENABLE +/* LCD driver */ +# define ST7565_A0_PIN C7 +# define ST7565_RST_PIN C8 +# define ST7565_SS_PIN C4 +# define ST7565_SPI_CLK_DIVISOR 2 +# define ST7565_CONTRAST 22 +# define ST7565_DISPLAY_WIDTH 128 +# define ST7565_DISPLAY_HEIGHT 32 + +/* SPI (for LCD) */ +# define SPI_DRIVER SPID1 +# define SPI_SCK_PIN C5 +# define SPI_SCK_PAL_MODE PAL_MODE_ALTERNATIVE_2 +# define SPI_MOSI_PIN C6 +# define SPI_MOSI_PAL_MODE PAL_MODE_ALTERNATIVE_2 +# define SPI_MISO_PIN A4 // Just an unused pin, the "normal" MISO pin (C7) is used for other things +# define SPI_MISO_PAL_MODE PAL_MODE_ALTERNATIVE_7 // Default for A4 +#endif + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 -#define SERIAL_LINK_BAUD 562500 -#define SERIAL_LINK_THREAD_PRIORITY (NORMALPRIO - 1) - #define VISUALIZER_USER_DATA_SIZE 16 + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/ergodox_infinity/ergodox_infinity.c b/keyboards/ergodox_infinity/ergodox_infinity.c index 97b628470..90aa52242 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.c +++ b/keyboards/ergodox_infinity/ergodox_infinity.c @@ -1,29 +1,13 @@ #include QMK_KEYBOARD_H #include #include +#include +#include "eeconfig.h" #include "serial_link/system/serial_link.h" #ifdef VISUALIZER_ENABLE -#include "lcd_backlight.h" +# include "lcd_backlight.h" #endif -#ifdef WPM_ENABLE -# include "serial_link/protocol/transport.h" -# include "wpm.h" - -MASTER_TO_ALL_SLAVES_OBJECT(current_wpm, uint8_t); -static remote_object_t* remote_objects[] = { - REMOTE_OBJECT(current_wpm), -}; -static uint8_t last_sent_wpm = 0; -#endif - -void init_serial_link_hal(void) { - PORTA->PCR[1] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(2); - PORTA->PCR[2] = PORTx_PCRn_DSE | PORTx_PCRn_SRE | PORTx_PCRn_MUX(2); - PORTE->PCR[0] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(3); - PORTE->PCR[1] = PORTx_PCRn_DSE | PORTx_PCRn_SRE | PORTx_PCRn_MUX(3); -} - #define RED_PIN 1 #define GREEN_PIN 2 #define BLUE_PIN 3 @@ -52,7 +36,7 @@ void init_serial_link_hal(void) { void lcd_backlight_hal_init(void) { // Setup Backlight SIM->SCGC6 |= SIM_SCGC6_FTM0; - FTM0->CNT = 0; // Reset counter + FTM0->CNT = 0; // Reset counter // PWM Period // 16-bit maximum @@ -60,25 +44,25 @@ void lcd_backlight_hal_init(void) { // Set FTM to PWM output - Edge Aligned, Low-true pulses #define CNSC_MODE FTM_SC_CPWMS | FTM_SC_PS(4) | FTM_SC_CLKS(0) - CHANNEL_RED.CnSC = CNSC_MODE; + CHANNEL_RED.CnSC = CNSC_MODE; CHANNEL_GREEN.CnSC = CNSC_MODE; - CHANNEL_BLUE.CnSC = CNSC_MODE; + CHANNEL_BLUE.CnSC = CNSC_MODE; // System clock, /w prescalar setting FTM0->SC = FTM_SC_CLKS(1) | FTM_SC_PS(PRESCALAR_DEFINE); - CHANNEL_RED.CnV = 0; + CHANNEL_RED.CnV = 0; CHANNEL_GREEN.CnV = 0; - CHANNEL_BLUE.CnV = 0; + CHANNEL_BLUE.CnV = 0; RGB_PORT_GPIO->PDDR |= (1 << RED_PIN); RGB_PORT_GPIO->PDDR |= (1 << GREEN_PIN); RGB_PORT_GPIO->PDDR |= (1 << BLUE_PIN); #define RGB_MODE PORTx_PCRn_SRE | PORTx_PCRn_DSE | PORTx_PCRn_MUX(4) - RGB_PORT->PCR[RED_PIN] = RGB_MODE; + RGB_PORT->PCR[RED_PIN] = RGB_MODE; RGB_PORT->PCR[GREEN_PIN] = RGB_MODE; - RGB_PORT->PCR[BLUE_PIN] = RGB_MODE; + RGB_PORT->PCR[BLUE_PIN] = RGB_MODE; } static uint16_t cie_lightness(uint16_t v) { @@ -89,12 +73,11 @@ static uint16_t cie_lightness(uint16_t v) { // Y = (L* / 902.3) if L* <= 8 // Y = ((L* + 16) / 116)^3 if L* > 8 - float l = 100.0f * (v / 65535.0f); + float l = 100.0f * (v / 65535.0f); float y = 0.0f; if (l <= 8.0f) { - y = l / 902.3; - } - else { + y = l / 902.3; + } else { y = ((l + 16.0f) / 116.0f); y = y * y * y; if (y > 1.0f) { @@ -104,109 +87,89 @@ static uint16_t cie_lightness(uint16_t v) { return y * 65535.0f; } +#ifdef VISUALIZER_ENABLE void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) { - CHANNEL_RED.CnV = cie_lightness(r); +#else +void ergodox_infinity_lcd_color(uint16_t r, uint16_t g, uint16_t b) { +#endif + CHANNEL_RED.CnV = cie_lightness(r); CHANNEL_GREEN.CnV = cie_lightness(g); - CHANNEL_BLUE.CnV = cie_lightness(b); + CHANNEL_BLUE.CnV = cie_lightness(b); } -__attribute__ ((weak)) -void matrix_init_user(void) { -} +__attribute__ ((weak)) void matrix_init_user(void) {} -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +__attribute__ ((weak)) void matrix_scan_user(void) {} +void keyboard_pre_init_kb() { +#ifdef LED_MATRIX_ENABLE + // Turn on LED controller + setPinOutput(B16); + writePinHigh(B16); +#endif +#ifndef VISUALIZER_ENABLE + // The backlight always has to be initialized, otherwise it will stay lit + lcd_backlight_hal_init(); +# ifdef ST7565_ENABLE + ergodox_infinity_lcd_color(UINT16_MAX / 2, UINT16_MAX / 2, UINT16_MAX / 2); +# endif +#endif + keyboard_pre_init_user(); +} + void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up +#ifdef LED_MATRIX_ENABLE + /* + * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c), + * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot. + */ +# if !defined(LED_MATRIX_STARTUP_SPD) +# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2 +# endif + led_matrix_set_speed(LED_MATRIX_STARTUP_SPD); + led_matrix_set_flags(LED_FLAG_ALL); +#endif + matrix_init_user(); - // The backlight always has to be initialized, otherwise it will stay lit -#ifndef VISUALIZER_ENABLE - lcd_backlight_hal_init(); -#endif -#ifdef WPM_ENABLE - add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t*)); -#endif } void matrix_scan_kb(void) { // put your looping keyboard code here // runs every cycle (a lot) -#ifdef WPM_ENABLE - if (is_serial_link_master()) { - uint8_t current_wpm = get_current_wpm(); - if (current_wpm != last_sent_wpm) { - *begin_write_current_wpm() = current_wpm; - end_write_current_wpm(); - last_sent_wpm = current_wpm; - } - } else if (is_serial_link_connected()) { - uint8_t* new_wpm = read_current_wpm(); - if (new_wpm) { - set_current_wpm(*new_wpm); - } - } -#endif matrix_scan_user(); } -bool is_keyboard_master(void) { - return is_serial_link_master(); -} +__attribute__ ((weak)) void ergodox_board_led_on(void) {} -__attribute__ ((weak)) -void ergodox_board_led_on(void){ -} +__attribute__ ((weak)) void ergodox_right_led_1_on(void) {} -__attribute__ ((weak)) -void ergodox_right_led_1_on(void){ -} +__attribute__ ((weak)) void ergodox_right_led_2_on(void) {} -__attribute__ ((weak)) -void ergodox_right_led_2_on(void){ -} +__attribute__ ((weak)) void ergodox_right_led_3_on(void) {} -__attribute__ ((weak)) -void ergodox_right_led_3_on(void){ -} +__attribute__ ((weak)) void ergodox_board_led_off(void) {} -__attribute__ ((weak)) -void ergodox_board_led_off(void){ -} +__attribute__ ((weak)) void ergodox_right_led_1_off(void) {} -__attribute__ ((weak)) -void ergodox_right_led_1_off(void){ -} +__attribute__ ((weak)) void ergodox_right_led_2_off(void) {} -__attribute__ ((weak)) -void ergodox_right_led_2_off(void){ -} +__attribute__ ((weak)) void ergodox_right_led_3_off(void) {} -__attribute__ ((weak)) -void ergodox_right_led_3_off(void){ -} +__attribute__ ((weak)) void ergodox_right_led_1_set(uint8_t n) {} -__attribute__ ((weak)) -void ergodox_right_led_1_set(uint8_t n) { -} +__attribute__ ((weak)) void ergodox_right_led_2_set(uint8_t n) {} -__attribute__ ((weak)) -void ergodox_right_led_2_set(uint8_t n) { -} - -__attribute__ ((weak)) -void ergodox_right_led_3_set(uint8_t n) { -} +__attribute__ ((weak)) void ergodox_right_led_3_set(uint8_t n) {} #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { - {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}}, + {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}}, {{0, 10}, {1, 10}, {2, 10}, {3, 10}, {4, 10}}, {{0, 11}, {1, 11}, {2, 11}, {3, 11}, {4, 11}}, {{0, 12}, {1, 12}, {2, 12}, {3, 12}, {4, 12}}, @@ -226,3 +189,192 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}}, }; #endif + +#ifdef LED_MATRIX_ENABLE +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +// The numbers in the comments are the led numbers DXX on the PCB +/* Refer to IS31 manual for these locations + * driver + * | LED address + * | | */ +// Left half +// 45 44 43 42 41 40 39 + { 0, C2_2 }, { 0, C1_2 }, { 0, C5_1 }, { 0, C4_1 }, { 0, C3_1 }, { 0, C2_1 }, { 0, C1_1 }, +// 52 51 50 49 48 47 46 + { 0, C4_3 }, { 0, C3_3 }, { 0, C2_3 }, { 0, C1_3 }, { 0, C5_2 }, { 0, C4_2 }, { 0, C3_2 }, +// 58 57 56 55 54 53 + { 0, C5_4 }, { 0, C4_4 }, { 0, C3_4 }, { 0, C2_4 }, { 0, C1_4 }, { 0, C5_3 }, +// 67 66 65 64 63 62 61 + { 0, C4_6 }, { 0, C3_6 }, { 0, C2_6 }, { 0, C1_6 }, { 0, C5_5 }, { 0, C4_5 }, { 0, C3_5 }, +// 76 75 74 73 72 + { 0, C4_8 }, { 0, C3_8 }, { 0, C2_8 }, { 0, C1_8 }, { 0, C4_7 }, +// 60 59 + { 0, C2_5 }, { 0, C1_5 }, +// 68 + { 0, C5_6 }, +// 71 70 69 + { 0, C3_7 }, { 0, C2_7 }, { 0, C1_7 }, +// Right half (mirrored) +// Due to how LED_MATRIX_SPLIT is implemented, only the first half of g_is31_leds is actually used. +// Luckily, the right half has the same LED pinouts, just mirrored. +// 45 44 43 42 41 40 39 + { 0, C2_2 }, { 0, C1_2 }, { 0, C5_1 }, { 0, C4_1 }, { 0, C3_1 }, { 0, C2_1 }, { 0, C1_1 }, +// 52 51 50 49 48 47 46 + { 0, C4_3 }, { 0, C3_3 }, { 0, C2_3 }, { 0, C1_3 }, { 0, C5_2 }, { 0, C4_2 }, { 0, C3_2 }, +// 58 57 56 55 54 53 + { 0, C5_4 }, { 0, C4_4 }, { 0, C3_4 }, { 0, C2_4 }, { 0, C1_4 }, { 0, C5_3 }, +// 67 66 65 64 63 62 61 + { 0, C4_6 }, { 0, C3_6 }, { 0, C2_6 }, { 0, C1_6 }, { 0, C5_5 }, { 0, C4_5 }, { 0, C3_5 }, +// 76 75 74 73 72 + { 0, C4_8 }, { 0, C3_8 }, { 0, C2_8 }, { 0, C1_8 }, { 0, C4_7 }, +// 60 59 + { 0, C2_5 }, { 0, C1_5 }, +// 68 + { 0, C5_6 }, +// 71 70 69 + { 0, C3_7 }, { 0, C2_7 }, { 0, C1_7 }, +}; + +led_config_t g_led_config = { + { + // Key Matrix to LED Index + // Left half + { NO_LED, NO_LED, NO_LED, 33, 34 }, + { NO_LED, NO_LED, NO_LED, 32, 37 }, + { 6, 13, NO_LED, 26, 36 }, + { 5, 12, 19, 25, 35 }, + { 4, 11, 18, 24, 31 }, + { 3, 10, 17, 23, 30 }, + { 2, 9, 16, 22, 29 }, + { 1, 8, 15, 21, 28 }, + { 0, 7, 14, 20, 27 }, + // Right half + { NO_LED, NO_LED, NO_LED, 71, 72 }, + { NO_LED, NO_LED, NO_LED, 70, 75 }, + { 44, 51, NO_LED, 64, 74 }, + { 43, 50, 57, 63, 73 }, + { 42, 49, 56, 62, 69 }, + { 41, 48, 55, 61, 68 }, + { 40, 47, 54, 60, 67 }, + { 39, 46, 53, 59, 66 }, + { 38, 45, 52, 58, 65 }, + }, { + // LED Index to Physical Position (assumes a reasonable gap between halves) + // Left half + { 0, 3 }, { 15, 3 }, { 27, 1 }, { 39, 0 }, { 51, 1 }, { 63, 2 }, { 75, 2 }, + { 0, 13 }, { 15, 13 }, { 27, 11 }, { 39, 10 }, { 51, 11 }, { 63, 12 }, { 78, 17 }, + { 0, 23 }, { 15, 23 }, { 27, 21 }, { 39, 20 }, { 51, 21 }, { 63, 22 }, + { 0, 33 }, { 15, 33 }, { 27, 31 }, { 39, 30 }, { 51, 31 }, { 63, 32 }, { 78, 32 }, + { 4, 43 }, { 15, 43 }, { 27, 41 }, { 39, 40 }, { 51, 41 }, + { 89, 41 }, { 100, 46 }, + { 95, 55 }, + { 72, 54 }, { 83, 59 }, { 90, 64 }, + // Right half (mirrored) + { 224, 3 }, { 209, 3 }, { 197, 1 }, { 185, 0 }, { 173, 1 }, { 161, 2 }, { 149, 2 }, + { 224, 13 }, { 209, 13 }, { 197, 11 }, { 185, 10 }, { 173, 11 }, { 161, 12 }, { 146, 17 }, + { 224, 23 }, { 209, 23 }, { 197, 21 }, { 185, 20 }, { 173, 21 }, { 161, 22 }, + { 224, 33 }, { 209, 33 }, { 197, 31 }, { 185, 30 }, { 173, 31 }, { 161, 32 }, { 146, 32 }, + { 220, 43 }, { 209, 43 }, { 197, 41 }, { 185, 40 }, { 173, 41 }, + { 135, 41 }, { 124, 46 }, + { 129, 55 }, + { 152, 54 }, { 141, 59 }, { 134, 64 }, + }, { + // LED Index to Flag + // Left half + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, + 1, 1, + 1, + 1, 1, 1, + // Right half (mirrored) + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, + 1, 1, + 1, + 1, 1, 1, + } +}; +#endif + +#ifdef ST7565_ENABLE +__attribute__((weak)) void st7565_on_user(void) { + ergodox_infinity_lcd_color(UINT16_MAX / 2, UINT16_MAX / 2, UINT16_MAX / 2); +} + +__attribute__((weak)) void st7565_off_user(void) { + ergodox_infinity_lcd_color(0, 0, 0); +} + +static void format_layer_bitmap_string(char* buffer, uint8_t offset) { + for (int i = 0; i < 16 && i + offset < MAX_LAYER; i++) { + if (i == 0 || i == 4 || i == 8 || i == 12) { + *buffer = ' '; + ++buffer; + } + + uint8_t layer = i + offset; + if (layer_state_cmp(default_layer_state, layer)) { + *buffer = 'D'; + } else if (layer_state_is(layer)) { + *buffer = '1'; + } else { + *buffer = '_'; + } + ++buffer; + } + *buffer = 0; +} + +__attribute__((weak)) void st7565_task_user(void) { + if (is_keyboard_master()) { + // Draw led and layer status + led_t leds = host_keyboard_led_state(); + if(leds.num_lock) { st7565_write("Num ", false); } + if(leds.caps_lock) { st7565_write("Cap ", false); } + if(leds.scroll_lock) { st7565_write("Scrl ", false); } + if(leds.compose) { st7565_write("Com ", false); } + if(leds.kana) { st7565_write("Kana", false); } + st7565_advance_page(true); + + char layer_buffer[16 + 5]; // 3 spaces and one null terminator + st7565_set_cursor(0, 1); + format_layer_bitmap_string(layer_buffer, 0); + st7565_write_ln(layer_buffer, false); + format_layer_bitmap_string(layer_buffer, 16); + st7565_write_ln(layer_buffer, false); + st7565_write_ln(" 1=On D=Default", false); + } else { + // Draw logo + static const char 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, 0x00 + }; + + st7565_write(qmk_logo, false); + st7565_write(" Infinity Ergodox ", false); + } +} +#endif + +#if defined(SPLIT_KEYBOARD) +void usart_master_init(SerialDriver **driver) { + PORTA->PCR[1] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(2); + PORTA->PCR[2] = PORTx_PCRn_DSE | PORTx_PCRn_SRE | PORTx_PCRn_MUX(2); + + // driver is set to SD1 in config.h +} + +void usart_slave_init(SerialDriver **driver) { + PORTE->PCR[0] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(3); + PORTE->PCR[1] = PORTx_PCRn_DSE | PORTx_PCRn_SRE | PORTx_PCRn_MUX(3); + + *driver = &SD2; +} +#endif diff --git a/keyboards/ergodox_infinity/ergodox_infinity.h b/keyboards/ergodox_infinity/ergodox_infinity.h index 79f01b184..81ac1f338 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.h +++ b/keyboards/ergodox_infinity/ergodox_infinity.h @@ -80,6 +80,10 @@ inline void ergodox_led_all_set(uint8_t n) { ergodox_right_led_3_set(n); } +#ifndef VISUALIZER_ENABLE +void ergodox_infinity_lcd_color(uint16_t r, uint16_t g, uint16_t b); +#endif + /* * LEFT HAND: LINES 88-95 * RIGHT HAND: LINES 97-104 diff --git a/keyboards/ergodox_infinity/keymaps/default/keymap.c b/keyboards/ergodox_infinity/keymaps/default/keymap.c index cd9b476bb..ce8a3661e 100644 --- a/keyboards/ergodox_infinity/keymaps/default/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/default/keymap.c @@ -167,7 +167,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Runs just one time when the keyboard initializes. void matrix_init_user(void) { -}; +} // Runs constantly in the background, in a loop. @@ -192,4 +192,4 @@ void matrix_scan_user(void) { break; } -}; +} diff --git a/keyboards/ergodox_infinity/keymaps/narze/rules.mk b/keyboards/ergodox_infinity/keymaps/narze/rules.mk index 4bfa4fde2..4a4ed5861 100644 --- a/keyboards/ergodox_infinity/keymaps/narze/rules.mk +++ b/keyboards/ergodox_infinity/keymaps/narze/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/ergodox_infinity/led.c b/keyboards/ergodox_infinity/led.c deleted file mode 100644 index 0b50247d7..000000000 --- a/keyboards/ergodox_infinity/led.c +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include - -#include "led.h" - - -void led_set(uint8_t usb_led) { - //TODO: Add led emulation if there's no customized visualization - (void)usb_led; -} diff --git a/keyboards/ergodox_infinity/matrix.c b/keyboards/ergodox_infinity/matrix.c deleted file mode 100644 index 7baacd24d..000000000 --- a/keyboards/ergodox_infinity/matrix.c +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright 2016 Fred Sundvik -Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#include -#include -#include -#include -#include "timer.h" -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "matrix.h" -#include "eeconfig.h" -#include "serial_link/system/serial_link.h" - - -/* - * Infinity ErgoDox Pinusage: - * Column pins are input with internal pull-down. Row pins are output and strobe with high. - * Key is high or 1 when it turns on. - * - * col: { PTD1, PTD4, PTD5, PTD6, PTD7 } - * row: { PTB2, PTB3, PTB18, PTB19, PTC0, PTC9, PTC10, PTC11, PTD0 } - */ -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[LOCAL_MATRIX_ROWS]; -static bool debouncing = false; -static uint16_t debouncing_time = 0; - - -void matrix_init(void) -{ - /* Row(sense) */ - palSetPadMode(GPIOD, 1, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 4, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 5, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 6, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 7, PAL_MODE_INPUT_PULLDOWN); - - /* Column(strobe) */ - palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 18, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 19, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 0, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 9, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 10, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); - - memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS * sizeof(matrix_row_t)); - - matrix_init_quantum(); -} - -uint8_t matrix_scan(void) -{ - for (int row = 0; row < LOCAL_MATRIX_ROWS; row++) { - matrix_row_t data = 0; - - // strobe row - switch (row) { - case 0: palSetPad(GPIOB, 2); break; - case 1: palSetPad(GPIOB, 3); break; - case 2: palSetPad(GPIOB, 18); break; - case 3: palSetPad(GPIOB, 19); break; - case 4: palSetPad(GPIOC, 0); break; - case 5: palSetPad(GPIOC, 9); break; - case 6: palSetPad(GPIOC, 10); break; - case 7: palSetPad(GPIOC, 11); break; - case 8: palSetPad(GPIOD, 0); break; - } - - // need wait to settle pin state - // if you wait too short, or have a too high update rate - // the keyboard might freeze, or there might not be enough - // processing power to update the LCD screen properly. - // 20us, or two ticks at 100000Hz seems to be OK - wait_us(20); - - // read col data: { PTD1, PTD4, PTD5, PTD6, PTD7 } - data = ((palReadPort(GPIOD) & 0xF0) >> 3) | - ((palReadPort(GPIOD) & 0x02) >> 1); - - // un-strobe row - switch (row) { - case 0: palClearPad(GPIOB, 2); break; - case 1: palClearPad(GPIOB, 3); break; - case 2: palClearPad(GPIOB, 18); break; - case 3: palClearPad(GPIOB, 19); break; - case 4: palClearPad(GPIOC, 0); break; - case 5: palClearPad(GPIOC, 9); break; - case 6: palClearPad(GPIOC, 10); break; - case 7: palClearPad(GPIOC, 11); break; - case 8: palClearPad(GPIOD, 0); break; - } - - if (matrix_debouncing[row] != data) { - matrix_debouncing[row] = data; - debouncing = true; - debouncing_time = timer_read(); - } - } - - uint8_t offset = 0; -#if (defined(EE_HANDS) || defined(MASTER_IS_ON_RIGHT)) -#ifdef EE_HANDS - if (is_serial_link_master() && !eeconfig_read_handedness()) { -#else - if (is_serial_link_master()) { -#endif - offset = MATRIX_ROWS - LOCAL_MATRIX_ROWS; - } -#endif - - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int row = 0; row < LOCAL_MATRIX_ROWS; row++) { - matrix[offset + row] = matrix_debouncing[row]; - } - debouncing = false; - } - matrix_scan_quantum(); - return 1; -} - -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & (1</os/hal/boards/ +# or /boards +# This board was copied from PJRC_TEENSY_3_1. The only difference should be a +# hack to ensure the watchdog has started before trying to disable it, and an +# override to disable restart of USB driver after returning from suspend. +BOARD = IC_TEENSY_3_1 + # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 -CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work UNICODE_ENABLE = yes # Unicode SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard -CUSTOM_MATRIX = yes # Custom matrix file -SERIAL_LINK_ENABLE = yes -VISUALIZER_ENABLE = yes -LCD_ENABLE = yes -BACKLIGHT_ENABLE = yes -BACKLIGHT_DRIVER = custom -LCD_BACKLIGHT_ENABLE = yes -MIDI_ENABLE = no RGBLIGHT_ENABLE = no +SPLIT_KEYBOARD = yes +SERIAL_DRIVER = usart + +ST7565_ENABLE = yes + +LED_MATRIX_ENABLE = yes +LED_MATRIX_DRIVER = IS31FL3731 + +# Config for Visualizer (set VISUALIZER_ENABLE = yes and ST7565_ENABLE = no to use) +LCD_ENABLE = yes +LCD_BACKLIGHT_ENABLE = yes LCD_DRIVER = st7565 LCD_WIDTH = 128 LCD_HEIGHT = 32 -LED_DRIVER = is31fl3731c -LED_WIDTH = 7 -LED_HEIGHT = 7 - -# project specific files -SRC = matrix.c \ - led.c - LAYOUTS = ergodox diff --git a/keyboards/ergodox_infinity/visualizer.c b/keyboards/ergodox_infinity/visualizer.c index 4b16021ab..1ea891e83 100644 --- a/keyboards/ergodox_infinity/visualizer.c +++ b/keyboards/ergodox_infinity/visualizer.c @@ -30,7 +30,6 @@ along with this program. If not, see . #include "visualizer_keyframes.h" #include "lcd_keyframes.h" #include "lcd_backlight_keyframes.h" -#include "system/serial_link.h" #include "default_animations.h" static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); @@ -177,7 +176,7 @@ static void update_emulated_leds(visualizer_state_t* state, visualizer_keyboard_ uint8_t new_index; uint8_t old_index; - if (is_serial_link_master()) { + if (is_keyboard_master()) { new_index = get_led_index_master(user_data_new); old_index = get_led_index_master(user_data_old); } diff --git a/keyboards/ergodox_stm32/rules.mk b/keyboards/ergodox_stm32/rules.mk index c2eaaa526..b3fba3851 100644 --- a/keyboards/ergodox_stm32/rules.mk +++ b/keyboards/ergodox_stm32/rules.mk @@ -7,7 +7,7 @@ BOARD = ST_NUCLEO64_F103RB CFLAGS += "-Wno-error=deprecated" EXTRAFLAGS = -O0 -g -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ergosaurus/config.h b/keyboards/ergosaurus/config.h index 9731897c6..fd85e8790 100644 --- a/keyboards/ergosaurus/config.h +++ b/keyboards/ergosaurus/config.h @@ -194,27 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ergosaurus/rules.mk b/keyboards/ergosaurus/rules.mk index 841c3fb6c..0e849ee69 100644 --- a/keyboards/ergosaurus/rules.mk +++ b/keyboards/ergosaurus/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ergoslab/rules.mk b/keyboards/ergoslab/rules.mk index f5ae8c51e..87da2f0e3 100644 --- a/keyboards/ergoslab/rules.mk +++ b/keyboards/ergoslab/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/ergotravel/keymaps/yanfali/rules.mk b/keyboards/ergotravel/keymaps/yanfali/rules.mk index 2964d73ab..16409396a 100644 --- a/keyboards/ergotravel/keymaps/yanfali/rules.mk +++ b/keyboards/ergotravel/keymaps/yanfali/rules.mk @@ -1,6 +1,6 @@ BOOTLOADER = qmk-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/ergotravel/rules.mk b/keyboards/ergotravel/rules.mk index ab0ae83c1..a89e8d95c 100644 --- a/keyboards/ergotravel/rules.mk +++ b/keyboards/ergotravel/rules.mk @@ -2,14 +2,13 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/ericrlau/numdiscipline/rev1/config.h b/keyboards/ericrlau/numdiscipline/rev1/config.h index 71169683a..ea4c16b8b 100644 --- a/keyboards/ericrlau/numdiscipline/rev1/config.h +++ b/keyboards/ericrlau/numdiscipline/rev1/config.h @@ -191,26 +191,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ericrlau/numdiscipline/rev1/rules.mk b/keyboards/ericrlau/numdiscipline/rev1/rules.mk index 03063dec2..639af4453 100644 --- a/keyboards/ericrlau/numdiscipline/rev1/rules.mk +++ b/keyboards/ericrlau/numdiscipline/rev1/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/esca/getawayvan/config.h b/keyboards/esca/getawayvan/config.h index e9fbc6b40..3b718c583 100644 --- a/keyboards/esca/getawayvan/config.h +++ b/keyboards/esca/getawayvan/config.h @@ -35,7 +35,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { A9, A8, A3, A5 } #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_PIN #define BACKLIGHT_LEVELS 6 #define GRAVE_ESC_CTRL_OVERRIDE diff --git a/keyboards/esca/getawayvan/rules.mk b/keyboards/esca/getawayvan/rules.mk index 58f9a52df..36439f1ae 100644 --- a/keyboards/esca/getawayvan/rules.mk +++ b/keyboards/esca/getawayvan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/esca/getawayvan_f042/config.h b/keyboards/esca/getawayvan_f042/config.h index f83ec7434..8921e9db4 100644 --- a/keyboards/esca/getawayvan_f042/config.h +++ b/keyboards/esca/getawayvan_f042/config.h @@ -34,7 +34,6 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { A9, A8, A3, A5 } #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_PIN #define BACKLIGHT_LEVELS 6 #define GRAVE_ESC_CTRL_OVERRIDE diff --git a/keyboards/esca/getawayvan_f042/rules.mk b/keyboards/esca/getawayvan_f042/rules.mk index 8d2786090..407b82d75 100644 --- a/keyboards/esca/getawayvan_f042/rules.mk +++ b/keyboards/esca/getawayvan_f042/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/espectro/rules.mk b/keyboards/espectro/rules.mk index 57a846fb3..c289fa81b 100755 --- a/keyboards/espectro/rules.mk +++ b/keyboards/espectro/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/eve/meteor/rules.mk b/keyboards/eve/meteor/rules.mk index 93bb0a56e..8da7f421e 100644 --- a/keyboards/eve/meteor/rules.mk +++ b/keyboards/eve/meteor/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/evil80/rules.mk b/keyboards/evil80/rules.mk index 46b76962b..5f7f8c42a 100644 --- a/keyboards/evil80/rules.mk +++ b/keyboards/evil80/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/evolv/rules.mk b/keyboards/evolv/rules.mk index b01db8134..8953f7b73 100644 --- a/keyboards/evolv/rules.mk +++ b/keyboards/evolv/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/evyd13/atom47/keymaps/LEdiodes/keymap.c b/keyboards/evyd13/atom47/keymaps/LEdiodes/keymap.c index 87e124421..ae72a3fd9 100644 --- a/keyboards/evyd13/atom47/keymaps/LEdiodes/keymap.c +++ b/keyboards/evyd13/atom47/keymaps/LEdiodes/keymap.c @@ -1,3 +1,20 @@ +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + #include QMK_KEYBOARD_H // These are all aliases for the function layers. @@ -7,27 +24,27 @@ #define _L3 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_L0] = LAYOUT( - 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_BSPC, \ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(_L1), \ - KC_LCTL, KC_LGUI, KC_LALT, TG(_L3), KC_SPC, KC_SPC, MO(_L2), KC_RALT, KC_APP, KC_RCTRL), \ +[_L0] = LAYOUT_split_space( + 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_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(_L1), + KC_LCTL, KC_LGUI, KC_LALT, TG(_L3), KC_SPC, KC_SPC, MO(_L2), KC_RALT, KC_APP, KC_RCTRL), -[_L2] = LAYOUT( - _______, KC_VOLD, KC_VOLU, KC_MUTE, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, \ - KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, _______, \ - _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ +[_L2] = LAYOUT_split_space( + _______, KC_VOLD, KC_VOLU, KC_MUTE, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, + KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, _______, + _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), -[_L1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ - _______, _______, _______, _______, _______, KC_QUOT, KC_SLSH, KC_LBRC, KC_RBRC, KC_BSLS, KC_RSFT, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ +[_L1] = LAYOUT_split_space( + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + _______, _______, _______, _______, _______, KC_QUOT, KC_SLSH, KC_LBRC, KC_RBRC, KC_BSLS, KC_RSFT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), -[_L3] = LAYOUT( - _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, KC_0, KC_DOT, _______, _______, _______, RESET), \ +[_L3] = LAYOUT_split_space( + _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_0, KC_DOT, _______, _______, _______, RESET) }; diff --git a/keyboards/evyd13/atom47/keymaps/default/keymap.c b/keyboards/evyd13/atom47/keymaps/default/keymap.c index dc87b5a52..a7fbdda31 100644 --- a/keyboards/evyd13/atom47/keymaps/default/keymap.c +++ b/keyboards/evyd13/atom47/keymaps/default/keymap.c @@ -1,3 +1,20 @@ +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + #include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -11,40 +28,27 @@ #define _PN 3 //Pn const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_MA] = LAYOUT( - 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_BSPC, \ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(_FN1), \ - KC_LCTL, KC_LGUI, KC_LALT, MO(_PN), KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_APP, KC_RCTRL), \ +[_MA] = LAYOUT_split_space( + 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_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(_FN1), + KC_LCTL, KC_LGUI, KC_LALT, MO(_PN), KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_APP, KC_RCTRL), -[_FN] = LAYOUT( - _______, KC_VOLD, KC_VOLU, KC_MUTE, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, \ - KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, _______, \ - _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ +[_FN] = LAYOUT_split_space( + _______, KC_VOLD, KC_VOLU, KC_MUTE, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, + KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, _______, + _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), -[_FN1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ - _______, _______, _______, _______, _______, KC_QUOT, KC_SLSH, KC_LBRC, KC_RBRC, KC_BSLS, KC_RSFT, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ +[_FN1] = LAYOUT_split_space( + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + _______, _______, _______, _______, _______, KC_QUOT, KC_SLSH, KC_LBRC, KC_RBRC, KC_BSLS, KC_RSFT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), -[_PN] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, \ - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), +[_PN] = LAYOUT_split_space( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), }; - -void led_set_user(uint8_t usb_led) { - if (usb_led & (1<. +*/ + #include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -9,60 +26,24 @@ #define _LO 1 //FN1 #define _RA 2 //FN -enum custom_keycodes { - CTRLZ = SAFE_RANGE, - CTRLX, - CTRLC, - CTRLV -}; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_MA] = LAYOUT( - KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, \ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, MO(_LO), KC_SPC, KC_SPC, MO(_RA), KC_RALT, KC_APP, KC_RCTRL), \ +[_MA] = LAYOUT_split_space( + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, MO(_LO), KC_SPC, KC_SPC, MO(_RA), KC_RALT, KC_APP, KC_RCTRL), -[_LO] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ - _______, CTRLZ, CTRLX, CTRLC, CTRLV, _______, _______, KC_QUOT, KC_LBRC, KC_RBRC, KC_BSLS, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), \ +[_LO] = LAYOUT_split_space( + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, KC_QUOT, KC_LBRC, KC_RBRC, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), -[_RA] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, \ - KC_CAPS, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_PSCR, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ +[_RA] = LAYOUT_split_space( + _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) }; -void led_set_user(uint8_t usb_led) { - if (usb_led & (1<event.pressed) { - switch(keycode) { - case CTRLZ: - SEND_STRING(SS_LCTRL("z")); - return false; - case CTRLX: - SEND_STRING(SS_LCTRL("x")); - return false; - case CTRLC: - SEND_STRING(SS_LCTRL("c")); - return false; - case CTRLV: - SEND_STRING(SS_LCTRL("v")); - return false; - } - } - return true; -}; diff --git a/keyboards/evyd13/atom47/keymaps/junonum_a47/keymap.c b/keyboards/evyd13/atom47/keymaps/junonum_a47/keymap.c index ebd52ffd0..8204bc32b 100644 --- a/keyboards/evyd13/atom47/keymaps/junonum_a47/keymap.c +++ b/keyboards/evyd13/atom47/keymaps/junonum_a47/keymap.c @@ -1,3 +1,20 @@ +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + #include QMK_KEYBOARD_H /* enum custom_keycodes { @@ -35,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Primary layer - [_MAIN] = LAYOUT( + [_MAIN] = LAYOUT_split_space( 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_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTEN, @@ -43,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Main Fn navigation layer - [_SPLEFT] = LAYOUT( + [_SPLEFT] = LAYOUT_split_space( _______, KC_VOLU, KC_PGUP, KC_UP, KC_PGDN, KC_INS, _______, _______, KC_UP, _______, KC_PSCR, _______, _______, _______, KC_VOLD, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL , _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_END, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, @@ -51,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Primary numeric layer using right Spacebar - [_SPRIGHT] = LAYOUT( + [_SPRIGHT] = LAYOUT_split_space( KC_GRV, _______, _______, KC_LBRC, KC_RBRC, _______, _______, KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, KC_MINUS, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, KC_EQUAL, _______, @@ -59,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Secondary symbol layer, also Lower - [_LOWER] = LAYOUT( + [_LOWER] = LAYOUT_split_space( KC_TILD, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_SLCK, KC_PAUS, KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_DLR, KC_PERC, KC_CIRC, KC_UNDS, KC_PIPE, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_EXLM, KC_AT, KC_HASH, KC_PLUS, _______, @@ -67,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Numpad layer // Also a homage to Planck with the media player/pause button - [_RAISE] = LAYOUT( + [_RAISE] = LAYOUT_split_space( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -75,26 +92,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Safety layer for special functions - [_ADJUST] = LAYOUT( + [_ADJUST] = LAYOUT_split_space( _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DP_ON, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [_DPAD] = LAYOUT( + [_DPAD] = LAYOUT_split_space( 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_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, DPADNUM, KC_SPC, DP_OFF, KC_LEFT, KC_DOWN, KC_RGHT ), - [_DPADNUM] = LAYOUT( + [_DPADNUM] = LAYOUT_split_space( _______, 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_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), + ) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -136,15 +153,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - // Turn capslock on - writePinLow(E6); - - - } else { - // Turn capslock off - writePinHigh(E6); - } -} diff --git a/keyboards/evyd13/atom47/keymaps/via/keymap.c b/keyboards/evyd13/atom47/keymaps/via/keymap.c new file mode 100644 index 000000000..686a4d3db --- /dev/null +++ b/keyboards/evyd13/atom47/keymaps/via/keymap.c @@ -0,0 +1,44 @@ +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_split_space( + 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_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(2), + KC_LCTL, KC_LGUI, KC_LALT, MO(3), KC_SPC, KC_SPC, MO(1), KC_RALT, KC_APP, KC_RCTRL), + +[1] = LAYOUT_split_space( + _______, KC_VOLD, KC_VOLU, KC_MUTE, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, + KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, _______, + _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[2] = LAYOUT_split_space( + 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + _______, _______, _______, _______, _______, KC_QUOT, KC_SLSH, KC_LBRC, KC_RBRC, KC_BSLS, KC_RSFT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[3] = LAYOUT_split_space( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), +}; diff --git a/keyboards/xd60/keymaps/fvolpe83/rules.mk b/keyboards/evyd13/atom47/keymaps/via/rules.mk old mode 100755 new mode 100644 similarity index 100% rename from keyboards/xd60/keymaps/fvolpe83/rules.mk rename to keyboards/evyd13/atom47/keymaps/via/rules.mk diff --git a/keyboards/evyd13/atom47/readme.md b/keyboards/evyd13/atom47/readme.md index 70171c04d..30ad714a7 100644 --- a/keyboards/evyd13/atom47/readme.md +++ b/keyboards/evyd13/atom47/readme.md @@ -3,24 +3,13 @@ ![Atom47](https://i.imgur.com/Wwflqvt.png) ## Support -Keyboard Maintainer: [Evyd13](https://github.com/evyd13) -Hardware Supported: Atom47 rev2/rev3 -Hardware Availability: [GeekHack.com Group Buy](https://geekhack.org/index.php?topic=93447.msg2545221) - - -## Features (rev3 and up) -- QMK Firmware -- 6 Underglow RGB leds -- In-switch leds -- Through-hole micro usb connector (less likely to break off!) -- South facing leds for the QMX/Zealencio users -- Multiple layouts -- Easily reachable reset button under the spacebar -- CapsLock indicator +* Keyboard Maintainer: [Evelien Dekkers](https://github.com/evyd13) +* Hardware Supported: Atom47 rev2/rev3/rev4/rev5 +* Hardware Availability: [Open source on GitHub](https://github.com/evyd13/atom47) ## Build -To build the default keymap for the latest revision, simply run `make atom47:default`. Specifiy the revision like so: `make atom47/rev3:default`. +Make example for this keyboard (after setting up your build environment): -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. + make evyd13/atom47/rev5:default -![Atom47](https://i.imgur.com/JfYnOba.jpg) +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/evyd13/atom47/rev2/config.h b/keyboards/evyd13/atom47/rev2/config.h index 62e72723d..95fc7a478 100644 --- a/keyboards/evyd13/atom47/rev2/config.h +++ b/keyboards/evyd13/atom47/rev2/config.h @@ -1,5 +1,5 @@ /* -Copyright 2012 Evy Dekkers +Copyright 2021 Evelien 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 @@ -15,17 +15,16 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV2_CONFIG_H -#define REV2_CONFIG_H +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0003 -#define MANUFACTURER Vortex -#define PRODUCT Core +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0x8E66 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Evyd13 +#define PRODUCT Atom47 rev2 /* key matrix size */ #define MATRIX_ROWS 4 @@ -37,7 +36,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS {D7,D5,F0,F1,F4,F6,F7,D4,C7,C6,D6,B5,B4} #define UNUSED_PINS -#define BACKLIGHT_PIN B6 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -55,13 +53,15 @@ along with this program. If not, see . /* Backlight configuration */ +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 4 +#define LED_CAPS_LOCK_PIN F5 + #define RGB_DI_PIN D0 // The pin the LED strip is connected to #define RGBLED_NUM 1 // Number of LEDs in your strip #define QMK_ESC_OUTPUT D7 // usually COL -#define QMK_ESC_INPUT B1 // usually ROW +#define QMK_ESC_INPUT B7 // usually ROW #define QMK_LED B6 - -#endif diff --git a/keyboards/evyd13/atom47/rev2/info.json b/keyboards/evyd13/atom47/rev2/info.json index aa15e7606..a9947ae89 100644 --- a/keyboards/evyd13/atom47/rev2/info.json +++ b/keyboards/evyd13/atom47/rev2/info.json @@ -1,12 +1,63 @@ { - "keyboard_name": "Atom47", - "url": "", - "maintainer": "evyd13", - "width": 13, - "height": 4, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2, "w":1.25}, {"x":12, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}] + "keyboard_name": "Atom47 rev2", + "url": "", + "maintainer": "evyd13", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_split_space": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + + {"x":0, "y":1, "w":1.25}, + {"x":1.25, "y":1}, + {"x":2.25, "y":1}, + {"x":3.25, "y":1}, + {"x":4.25, "y":1}, + {"x":5.25, "y":1}, + {"x":6.25, "y":1}, + {"x":7.25, "y":1}, + {"x":8.25, "y":1}, + {"x":9.25, "y":1}, + {"x":10.25, "y":1}, + {"x":11.25, "y":1, "w":1.75}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2, "w":1.25}, + {"x":12, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3, "w":1.75}, + {"x":6, "y":3, "w":2.75}, + {"x":8.75, "y":3}, + {"x":9.75, "y":3}, + {"x":10.75, "y":3}, + {"x":11.75, "y":3, "w":1.25} + ] + } } - } } diff --git a/keyboards/evyd13/atom47/rev2/rev2.c b/keyboards/evyd13/atom47/rev2/rev2.c index 06fce06da..adb21be36 100644 --- a/keyboards/evyd13/atom47/rev2/rev2.c +++ b/keyboards/evyd13/atom47/rev2/rev2.c @@ -1,34 +1,18 @@ +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + #include "rev2.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<<5); - - //Set output high, so the capslock led is off - PORTB |= (1 << 5); -} - -void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<. +*/ + +#pragma once #include "quantum.h" // readability #define XXX KC_NO -#define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2c, \ - k30, k31, k32, k33, k34, k36, k38, k39, k3a, k3c \ +#define LAYOUT_all LAYOUT_split_space + +#define LAYOUT_split_space( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2c, \ + k30, k31, k32, k33, k34, k36, k38, k39, k3a, k3c \ ) \ { \ - {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c}, \ - {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, XXX, k1c}, \ - {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, XXX, k2c}, \ - {k30, k31, k32, k33, k34, XXX, k36, XXX, k38, k39, k3a, XXX, k3c} \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, XXX, k1c}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, XXX, k2c}, \ + {k30, k31, k32, k33, k34, XXX, k36, XXX, k38, k39, k3a, XXX, k3c} \ } void matrix_init_user(void); void matrix_scan_user(void); - -#endif diff --git a/keyboards/evyd13/atom47/rev2/rules.mk b/keyboards/evyd13/atom47/rev2/rules.mk index 0b6b87998..632bdae8f 100644 --- a/keyboards/evyd13/atom47/rev2/rules.mk +++ b/keyboards/evyd13/atom47/rev2/rules.mk @@ -1,2 +1,2 @@ -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality +# Build Options +RGBLIGHT_ENABLE = no diff --git a/keyboards/evyd13/atom47/rev3/config.h b/keyboards/evyd13/atom47/rev3/config.h index f585ddda9..4e53abd01 100644 --- a/keyboards/evyd13/atom47/rev3/config.h +++ b/keyboards/evyd13/atom47/rev3/config.h @@ -1,5 +1,5 @@ /* -Copyright 2012 Evy Dekkers +Copyright 2021 Evelien 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 @@ -15,17 +15,16 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV3_CONFIG_H -#define REV3_CONFIG_H +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0003 -#define MANUFACTURER Vortex -#define PRODUCT Core +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0x0E6D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Evyd13 +#define PRODUCT Atom47 rev3 /* key matrix size */ #define MATRIX_ROWS 4 @@ -37,7 +36,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS {B7,F0,F1,F4,F6,D4,D6,D7,B4,B5,C6,C7,F7} #define UNUSED_PINS -#define BACKLIGHT_PIN B6 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -50,13 +48,15 @@ along with this program. If not, see . /* Backlight configuration */ -#define BACKLIGHT_LEVELS 4 +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define LED_CAPS_LOCK_PIN E6 #define RGB_DI_PIN F5 // The pin the LED strip is connected to #define RGBLED_NUM 6 // Number of LEDs in your strip #define RGBLIGHT_ANIMATIONS #define QMK_ESC_OUTPUT B7 // usually COL -#define QMK_ESC_INPUT B3 // usually ROW +#define QMK_ESC_INPUT B0 // usually ROW #define QMK_LED E6 - -#endif diff --git a/keyboards/evyd13/atom47/rev3/info.json b/keyboards/evyd13/atom47/rev3/info.json index aa15e7606..bd7d6c2ae 100644 --- a/keyboards/evyd13/atom47/rev3/info.json +++ b/keyboards/evyd13/atom47/rev3/info.json @@ -1,12 +1,114 @@ { - "keyboard_name": "Atom47", - "url": "", - "maintainer": "evyd13", - "width": 13, - "height": 4, - "layouts": { - "LAYOUT": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2, "w":1.25}, {"x":12, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}] + "keyboard_name": "Atom47 rev3", + "url": "", + "maintainer": "evyd13", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_split_space": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + + {"x":0, "y":1, "w":1.25}, + {"x":1.25, "y":1}, + {"x":2.25, "y":1}, + {"x":3.25, "y":1}, + {"x":4.25, "y":1}, + {"x":5.25, "y":1}, + {"x":6.25, "y":1}, + {"x":7.25, "y":1}, + {"x":8.25, "y":1}, + {"x":9.25, "y":1}, + {"x":10.25, "y":1}, + {"x":11.25, "y":1, "w":1.75}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2, "w":1.25}, + {"x":12, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3, "w":1.75}, + {"x":6, "y":3, "w":2.75}, + {"x":8.75, "y":3}, + {"x":9.75, "y":3}, + {"x":10.75, "y":3}, + {"x":11.75, "y":3, "w":1.25} + ] + }, + "LAYOUT_full_space": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + + {"x":0, "y":1, "w":1.25}, + {"x":1.25, "y":1}, + {"x":2.25, "y":1}, + {"x":3.25, "y":1}, + {"x":4.25, "y":1}, + {"x":5.25, "y":1}, + {"x":6.25, "y":1}, + {"x":7.25, "y":1}, + {"x":8.25, "y":1}, + {"x":9.25, "y":1}, + {"x":10.25, "y":1}, + {"x":11.25, "y":1, "w":1.75}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2, "w":1.25}, + {"x":12, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3, "w":1.25}, + {"x":2.5, "y":3, "w":1.25}, + {"x":3.75, "y":3, "w":6.25}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3} + ] + } } - } -} +} \ No newline at end of file diff --git a/keyboards/evyd13/atom47/rev3/rev3.c b/keyboards/evyd13/atom47/rev3/rev3.c index c541ed559..52fa91fbc 100644 --- a/keyboards/evyd13/atom47/rev3/rev3.c +++ b/keyboards/evyd13/atom47/rev3/rev3.c @@ -1,27 +1,18 @@ +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + #include "rev3.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 - DDRE |= (1 << 6); - - //Set output high, so the capslock led is off - PORTE |= (1 << 6); -} - -void led_set_kb(uint8_t usb_led) { - led_set_user(usb_led); -} diff --git a/keyboards/evyd13/atom47/rev3/rev3.h b/keyboards/evyd13/atom47/rev3/rev3.h index ad875bb40..aa2e53ba2 100644 --- a/keyboards/evyd13/atom47/rev3/rev3.h +++ b/keyboards/evyd13/atom47/rev3/rev3.h @@ -1,23 +1,51 @@ -#ifndef ATOM47_REV3_H -#define ATOM47_REV3_H +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once #include "quantum.h" // readability #define XXX KC_NO -#define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ - k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ - k30, k31, k32, k33, k35, k37, k39, k3a, k3b, k3c \ +#define LAYOUT_all LAYOUT_split_space + +#define LAYOUT_split_space( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k35, k37, k39, k3a, k3b, k3c \ ) \ { \ - {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c}, \ - {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, XXX, k1c}, \ - {k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c}, \ - {k30, k31, k32, k33, XXX, k35, XXX, k37, XXX, k39, k3a, k3b, k3c} \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, XXX, k1c}, \ + {k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c}, \ + {k30, k31, k32, k33, XXX, k35, XXX, k37, XXX, k39, k3a, k3b, k3c} \ } - -#endif +#define LAYOUT_full_space( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k31, k32, k37, k39, k3a, k3b, k3c \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, XXX, k1c}, \ + {k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c}, \ + {k30, k31, k32, XXX, XXX, XXX, XXX, k37, XXX, k39, k3a, k3b, k3c} \ +} diff --git a/keyboards/evyd13/atom47/rev3/rules.mk b/keyboards/evyd13/atom47/rev3/rules.mk index 2df225e38..e69de29bb 100644 --- a/keyboards/evyd13/atom47/rev3/rules.mk +++ b/keyboards/evyd13/atom47/rev3/rules.mk @@ -1,2 +0,0 @@ -NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality diff --git a/keyboards/evyd13/atom47/rev4/config.h b/keyboards/evyd13/atom47/rev4/config.h new file mode 100644 index 000000000..02a1b1675 --- /dev/null +++ b/keyboards/evyd13/atom47/rev4/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0x8446 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Evyd13 +#define PRODUCT Atom47 rev4 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {D0,C2,C5,C6} +#define MATRIX_COL_PINS {C4,C7,B7,B6,B5,B2,B1,B0,D6,D5,D4,D3,D2} +#define UNUSED_PINS + +#define ENCODERS_PAD_A { B3 } +#define ENCODERS_PAD_B { B4 } + +/* 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 + +/* Backlight configuration + */ + +#define QMK_ESC_OUTPUT C4 // usually COL +#define QMK_ESC_INPUT C6 // usually ROW +#define QMK_LED D1 + +#define LED_CAPS_LOCK_PIN D1 diff --git a/keyboards/evyd13/atom47/rev4/info.json b/keyboards/evyd13/atom47/rev4/info.json new file mode 100644 index 000000000..a04e4cc18 --- /dev/null +++ b/keyboards/evyd13/atom47/rev4/info.json @@ -0,0 +1,114 @@ +{ + "keyboard_name": "Atom47 rev4", + "url": "", + "maintainer": "evyd13", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_split_space": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + + {"x":0, "y":1, "w":1.25}, + {"x":1.25, "y":1}, + {"x":2.25, "y":1}, + {"x":3.25, "y":1}, + {"x":4.25, "y":1}, + {"x":5.25, "y":1}, + {"x":6.25, "y":1}, + {"x":7.25, "y":1}, + {"x":8.25, "y":1}, + {"x":9.25, "y":1}, + {"x":10.25, "y":1}, + {"x":11.25, "y":1, "w":1.75}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2, "w":1.25}, + {"x":12, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3, "w":1.75}, + {"x":6, "y":3, "w":2.75}, + {"x":8.75, "y":3}, + {"x":9.75, "y":3}, + {"x":10.75, "y":3}, + {"x":11.75, "y":3, "w":1.25} + ] + }, + "LAYOUT_full_space": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + + {"x":0, "y":1, "w":1.25}, + {"x":1.25, "y":1}, + {"x":2.25, "y":1}, + {"x":3.25, "y":1}, + {"x":4.25, "y":1}, + {"x":5.25, "y":1}, + {"x":6.25, "y":1}, + {"x":7.25, "y":1}, + {"x":8.25, "y":1}, + {"x":9.25, "y":1}, + {"x":10.25, "y":1}, + {"x":11.25, "y":1, "w":1.75}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2, "w":1.25}, + {"x":12, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3, "w":1.25}, + {"x":2.5, "y":3, "w":1.25}, + {"x":3.75, "y":3, "w":6.25}, + {"x":10, "y":3}, + {"x":11, "y":3}, + {"x":12, "y":3} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/evyd13/atom47/rev4/rev4.c b/keyboards/evyd13/atom47/rev4/rev4.c new file mode 100644 index 000000000..0ac2a41ac --- /dev/null +++ b/keyboards/evyd13/atom47/rev4/rev4.c @@ -0,0 +1,18 @@ +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "rev4.h" diff --git a/keyboards/evyd13/atom47/rev4/rev4.h b/keyboards/evyd13/atom47/rev4/rev4.h new file mode 100644 index 000000000..aa2e53ba2 --- /dev/null +++ b/keyboards/evyd13/atom47/rev4/rev4.h @@ -0,0 +1,51 @@ +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "quantum.h" + +// readability +#define XXX KC_NO + +#define LAYOUT_all LAYOUT_split_space + +#define LAYOUT_split_space( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k35, k37, k39, k3a, k3b, k3c \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, XXX, k1c}, \ + {k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c}, \ + {k30, k31, k32, k33, XXX, k35, XXX, k37, XXX, k39, k3a, k3b, k3c} \ +} + +#define LAYOUT_full_space( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k31, k32, k37, k39, k3a, k3b, k3c \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, XXX, k1c}, \ + {k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c}, \ + {k30, k31, k32, XXX, XXX, XXX, XXX, k37, XXX, k39, k3a, k3b, k3c} \ +} diff --git a/keyboards/evyd13/atom47/rev4/rules.mk b/keyboards/evyd13/atom47/rev4/rules.mk new file mode 100644 index 000000000..3bce3b43a --- /dev/null +++ b/keyboards/evyd13/atom47/rev4/rules.mk @@ -0,0 +1,7 @@ +# MCU name +MCU = atmega32u2 + +# Build Options +ENCODER_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/evyd13/atom47/rev5/config.h b/keyboards/evyd13/atom47/rev5/config.h new file mode 100644 index 000000000..f1f8eacfa --- /dev/null +++ b/keyboards/evyd13/atom47/rev5/config.h @@ -0,0 +1,164 @@ +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0x92EA +#define DEVICE_VER 0x0001 +#define MANUFACTURER Evyd13 +#define PRODUCT Atom47 rev5 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS {B1,B2,B3,D4} +#define MATRIX_COL_PINS {F0,F1,F4,F5,F6,F7,E6,D7,B4,B5,B6,C6,C7} +#define UNUSED_PINS {B0,B7,D2,D3,D5,D6} + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +//#define LED_NUM_LOCK_PIN B0 +//#define LED_CAPS_LOCK_PIN B1 +//#define LED_SCROLL_LOCK_PIN B2 +//#define LED_COMPOSE_PIN B3 +//#define LED_KANA_PIN B4 + +//#define BACKLIGHT_PIN B7 +//#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +//#define RGB_DI_PIN E2 +//#ifdef RGB_DI_PIN +//# define RGBLED_NUM 16 +//# define RGBLIGHT_HUE_STEP 8 +//# define RGBLIGHT_SAT_STEP 8 +//# define RGBLIGHT_VAL_STEP 8 +//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +//# define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +//# define RGBLIGHT_EFFECT_BREATHING +//# define RGBLIGHT_EFFECT_RAINBOW_MOOD +//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +//# define RGBLIGHT_EFFECT_CHRISTMAS +//# define RGBLIGHT_EFFECT_STATIC_GRADIENT +//# define RGBLIGHT_EFFECT_RGB_TEST +//# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +//#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is 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 + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 00 <-> GND +// 01 <-> SCL +// 10 <-> SDA +// 11 <-> VCC +// ADDR1 represents A1:A0 of the 7-bit address. +// ADDR2 represents A3:A2 of the 7-bit address. +// The result is: 0b101(ADDR2)(ADDR1) +#define DRIVER_ADDR_1 0b1010000 +#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 64 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL \ No newline at end of file diff --git a/keyboards/evyd13/atom47/rev5/info.json b/keyboards/evyd13/atom47/rev5/info.json new file mode 100644 index 000000000..f66c86e94 --- /dev/null +++ b/keyboards/evyd13/atom47/rev5/info.json @@ -0,0 +1,63 @@ +{ + "keyboard_name": "Atom47 rev5", + "url": "", + "maintainer": "evyd13", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_split_space": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4, "y":0}, + {"x":5, "y":0}, + {"x":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + + {"x":0, "y":1, "w":1.25}, + {"x":1.25, "y":1}, + {"x":2.25, "y":1}, + {"x":3.25, "y":1}, + {"x":4.25, "y":1}, + {"x":5.25, "y":1}, + {"x":6.25, "y":1}, + {"x":7.25, "y":1}, + {"x":8.25, "y":1}, + {"x":9.25, "y":1}, + {"x":10.25, "y":1}, + {"x":11.25, "y":1, "w":1.75}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2, "w":1.25}, + {"x":12, "y":2}, + + {"x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3, "w":1.75}, + {"x":6, "y":3, "w":2.75}, + {"x":8.75, "y":3}, + {"x":9.75, "y":3}, + {"x":10.75, "y":3}, + {"x":11.75, "y":3, "w":1.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/evyd13/atom47/rev5/rev5.c b/keyboards/evyd13/atom47/rev5/rev5.c new file mode 100644 index 000000000..ea0208706 --- /dev/null +++ b/keyboards/evyd13/atom47/rev5/rev5.c @@ -0,0 +1,153 @@ +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "rev5.h" + +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, B_1, C_1, A_1}, + {0, B_2, C_2, A_2}, + {0, B_3, C_3, A_3}, + {0, B_4, C_4, A_4}, + {0, B_5, C_5, A_5}, + {0, B_6, C_6, A_6}, + {0, B_7, C_7, A_7}, + {0, B_8, C_8, A_8}, + {0, B_9, C_9, A_9}, + {0, B_10, C_10, A_10}, + {0, B_11, C_11, A_11}, + {0, B_12, C_12, A_12}, + {0, B_13, C_13, A_13}, + + {0, E_1, F_1, D_1}, + {0, E_2, F_2, D_2}, + {0, E_3, F_3, D_3}, + {0, E_4, F_4, D_4}, + {0, E_5, F_5, D_5}, + {0, E_6, F_6, D_6}, + {0, E_7, F_7, D_7}, + {0, E_8, F_8, D_8}, + {0, E_9, F_9, D_9}, + {0, E_10, F_10, D_10}, + {0, E_11, F_11, D_11}, + {0, E_13, F_13, D_13}, + + {0, H_1, I_1, G_1}, + {0, H_2, I_2, G_2}, + {0, H_3, I_3, G_3}, + {0, H_4, I_4, G_4}, + {0, H_5, I_5, G_5}, + {0, H_6, I_6, G_6}, + {0, H_7, I_7, G_7}, + {0, H_8, I_8, G_8}, + {0, H_9, I_9, G_9}, + {0, H_10, I_10, G_10}, + {0, H_11, I_11, G_11}, + {0, H_12, I_12, G_12}, + {0, H_13, I_13, G_13}, + + {0, K_1, L_1, J_1}, + {0, K_2, L_2, J_2}, + {0, K_3, L_3, J_3}, + {0, K_4, L_4, J_4}, + {0, K_6, L_6, J_6}, + {0, K_8, L_8, J_8}, + {0, K_10, L_10, J_10}, + {0, K_11, L_11, J_11}, + {0, K_12, L_12, J_12}, + {0, K_13, L_13, J_13} +}; + +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }, + { 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, NO_LED, 24 }, + { 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 }, + { 38, 39, 40, 41, NO_LED, 42, NO_LED, 43, NO_LED, 44, 45, 46, 47 } +}, { + // LED Index to Physical Position + { 9, 8 }, + { 26, 8 }, + { 43, 8 }, + { 60, 8 }, + { 78, 8 }, + { 95, 8 }, + { 112, 8 }, + { 129, 8 }, + { 146, 8 }, + { 164, 8 }, + { 181, 8 }, + { 198, 8 }, + { 215, 8 }, + + { 11, 24 }, + { 30, 24 }, + { 47, 24 }, + { 64, 24 }, + { 82, 24 }, + { 99, 24 }, + { 116, 24 }, + { 134, 24 }, + { 151, 24 }, + { 168, 24 }, + { 185, 24 }, + { 209, 24 }, + + { 15, 40 }, + { 20, 22 }, + { 39, 40 }, + { 56, 40 }, + { 73, 40 }, + { 90, 40 }, + { 108, 40 }, + { 125, 40 }, + { 142, 40 }, + { 159, 40 }, + { 177, 40 }, + { 196, 40 }, + { 215, 40 }, + + { 11, 56 }, + { 30, 56 }, + { 47, 56 }, + { 64, 56 }, + { 88, 56 }, + { 127, 56 }, + { 159, 56 }, + { 177, 56 }, + { 194, 56 }, + { 213, 56 }, +}, { + // LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 +} }; + +void rgb_matrix_indicators_kb(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(26, 255, 255, 255); + } else { + rgb_matrix_set_color(26, 0, 0, 0); + } +} diff --git a/keyboards/evyd13/atom47/rev5/rev5.h b/keyboards/evyd13/atom47/rev5/rev5.h new file mode 100644 index 000000000..874dc285a --- /dev/null +++ b/keyboards/evyd13/atom47/rev5/rev5.h @@ -0,0 +1,38 @@ +/* +Copyright 2021 Evelien Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "quantum.h" + +// readability +#define XXX KC_NO + +#define LAYOUT_all LAYOUT_split_space + +#define LAYOUT_split_space( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k35, k37, k39, k3a, k3b, k3c \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, XXX, k1c}, \ + {k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c}, \ + {k30, k31, k32, k33, XXX, k35, XXX, k37, XXX, k39, k3a, k3b, k3c} \ +} diff --git a/keyboards/evyd13/atom47/rev5/rules.mk b/keyboards/evyd13/atom47/rev5/rules.mk new file mode 100644 index 000000000..3f2f8d3dd --- /dev/null +++ b/keyboards/evyd13/atom47/rev5/rules.mk @@ -0,0 +1,2 @@ +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = IS31FL3733 diff --git a/keyboards/evyd13/atom47/rules.mk b/keyboards/evyd13/atom47/rules.mk index 72c0b219b..f86d6f607 100644 --- a/keyboards/evyd13/atom47/rules.mk +++ b/keyboards/evyd13/atom47/rules.mk @@ -2,27 +2,23 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = qmk-dfu # Build Options -# comment out to disable the options. +# change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +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 -DEFAULT_FOLDER = evyd13/atom47/rev3 +DEFAULT_FOLDER = evyd13/atom47/rev4 diff --git a/keyboards/evyd13/eon40/config.h b/keyboards/evyd13/eon40/config.h index 625576c74..eb65f6bcf 100644 --- a/keyboards/evyd13/eon40/config.h +++ b/keyboards/evyd13/eon40/config.h @@ -194,26 +194,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/evyd13/eon40/rules.mk b/keyboards/evyd13/eon40/rules.mk index 969a29683..16eebea6c 100644 --- a/keyboards/evyd13/eon40/rules.mk +++ b/keyboards/evyd13/eon40/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/evyd13/eon65/config.h b/keyboards/evyd13/eon65/config.h index ffcde47f6..eb6273e46 100644 --- a/keyboards/evyd13/eon65/config.h +++ b/keyboards/evyd13/eon65/config.h @@ -191,26 +191,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/evyd13/eon65/rules.mk b/keyboards/evyd13/eon65/rules.mk index 9c35f1e1a..ba02b99d8 100644 --- a/keyboards/evyd13/eon65/rules.mk +++ b/keyboards/evyd13/eon65/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/evyd13/eon75/config.h b/keyboards/evyd13/eon75/config.h index d7d84de2a..d72e3f2b2 100644 --- a/keyboards/evyd13/eon75/config.h +++ b/keyboards/evyd13/eon75/config.h @@ -196,26 +196,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/evyd13/eon75/rules.mk b/keyboards/evyd13/eon75/rules.mk index b78fcc9f5..035a67207 100644 --- a/keyboards/evyd13/eon75/rules.mk +++ b/keyboards/evyd13/eon75/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/evyd13/eon87/config.h b/keyboards/evyd13/eon87/config.h index dcbac216c..c09a1365e 100644 --- a/keyboards/evyd13/eon87/config.h +++ b/keyboards/evyd13/eon87/config.h @@ -191,26 +191,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/evyd13/eon87/rules.mk b/keyboards/evyd13/eon87/rules.mk index 101ebacc8..be9aff456 100644 --- a/keyboards/evyd13/eon87/rules.mk +++ b/keyboards/evyd13/eon87/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/evyd13/eon95/config.h b/keyboards/evyd13/eon95/config.h index 2d9ede3ee..bcb2b9c5e 100644 --- a/keyboards/evyd13/eon95/config.h +++ b/keyboards/evyd13/eon95/config.h @@ -196,26 +196,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/evyd13/eon95/rules.mk b/keyboards/evyd13/eon95/rules.mk index b78fcc9f5..035a67207 100644 --- a/keyboards/evyd13/eon95/rules.mk +++ b/keyboards/evyd13/eon95/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/evyd13/gh80_1800/rules.mk b/keyboards/evyd13/gh80_1800/rules.mk index eaca84433..b458f4ce0 100644 --- a/keyboards/evyd13/gh80_1800/rules.mk +++ b/keyboards/evyd13/gh80_1800/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/evyd13/gh80_3700/gh80_3700.c b/keyboards/evyd13/gh80_3700/gh80_3700.c index f607a440e..40093f102 100644 --- a/keyboards/evyd13/gh80_3700/gh80_3700.c +++ b/keyboards/evyd13/gh80_3700/gh80_3700.c @@ -15,14 +15,6 @@ */ #include "gh80_3700.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - matrix_init_user(); - led_init_ports(); -} - void led_init_ports(void) { setPinOutput(E6); setPinOutput(B1); diff --git a/keyboards/evyd13/gh80_3700/rules.mk b/keyboards/evyd13/gh80_3700/rules.mk index 01ea4754f..f5d5f984e 100644 --- a/keyboards/evyd13/gh80_3700/rules.mk +++ b/keyboards/evyd13/gh80_3700/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/minitomic/config.h b/keyboards/evyd13/minitomic/config.h index f26b4d1d9..140862544 100644 --- a/keyboards/evyd13/minitomic/config.h +++ b/keyboards/evyd13/minitomic/config.h @@ -194,26 +194,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/evyd13/minitomic/rules.mk b/keyboards/evyd13/minitomic/rules.mk index ace928971..772a65f92 100644 --- a/keyboards/evyd13/minitomic/rules.mk +++ b/keyboards/evyd13/minitomic/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/evyd13/mx5160/config.h b/keyboards/evyd13/mx5160/config.h index c65f81b87..13abd3668 100644 --- a/keyboards/evyd13/mx5160/config.h +++ b/keyboards/evyd13/mx5160/config.h @@ -200,26 +200,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/evyd13/mx5160/rules.mk b/keyboards/evyd13/mx5160/rules.mk index 4945986f5..b29be96e0 100644 --- a/keyboards/evyd13/mx5160/rules.mk +++ b/keyboards/evyd13/mx5160/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/evyd13/nt660/config.h b/keyboards/evyd13/nt660/config.h index 863884714..f43e6443d 100644 --- a/keyboards/evyd13/nt660/config.h +++ b/keyboards/evyd13/nt660/config.h @@ -197,26 +197,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/evyd13/nt660/rules.mk b/keyboards/evyd13/nt660/rules.mk index fb5654dea..e6cab965f 100644 --- a/keyboards/evyd13/nt660/rules.mk +++ b/keyboards/evyd13/nt660/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/evyd13/nt750/rules.mk b/keyboards/evyd13/nt750/rules.mk index e981c14b0..8a840a58c 100644 --- a/keyboards/evyd13/nt750/rules.mk +++ b/keyboards/evyd13/nt750/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/nt980/rules.mk b/keyboards/evyd13/nt980/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/evyd13/nt980/rules.mk +++ b/keyboards/evyd13/nt980/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/omrontkl/config.h b/keyboards/evyd13/omrontkl/config.h index 704ccd5d8..ce35f8e08 100644 --- a/keyboards/evyd13/omrontkl/config.h +++ b/keyboards/evyd13/omrontkl/config.h @@ -191,26 +191,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/evyd13/omrontkl/rules.mk b/keyboards/evyd13/omrontkl/rules.mk index 10033a9bf..9c46539f1 100644 --- a/keyboards/evyd13/omrontkl/rules.mk +++ b/keyboards/evyd13/omrontkl/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/evyd13/plain60/keymaps/kwerdenker/keymap.c b/keyboards/evyd13/plain60/keymaps/kwerdenker/keymap.c index 25370823d..2d736212f 100644 --- a/keyboards/evyd13/plain60/keymaps/kwerdenker/keymap.c +++ b/keyboards/evyd13/plain60/keymaps/kwerdenker/keymap.c @@ -36,9 +36,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DL] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, ______, KC_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, ______, \ - SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, \ - KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, MONKEY, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA, DE_PLUS, ______, \ + SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_ODIA,DE_ADIA, DE_HASH, KC_ENT, \ + KC_LSFT, DE_LABK, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, MONKEY, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , ______, KC_ALGR, TG(_LED), KC_RCTL ), [_FUN] = LAYOUT( diff --git a/keyboards/evyd13/plain60/keymaps/kwerdenker/rules.mk b/keyboards/evyd13/plain60/keymaps/kwerdenker/rules.mk index facc9dc7e..0b304aae3 100644 --- a/keyboards/evyd13/plain60/keymaps/kwerdenker/rules.mk +++ b/keyboards/evyd13/plain60/keymaps/kwerdenker/rules.mk @@ -16,7 +16,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) diff --git a/keyboards/evyd13/plain60/rules.mk b/keyboards/evyd13/plain60/rules.mk index 398b59227..8f9b59aad 100644 --- a/keyboards/evyd13/plain60/rules.mk +++ b/keyboards/evyd13/plain60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/evyd13/pockettype/config.h b/keyboards/evyd13/pockettype/config.h index daae3c173..681672c6a 100644 --- a/keyboards/evyd13/pockettype/config.h +++ b/keyboards/evyd13/pockettype/config.h @@ -191,26 +191,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/evyd13/pockettype/pockettype.c b/keyboards/evyd13/pockettype/pockettype.c index fe25a7048..06175edf5 100644 --- a/keyboards/evyd13/pockettype/pockettype.c +++ b/keyboards/evyd13/pockettype/pockettype.c @@ -15,12 +15,6 @@ */ #include "pockettype.h" -void matrix_init_kb(void) { - led_init_ports(); - - matrix_init_user(); -}; - void led_init_ports(void) { // * Enable LED anodes (Vbus pin is replaced by B0 on some boards) setPinOutput(B0); diff --git a/keyboards/evyd13/pockettype/rules.mk b/keyboards/evyd13/pockettype/rules.mk index 2b3dc6fc2..7ef38e5d5 100644 --- a/keyboards/evyd13/pockettype/rules.mk +++ b/keyboards/evyd13/pockettype/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/quackfire/rules.mk b/keyboards/evyd13/quackfire/rules.mk index f29136f74..b013ed876 100644 --- a/keyboards/evyd13/quackfire/rules.mk +++ b/keyboards/evyd13/quackfire/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/solheim68/rules.mk b/keyboards/evyd13/solheim68/rules.mk index a90eef1fc..23ba502fc 100644 --- a/keyboards/evyd13/solheim68/rules.mk +++ b/keyboards/evyd13/solheim68/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/ta65/rules.mk b/keyboards/evyd13/ta65/rules.mk index b45c0bc03..c55aec760 100644 --- a/keyboards/evyd13/ta65/rules.mk +++ b/keyboards/evyd13/ta65/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 ENCODER_ENABLE = yes diff --git a/keyboards/evyd13/wasdat/config.h b/keyboards/evyd13/wasdat/config.h index 75b75a0d2..83866890f 100644 --- a/keyboards/evyd13/wasdat/config.h +++ b/keyboards/evyd13/wasdat/config.h @@ -204,26 +204,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 5 diff --git a/keyboards/evyd13/wasdat/keymaps/konstantin/rules.mk b/keyboards/evyd13/wasdat/keymaps/konstantin/rules.mk index f70005d3f..2ae41e942 100644 --- a/keyboards/evyd13/wasdat/keymaps/konstantin/rules.mk +++ b/keyboards/evyd13/wasdat/keymaps/konstantin/rules.mk @@ -1,5 +1,5 @@ # Generic features -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/evyd13/wasdat/rules.mk b/keyboards/evyd13/wasdat/rules.mk index 0a9f00403..ab0acf29a 100644 --- a/keyboards/evyd13/wasdat/rules.mk +++ b/keyboards/evyd13/wasdat/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/evyd13/wasdat_code/config.h b/keyboards/evyd13/wasdat_code/config.h index 4ac77f217..07c18c3ba 100644 --- a/keyboards/evyd13/wasdat_code/config.h +++ b/keyboards/evyd13/wasdat_code/config.h @@ -204,26 +204,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 2 #define BOOTMAGIC_LITE_COLUMN 3 diff --git a/keyboards/evyd13/wasdat_code/rules.mk b/keyboards/evyd13/wasdat_code/rules.mk index 48430ee3c..4dec8aafe 100644 --- a/keyboards/evyd13/wasdat_code/rules.mk +++ b/keyboards/evyd13/wasdat_code/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/evyd13/wonderland/rules.mk b/keyboards/evyd13/wonderland/rules.mk index 1f671c37c..54aad9e68 100644 --- a/keyboards/evyd13/wonderland/rules.mk +++ b/keyboards/evyd13/wonderland/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/exclusive/e65/keymaps/masterzen/keymap.c b/keyboards/exclusive/e65/keymaps/masterzen/keymap.c index 32ed88d66..156832de4 100644 --- a/keyboards/exclusive/e65/keymaps/masterzen/keymap.c +++ b/keyboards/exclusive/e65/keymaps/masterzen/keymap.c @@ -94,7 +94,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { if (state == BASE && edit == true) { temp_config.hue = rgblight_get_hue(); temp_config.sat = rgblight_get_sat(); diff --git a/keyboards/exclusive/e65/rules.mk b/keyboards/exclusive/e65/rules.mk index 0f27d19ac..dd67320aa 100644 --- a/keyboards/exclusive/e65/rules.mk +++ b/keyboards/exclusive/e65/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.c b/keyboards/exclusive/e6_rgb/e6_rgb.c index 0e248a202..e0d313f83 100644 --- a/keyboards/exclusive/e6_rgb/e6_rgb.c +++ b/keyboards/exclusive/e6_rgb/e6_rgb.c @@ -11,7 +11,7 @@ void matrix_init_kb(void) { matrix_init_user(); } -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/exclusive/e6_rgb/rules.mk b/keyboards/exclusive/e6_rgb/rules.mk index 7fbd7e81f..6aecbc5ed 100644 --- a/keyboards/exclusive/e6_rgb/rules.mk +++ b/keyboards/exclusive/e6_rgb/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/exclusive/e6v2/le/rules.mk b/keyboards/exclusive/e6v2/le/rules.mk index 0b5585663..ee499b5aa 100644 --- a/keyboards/exclusive/e6v2/le/rules.mk +++ b/keyboards/exclusive/e6v2/le/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/exclusive/e6v2/le_bmc/rules.mk b/keyboards/exclusive/e6v2/le_bmc/rules.mk index f61cdd438..52242bd28 100644 --- a/keyboards/exclusive/e6v2/le_bmc/rules.mk +++ b/keyboards/exclusive/e6v2/le_bmc/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -26,7 +26,6 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default WS2812_DRIVER = i2c RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/exclusive/e6v2/oe/rules.mk b/keyboards/exclusive/e6v2/oe/rules.mk index 0b5585663..ee499b5aa 100644 --- a/keyboards/exclusive/e6v2/oe/rules.mk +++ b/keyboards/exclusive/e6v2/oe/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/exclusive/e6v2/oe_bmc/rules.mk b/keyboards/exclusive/e6v2/oe_bmc/rules.mk index f61cdd438..52242bd28 100644 --- a/keyboards/exclusive/e6v2/oe_bmc/rules.mk +++ b/keyboards/exclusive/e6v2/oe_bmc/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -26,7 +26,6 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default WS2812_DRIVER = i2c RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c b/keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c index 61a41f629..6987e8402 100644 --- a/keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c +++ b/keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c @@ -111,7 +111,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) return true; } -uint32_t layer_state_set_user(uint32_t state) +layer_state_t layer_state_set_user(layer_state_t state) { if (state == BASE && edit == true) { diff --git a/keyboards/exclusive/e7v1/rules.mk b/keyboards/exclusive/e7v1/rules.mk index 7bd87e2d6..7c32ee40e 100644 --- a/keyboards/exclusive/e7v1/rules.mk +++ b/keyboards/exclusive/e7v1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/exclusive/e7v1se/config.h b/keyboards/exclusive/e7v1se/config.h index 676a0ac8e..4d892946d 100644 --- a/keyboards/exclusive/e7v1se/config.h +++ b/keyboards/exclusive/e7v1se/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/exclusive/e7v1se/rules.mk b/keyboards/exclusive/e7v1se/rules.mk index 4e6cf8c85..522ace70a 100644 --- a/keyboards/exclusive/e7v1se/rules.mk +++ b/keyboards/exclusive/e7v1se/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/exclusive/e85/config.h b/keyboards/exclusive/e85/config.h index 1791351eb..dfe392d7b 100644 --- a/keyboards/exclusive/e85/config.h +++ b/keyboards/exclusive/e85/config.h @@ -178,26 +178,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/exclusive/e85/rules.mk b/keyboards/exclusive/e85/rules.mk index ebbb95723..71de03ca1 100644 --- a/keyboards/exclusive/e85/rules.mk +++ b/keyboards/exclusive/e85/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/exent/rules.mk b/keyboards/exent/rules.mk index 12aec0f59..bbf711ef6 100644 --- a/keyboards/exent/rules.mk +++ b/keyboards/exent/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/babyv/keymaps/melonbred/keymap.c b/keyboards/eyeohdesigns/babyv/keymaps/melonbred/keymap.c similarity index 100% rename from keyboards/babyv/keymaps/melonbred/keymap.c rename to keyboards/eyeohdesigns/babyv/keymaps/melonbred/keymap.c diff --git a/keyboards/eyeohdesigns/babyv/rules.mk b/keyboards/eyeohdesigns/babyv/rules.mk index b26342b20..b3d73f582 100644 --- a/keyboards/eyeohdesigns/babyv/rules.mk +++ b/keyboards/eyeohdesigns/babyv/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/eyeohdesigns/sprh/rules.mk b/keyboards/eyeohdesigns/sprh/rules.mk index d8a074dc7..5f32c2fd6 100644 --- a/keyboards/eyeohdesigns/sprh/rules.mk +++ b/keyboards/eyeohdesigns/sprh/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ez_maker/directpins/promicro/config.h b/keyboards/ez_maker/directpins/promicro/config.h new file mode 100644 index 000000000..436e169c1 --- /dev/null +++ b/keyboards/ez_maker/directpins/promicro/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2021 Zach White + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/ez_maker/directpins/promicro/info.json b/keyboards/ez_maker/directpins/promicro/info.json new file mode 100644 index 000000000..ad91afeb9 --- /dev/null +++ b/keyboards/ez_maker/directpins/promicro/info.json @@ -0,0 +1,49 @@ +{ + "manufacturer": "Zach White", + "keyboard_name": "DirectPins ProMicro", + "maintainer": "skullydazed", + "bootloader": "atmel-dfu", + "debounce": 5, + "diode_direction": "COL2ROW", + "features": { + "bootmagic_lite": true, + "extrakey": true, + "mousekey": true + }, + "matrix_pins": { + "direct": [ + ["D3", null], + ["D2", null], + ["D1", "F4"], + ["D0", "F5"], + ["D4", "F6"], + ["C6", "F7"], + ["D7", "B1"], + ["E6", "B3"], + ["B4", "B2"], + ["B5", "B6"] + ] + }, + "processor": "atmega32u4", + "usb": { + "device_ver": "0x0001", + "pid": "0x2320", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"D3", "matrix": [0, 0], "x":0, "y":0}, + {"label":"D2", "matrix": [1, 0], "x":0, "y":1}, + {"label":"D1", "matrix": [2, 0], "x":0, "y":4}, {"label":"F4", "matrix": [2, 1], "x":2, "y":4}, + {"label":"D0", "matrix": [3, 0], "x":0, "y":5}, {"label":"F5", "matrix": [3, 1], "x":2, "y":5}, + {"label":"D4", "matrix": [4, 0], "x":0, "y":6}, {"label":"F6", "matrix": [4, 1], "x":2, "y":6}, + {"label":"C6", "matrix": [5, 0], "x":0, "y":7}, {"label":"F7", "matrix": [5, 1], "x":2, "y":7}, + {"label":"D7", "matrix": [6, 0], "x":0, "y":8}, {"label":"B1", "matrix": [6, 1], "x":2, "y":8}, + {"label":"E6", "matrix": [7, 0], "x":0, "y":9}, {"label":"B3", "matrix": [7, 1], "x":2, "y":9}, + {"label":"B4", "matrix": [8, 0], "x":0, "y":10}, {"label":"B2", "matrix": [8, 1], "x":2, "y":10}, + {"label":"B5", "matrix": [9, 0], "x":0, "y":11}, {"label":"B6", "matrix": [9, 1], "x":2, "y":11} + ] + } + } +} diff --git a/keyboards/ez_maker/directpins/promicro/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/promicro/keymaps/default/keymap.json new file mode 100644 index 000000000..f39a5802b --- /dev/null +++ b/keyboards/ez_maker/directpins/promicro/keymaps/default/keymap.json @@ -0,0 +1,19 @@ +{ + "keyboard": "ez_maker/directpins/promicro", + "keymap": "default", + "layout": "LAYOUT_all", + "layers": [ + [ + "KC_0", + "KC_1", + "KC_2", "KC_3", + "KC_4", "KC_5", + "KC_6", "KC_7", + "KC_8", "KC_9", + "KC_A", "KC_B", + "KC_C", "KC_D", + "KC_E", "KC_F", + "KC_G", "KC_H" + ] + ] +} diff --git a/keyboards/ez_maker/directpins/promicro/promicro.c b/keyboards/ez_maker/directpins/promicro/promicro.c new file mode 100644 index 000000000..1f89eb39e --- /dev/null +++ b/keyboards/ez_maker/directpins/promicro/promicro.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "promicro.h" diff --git a/keyboards/ez_maker/directpins/promicro/promicro.h b/keyboards/ez_maker/directpins/promicro/promicro.h new file mode 100644 index 000000000..386e50fb5 --- /dev/null +++ b/keyboards/ez_maker/directpins/promicro/promicro.h @@ -0,0 +1,19 @@ +/* Copyright 2021 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" diff --git a/keyboards/ez_maker/directpins/promicro/readme.md b/keyboards/ez_maker/directpins/promicro/readme.md new file mode 100644 index 000000000..b987ce0aa --- /dev/null +++ b/keyboards/ez_maker/directpins/promicro/readme.md @@ -0,0 +1,19 @@ +# DirectPins + +![Promicro Pinout Guide](https://i.imgur.com/LZ194Hf.jpg) + +Easily assign keys to pins for your custom project using QMK Configurator. + +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Promicro +* Hardware Availability: Sparkfun, chinese clones + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb ez_maker/directpins/promicro -km default + +Flashing example for this keyboard: + + qmk flash -kb ez_maker/directpins/promicro -km default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/hannah65/mechlovin9/rules.mk b/keyboards/ez_maker/directpins/promicro/rules.mk similarity index 100% rename from keyboards/mechlovin/hannah65/mechlovin9/rules.mk rename to keyboards/ez_maker/directpins/promicro/rules.mk diff --git a/keyboards/ez_maker/directpins/proton_c/info.json b/keyboards/ez_maker/directpins/proton_c/info.json new file mode 100644 index 000000000..4b72f4610 --- /dev/null +++ b/keyboards/ez_maker/directpins/proton_c/info.json @@ -0,0 +1,60 @@ +{ + "manufacturer": "Zach White", + "keyboard_name": "DirectPins Proton C", + "maintainer": "skullydazed", + "debounce": 5, + "processor": "STM32F303", + "board": "QMK_PROTON_C", + "features": { + "bootmagic_lite": true, + "extrakey": true, + "mousekey": true + }, + "matrix_pins": { + "direct": [ + ["A9", null], + ["A10", null], + ["B7", "A2"], + ["B6", "A1"], + ["B5", "A0"], + ["B4", "B8"], + ["B3", "B13"], + ["B2", "B14"], + ["B1", "B15"], + ["B0", "B9"], + ["A4", "B10"], + ["A5", "B11"], + ["A6", "B12"], + ["A7", "A14"], + ["A8", "A13"], + ["A15", null] + ] + }, + "usb": { + "device_ver": "0x0001", + "pid": "0x2321", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "A9", "matrix": [0, 0], "x": 0, "y": 0 }, + { "label": "A10", "matrix": [1, 0], "x": 0, "y": 1 }, + { "label": "B7", "matrix": [2, 0], "x": 0, "y": 4 }, { "label": "A2", "matrix": [2, 1], "x": 2, "y": 4 }, + { "label": "B6", "matrix": [3, 0], "x": 0, "y": 5 }, { "label": "A1", "matrix": [3, 1], "x": 2, "y": 5 }, + { "label": "B5", "matrix": [4, 0], "x": 0, "y": 6 }, { "label": "A0", "matrix": [4, 1], "x": 2, "y": 6 }, + { "label": "B4", "matrix": [5, 0], "x": 0, "y": 7 }, { "label": "B8", "matrix": [5, 1], "x": 2, "y": 7 }, + { "label": "B3", "matrix": [6, 0], "x": 0, "y": 8 }, { "label": "B13", "matrix": [6, 1], "x": 2, "y": 8 }, + { "label": "B2", "matrix": [7, 0], "x": 0, "y": 9 }, { "label": "B14", "matrix": [7, 1], "x": 2, "y": 9 }, + { "label": "B1", "matrix": [8, 0], "x": 0, "y": 10 }, { "label": "B15", "matrix": [8, 1], "x": 2, "y": 10 }, + { "label": "B0", "matrix": [9, 0], "x": 0, "y": 11 }, { "label": "B9", "matrix": [9, 1], "x": 2, "y": 11 }, + { "label": "A4", "matrix": [10, 0], "x": 0, "y": 13 }, { "label": "B10", "matrix": [10, 1], "x": 2, "y": 13 }, + { "label": "A5", "matrix": [11, 0], "x": 0, "y": 14 }, { "label": "B11", "matrix": [11, 1], "x": 2, "y": 14 }, + { "label": "A6", "matrix": [12, 0], "x": 0, "y": 15 }, { "label": "B12", "matrix": [12, 1], "x": 2, "y": 15 }, + { "label": "A7", "matrix": [13, 0], "x": 0, "y": 16 }, { "label": "A14", "matrix": [13, 1], "x": 2, "y": 16 }, + { "label": "A8", "matrix": [14, 0], "x": 0, "y": 17 }, { "label": "A13", "matrix": [14, 1], "x": 2, "y": 17 }, + { "label": "A15", "matrix": [15, 0], "x": 0, "y": 18 } + ] + } + } +} diff --git a/keyboards/ez_maker/directpins/proton_c/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/proton_c/keymaps/default/keymap.json new file mode 100644 index 000000000..7af6d4476 --- /dev/null +++ b/keyboards/ez_maker/directpins/proton_c/keymaps/default/keymap.json @@ -0,0 +1,25 @@ +{ + "keyboard": "ez_maker/directpins/proton_c", + "keymap": "default", + "layout": "LAYOUT_all", + "layers": [ + [ + "KC_0", + "KC_1", + "KC_2", "KC_3", + "KC_4", "KC_5", + "KC_6", "KC_7", + "KC_8", "KC_9", + "KC_A", "KC_B", + "KC_C", "KC_D", + "KC_E", "KC_F", + "KC_G", "KC_H", + "KC_I", "KC_J", + "KC_K", "KC_L", + "KC_M", "KC_N", + "KC_O", "KC_P", + "KC_Q", "KC_R", + "KC_S" + ] + ] +} diff --git a/keyboards/ez_maker/directpins/proton_c/keymaps/default/readme.md b/keyboards/ez_maker/directpins/proton_c/keymaps/default/readme.md new file mode 100644 index 000000000..69c6d2663 --- /dev/null +++ b/keyboards/ez_maker/directpins/proton_c/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for directpins diff --git a/keyboards/ez_maker/directpins/proton_c/proton_c.c b/keyboards/ez_maker/directpins/proton_c/proton_c.c new file mode 100644 index 000000000..75534b609 --- /dev/null +++ b/keyboards/ez_maker/directpins/proton_c/proton_c.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "proton_c.h" diff --git a/keyboards/ez_maker/directpins/proton_c/proton_c.h b/keyboards/ez_maker/directpins/proton_c/proton_c.h new file mode 100644 index 000000000..386e50fb5 --- /dev/null +++ b/keyboards/ez_maker/directpins/proton_c/proton_c.h @@ -0,0 +1,19 @@ +/* Copyright 2021 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" diff --git a/keyboards/ez_maker/directpins/proton_c/readme.md b/keyboards/ez_maker/directpins/proton_c/readme.md new file mode 100644 index 000000000..caf6c7c99 --- /dev/null +++ b/keyboards/ez_maker/directpins/proton_c/readme.md @@ -0,0 +1,19 @@ +# DirectPins + +![Proton-C Pinout Guide](https://i.imgur.com/NqsqmdF.png) + +Easily assign keys to pins for your custom project using QMK Configurator. + +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Proton C +* Hardware Availability: https://qmk.fm/proton-c + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb ez_maker/directpins/proton_c -km default + +Flashing example for this keyboard: + + qmk flash -kb ez_maker/directpins/proton_c -km default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xd75/keymaps/boy_314/rules.mk b/keyboards/ez_maker/directpins/proton_c/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/boy_314/rules.mk rename to keyboards/ez_maker/directpins/proton_c/rules.mk diff --git a/keyboards/ez_maker/directpins/readme.md b/keyboards/ez_maker/directpins/readme.md new file mode 100644 index 000000000..bd415f78a --- /dev/null +++ b/keyboards/ez_maker/directpins/readme.md @@ -0,0 +1,5 @@ +# DirectPins + +Easily assign keys to pins for your custom project using QMK Configurator. + +This directory exists so that people creating one-offs can easily hook up their pins to switches and flash QMK to it. diff --git a/keyboards/ez_maker/directpins/teensy_2/config.h b/keyboards/ez_maker/directpins/teensy_2/config.h new file mode 100644 index 000000000..436e169c1 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_2/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2021 Zach White + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/ez_maker/directpins/teensy_2/info.json b/keyboards/ez_maker/directpins/teensy_2/info.json new file mode 100644 index 000000000..cc2e6feec --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_2/info.json @@ -0,0 +1,52 @@ +{ + "manufacturer": "Zach White", + "keyboard_name": "DirectPins Teensy 2.0", + "maintainer": "skullydazed", + "processor": "atmega32u4", + "bootloader": "halfkay", + "debounce": 5, + "diode_direction": "COL2ROW", + "features": { + "bootmagic_lite": true, + "extrakey": true, + "mousekey": true + }, + "matrix_pins": { + "direct": [ + ["B0", "F0"], + ["B1", "F1"], + ["B2", "F4"], + ["B3", "F5"], + ["B7", "F6"], + ["D0", "F7"], + ["D1", "B6"], + ["D2", "B5"], + ["D3", "B4"], + ["C6", "D7"], + ["C7", "D6"], + ["D5", "D4"] + ] + }, + "usb": { + "device_ver": "0x0001", + "pid": "0x2322", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"B0", "matrix": [0, 0], "x":0, "y":1}, {"label":"F0", "matrix": [0, 1], "x":4, "y":1}, + {"label":"B1", "matrix": [1, 0], "x":0, "y":2}, {"label":"F1", "matrix": [1, 1], "x":4, "y":2}, + {"label":"B2", "matrix": [2, 0], "x":0, "y":3}, {"label":"F4", "matrix": [2, 1], "x":4, "y":3}, + {"label":"B3", "matrix": [3, 0], "x":0, "y":4}, {"label":"F5", "matrix": [3, 1], "x":4, "y":4}, + {"label":"B7", "matrix": [4, 0], "x":0, "y":5}, {"label":"F6", "matrix": [4, 1], "x":4, "y":5}, + {"label":"D0", "matrix": [5, 0], "x":0, "y":6}, {"label":"F7", "matrix": [5, 1], "x":4, "y":6}, + {"label":"D1", "matrix": [6, 0], "x":0, "y":7}, {"label":"B6", "matrix": [6, 1], "x":4, "y":7}, + {"label":"D2", "matrix": [7, 0], "x":0, "y":8}, {"label":"B5", "matrix": [7, 1], "x":4, "y":8}, + {"label":"D3", "matrix": [8, 0], "x":0, "y":9}, {"label":"B4", "matrix": [8, 1], "x":4, "y":9}, + {"label":"C6", "matrix": [9, 0], "x":0, "y":10}, {"label":"D7", "matrix": [9, 1], "x":4, "y":10}, + {"label":"C7", "matrix": [10, 0], "x":0, "y":11}, {"label":"D5", "matrix": [11, 0], "x":1, "y":11}, {"label":"D4", "matrix": [11, 1], "x":3, "y":11}, {"label":"D6", "matrix": [10, 1], "x":4, "y":11} + ] + } + } +} diff --git a/keyboards/ez_maker/directpins/teensy_2/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/teensy_2/keymaps/default/keymap.json new file mode 100644 index 000000000..f52247ec2 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_2/keymaps/default/keymap.json @@ -0,0 +1,20 @@ +{ + "keyboard": "ez_maker/directpins/teensy2", + "keymap": "default", + "layout": "LAYOUT_all", + "layers": [ + [ + "KC_0", "KC_1", + "KC_2", "KC_3", + "KC_4", "KC_5", + "KC_6", "KC_7", + "KC_8", "KC_9", + "KC_A", "KC_B", + "KC_C", "KC_D", + "KC_E", "KC_F", + "KC_G", "KC_H", + "KC_I", "KC_J", + "KC_K", "KC_L", "KC_M", "KC_N" + ] + ] +} diff --git a/keyboards/ez_maker/directpins/teensy_2/readme.md b/keyboards/ez_maker/directpins/teensy_2/readme.md new file mode 100644 index 000000000..997680b59 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_2/readme.md @@ -0,0 +1,19 @@ +# DirectPins + +![Teensy 2.0 Pinout Guide](https://www.pjrc.com/teensy/pinout2a.png) + +Easily assign keys to pins for your custom project using QMK Configurator. + +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Teensy 2.0 +* Hardware Availability: https://www.pjrc.com/ + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb ez_maker/directpins/teensy2 -km default + +Flashing example for this keyboard: + + qmk flash -kb ez_maker/directpins/teensy2 -km default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/converter/ibm_5291/.noci b/keyboards/ez_maker/directpins/teensy_2/rules.mk similarity index 100% rename from keyboards/converter/ibm_5291/.noci rename to keyboards/ez_maker/directpins/teensy_2/rules.mk diff --git a/keyboards/ez_maker/directpins/teensy_2/teensy2.c b/keyboards/ez_maker/directpins/teensy_2/teensy2.c new file mode 100644 index 000000000..1ef3337a1 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_2/teensy2.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "teensy2.h" diff --git a/keyboards/ez_maker/directpins/teensy_2/teensy2.h b/keyboards/ez_maker/directpins/teensy_2/teensy2.h new file mode 100644 index 000000000..386e50fb5 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_2/teensy2.h @@ -0,0 +1,19 @@ +/* Copyright 2021 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" diff --git a/keyboards/ez_maker/directpins/teensy_2pp/config.h b/keyboards/ez_maker/directpins/teensy_2pp/config.h new file mode 100644 index 000000000..436e169c1 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_2pp/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2021 Zach White + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/ez_maker/directpins/teensy_2pp/info.json b/keyboards/ez_maker/directpins/teensy_2pp/info.json new file mode 100644 index 000000000..1e2e69d90 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_2pp/info.json @@ -0,0 +1,67 @@ +{ + "manufacturer": "Zach White", + "keyboard_name": "DirectPins Teensy 2.0++", + "maintainer": "skullydazed", + "processor": "at90usb1286", + "bootloader": "halfkay", + "debounce": 5, + "diode_direction": "COL2ROW", + "features": { + "bootmagic_lite": true, + "extrakey": true, + "mousekey": true + }, + "matrix_pins": { + "direct": [ + ["B7", null, null, "B6"], + ["D0", null, null, "B5"], + ["D1", null, null, "B4"], + ["D2", null, null, "B3"], + ["D3", null, null, "B2"], + ["D4", "E5", "E4", "B1"], + ["D5", null, null, "B0"], + ["D6", null, null, "E7"], + ["D7", null, null, "E6"], + ["E0", null, null, null], + ["E1", null, null, null], + ["C0", null, null, "F0"], + ["C1", "A4", "A0", "F1"], + ["C2", "A5", "A1", "F2"], + ["C3", "A6", "A2", "F3"], + ["C4", "A7", "A3", "F4"], + ["C5", null, null, "F5"], + ["C6", null, null, "F6"], + ["C7", null, null, "F7"], + ] + }, + "usb": { + "device_ver": "0x0001", + "pid": "0x2323", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"B7", "matrix": [0, 0], "x":0, "y":1}, {"label":"B6", "matrix": [0, 3], "x":5, "y":1}, + {"label":"D0", "matrix": [1, 0], "x":0, "y":2}, {"label":"B5", "matrix": [1, 3], "x":5, "y":2}, + {"label":"D1", "matrix": [2, 0], "x":0, "y":3}, {"label":"B4", "matrix": [2, 3], "x":5, "y":3}, + {"label":"D2", "matrix": [3, 0], "x":0, "y":4}, {"label":"B3", "matrix": [3, 3], "x":5, "y":4}, + {"label":"D3", "matrix": [4, 0], "x":0, "y":5}, {"label":"B2", "matrix": [4, 3], "x":5, "y":5}, + {"label":"D4", "matrix": [5, 0], "x":0, "y":6}, {"label":"E5", "matrix": [5, 1], "x":2, "y":6}, {"label":"E4", "matrix": [5, 2], "x":3, "y":6}, {"label":"B1", "matrix": [5, 3], "x":5, "y":6}, + {"label":"D5", "matrix": [6, 0], "x":0, "y":7}, {"label":"B0", "matrix": [6, 3], "x":5, "y":7}, + {"label":"D6", "matrix": [7, 0], "x":0, "y":8}, {"label":"E7", "matrix": [7, 3], "x":5, "y":8}, + {"label":"D7", "matrix": [8, 0], "x":0, "y":9}, {"label":"E6", "matrix": [8, 3], "x":5, "y":9}, + {"label":"E0", "matrix": [9, 0], "x":0, "y":10}, + {"label":"E1", "matrix": [10, 0], "x":0, "y":11}, + {"label":"C0", "matrix": [11, 0], "x":0, "y":12}, {"label":"F0", "matrix": [11, 3], "x":5, "y":12}, + {"label":"C1", "matrix": [12, 0], "x":0, "y":13}, {"label":"A4", "matrix": [12, 1], "x":2, "y":13}, {"label":"A0", "matrix": [12, 2], "x":3, "y":13}, {"label":"F1", "matrix": [12, 3], "x":5, "y":13}, + {"label":"C2", "matrix": [13, 0], "x":0, "y":14}, {"label":"A5", "matrix": [13, 1], "x":2, "y":14}, {"label":"A1", "matrix": [13, 2], "x":3, "y":14}, {"label":"F2", "matrix": [13, 3], "x":5, "y":14}, + {"label":"C3", "matrix": [14, 0], "x":0, "y":15}, {"label":"A6", "matrix": [14, 1], "x":2, "y":15}, {"label":"A2", "matrix": [14, 2], "x":3, "y":15}, {"label":"F3", "matrix": [14, 3], "x":5, "y":15}, + {"label":"C4", "matrix": [15, 0], "x":0, "y":16}, {"label":"A7", "matrix": [15, 1], "x":2, "y":16}, {"label":"A3", "matrix": [15, 2], "x":3, "y":16}, {"label":"F4", "matrix": [15, 3], "x":5, "y":16}, + {"label":"C5", "matrix": [16, 0], "x":0, "y":17}, {"label":"F5", "matrix": [16, 3], "x":5, "y":17}, + {"label":"C6", "matrix": [17, 0], "x":0, "y":18}, {"label":"F6", "matrix": [17, 3], "x":5, "y":18}, + {"label":"C7", "matrix": [18, 0], "x":0, "y":19}, {"label":"F7", "matrix": [18, 3], "x":5, "y":19} + ] + } + } +} diff --git a/keyboards/ez_maker/directpins/teensy_2pp/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/teensy_2pp/keymaps/default/keymap.json new file mode 100644 index 000000000..444f8cacb --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_2pp/keymaps/default/keymap.json @@ -0,0 +1,28 @@ +{ + "keyboard": "ez_maker/directpins/promicro", + "keymap": "default", + "layout": "LAYOUT_all", + "layers": [ + [ + "KC_0", "KC_1", + "KC_2", "KC_3", + "KC_4", "KC_5", + "KC_6", "KC_7", + "KC_8", "KC_9", + "KC_A", "KC_B", "KC_C", "KC_D", + "KC_E", "KC_F", + "KC_G", "KC_H", + "KC_I", "KC_J", + "KC_J", + "KC_L", + "KC_M", "KC_N", + "KC_O", "KC_P", "KC_Q", "KC_R", + "KC_S", "KC_T", "KC_U", "KC_V", + "KC_W", "KC_X", "KC_Y", "KC_Z", + "KC_P1", "KC_P2", "KC_P3", "KC_P4", + "KC_P5", "KC_P6", + "KC_P7", "KC_P8", + "KC_P9", "KC_P0" + ] + ] +} diff --git a/keyboards/ez_maker/directpins/teensy_2pp/readme.md b/keyboards/ez_maker/directpins/teensy_2pp/readme.md new file mode 100644 index 000000000..6b64dc8ac --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_2pp/readme.md @@ -0,0 +1,19 @@ +# DirectPins + +![Teensy 2.0++ Pinout Guide](https://www.pjrc.com/teensy/pinout4a.png) + +Easily assign keys to pins for your custom project using QMK Configurator. + +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Teensy 2.0++ +* Hardware Availability: https://www.pjrc.com/ + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb ez_maker/directpins/teensy2pp -km default + +Flashing example for this keyboard: + + qmk flash -kb ez_maker/directpins/teensy2pp -km default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kyria/.noci b/keyboards/ez_maker/directpins/teensy_2pp/rules.mk similarity index 100% rename from keyboards/kyria/.noci rename to keyboards/ez_maker/directpins/teensy_2pp/rules.mk diff --git a/keyboards/ez_maker/directpins/teensy_2pp/teensy2.c b/keyboards/ez_maker/directpins/teensy_2pp/teensy2.c new file mode 100644 index 000000000..1ef3337a1 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_2pp/teensy2.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "teensy2.h" diff --git a/keyboards/ez_maker/directpins/teensy_2pp/teensy2.h b/keyboards/ez_maker/directpins/teensy_2pp/teensy2.h new file mode 100644 index 000000000..386e50fb5 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_2pp/teensy2.h @@ -0,0 +1,19 @@ +/* Copyright 2021 Zach White + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" diff --git a/keyboards/ez_maker/directpins/teensy_32/chconf.h b/keyboards/ez_maker/directpins/teensy_32/chconf.h new file mode 100644 index 000000000..04c223e72 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_32/chconf.h @@ -0,0 +1,53 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/ez_maker/onekey/teensy_32/chconf.h -r platforms/chibios/common/configs/chconf.h` + */ + +#pragma once + +#define CH_CFG_ST_FREQUENCY 1000 + +#define CH_CFG_ST_TIMEDELTA 0 + +#define CH_CFG_TIME_QUANTUM 20 + +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE + +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE + +#define CH_CFG_FACTORY_SEMAPHORES TRUE + +#define CH_CFG_FACTORY_MAILBOXES TRUE + +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE + +#define CH_CFG_FACTORY_PIPES TRUE + +#define CH_DBG_SYSTEM_STATE_CHECK TRUE + +#define CH_DBG_ENABLE_CHECKS TRUE + +#define CH_DBG_ENABLE_ASSERTS TRUE + +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +#define CH_DBG_FILL_THREADS TRUE + +#include_next + diff --git a/keyboards/ez_maker/directpins/teensy_32/config.h b/keyboards/ez_maker/directpins/teensy_32/config.h new file mode 100644 index 000000000..861ae70e4 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_32/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// i2c_master defines +#define I2C1_SCL 0 // A2 on pinout = B0 +#define I2C1_SDA 1 // A3 on pinout = B1 +#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/ez_maker/directpins/teensy_32/halconf.h b/keyboards/ez_maker/directpins/teensy_32/halconf.h new file mode 100644 index 000000000..9ba6e8fc3 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_32/halconf.h @@ -0,0 +1,27 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/ez_maker/onekey/teensy_32/halconf.h -r platforms/chibios/common/configs/halconf.h` + */ + +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next + diff --git a/keyboards/ez_maker/directpins/teensy_32/info.json b/keyboards/ez_maker/directpins/teensy_32/info.json new file mode 100644 index 000000000..5de8d90a5 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_32/info.json @@ -0,0 +1,53 @@ +{ + "manufacturer": "QMK", + "keyboard_name": "DirectPins Teensy 3.2", + "maintainer": "skullydazed", + "debounce": 5, + "processor": "MK20DX256", + "features": { + "bootmagic_lite": true, + "extrakey": true, + "mousekey": true + }, + "matrix_pins": { + "direct": [ + ["LINE_PIN0", null, null], + ["LINE_PIN1", null, null], + ["LINE_PIN2", null, "LINE_PIN23"], + ["LINE_PIN3", "LINE_PIN24", "LINE_PIN22"], + ["LINE_PIN4", "LINE_PIN25", "LINE_PIN21"], + ["LINE_PIN5", null, "LINE_PIN20"], + ["LINE_PIN6", null, "LINE_PIN19"], + ["LINE_PIN7", null, "LINE_PIN18"], + ["LINE_PIN8", null, "LINE_PIN17"], + ["LINE_PIN9", null, "LINE_PIN16"], + ["LINE_PIN10", null, "LINE_PIN15"], + ["LINE_PIN11", null, "LINE_PIN14"], + ["LINE_PIN12", "E30", "LINE_PIN13"], + ] + }, + "usb": { + "device_ver": "0x0001", + "pid": "0x2324", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "0", "matrix": [0, 0], "x": 0, "y": 1 }, + { "label": "1", "matrix": [1, 0], "x": 0, "y": 2 }, + { "label": "2", "matrix": [2, 0], "x": 0, "y": 3 }, { "label": "23", "matrix": [2, 2], "x": 3, "y": 3 }, + { "label": "3", "matrix": [3, 0], "x": 0, "y": 4 }, { "label": "24", "matrix": [3, 1], "x": 2, "y": 4 }, { "label": "22", "matrix": [3, 2], "x": 3, "y": 4 }, + { "label": "4", "matrix": [4, 0], "x": 0, "y": 5 }, { "label": "25", "matrix": [4, 1], "x": 2, "y": 5 }, { "label": "21", "matrix": [4, 2], "x": 3, "y": 5 }, + { "label": "5", "matrix": [5, 0], "x": 0, "y": 6 }, { "label": "20", "matrix": [5, 2], "x": 3, "y": 6 }, + { "label": "6", "matrix": [6, 0], "x": 0, "y": 7 }, { "label": "19", "matrix": [6, 2], "x": 3, "y": 7 }, + { "label": "7", "matrix": [7, 0], "x": 0, "y": 8 }, { "label": "18", "matrix": [7, 2], "x": 3, "y": 8 }, + { "label": "8", "matrix": [8, 0], "x": 0, "y": 9 }, { "label": "17", "matrix": [8, 2], "x": 3, "y": 9 }, + { "label": "9", "matrix": [9, 0], "x": 0, "y": 10 }, { "label": "16", "matrix": [9, 2], "x": 3, "y": 10 }, + { "label": "10", "matrix": [10, 0], "x": 0, "y": 11 }, { "label": "15", "matrix": [10, 2], "x": 3, "y": 11 }, + { "label": "11", "matrix": [11, 0], "x": 0, "y": 12 }, { "label": "14", "matrix": [11, 2], "x": 3, "y": 12 }, + { "label": "12", "matrix": [12, 0], "x": 0, "y": 13 }, { "label": "26", "matrix": [12, 1], "x": 2, "y": 13 }, { "label": "13", "matrix": [12, 2], "x": 3, "y": 13 } + ] + } + } +} diff --git a/keyboards/ez_maker/directpins/teensy_32/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/teensy_32/keymaps/default/keymap.json new file mode 100644 index 000000000..4b289997c --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_32/keymaps/default/keymap.json @@ -0,0 +1,22 @@ +{ + "keyboard": "ez_maker/directpins/teensy_32", + "keymap": "default", + "layout": "LAYOUT_all", + "layers": [ + [ + "KC_0", + "KC_1", + "KC_2", "KC_3", + "KC_4", "KC_5", "KC_6", + "KC_7", "KC_8", "KC_9", + "KC_A", "KC_B", + "KC_C", "KC_D", + "KC_E", "KC_F", + "KC_G", "KC_H", + "KC_I", "KC_J", + "KC_K", "KC_L", + "KC_M", "KC_N", + "KC_O", "KC_P", "KC_Q" + ] + ] +} diff --git a/keyboards/ez_maker/directpins/teensy_32/mcuconf.h b/keyboards/ez_maker/directpins/teensy_32/mcuconf.h new file mode 100644 index 000000000..327f5c9aa --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_32/mcuconf.h @@ -0,0 +1,51 @@ +/* + 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 K20x_MCUCONF + +/* + * HAL driver system settings. + */ +/* PEE mode - 48MHz system clock driven by (16 MHz) external crystal. */ +#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE +#define KINETIS_PLLCLK_FREQUENCY 96000000UL +#define KINETIS_SYSCLK_FREQUENCY 48000000UL + +/* + * SERIAL driver system settings. + */ +#define KINETIS_SERIAL_USE_UART0 TRUE + +/* + * USB driver settings + */ +#define KINETIS_USB_USE_USB0 TRUE + +/* Need to redefine this, since the default (configured for K20x) might not apply + * 2 for Teensy LC + * 5 for Teensy 3.x */ +#define KINETIS_USB_USB0_IRQ_PRIORITY 5 + +/* + * I2C driver settings + */ +#define KINETIS_I2C_USE_I2C0 TRUE +#define KINETIS_I2C_I2C0_PRIORITY 4 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/ez_maker/directpins/teensy_32/readme.md b/keyboards/ez_maker/directpins/teensy_32/readme.md new file mode 100644 index 000000000..76b457319 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_32/readme.md @@ -0,0 +1,19 @@ +# DirectPins + +![Teensy 3.2 Pinout Guide](https://www.pjrc.com/teensy/card7a_rev1.png) + +Easily assign keys to pins for your custom project using QMK Configurator. + +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Teensy 3.2 +* Hardware Availability: https://pjrc.com/ + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb ez_maker/directpins/teensy_32 -km default + +Flashing example for this keyboard: + + qmk flash -kb ez_maker/directpins/teensy_32 -km default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ez_maker/directpins/teensy_32/rules.mk b/keyboards/ez_maker/directpins/teensy_32/rules.mk new file mode 100644 index 000000000..a92b09932 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_32/rules.mk @@ -0,0 +1,2 @@ +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/ez_maker/directpins/teensy_lc/chconf.h b/keyboards/ez_maker/directpins/teensy_lc/chconf.h new file mode 100644 index 000000000..659dca63a --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_lc/chconf.h @@ -0,0 +1,53 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/ez_maker/onekey/teensy_lc/chconf.h -r platforms/chibios/common/configs/chconf.h` + */ + +#pragma once + +#define CH_CFG_ST_FREQUENCY 1000 + +#define CH_CFG_ST_TIMEDELTA 0 + +#define CH_CFG_TIME_QUANTUM 20 + +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE + +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE + +#define CH_CFG_FACTORY_SEMAPHORES TRUE + +#define CH_CFG_FACTORY_MAILBOXES TRUE + +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE + +#define CH_CFG_FACTORY_PIPES TRUE + +#define CH_DBG_SYSTEM_STATE_CHECK TRUE + +#define CH_DBG_ENABLE_CHECKS TRUE + +#define CH_DBG_ENABLE_ASSERTS TRUE + +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +#define CH_DBG_FILL_THREADS TRUE + +#include_next + diff --git a/keyboards/ez_maker/directpins/teensy_lc/config.h b/keyboards/ez_maker/directpins/teensy_lc/config.h new file mode 100644 index 000000000..861ae70e4 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_lc/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// i2c_master defines +#define I2C1_SCL 0 // A2 on pinout = B0 +#define I2C1_SDA 1 // A3 on pinout = B1 +#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/ez_maker/directpins/teensy_lc/halconf.h b/keyboards/ez_maker/directpins/teensy_lc/halconf.h new file mode 100644 index 000000000..bd9fe497f --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_lc/halconf.h @@ -0,0 +1,27 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/ez_maker/onekey/teensy_lc/halconf.h -r platforms/chibios/common/configs/halconf.h` + */ + +#pragma once + +#define HAL_USE_I2C TRUE + +#include_next + diff --git a/keyboards/ez_maker/directpins/teensy_lc/info.json b/keyboards/ez_maker/directpins/teensy_lc/info.json new file mode 100644 index 000000000..882fa9ad9 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_lc/info.json @@ -0,0 +1,53 @@ +{ + "manufacturer": "Zach White", + "keyboard_name": "DirectPins Teensy LC", + "maintainer": "skullydazed", + "debounce": 5, + "processor": "MKL26Z64", + "features": { + "bootmagic_lite": true, + "extrakey": true, + "mousekey": true + }, + "matrix_pins": { + "direct": [ + ["LINE_PIN0", null, null], + ["LINE_PIN1", null, null], + ["LINE_PIN2", null, "LINE_PIN23"], + ["LINE_PIN3", "LINE_PIN24", "LINE_PIN22"], + ["LINE_PIN4", "LINE_PIN25", "LINE_PIN21"], + ["LINE_PIN5", null, "LINE_PIN20"], + ["LINE_PIN6", null, "LINE_PIN19"], + ["LINE_PIN7", null, "LINE_PIN18"], + ["LINE_PIN8", null, "LINE_PIN17"], + ["LINE_PIN9", null, "LINE_PIN16"], + ["LINE_PIN10", null, "LINE_PIN15"], + ["LINE_PIN11", null, "LINE_PIN14"], + ["LINE_PIN12", "E30", "LINE_PIN13"], + ] + }, + "usb": { + "device_ver": "0x0001", + "pid": "0x2325", + "vid": "0xFEED" + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "0", "matrix": [0, 0], "x": 0, "y": 1 }, + { "label": "1", "matrix": [1, 0], "x": 0, "y": 2 }, + { "label": "2", "matrix": [2, 0], "x": 0, "y": 3 }, { "label": "23", "matrix": [2, 2], "x": 3, "y": 3 }, + { "label": "3", "matrix": [3, 0], "x": 0, "y": 4 }, { "label": "24", "matrix": [3, 1], "x": 2, "y": 4 }, { "label": "22", "matrix": [3, 2], "x": 3, "y": 4 }, + { "label": "4", "matrix": [4, 0], "x": 0, "y": 5 }, { "label": "25", "matrix": [4, 1], "x": 2, "y": 5 }, { "label": "21", "matrix": [4, 2], "x": 3, "y": 5 }, + { "label": "5", "matrix": [5, 0], "x": 0, "y": 6 }, { "label": "20", "matrix": [5, 2], "x": 3, "y": 6 }, + { "label": "6", "matrix": [6, 0], "x": 0, "y": 7 }, { "label": "19", "matrix": [6, 2], "x": 3, "y": 7 }, + { "label": "7", "matrix": [7, 0], "x": 0, "y": 8 }, { "label": "18", "matrix": [7, 2], "x": 3, "y": 8 }, + { "label": "8", "matrix": [8, 0], "x": 0, "y": 9 }, { "label": "17", "matrix": [8, 2], "x": 3, "y": 9 }, + { "label": "9", "matrix": [9, 0], "x": 0, "y": 10 }, { "label": "16", "matrix": [9, 2], "x": 3, "y": 10 }, + { "label": "10", "matrix": [10, 0], "x": 0, "y": 11 }, { "label": "15", "matrix": [10, 2], "x": 3, "y": 11 }, + { "label": "11", "matrix": [11, 0], "x": 0, "y": 12 }, { "label": "14", "matrix": [11, 2], "x": 3, "y": 12 }, + { "label": "12", "matrix": [12, 0], "x": 0, "y": 13 }, { "label": "26", "matrix": [12, 1], "x": 2, "y": 13 }, { "label": "13", "matrix": [12, 2], "x": 3, "y": 13 } + ] + } + } +} diff --git a/keyboards/ez_maker/directpins/teensy_lc/keymaps/default/keymap.json b/keyboards/ez_maker/directpins/teensy_lc/keymaps/default/keymap.json new file mode 100644 index 000000000..e2f557adf --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_lc/keymaps/default/keymap.json @@ -0,0 +1,22 @@ +{ + "keyboard": "ez_maker/directpins/teensy_lc", + "keymap": "default", + "layout": "LAYOUT_all", + "layers": [ + [ + "KC_0", + "KC_1", + "KC_2", "KC_3", + "KC_4", "KC_5", "KC_6", + "KC_7", "KC_8", "KC_9", + "KC_A", "KC_B", + "KC_C", "KC_D", + "KC_E", "KC_F", + "KC_G", "KC_H", + "KC_I", "KC_J", + "KC_K", "KC_L", + "KC_M", "KC_N", + "KC_O", "KC_P", "KC_Q" + ] + ] +} diff --git a/keyboards/ez_maker/directpins/teensy_lc/mcuconf.h b/keyboards/ez_maker/directpins/teensy_lc/mcuconf.h new file mode 100644 index 000000000..f73bec3dc --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_lc/mcuconf.h @@ -0,0 +1,51 @@ +/* + 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 KL2x_MCUCONF + +/* + * HAL driver system settings. + */ +/* PEE mode - 48MHz system clock driven by (16 MHz) external crystal. */ +#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE +#define KINETIS_PLLCLK_FREQUENCY 96000000UL +#define KINETIS_SYSCLK_FREQUENCY 48000000UL + +/* + * SERIAL driver system settings. + */ +#define KINETIS_SERIAL_USE_UART0 TRUE + +/* + * USB driver settings + */ +#define KINETIS_USB_USE_USB0 TRUE + +/* Need to redefine this, since the default (configured for K20x) might not apply + * 2 for Teensy LC + * 5 for Teensy 3.x */ +#define KINETIS_USB_USB0_IRQ_PRIORITY 2 + +/* + * I2C driver settings + */ +#define KINETIS_I2C_USE_I2C0 TRUE +#define KINETIS_I2C_I2C0_PRIORITY 4 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/ez_maker/directpins/teensy_lc/readme.md b/keyboards/ez_maker/directpins/teensy_lc/readme.md new file mode 100644 index 000000000..25172ab01 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_lc/readme.md @@ -0,0 +1,19 @@ +# DirectPins + +![Teensy LC Pinout Guide](https://www.pjrc.com/teensy/card6a_rev2.png) + +Easily assign keys to pins for your custom project using QMK Configurator. + +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Teensy LC +* Hardware Availability: https://pjcr.com/ + +Make example for this keyboard (after setting up your build environment): + + qmk compile -kb ez_maker/directpins/teensy_lc -km default + +Flashing example for this keyboard: + + qmk flash -kb ez_maker/directpins/teensy_lc -km default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ez_maker/directpins/teensy_lc/rules.mk b/keyboards/ez_maker/directpins/teensy_lc/rules.mk new file mode 100644 index 000000000..e04e84328 --- /dev/null +++ b/keyboards/ez_maker/directpins/teensy_lc/rules.mk @@ -0,0 +1,5 @@ +# MCU name +USE_CHIBIOS_CONTRIB = yes + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/facew/rules.mk b/keyboards/facew/rules.mk index 72ccebf87..9befb164b 100644 --- a/keyboards/facew/rules.mk +++ b/keyboards/facew/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/fallacy/indicators.c b/keyboards/fallacy/indicators.c index 6c80f3167..dcf1b4de0 100755 --- a/keyboards/fallacy/indicators.c +++ b/keyboards/fallacy/indicators.c @@ -15,7 +15,7 @@ */ #include "indicators.h" -#include "drivers/issi/is31fl3731-simple.h" +#include "drivers/led/issi/is31fl3731-simple.h" #include "i2c_master.h" /* Set up IS31FL3731 for use in powering indicator LEDs. Absolutely overkill for this job but it was already in the design. @@ -54,7 +54,7 @@ void set_fallacy_led(int index, bool state) { /* define LED matrix */ -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, C1_1}, {0, C2_1}, {0, C3_1}, diff --git a/keyboards/fallacy/rules.mk b/keyboards/fallacy/rules.mk index dfc96a31b..caf362836 100755 --- a/keyboards/fallacy/rules.mk +++ b/keyboards/fallacy/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -18,13 +18,12 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output # project specific files SRC += indicators.c \ - drivers/issi/is31fl3731-simple.c + drivers/led/issi/is31fl3731-simple.c QUANTUM_LIB_SRC += i2c_master.c LAYOUTS = alice alice_split_bs diff --git a/keyboards/fc660c/matrix.c b/keyboards/fc660c/matrix.c index e6e494810..40d606f57 100644 --- a/keyboards/fc660c/matrix.c +++ b/keyboards/fc660c/matrix.c @@ -28,6 +28,7 @@ along with this program. If not, see . #include "timer.h" #include "matrix.h" #include "led.h" +#include "avr/timer_avr.h" // Timer resolution check #if (1000000/TIMER_RAW_FREQ > 20) diff --git a/keyboards/fc660c/rules.mk b/keyboards/fc660c/rules.mk index b4ed65362..fef4bae61 100644 --- a/keyboards/fc660c/rules.mk +++ b/keyboards/fc660c/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -# BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/fc980c/matrix.c b/keyboards/fc980c/matrix.c index 1126f3047..6cdd9cf42 100644 --- a/keyboards/fc980c/matrix.c +++ b/keyboards/fc980c/matrix.c @@ -28,6 +28,7 @@ along with this program. If not, see . #include "timer.h" #include "matrix.h" #include "led.h" +#include "avr/timer_avr.h" // #include QMK_KEYBOARD_H diff --git a/keyboards/fc980c/rules.mk b/keyboards/fc980c/rules.mk index b4ed65362..fef4bae61 100644 --- a/keyboards/fc980c/rules.mk +++ b/keyboards/fc980c/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -# BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/feels/feels65/rules.mk b/keyboards/feels/feels65/rules.mk index 914e3429e..3a183349a 100644 --- a/keyboards/feels/feels65/rules.mk +++ b/keyboards/feels/feels65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/felix/config.h b/keyboards/felix/config.h index 884294e4e..349359b32 100644 --- a/keyboards/felix/config.h +++ b/keyboards/felix/config.h @@ -175,26 +175,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/felix/rules.mk b/keyboards/felix/rules.mk index 1fcdf216c..3d19506c1 100644 --- a/keyboards/felix/rules.mk +++ b/keyboards/felix/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ferris/0_1/rules.mk b/keyboards/ferris/0_1/rules.mk index 8645dbba0..2aaab9e6e 100644 --- a/keyboards/ferris/0_1/rules.mk +++ b/keyboards/ferris/0_1/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = atmel-dfu # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ferris/0_2/bling/bling.c b/keyboards/ferris/0_2/bling/bling.c index 28ca92893..e275abdad 100644 --- a/keyboards/ferris/0_2/bling/bling.c +++ b/keyboards/ferris/0_2/bling/bling.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ #include "quantum.h" -#include "drivers/issi/is31fl3731.h" +#include "drivers/led/issi/is31fl3731.h" /* | Left || Right | diff --git a/keyboards/ferris/0_2/rules.mk b/keyboards/ferris/0_2/rules.mk index f1a66061c..b51063a52 100644 --- a/keyboards/ferris/0_2/rules.mk +++ b/keyboards/ferris/0_2/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = stm32-dfu # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ferris/keymaps/madhatter/rules.mk b/keyboards/ferris/keymaps/madhatter/rules.mk index 2631761ce..76c104574 100644 --- a/keyboards/ferris/keymaps/madhatter/rules.mk +++ b/keyboards/ferris/keymaps/madhatter/rules.mk @@ -1,2 +1,2 @@ -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/ferris/sweep/rules.mk b/keyboards/ferris/sweep/rules.mk index ce4d52156..d48beb97c 100644 --- a/keyboards/ferris/sweep/rules.mk +++ b/keyboards/ferris/sweep/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ffkeebs/siris/rules.mk b/keyboards/ffkeebs/siris/rules.mk index 912413f26..f2bc73717 100644 --- a/keyboards/ffkeebs/siris/rules.mk +++ b/keyboards/ffkeebs/siris/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/bks65/rules.mk b/keyboards/fjlabs/bks65/rules.mk index 5f75863ba..7e7c85e00 100644 --- a/keyboards/fjlabs/bks65/rules.mk +++ b/keyboards/fjlabs/bks65/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/bks65solder/rules.mk b/keyboards/fjlabs/bks65solder/rules.mk index 5f75863ba..7e7c85e00 100644 --- a/keyboards/fjlabs/bks65solder/rules.mk +++ b/keyboards/fjlabs/bks65solder/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/bolsa65/rules.mk b/keyboards/fjlabs/bolsa65/rules.mk index 945e7be2e..2123751f9 100644 --- a/keyboards/fjlabs/bolsa65/rules.mk +++ b/keyboards/fjlabs/bolsa65/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/ldk65/rules.mk b/keyboards/fjlabs/ldk65/rules.mk index 6d4300e48..085d9a053 100644 --- a/keyboards/fjlabs/ldk65/rules.mk +++ b/keyboards/fjlabs/ldk65/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/midway60/rules.mk b/keyboards/fjlabs/midway60/rules.mk index 622c26a3a..f9fc8d82c 100644 --- a/keyboards/fjlabs/midway60/rules.mk +++ b/keyboards/fjlabs/midway60/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/polaris/rules.mk b/keyboards/fjlabs/polaris/rules.mk index 622c26a3a..f9fc8d82c 100644 --- a/keyboards/fjlabs/polaris/rules.mk +++ b/keyboards/fjlabs/polaris/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/flehrad/bigswitch/rules.mk b/keyboards/flehrad/bigswitch/rules.mk index 88844733f..c83deb534 100644 --- a/keyboards/flehrad/bigswitch/rules.mk +++ b/keyboards/flehrad/bigswitch/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/flehrad/downbubble/config.h b/keyboards/flehrad/downbubble/config.h index 26a30bee5..f1af41e5f 100644 --- a/keyboards/flehrad/downbubble/config.h +++ b/keyboards/flehrad/downbubble/config.h @@ -183,26 +183,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/flehrad/downbubble/rules.mk b/keyboards/flehrad/downbubble/rules.mk index 0d85f98c4..0cf873860 100644 --- a/keyboards/flehrad/downbubble/rules.mk +++ b/keyboards/flehrad/downbubble/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/flehrad/numbrero/rules.mk b/keyboards/flehrad/numbrero/rules.mk index d83407139..064f1c640 100644 --- a/keyboards/flehrad/numbrero/rules.mk +++ b/keyboards/flehrad/numbrero/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/flehrad/snagpad/rules.mk b/keyboards/flehrad/snagpad/rules.mk index fbc918ba4..22776bff7 100644 --- a/keyboards/flehrad/snagpad/rules.mk +++ b/keyboards/flehrad/snagpad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/flehrad/tradestation/rules.mk b/keyboards/flehrad/tradestation/rules.mk index cf3068c02..15aa1f8a3 100644 --- a/keyboards/flehrad/tradestation/rules.mk +++ b/keyboards/flehrad/tradestation/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/fleuron/config.h b/keyboards/fleuron/config.h index 70772b883..d6c802648 100644 --- a/keyboards/fleuron/config.h +++ b/keyboards/fleuron/config.h @@ -157,26 +157,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #define RGB_DI_PIN E6 // The pin the LED strip is connected to #define RGBLED_NUM 18 // Number of LEDs in your strip #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/fleuron/rules.mk b/keyboards/fleuron/rules.mk index b18c5723a..8bb653974 100644 --- a/keyboards/fleuron/rules.mk +++ b/keyboards/fleuron/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/fluorite/config.h b/keyboards/fluorite/config.h index 4d05975ae..5dea11e1b 100644 --- a/keyboards/fluorite/config.h +++ b/keyboards/fluorite/config.h @@ -187,26 +187,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/fluorite/rules.mk b/keyboards/fluorite/rules.mk index 123700351..d25d451e8 100644 --- a/keyboards/fluorite/rules.mk +++ b/keyboards/fluorite/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/flx/lodestone/rules.mk b/keyboards/flx/lodestone/rules.mk index 70c9bc8bd..6a85ebe3f 100644 --- a/keyboards/flx/lodestone/rules.mk +++ b/keyboards/flx/lodestone/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/flx/virgo/rules.mk b/keyboards/flx/virgo/rules.mk index 381040642..05e128b8b 100644 --- a/keyboards/flx/virgo/rules.mk +++ b/keyboards/flx/virgo/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/flxlb/zplit/rules.mk b/keyboards/flxlb/zplit/rules.mk index 121bba1df..29e7265cb 100644 --- a/keyboards/flxlb/zplit/rules.mk +++ b/keyboards/flxlb/zplit/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/flygone60/rev3/rules.mk b/keyboards/flygone60/rev3/rules.mk index e7d00a027..e7ef163d4 100644 --- a/keyboards/flygone60/rev3/rules.mk +++ b/keyboards/flygone60/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/foostan/cornelius/rules.mk b/keyboards/foostan/cornelius/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/foostan/cornelius/rules.mk +++ b/keyboards/foostan/cornelius/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/for_science/rules.mk b/keyboards/for_science/rules.mk index b8e091ef6..f3a14969f 100644 --- a/keyboards/for_science/rules.mk +++ b/keyboards/for_science/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/fortitude60/rules.mk b/keyboards/fortitude60/rules.mk index d866b0bc0..b329e5082 100644 --- a/keyboards/fortitude60/rules.mk +++ b/keyboards/fortitude60/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/four_banger/rules.mk b/keyboards/four_banger/rules.mk index b989b893b..eec3522db 100644 --- a/keyboards/four_banger/rules.mk +++ b/keyboards/four_banger/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/foxlab/key65/hotswap/rules.mk b/keyboards/foxlab/key65/hotswap/rules.mk index bbcb451e1..6b0553824 100644 --- a/keyboards/foxlab/key65/hotswap/rules.mk +++ b/keyboards/foxlab/key65/hotswap/rules.mk @@ -11,7 +11,7 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,5 +22,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output diff --git a/keyboards/foxlab/key65/universal/rules.mk b/keyboards/foxlab/key65/universal/rules.mk index 4552456ef..10e49d61b 100644 --- a/keyboards/foxlab/key65/universal/rules.mk +++ b/keyboards/foxlab/key65/universal/rules.mk @@ -11,7 +11,7 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output LAYOUTS = 65_ansi_blocker_split_bs # Support community layouts diff --git a/keyboards/foxlab/leaf60/hotswap/config.h b/keyboards/foxlab/leaf60/hotswap/config.h index 50a8527eb..5cc751a69 100644 --- a/keyboards/foxlab/leaf60/hotswap/config.h +++ b/keyboards/foxlab/leaf60/hotswap/config.h @@ -175,26 +175,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/foxlab/leaf60/hotswap/rules.mk b/keyboards/foxlab/leaf60/hotswap/rules.mk index b8332901c..24143d65b 100644 --- a/keyboards/foxlab/leaf60/hotswap/rules.mk +++ b/keyboards/foxlab/leaf60/hotswap/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/foxlab/leaf60/universal/config.h b/keyboards/foxlab/leaf60/universal/config.h index 237276ed8..7a2574e6b 100644 --- a/keyboards/foxlab/leaf60/universal/config.h +++ b/keyboards/foxlab/leaf60/universal/config.h @@ -175,26 +175,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/foxlab/leaf60/universal/rules.mk b/keyboards/foxlab/leaf60/universal/rules.mk index c1876cd2b..2d93acabe 100644 --- a/keyboards/foxlab/leaf60/universal/rules.mk +++ b/keyboards/foxlab/leaf60/universal/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/foxlab/time80/rules.mk b/keyboards/foxlab/time80/rules.mk index 1b61e9534..e39c2ea1e 100644 --- a/keyboards/foxlab/time80/rules.mk +++ b/keyboards/foxlab/time80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/foxlab/time_re/hotswap/rules.mk b/keyboards/foxlab/time_re/hotswap/rules.mk index 77b7c43ff..8c91841fb 100644 --- a/keyboards/foxlab/time_re/hotswap/rules.mk +++ b/keyboards/foxlab/time_re/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/foxlab/time_re/universal/rules.mk b/keyboards/foxlab/time_re/universal/rules.mk index 8d3f342f5..07c819d30 100644 --- a/keyboards/foxlab/time_re/universal/rules.mk +++ b/keyboards/foxlab/time_re/universal/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fr4/southpaw75/rules.mk b/keyboards/fr4/southpaw75/rules.mk index bde08efba..f0e9a7a83 100644 --- a/keyboards/fr4/southpaw75/rules.mk +++ b/keyboards/fr4/southpaw75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fr4/unix60/rules.mk b/keyboards/fr4/unix60/rules.mk index 8a411ac60..f0e9a7a83 100644 --- a/keyboards/fr4/unix60/rules.mk +++ b/keyboards/fr4/unix60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fractal/rules.mk b/keyboards/fractal/rules.mk index 0952b247a..ce13d6855 100755 --- a/keyboards/fractal/rules.mk +++ b/keyboards/fractal/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/freyr/rules.mk b/keyboards/freyr/rules.mk index bfd0c5262..31366b691 100644 --- a/keyboards/freyr/rules.mk +++ b/keyboards/freyr/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/friedrich/rules.mk b/keyboards/friedrich/rules.mk index a90eef1fc..23ba502fc 100644 --- a/keyboards/friedrich/rules.mk +++ b/keyboards/friedrich/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/frooastboard/config.h b/keyboards/frooastboard/config.h index fb5f3e650..ebfc6a75d 100644 --- a/keyboards/frooastboard/config.h +++ b/keyboards/frooastboard/config.h @@ -19,9 +19,6 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x4642 /*F rooast B oards*/ -#define PRODUCT_ID 0x6F21 /*osu!*/ -#define DEVICE_VER 0x0001 #define MANUFACTURER frooastside #define PRODUCT Frooastboard @@ -29,20 +26,9 @@ #define MATRIX_ROWS 2 #define MATRIX_COLS 2 -/* key matrix pins */ -#define MATRIX_ROW_PINS { B0, B1 } -#define MATRIX_COL_PINS { B2, B3 } -#define UNUSED_PINS - #define BOOTMAGIC_LITE_ROW 1 #define BOOTMAGIC_LITE_COLUMN 1 -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - #define RGB_DI_PIN B4 #define RGBLED_NUM 8 diff --git a/keyboards/ft/mars80/rules.mk b/keyboards/ft/mars80/rules.mk index 2cd628153..794e90768 100644 --- a/keyboards/ft/mars80/rules.mk +++ b/keyboards/ft/mars80/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/function96/v1/rules.mk b/keyboards/function96/v1/rules.mk index adbe34e7d..fde1a427b 100644 --- a/keyboards/function96/v1/rules.mk +++ b/keyboards/function96/v1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/function96/v2/rules.mk b/keyboards/function96/v2/rules.mk index adbe34e7d..fde1a427b 100644 --- a/keyboards/function96/v2/rules.mk +++ b/keyboards/function96/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/funky40/rules.mk b/keyboards/funky40/rules.mk index c50d7999b..641b2c4bf 100644 --- a/keyboards/funky40/rules.mk +++ b/keyboards/funky40/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/gami_studio/lex60/rules.mk b/keyboards/gami_studio/lex60/rules.mk index ee841fc37..618ef9486 100644 --- a/keyboards/gami_studio/lex60/rules.mk +++ b/keyboards/gami_studio/lex60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/gboards/g/keymap_combo.h b/keyboards/gboards/g/keymap_combo.h index 58e99863e..b92b6a4bc 100644 --- a/keyboards/gboards/g/keymap_combo.h +++ b/keyboards/gboards/g/keymap_combo.h @@ -28,7 +28,10 @@ #define TOGG A_ENUM enum combos { #include "combos.def" + COMBO_LENGTH }; +// Export length to combo module +uint16_t COMBO_LEN = COMBO_LENGTH; // Bake combos into mem #undef COMB @@ -53,9 +56,6 @@ combo_t key_combos[] = { #undef SUBS #undef TOGG -// Export length to combo module -int COMBO_LEN = sizeof(key_combos) / sizeof(key_combos[0]); - // Fill QMK hook #define COMB BLANK #define SUBS A_ACTI diff --git a/keyboards/geekboards/macropad_v2/config.h b/keyboards/geekboards/macropad_v2/config.h index 57675d639..4b0949ff9 100644 --- a/keyboards/geekboards/macropad_v2/config.h +++ b/keyboards/geekboards/macropad_v2/config.h @@ -41,7 +41,7 @@ #define WS2812_DMA_CHANNEL 3 #ifdef RGB_MATRIX_ENABLE -#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define DISABLE_RGB_MATRIX_ALPHAS_MODS #define DISABLE_RGB_MATRIX_BAND_SAT @@ -67,7 +67,7 @@ #define RGB_MATRIX_STARTUP_SPD 30 #endif //RGB_MATRIX_ENABLE -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define WAIT_FOR_USB #define USB_POLLING_INTERVAL_MS 1 diff --git a/keyboards/geekboards/macropad_v2/rules.mk b/keyboards/geekboards/macropad_v2/rules.mk index 47db87709..7a67e07d5 100644 --- a/keyboards/geekboards/macropad_v2/rules.mk +++ b/keyboards/geekboards/macropad_v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/geekboards/tester/config.h b/keyboards/geekboards/tester/config.h index 4f072c0ee..3e3daccd5 100644 --- a/keyboards/geekboards/tester/config.h +++ b/keyboards/geekboards/tester/config.h @@ -24,7 +24,7 @@ #define DEBOUNCE 3 #ifdef RGB_MATRIX_ENABLE #define RGB_DISABLE_AFTER_TIMEOUT 0 -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_KEYPRESSES #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH @@ -36,4 +36,4 @@ #define DRIVER_1_LED_TOTAL 8 #define DRIVER_2_LED_TOTAL 0 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#endif \ No newline at end of file +#endif diff --git a/keyboards/geekboards/tester/rules.mk b/keyboards/geekboards/tester/rules.mk index 518fb3521..60488edf6 100644 --- a/keyboards/geekboards/tester/rules.mk +++ b/keyboards/geekboards/tester/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/geekboards/tester/tester.c b/keyboards/geekboards/tester/tester.c index 4fab1a701..0c5c056cc 100644 --- a/keyboards/geekboards/tester/tester.c +++ b/keyboards/geekboards/tester/tester.c @@ -1,5 +1,5 @@ #include "tester.h" -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/geminate60/rules.mk b/keyboards/geminate60/rules.mk index 8fc40411d..6ff4e4976 100644 --- a/keyboards/geminate60/rules.mk +++ b/keyboards/geminate60/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/generic_panda/panda65_01/rules.mk b/keyboards/generic_panda/panda65_01/rules.mk index b05f306d3..49206b823 100644 --- a/keyboards/generic_panda/panda65_01/rules.mk +++ b/keyboards/generic_panda/panda65_01/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/genone/eclipse_65/rules.mk b/keyboards/genone/eclipse_65/rules.mk index a8020aa53..69485630b 100644 --- a/keyboards/genone/eclipse_65/rules.mk +++ b/keyboards/genone/eclipse_65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/genone/g1_65/rules.mk b/keyboards/genone/g1_65/rules.mk index a8020aa53..69485630b 100644 --- a/keyboards/genone/g1_65/rules.mk +++ b/keyboards/genone/g1_65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gergo/keymaps/drashna/keymap.c b/keyboards/gergo/keymaps/drashna/keymap.c index 81ff6852d..01d52ed16 100644 --- a/keyboards/gergo/keymaps/drashna/keymap.c +++ b/keyboards/gergo/keymaps/drashna/keymap.c @@ -37,56 +37,32 @@ KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \ ) -#define LAYOUT_gergo_base_wrapper(...) LAYOUT_gergo_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_gergo_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_gergo_base_wrapper( + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), - [_COLEMAK] = LAYOUT_gergo_base_wrapper( + ), + + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ ), - [_DVORAK] = LAYOUT_gergo_base_wrapper( + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), - [_WORKMAN] = LAYOUT_gergo_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_gergo_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_gergo_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_gergo_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_gergo_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - [_LOWER] = LAYOUT_gergo_wrapper( KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, _______, _________________LOWER_L2__________________, _______, _______, _________________LOWER_R2__________________, KC_PIPE, diff --git a/keyboards/gergo/keymaps/oled/keymap.c b/keyboards/gergo/keymaps/oled/keymap.c index c348a2b96..7e19a799e 100644 --- a/keyboards/gergo/keymaps/oled/keymap.c +++ b/keyboards/gergo/keymaps/oled/keymap.c @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } diff --git a/keyboards/gergo/keymaps/oled/rules.mk b/keyboards/gergo/keymaps/oled/rules.mk index 1661d43d1..631808898 100644 --- a/keyboards/gergo/keymaps/oled/rules.mk +++ b/keyboards/gergo/keymaps/oled/rules.mk @@ -7,7 +7,8 @@ BALLER = no # Enable to ball out BALLSTEP = 20 # Multiple in px to move, multiplied by layer number SCROLLSTEP = 1 # Lines to scroll with ball MOUSEKEY_ENABLE = yes # Mouse keys, needed for baller -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LOCAL_GLCDFONT = yes #Debug options diff --git a/keyboards/gergo/rules.mk b/keyboards/gergo/rules.mk index 41f201a45..6a1d07324 100644 --- a/keyboards/gergo/rules.mk +++ b/keyboards/gergo/rules.mk @@ -15,8 +15,8 @@ CUSTOM_MATRIX = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite -DEBOUNCE_TYPE = eager_pr +DEBOUNCE_TYPE = sym_eager_pr SRC += matrix.c QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/getta25/keymaps/oled/keymap.c b/keyboards/getta25/keymaps/oled/keymap.c index 44833857d..4fbaf3ec2 100644 --- a/keyboards/getta25/keymaps/oled/keymap.c +++ b/keyboards/getta25/keymaps/oled/keymap.c @@ -1,7 +1,7 @@ #include QMK_KEYBOARD_H #include "keymap_jp.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static uint32_t oled_timer = 0; #endif @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------| KC_P1, KC_P2, KC_P3, KC_DEL, //|--------+--------+--------+--------+--------| -LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC +LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC //`--------------------------------------------' ), @@ -54,7 +54,7 @@ LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC //|--------+--------+--------+--------+--------| XXXXXXX, KC_DOWN, XXXXXXX, _______, //|--------+--------+--------+--------+--------| - MO(_ARROW), MO(_MACRO), _______, _______ + MO(_ARROW), MO(_MACRO), _______, _______ //`--------------------------------------------' ), @@ -70,7 +70,7 @@ LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC //|--------+--------+--------+--------+--------| KC_F11, KC_F12, KC_F3, _______, //|--------+--------+--------+--------+--------| - _______, _______, JP_RPRN, _______ + _______, _______, JP_RPRN, _______ //`--------------------------------------------' ), @@ -86,7 +86,7 @@ LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT,KC_BSPC //|--------+--------+--------+--------+--------| RGB_VAD, RGB_VAI, XXXXXXX, _______, //|--------+--------+--------+--------+--------| - _______, _______, RGB_MOD, _______ + _______, _______, RGB_MOD, _______ //`--------------------------------------------' ) }; @@ -118,7 +118,7 @@ int RGB_current_mode; bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool result = false; if (record->event.pressed) { - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE oled_timer = timer_read32(); #endif } @@ -156,7 +156,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return result; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } void render_layer_state(void) { diff --git a/keyboards/getta25/keymaps/oled/rules.mk b/keyboards/getta25/keymaps/oled/rules.mk index c58266213..d34d066de 100644 --- a/keyboards/getta25/keymaps/oled/rules.mk +++ b/keyboards/getta25/keymaps/oled/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/getta25/rules.mk b/keyboards/getta25/rules.mk index fdb399da2..05e454630 100644 --- a/keyboards/getta25/rules.mk +++ b/keyboards/getta25/rules.mk @@ -14,19 +14,18 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -OLED_DRIVER_ENABLE = no +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +OLED_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/ggkeyboards/genesis/hotswap/config.h b/keyboards/ggkeyboards/genesis/hotswap/config.h index d435612f1..966acc1b4 100644 --- a/keyboards/ggkeyboards/genesis/hotswap/config.h +++ b/keyboards/ggkeyboards/genesis/hotswap/config.h @@ -19,15 +19,15 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xBB00 -#define PRODUCT_ID 0xD4D3 -#define DEVICE_VER 0x0001 -#define MANUFACTURER GG Keyboards -#define PRODUCT Genesis +#define VENDOR_ID 0xBB00 +#define PRODUCT_ID 0xD4D3 +#define DEVICE_VER 0x0001 +#define MANUFACTURER GG Keyboards +#define PRODUCT Genesis /* key matrix size */ -#define MATRIX_ROWS 7 -#define MATRIX_COLS 18 +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 /* * Keyboard Matrix Assignments @@ -39,11 +39,12 @@ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define MATRIX_ROW_PINS { C5, C4, C3, C2, C1, C0 } -#define MATRIX_COL_PINS { F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, A6, A7, C6, C7 } +#define MATRIX_ROW_PINS \ + { C5, C4, C3, C2, C1, C0 } +#define MATRIX_COL_PINS \ + { F0, F1, F2, F3, F4, F5, F6, F7, A0, A1, A2, A3, A4, A5, A6, A7, C6, C7 } #define DIODE_DIRECTION COL2ROW - // generated by KBFirmware JSON to QMK Parser -// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/ggkeyboards/genesis/hotswap/hotswap.h b/keyboards/ggkeyboards/genesis/hotswap/hotswap.h index a5ff78cca..4469037ef 100644 --- a/keyboards/ggkeyboards/genesis/hotswap/hotswap.h +++ b/keyboards/ggkeyboards/genesis/hotswap/hotswap.h @@ -18,6 +18,7 @@ #include "quantum.h" +// clang-format off #define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0F, K0G, K0H, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, \ @@ -27,13 +28,12 @@ K60, K61, K63, K66, K6A, K6B, K6C, K6D, K6F, K6G, K6H \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, KC_NO, K0F, K0G, K0H }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F, K2G, K2H }, \ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H }, \ { K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, KC_NO, KC_NO, KC_NO }, \ { KC_NO, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, KC_NO, KC_NO, KC_NO, K5G, KC_NO }, \ - { K60, K61, KC_NO, K63, KC_NO, KC_NO, K66, KC_NO, KC_NO, KC_NO, K6A, K6B, K6C, K6D, KC_NO, K6F, K6G, K6H }, \ + { K60, K61, KC_NO, K63, KC_NO, KC_NO, K66, KC_NO, KC_NO, KC_NO, K6A, K6B, K6C, K6D, KC_NO, K6F, K6G, K6H } \ } // generated by KBFirmware JSON to QMK Parser -// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/ggkeyboards/genesis/hotswap/rules.mk b/keyboards/ggkeyboards/genesis/hotswap/rules.mk index 0de06a344..41efaac3b 100644 --- a/keyboards/ggkeyboards/genesis/hotswap/rules.mk +++ b/keyboards/ggkeyboards/genesis/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ggkeyboards/genesis/solder/config.h b/keyboards/ggkeyboards/genesis/solder/config.h index 76586262a..74a098f41 100644 --- a/keyboards/ggkeyboards/genesis/solder/config.h +++ b/keyboards/ggkeyboards/genesis/solder/config.h @@ -26,7 +26,7 @@ #define PRODUCT Genesis /* key matrix size */ -#define MATRIX_ROWS 7 +#define MATRIX_ROWS 6 #define MATRIX_COLS 18 /* @@ -46,4 +46,4 @@ // generated by KBFirmware JSON to QMK Parser -// https://noroadsleft.github.io/kbf_qmk_converter/ \ No newline at end of file +// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/ggkeyboards/genesis/solder/rules.mk b/keyboards/ggkeyboards/genesis/solder/rules.mk index 0de06a344..41efaac3b 100644 --- a/keyboards/ggkeyboards/genesis/solder/rules.mk +++ b/keyboards/ggkeyboards/genesis/solder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/gh60/revc/keymaps/dbroqua/keymap.c b/keyboards/gh60/revc/keymaps/dbroqua/keymap.c index 9666199f3..964f40f1c 100644 --- a/keyboards/gh60/revc/keymaps/dbroqua/keymap.c +++ b/keyboards/gh60/revc/keymaps/dbroqua/keymap.c @@ -94,79 +94,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SFX] = LAYOUT_60_ansi_split_bs_rshift( ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, F(0), F(1), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, F(2), F(3), F(4), F(5), F(6), F(7), ______, ______, ______, ______, ______, ______, \ + ______, RGB_TOG,RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______ \ ) }; -enum function_id { - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(RGBLED_TOGGLE), - [1] = ACTION_FUNCTION(RGBLED_STEP_MODE), - [2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL) -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGBLED_TOGGLE: - if (record->event.pressed) { - rgblight_toggle(); - } - break; - case RGBLED_INCREASE_HUE: - if (record->event.pressed) { - rgblight_increase_hue(); - } - break; - case RGBLED_DECREASE_HUE: - if (record->event.pressed) { - rgblight_decrease_hue(); - } - break; - case RGBLED_INCREASE_SAT: - if (record->event.pressed) { - rgblight_increase_sat(); - } - break; - case RGBLED_DECREASE_SAT: - if (record->event.pressed) { - rgblight_decrease_sat(); - } - break; - case RGBLED_INCREASE_VAL: - if (record->event.pressed) { - rgblight_increase_val(); - } - break; - case RGBLED_DECREASE_VAL: - if (record->event.pressed) { - rgblight_decrease_val(); - } - break; - case RGBLED_STEP_MODE: - if (record->event.pressed) { - rgblight_step(); - } - break; - } -} - void matrix_scan_user(void) { uint32_t layer = layer_state; diff --git a/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c b/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c index 5b58d7686..a79b89e9c 100644 --- a/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c +++ b/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c @@ -3,6 +3,10 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + LED_TOGGLE = SAFE_RANGE +}; + int esc_led = 0; // Fillers to make layering more clear @@ -44,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------' */ [_FN] = LAYOUT_60_ansi_split_bs_rshift( /* Layer 1 */ - F(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ + LED_TOGGLE,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, \ KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \ ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT,______, \ ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \ @@ -52,14 +56,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -enum function_id { - LED_TOGGLE -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(LED_TOGGLE) -}; - void esc_led_toggle(void) { if (esc_led == 0){ esc_led = 1; @@ -70,12 +66,13 @@ void esc_led_toggle(void) { } } -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case LED_TOGGLE: - if (record->event.pressed) { - esc_led_toggle(); - } - break; - } -} \ No newline at end of file +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LED_TOGGLE: + if (record->event.pressed) { + esc_led_toggle(); + } + return false; + } + return true; +} diff --git a/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c b/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c index 633b053e6..493bee1cd 100644 --- a/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c +++ b/keyboards/gh60/revc/keymaps/default_abnt2/keymap.c @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_60_abnt2( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BR_ACUT, BR_LBRC, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCDL, BR_TILD, BR_RBRC, KC_ENT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCED, BR_TILD, BR_RBRC, KC_ENT, KC_LSFT, BR_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, BR_SCLN, BR_SLSH, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL), diff --git a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c index 770fe723b..b84e7564f 100644 --- a/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c +++ b/keyboards/gh60/revc/keymaps/robotmaxtron/keymap.c @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_BL] = LAYOUT( - F(12),KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSPC, \ + KC_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, \ LT(2, KC_CAPS),KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_NO,KC_ENT, \ KC_LSFT,KC_NO,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_NO,KC_RSFT, \ @@ -88,35 +88,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_UL] = LAYOUT( KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,F(4),F(5),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS,F(6),F(7),F(8),F(9),F(10),F(11),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ + KC_TRNS,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,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, \ KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), }; -enum function_id { - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL, - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow - [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode - [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), - [12] = ACTION_FUNCTION(SHIFT_ESC), -}; - void matrix_scan_user(void) { // Layer LED indicators @@ -134,73 +110,3 @@ void matrix_scan_user(void) { gh60_esc_led_off(); } }; - -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGBLED_TOGGLE: - //led operations - if (record->event.pressed) { - rgblight_toggle(); - } - break; - case RGBLED_INCREASE_HUE: - if (record->event.pressed) { - rgblight_increase_hue(); - } - break; - case RGBLED_DECREASE_HUE: - if (record->event.pressed) { - rgblight_decrease_hue(); - } - break; - case RGBLED_INCREASE_SAT: - if (record->event.pressed) { - rgblight_increase_sat(); - } - break; - case RGBLED_DECREASE_SAT: - if (record->event.pressed) { - rgblight_decrease_sat(); - } - break; - case RGBLED_INCREASE_VAL: - if (record->event.pressed) { - rgblight_increase_val(); - } - break; - case RGBLED_DECREASE_VAL: - if (record->event.pressed) { - rgblight_decrease_val(); - } - break; - case RGBLED_STEP_MODE: - if (record->event.pressed) { - rgblight_step(); - } - break; - static uint8_t shift_esc_shift_mask; - // Shift + ESC = ~ - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -}; diff --git a/keyboards/gh60/revc/keymaps/sethbc/keymap.c b/keyboards/gh60/revc/keymaps/sethbc/keymap.c index 09a8d49ee..1557d109b 100644 --- a/keyboards/gh60/revc/keymaps/sethbc/keymap.c +++ b/keyboards/gh60/revc/keymaps/sethbc/keymap.c @@ -1,12 +1,9 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: qwerty */ LAYOUT_60_ansi_split_bs_rshift( - F(0),KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSLS,KC_GRV,\ + KC_GESC,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSLS,KC_GRV,\ KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSPC,\ KC_LCTL,KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT,KC_ENT,\ KC_LSFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,MO(1),\ @@ -19,37 +16,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END,KC_PGDN,KC_DOWN,KC_TRNS,KC_TRNS,\ KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/gh60/revc/rules.mk b/keyboards/gh60/revc/rules.mk index 831de85d0..da064bc64 100644 --- a/keyboards/gh60/revc/rules.mk +++ b/keyboards/gh60/revc/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,7 @@ KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls +MIDI_ENABLE = no # MIDI support # UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/gh60/satan/keymaps/abhixec/rules.mk b/keyboards/gh60/satan/keymaps/abhixec/rules.mk index fdbd25ea8..4cd8e19f3 100644 --- a/keyboards/gh60/satan/keymaps/abhixec/rules.mk +++ b/keyboards/gh60/satan/keymaps/abhixec/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/gh60/satan/keymaps/addcninblue/rules.mk b/keyboards/gh60/satan/keymaps/addcninblue/rules.mk index fd7f34300..b8c05a598 100644 --- a/keyboards/gh60/satan/keymaps/addcninblue/rules.mk +++ b/keyboards/gh60/satan/keymaps/addcninblue/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -18,4 +18,3 @@ UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings diff --git a/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk b/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk index 7c3f5bd90..ad6c0131a 100644 --- a/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk +++ b/keyboards/gh60/satan/keymaps/admiralStrokers/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -18,5 +18,3 @@ UCIS_ENABLE = no # Keep in mind that not all will work (See WinCompose for detai BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no# Breathing sleep LED during USB suspend -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings - diff --git a/keyboards/gh60/satan/keymaps/ben_iso/rules.mk b/keyboards/gh60/satan/keymaps/ben_iso/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/gh60/satan/keymaps/ben_iso/rules.mk +++ b/keyboards/gh60/satan/keymaps/ben_iso/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/gh60/satan/keymaps/chaser/keymap.c b/keyboards/gh60/satan/keymaps/chaser/keymap.c index edba9a309..4427f793e 100644 --- a/keyboards/gh60/satan/keymaps/chaser/keymap.c +++ b/keyboards/gh60/satan/keymaps/chaser/keymap.c @@ -1,10 +1,5 @@ #include QMK_KEYBOARD_H - - -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -27,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_BL] = LAYOUT_all( - F(0) ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS,KC_EQL ,KC_BSPC , _______, \ + KC_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_LSHIFT ,_______,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_UP ,MO(_FL) , \ @@ -52,37 +47,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ ,_______ ,_______ ,_______ ,_______ ,_______,_______,_______,_______,_______,_______,_______,KC_PGUP ,_______ , \ KC_LCTL ,_______ ,KC_LALT , _______, KC_RCTL,KC_HOME,KC_PGDOWN ,KC_END ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/gh60/satan/keymaps/chaser/rules.mk b/keyboards/gh60/satan/keymaps/chaser/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/gh60/satan/keymaps/chaser/rules.mk +++ b/keyboards/gh60/satan/keymaps/chaser/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/gh60/satan/keymaps/colemak/rules.mk b/keyboards/gh60/satan/keymaps/colemak/rules.mk index 5cbbc3453..00ecf0184 100644 --- a/keyboards/gh60/satan/keymaps/colemak/rules.mk +++ b/keyboards/gh60/satan/keymaps/colemak/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gh60/satan/keymaps/dbroqua/keymap.c b/keyboards/gh60/satan/keymaps/dbroqua/keymap.c index a9a54bf76..79fa86d18 100644 --- a/keyboards/gh60/satan/keymaps/dbroqua/keymap.c +++ b/keyboards/gh60/satan/keymaps/dbroqua/keymap.c @@ -71,75 +71,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SFX] = LAYOUT_60_ansi_split_bs_rshift( ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ ______, BL_DEC, BL_INC, BL_TOGG,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, F(0), F(1), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, F(2), F(3), F(4), F(5), F(6), F(7), ______, ______, ______, ______, ______, ______, \ + ______, RGB_TOG,RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______ \ ) }; - -enum function_id { - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(RGBLED_TOGGLE), - [1] = ACTION_FUNCTION(RGBLED_STEP_MODE), - [2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL) -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGBLED_TOGGLE: - if (record->event.pressed) { - rgblight_toggle(); - } - break; - case RGBLED_INCREASE_HUE: - if (record->event.pressed) { - rgblight_increase_hue(); - } - break; - case RGBLED_DECREASE_HUE: - if (record->event.pressed) { - rgblight_decrease_hue(); - } - break; - case RGBLED_INCREASE_SAT: - if (record->event.pressed) { - rgblight_increase_sat(); - } - break; - case RGBLED_DECREASE_SAT: - if (record->event.pressed) { - rgblight_decrease_sat(); - } - break; - case RGBLED_INCREASE_VAL: - if (record->event.pressed) { - rgblight_increase_val(); - } - break; - case RGBLED_DECREASE_VAL: - if (record->event.pressed) { - rgblight_decrease_val(); - } - break; - case RGBLED_STEP_MODE: - if (record->event.pressed) { - rgblight_step(); - } - break; - } -} diff --git a/keyboards/gh60/satan/keymaps/default/rules.mk b/keyboards/gh60/satan/keymaps/default/rules.mk index 5cbbc3453..00ecf0184 100644 --- a/keyboards/gh60/satan/keymaps/default/rules.mk +++ b/keyboards/gh60/satan/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gh60/satan/keymaps/dende_iso/keymap.c b/keyboards/gh60/satan/keymaps/dende_iso/keymap.c index e6187c161..48cd66d41 100644 --- a/keyboards/gh60/satan/keymaps/dende_iso/keymap.c +++ b/keyboards/gh60/satan/keymaps/dende_iso/keymap.c @@ -29,9 +29,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_DEF] = LAYOUT_60_iso_split_bs_rshift( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, KC_BSPC, MO(_FNK), \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, \ - FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, \ - KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_DELETE, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA, DE_PLUS, \ + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_ODIA, DE_ADIA, DE_HASH, KC_ENT, \ + KC_LSFT, DE_LABK, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_DELETE, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_ALGR, KC_RGUI, KC_APP, KC_RCTL), diff --git a/keyboards/gh60/satan/keymaps/dende_iso/rules.mk b/keyboards/gh60/satan/keymaps/dende_iso/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/gh60/satan/keymaps/dende_iso/rules.mk +++ b/keyboards/gh60/satan/keymaps/dende_iso/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/gh60/satan/keymaps/denolfe/keymap.c b/keyboards/gh60/satan/keymaps/denolfe/keymap.c index a70c409fe..612c5075e 100644 --- a/keyboards/gh60/satan/keymaps/denolfe/keymap.c +++ b/keyboards/gh60/satan/keymaps/denolfe/keymap.c @@ -5,9 +5,6 @@ #include "rgblight.h" #endif -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -31,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_BL] = LAYOUT_60_ansi( - F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_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, \ MO(_FL), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ @@ -55,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_INC, BL_TOGG, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, F(1), F(2), F(3), F(4), F(5), F(6), F(7), F(8), KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), #else 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, \ @@ -72,100 +69,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, LSFT(KC_HOME), LCTL(LSFT(KC_LEFT)), LCTL(LSFT(KC_END)), LCTL(LSFT(KC_RIGHT)), KC_TRNS, RESET, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; - -enum function_id { - SHIFT_ESC, - #ifdef RGBLIGHT_ENABLE - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL - #endif -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), - #ifdef RGBLIGHT_ENABLE - [1] = ACTION_FUNCTION(RGBLED_TOGGLE), - [2] = ACTION_FUNCTION(RGBLED_STEP_MODE), - [3] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [4] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [5] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [6] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [7] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [8] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), - #endif -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - //led operations - #ifdef RGBLIGHT_ENABLE - case RGBLED_TOGGLE: - if (record->event.pressed) { - rgblight_toggle(); - } - break; - case RGBLED_INCREASE_HUE: - if (record->event.pressed) { - rgblight_increase_hue(); - } - break; - case RGBLED_DECREASE_HUE: - if (record->event.pressed) { - rgblight_decrease_hue(); - } - break; - case RGBLED_INCREASE_SAT: - if (record->event.pressed) { - rgblight_increase_sat(); - } - break; - case RGBLED_DECREASE_SAT: - if (record->event.pressed) { - rgblight_decrease_sat(); - } - break; - case RGBLED_INCREASE_VAL: - if (record->event.pressed) { - rgblight_increase_val(); - } - break; - case RGBLED_DECREASE_VAL: - if (record->event.pressed) { - rgblight_decrease_val(); - } - break; - case RGBLED_STEP_MODE: - if (record->event.pressed) { - rgblight_step(); - } - break; - #endif - } -} diff --git a/keyboards/gh60/satan/keymaps/denolfe/rules.mk b/keyboards/gh60/satan/keymaps/denolfe/rules.mk index 4e002fc0f..e10bd7a09 100644 --- a/keyboards/gh60/satan/keymaps/denolfe/rules.mk +++ b/keyboards/gh60/satan/keymaps/denolfe/rules.mk @@ -2,7 +2,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/gh60/satan/keymaps/dkrieger/rules.mk b/keyboards/gh60/satan/keymaps/dkrieger/rules.mk index d91b0edbf..a0c892505 100644 --- a/keyboards/gh60/satan/keymaps/dkrieger/rules.mk +++ b/keyboards/gh60/satan/keymaps/dkrieger/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/gh60/satan/keymaps/fakb/rules.mk b/keyboards/gh60/satan/keymaps/fakb/rules.mk index a0d244799..c29a61a77 100644 --- a/keyboards/gh60/satan/keymaps/fakb/rules.mk +++ b/keyboards/gh60/satan/keymaps/fakb/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/gh60/satan/keymaps/gipsy-king/rules.mk b/keyboards/gh60/satan/keymaps/gipsy-king/rules.mk index 12ab55fae..935d3544a 100644 --- a/keyboards/gh60/satan/keymaps/gipsy-king/rules.mk +++ b/keyboards/gh60/satan/keymaps/gipsy-king/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite EXTRAKEY_ENABLE = no CONSOLE_ENABLE = no COMMAND_ENABLE = no diff --git a/keyboards/gh60/satan/keymaps/isoHHKB/keymap.c b/keyboards/gh60/satan/keymaps/isoHHKB/keymap.c index 46d66e5db..d6647cbb3 100644 --- a/keyboards/gh60/satan/keymaps/isoHHKB/keymap.c +++ b/keyboards/gh60/satan/keymaps/isoHHKB/keymap.c @@ -1,8 +1,5 @@ #include QMK_KEYBOARD_H -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -31,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ [_BL] = LAYOUT_60_iso_split_rshift( \ - F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_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_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENYE, KC_SCLN, KC_QUOT, KC_ENT, OSM(MOD_LSFT), _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), MO(_FL), @@ -61,40 +58,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch(keycode) { diff --git a/keyboards/gh60/satan/keymaps/isoHHKB/rules.mk b/keyboards/gh60/satan/keymaps/isoHHKB/rules.mk index 71b35a819..265c95076 100644 --- a/keyboards/gh60/satan/keymaps/isoHHKB/rules.mk +++ b/keyboards/gh60/satan/keymaps/isoHHKB/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk b/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk index 071edf30e..f945cdf6e 100644 --- a/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk +++ b/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/gh60/satan/keymaps/lepa/rules.mk b/keyboards/gh60/satan/keymaps/lepa/rules.mk index 74a42b647..0eceeb297 100644 --- a/keyboards/gh60/satan/keymaps/lepa/rules.mk +++ b/keyboards/gh60/satan/keymaps/lepa/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/gh60/satan/keymaps/midi/rules.mk b/keyboards/gh60/satan/keymaps/midi/rules.mk index 5977347a1..2df79c4ed 100644 --- a/keyboards/gh60/satan/keymaps/midi/rules.mk +++ b/keyboards/gh60/satan/keymaps/midi/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gh60/satan/keymaps/olligranlund_iso/rules.mk b/keyboards/gh60/satan/keymaps/olligranlund_iso/rules.mk index 4175ab137..b380a2710 100644 --- a/keyboards/gh60/satan/keymaps/olligranlund_iso/rules.mk +++ b/keyboards/gh60/satan/keymaps/olligranlund_iso/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/gh60/satan/keymaps/sethbc/keymap.c b/keyboards/gh60/satan/keymaps/sethbc/keymap.c index 2a25b2b6b..63d65ca23 100644 --- a/keyboards/gh60/satan/keymaps/sethbc/keymap.c +++ b/keyboards/gh60/satan/keymaps/sethbc/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H - -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -26,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_BL] = LAYOUT_60_ansi_split_bs_rshift( - F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), \ @@ -49,37 +45,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/gh60/satan/keymaps/sethbc/rules.mk b/keyboards/gh60/satan/keymaps/sethbc/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/gh60/satan/keymaps/sethbc/rules.mk +++ b/keyboards/gh60/satan/keymaps/sethbc/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/gh60/satan/keymaps/smt/rules.mk b/keyboards/gh60/satan/keymaps/smt/rules.mk index 3fe140adc..edf8c5187 100644 --- a/keyboards/gh60/satan/keymaps/smt/rules.mk +++ b/keyboards/gh60/satan/keymaps/smt/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/gh60/satan/keymaps/stanleylai/keymap.c b/keyboards/gh60/satan/keymaps/stanleylai/keymap.c index 633719a88..e3cbae285 100644 --- a/keyboards/gh60/satan/keymaps/stanleylai/keymap.c +++ b/keyboards/gh60/satan/keymaps/stanleylai/keymap.c @@ -1,9 +1,5 @@ #include QMK_KEYBOARD_H - -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -19,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Base Default Layer // Mac Modifier Layout. Use BootMagic to toggle GUI and ALT positions. [_BL] = LAYOUT_60_ansi_split_bs_rshift( - F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXXX, \ + 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, XXXXXXX, \ KC_TAB, KC_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, \ LT(_FL, 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_UP, MO(_FL), \ @@ -52,37 +48,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/gh60/satan/keymaps/unxmaal/keymap.c b/keyboards/gh60/satan/keymaps/unxmaal/keymap.c index f311ebeeb..8d9b1dc45 100644 --- a/keyboards/gh60/satan/keymaps/unxmaal/keymap.c +++ b/keyboards/gh60/satan/keymaps/unxmaal/keymap.c @@ -1,10 +1,5 @@ #include QMK_KEYBOARD_H - - -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them @@ -87,37 +82,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif ), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/gh60/satan/keymaps/unxmaal/rules.mk b/keyboards/gh60/satan/keymaps/unxmaal/rules.mk index e72478251..91ba6cd9e 100644 --- a/keyboards/gh60/satan/keymaps/unxmaal/rules.mk +++ b/keyboards/gh60/satan/keymaps/unxmaal/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/gh60/satan/rules.mk b/keyboards/gh60/satan/rules.mk index 204509ebc..589a3af81 100644 --- a/keyboards/gh60/satan/rules.mk +++ b/keyboards/gh60/satan/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/gh60/v1p3/rules.mk b/keyboards/gh60/v1p3/rules.mk index c2d48dc37..3be8cb373 100644 --- a/keyboards/gh60/v1p3/rules.mk +++ b/keyboards/gh60/v1p3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gh80_3000/rules.mk b/keyboards/gh80_3000/rules.mk index d6cb5fcfa..d5c67c72c 100644 --- a/keyboards/gh80_3000/rules.mk +++ b/keyboards/gh80_3000/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ghs/rar/config.h b/keyboards/ghs/rar/config.h index 422b8a2e1..164b29068 100644 --- a/keyboards/ghs/rar/config.h +++ b/keyboards/ghs/rar/config.h @@ -167,26 +167,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ghs/rar/rules.mk b/keyboards/ghs/rar/rules.mk index 89509df45..5910558a3 100644 --- a/keyboards/ghs/rar/rules.mk +++ b/keyboards/ghs/rar/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/gingham/config.h b/keyboards/gingham/config.h index 73f5ecfd9..009e23bec 100644 --- a/keyboards/gingham/config.h +++ b/keyboards/gingham/config.h @@ -189,23 +189,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/gingham/rules.mk b/keyboards/gingham/rules.mk index 3cebbe83a..10230bd46 100644 --- a/keyboards/gingham/rules.mk +++ b/keyboards/gingham/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/gkeyboard/gkb_m16/rules.mk b/keyboards/gkeyboard/gkb_m16/rules.mk index f49426d51..6c4393757 100644 --- a/keyboards/gkeyboard/gkb_m16/rules.mk +++ b/keyboards/gkeyboard/gkb_m16/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gmmk/pro/ansi/ansi.c b/keyboards/gmmk/pro/ansi/ansi.c new file mode 100644 index 000000000..1df3319fd --- /dev/null +++ b/keyboards/gmmk/pro/ansi/ansi.c @@ -0,0 +1,241 @@ +/* Copyright 2021 Gigahawk + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "ansi.h" + +#ifdef RGB_MATRIX_ENABLE +// clang-format off +led_config_t g_led_config = {{ + { 4, NO_LED, NO_LED, 95, 65, 79, 5, 28 }, + { 8, 2, 9, 0, 10, 75, 1, 7 }, + { 14, 3, 15, NO_LED, 16, 86, 6, 13 }, + { 20, 18, 21, 23, 22, 94, 12, 19 }, + { 25, 30, 26, 31, 27, 32, 29, 24 }, + { 41, 36, 42, 37, 43, 38, 35, 40 }, + { 46, 89, 47, 34, 48, 72, 78, 45 }, + { 52, 39, 53, 97, 54, 82, 44, 51 }, + { 58, 63, 59, 64, NO_LED, 60, 62, 57 }, + { 11, 90, 55, 17, 33, 49, NO_LED, 69 }, + { NO_LED, 85, 93, 61, 96, 66, 50, 56 } +}, { + {0, 0}, // 0, ESC, k13 + {0, 15}, // 1, ~, k16 + {4, 26}, // 2, Tab, k11 + {5, 38}, // 3, Caps, k21 + {9, 49}, // 4, Sh_L, k00 + {2, 61}, // 5, Ct_L, k06 + {18, 0}, // 6, F1, k26 + {14, 15}, // 7, 1, k17 + {22, 26}, // 8, Q, k10 + {25, 38}, // 9, A, k12 + {33, 49}, // 10, Z, k14 + {20, 61}, // 11, Win_L, k90 + {33, 0}, // 12, F2, k36 + {29, 15}, // 13, 2, k27 + {36, 26}, // 14, W, k20 + {40, 38}, // 15, S, k22 + {47, 49}, // 16, X, k24 + {38, 61}, // 17, Alt_L, k93 + {47, 0}, // 18, F3, k31 + {43, 15}, // 19, 3, k37 + {51, 26}, // 20, E, k30 + {54, 38}, // 21, D, k32 + {61, 49}, // 22, C, k34 + {61, 0}, // 23, F4, k33 + {58, 15}, // 24, 4, k47 + {65, 26}, // 25, R, k40 + {69, 38}, // 26, F, k42 + {76, 49}, // 27, V, k44 + {79, 0}, // 28, F5, k07 + {72, 15}, // 29, 5, k46 + {79, 26}, // 30, T, k41 + {83, 38}, // 31, G, k43 + {90, 49}, // 32, B, k45 + {92, 61}, // 33, SPACE, k94 + {94, 0}, // 34, F6, k63 + {87, 15}, // 35, 6, k56 + {94, 26}, // 36, Y, k51 + {98, 38}, // 37, H, k53 + {105, 49}, // 38, N, k55 + {108, 0}, // 39, F7, k71 + {101, 15}, // 40, 7, k57 + {108, 26}, // 41, U, k50 + {112, 38}, // 42, J, k52 + {119, 49}, // 43, M, k54 + {123, 0}, // 44, F8, k76 + {116, 15}, // 45, 8, k67 + {123, 26}, // 46, I, k60 + {126, 38}, // 47, K, k62 + {134, 49}, // 48, ,, k64 + {145, 61}, // 49, Alt_R, k95 + {141, 0}, // 50, F9, ka6 + {130, 15}, // 51, 9, k77 + {137, 26}, // 52, O, k70 + {141, 38}, // 53, L, k72 + {148, 49}, // 54, ., k74 + {159, 61}, // 55, FN, k92 + {155, 0}, // 56, F10, ka7 + {145, 15}, // 57, 0, k87 + {152, 26}, // 58, P, k80 + {155, 38}, // 59, ;, k82 + {163, 49}, // 60, ?, k85 + {170, 0}, // 61, F11, ka3 + {159, 15}, // 62, -, k86 + {166, 26}, // 63, [, k81 + {170, 38}, // 64, ", k83 + {173, 61}, // 65, Ct_R, k04 + {184, 0}, // 66, F12, ka5 + {0, 8}, // 67, LED, l01 + {224, 8}, // 68, LED, l11 + {202, 0}, // 69, Prt, k97 + {0, 15}, // 70, LED, l02 + {224, 15}, // 71, LED, l12 + {224, 15}, // 72, Del, k65 + {0, 21}, // 73, LED, l03 + {224, 21}, // 74, LED, l13 + {224, 26}, // 75, PgUp, k15 + {0, 28}, // 76, LED, l04 + {224, 28}, // 77, LED, l14 + {173, 15}, // 78, =, k66 + {220, 64}, // 79, Right, k05 + {0, 35}, // 80, LED, l05 + {224, 35}, // 81, LED, l15 + {224, 49}, // 82, End, k75 + {0, 42}, // 83, LED, l06 + {224, 42}, // 84, LED, l16 + {195, 15}, // 85, BSpc, ka1 + {224, 38}, // 86, PgDn, k25 + {0, 48}, // 87, LED, l07 + {224, 48}, // 88, LED, l17 + {181, 26}, // 89, ], k61 + {182, 49}, // 90, Sh_R, k91 + {0, 55}, // 91, LED, l08 + {224, 55}, // 92, LED, l18 + {199, 26}, // 93, \, ka2 + {206, 52}, // 94, Up, k35 + {191, 64}, // 95, Left, k03 + {193, 38}, // 96, Enter, ka4 + {206, 64} // 97, Down, k73 +}, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 2, 2, 4, 2, 2, + 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4 +}}; + +const aw_led g_aw_leds[DRIVER_LED_TOTAL] = { + {0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13 + {0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16 + {0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11 + {0, CS10_SW1, CS11_SW1, CS12_SW1}, // 3, Caps, k21 + {0, CS13_SW1, CS14_SW1, CS15_SW1}, // 4, Sh_L, k00 + {0, CS16_SW1, CS17_SW1, CS18_SW1}, // 5, Ct_L, k06 + {0, CS1_SW2, CS2_SW2, CS3_SW2}, // 6, F1, k26 + {0, CS4_SW2, CS5_SW2, CS6_SW2}, // 7, 1, k17 + {0, CS7_SW2, CS8_SW2, CS9_SW2}, // 8, Q, k10 + {0, CS10_SW2, CS11_SW2, CS12_SW2}, // 9, A, k12 + {0, CS13_SW2, CS14_SW2, CS15_SW2}, // 10, Z, k14 + {0, CS16_SW2, CS17_SW2, CS18_SW2}, // 11, Win_L, k90 + {0, CS1_SW3, CS2_SW3, CS3_SW3}, // 12, F2, k36 + {0, CS4_SW3, CS5_SW3, CS6_SW3}, // 13, 2, k27 + {0, CS7_SW3, CS8_SW3, CS9_SW3}, // 14, W, k20 + {0, CS10_SW3, CS11_SW3, CS12_SW3}, // 15, S, k22 + {0, CS13_SW3, CS14_SW3, CS15_SW3}, // 16, X, k24 + {0, CS16_SW3, CS17_SW3, CS18_SW3}, // 17, Alt_L, k93 + {0, CS1_SW4, CS2_SW4, CS3_SW4}, // 18, F3, k31 + {0, CS4_SW4, CS5_SW4, CS6_SW4}, // 19, 3, k37 + {0, CS7_SW4, CS8_SW4, CS9_SW4}, // 20, E, k30 + {0, CS10_SW4, CS11_SW4, CS12_SW4}, // 21, D, k32 + {0, CS13_SW4, CS14_SW4, CS15_SW4}, // 22, C, k34 + {0, CS1_SW5, CS2_SW5, CS3_SW5}, // 23, F4, k33 + {0, CS4_SW5, CS5_SW5, CS6_SW5}, // 24, 4, k47 + {0, CS7_SW5, CS8_SW5, CS9_SW5}, // 25, R, k40 + {0, CS10_SW5, CS11_SW5, CS12_SW5}, // 26, F, k42 + {0, CS13_SW5, CS14_SW5, CS15_SW5}, // 27, V, k44 + {0, CS1_SW6, CS2_SW6, CS3_SW6}, // 28, F5, k07 + {0, CS4_SW6, CS5_SW6, CS6_SW6}, // 29, 5, k46 + {0, CS7_SW6, CS8_SW6, CS9_SW6}, // 30, T, k41 + {0, CS10_SW6, CS11_SW6, CS12_SW6}, // 31, G, k43 + {0, CS13_SW6, CS14_SW6, CS15_SW6}, // 32, B, k45 + {0, CS16_SW6, CS17_SW6, CS18_SW6}, // 33, SPACE, k94 + {0, CS1_SW7, CS2_SW7, CS3_SW7}, // 34, F6, k63 + {0, CS4_SW7, CS5_SW7, CS6_SW7}, // 35, 6, k56 + {0, CS7_SW7, CS8_SW7, CS9_SW7}, // 36, Y, k51 + {0, CS10_SW7, CS11_SW7, CS12_SW7}, // 37, H, k53 + {0, CS13_SW7, CS14_SW7, CS15_SW7}, // 38, N, k55 + {0, CS1_SW8, CS2_SW8, CS3_SW8}, // 39, F7, k71 + {0, CS4_SW8, CS5_SW8, CS6_SW8}, // 40, 7, k57 + {0, CS7_SW8, CS8_SW8, CS9_SW8}, // 41, U, k50 + {0, CS10_SW8, CS11_SW8, CS12_SW8}, // 42, J, k52 + {0, CS13_SW8, CS14_SW8, CS15_SW8}, // 43, M, k54 + {0, CS1_SW9, CS2_SW9, CS3_SW9}, // 44, F8, k76 + {0, CS4_SW9, CS5_SW9, CS6_SW9}, // 45, 8, k67 + {0, CS7_SW9, CS8_SW9, CS9_SW9}, // 46, I, k60 + {0, CS10_SW9, CS11_SW9, CS12_SW9}, // 47, K, k62 + {0, CS13_SW9, CS14_SW9, CS15_SW9}, // 48, ,, k64 + {0, CS16_SW9, CS17_SW9, CS18_SW9}, // 49, Alt_R, k95 + {0, CS1_SW10, CS2_SW10, CS3_SW10}, // 50, F9, ka6 + {0, CS4_SW10, CS5_SW10, CS6_SW10}, // 51, 9, k77 + {0, CS7_SW10, CS8_SW10, CS9_SW10}, // 52, O, k70 + {0, CS10_SW10, CS11_SW10, CS12_SW10}, // 53, L, k72 + {0, CS13_SW10, CS14_SW10, CS15_SW10}, // 54, ., k74 + {0, CS16_SW10, CS17_SW10, CS18_SW10}, // 55, FN, k92 + {0, CS1_SW11, CS2_SW11, CS3_SW11}, // 56, F10, ka7 + {0, CS4_SW11, CS5_SW11, CS6_SW11}, // 57, 0, k87 + {0, CS7_SW11, CS8_SW11, CS9_SW11}, // 58, P, k80 + {0, CS10_SW11, CS11_SW11, CS12_SW11}, // 59, ;, k82 + {0, CS13_SW11, CS14_SW11, CS15_SW11}, // 60, ?, k85 + {0, CS1_SW12, CS2_SW12, CS3_SW12}, // 61, F11, ka3 + {0, CS4_SW12, CS5_SW12, CS6_SW12}, // 62, -, k86 + {0, CS7_SW12, CS8_SW12, CS9_SW12}, // 63, [, k81 + {0, CS10_SW12, CS11_SW12, CS12_SW12}, // 64, ", k83 + {0, CS16_SW12, CS17_SW12, CS18_SW12}, // 65, Ct_R, k04 + + {1, CS1_SW1, CS2_SW1, CS3_SW1}, // 66, F12, ka5 + {1, CS13_SW1, CS14_SW1, CS15_SW1}, // 67, LED, l01 + {1, CS16_SW1, CS17_SW1, CS18_SW1}, // 68, LED, l11 + {1, CS4_SW2, CS5_SW2, CS6_SW2}, // 69, Prt, k97 + {1, CS13_SW2, CS14_SW2, CS15_SW2}, // 70, LED, l02 + {1, CS16_SW2, CS17_SW2, CS18_SW2}, // 71, LED, l12 + {1, CS4_SW3, CS5_SW3, CS6_SW3}, // 72, Del, k65 + {1, CS13_SW3, CS14_SW3, CS15_SW3}, // 73, LED, l03 + {1, CS16_SW3, CS17_SW3, CS18_SW3}, // 74, LED, l13 + {1, CS4_SW4, CS5_SW4, CS6_SW4}, // 75, PgUp, k15 + {1, CS13_SW4, CS14_SW4, CS15_SW4}, // 76, LED, l04 + {1, CS16_SW4, CS17_SW4, CS18_SW4}, // 77, LED, l14 + {1, CS1_SW5, CS2_SW5, CS3_SW5}, // 78, =, k66 + {1, CS10_SW5, CS11_SW5, CS12_SW5}, // 79, Right, k05 + {1, CS13_SW5, CS14_SW5, CS15_SW5}, // 80, LED, l05 + {1, CS16_SW5, CS17_SW5, CS18_SW5}, // 81, LED, l15 + {1, CS4_SW6, CS5_SW6, CS6_SW6}, // 82, End, k75 + {1, CS13_SW6, CS14_SW6, CS15_SW6}, // 83, LED, l06 + {1, CS16_SW6, CS17_SW6, CS18_SW6}, // 84, LED, l16 + {1, CS1_SW7, CS2_SW7, CS3_SW7}, // 85, BSpc, ka1 + {1, CS4_SW7, CS5_SW7, CS6_SW7}, // 86, PgDn, k25 + {1, CS13_SW7, CS14_SW7, CS15_SW7}, // 87, LED, l07 + {1, CS16_SW7, CS17_SW7, CS18_SW7}, // 88, LED, l17 + {1, CS1_SW8, CS2_SW8, CS3_SW8}, // 89, ], k61 + {1, CS4_SW8, CS5_SW8, CS6_SW8}, // 90, Sh_R, k91 + {1, CS13_SW8, CS14_SW8, CS15_SW8}, // 91, LED, l08 + {1, CS16_SW8, CS17_SW8, CS18_SW8}, // 92, LED, l18 + {1, CS1_SW9, CS2_SW9, CS3_SW9}, // 93, \, ka2 + {1, CS4_SW9, CS5_SW9, CS6_SW9}, // 94, Up, k35 + {1, CS4_SW10, CS5_SW10, CS6_SW10}, // 95, Left, k03 + {1, CS1_SW11, CS2_SW11, CS3_SW11}, // 96, Enter, ka4 + {1, CS4_SW11, CS5_SW11, CS6_SW11}, // 97, Down, k73 +}; +// clang-format on +#endif diff --git a/keyboards/gmmk/pro/ansi/ansi.h b/keyboards/gmmk/pro/ansi/ansi.h new file mode 100644 index 000000000..ab08d6659 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/ansi.h @@ -0,0 +1,52 @@ +/* Copyright 2021 Gigahawk + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "pro.h" + +#define ___ KC_NO + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ` 1 2 3 4 5 6 7 8 9 0 - = BSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; ' Enter PgDn +// Sh_L Z X C V B N M , . / Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + +// clang-format off +#define LAYOUT( \ + k13, k26, k36, k31, k33, k07, k63, k71, k76, ka6, ka7, ka3, ka5, k97, k01, \ + k16, k17, k27, k37, k47, k46, k56, k57, k67, k77, k87, k86, k66, ka1, k65, \ + k11, k10, k20, k30, k40, k41, k51, k50, k60, k70, k80, k81, k61, ka2, k15, \ + k21, k12, k22, k32, k42, k43, k53, k52, k62, k72, k82, k83, ka4, k25, \ + k00, k14, k24, k34, k44, k45, k55, k54, k64, k74, k85, k91, k35, k75, \ + k06, k90, k93, k94, k95, k92, k04, k03, k73, k05 \ +) \ +{ \ + { k00, k01, ___, k03, k04, k05, k06, k07}, \ + { k10, k11, k12, k13, k14, k15, k16, k17}, \ + { k20, k21, k22, ___, k24, k25, k26, k27}, \ + { k30, k31, k32, k33, k34, k35, k36, k37}, \ + { k40, k41, k42, k43, k44, k45, k46, k47}, \ + { k50, k51, k52, k53, k54, k55, k56, k57}, \ + { k60, k61, k62, k63, k64, k65, k66, k67}, \ + { k70, k71, k72, k73, k74, k75, k76, k77}, \ + { k80, k81, k82, k83, ___, k85, k86, k87}, \ + { k90, k91, k92, k93, k94, k95, ___, k97}, \ + { ___, ka1, ka2, ka3, ka4, ka5, ka6, ka7} \ +} +// clang-format on diff --git a/keyboards/gmmk/pro/ansi/config.h b/keyboards/gmmk/pro/ansi/config.h new file mode 100644 index 000000000..7c68375b2 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/config.h @@ -0,0 +1,23 @@ +/* Copyright 2021 Gigahawk + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +#define DRIVER_1_LED_TOTAL 66 +#define DRIVER_2_LED_TOTAL 32 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/gmmk/pro/ansi/info.json b/keyboards/gmmk/pro/ansi/info.json new file mode 100644 index 000000000..d3b326a7b --- /dev/null +++ b/keyboards/gmmk/pro/ansi/info.json @@ -0,0 +1,111 @@ +{ + "keyboard_name": "GMMK Pro (ANSI)", + "url": "https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black-reservation", + "maintainer": "GloriousThrall", + "width": 16.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0}, + + {"x":5.5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + + {"x":9.75, "y":0}, + {"x":10.75, "y":0}, + {"x":11.75, "y":0}, + {"x":12.75, "y":0}, + + {"x":14, "y":0}, + {"x":15.5, "y":0}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4, "y":1.25}, + {"x":5, "y":1.25}, + {"x":6, "y":1.25}, + {"x":7, "y":1.25}, + {"x":8, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.25}, + {"x":11, "y":1.25}, + {"x":12, "y":1.25}, + {"x":13, "y":1.25, "w":2}, + + {"x":15.5, "y":1.25}, + + {"x":0, "y":2.25, "w":1.5}, + {"x":1.5, "y":2.25}, + {"x":2.5, "y":2.25}, + {"x":3.5, "y":2.25}, + {"x":4.5, "y":2.25}, + {"x":5.5, "y":2.25}, + {"x":6.5, "y":2.25}, + {"x":7.5, "y":2.25}, + {"x":8.5, "y":2.25}, + {"x":9.5, "y":2.25}, + {"x":10.5, "y":2.25}, + {"x":11.5, "y":2.25}, + {"x":12.5, "y":2.25}, + {"x":13.5, "y":2.25, "w":1.5}, + + {"x":15.5, "y":2.25}, + + {"x":0, "y":3.25, "w":1.75}, + {"x":1.75, "y":3.25}, + {"x":2.75, "y":3.25}, + {"x":3.75, "y":3.25}, + {"x":4.75, "y":3.25}, + {"x":5.75, "y":3.25}, + {"x":6.75, "y":3.25}, + {"x":7.75, "y":3.25}, + {"x":8.75, "y":3.25}, + {"x":9.75, "y":3.25}, + {"x":10.75, "y":3.25}, + {"x":11.75, "y":3.25}, + {"x":12.75, "y":3.25, "w":2.25}, + + {"x":15.5, "y":3.25}, + + {"x":0, "y":4.25, "w":2.25}, + {"x":2.25, "y":4.25}, + {"x":3.25, "y":4.25}, + {"x":4.25, "y":4.25}, + {"x":5.25, "y":4.25}, + {"x":6.25, "y":4.25}, + {"x":7.25, "y":4.25}, + {"x":8.25, "y":4.25}, + {"x":9.25, "y":4.25}, + {"x":10.25, "y":4.25}, + {"x":11.25, "y":4.25}, + {"x":12.25, "y":4.25, "w":1.75}, + + {"x":14.25, "y":4.5}, + + {"x":15.5, "y":4.25}, + + {"x":0, "y":5.25, "w":1.25}, + {"x":1.25, "y":5.25, "w":1.25}, + {"x":2.5, "y":5.25, "w":1.25}, + {"x":3.75, "y":5.25, "w":6.25}, + {"x":10, "y":5.25}, + {"x":11, "y":5.25}, + {"x":12, "y":5.25}, + + {"x":13.25, "y":5.5}, + {"x":14.25, "y":5.5}, + {"x":15.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/gmmk/pro/ansi/keymaps/alexmarmon/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/alexmarmon/keymap.c new file mode 100644 index 000000000..99504de95 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/alexmarmon/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2021 Glorious, LLC + Copyright 2021 alexmarmon + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Alt_L Win_L SPACE Ct_R Alt_R FN Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + [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_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MODE_FORWARD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MODE_REVERSE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, _______, KC_MEDIA_NEXT_TRACK + ), + + +}; + + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} diff --git a/keyboards/gmmk/pro/ansi/keymaps/alexmarmon/readme.md b/keyboards/gmmk/pro/ansi/keymaps/alexmarmon/readme.md new file mode 100644 index 000000000..36ad42b1a --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/alexmarmon/readme.md @@ -0,0 +1,7 @@ +![Layout Image](https://i.imgur.com/MizMvsI.jpg) + +# Simple MacOS like keymap with RGB + +* Working basic RGB thanks to https://github.com/qmk/qmk_firmware/pull/13430 +* Restore working rotary knob volume control +* Add media_previous and media_next to FN+left and FN+right \ No newline at end of file diff --git a/keyboards/gmmk/pro/ansi/keymaps/andrebrait/config.h b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/config.h new file mode 100644 index 000000000..1438d317f --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/config.h @@ -0,0 +1,22 @@ +/* Copyright 2021 Andre Brait + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 RGB_MATRIX_ENABLE + #define RGB_DISABLE_TIMEOUT 1200000 // 20 minutes (20 * 60 * 1000ms) + #define RGB_DISABLE_WHEN_USB_SUSPENDED +#endif diff --git a/keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c new file mode 100644 index 000000000..b80164043 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/keymap.c @@ -0,0 +1,287 @@ +/* Copyright 2021 Glorious, LLC + Copyright 2021 Andre Brait + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 RGB_MATRIX_ENABLE + #ifndef RGB_CONFIRMATION_BLINKING_TIME + #define RGB_CONFIRMATION_BLINKING_TIME 2000 // 2 seconds + #endif +#endif // RGB_MATRIX_ENABLE + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Play/Pause) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + // + // This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO). + // Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience. + // Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts. + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_INS, _______, + _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_HUI, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI + ), + + +}; +// clang-format on + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} +#endif // ENCODER_ENABLE + +#ifdef RGB_MATRIX_ENABLE + +/* Renaming those to make the purpose on this keymap clearer */ +#define LED_FLAG_CAPS LED_FLAG_NONE +#define LED_FLAG_EFFECTS LED_FLAG_INDICATOR + +static void set_rgb_caps_leds(void); + +#if RGB_CONFIRMATION_BLINKING_TIME > 0 +static uint16_t effect_started_time = 0; +static uint8_t r_effect = 0x0, g_effect = 0x0, b_effect = 0x0; +static void start_effects(void); + +/* The higher this is, the slower the blinking will be */ +#ifndef TIME_SELECTED_BIT + #define TIME_SELECTED_BIT 8 +#endif +#if TIME_SELECTED_BIT < 0 || TIME_SELECTED_BIT >= 16 + #error "TIME_SELECTED_BIT must be a positive integer smaller than 16" +#endif +#define effect_red() r_effect = 0xFF, g_effect = 0x0, b_effect = 0x0 +#define effect_green() r_effect = 0x0, g_effect = 0xFF, b_effect = 0x0 +#endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { + if (!rgb_matrix_is_enabled()) { + /* Turn ON the RGB Matrix for CAPS LOCK */ + rgb_matrix_set_flags(LED_FLAG_CAPS); + rgb_matrix_enable(); + } + } else if (rgb_matrix_get_flags() == LED_FLAG_CAPS) { + /* RGB Matrix was only ON because of CAPS LOCK. Turn it OFF. */ + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_disable(); + } + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + #ifdef NKRO_ENABLE + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + case NK_TOGG: + if (record->event.pressed) { + if (keymap_config.nkro) { + /* Turning NKRO OFF */ + effect_red(); + } else { + /* Turning NKRO ON */ + effect_green(); + } + start_effects(); + } + break; + case NK_ON: + if (record->event.pressed) { + if (!keymap_config.nkro) { + /* Turning NKRO ON */ + effect_green(); + start_effects(); + } + } + break; + case NK_OFF: + if (record->event.pressed) { + if (keymap_config.nkro) { + /* Turning NKRO OFF */ + effect_red(); + start_effects(); + } + } + break; + #endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + #endif // NKRO_ENABLE + case RGB_MOD: + case RGB_RMOD: + case RGB_HUI: + case RGB_HUD: + case RGB_SAI: + case RGB_SAD: + case RGB_VAI: + case RGB_VAD: + case RGB_SPI: + case RGB_SPD: + if (record->event.pressed) { + if (rgb_matrix_get_flags() != LED_FLAG_ALL) { + /* Ignore changes to RGB settings while only it's supposed to be OFF */ + return false; + } + } + break; + case RGB_TOG: + if (record->event.pressed) { + if (rgb_matrix_is_enabled()) { + switch (rgb_matrix_get_flags()) { + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + case LED_FLAG_EFFECTS: + #endif + case LED_FLAG_CAPS: + /* Turned ON because of EFFECTS or CAPS, is actually OFF */ + /* Change to LED_FLAG_ALL to signal it's really ON */ + rgb_matrix_set_flags(LED_FLAG_ALL); + /* Will be re-enabled by the processing of the toggle */ + rgb_matrix_disable_noeeprom(); + break; + case LED_FLAG_ALL: + /* Is actually ON */ + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + if (effect_started_time > 0) { + /* Signal EFFECTS */ + rgb_matrix_set_flags(LED_FLAG_EFFECTS); + /* Will be re-enabled by the processing of the toggle */ + rgb_matrix_disable_noeeprom(); + } else + #endif + if (host_keyboard_led_state().caps_lock) { + /* Signal CAPS */ + rgb_matrix_set_flags(LED_FLAG_CAPS); + /* Will be re-enabled by the processing of the toggle */ + rgb_matrix_disable_noeeprom(); + } + break; + } + } + } + break; + } + return true; +} + + +void rgb_matrix_indicators_user() { + #if RGB_CONFIRMATION_BLINKING_TIME > 0 + if (effect_started_time > 0) { + /* Render blinking EFFECTS */ + uint16_t deltaTime = sync_timer_elapsed(effect_started_time); + if (deltaTime <= RGB_CONFIRMATION_BLINKING_TIME) { + uint8_t led_state = ((~deltaTime) >> TIME_SELECTED_BIT) & 0x01; + uint8_t val_r = led_state * r_effect; + uint8_t val_g = led_state * g_effect; + uint8_t val_b = led_state * b_effect; + rgb_matrix_set_color_all(val_r, val_g, val_b); + if (host_keyboard_led_state().caps_lock) { + set_rgb_caps_leds(); + } + return; + } else { + /* EFFECTS duration is finished */ + effect_started_time = 0; + if (rgb_matrix_get_flags() == LED_FLAG_EFFECTS) { + /* It was turned ON because of EFFECTS */ + if (host_keyboard_led_state().caps_lock) { + /* CAPS is still ON. Demote to CAPS */ + rgb_matrix_set_flags(LED_FLAG_CAPS); + } else { + /* There is nothing else keeping RGB enabled. Reset flags and turn if off. */ + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_disable_noeeprom(); + } + } + } + } + #endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + if (rgb_matrix_get_flags() == LED_FLAG_CAPS) { + rgb_matrix_set_color_all(0x0, 0x0, 0x0); + } + if (host_keyboard_led_state().caps_lock) { + set_rgb_caps_leds(); + } +} + +#if RGB_CONFIRMATION_BLINKING_TIME > 0 +static void start_effects() { + effect_started_time = sync_timer_read(); + if (!rgb_matrix_is_enabled()) { + /* Turn it ON, signal the cause (EFFECTS) */ + rgb_matrix_set_flags(LED_FLAG_EFFECTS); + rgb_matrix_enable_noeeprom(); + } else if (rgb_matrix_get_flags() == LED_FLAG_CAPS) { + /* It's already ON, promote the cause from CAPS to EFFECTS */ + rgb_matrix_set_flags(LED_FLAG_EFFECTS); + } +} +#endif // RGB_CONFIRMATION_BLINKING_TIME > 0 + +static void set_rgb_caps_leds() { + rgb_matrix_set_color(67, 0xFF, 0x0, 0x0); // Left side LED 1 + rgb_matrix_set_color(68, 0xFF, 0x0, 0x0); // Right side LED 1 + rgb_matrix_set_color(70, 0xFF, 0x0, 0x0); // Left side LED 2 + rgb_matrix_set_color(71, 0xFF, 0x0, 0x0); // Right side LED 2 + rgb_matrix_set_color(73, 0xFF, 0x0, 0x0); // Left side LED 3 + rgb_matrix_set_color(74, 0xFF, 0x0, 0x0); // Right side LED 3 + rgb_matrix_set_color(76, 0xFF, 0x0, 0x0); // Left side LED 4 + rgb_matrix_set_color(77, 0xFF, 0x0, 0x0); // Right side LED 4 + rgb_matrix_set_color(80, 0xFF, 0x0, 0x0); // Left side LED 5 + rgb_matrix_set_color(81, 0xFF, 0x0, 0x0); // Right side LED 5 + rgb_matrix_set_color(83, 0xFF, 0x0, 0x0); // Left side LED 6 + rgb_matrix_set_color(84, 0xFF, 0x0, 0x0); // Right side LED 6 + rgb_matrix_set_color(87, 0xFF, 0x0, 0x0); // Left side LED 7 + rgb_matrix_set_color(88, 0xFF, 0x0, 0x0); // Right side LED 7 + rgb_matrix_set_color(91, 0xFF, 0x0, 0x0); // Left side LED 8 + rgb_matrix_set_color(92, 0xFF, 0x0, 0x0); // Right side LED 8 + rgb_matrix_set_color(3, 0xFF, 0x0, 0x0); // CAPS LED +} + +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/gmmk/pro/ansi/keymaps/andrebrait/readme.md b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/readme.md new file mode 100644 index 000000000..e7f9978ce --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/readme.md @@ -0,0 +1,23 @@ +# andrebrait's GMMK Pro layout + +This is pretty much the stock layout with a few things moved around. +It basically reflects my needs for both Delete and Insert being readily available for coding, as well as a full Home/PgUp/PgDwn/End column. + +The differences are as follows: + +- Short DEBOUNCE time (5 ms) +- Per-key debounce algorithm (sym_defer_pk) +- RGB turns off after 20 minutes of inactivity +- RGB turns off when USB is suspended +- Layer 0: + - Print Screen (default) -> Delete + - Delete (default) -> Home +- Layer 1 (accessed by pressing Fn): + - Fn + Delete -> Insert + - Fn + Home -> Print Screen + +This keymap also includes CAPS LOCK ON indicator.\ +All left and right side LEDs, and the Caps key LED will turn solid red while CAPS LOCK is ON. + +No other changes have been made. \ +The other keys on each layer have been kept intact. diff --git a/keyboards/gmmk/pro/ansi/keymaps/andrebrait/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/rules.mk new file mode 100644 index 000000000..650c79fbd --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/andrebrait/rules.mk @@ -0,0 +1,3 @@ +# Enable additional features. + +DEBOUNCE_TYPE = sym_defer_pk diff --git a/keyboards/gmmk/pro/ansi/keymaps/default/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/default/keymap.c new file mode 100644 index 000000000..65ccaf88f --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2021 Glorious, LLC + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + // + // This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO). + // Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience. + // Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts. + [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_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_HUI, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI + ), + + +}; +// clang-format on + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} +#endif // ENCODER_ENABLE diff --git a/keyboards/gmmk/pro/ansi/keymaps/jonavin/config.h b/keyboards/gmmk/pro/ansi/keymaps/jonavin/config.h new file mode 100644 index 000000000..e4ae4c944 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/jonavin/config.h @@ -0,0 +1,33 @@ +/* Copyright 2021 Jonavin Eng + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define TAPPING_TOGGLE 2 +// TT set to two taps + +/* Handle GRAVESC combo keys */ +#define GRAVE_ESC_ALT_OVERRIDE + //Always send Escape if Alt is pressed +#define GRAVE_ESC_CTRL_OVERRIDE + //Always send Escape if Control is pressed + +#define TAPPING_TERM 180 + +#ifdef RGB_MATRIX_ENABLE + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR + #define RGB_DISABLE_WHEN_USB_SUSPENDED +#endif diff --git a/keyboards/gmmk/pro/keymaps/jonavin/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/jonavin/keymap.c similarity index 100% rename from keyboards/gmmk/pro/keymaps/jonavin/keymap.c rename to keyboards/gmmk/pro/ansi/keymaps/jonavin/keymap.c diff --git a/keyboards/gmmk/pro/keymaps/jonavin/readme.md b/keyboards/gmmk/pro/ansi/keymaps/jonavin/readme.md similarity index 100% rename from keyboards/gmmk/pro/keymaps/jonavin/readme.md rename to keyboards/gmmk/pro/ansi/keymaps/jonavin/readme.md diff --git a/keyboards/gmmk/pro/keymaps/jonavin/rgb_matrix_map.h b/keyboards/gmmk/pro/ansi/keymaps/jonavin/rgb_matrix_map.h similarity index 100% rename from keyboards/gmmk/pro/keymaps/jonavin/rgb_matrix_map.h rename to keyboards/gmmk/pro/ansi/keymaps/jonavin/rgb_matrix_map.h diff --git a/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk new file mode 100644 index 000000000..6d3574e7f --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk @@ -0,0 +1,9 @@ +VIA_ENABLE = yes +MOUSEKEY_ENABLE = no +TAP_DANCE_ENABLE = yes +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite + +TD_LSFT_CAPSLOCK_ENABLE = yes +IDLE_TIMEOUT_ENABLE = yes +STARTUP_NUMLOCK_ON = yes +ENCODER_DEFAULTACTIONS_ENABLE = yes diff --git a/keyboards/gmmk/pro/ansi/keymaps/paddlegame/config.h b/keyboards/gmmk/pro/ansi/keymaps/paddlegame/config.h new file mode 100644 index 000000000..4f83c6af1 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/paddlegame/config.h @@ -0,0 +1,24 @@ +/* Copyright 2021 Tomas Guinan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 RGB_MATRIX_ENABLE + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +# define RGB_DISABLE_WHEN_USB_SUSPENDED +#endif + +#define FORCE_NKRO diff --git a/keyboards/gmmk/pro/ansi/keymaps/paddlegame/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/paddlegame/keymap.c new file mode 100644 index 000000000..5c702b168 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/paddlegame/keymap.c @@ -0,0 +1,471 @@ +/* Copyright 2021 Glorious, LLC + Copyright 2021 Tomas Guinan + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 "rgb_matrix_map.h" +#include "paddlegame.h" +#include + +enum custom_layers { + _BASE, + _FN1, + _MO2, + _MO3, +}; + +enum custom_keycodes { + KC_00 = SAFE_RANGE, + KC_WINLK, //Toggles Win key on and off +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_00: + if (record->event.pressed) { + // when keycode KC_00 is pressed + SEND_STRING("00"); + } else { + // when keycode KC_00 is released + } + break; + + case KC_WINLK: + if (record->event.pressed) { + if(!keymap_config.no_gui) { + process_magic(GUI_OFF, record); + } else { + process_magic(GUI_ON, record); + } + } else unregister_code16(keycode); + break; + } + return true; +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + [_BASE] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT( + KC_SLEP, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_INS, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_HUI, _______, RGB_M_P, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_MO2), RGB_SAD, RGB_SAI, RESET, RGB_M_B, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_MOD, _______, RGB_M_R, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_M_SW, + _______, KC_WINLK, _______, _______, _______, _______, _______, RGB_SPD, RGB_VAD, RGB_SPI + ), + + [_MO2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, TG(_MO2), _______, _______, _______, _______ + ), + + [_MO3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; + +#ifdef ENCODER_ENABLE // Encoder Functionality + + bool encoder_update_user(uint8_t index, bool clockwise) { + + switch(get_highest_layer(layer_state)) { + case _FN1: + if ( clockwise ) { + tap_code16(KC_PGDN); + } else { + tap_code16(KC_PGUP); + } + break; + + case _MO2: + // Game: Paddle movement + if (damage_count == 0) { + if ( clockwise ) { + if (paddle_pos_full < 15) ++paddle_pos_full; + } else { + if (paddle_pos_full > 0) --paddle_pos_full; + } + } + break; + + case _BASE: + default: + if ( clockwise ) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } + return true; + } +#endif + +#ifdef RGB_MATRIX_ENABLE + void init_ball(uint8_t i) { + i &= 1; + ball[i].on = true; + ball[i].up = false; + ball[i].y = 0; + ball[i].x = rand() % 16; + + // Set initial ball state + if (ball[i].x < 8) { + ball[i].left = false; + } else { + ball[i].x -= 4; + ball[i].left = true; + } + + // 1/4 chance of being an enemy ball after level 6 + if (level_number > 3) { + ball[i].enemy = ((rand() % 4) == 0); + } else { + ball[i].enemy = false; + } + } + + void hurt_paddle(void) { + if (paddle_lives > 0) { + --paddle_lives; + } + damage_timer = timer_read(); + damage_count = 10; + + // Reset board + init_ball(0); + ball[1].on = false; + } + + // Capslock, Scroll lock and Numlock indicator on Left side lights. + void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + switch(get_highest_layer(layer_state)) { + case _FN1: + // Light up FN layer keys + if (!fn_active) { + fn_active = true; + rgb_value.r = 0xff; + rgb_value.g = 0x00; + rgb_value.b = 0x00; + } + + if (rgb_value.r == 0xff && rgb_value.g < 0xff) { + if (rgb_value.b > 0) { --rgb_value.b; } + else { ++rgb_value.g; } + } else if (rgb_value.g == 0xff && rgb_value.b < 0xff) { + if (rgb_value.r > 0) { --rgb_value.r; } + else { ++rgb_value.b; } + } else if (rgb_value.b == 0xff && rgb_value.r < 0xff) { + if (rgb_value.g > 0) { --rgb_value.g; } + else { ++rgb_value.r; } + } + + for (uint8_t i=0; i> 1; + + if (damage_count > 0) { + // Flash paddle when receiving damage + if (timer_elapsed(damage_timer) > 500) { + --damage_count; + damage_timer = timer_read(); + } + if ((damage_count & 1) == 0) { + for (uint8_t i=0; i < 3 ; i++) { + rgb_matrix_set_color(GAME_PADDLE[paddle_pos + i], RGB_RED); + } + } + if (damage_count == 0) { + ball_timer = timer_read(); + } + + + } else if (paddle_lives == 0) { + // Game over + for (uint8_t i=0; i= 12) { + // You win + if (rgb_value.r == 0xff && rgb_value.g < 0xff) { + if (rgb_value.b > 0) { --rgb_value.b; } + else { ++rgb_value.g; } + } else if (rgb_value.g == 0xff && rgb_value.b < 0xff) { + if (rgb_value.r > 0) { --rgb_value.r; } + else { ++rgb_value.b; } + } else if (rgb_value.b == 0xff && rgb_value.r < 0xff) { + if (rgb_value.g > 0) { --rgb_value.g; } + else { ++rgb_value.r; } + } + + for (uint8_t i=0; i < 3 ; i++) { + rgb_matrix_set_color(GAME_PADDLE[paddle_pos + i], rgb_value.r, rgb_value.g, rgb_value.b); + } + rgb_matrix_set_color(GAME_SMILE1[paddle_pos], rgb_value.r, rgb_value.g, rgb_value.b); + rgb_matrix_set_color(GAME_SMILE1[paddle_pos + 3], rgb_value.r, rgb_value.g, rgb_value.b); + rgb_matrix_set_color(GAME_SMILE2[paddle_pos], rgb_value.r, rgb_value.g, rgb_value.b); + rgb_matrix_set_color(GAME_SMILE2[paddle_pos + 3], rgb_value.r, rgb_value.g, rgb_value.b); + + } else { + // normal game loop + + // Set paddle position + for (uint8_t i=0; i < 3 ; i++) { + rgb_matrix_set_color(GAME_PADDLE[paddle_pos + i], RGB_GREEN); + } + + // Ball movement logic happens at intervals + if (timer_elapsed(ball_timer) > GAME_TIMER[level_number]) { + for (int i=0; i<2; ++i) { + if (ball[i].on) { + // Ball movement + if (ball[i].up) { + if (ball[i].y > 0) { + --ball[i].y; + if (!ball[i].left) ++ball[i].x; + } else { + // Count reflections. If > 10, increase level + ++bounce_count; + if (bounce_count >= 10) { + bounce_count = 0; + ++level_number; + } + ball[i].on = false; + } + } else { + ++ball[i].y; + if (ball[i].left) --ball[i].x; + if (ball[i].y > 4) { + // Remove a life if ball isn't returned and isn't enemy + if (!ball[i].enemy) { + hurt_paddle(); + i = 2; + } else { + ball[i].on = false; + } + } + } + } + } + if (ball[0].y == 4 && !ball[1].on) { + init_ball(1); + } + if (ball[1].y == 4 && !ball[0].on) { + init_ball(0); + } + if (!ball[0].on && !ball[1].on) { + init_ball(0); + } + ball_timer = timer_read(); + } + + // Other ball stuff + for (int i=0; i<2; ++i) { + if (ball[i].on) { + // Ball deflection logic + if (!ball[i].up && ball[i].y == 4 && (ball[i].x == paddle_pos || ball[i].x == paddle_pos - 1 || ball[i].x == paddle_pos + 1)) { + if (!ball[i].enemy) { + --ball[i].y; + if (!ball[i].left) { ++ball[i].x; } + ball[i].up = true; + } else { + hurt_paddle(); + i = 2; + } + } + + // Ball display + switch (ball[i].y) { + case 0: + if (ball[i].enemy) { + rgb_matrix_set_color(GAME_R0[ball[i].x], RGB_RED); + } else { + rgb_matrix_set_color(GAME_R0[ball[i].x], RGB_WHITE); + } + break; + + case 1: + if (ball[i].enemy) { + rgb_matrix_set_color(GAME_R1[ball[i].x], RGB_RED); + } else { + rgb_matrix_set_color(GAME_R1[ball[i].x], RGB_WHITE); + } + break; + + case 2: + if (ball[i].enemy) { + rgb_matrix_set_color(GAME_R2[ball[i].x], RGB_RED); + } else { + rgb_matrix_set_color(GAME_R2[ball[i].x], RGB_WHITE); + } + break; + + case 3: + if (ball[i].enemy) { + rgb_matrix_set_color(GAME_R3[ball[i].x], RGB_RED); + } else { + rgb_matrix_set_color(GAME_R3[ball[i].x], RGB_WHITE); + } + break; + + case 4: + if (ball[i].enemy) { + rgb_matrix_set_color(GAME_R4[ball[i].x], RGB_RED); + } else { + rgb_matrix_set_color(GAME_R4[ball[i].x], RGB_WHITE); + } + break; + } + } + } + } + + + break; + + default: + fn_active = false; + if (game_start) { + // Reset lighting settings + game_start = false; + rgb_matrix_sethsv_noeeprom(last_hsv.h, last_hsv.s, last_hsv.v); + } + break; + } + + if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { + if (!caps_active) { + caps_active = true; + caps_flash_on = true; + caps_flasher = timer_read(); + } + if (timer_elapsed(caps_flasher) > 500) { + caps_flasher = timer_read(); + caps_flash_on = !caps_flash_on; + } + + rgb_matrix_set_color(LED_CAPS, RGB_WHITE); + if (caps_flash_on) { + for (uint8_t i=0; i + Copyright 2021 Tomas Guinan + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + + +const uint16_t GAME_TIMER[] = { + 400, 350, 300, 250, 400, 350, 300, 250, 225, 200, 175, 150 +}; + +bool game_start = false; +HSV last_hsv; +static uint8_t paddle_pos_full; +static uint8_t paddle_lives; +static uint8_t level_number; +static uint8_t bounce_count; +static uint8_t damage_count; +static uint16_t damage_timer; +static uint16_t ball_timer; + +struct BallStruct +{ + uint8_t x; + uint8_t y; + bool on; + bool up; + bool left; + bool enemy; +}; + +struct BallStruct ball[2]; + +void init_ball(uint8_t i); +void hurt_paddle(void); \ No newline at end of file diff --git a/keyboards/gmmk/pro/ansi/keymaps/paddlegame/readme.md b/keyboards/gmmk/pro/ansi/keymaps/paddlegame/readme.md new file mode 100644 index 000000000..c6da7f5f4 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/paddlegame/readme.md @@ -0,0 +1,18 @@ +![GMMK Pro Paddle Game zLayout Image](https://i.imgur.com/RYcKyOj.png) + +# Paddle Game GMMK Pro layout by Tomas Guinan + +- Add Print Screen, Scroll Lock, Pause/Break, Insert to Fn layer +- Toggle backlight using Fn+` + - If you don't like using a backlight but wnat to play the paddle game or + use other RGB features, turn RGB on and set brightness to 0 +- Usable Fn layer keys are backlit +- Implement Win key lock using Fn+Win like in Glorious Core firmware +- Caps Lock and Scroll Lock keys light up white when active +- Caps Lock has red flashing side lights like in Glorious Core firmware +- Layer 2 includes Paddle Game, playable by pressing Fn+P + - Use rotary encoder to control paddle + - Contains 12 levels, indicated by blue LED on F row + - Player has 4 lives, indicated by nav cluster + - Deflect white balls while avoiding red ones + - Press Fn to quit game diff --git a/keyboards/gmmk/pro/ansi/keymaps/paddlegame/rgb_matrix_map.h b/keyboards/gmmk/pro/ansi/keymaps/paddlegame/rgb_matrix_map.h new file mode 100644 index 000000000..06d34ba6c --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/paddlegame/rgb_matrix_map.h @@ -0,0 +1,181 @@ +/* Copyright 2021 Tomas Guinan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#ifdef RGB_MATRIX_ENABLE + + bool fn_active = false; + bool caps_active = false; + bool caps_flash_on = false; + + static uint16_t caps_flasher = 0; + RGB rgb_value; + + // RGB LED locations + enum led_location_map { + LED_ESC, // 0, ESC, k13 + LED_GRV, // 1, ~, k16 + LEB_TAB, // 2, Tab, k11 + LED_CAPS, // 3, Caps, k21 + LED_LSFT, // 4, Sh_L, k00 + LED_LCTL, // 5, Ct_L, k06 + LED_F1, // 6, F1, k26 + LED_1, // 7, 1, k17 + LED_Q, // 8, Q, k10 + LED_A, // 9, A, k12 + LED_Z, // 10, Z, k14 + LED_LWIN, // 11, Win_L, k90 + LED_F2, // 12, F2, k36 + LED_2, // 13, 2, k27 + LED_W, // 14, W, k20 + LED_S, // 15, S, k22 + LED_X, // 16, X, k24 + LED_LALT, // 17, Alt_L, k93 + LED_F3, // 18, F3, k31 + LED_3, // 19, 3, k37 + LED_E, // 20, E, k30 + LED_D, // 21, D, k32 + LED_C, // 22, C, k34 + LED_F4, // 23, F4, k33 + LED_4, // 24, 4, k47 + LED_R, // 25, R, k40 + LED_F, // 26, F, k42 + LED_V, // 27, V, k44 + LED_F5, // 28, F5, k07 + LED_5, // 29, 5, k46 + LED_T, // 30, T, k41 + LED_G, // 31, G, k43 + LED_B, // 32, B, k45 + LED_SPC, // 33, SPACE, k94 + LED_F6, // 34, F6, k63 + LED_6, // 35, 6, k56 + LED_Y, // 36, Y, k51 + LED_H, // 37, H, k53 + LED_N, // 38, N, k55 + LED_F7, // 39, F7, k71 + LED_7, // 40, 7, k57 + LED_U, // 41, U, k50 + LED_J, // 42, J, k52 + LED_M, // 43, M, k54 + LED_F8, // 44, F8, k76 + LED_8, // 45, 8, k67 + LED_I, // 46, I, k60 + LED_K, // 47, K, k62 + LED_COMM, // 48, ,, k64 + LED_RALT, // 49, Alt_R, k95 + LED_F9, // 50, F9, ka6 + LED_9, // 51, 9, k77 + LED_O, // 52, O, k70 + LED_L, // 53, L, k72 + LED_DOT, // 54, ., k74 + LED_FN, // 55, FN, k92 + LED_F10, // 56, F10, ka7 + LED_0, // 57, 0, k87 + LED_P, // 58, P, k80 + LED_SCLN, // 59, ;, k82 + LED_SLSH, // 60, ?, k85 + LED_F11, // 61, F11, ka3 + LED_MINS, // 62, -, k86 + LED_LBRC, // 63, [, k81 + LED_QUOT, // 64, ", k83 + LED_RCTL, // 65, Ct_R, k04 + LED_F12, // 66, F12, ka5 + LED_L1, // 67, LED, l01 + LED_R1, // 68, LED, l11 + LED_DEL, // 69, Del, k97 + LED_L2, // 70, LED, l02 + LED_R2, // 71, LED, l12 + LED_HOME, // 72, Home, k65 + LED_L3, // 73, LED, l03 + LED_R3, // 74, LED, l13 + LED_PGUP, // 75, PgUp, k15 + LED_L4, // 76, LED, l04 + LED_R4, // 77, LED, l14 + LED_EQL, // 78, =, k66 + LED_RIGHT, // 79, Right, k05 + LED_L5, // 80, LED, l05 + LED_R5, // 81, LED, l15 + LED_END, // 82, End, k75 + LED_L6, // 83, LED, l06 + LED_R6, // 84, LED, l16 + LED_BSPC, // 85, BSpc, ka1 + LED_PGDN, // 86, PgDn, k25 + LED_L7, // 87, LED, l07 + LED_R7, // 88, LED, l17 + LED_RBRC, // 89, ], k61 + LED_RSFT, // 90, Sh_R, k91 + LED_L8, // 91, LED, l08 + LED_R8, // 92, LED, l18 + LED_BSLS, // 93, \, ka2 + LED_UP, // 94, Up, k35 + LED_LEFT, // 95, Left, k03 + LED_ENT, // 96, Enter, ka4 + LED_DOWN // 97, Down, k73 + }; + + const uint8_t LED_RGB[] = { + LED_MINS, LED_EQL, + LED_LBRC, LED_RBRC, + LED_SCLN, LED_QUOT, + LED_HOME, LED_PGUP, LED_PGDN, LED_END, + LED_UP, LED_DOWN, LED_LEFT, LED_RIGHT + }; + + const uint8_t LED_GREEN[] = { + LED_F1, LED_F2, LED_F3, LED_F4, + LED_F5, LED_F6, LED_F7, LED_F8 + }; + + const uint8_t LED_WHITE[] = { + LED_F9, LED_F10, LED_F11, LED_DEL + }; + + const uint8_t LED_SIDE_LEFT[] = { LED_L1, LED_L2, LED_L3, LED_L4, LED_L5, LED_L6, LED_L7, LED_L8}; + + const uint8_t LED_SIDE_RIGHT[] = { LED_R1, LED_R2, LED_R3, LED_R4, LED_R5, LED_R6, LED_R7, LED_R8}; + + // Breakout LED rules + + const uint8_t GAME_LIVES[] = { LED_HOME, LED_PGUP, LED_PGDN, LED_END }; + const uint8_t GAME_PADDLE[] = { + LED_Z, LED_X, LED_C, LED_V, LED_B, LED_N, LED_M, LED_COMM, LED_DOT, LED_SLSH + }; + const uint8_t GAME_SMILE1[] = { + LED_A, LED_S, LED_D, LED_F, LED_G, LED_H, LED_J, LED_K, LED_L, LED_SCLN, LED_QUOT + }; + const uint8_t GAME_SMILE2[] = { + LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL + }; + const uint8_t GAME_R4[] = { + LED_X, LED_C, LED_V, LED_B, LED_N, LED_M, LED_COMM, LED_DOT + }; + const uint8_t GAME_R3[] = { + LED_S, LED_D, LED_F, LED_G, LED_H, LED_J, LED_K, LED_L, LED_SCLN + }; + const uint8_t GAME_R2[] = { + LED_W, LED_E, LED_R, LED_T, LED_Y, LED_U, LED_I, LED_O, LED_P, LED_LBRC + }; + const uint8_t GAME_R1[] = { + LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL + }; + const uint8_t GAME_R0[] = { + LED_F1, LED_F2, LED_F3, LED_F4, LED_F5, LED_F6, LED_F7, LED_F8, LED_F9, LED_F10, LED_F11, LED_F12 + }; + + const uint8_t LED_GAME_OVER[] = { LED_5, LED_8, LED_F, LED_G, LED_H, LED_J, LED_C, LED_M }; + + +#endif \ No newline at end of file diff --git a/keyboards/gmmk/pro/ansi/keymaps/paddlegame/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/paddlegame/rules.mk new file mode 100644 index 000000000..925d8a5a5 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/paddlegame/rules.mk @@ -0,0 +1,4 @@ +MOUSEKEY_ENABLE = no +BOOTMAGIC_ENABLE = lite +RGB_MATRIX_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/keyboards/gmmk/pro/ansi/keymaps/stickandgum/config.h b/keyboards/gmmk/pro/ansi/keymaps/stickandgum/config.h new file mode 100644 index 000000000..2566fc6f9 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/stickandgum/config.h @@ -0,0 +1,75 @@ +/* Copyright 2021 stickandgum + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// I like NKRO.. but let's not force it. @drashna pointed out some older hardware has issues - Toggle it via keycode if you like. +// #define FORCE_NKRO + +// At the time of this, there are 41 effects! That may be a bit too many to cycle through - keeping what I believe is the best. +#ifdef RGB_MATRIX_ENABLE + +// #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR + +// Below added per: https://beta.docs.qmk.fm/using-qmk/hardware-features/lighting/feature_rgb_matrix#suspended-state-id-suspended-state + #define RGB_DISABLE_WHEN_USB_SUSPENDED + + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS // Heatmap, Rain + #define RGB_MATRIX_KEYPRESSES // REACTIVE, SPLASH modes + +// Soon we need to ENABLE modes by DEFAULT soon as per: https://github.com/qmk/qmk_firmware/pull/13758 Thanks @noroadsleft + // #define DISABLE_RGB_MATRIX_SOLID_COLOR // BUILT IN (MAPPED!) Static single color. + // #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Accenting various keys on the keyboard. + // #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Top down rainbow! + #define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Left Right Rainbow (the top-down is better imho). + // #define DISABLE_RGB_MATRIX_BREATHING // Built in (MAPPED!) + // #define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right (with white) + // #define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right (with black) + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades sat (RGB_MATRIX_CYCLE_PINWHEEL) + #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // See above + #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // See above + // #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness (with black) + #define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard cycling through rainbow + // #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // BUILT IN (MAPPED!) Full Rainbow Left to Right + #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom + #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Rainbow circles coming to center. + #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Two Rainbow circles coming to 1/3 and 2/3 points. + #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right + // #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // BUILT IN (MAPPED!) - Consider disabling this - my poor eyes. + #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard + #define DISABLE_RGB_MATRIX_DUAL_BEACON // Two rainbows spinning around keyboards + #define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Similar to above. + #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Enough of the spinning rainbows - we get it! :-) + #define DISABLE_RGB_MATRIX_RAINDROPS // Jellybeans are better. + // #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation - better than above. + #define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back + #define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left + #define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right + // #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // Hot keys! + // #define DISABLE_RGB_MATRIX_DIGITAL_RAIN // The Matrix! + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Key hits shown in current hue - all other keys black: wide slightly better imo + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Key hits shown in current hue - all other keys shifted hue + // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse around a single key hit then fades value out (black otherwise) + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // same as above but a bit too intense imo. + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Column and Row single color fade. + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Column and Row single color fade. (Multi-keys) + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of key hit then fades + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multi-key hit then fades + #define DISABLE_RGB_MATRIX_SPLASH // Full rainbow pulses from key hit. All else black. + #define DISABLE_RGB_MATRIX_MULTISPLASH // Full rainbow pulses from multi-keys. All else black. + #define DISABLE_RGB_MATRIX_SOLID_SPLASH // Single color pulses from key hit. All else black. (Using solid_reactive_wide instead). + #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Single color pulses from muli-keys. All else black. (Using solid_reactive_wide instead). +#endif diff --git a/keyboards/gmmk/pro/ansi/keymaps/stickandgum/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/stickandgum/keymap.c new file mode 100644 index 000000000..762fe00df --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/stickandgum/keymap.c @@ -0,0 +1,300 @@ +/* Copyright 2021 stickandgum GMMK Pro ANSI Enhanced Keymap File + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +enum my_keycodes { + LED_TILDE = SAFE_RANGE, + LED_1, + LED_2, + LED_3, + LED_4, + LED_5, + LED_6, + LED_7, + LED_8, + LED_9, + LED_0, + LED_MINS, + LED_EQL, + QMKBEST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + [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_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_DEL, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_CALC, KC_MYCM, KC_MSEL, KC_MAIL, KC_WHOM, _______, _______, _______, _______, _______, KC_WAKE, KC_SLEP, KC_PAUS, _______, + LED_TILDE, LED_1, LED_2, LED_3, LED_4, LED_5, LED_6, LED_7, LED_8, LED_9, LED_0, LED_MINS, LED_EQL, KC_INS, KC_SLCK, + _______, RGB_SAI, RGB_VAI, RGB_HUI, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_BRIU, + _______, RGB_RMOD, RGB_VAD, RGB_MOD, RGB_SPI, _______, _______, _______, _______, QMKBEST, _______, _______, _______, KC_BRID, + _______, _______, _______, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, KC_MPLY, KC_PWR, + _______, _______, _______, _______, KC_RALT, _______, KC_APP, KC_MPRV, KC_MSTP, KC_MNXT + ), + +}; + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + // https://beta.docs.qmk.fm/using-qmk/simple-keycodes/feature_advanced_keycodes#alt-escape-for-alt-tab-id-alt-escape-for-alt-tab + if (get_mods() & MOD_MASK_CTRL) { // If CTRL is held + uint8_t mod_state = get_mods(); // Store all modifiers that are held + unregister_mods(MOD_MASK_CTRL); // Immediately unregister the CRTL key (don't send CTRL-PgDn) - del_mods doesn't work here (not immediate) + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + set_mods(mod_state); // Add back in the CTRL key - so ctrl-key will work if ctrl was never released after paging. + } else if (get_mods() & MOD_MASK_SHIFT) { + uint8_t mod_state = get_mods(); + unregister_mods(MOD_MASK_SHIFT); + if (clockwise) { + #ifdef MOUSEKEY_ENABLE // If using the mouse scroll - make sure MOUSEKEY is enabled + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_VOLU); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_VOLD); + #endif + } + set_mods(mod_state); + } else if (clockwise) { // All else volume. + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} +#endif //ENCODER_ENABLE + +#ifdef RGB_MATRIX_ENABLE +static void set_rgb_caps_leds_on(void); +static void set_rgb_scroll_leds_on(void); +static void set_rgb_caps_leds_off(void); +static void set_rgb_scroll_leds_off(void); + +// Called on powerup and is the last _init that is run. +void keyboard_post_init_user(void) { + + int mods[35] = {0,2,3,4,5,11,17,33,49,55,65,95,97,79,94,85,93,96,90,69,92,67,76,80,91,75,86,68,77,81,92,28,34,39,44}; + int j; + + /* output each array element's value */ + for (j = 0; j < 35; j++ ) { + g_led_config.flags[mods[j]] = LED_FLAG_MODIFIER; + } + + if (!rgb_matrix_is_enabled()) { + rgb_matrix_enable(); +#ifdef CONSOLE_ENABLE + uprintf("ERROR! RGB Matrix Enabled and wrote to EEPROM! -How was the RGB Matrix Disabled?"); +#endif + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef CONSOLE_ENABLE + switch(rgb_matrix_get_flags()) { + case 0x08: + uprintf("FLAG: LED_FLAG_INDICATOR "); + break; + case 0x04: + uprintf("FLAG: LED_FLAG_KEYLIGHT "); + break; + case 0x02: + uprintf("FLAG: LED_FLAG_UNDERGLOW "); + break; + case 0x01: + uprintf("FLAG: LED_FLAG_MODIFIER "); + break; + case 0xFF: + uprintf("FLAG: LED_FLAG_ALL "); + break; + case 0x00: + uprintf("FLAG: LED_FLAG_NONE "); + break; + default: + uprintf("FLAG Other: %u ", rgb_matrix_get_flags()); + } + uprintf("Caps? %d Scroll? %d - MATRIX: %d\n", host_keyboard_led_state().caps_lock, host_keyboard_led_state().scroll_lock, rgb_matrix_is_enabled()); +#endif //CONSOLE_ENABLE + + switch (keycode) { + case RGB_TOG: + if (record->event.pressed) { + if (rgb_matrix_get_flags() == LED_FLAG_ALL) { + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_set_color_all(0, 0, 0); + } else { + rgb_matrix_set_flags(LED_FLAG_ALL); + } + } + return false; + case LED_TILDE: + rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR); // Can use RGB_M_P built-in keycode instead. + break; + case LED_1: + rgb_matrix_mode(RGB_MATRIX_ALPHAS_MODS); + break; + case LED_2: + rgb_matrix_mode(RGB_MATRIX_GRADIENT_UP_DOWN); + break; + case LED_3: + rgb_matrix_mode(RGB_MATRIX_JELLYBEAN_RAINDROPS); + break; + case LED_4: + rgb_matrix_mode(RGB_MATRIX_BAND_SAT); + break; + case LED_5: + rgb_matrix_mode(RGB_MATRIX_BAND_VAL); + break; + case LED_6: + rgb_matrix_mode(RGB_MATRIX_BAND_SPIRAL_VAL); + break; + case LED_7: + rgb_matrix_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT); // Can use RGB_M_R built-in keycode instead. + break; + case LED_8: + rgb_matrix_mode(RGB_MATRIX_CYCLE_PINWHEEL); // Can use RGB_M_SW built-in keycode instead. + break; + case LED_9: + rgb_matrix_mode(RGB_MATRIX_BREATHING); // Can use RGB_M_B built-in keycode instead. + break; + #ifdef RGB_MATRIX_KEYPRESSES // Reactive effects require RGB_MATRIX_KEYPRESSES in config.h + case LED_0: + rgb_matrix_mode(RGB_MATRIX_SOLID_REACTIVE_WIDE); + break; + #endif //RGB_MATRIX_KEYPRESSES + #ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS // Heatmap and Rain require #define RGB_MATRIX_FRAMEBUFFER_EFFECTS in config.h + case LED_MINS: + rgb_matrix_mode(RGB_MATRIX_DIGITAL_RAIN); + break; + case LED_EQL: + rgb_matrix_mode(RGB_MATRIX_TYPING_HEATMAP); + break; + #endif //RGB_MATRIX_FRAMEBUFFER_EFFECTS + case QMKBEST: + if (record->event.pressed) { // when keycode QMKBEST is pressed + SEND_STRING("QMK rocks"); + } else { // when keycode QMKBEST key is released + SEND_STRING("!!"); + } + break; + } + return true; +} + +void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + set_rgb_caps_leds_on(); + } else { + if (rgb_matrix_get_flags() == LED_FLAG_NONE){ + set_rgb_caps_leds_off(); + } + } + if (host_keyboard_led_state().scroll_lock) { + set_rgb_scroll_leds_on(); + } else { + if (rgb_matrix_get_flags() == LED_FLAG_NONE){ + set_rgb_scroll_leds_off(); + } + } +} + +// RGB led number layout, function of the key + +// 67, led 01 0, ESC 6, F1 12, F2 18, F3 23, F4 28, F5 34, F6 39, F7 44, F8 50, F9 56, F10 61, F11 66, F12 69, Prt Rotary(Mute) 68, led 12 +// 70, led 02 1, ~ 7, 1 13, 2 19, 3 24, 4 29, 5 35, 6 40, 7 45, 8 51, 9 57, 0 62, -_ 78, (=+) 85, BackSpc 72, Home 71, led 13 +// 73, led 03 2, Tab 8, Q 14, W 20. E 25, R 30, T 36, Y 41, U 46, I 52, O 58, P 63, [{ 89, ]} 93, \| 75, PgUp 74, led 14 +// 76, led 04 3, Caps 9, A 15, S 21, D 26, F 31, G 37, H 42, J 47, K 53, L 59, ;: 64, '" 96, Enter 86, PgDn 77, led 15 +// 80, led 05 4, Sh_L 10, Z 16, X 22, C 27, V 32, B 38, N 43, M 48, ,< 54, .< 60, /? 90, Sh_R 94, Up 82, End 81, led 16 +// 83, led 06 5, Ct_L 11,Win_L 17, Alt_L 33, SPACE 49, Alt_R 55, FN 65, Ct_R 95, Left 97, Down 79, Right 84, led 17 +// 87, led 07 88, led 18 +// 91, led 08 92, led 19 + +static void set_rgb_caps_leds_on() { + rgb_matrix_set_color(0, 255, 0, 0); //Escape Key + rgb_matrix_set_color(3, 255, 0, 0); //capslock key + rgb_matrix_set_color(5, 255, 0, 0); //Left CTRL key + rgb_matrix_set_color(67, 255, 0, 0); //Left LED 01 + rgb_matrix_set_color(68, 255, 0, 0); //Right LED 12 + rgb_matrix_set_color(70, 255, 127, 0); //Left LED 02 + rgb_matrix_set_color(71, 255, 127, 0); //Right LED 13 + rgb_matrix_set_color(73, 255, 255, 0); //Left LED 03 + rgb_matrix_set_color(74, 255, 255, 0); //Right LED 14 + rgb_matrix_set_color(76, 0, 255, 0); //Left LED 04 + rgb_matrix_set_color(77, 0, 255, 0); //Right LED 15 + rgb_matrix_set_color(80, 0, 0, 255); //Left LED 05 + rgb_matrix_set_color(81, 0, 0, 255); //Right LED 16 + rgb_matrix_set_color(83, 46, 43, 95); //Left LED 06 + rgb_matrix_set_color(84, 46, 43, 95); //Right LED 17 + rgb_matrix_set_color(87, 139, 0, 255); //Left LED 07 + rgb_matrix_set_color(88, 139, 0, 255); //Right LED 18 + rgb_matrix_set_color(91, 255, 255, 255); //Left LED 08 + rgb_matrix_set_color(92, 255, 255, 255); //Right LED 19 +} + +static void set_rgb_caps_leds_off() { + rgb_matrix_set_color(0, 0, 0, 0); //Escape Key + rgb_matrix_set_color(3, 0, 0, 0); //capslock key + rgb_matrix_set_color(5, 0, 0, 0); //Left CTRL key + rgb_matrix_set_color(67, 0, 0, 0); //Left LED 01 + rgb_matrix_set_color(68, 0, 0, 0); //Right LED 12 + rgb_matrix_set_color(70, 0, 0, 0); //Left LED 02 + rgb_matrix_set_color(71, 0, 0, 0); //Right LED 13 + rgb_matrix_set_color(73, 0, 0, 0); //Left LED 03 + rgb_matrix_set_color(74, 0, 0, 0); //Right LED 14 + rgb_matrix_set_color(76, 0, 0, 0); //Left LED 04 + rgb_matrix_set_color(77, 0, 0, 0); //Right LED 15 + rgb_matrix_set_color(80, 0, 0, 0); //Left LED 05 + rgb_matrix_set_color(81, 0, 0, 0); //Right LED 16 + rgb_matrix_set_color(83, 0, 0, 0); //Left LED 06 + rgb_matrix_set_color(84, 0, 0, 0); //Right LED 17 + rgb_matrix_set_color(87, 0, 0, 0); //Left LED 07 + rgb_matrix_set_color(88, 0, 0, 0); //Right LED 18 + rgb_matrix_set_color(91, 0, 0, 0); //Left LED 08 + rgb_matrix_set_color(92, 0, 0, 0); //Right LED 19 +} + +static void set_rgb_scroll_leds_on() { + rgb_matrix_set_color(72, 255, 255, 255); // Under Rotary (HOME) +} + +static void set_rgb_scroll_leds_off() { + rgb_matrix_set_color(72, 0, 0, 0); // Under Rotary (HOME) +} + +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/gmmk/pro/ansi/keymaps/stickandgum/readme.md b/keyboards/gmmk/pro/ansi/keymaps/stickandgum/readme.md new file mode 100644 index 000000000..c4e222543 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/stickandgum/readme.md @@ -0,0 +1,63 @@ +# Glorious GMMK Pro / ANSI - Enhanced Keyboard + +Tried to incorporate full featured GMMK Pro keyboard functionality without adding unnecessary features. Included Scroll Lock and Caps LEDs. NKRO can be toggled (Fn + N). +SHIFT and Ctrl keys for scrolling with the rotary, Fn-keys also used for screen brightness, media, PowerOff, Suspend, App Shortcuts, and RGB Toggle/Modifications. Trimmed down the amazing (currently 41) built-in RGB effects down to about 13 or so reasonable effects that feel are just enough for your entertainment without being too excessive. + +BIG thank you to [AndreBrait](https://github.com/andrebrait), And of course, @drashna and @filterpaper, @noroadsleft and the entire discord community. + +* Keymap Creator: [StickAndGum](https://github.com/StickAndGum) +* Keyboard: [More info on GMMK Pro](https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black) +* Controller [STM32F303CCT6](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) + +* Layout: + ![keyboard-layout](https://user-images.githubusercontent.com/22257588/130371838-875ba65b-88ea-4f81-a44a-bb24194c4989.png) + +Features are as follows: + +Rotary: + - Default: Volume Up/Down + - Shift: Mouse Wheel Down/Up + - Ctrl: Page Down/Up + +Top/Default Layer: + - Print Screen -> Print Screen (Left of rotary) + - Delete -> Home (Under Rotary) + - Right Alt -> Delete (Right of Spacebar) + - All other keys defaults. + +Fn Layer: + - Fn + \ -> Bootloader Mode (Can also hold ESC while powering up) - If hit by mistake, just unplug and replug in. + - Fn + Backspace -> Insert + - Fn + Print -> Pause/Break + - Fn + Home -> Scroll Lock (Lights up white!) + - Fn + Del (right of space) -> Right-Alt key. + - Fn + RCtrl (right of Fn) -> Menu/App key. + - Fn + N -> Toggle NKRO + - Fn + End -> Power Off Computer + - Fn + F12 -> Suspend Computer + - Fn + F11 -> Wake Computer (Necessary on MAC OS?) + - Fn + Page Up / Down -> Laptop Screen Brightness Up/Down + - Fn + F1 - F5 -> Launch Calc, My Comp (Explorer), Media Player, Mail Client, Web Browser. + - Fn + Up, Down, Left, Right Arrows -> Media Play, Stop, Previous, Next respectively. + +- RGB Information: + - Toggle for RGB via Fn-r (CAPS & ScrlLock still Light/Indicate) + - CAPS: Side Light Rainbow Indicators and Left-side RED Indicators + - Scroll-Lock: Fn-Home (Under Rotary) white indicator. + - Modifiers identified around most of the edge of keyboard / Side lights also accented (Fn-1 looks GREAT IMHO) + +- RGB Modifing (all via Function key) all via wasdqerf (common gaming keys) - easy to remember. + - Fn + r -> Toggle RGB + - Fn + w,s -> Brightness Up, Down + - Fn + a,d -> Cycle Forward/Backward through rgb effects + - Fn + q -> Increase or Decrease Saturation (use SHIFT key to lower) + - Fn + e -> Increase or Decrease Hue/Color (use SHIFT key to lower) + - Fn + f -> Increase or Decrease Speed (Using "F" for Fast!) (Use SHIFT for slower) + - Fn + ~, 0-9, - = keys (2nd row keys) -> 13 RGB different effects arranged to my liking. Fn-1 is my favorite. + - Fn + L -> My easter egg... "QMK rocks!" + +- Known issues: + - The Heatmap and Matrix FrameBuffer effects (Fn - and =) are a bit buggy - F-keys light up when they shouldn't and the Caps/Scroll lights don't turn off properly when using. Just change the effect to something else to fix this. + - If you find a fix for this, please let me know. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/gmmk/pro/ansi/keymaps/stickandgum/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/stickandgum/rules.mk new file mode 100644 index 000000000..6440dc6d4 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/stickandgum/rules.mk @@ -0,0 +1,2 @@ +CONSOLE_ENABLE = no +MOUSEKEY_ENABLE = yes diff --git a/keyboards/gmmk/pro/ansi/keymaps/via/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/via/keymap.c new file mode 100644 index 000000000..9b13f75a8 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/via/keymap.c @@ -0,0 +1,89 @@ +/* Copyright 2021 Glorious, LLC + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + // + // This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO). + // Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience. + // Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts. + [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_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_HUI, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI + ), + + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; +// clang-format on + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} +#endif // ENCODER_ENABLE diff --git a/keyboards/xd60/keymaps/via/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/via/rules.mk similarity index 100% rename from keyboards/xd60/keymaps/via/rules.mk rename to keyboards/gmmk/pro/ansi/keymaps/via/rules.mk diff --git a/keyboards/gmmk/pro/keymaps/wholesomeducky/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/wholesomeducky/keymap.c similarity index 100% rename from keyboards/gmmk/pro/keymaps/wholesomeducky/keymap.c rename to keyboards/gmmk/pro/ansi/keymaps/wholesomeducky/keymap.c diff --git a/keyboards/gmmk/pro/ansi/keymaps/willwm/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/willwm/keymap.c new file mode 100644 index 000000000..a32fef104 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/keymaps/willwm/keymap.c @@ -0,0 +1,73 @@ +/* Copyright 2021 Glorious, LLC + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Mute) + // ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home + // Tab Q W E R T Y U I O P [ ] \ PgUp + // Caps A S D F G H J K L ; " Enter PgDn + // Sh_L Z X C V B N M , . ? Sh_R Up End + // Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; +// clang-format on + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} diff --git a/keyboards/gmmk/pro/keymaps/willwm/keymap.json b/keyboards/gmmk/pro/ansi/keymaps/willwm/keymap.json similarity index 100% rename from keyboards/gmmk/pro/keymaps/willwm/keymap.json rename to keyboards/gmmk/pro/ansi/keymaps/willwm/keymap.json diff --git a/keyboards/gmmk/pro/keymaps/willwm/readme.md b/keyboards/gmmk/pro/ansi/keymaps/willwm/readme.md similarity index 100% rename from keyboards/gmmk/pro/keymaps/willwm/readme.md rename to keyboards/gmmk/pro/ansi/keymaps/willwm/readme.md diff --git a/keyboards/gmmk/pro/keymaps/willwm/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/willwm/rules.mk similarity index 100% rename from keyboards/gmmk/pro/keymaps/willwm/rules.mk rename to keyboards/gmmk/pro/ansi/keymaps/willwm/rules.mk diff --git a/keyboards/gmmk/pro/ansi/readme.md b/keyboards/gmmk/pro/ansi/readme.md new file mode 100644 index 000000000..9800aef88 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/readme.md @@ -0,0 +1,37 @@ +# GMMK PRO (ANSI) + +A tenkeyless 75% keyboard made and sold by Glorious LLC. Equipped with the STM32 ARM Cortex-M4 microcontroller, with support for rotary encoders and three additional layouts. [More info at Glorious](https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black-reservation) + +* Keyboard Maintainer: [GloriousThrall](https://github.com/GloriousThrall) +* Hardware Supported: GMMK Pro +* Hardware Availability: [GloriousPCGaming.com](https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black-reservation) + +Make example for this keyboard (after setting up your build environment): + + make gmmk/pro/ansi:default + +Flashing example for this keyboard: + + make gmmk/pro/ansi:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Hold the Reset switch mounted on the bottom side of the PCB while connecting the USB cable +* Hold the Escape key while connecting the USB cable (also erases persistent settings) +* Fn+Backslash will reset the board to bootloader mode if you have flashed the default QMK keymap + +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). + +## Case Screw Replacements + +Many users report stripped case screws when disassembling the board. + +The stock case screws are: +* Thread: M2 +* Thread length: ~5 mm +* Head diameter: ~3.8 mm +* Head counterbore diameter: ~4.0 mm +* Head counterbore depth: ~1.9 mm + +Most M2x5mm screws should fit fine, although it's best to ensure that the screw head will fit inside the counterbore. +For reference, [this hex socket head screw](https://www.mcmaster.com/91292A005/) from McMaster-Carr should fit nearly flush (head will protrude above the counterbore by ~0.1 mm). diff --git a/keyboards/gmmk/pro/ansi/rules.mk b/keyboards/gmmk/pro/ansi/rules.mk new file mode 100644 index 000000000..f42f92513 --- /dev/null +++ b/keyboards/gmmk/pro/ansi/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = STM32F303 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = AW20216 diff --git a/keyboards/gmmk/pro/config.h b/keyboards/gmmk/pro/config.h index 7f3977c10..693b86539 100644 --- a/keyboards/gmmk/pro/config.h +++ b/keyboards/gmmk/pro/config.h @@ -19,34 +19,52 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define DEVICE_VER 0x0001 -#define VENDOR_ID 0x320F -#define PRODUCT_ID 0x5044 -#define MANUFACTURER Glorious -#define PRODUCT GMMK Pro +#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x320F +#define PRODUCT_ID 0x5044 +#define MANUFACTURER Glorious +#define PRODUCT GMMK Pro /* key matrix size */ #define MATRIX_ROWS 11 #define MATRIX_COLS 8 -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A8, A9, A10 } +#define MATRIX_ROW_PINS \ + { B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10 } +#define MATRIX_COL_PINS \ + { A0, A1, A2, A3, A4, A8, A9, A10 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW +/* Hold ESC on start up to clear EEPROM and boot into bootloader mode */ #define BOOTMAGIC_LITE_ROW 1 #define BOOTMAGIC_LITE_COLUMN 3 #define TAP_CODE_DELAY 10 -#define ENCODERS_PAD_A { C15 } -#define ENCODERS_PAD_B { C14 } +#define ENCODERS_PAD_A \ + { C15 } +#define ENCODERS_PAD_B \ + { C14 } /* 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 +/* SPI Config for LED Driver */ +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_MOSI_PIN A6 +#define SPI_MISO_PIN A7 + +#define DRIVER_1_CS B13 +#define DRIVER_2_CS B14 +#define DRIVER_1_EN C13 +#define DRIVER_2_EN C13 + +#define DRIVER_COUNT 2 + /* 1000Hz USB polling - it's the default on stock firmware */ #define USB_POLLING_INTERVAL_MS 1 @@ -55,3 +73,6 @@ /* Set debounce time to 5ms */ #define DEBOUNCE 5 + +/* Force NKRO on boot up regardless of the setting saved in the EEPROM (uncomment to enable it) */ +// #define FORCE_NKRO diff --git a/keyboards/gmmk/pro/halconf.h b/keyboards/gmmk/pro/halconf.h new file mode 100644 index 000000000..23ecb202a --- /dev/null +++ b/keyboards/gmmk/pro/halconf.h @@ -0,0 +1,7 @@ +#pragma once + +#define HAL_USE_SPI TRUE +#define SPI_USE_WAIT TRUE +#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD + +#include_next diff --git a/keyboards/gmmk/pro/info.json b/keyboards/gmmk/pro/info.json deleted file mode 100644 index 427e562e3..000000000 --- a/keyboards/gmmk/pro/info.json +++ /dev/null @@ -1,214 +0,0 @@ -{ - "keyboard_name": "GMMK Pro", - "url": "https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black-reservation", - "maintainer": "GloriousThrall", - "width": 16.5, - "height": 6.5, - "layouts": { - "LAYOUT": { - "layout": [ - {"x":0, "y":0}, - - {"x":1.25, "y":0}, - {"x":2.25, "y":0}, - {"x":3.25, "y":0}, - {"x":4.25, "y":0}, - - {"x":5.5, "y":0}, - {"x":6.5, "y":0}, - {"x":7.5, "y":0}, - {"x":8.5, "y":0}, - - {"x":9.75, "y":0}, - {"x":10.75, "y":0}, - {"x":11.75, "y":0}, - {"x":12.75, "y":0}, - - {"x":14, "y":0}, - {"x":15.5, "y":0}, - - {"x":0, "y":1.25}, - {"x":1, "y":1.25}, - {"x":2, "y":1.25}, - {"x":3, "y":1.25}, - {"x":4, "y":1.25}, - {"x":5, "y":1.25}, - {"x":6, "y":1.25}, - {"x":7, "y":1.25}, - {"x":8, "y":1.25}, - {"x":9, "y":1.25}, - {"x":10, "y":1.25}, - {"x":11, "y":1.25}, - {"x":12, "y":1.25}, - {"x":13, "y":1.25, "w":2}, - - {"x":15.5, "y":1.25}, - - {"x":0, "y":2.25, "w":1.5}, - {"x":1.5, "y":2.25}, - {"x":2.5, "y":2.25}, - {"x":3.5, "y":2.25}, - {"x":4.5, "y":2.25}, - {"x":5.5, "y":2.25}, - {"x":6.5, "y":2.25}, - {"x":7.5, "y":2.25}, - {"x":8.5, "y":2.25}, - {"x":9.5, "y":2.25}, - {"x":10.5, "y":2.25}, - {"x":11.5, "y":2.25}, - {"x":12.5, "y":2.25}, - {"x":13.5, "y":2.25, "w":1.5}, - - {"x":15.5, "y":2.25}, - - {"x":0, "y":3.25, "w":1.75}, - {"x":1.75, "y":3.25}, - {"x":2.75, "y":3.25}, - {"x":3.75, "y":3.25}, - {"x":4.75, "y":3.25}, - {"x":5.75, "y":3.25}, - {"x":6.75, "y":3.25}, - {"x":7.75, "y":3.25}, - {"x":8.75, "y":3.25}, - {"x":9.75, "y":3.25}, - {"x":10.75, "y":3.25}, - {"x":11.75, "y":3.25}, - {"x":12.75, "y":3.25, "w":2.25}, - - {"x":15.5, "y":3.25}, - - {"x":0, "y":4.25, "w":2.25}, - {"x":2.25, "y":4.25}, - {"x":3.25, "y":4.25}, - {"x":4.25, "y":4.25}, - {"x":5.25, "y":4.25}, - {"x":6.25, "y":4.25}, - {"x":7.25, "y":4.25}, - {"x":8.25, "y":4.25}, - {"x":9.25, "y":4.25}, - {"x":10.25, "y":4.25}, - {"x":11.25, "y":4.25}, - {"x":12.25, "y":4.25, "w":1.75}, - - {"x":14.25, "y":4.5}, - - {"x":15.5, "y":4.25}, - - {"x":0, "y":5.25, "w":1.25}, - {"x":1.25, "y":5.25, "w":1.25}, - {"x":2.5, "y":5.25, "w":1.25}, - {"x":3.75, "y":5.25, "w":6.25}, - {"x":10, "y":5.25}, - {"x":11, "y":5.25}, - {"x":12, "y":5.25}, - - {"x":13.25, "y":5.5}, - {"x":14.25, "y":5.5}, - {"x":15.25, "y":5.5} - ] - }, - "LAYOUT_iso": { - "layout": [ - {"label":"Esc", "x":0, "y":0}, - - {"label":"F1", "x":1.25, "y":0}, - {"label":"F2", "x":2.25, "y":0}, - {"label":"F3", "x":3.25, "y":0}, - {"label":"F4", "x":4.25, "y":0}, - - {"label":"F5", "x":5.5, "y":0}, - {"label":"F6", "x":6.5, "y":0}, - {"label":"F7", "x":7.5, "y":0}, - {"label":"F8", "x":8.5, "y":0}, - - {"label":"F9", "x":9.75, "y":0}, - {"label":"F10", "x":10.75, "y":0}, - {"label":"F11", "x":11.75, "y":0}, - {"label":"F12", "x":12.75, "y":0}, - - {"label":"Printscreen", "x":14, "y":0}, - {"label":"Rotary", "x":15.5, "y":0}, - - {"label":"`", "x":0, "y":1.25}, - {"label":"1", "x":1, "y":1.25}, - {"label":"2", "x":2, "y":1.25}, - {"label":"3", "x":3, "y":1.25}, - {"label":"4", "x":4, "y":1.25}, - {"label":"5", "x":5, "y":1.25}, - {"label":"6", "x":6, "y":1.25}, - {"label":"7", "x":7, "y":1.25}, - {"label":"8", "x":8, "y":1.25}, - {"label":"9", "x":9, "y":1.25}, - {"label":"0", "x":10, "y":1.25}, - {"label":"-", "x":11, "y":1.25}, - {"label":"=", "x":12, "y":1.25}, - {"label":"Backspace", "x":13, "y":1.25, "w":2}, - - {"label":"Delete", "x":15.5, "y":1.25}, - - {"label":"Tab", "x":0, "y":2.25, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.25}, - {"label":"W", "x":2.5, "y":2.25}, - {"label":"E", "x":3.5, "y":2.25}, - {"label":"R", "x":4.5, "y":2.25}, - {"label":"T", "x":5.5, "y":2.25}, - {"label":"Y", "x":6.5, "y":2.25}, - {"label":"U", "x":7.5, "y":2.25}, - {"label":"I", "x":8.5, "y":2.25}, - {"label":"O", "x":9.5, "y":2.25}, - {"label":"P", "x":10.5, "y":2.25}, - {"label":"[", "x":11.5, "y":2.25}, - {"label":"]", "x":12.5, "y":2.25}, - - {"label":"Page Up", "x":15.5, "y":2.25}, - - {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, - {"label":"A", "x":1.75, "y":3.25}, - {"label":"S", "x":2.75, "y":3.25}, - {"label":"D", "x":3.75, "y":3.25}, - {"label":"F", "x":4.75, "y":3.25}, - {"label":"G", "x":5.75, "y":3.25}, - {"label":"H", "x":6.75, "y":3.25}, - {"label":"J", "x":7.75, "y":3.25}, - {"label":"K", "x":8.75, "y":3.25}, - {"label":"L", "x":9.75, "y":3.25}, - {"label":";", "x":10.75, "y":3.25}, - {"label":"'", "x":11.75, "y":3.25}, - {"label":"Iso #", "x":12.75, "y":3.25}, - {"label":"Enter", "x":13.75, "y":2.25, "w":1.25, "h":2}, - - {"label":"Page Down", "x":15.5, "y":3.25}, - - {"label":"Shift", "x":0, "y":4.25, "w":1.25}, - {"label":"Iso \\", "x":1.25, "y":4.25}, - {"label":"Z", "x":2.25, "y":4.25}, - {"label":"X", "x":3.25, "y":4.25}, - {"label":"C", "x":4.25, "y":4.25}, - {"label":"V", "x":5.25, "y":4.25}, - {"label":"B", "x":6.25, "y":4.25}, - {"label":"N", "x":7.25, "y":4.25}, - {"label":"M", "x":8.25, "y":4.25}, - {"label":",", "x":9.25, "y":4.25}, - {"label":".", "x":10.25, "y":4.25}, - {"label":"/", "x":11.25, "y":4.25}, - {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, - - {"label":"Up", "x":14.25, "y":4.5}, - - {"label":"End", "x":15.5, "y":4.25}, - - {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, - {"label":"GUI", "x":1.25, "y":5.25, "w":1.25}, - {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, - {"label":"Space", "x":3.75, "y":5.25, "w":6.25}, - {"label":"Alt", "x":10, "y":5.25}, - {"label":"Fn", "x":11, "y":5.25}, - {"label":"Ctrl", "x":12, "y":5.25}, - - {"label":"Left", "x":13.25, "y":5.5}, - {"label":"Down", "x":14.25, "y":5.5}, - {"label":"Right", "x":15.25, "y":5.5} - ] - } - } -} diff --git a/keyboards/gmmk/pro/iso/config.h b/keyboards/gmmk/pro/iso/config.h new file mode 100644 index 000000000..26626ccfc --- /dev/null +++ b/keyboards/gmmk/pro/iso/config.h @@ -0,0 +1,23 @@ +/* Copyright 2021 Jasper Chan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +#define DRIVER_1_LED_TOTAL 66 +#define DRIVER_2_LED_TOTAL 33 +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/gmmk/pro/iso/info.json b/keyboards/gmmk/pro/iso/info.json new file mode 100644 index 000000000..2d4a22c9a --- /dev/null +++ b/keyboards/gmmk/pro/iso/info.json @@ -0,0 +1,112 @@ +{ + "keyboard_name": "GMMK Pro (ISO)", + "url": "https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black-reservation", + "maintainer": "GloriousThrall", + "width": 16.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + + {"label":"F1", "x":1.25, "y":0}, + {"label":"F2", "x":2.25, "y":0}, + {"label":"F3", "x":3.25, "y":0}, + {"label":"F4", "x":4.25, "y":0}, + + {"label":"F5", "x":5.5, "y":0}, + {"label":"F6", "x":6.5, "y":0}, + {"label":"F7", "x":7.5, "y":0}, + {"label":"F8", "x":8.5, "y":0}, + + {"label":"F9", "x":9.75, "y":0}, + {"label":"F10", "x":10.75, "y":0}, + {"label":"F11", "x":11.75, "y":0}, + {"label":"F12", "x":12.75, "y":0}, + + {"label":"Printscreen", "x":14, "y":0}, + {"label":"Rotary", "x":15.5, "y":0}, + + {"label":"`", "x":0, "y":1.25}, + {"label":"1", "x":1, "y":1.25}, + {"label":"2", "x":2, "y":1.25}, + {"label":"3", "x":3, "y":1.25}, + {"label":"4", "x":4, "y":1.25}, + {"label":"5", "x":5, "y":1.25}, + {"label":"6", "x":6, "y":1.25}, + {"label":"7", "x":7, "y":1.25}, + {"label":"8", "x":8, "y":1.25}, + {"label":"9", "x":9, "y":1.25}, + {"label":"0", "x":10, "y":1.25}, + {"label":"-", "x":11, "y":1.25}, + {"label":"=", "x":12, "y":1.25}, + {"label":"Backspace", "x":13, "y":1.25, "w":2}, + + {"label":"Delete", "x":15.5, "y":1.25}, + + {"label":"Tab", "x":0, "y":2.25, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.25}, + {"label":"W", "x":2.5, "y":2.25}, + {"label":"E", "x":3.5, "y":2.25}, + {"label":"R", "x":4.5, "y":2.25}, + {"label":"T", "x":5.5, "y":2.25}, + {"label":"Y", "x":6.5, "y":2.25}, + {"label":"U", "x":7.5, "y":2.25}, + {"label":"I", "x":8.5, "y":2.25}, + {"label":"O", "x":9.5, "y":2.25}, + {"label":"P", "x":10.5, "y":2.25}, + {"label":"[", "x":11.5, "y":2.25}, + {"label":"]", "x":12.5, "y":2.25}, + + {"label":"Page Up", "x":15.5, "y":2.25}, + + {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, + {"label":"A", "x":1.75, "y":3.25}, + {"label":"S", "x":2.75, "y":3.25}, + {"label":"D", "x":3.75, "y":3.25}, + {"label":"F", "x":4.75, "y":3.25}, + {"label":"G", "x":5.75, "y":3.25}, + {"label":"H", "x":6.75, "y":3.25}, + {"label":"J", "x":7.75, "y":3.25}, + {"label":"K", "x":8.75, "y":3.25}, + {"label":"L", "x":9.75, "y":3.25}, + {"label":";", "x":10.75, "y":3.25}, + {"label":"'", "x":11.75, "y":3.25}, + {"label":"Iso #", "x":12.75, "y":3.25}, + {"label":"Enter", "x":13.75, "y":2.25, "w":1.25, "h":2}, + + {"label":"Page Down", "x":15.5, "y":3.25}, + + {"label":"Shift", "x":0, "y":4.25, "w":1.25}, + {"label":"Iso \\", "x":1.25, "y":4.25}, + {"label":"Z", "x":2.25, "y":4.25}, + {"label":"X", "x":3.25, "y":4.25}, + {"label":"C", "x":4.25, "y":4.25}, + {"label":"V", "x":5.25, "y":4.25}, + {"label":"B", "x":6.25, "y":4.25}, + {"label":"N", "x":7.25, "y":4.25}, + {"label":"M", "x":8.25, "y":4.25}, + {"label":",", "x":9.25, "y":4.25}, + {"label":".", "x":10.25, "y":4.25}, + {"label":"/", "x":11.25, "y":4.25}, + {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, + + {"label":"Up", "x":14.25, "y":4.5}, + + {"label":"End", "x":15.5, "y":4.25}, + + {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5.25, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.25, "w":6.25}, + {"label":"Alt", "x":10, "y":5.25}, + {"label":"Fn", "x":11, "y":5.25}, + {"label":"Ctrl", "x":12, "y":5.25}, + + {"label":"Left", "x":13.25, "y":5.5}, + {"label":"Down", "x":14.25, "y":5.5}, + {"label":"Right", "x":15.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/gmmk/pro/iso/iso.c b/keyboards/gmmk/pro/iso/iso.c new file mode 100644 index 000000000..fa57f1ca9 --- /dev/null +++ b/keyboards/gmmk/pro/iso/iso.c @@ -0,0 +1,243 @@ +/* Copyright 2021 Gigahawk + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "iso.h" + +#ifdef RGB_MATRIX_ENABLE +// clang-format off +led_config_t g_led_config = {{ + { 4, NO_LED, NO_LED, 96, 65, 80, 5, 28 }, + { 8, 2, 9, 0, 10, 76, 1, 7 }, + { 14, 3, 15, 67, 16, 87, 6, 13 }, + { 20, 18, 21, 23, 22, 94, 12, 19 }, + { 25, 30, 26, 31, 27, 32, 29, 24 }, + { 41, 36, 42, 37, 43, 38, 35, 40 }, + { 46, 90, 47, 34, 48, 73, 79, 45 }, + { 52, 39, 53, 98, 54, 83, 44, 51 }, + { 58, 63, 59, 64, 95, 60, 62, 57 }, + { 11, 91, 55, 17, 33, 49, NO_LED, 70 }, + { NO_LED, 86, NO_LED, 61, 97, 66, 50, 56 } +}, { + {0, 0}, // 0, ESC, k13 + {0, 15}, // 1, `, k16 + {4, 26}, // 2, Tab, k11 + {5, 38}, // 3, Caps, k21 + {2, 49}, // 4, Sh_L, k00 + {2, 61}, // 5, Ct_L, k06 + {18, 0}, // 6, F1, k26 + {14, 15}, // 7, 1, k17 + {22, 26}, // 8, Q, k10 + {25, 38}, // 9, A, k12 + {33, 49}, // 10, Z, k14 + {20, 61}, // 11, Win_L, k90 + {33, 0}, // 12, F2, k36 + {29, 15}, // 13, 2, k27 + {36, 26}, // 14, W, k20 + {40, 38}, // 15, S, k22 + {47, 49}, // 16, X, k24 + {38, 61}, // 17, Alt_L, k93 + {47, 0}, // 18, F3, k31 + {43, 15}, // 19, 3, k37 + {51, 26}, // 20, E, k30 + {54, 38}, // 21, D, k32 + {61, 49}, // 22, C, k34 + {61, 0}, // 23, F4, k33 + {58, 15}, // 24, 4, k47 + {65, 26}, // 25, R, k40 + {69, 38}, // 26, F, k42 + {76, 49}, // 27, V, k44 + {79, 0}, // 28, F5, k07 + {72, 15}, // 29, 5, k46 + {79, 26}, // 30, T, k41 + {83, 38}, // 31, G, k43 + {90, 49}, // 32, B, k45 + {92, 61}, // 33, SPACE, k94 + {94, 0}, // 34, F6, k63 + {87, 15}, // 35, 6, k56 + {94, 26}, // 36, Y, k51 + {98, 38}, // 37, H, k53 + {105, 49}, // 38, N, k55 + {108, 0}, // 39, F7, k71 + {101, 15}, // 40, 7, k57 + {108, 26}, // 41, U, k50 + {112, 38}, // 42, J, k52 + {119, 49}, // 43, M, k54 + {123, 0}, // 44, F8, k76 + {116, 15}, // 45, 8, k67 + {123, 26}, // 46, I, k60 + {126, 38}, // 47, K, k62 + {134, 49}, // 48, ,, k64 + {145, 61}, // 49, Alt_R, k95 + {141, 0}, // 50, F9, ka6 + {130, 15}, // 51, 9, k77 + {137, 26}, // 52, O, k70 + {141, 38}, // 53, L, k72 + {148, 49}, // 54, ., k74 + {159, 61}, // 55, FN, k92 + {155, 0}, // 56, F10, ka7 + {145, 15}, // 57, 0, k87 + {152, 26}, // 58, P, k80 + {155, 38}, // 59, ;, k82 + {163, 49}, // 60, /, k85 + {170, 0}, // 61, F11, ka3 + {159, 15}, // 62, -, k86 + {166, 26}, // 63, [, k81 + {170, 38}, // 64, ", k83 + {173, 61}, // 65, Ct_R, k04 + {184, 0}, // 66, F12, ka5 + {18, 49}, // 67, \, k23 + {0, 8}, // 68, LED, l01 + {224, 8}, // 69, LED, l11 + {202, 0}, // 70, Prt, k97 + {0, 15}, // 71, LED, l02 + {224, 15}, // 72, LED, l12 + {224, 15}, // 73, Del, k65 + {0, 21}, // 74, LED, l03 + {224, 21}, // 75, LED, l13 + {224, 26}, // 76, PgUp, k15 + {0, 28}, // 77, LED, l04 + {224, 28}, // 78, LED, l14 + {173, 15}, // 79, =, k66 + {220, 64}, // 80, Right, k05 + {0, 35}, // 81, LED, l05 + {224, 35}, // 82, LED, l15 + {224, 49}, // 83, End, k75 + {0, 42}, // 84, LED, l06 + {224, 42}, // 85, LED, l16 + {195, 15}, // 86, BSpc, ka1 + {224, 38}, // 87, PgDn, k25 + {0, 48}, // 88, LED, l07 + {224, 48}, // 89, LED, l17 + {181, 26}, // 90, ], k61 + {182, 49}, // 91, Sh_R, k91 + {0, 55}, // 92, LED, l08 + {224, 55}, // 93, LED, l18 + {206, 52}, // 94, Up, k35 + {184, 38}, // 95, #, k84 + {191, 64}, // 96, Left, k03 + {201, 26}, // 97, Enter, ka4 + {206, 64}, // 98, Down, k73 +}, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 4, 2, 2, 4, 2, + 2, 4, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 4, 4 +}}; + +const aw_led g_aw_leds[DRIVER_LED_TOTAL] = { + {0, CS1_SW1, CS2_SW1, CS3_SW1}, // 0, ESC, k13 + {0, CS4_SW1, CS5_SW1, CS6_SW1}, // 1, ~, k16 + {0, CS7_SW1, CS8_SW1, CS9_SW1}, // 2, Tab, k11 + {0, CS10_SW1, CS11_SW1, CS12_SW1}, // 3, Caps, k21 + {0, CS13_SW1, CS14_SW1, CS15_SW1}, // 4, Sh_L, k00 + {0, CS16_SW1, CS17_SW1, CS18_SW1}, // 5, Ct_L, k06 + {0, CS1_SW2, CS2_SW2, CS3_SW2}, // 6, F1, k26 + {0, CS4_SW2, CS5_SW2, CS6_SW2}, // 7, 1, k17 + {0, CS7_SW2, CS8_SW2, CS9_SW2}, // 8, Q, k10 + {0, CS10_SW2, CS11_SW2, CS12_SW2}, // 9, A, k12 + {0, CS13_SW2, CS14_SW2, CS15_SW2}, // 10, Z, k14 + {0, CS16_SW2, CS17_SW2, CS18_SW2}, // 11, Win_L, k90 + {0, CS1_SW3, CS2_SW3, CS3_SW3}, // 12, F2, k36 + {0, CS4_SW3, CS5_SW3, CS6_SW3}, // 13, 2, k27 + {0, CS7_SW3, CS8_SW3, CS9_SW3}, // 14, W, k20 + {0, CS10_SW3, CS11_SW3, CS12_SW3}, // 15, S, k22 + {0, CS13_SW3, CS14_SW3, CS15_SW3}, // 16, X, k24 + {0, CS16_SW3, CS17_SW3, CS18_SW3}, // 17, Alt_L, k93 + {0, CS1_SW4, CS2_SW4, CS3_SW4}, // 18, F3, k31 + {0, CS4_SW4, CS5_SW4, CS6_SW4}, // 19, 3, k37 + {0, CS7_SW4, CS8_SW4, CS9_SW4}, // 20, E, k30 + {0, CS10_SW4, CS11_SW4, CS12_SW4}, // 21, D, k32 + {0, CS13_SW4, CS14_SW4, CS15_SW4}, // 22, C, k34 + {0, CS1_SW5, CS2_SW5, CS3_SW5}, // 23, F4, k33 + {0, CS4_SW5, CS5_SW5, CS6_SW5}, // 24, 4, k47 + {0, CS7_SW5, CS8_SW5, CS9_SW5}, // 25, R, k40 + {0, CS10_SW5, CS11_SW5, CS12_SW5}, // 26, F, k42 + {0, CS13_SW5, CS14_SW5, CS15_SW5}, // 27, V, k44 + {0, CS1_SW6, CS2_SW6, CS3_SW6}, // 28, F5, k07 + {0, CS4_SW6, CS5_SW6, CS6_SW6}, // 29, 5, k46 + {0, CS7_SW6, CS8_SW6, CS9_SW6}, // 30, T, k41 + {0, CS10_SW6, CS11_SW6, CS12_SW6}, // 31, G, k43 + {0, CS13_SW6, CS14_SW6, CS15_SW6}, // 32, B, k45 + {0, CS16_SW6, CS17_SW6, CS18_SW6}, // 33, SPACE, k94 + {0, CS1_SW7, CS2_SW7, CS3_SW7}, // 34, F6, k63 + {0, CS4_SW7, CS5_SW7, CS6_SW7}, // 35, 6, k56 + {0, CS7_SW7, CS8_SW7, CS9_SW7}, // 36, Y, k51 + {0, CS10_SW7, CS11_SW7, CS12_SW7}, // 37, H, k53 + {0, CS13_SW7, CS14_SW7, CS15_SW7}, // 38, N, k55 + {0, CS1_SW8, CS2_SW8, CS3_SW8}, // 39, F7, k71 + {0, CS4_SW8, CS5_SW8, CS6_SW8}, // 40, 7, k57 + {0, CS7_SW8, CS8_SW8, CS9_SW8}, // 41, U, k50 + {0, CS10_SW8, CS11_SW8, CS12_SW8}, // 42, J, k52 + {0, CS13_SW8, CS14_SW8, CS15_SW8}, // 43, M, k54 + {0, CS1_SW9, CS2_SW9, CS3_SW9}, // 44, F8, k76 + {0, CS4_SW9, CS5_SW9, CS6_SW9}, // 45, 8, k67 + {0, CS7_SW9, CS8_SW9, CS9_SW9}, // 46, I, k60 + {0, CS10_SW9, CS11_SW9, CS12_SW9}, // 47, K, k62 + {0, CS13_SW9, CS14_SW9, CS15_SW9}, // 48, ,, k64 + {0, CS16_SW9, CS17_SW9, CS18_SW9}, // 49, Alt_R, k95 + {0, CS1_SW10, CS2_SW10, CS3_SW10}, // 50, F9, ka6 + {0, CS4_SW10, CS5_SW10, CS6_SW10}, // 51, 9, k77 + {0, CS7_SW10, CS8_SW10, CS9_SW10}, // 52, O, k70 + {0, CS10_SW10, CS11_SW10, CS12_SW10}, // 53, L, k72 + {0, CS13_SW10, CS14_SW10, CS15_SW10}, // 54, ., k74 + {0, CS16_SW10, CS17_SW10, CS18_SW10}, // 55, FN, k92 + {0, CS1_SW11, CS2_SW11, CS3_SW11}, // 56, F10, ka7 + {0, CS4_SW11, CS5_SW11, CS6_SW11}, // 57, 0, k87 + {0, CS7_SW11, CS8_SW11, CS9_SW11}, // 58, P, k80 + {0, CS10_SW11, CS11_SW11, CS12_SW11}, // 59, ;, k82 + {0, CS13_SW11, CS14_SW11, CS15_SW11}, // 60, ?, k85 + {0, CS1_SW12, CS2_SW12, CS3_SW12}, // 61, F11, ka3 + {0, CS4_SW12, CS5_SW12, CS6_SW12}, // 62, -, k86 + {0, CS7_SW12, CS8_SW12, CS9_SW12}, // 63, [, k81 + {0, CS10_SW12, CS11_SW12, CS12_SW12}, // 64, ", k83 + {0, CS16_SW12, CS17_SW12, CS18_SW12}, // 65, Ct_R, k04 + + {1, CS1_SW1, CS2_SW1, CS3_SW1}, // 66, F12, ka5 + {1, CS4_SW1, CS5_SW1, CS6_SW1}, // 67, \, k23 + {1, CS13_SW1, CS14_SW1, CS15_SW1}, // 68, LED, l01 + {1, CS16_SW1, CS17_SW1, CS18_SW1}, // 69, LED, l11 + {1, CS4_SW2, CS5_SW2, CS6_SW2}, // 70, Prt, k97 + {1, CS13_SW2, CS14_SW2, CS15_SW2}, // 71, LED, l02 + {1, CS16_SW2, CS17_SW2, CS18_SW2}, // 72, LED, l12 + {1, CS4_SW3, CS5_SW3, CS6_SW3}, // 73, Del, k65 + {1, CS13_SW3, CS14_SW3, CS15_SW3}, // 74, LED, l03 + {1, CS16_SW3, CS17_SW3, CS18_SW3}, // 75, LED, l13 + {1, CS4_SW4, CS5_SW4, CS6_SW4}, // 76, PgUp, k15 + {1, CS13_SW4, CS14_SW4, CS15_SW4}, // 77, LED, l04 + {1, CS16_SW4, CS17_SW4, CS18_SW4}, // 78, LED, l14 + {1, CS1_SW5, CS2_SW5, CS3_SW5}, // 79, =, k66 + {1, CS10_SW5, CS11_SW5, CS12_SW5}, // 80, Right, k05 + {1, CS13_SW5, CS14_SW5, CS15_SW5}, // 81, LED, l05 + {1, CS16_SW5, CS17_SW5, CS18_SW5}, // 82, LED, l15 + {1, CS4_SW6, CS5_SW6, CS6_SW6}, // 83, End, k75 + {1, CS13_SW6, CS14_SW6, CS15_SW6}, // 84, LED, l06 + {1, CS16_SW6, CS17_SW6, CS18_SW6}, // 85, LED, l16 + {1, CS1_SW7, CS2_SW7, CS3_SW7}, // 86, BSpc, ka1 + {1, CS4_SW7, CS5_SW7, CS6_SW7}, // 87, PgDn, k25 + {1, CS13_SW7, CS14_SW7, CS15_SW7}, // 88, LED, l07 + {1, CS16_SW7, CS17_SW7, CS18_SW7}, // 89, LED, l17 + {1, CS1_SW8, CS2_SW8, CS3_SW8}, // 90, ], k61 + {1, CS4_SW8, CS5_SW8, CS6_SW8}, // 91, Sh_R, k91 + {1, CS13_SW8, CS14_SW8, CS15_SW8}, // 92, LED, l08 + {1, CS16_SW8, CS17_SW8, CS18_SW8}, // 93, LED, l18 + {1, CS4_SW9, CS5_SW9, CS6_SW9}, // 94, Up, k35 + {1, CS1_SW10, CS2_SW10, CS3_SW10}, // 95, #, k84 + {1, CS4_SW10, CS5_SW10, CS6_SW10}, // 96, Left, k03 + {1, CS1_SW11, CS2_SW11, CS3_SW11}, // 97, Enter, ka4 + {1, CS4_SW11, CS5_SW11, CS6_SW11}, // 98, Down, k73 +}; +// clang-format on +#endif diff --git a/keyboards/gmmk/pro/iso/iso.h b/keyboards/gmmk/pro/iso/iso.h new file mode 100644 index 000000000..353bcbe87 --- /dev/null +++ b/keyboards/gmmk/pro/iso/iso.h @@ -0,0 +1,52 @@ +/* Copyright 2021 Gigahawk + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "pro.h" + +#define ___ KC_NO + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ` 1 2 3 4 5 6 7 8 9 0 - = BSpc Del +// Tab Q W E R T Y U I O P [ ] PgUp +// Caps A S D F G H J K L ; ' # Enter PgDn +// Sh_L \ Z X C V B N M , . / Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + +// clang-format off +#define LAYOUT( \ + k13, k26, k36, k31, k33, k07, k63, k71, k76, ka6, ka7, ka3, ka5, k97, k01, \ + k16, k17, k27, k37, k47, k46, k56, k57, k67, k77, k87, k86, k66, ka1, k65, \ + k11, k10, k20, k30, k40, k41, k51, k50, k60, k70, k80, k81, k61, k15, \ + k21, k12, k22, k32, k42, k43, k53, k52, k62, k72, k82, k83, k84, ka4, k25, \ + k00, k23, k14, k24, k34, k44, k45, k55, k54, k64, k74, k85, k91, k35, k75, \ + k06, k90, k93, k94, k95, k92, k04, k03, k73, k05 \ +) \ +{ \ + { k00, k01, ___, k03, k04, k05, k06, k07}, \ + { k10, k11, k12, k13, k14, k15, k16, k17}, \ + { k20, k21, k22, k23, k24, k25, k26, k27}, \ + { k30, k31, k32, k33, k34, k35, k36, k37}, \ + { k40, k41, k42, k43, k44, k45, k46, k47}, \ + { k50, k51, k52, k53, k54, k55, k56, k57}, \ + { k60, k61, k62, k63, k64, k65, k66, k67}, \ + { k70, k71, k72, k73, k74, k75, k76, k77}, \ + { k80, k81, k82, k83, k84, k85, k86, k87}, \ + { k90, k91, k92, k93, k94, k95, ___, k97}, \ + { ___, ka1, ___, ka3, ka4, ka5, ka6, ka7} \ +} +// clang-format on diff --git a/keyboards/gmmk/pro/iso/keymaps/default/keymap.c b/keyboards/gmmk/pro/iso/keymaps/default/keymap.c new file mode 100644 index 000000000..67b95c755 --- /dev/null +++ b/keyboards/gmmk/pro/iso/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2021 Glorious, LLC + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] PgUp +// Caps A S D F G H J K L ; " # Enter PgDn +// Sh_L / Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backspace. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + // + // This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO). + // Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience. + // Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts. + [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_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_HUI, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI + ), + + +}; +// clang-format on + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} +#endif diff --git a/keyboards/gmmk/pro/iso/keymaps/via/keymap.c b/keyboards/gmmk/pro/iso/keymaps/via/keymap.c new file mode 100644 index 000000000..c83af17fe --- /dev/null +++ b/keyboards/gmmk/pro/iso/keymaps/via/keymap.c @@ -0,0 +1,91 @@ +/* Copyright 2021 Glorious, LLC + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] PgUp +// Caps A S D F G H J K L ; " # Enter PgDn +// Sh_L / Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + + + // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without + // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB + // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI + // if that's your preference. + // + // To put the keyboard in bootloader mode, use FN+backspace. If you accidentally put it into bootloader, you can just unplug the USB cable and + // it'll be back to normal when you plug it back in. + // + // This keyboard defaults to 6KRO instead of NKRO for compatibility reasons (some KVMs and BIOSes are incompatible with NKRO). + // Since this is, among other things, a "gaming" keyboard, a key combination to enable NKRO on the fly is provided for convenience. + // Press Fn+N to toggle between 6KRO and NKRO. This setting is persisted to the EEPROM and thus persists between restarts. + [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_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + _______, KC_MYCM, KC_WHOM, KC_CALC, KC_MSEL, KC_MPRV, KC_MNXT, KC_MPLY, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, + _______, _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, RGB_HUI, _______, _______, _______, NK_TOGG, _______, _______, _______, _______, _______, RGB_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_RMOD, RGB_SPI + ), + + + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + +}; +// clang-format on + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} +#endif // ENCODER_ENABLE diff --git a/keyboards/xd68/keymaps/via/rules.mk b/keyboards/gmmk/pro/iso/keymaps/via/rules.mk similarity index 100% rename from keyboards/xd68/keymaps/via/rules.mk rename to keyboards/gmmk/pro/iso/keymaps/via/rules.mk diff --git a/keyboards/gmmk/pro/iso/readme.md b/keyboards/gmmk/pro/iso/readme.md new file mode 100644 index 000000000..62dbee5d0 --- /dev/null +++ b/keyboards/gmmk/pro/iso/readme.md @@ -0,0 +1,37 @@ +# GMMK PRO (ISO) + +A tenkeyless 75% keyboard made and sold by Glorious LLC. Equipped with the STM32 ARM Cortex-M4 microcontroller, with support for rotary encoders and three additional layouts. [More info at Glorious](https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black-reservation) + +* Keyboard Maintainer: [GloriousThrall](https://github.com/GloriousThrall) +* Hardware Supported: GMMK Pro +* Hardware Availability: [GloriousPCGaming.com](https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black-reservation) + +Make example for this keyboard (after setting up your build environment): + + make gmmk/pro/iso:default + +Flashing example for this keyboard: + + make gmmk/pro/iso:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Hold the Reset switch mounted on the bottom side of the PCB while connecting the USB cable +* Hold the Escape key while connecting the USB cable (also erases persistent settings) +* Fn+Backspace will reset the board to bootloader mode if you have flashed the default QMK keymap + +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). + +## Case Screw Replacements + +Many users report stripped case screws when disassembling the board. + +The stock case screws are: +* Thread: M2 +* Thread length: ~5 mm +* Head diameter: ~3.8 mm +* Head counterbore diameter: ~4.0 mm +* Head counterbore depth: ~1.9 mm + +Most M2x5mm screws should fit fine, although it's best to ensure that the screw head will fit inside the counterbore. +For reference, [this hex socket head screw](https://www.mcmaster.com/91292A005/) from McMaster-Carr should fit nearly flush (head will protrude above the counterbore by ~0.1 mm). diff --git a/keyboards/gmmk/pro/iso/rules.mk b/keyboards/gmmk/pro/iso/rules.mk new file mode 100644 index 000000000..f42f92513 --- /dev/null +++ b/keyboards/gmmk/pro/iso/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = STM32F303 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = AW20216 diff --git a/keyboards/gmmk/pro/keymaps/default/keymap.c b/keyboards/gmmk/pro/keymaps/default/keymap.c deleted file mode 100644 index b08400cd8..000000000 --- a/keyboards/gmmk/pro/keymaps/default/keymap.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright 2021 Glorious, LLC - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) -// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del -// Tab Q W E R T Y U I O P [ ] \ PgUp -// Caps A S D F G H J K L ; " Enter PgDn -// Sh_L Z X C V B N M , . ? Sh_R Up End -// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right - - - // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without - // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB - // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI - // if that's your preference. - // - // To put the keyboard in bootloader mode, use FN+backslash. If you accidentally put it into bootloader, you can just unplug the USB cable and - // it'll be back to normal when you plug it back in. - [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_MUTE, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - - [1] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - -}; - - -bool encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - return true; -} diff --git a/keyboards/gmmk/pro/keymaps/iso/keymap.c b/keyboards/gmmk/pro/keymaps/iso/keymap.c deleted file mode 100644 index 402becbe6..000000000 --- a/keyboards/gmmk/pro/keymaps/iso/keymap.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright 2021 Glorious, LLC - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) -// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del -// Tab Q W E R T Y U I O P [ ] PgUp -// Caps A S D F G H J K L ; " # Enter PgDn -// Sh_L / Z X C V B N M , . ? Sh_R Up End -// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right - - - // The FN key by default maps to a momentary toggle to layer 1 to provide access to the RESET key (to put the board into bootloader mode). Without - // this mapping, you have to open the case to hit the button on the bottom of the PCB (near the USB cable attachment) while plugging in the USB - // cable to get the board into bootloader mode - definitely not fun when you're working on your QMK builds. Remove this and put it back to KC_RGUI - // if that's your preference. - // - // To put the keyboard in bootloader mode, use FN+backspace. If you accidentally put it into bootloader, you can just unplug the USB cable and - // it'll be back to normal when you plug it back in. - [0] = LAYOUT_iso( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_MUTE, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - - [1] = LAYOUT_iso( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - -}; - - -bool encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - return true; -} diff --git a/keyboards/gmmk/pro/keymaps/jonavin/config.h b/keyboards/gmmk/pro/keymaps/jonavin/config.h deleted file mode 100644 index b77cb05f5..000000000 --- a/keyboards/gmmk/pro/keymaps/jonavin/config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright 2021 Jonavin Eng - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define TAPPING_TOGGLE 2 -// TT set to two taps - -/* Handle GRAVESC combo keys */ -#define GRAVE_ESC_ALT_OVERRIDE - //Always send Escape if Alt is pressed -#define GRAVE_ESC_CTRL_OVERRIDE - //Always send Escape if Control is pressed - -#define TAPPING_TERM 180 - -#ifdef RGB_MATRIX_ENABLE - #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR - #define RGB_DISABLE_WHEN_USB_SUSPENDED true -#endif diff --git a/keyboards/gmmk/pro/keymaps/jonavin/rules.mk b/keyboards/gmmk/pro/keymaps/jonavin/rules.mk deleted file mode 100644 index e17edf614..000000000 --- a/keyboards/gmmk/pro/keymaps/jonavin/rules.mk +++ /dev/null @@ -1,9 +0,0 @@ -VIA_ENABLE = yes -MOUSEKEY_ENABLE = no -TAP_DANCE_ENABLE = yes -BOOTMAGIC_ENABLE = lite - -TD_LSFT_CAPSLOCK_ENABLE = yes -IDLE_TIMEOUT_ENABLE = yes -STARTUP_NUMLOCK_ON = yes -ENCODER_DEFAULTACTIONS_ENABLE = yes diff --git a/keyboards/gmmk/pro/keymaps/mike1808/.gitignore b/keyboards/gmmk/pro/keymaps/mike1808/.gitignore new file mode 100644 index 000000000..03b2b4666 --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/.gitignore @@ -0,0 +1 @@ +secrets.h diff --git a/keyboards/gmmk/pro/keymaps/mike1808/README.md b/keyboards/gmmk/pro/keymaps/mike1808/README.md new file mode 100644 index 000000000..cb1723988 --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/README.md @@ -0,0 +1,19 @@ +QMK layout for gmmk/pro +======================= + +## Secrets +The format is the same as [drashna's](../../../../users/drashna/readme_secrets.md) secrets implementation. Create a `secret.h` and define your secrets like this: + +```c +static const char* secrets[] = {"secret1", "secret2", "secret3", "secret4", "secret5"}; +``` + +## Rotary encoder knob +You can hookup your encoder functions by defining new encoder states in [encoder.h](./encoder.h), then in [encoder.c](./encoder.c) assign static variable `state` your new state depending on your desired condition and add callbacks to `encoder_mapping` array. + +## RGB Matrix Ledmaps +RGB Matrix ledmaps is the future allowing you assign colors to individual keys on every keymap layer. + +You can see some examples of my usage in the bottom of [keymap.c](./keymap.c). + +Color defines are just HSV colors wrapped in curly braces, like `#define RED { HSV_RED }`. diff --git a/keyboards/gmmk/pro/keymaps/mike1808/config.h b/keyboards/gmmk/pro/keymaps/mike1808/config.h new file mode 100644 index 000000000..46719e3a7 --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/config.h @@ -0,0 +1,31 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 COMBO_COUNT 1 +#define COMBO_TERM 100 + +#define RGB_MATRIX_KEYPRESSES +#define RGB_DISABLE_WHEN_USB_SUSPENDED +#define RGB_DISABLE_TIMEOUT 90000 + +#define MACRO_TIMER 5 + +#define TAPPING_TOGGLE 3 + +#define WPM_SMOOTHING 0.1 + +// this is for macOS so keyboard can work after sleep +#define NO_USB_STARTUP_CHECK diff --git a/keyboards/gmmk/pro/keymaps/mike1808/encoder.c b/keyboards/gmmk/pro/keymaps/mike1808/encoder.c new file mode 100644 index 000000000..049f4df7e --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/encoder.c @@ -0,0 +1,111 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "encoder.h" +#include "mike1808.h" +#include "print.h" +#include "utils.h" +#include "process_record.h" +#include "rgb_matrix_ledmaps.h" + +static uint8_t state = ENCODER_DEFAULT; + +// clang-format off +const encoder_callback encoder_mapping[][2] = { + [ENCODER_VOLUME] = {&volume_up, &volume_down}, +#ifdef RGB_MATRIX_ENABLE + [ENCODER_RGB_HUE] = {&rgb_matrix_increase_hue_noeeprom, &rgb_matrix_decrease_hue_noeeprom}, + [ENCODER_RGB_SAT] = {&rgb_matrix_increase_sat_noeeprom, &rgb_matrix_decrease_sat_noeeprom}, + [ENCODER_RGB_VAL] = {&rgb_matrix_increase_val_noeeprom, &rgb_matrix_decrease_val_noeeprom}, + [ENCODER_RGB_EFFECT] = {&rgb_matrix_step_noeeprom, &rgb_matrix_step_reverse_noeeprom}, + [ENCODER_RGB_EFFECT_SPEED] = {&rgb_matrix_increase_speed_noeeprom, &rgb_matrix_decrease_speed_noeeprom}, +#endif // RGB_MATRIX_ENABLE +}; + +// clang-format on + +void volume_up() { tap_code(KC_VOLU); } + +void volume_down() { tap_code(KC_VOLD); } + +bool encoder_update_user(uint8_t index, bool clockwise) { + dprintf("current encoder state is: %d\n", state); + + if (clockwise) { + (*encoder_mapping[state][0])(); + } else { + (*encoder_mapping[state][1])(); + } + + return true; +} + +void handle_rgb_key(bool pressed) { + dprintf("handle_rgb_key %d\f", pressed); + + if (pressed) { + rgb_matrix_layers_disable(); + } else { + rgb_matrix_layers_enable(); + } +} + +static KeyPressState *rgb_state; + +void keyboard_post_init_encoder() { + rgb_state = NewKeyPressState(handle_rgb_key); +} + +bool process_record_encoder(uint16_t keycode, keyrecord_t *record) { +#ifdef RGB_MATRIX_ENABLE + switch (keycode) { + case KC_RGB_ENC_HUE ... KC_RGB_ENC_EFFECT: + if (record->event.pressed) { +# ifdef RGB_MATRIX_LEDMAPS_ENABLED + // disable layers so we can adjust RGB effects + rgb_state->press(rgb_state); +# endif // RGB_MATRIX_LEDMAPS_ENABLED + + switch (keycode) { + case KC_RGB_ENC_HUE: + state = ENCODER_RGB_HUE; + break; + case KC_RGB_ENC_SAT: + state = ENCODER_RGB_SAT; + break; + case KC_RGB_ENC_VAL: + state = ENCODER_RGB_VAL; + break; + case KC_RGB_ENC_EFFECT_SPEED: + state = ENCODER_RGB_EFFECT_SPEED; + break; + case KC_RGB_ENC_EFFECT: + state = ENCODER_RGB_EFFECT; + break; + } + } else { +# ifdef RGB_MATRIX_LEDMAPS_ENABLED + rgb_state->release(rgb_state); +# endif // RGB_MATRIX_LEDMAPS_ENABLED + state = ENCODER_DEFAULT; + store_rgb_state_to_eeprom(); + } + + return false; + } +#endif // RGB_MATRIX_ENABLE + + return true; +} diff --git a/keyboards/gmmk/pro/keymaps/mike1808/encoder.h b/keyboards/gmmk/pro/keymaps/mike1808/encoder.h new file mode 100644 index 000000000..204922730 --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/encoder.h @@ -0,0 +1,35 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// To add a new functionality define a new state here and then assign +// the handler to the `encoder_callback` +#include "quantum.h" + +enum encoder_state { + ENCODER_VOLUME = 0, + ENCODER_RGB_HUE, + ENCODER_RGB_SAT, + ENCODER_RGB_VAL, + ENCODER_RGB_EFFECT_SPEED, + ENCODER_RGB_EFFECT, +}; + +typedef void (*encoder_callback)(void); + +#define ENCODER_DEFAULT ENCODER_VOLUME + +void volume_up(void); +void volume_down(void); diff --git a/keyboards/gmmk/pro/keymaps/mike1808/fun.c b/keyboards/gmmk/pro/keymaps/mike1808/fun.c new file mode 100644 index 000000000..f553874eb --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/fun.c @@ -0,0 +1,49 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mike1808.h" +#include "print.h" + +static bool wpm_rgb_enabled = false; +static uint8_t rgb_mode; + +void rgb_matrix_indicators_keymap(void) { + if (wpm_rgb_enabled && rgb_matrix_is_enabled()) { + uint8_t wpm = get_current_wpm(); + dprintf("WPM = %d\n", wpm); + HSV hsv = rgb_matrix_get_hsv(); + hsv.h = wpm; + RGB rgb = hsv_to_rgb(hsv); + rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b); + } +} + +bool process_record_fun(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed && keycode == KC_WPM_RGB) { + if (wpm_rgb_enabled) { + wpm_rgb_enabled = false; + rgb_matrix_mode(rgb_mode); + } else { + wpm_rgb_enabled = true; + rgb_mode = rgb_matrix_get_mode(); + rgb_matrix_enable(); + rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR); + } + + return false; + } + + return true; +} diff --git a/keyboards/gmmk/pro/keymaps/mike1808/keymap.c b/keyboards/gmmk/pro/keymaps/mike1808/keymap.c new file mode 100644 index 000000000..30c59e941 --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/keymap.c @@ -0,0 +1,127 @@ +/* Copyright 2021 Glorious, LLC , Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mike1808.h" + +const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END}; + +combo_t key_combos[COMBO_COUNT] = { + [JK_ESC] = COMBO(jk_combo, KC_ESC), +}; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) +// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del +// Tab Q W E R T Y U I O P [ ] \ PgUp +// Caps A S D F G H J K L ; " Enter PgDn +// Sh_L Z X C V B N M , . ? Sh_R Up End +// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right + [LINUX] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, TT_FN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [WINDOWS] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [MACOS] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LALT, KC_LGUI, _______, _______, _______, _______, _______, _______, _______ + ), + + [FUNCTIONS] = LAYOUT( + _______, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_PSCR, _______, + _______, KC_LINX, KC_MAC, KC_WIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RST, _______, + KC_CAPS, _______, _______, _______, _______, OS_GIT, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_RGBH, KC_RGBS, KC_RGBV, KC_RGBE, KC_RGBP, KC_WRGB, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, RGB_TOG, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + + [GIT] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, G_DIFF, _______, _______, _______, _______, _______, _______, G_PULL, G_PUSH, _______, _______, _______, + _______, G_ADD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, G_CHECK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +#ifdef RGB_MATRIX_LEDMAPS_ENABLED + +#define ______ {0, 0, 0} + +const ledmap PROGMEM ledmaps[] = { + // LU = Left Underglow, RU = Right Underglow + // LU_1 ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) RU_1 + // LU_2 ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del RU_2 + // LU_3 Tab Q W E R T Y U I O P [ ] \ PgUp RU_3 + // LU_4 Caps A S D F G H J K L ; " Enter PgDn RU_4 + // LU_5 Sh_L Z X C V B N M , . ? Sh_R Up End RU_5 + // LU_6 Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right RU_6 + [LINUX] = RGB_MATRIX_LAYOUT_LEDMAP( + PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + PURPLE, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + PURPLE, ______, RED, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE + ), + [WINDOWS] = RGB_MATRIX_LAYOUT_LEDMAP( + GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + GREEN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + GREEN, ______, RED, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE + ), + [MACOS] = RGB_MATRIX_LAYOUT_LEDMAP( + YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + YELLOW, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + YELLOW, ______, ______, RED, ______, ______, ______, ______, ______, ______, ______, PURPLE + ), + + [FUNCTIONS] = RGB_MATRIX_LAYOUT_LEDMAP( + CYAN, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, ______, ______, ______, ______, GREEN, GREEN, GREEN, GREEN, ______, PURPLE, + CYAN, ______, GOLD, GOLD, GOLD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, GOLD, PURPLE, + CYAN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, TEAL, ______, PURPLE, + CYAN, TURQ, ______, ______, ______, ______, TURQ, ______, ______, ______, ______, ______, ______, ______, ______, PURPLE, + CYAN, ______, RED, RED, RED, RED, RED, RED, ______, ______, ______, ______, ______, RED, ______, PURPLE, + CYAN, ______, ______, BLUE, ______, ______, ______, ______, ______, ______, ______, PURPLE + ), +}; + +#endif // RGB_MATRIX_LEDMAPS_ENABLED +// clang-format on diff --git a/keyboards/gmmk/pro/keymaps/mike1808/mike1808.c b/keyboards/gmmk/pro/keymaps/mike1808/mike1808.c new file mode 100644 index 000000000..881384609 --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/mike1808.c @@ -0,0 +1,68 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mike1808.h" + +#if (__has_include("secrets.h") && !defined(NO_SECRETS)) +# include "secrets.h" +#else +// `PROGMEM const char secret[][x]` may work better, but it takes up more space in the firmware +// And I'm not familiar enough to know which is better or why... +static const char *const secret[] = {"test1", "test2", "test3", "test4", "test5"}; +#endif + +// userspace_config_t userspace_config; + +bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_SECRET_1 ... KC_SECRET_5: // Secrets! Externally defined strings, not stored in repo + if (!record->event.pressed) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + send_string_with_delay(secrets[keycode - KC_SECRET_1], MACRO_TIMER); + } + return false; + break; + } + return true; +} + +void suspend_power_down_user(void) { +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_set_suspend_state(true); +#endif // RGB_MATRIX_ENABLE +} + +void suspend_wakeup_init_user(void) { +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_set_suspend_state(false); +#endif // RGB_MATRIX_ENABLE +} + +#ifdef RGB_MATRIX_ENABLE +void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { + // Turn on sideglow when CAPS LOCK is activated + if (host_keyboard_led_state().caps_lock) { + HSV hsv = {CAPS_LOCK_COLOR}; + hsv.v = rgb_matrix_get_val(); + RGB rgb = hsv_to_rgb(hsv); + + for (uint8_t i = led_min; i < led_max; i++) { + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { + RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); + } + } + } +} +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/gmmk/pro/keymaps/mike1808/mike1808.h b/keyboards/gmmk/pro/keymaps/mike1808/mike1808.h new file mode 100644 index 000000000..bc010108f --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/mike1808.h @@ -0,0 +1,111 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once +#include QMK_KEYBOARD_H +#include "rgb_matrix_ledmaps.h" + +enum layout_names { + LINUX = 0, // Base Layout: The main keyboard layout that has all the characters + WINDOWS, // Base ayout for Windows + MACOS, // Base Layout for MacOS + FUNCTIONS, // Function Layout: The function key activated layout with default functions and + // some added ones + GIT, // GIT Layout: GIT shortcuts and macros + SECRETS, // Layer with secrets +}; + +enum custom_keycodes { + KC_CCCV = SAFE_RANGE, // Hold to copy, tap to paste + KC_LINUX, + KC_MAC, + KC_WIN, + + KC_SECRET_1, + KC_SECRET_2, + KC_SECRET_3, + KC_SECRET_4, + KC_SECRET_5, + + KC_RGB_ENC_HUE, + KC_RGB_ENC_SAT, + KC_RGB_ENC_VAL, + KC_RGB_ENC_EFFECT_SPEED, + KC_RGB_ENC_EFFECT, + + KC_WPM_RGB, +}; + +enum git_macros { + // The start of this enum should always be equal to end of ctrl_keycodes + 1 + G_INIT = KC_WPM_RGB + 1, // git init + G_CLONE, // git clone + G_CONF, // git config --global + G_ADD, // git add + G_DIFF, // git diff + G_RESET, // git reset + G_REBAS, // git rebase + G_BRANH, // git branch + G_CHECK, // git checkout + G_MERGE, // git merge + G_REMTE, // git remote add + G_FETCH, // git fetch + G_PULL, // git pull + G_PUSH, // git push + G_COMM, // git commit + G_STAT, // git status + G_LOG, // git log + NEW_SAFE_RANGE, +}; + +enum combos { + JK_ESC, // jk to ESC for Vim +}; + +#define KC_SEC1 KC_SECRET_1 +#define KC_SEC2 KC_SECRET_2 +#define KC_SEC3 KC_SECRET_3 +#define KC_SEC4 KC_SECRET_4 +#define KC_SEC5 KC_SECRET_5 + +#define KC_RGBH KC_RGB_ENC_HUE +#define KC_RGBS KC_RGB_ENC_SAT +#define KC_RGBV KC_RGB_ENC_VAL +#define KC_RGBE KC_RGB_ENC_EFFECT +#define KC_RGBP KC_RGB_ENC_EFFECT_SPEED + +#define KC_WRGB KC_WPM_RGB + +#define KC_LINX KC_LINUX + +#define KC_RESET RESET +#define KC_RST KC_RESET + +#define OS_GIT OSL(GIT) +#define TT_FN TT(FUNCTIONS) + +#define OS_LGUI OSM(MOD_LGUI) +#define OS_RGUI OSM(MOD_RGUI) +#define OS_LSFT OSM(MOD_LSFT) +#define OS_RSFT OSM(MOD_RSFT) +#define OS_LCTL OSM(MOD_LCTL) +#define OS_RCTL OSM(MOD_RCTL) +#define OS_LALT OSM(MOD_LALT) +#define OS_RALT OSM(MOD_RALT) +#define OS_MEH OSM(MOD_MEH) +#define OS_HYPR OSM(MOD_HYPR) + +#define CAPS_LOCK_COLOR HSV_RED + diff --git a/keyboards/gmmk/pro/keymaps/mike1808/process_record.c b/keyboards/gmmk/pro/keymaps/mike1808/process_record.c new file mode 100644 index 000000000..ac0164e73 --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/process_record.c @@ -0,0 +1,119 @@ +/* Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) , + Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "mike1808.h" +#include "print.h" +#include "process_record.h" + +uint16_t copy_paste_timer; + +__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { + return true; +} +__attribute__((weak)) bool process_record_encoder(uint16_t keycode, keyrecord_t *record) { + return true; +} +__attribute__((weak)) bool process_record_fun(uint16_t keycode, keyrecord_t *record) { + return true; +} + +__attribute__((weak)) void keyboard_post_init_encoder(void) { return; } + +static const char *git_commands[] = { + "git init ", "git clone ", "git config --global ", "git add ", + "git diff ", "git reset ", "git rebase ", "git branch -b \"", + "git checkout ", "git merge ", "git remote add ", "git fetch ", + "git pull ", "git push ", "git commit ", "git status ", + "git log ", +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // If console is enabled, it will print the matrix position and status of each key pressed +#ifdef KEYLOGGER_ENABLE + uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", + keycode, record->event.key.col, record->event.key.row, record->event.pressed, + record->event.time, record->tap.interrupted, record->tap.count); +#endif // KEYLOGGER_ENABLE + switch (keycode) { + case KC_LINUX ... KC_WIN: + if (record->event.pressed) { + dprintf("set_single_persistent_default_layer %d\n", keycode - KC_LINUX + LINUX); + set_single_persistent_default_layer(keycode - KC_LINUX + LINUX); + return false; + } + + break; + + case KC_CCCV: // One key copy/paste + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + if (layer_state_is(MACOS)) { + tap_code16(LGUI(KC_C)); + } else { + tap_code16(LCTL(KC_C)); + } + } else { // Tap, paste + if (layer_state_is(MACOS)) { + tap_code16(LGUI(KC_V)); + } else { + tap_code16(LCTL(KC_V)); + } + } + } + break; + + case G_INIT ... G_LOG: + if (record->event.pressed) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + send_string_with_delay(git_commands[keycode - G_INIT], MACRO_TIMER); + return false; + } + break; +#ifdef RGB_MATRIX_ENABLE + case RGB_TOG: + if (record->event.pressed) { + switch (rgb_matrix_get_flags()) { + case LED_FLAG_ALL: { + rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); + rgb_matrix_set_color_all(0, 0, 0); + } break; + case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { + rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); + rgb_matrix_set_color_all(0, 0, 0); + } break; + case LED_FLAG_UNDERGLOW: { + // This line is for LED idle timer. It disables the toggle so you can turn + // off LED completely if you like + rgb_matrix_set_flags(LED_FLAG_NONE); + rgb_matrix_disable(); + } break; + default: { + rgb_matrix_set_flags(LED_FLAG_ALL); + rgb_matrix_enable(); + } break; + } + } + return false; +#endif // RGB_MATRIX_ENABLE + } + + return process_record_encoder(keycode, record) && process_record_secrets(keycode, record) && + process_record_fun(keycode, record); +} + +void keyboard_post_init_user() { keyboard_post_init_encoder(); } diff --git a/keyboards/gmmk/pro/keymaps/mike1808/process_record.h b/keyboards/gmmk/pro/keymaps/mike1808/process_record.h new file mode 100644 index 000000000..102175165 --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/process_record.h @@ -0,0 +1,26 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "mike1808.h" + + +bool process_record_secrets(uint16_t keycode, keyrecord_t *record); + +bool process_record_encoder(uint16_t keycode, keyrecord_t *record); + +bool process_record_fun(uint16_t keycode, keyrecord_t *record); + +void keyboard_post_init_encoder(void); diff --git a/keyboards/gmmk/pro/keymaps/mike1808/rgb_matrix_ledmaps.c b/keyboards/gmmk/pro/keymaps/mike1808/rgb_matrix_ledmaps.c new file mode 100644 index 000000000..6f4d333ed --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/rgb_matrix_ledmaps.c @@ -0,0 +1,71 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rgb_matrix_ledmaps.h" + +__attribute__((weak)) void rgb_matrix_indicators_keymap(void) { return; } +__attribute__((weak)) void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { + return; +} + +#ifdef RGB_MATRIX_LEDMAPS_ENABLED + +static bool enabled = true; + +#endif // RGB_MATRIX_LEDMAPS_ENABLED + +void rgb_matrix_indicators_user(void) { rgb_matrix_indicators_keymap(); } +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +#ifdef RGB_MATRIX_LEDMAPS_ENABLED + if (rgb_matrix_is_enabled() && enabled) { + set_layer_rgb(led_min, led_max, get_highest_layer(layer_state | default_layer_state)); + } + +#endif // RGB_MATRIX_LEDMAPS_ENABLED + rgb_matrix_indicators_advanced_keymap(led_min, led_max); +} + +#ifdef RGB_MATRIX_LEDMAPS_ENABLED + +void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer) { + const ledmap *l = &(ledmaps[layer]); + + uint8_t val = rgb_matrix_get_val(); + + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + HSV hsv = { + .h = (*l)[i][0], + .s = (*l)[i][1], + .v = val, + }; + + if (hsv.h || hsv.s) { + RGB rgb = hsv_to_rgb(hsv); + RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); + } + } +} + +void rgb_matrix_layers_enable() { + dprintf("ledmaps are enabled\n"); + enabled = true; +} + +void rgb_matrix_layers_disable() { + dprintf("ledmaps are disabled\n"); + enabled = false; +} + +#endif // RGB_MATRIX_LEDMAPS_ENABLED diff --git a/keyboards/gmmk/pro/keymaps/mike1808/rgb_matrix_ledmaps.h b/keyboards/gmmk/pro/keymaps/mike1808/rgb_matrix_ledmaps.h new file mode 100644 index 000000000..eace217d1 --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/rgb_matrix_ledmaps.h @@ -0,0 +1,100 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +#ifdef RGB_MATRIX_LEDMAPS_ENABLED + +// no association keycode +# define XXX \ + { 0, 0, 0 } + +// clang-format off +# define RGB_MATRIX_LAYOUT_LEDMAP( \ + ul1, k13, k26, k36, k31, k33, k07, k63, k71, k76, ka6, ka7, ka3, ka5, k97, k01, ur1, \ + ul2, k16, k17, k27, k37, k47, k46, k56, k57, k67, k77, k87, k86, k66, ka1, k65, ur2, \ + ul3, k11, k10, k20, k30, k40, k41, k51, k50, k60, k70, k80, k81, k61, ka2, k15, ur3, \ + ul4, k21, k12, k22, k32, k42, k43, k53, k52, k62, k72, k82, k83, ka4, k25, ur4, \ + ul5, k00, k14, k24, k34, k44, k45, k55, k54, k64, k74, k85, k91, k35, k75, ur5, \ + ul6, k06, k90, k93, k94, k95, k92, k04, k03, k73, k05, ur6 \ + ) \ + { \ + k13, k16, k11, k21, k00, k06, k26, k17, \ + k10, k12, k14, k90, k36, k27, k20, k22, \ + k24, k93, k31, k37, k30, k32, k34, k33, \ + k47, k40, k42, k44, k07, k46, k41, k43, \ + k45, k94, k63, k56, k51, k53, k55, k71, \ + k57, k50, k52, k54, k76, k67, k60, k62, \ + k64, k95, ka6, k77, k70, k72, k74, k92, \ + ka7, k87, k80, k82, k85, ka3, k86, k81, \ + k83, k04, ka5, ul1, ur1, k97, ul2, ur2, \ + k65, ul2, ur2, k15, ul3, ur3, k66, k05, \ + ul3, ur3, k75, ul4, ur4, ka1, k25, ul5, \ + ur5, k61, k91, ul6, ur6, ka2, k35, k03, \ + ka4, k73 \ + } +// clang-format on +typedef uint8_t ledmap[DRIVER_LED_TOTAL][3]; +extern const ledmap ledmaps[]; + +void set_layer_rgb(uint8_t led_min, uint8_t led_max, int layer); + +void rgb_matrix_layers_enable(void); +void rgb_matrix_layers_disable(void); + +// Just a handy defines to make our ledmaps look better +# define RED \ + { HSV_RED } +# define CORAL \ + { HSV_CORAL } +# define ORANGE \ + { HSV_ORANGE } +# define GOLDEN \ + { HSV_GOLDENROD } +# define GOLD \ + { HSV_GOLD } +# define YELLOW \ + { HSV_YELLOW } +# define CHART \ + { HSV_CHARTREUSE } +# define GREEN \ + { HSV_GREEN } +# define SPRING \ + { HSV_SPRINGGREEN } +# define TURQ \ + { HSV_TURQUOISE } +# define TEAL \ + { HSV_TEAL } +# define CYAN \ + { HSV_CYAN } +# define AZURE \ + { HSV_AZURE } +# define BLUE \ + { HSV_BLUE } +# define PURPLE \ + { HSV_PURPLE } +# define MAGENT \ + { HSV_MAGENTA } +# define PINK \ + { HSV_PINK } +# define BLACK \ + { HSV_BLACK } + +#endif // RGB_MATRIX_LEDMAPS_ENABLED + +void rgb_matrix_indicators_keymap(void); +void rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max); diff --git a/keyboards/gmmk/pro/keymaps/mike1808/rules.mk b/keyboards/gmmk/pro/keymaps/mike1808/rules.mk new file mode 100644 index 000000000..a6d4e6259 --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/rules.mk @@ -0,0 +1,25 @@ +VIA_ENABLE = no + +COMBO_ENABLE = yes +COMMAND_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RAW_ENABLE = no +CONSOLE_ENABLE = yes + +WPM_ENABLE = no + +RGB_MATRIX_LEDMAPS = yes + +SRC += utils.c +SRC += mike1808.c +SRC += process_record.c +SRC += encoder.c + +ifeq ($(strip $(WPM_ENABLE)), yes) + SRC += fun.c +endif + +ifeq ($(strip $(RGB_MATRIX_LEDMAPS)), yes) + SRC += rgb_matrix_ledmaps.c + OPT_DEFS += -DRGB_MATRIX_LEDMAPS_ENABLED +endif diff --git a/keyboards/gmmk/pro/keymaps/mike1808/utils.c b/keyboards/gmmk/pro/keymaps/mike1808/utils.c new file mode 100644 index 000000000..35ae20b12 --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/utils.c @@ -0,0 +1,64 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "utils.h" + +void store_rgb_state_to_eeprom() { + uint8_t mode = rgb_matrix_get_mode(); + uint8_t speed = rgb_matrix_get_speed(); + HSV color = rgb_matrix_get_hsv(); + + rgb_matrix_mode(mode); + rgb_matrix_set_speed(speed); + rgb_matrix_sethsv(color.h, color.s, color.v); +} + +void press(KeyPressState *self) { + self->_count++; + + dprintf("KPS: press: %d\n", self->_count); + + // pressed the first time + if (self->_count == 1) { + self->hander(true); + } +} + +void release(KeyPressState *self) { + self->_count--; + + dprintf("KPS: release: %d\n", self->_count); + + // all keys are relased + if (self->_count == 0) { + self->hander(false); + } +} + +void reset(KeyPressState *self) { + self->_count = 0; +} + +KeyPressState *NewKeyPressState(key_press_handler handler) { + KeyPressState *kps = (KeyPressState *)(malloc(sizeof(KeyPressState))); + + kps->_count = 0; + kps->press = press; + kps->release = release; + kps->reset = reset; + kps->hander = handler; + + return kps; +} diff --git a/keyboards/gmmk/pro/keymaps/mike1808/utils.h b/keyboards/gmmk/pro/keymaps/mike1808/utils.h new file mode 100644 index 000000000..49d0745cf --- /dev/null +++ b/keyboards/gmmk/pro/keymaps/mike1808/utils.h @@ -0,0 +1,32 @@ +/* Copyright 2021 Mikael Manukyan + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +void store_rgb_state_to_eeprom(void); + +typedef void (*key_press_handler)(bool); + +typedef struct KeyPressState KeyPressState; +struct KeyPressState { + int _count; + void (*press)(KeyPressState *self); + void (*release)(KeyPressState *self); + void (*reset)(KeyPressState *self); + key_press_handler hander; +}; + +KeyPressState *NewKeyPressState(key_press_handler); diff --git a/keyboards/gmmk/pro/keymaps/via/keymap.c b/keyboards/gmmk/pro/keymaps/via/keymap.c deleted file mode 100644 index 940cc1c1f..000000000 --- a/keyboards/gmmk/pro/keymaps/via/keymap.c +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright 2021 Glorious, LLC - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) -// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Del -// Tab Q W E R T Y U I O P [ ] \ PgUp -// Caps A S D F G H J K L ; " Enter PgDn -// Sh_L Z X C V B N M , . ? Sh_R Up End -// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right - - - [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_MUTE, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - - [1] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - [3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - -}; - - -bool encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - return true; -} diff --git a/keyboards/gmmk/pro/keymaps/willwm/keymap.c b/keyboards/gmmk/pro/keymaps/willwm/keymap.c deleted file mode 100644 index a17f79331..000000000 --- a/keyboards/gmmk/pro/keymaps/willwm/keymap.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright 2021 Glorious, LLC - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Mute) -// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BackSpc Home -// Tab Q W E R T Y U I O P [ ] \ PgUp -// Caps A S D F G H J K L ; " Enter PgDn -// Sh_L Z X C V B N M , . ? Sh_R Up End -// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right - - - [0] = LAYOUT( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, - MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - - [1] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, - KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, - _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END - ), - - [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - - [3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - -}; - - -void encoder_update_user(uint8_t index, bool clockwise) { - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } -} diff --git a/keyboards/gmmk/pro/mcuconf.h b/keyboards/gmmk/pro/mcuconf.h new file mode 100644 index 000000000..bb1c0acde --- /dev/null +++ b/keyboards/gmmk/pro/mcuconf.h @@ -0,0 +1,6 @@ +#pragma once + +#include_next + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE diff --git a/keyboards/gmmk/pro/pro.h b/keyboards/gmmk/pro/pro.h index 8295bb2f7..38dd4d78b 100644 --- a/keyboards/gmmk/pro/pro.h +++ b/keyboards/gmmk/pro/pro.h @@ -18,62 +18,8 @@ along with this program. If not, see . #include "quantum.h" -#define ___ KC_NO - -// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) -// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BSpc Del -// Tab Q W E R T Y U I O P [ ] \ PgUp -// Caps A S D F G H J K L ; " Enter PgDn -// Sh_L Z X C V B N M , . ? Sh_R Up End -// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right - -#define LAYOUT( \ - k13, k26, k36, k31, k33, k07, k63, k71, k76, ka6, ka7, ka3, ka5, k97, k01, \ - k16, k17, k27, k37, k47, k46, k56, k57, k67, k77, k87, k86, k66, ka1, k65, \ - k11, k10, k20, k30, k40, k41, k51, k50, k60, k70, k80, k81, k61, ka2, k15, \ - k21, k12, k22, k32, k42, k43, k53, k52, k62, k72, k82, k83, ka4, k25, \ - k00, k14, k24, k34, k44, k45, k55, k54, k64, k74, k85, k91, k35, k75, \ - k06, k90, k93, k94, k95, k92, k04, k03, k73, k05 \ -) \ -{ \ - { k00, k01, ___, k03, k04, k05, k06, k07}, \ - { k10, k11, k12, k13, k14, k15, k16, k17}, \ - { k20, k21, k22, ___, k24, k25, k26, k27}, \ - { k30, k31, k32, k33, k34, k35, k36, k37}, \ - { k40, k41, k42, k43, k44, k45, k46, k47}, \ - { k50, k51, k52, k53, k54, k55, k56, k57}, \ - { k60, k61, k62, k63, k64, k65, k66, k67}, \ - { k70, k71, k72, k73, k74, k75, k76, k77}, \ - { k80, k81, k82, k83, ___, k85, k86, k87}, \ - { k90, k91, k92, k93, k94, k95, ___, k97}, \ - { ___, ka1, ka2, ka3, ka4, ka5, ka6, ka7} \ -} - -// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Prt Rotary(Mute) -// ~ 1 2 3 4 5 6 7 8 9 0 - (=) BSpc Del -// Tab Q W E R T Y U I O P [ ] PgUp -// Caps A S D F G H J K L ; " # Enter PgDn -// Sh_L / Z X C V B N M , . ? Sh_R Up End -// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right - -#define LAYOUT_iso( \ - k13, k26, k36, k31, k33, k07, k63, k71, k76, ka6, ka7, ka3, ka5, k97, k01, \ - k16, k17, k27, k37, k47, k46, k56, k57, k67, k77, k87, k86, k66, ka1, k65, \ - k11, k10, k20, k30, k40, k41, k51, k50, k60, k70, k80, k81, k61, k15, \ - k21, k12, k22, k32, k42, k43, k53, k52, k62, k72, k82, k83, k84, ka4, k25, \ - k00, k23, k14, k24, k34, k44, k45, k55, k54, k64, k74, k85, k91, k35, k75, \ - k06, k90, k93, k94, k95, k92, k04, k03, k73, k05 \ -) \ -{ \ - { k00, k01, ___, k03, k04, k05, k06, k07}, \ - { k10, k11, k12, k13, k14, k15, k16, k17}, \ - { k20, k21, k22, k23, k24, k25, k26, k27}, \ - { k30, k31, k32, k33, k34, k35, k36, k37}, \ - { k40, k41, k42, k43, k44, k45, k46, k47}, \ - { k50, k51, k52, k53, k54, k55, k56, k57}, \ - { k60, k61, k62, k63, k64, k65, k66, k67}, \ - { k70, k71, k72, k73, k74, k75, k76, k77}, \ - { k80, k81, k82, k83, k84, k85, k86, k87}, \ - { k90, k91, k92, k93, k94, k95, ___, k97}, \ - { ___, ka1, ___, ka3, ka4, ka5, ka6, ka7} \ -} +#if defined(KEYBOARD_gmmk_pro_ansi) +# include "ansi.h" +#elif defined(KEYBOARD_gmmk_pro_iso) +# include "iso.h" +#endif // GMMK Pro revisions diff --git a/keyboards/gmmk/pro/readme.md b/keyboards/gmmk/pro/readme.md deleted file mode 100644 index e291179c9..000000000 --- a/keyboards/gmmk/pro/readme.md +++ /dev/null @@ -1,37 +0,0 @@ -# GMMK PRO - -A tenkeyless 75% keyboard made and sold by Glorious LLC. Equipped with the STM32 ARM Cortex-M4 microcontroller, with support for rotary encoders and three additional layouts. [More info at Glorious](https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black-reservation) - -* Keyboard Maintainer: [GloriousThrall](https://github.com/GloriousThrall) -* Hardware Supported: GMMK Pro -* Hardware Availability: [GloriousPCGaming.com](https://www.pcgamingrace.com/products/glorious-gmmk-pro-75-barebone-black-reservation) - -Make example for this keyboard (after setting up your build environment): - - make gmmk/pro:default - -Flashing example for this keyboard: - - make gmmk/pro:default:flash - -To reset the board into bootloader mode, do one of the following: - -* Hold the Reset switch mounted on the bottom side of the PCB while connecting the USB cable -* Hold the Escape key while connecting the USB cable (also erases persistent settings) -* Fn+Backslash will reset the board to bootloader mode if you have flashed the default QMK keymap - -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). - -## Case Screw Replacements - -Many users report stripped case screws when disassembling the board. - -The stock case screws are: -* Thread: M2 -* Thread length: ~5 mm -* Head diameter: ~3.8 mm -* Head counterbore diameter: ~4.0 mm -* Head counterbore depth: ~1.9 mm - -Most M2x5mm screws should fit fine, although it's best to ensure that the screw head will fit inside the counterbore. -For reference, [this hex socket head screw](https://www.mcmaster.com/91292A005/) from McMaster-Carr should fit nearly flush (head will protrude above the counterbore by ~0.1 mm). diff --git a/keyboards/gmmk/pro/rules.mk b/keyboards/gmmk/pro/rules.mk deleted file mode 100644 index b12d055a3..000000000 --- a/keyboards/gmmk/pro/rules.mk +++ /dev/null @@ -1,23 +0,0 @@ -# MCU name -MCU = STM32F303 - -# Bootloader selection -BOOTLOADER = stm32-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 = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output -ENCODER_ENABLE = yes diff --git a/keyboards/gon/nerd60/keymaps/mauin/rules.mk b/keyboards/gon/nerd60/keymaps/mauin/rules.mk index 949aff1cd..4bf836c22 100644 --- a/keyboards/gon/nerd60/keymaps/mauin/rules.mk +++ b/keyboards/gon/nerd60/keymaps/mauin/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gon/nerd60/rules.mk b/keyboards/gon/nerd60/rules.mk index b202fac6a..54e2466b0 100644 --- a/keyboards/gon/nerd60/rules.mk +++ b/keyboards/gon/nerd60/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c b/keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c index 3142209d6..c4294c812 100644 --- a/keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c +++ b/keyboards/gon/nerdtkl/keymaps/gam3cat/keymap.c @@ -240,7 +240,7 @@ void matrix_scan_user(void) { } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case _BL: custom_backlight_level(0); diff --git a/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk index 6151bcf23..c82cafd60 100644 --- a/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk +++ b/keyboards/gon/nerdtkl/keymaps/gam3cat/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -18,7 +18,6 @@ UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 #VARIABLE_TRACE = no # Use this to debug changes to variable values -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings KEY_LOCK_ENABLE = no # This enables key lock SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common TAP_DANCE_ENABLE = no # Enable TapDance functionality diff --git a/keyboards/gon/nerdtkl/rules.mk b/keyboards/gon/nerdtkl/rules.mk index 2401cbea8..1ba1a92a6 100644 --- a/keyboards/gon/nerdtkl/rules.mk +++ b/keyboards/gon/nerdtkl/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/gowla/rules.mk b/keyboards/gowla/rules.mk index bc65eff6d..f6960651d 100644 --- a/keyboards/gowla/rules.mk +++ b/keyboards/gowla/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output diff --git a/keyboards/gray_studio/cod67/rules.mk b/keyboards/gray_studio/cod67/rules.mk index 2e066d991..d83a35b33 100644 --- a/keyboards/gray_studio/cod67/rules.mk +++ b/keyboards/gray_studio/cod67/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER_SIZE = 6144 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/gray_studio/hb85/rules.mk b/keyboards/gray_studio/hb85/rules.mk index 981f6b514..fe033da5e 100644 --- a/keyboards/gray_studio/hb85/rules.mk +++ b/keyboards/gray_studio/hb85/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h index 2375d95b3..12ca563c9 100644 --- a/keyboards/gray_studio/space65/config.h +++ b/keyboards/gray_studio/space65/config.h @@ -185,26 +185,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/gray_studio/space65/rules.mk b/keyboards/gray_studio/space65/rules.mk index 4c8bf40ba..fc1a8c720 100644 --- a/keyboards/gray_studio/space65/rules.mk +++ b/keyboards/gray_studio/space65/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/gray_studio/think65/hotswap/rules.mk b/keyboards/gray_studio/think65/hotswap/rules.mk index b0d113e64..80af8f188 100644 --- a/keyboards/gray_studio/think65/hotswap/rules.mk +++ b/keyboards/gray_studio/think65/hotswap/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/gray_studio/think65/solder/rules.mk b/keyboards/gray_studio/think65/solder/rules.mk index b0d113e64..80af8f188 100644 --- a/keyboards/gray_studio/think65/solder/rules.mk +++ b/keyboards/gray_studio/think65/solder/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/grid600/press/rules.mk b/keyboards/grid600/press/rules.mk index b57bf3442..2cd2c256a 100644 --- a/keyboards/grid600/press/rules.mk +++ b/keyboards/grid600/press/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/gskt00/rules.mk b/keyboards/gskt00/rules.mk index 0011ec6ce..48258441f 100755 --- a/keyboards/gskt00/rules.mk +++ b/keyboards/gskt00/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/gvalchca/ga150/rules.mk b/keyboards/gvalchca/ga150/rules.mk index 3b26fac66..bc02f1397 100644 --- a/keyboards/gvalchca/ga150/rules.mk +++ b/keyboards/gvalchca/ga150/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gvalchca/spaccboard/rules.mk b/keyboards/gvalchca/spaccboard/rules.mk index acd5fbc29..446d137da 100644 --- a/keyboards/gvalchca/spaccboard/rules.mk +++ b/keyboards/gvalchca/spaccboard/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/h0oni/hotduck/rules.mk b/keyboards/h0oni/hotduck/rules.mk index b1e541851..d450f2069 100644 --- a/keyboards/h0oni/hotduck/rules.mk +++ b/keyboards/h0oni/hotduck/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hadron/ver2/rules.mk b/keyboards/hadron/ver2/rules.mk index 7e2ebf567..280145ed8 100644 --- a/keyboards/hadron/ver2/rules.mk +++ b/keyboards/hadron/ver2/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = halfkay # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = yes SWAP_HANDS_ENABLE = no # Enable one-hand typing # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index 8c04575ee..574dc6b01 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -127,26 +127,6 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ - -#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 2 /* Haptic Driver initialization settings * Feedback Control Settings */ diff --git a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c index 0998ad93b..c1bfe1f1c 100644 --- a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c +++ b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c @@ -176,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/hadron/ver3/rules.mk b/keyboards/hadron/ver3/rules.mk index ef839977e..f3cc14b17 100644 --- a/keyboards/hadron/ver3/rules.mk +++ b/keyboards/hadron/ver3/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/halberd/config.h b/keyboards/halberd/config.h index d21e9bb52..f56b99d2c 100644 --- a/keyboards/halberd/config.h +++ b/keyboards/halberd/config.h @@ -164,26 +164,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/halberd/rules.mk b/keyboards/halberd/rules.mk index a0eb4c804..35b1a6d97 100644 --- a/keyboards/halberd/rules.mk +++ b/keyboards/halberd/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/halfcliff/halfcliff.c b/keyboards/halfcliff/halfcliff.c index 999e9036d..4e2910b84 100644 --- a/keyboards/halfcliff/halfcliff.c +++ b/keyboards/halfcliff/halfcliff.c @@ -16,7 +16,7 @@ #include "halfcliff.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE // Defines names for use in layer keycodes and the keymap enum layer_names { diff --git a/keyboards/halfcliff/rules.mk b/keyboards/halfcliff/rules.mk index f8883f6a4..0ecdbb5e5 100644 --- a/keyboards/halfcliff/rules.mk +++ b/keyboards/halfcliff/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,6 +24,6 @@ SPLIT_KEYBOARD = yes ENCODER_ENABLE = no POINTING_DEVICE_ENABLE = no CUSTOM_MATRIX = yes -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no SRC += matrix.c diff --git a/keyboards/hand88/rules.mk b/keyboards/hand88/rules.mk index 36088f03f..8837462e5 100755 --- a/keyboards/hand88/rules.mk +++ b/keyboards/hand88/rules.mk @@ -12,7 +12,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/108key_trackpoint/rules.mk b/keyboards/handwired/108key_trackpoint/rules.mk index 6cb226c22..8bd357d2c 100644 --- a/keyboards/handwired/108key_trackpoint/rules.mk +++ b/keyboards/handwired/108key_trackpoint/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/2x5keypad/rules.mk b/keyboards/handwired/2x5keypad/rules.mk index 52f64eb3f..6e3f0e587 100644 --- a/keyboards/handwired/2x5keypad/rules.mk +++ b/keyboards/handwired/2x5keypad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina AUDIO_ENABLE = no BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE= no # Console for debug EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/handwired/3dp660/rules.mk b/keyboards/handwired/3dp660/rules.mk index d97f13a39..aa4cc54a9 100644 --- a/keyboards/handwired/3dp660/rules.mk +++ b/keyboards/handwired/3dp660/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/412_64/config.h b/keyboards/handwired/412_64/config.h index 542a77e75..e0336d966 100644 --- a/keyboards/handwired/412_64/config.h +++ b/keyboards/handwired/412_64/config.h @@ -141,23 +141,3 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/handwired/412_64/rules.mk b/keyboards/handwired/412_64/rules.mk index 044a6d01e..0e9499741 100644 --- a/keyboards/handwired/412_64/rules.mk +++ b/keyboards/handwired/412_64/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -24,9 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 - -LAYOUTS = ortho_4x16 diff --git a/keyboards/handwired/42/rules.mk b/keyboards/handwired/42/rules.mk index 1ea057e44..2664e648c 100644 --- a/keyboards/handwired/42/rules.mk +++ b/keyboards/handwired/42/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/handwired/6key/keymaps/default/keymap.c b/keyboards/handwired/6key/keymaps/default/keymap.c index 509d999e5..ad73597ba 100644 --- a/keyboards/handwired/6key/keymaps/default/keymap.c +++ b/keyboards/handwired/6key/keymaps/default/keymap.c @@ -1,17 +1,17 @@ - /* Copyright 2020 Bratzworth - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + /* Copyright 2020 Bratzworth + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { if (active) { @@ -43,4 +43,5 @@ void dip_switch_update_user(uint8_t index, bool active) { } } } -} \ No newline at end of file + return true; +} diff --git a/keyboards/handwired/6key/rules.mk b/keyboards/handwired/6key/rules.mk index c31208d51..38f1be94b 100644 --- a/keyboards/handwired/6key/rules.mk +++ b/keyboards/handwired/6key/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/6macro/rules.mk b/keyboards/handwired/6macro/rules.mk index 253720ad6..5fd793863 100644 --- a/keyboards/handwired/6macro/rules.mk +++ b/keyboards/handwired/6macro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/aek64/rules.mk b/keyboards/handwired/aek64/rules.mk index e5a1d648a..2d6d3a121 100644 --- a/keyboards/handwired/aek64/rules.mk +++ b/keyboards/handwired/aek64/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change to no to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/handwired/aim65/rules.mk b/keyboards/handwired/aim65/rules.mk index fd76a5247..7f0fa90fd 100644 --- a/keyboards/handwired/aim65/rules.mk +++ b/keyboards/handwired/aim65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/amigopunk/keymaps/default/keymap.c b/keyboards/handwired/amigopunk/keymaps/default/keymap.c index cdfe97402..b7df62979 100644 --- a/keyboards/handwired/amigopunk/keymaps/default/keymap.c +++ b/keyboards/handwired/amigopunk/keymaps/default/keymap.c @@ -46,7 +46,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_amigopunk_logo(void) { static const char PROGMEM amigopunk_logo[] = { diff --git a/keyboards/handwired/amigopunk/rules.mk b/keyboards/handwired/amigopunk/rules.mk index d62975bc9..521832f2d 100644 --- a/keyboards/handwired/amigopunk/rules.mk +++ b/keyboards/handwired/amigopunk/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,4 +21,5 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/handwired/angel/rules.mk b/keyboards/handwired/angel/rules.mk index 8a411ac60..f0e9a7a83 100644 --- a/keyboards/handwired/angel/rules.mk +++ b/keyboards/handwired/angel/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/aplx2/rules.mk b/keyboards/handwired/aplx2/rules.mk index 6765381b9..9dce5675a 100644 --- a/keyboards/handwired/aplx2/rules.mk +++ b/keyboards/handwired/aplx2/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/handwired/aranck/config.h b/keyboards/handwired/aranck/config.h index 7d0ab25fe..625df566f 100644 --- a/keyboards/handwired/aranck/config.h +++ b/keyboards/handwired/aranck/config.h @@ -205,26 +205,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/aranck/rules.mk b/keyboards/handwired/aranck/rules.mk index 237d6c0c4..a08e59233 100644 --- a/keyboards/handwired/aranck/rules.mk +++ b/keyboards/handwired/aranck/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk b/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk index 702538af3..0f1a6c15b 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk +++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk b/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk index 12c820839..8863d737f 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk +++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/handwired/arrow_pad/rules.mk b/keyboards/handwired/arrow_pad/rules.mk index e1eb35c51..155c0588b 100644 --- a/keyboards/handwired/arrow_pad/rules.mk +++ b/keyboards/handwired/arrow_pad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/atreus50/rules.mk b/keyboards/handwired/atreus50/rules.mk index e8b551fbb..eec3a4760 100644 --- a/keyboards/handwired/atreus50/rules.mk +++ b/keyboards/handwired/atreus50/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/handwired/axon/rules.mk b/keyboards/handwired/axon/rules.mk index e9a5cac27..8742e3017 100644 --- a/keyboards/handwired/axon/rules.mk +++ b/keyboards/handwired/axon/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/bdn9_ble/rules.mk b/keyboards/handwired/bdn9_ble/rules.mk index 92ab17ade..f16a308d5 100644 --- a/keyboards/handwired/bdn9_ble/rules.mk +++ b/keyboards/handwired/bdn9_ble/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -28,7 +28,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH = AdafruitBLE # Enable Bluetooth AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/bento/rev1/rules.mk b/keyboards/handwired/bento/rev1/rules.mk index f7e3ef1e9..98ae51f14 100644 --- a/keyboards/handwired/bento/rev1/rules.mk +++ b/keyboards/handwired/bento/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/bigmac/rules.mk b/keyboards/handwired/bigmac/rules.mk index 14b22efbd..552479e96 100644 --- a/keyboards/handwired/bigmac/rules.mk +++ b/keyboards/handwired/bigmac/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/bolek/rules.mk b/keyboards/handwired/bolek/rules.mk index fd76a5247..7f0fa90fd 100644 --- a/keyboards/handwired/bolek/rules.mk +++ b/keyboards/handwired/bolek/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/boss566y/redragon_vara/rules.mk b/keyboards/handwired/boss566y/redragon_vara/rules.mk index ddcd971b9..f8434d623 100644 --- a/keyboards/handwired/boss566y/redragon_vara/rules.mk +++ b/keyboards/handwired/boss566y/redragon_vara/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/brain/rules.mk b/keyboards/handwired/brain/rules.mk index 2c24d019b..67b61a562 100644 --- a/keyboards/handwired/brain/rules.mk +++ b/keyboards/handwired/brain/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -17,7 +17,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 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 RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI controls BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/cans12er/rules.mk b/keyboards/handwired/cans12er/rules.mk index e3c398bbf..222b9d261 100644 --- a/keyboards/handwired/cans12er/rules.mk +++ b/keyboards/handwired/cans12er/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/chiron/rules.mk b/keyboards/handwired/chiron/rules.mk index 800b19632..e65fb63ca 100644 --- a/keyboards/handwired/chiron/rules.mk +++ b/keyboards/handwired/chiron/rules.mk @@ -18,13 +18,12 @@ AUDIO_ENABLE = no AUTOLOG_ENABLE = no BACKLIGHT_ENABLE = no BLUETOOTH_ENABLE = no -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = no CONSOLE_ENABLE = no DEBUG_ENABLE = no EXTRAKEY_ENABLE = no LEADER_ENABLE = no -MIDI_ENABLE = no MOUSEKEY_ENABLE = yes NKRO_ENABLE = no RGBLIGHT_ENABLE = yes diff --git a/keyboards/handwired/ck4x4/rules.mk b/keyboards/handwired/ck4x4/rules.mk index 4bad1b8a5..739473ace 100644 --- a/keyboards/handwired/ck4x4/rules.mk +++ b/keyboards/handwired/ck4x4/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/cmd60/rules.mk b/keyboards/handwired/cmd60/rules.mk index b5e96d74b..77f39e3ce 100644 --- a/keyboards/handwired/cmd60/rules.mk +++ b/keyboards/handwired/cmd60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/co60/rev1/rules.mk b/keyboards/handwired/co60/rev1/rules.mk index 0986bed20..df3b804f9 100644 --- a/keyboards/handwired/co60/rev1/rules.mk +++ b/keyboards/handwired/co60/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/co60/rev6/rules.mk b/keyboards/handwired/co60/rev6/rules.mk index 5c26d9a30..17601e67a 100644 --- a/keyboards/handwired/co60/rev6/rules.mk +++ b/keyboards/handwired/co60/rev6/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -17,7 +17,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE = no RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID LEADER_ENABLE = yes diff --git a/keyboards/handwired/co60/rev7/rules.mk b/keyboards/handwired/co60/rev7/rules.mk index 25e7a2bf1..53a94fe2f 100644 --- a/keyboards/handwired/co60/rev7/rules.mk +++ b/keyboards/handwired/co60/rev7/rules.mk @@ -12,7 +12,7 @@ WS2812_DRIVER = spi # comment out to disable the options. # BACKLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -20,7 +20,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID LEADER_ENABLE = yes diff --git a/keyboards/handwired/colorlice/config.h b/keyboards/handwired/colorlice/config.h index 206a4004e..0148817f3 100644 --- a/keyboards/handwired/colorlice/config.h +++ b/keyboards/handwired/colorlice/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . /* RGB LEDs */ #define RGB_DI_PIN B1 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_LED_PROCESS_LIMIT 4 diff --git a/keyboards/handwired/colorlice/rules.mk b/keyboards/handwired/colorlice/rules.mk index 077b197ef..e75fe013a 100644 --- a/keyboards/handwired/colorlice/rules.mk +++ b/keyboards/handwired/colorlice/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,11 +24,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LTO_ENABLE = no # Use link time optimization +LTO_ENABLE = yes # Use link time optimization RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow diff --git a/keyboards/handwired/concertina/64key/rules.mk b/keyboards/handwired/concertina/64key/rules.mk index fe1ea791e..5efbfaa00 100644 --- a/keyboards/handwired/concertina/64key/rules.mk +++ b/keyboards/handwired/concertina/64key/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/consolekeyboard/18key/rules.mk b/keyboards/handwired/consolekeyboard/18key/rules.mk index 1b8f014d8..84fded179 100644 --- a/keyboards/handwired/consolekeyboard/18key/rules.mk +++ b/keyboards/handwired/consolekeyboard/18key/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/consolekeyboard/20key/rules.mk b/keyboards/handwired/consolekeyboard/20key/rules.mk index 1b8f014d8..84fded179 100644 --- a/keyboards/handwired/consolekeyboard/20key/rules.mk +++ b/keyboards/handwired/consolekeyboard/20key/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/consolekeyboard/27key/rules.mk b/keyboards/handwired/consolekeyboard/27key/rules.mk index 1b8f014d8..84fded179 100644 --- a/keyboards/handwired/consolekeyboard/27key/rules.mk +++ b/keyboards/handwired/consolekeyboard/27key/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/consolekeyboard/30key/rules.mk b/keyboards/handwired/consolekeyboard/30key/rules.mk index 1b8f014d8..84fded179 100644 --- a/keyboards/handwired/consolekeyboard/30key/rules.mk +++ b/keyboards/handwired/consolekeyboard/30key/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/curiosity/rules.mk b/keyboards/handwired/curiosity/rules.mk index d410771e8..996b215a3 100644 --- a/keyboards/handwired/curiosity/rules.mk +++ b/keyboards/handwired/curiosity/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/d48/keymaps/anderson/keymap.c b/keyboards/handwired/d48/keymaps/anderson/keymap.c index f63bf54ea..069978071 100644 --- a/keyboards/handwired/d48/keymaps/anderson/keymap.c +++ b/keyboards/handwired/d48/keymaps/anderson/keymap.c @@ -246,7 +246,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; } diff --git a/keyboards/handwired/d48/keymaps/default/keymap.c b/keyboards/handwired/d48/keymaps/default/keymap.c index 08bb90603..66b8dd714 100644 --- a/keyboards/handwired/d48/keymaps/default/keymap.c +++ b/keyboards/handwired/d48/keymaps/default/keymap.c @@ -191,7 +191,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; } diff --git a/keyboards/handwired/d48/rules.mk b/keyboards/handwired/d48/rules.mk index 60a9f089d..af6f369ef 100644 --- a/keyboards/handwired/d48/rules.mk +++ b/keyboards/handwired/d48/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -20,7 +20,8 @@ AUDIO_ENABLE = yes USE_I2C = no RGBLIGHT_ENABLE = yes ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 UNICODE_ENABLE = yes SRC += ds1307.c taphold.c diff --git a/keyboards/handwired/dactyl/matrix.c b/keyboards/handwired/dactyl/matrix.c index 0f4f98ad8..615621522 100644 --- a/keyboards/handwired/dactyl/matrix.c +++ b/keyboards/handwired/dactyl/matrix.c @@ -130,7 +130,7 @@ void matrix_init(void) void init_expander(void) { if (! i2c_initialized) { i2c_init(); - wait_us(1000000); + wait_ms(1000); } if (! expander_input_pin_mask) { diff --git a/keyboards/handwired/dactyl/rules.mk b/keyboards/handwired/dactyl/rules.mk index 2e740e384..cb5690ba7 100644 --- a/keyboards/handwired/dactyl/rules.mk +++ b/keyboards/handwired/dactyl/rules.mk @@ -14,8 +14,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MIDI_ENABLE = no # MIDI support (+2400 to 4200) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite POINTING_DEVICE_ENABLE = no MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) @@ -26,7 +25,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover UNICODE_ENABLE = yes # Unicode SWAP_HANDS_ENABLE = yes # Allow swapping hands of keyboard SLEEP_LED_ENABLE = no -API_SYSEX_ENABLE = no RGBLIGHT_ENABLE = no # project specific files diff --git a/keyboards/handwired/dactyl_left/config.h b/keyboards/handwired/dactyl_left/config.h index bda18f876..4b5f1307f 100644 --- a/keyboards/handwired/dactyl_left/config.h +++ b/keyboards/handwired/dactyl_left/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/dactyl_left/rules.mk b/keyboards/handwired/dactyl_left/rules.mk index ab0c05e11..0914c2fc8 100644 --- a/keyboards/handwired/dactyl_left/rules.mk +++ b/keyboards/handwired/dactyl_left/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/dactyl_manuform/4x5/4x5.c b/keyboards/handwired/dactyl_manuform/4x5/4x5.c index 78c0fee81..3170eb939 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/4x5.c +++ b/keyboards/handwired/dactyl_manuform/4x5/4x5.c @@ -1,23 +1 @@ #include "4x5.h" - - -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -#endif - -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - diff --git a/keyboards/handwired/dactyl_manuform/4x5/4x5.h b/keyboards/handwired/dactyl_manuform/4x5/4x5.h index 3d2d986bb..73f6be64c 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/4x5.h +++ b/keyboards/handwired/dactyl_manuform/4x5/4x5.h @@ -2,65 +2,50 @@ #include "dactyl_manuform.h" -#include "quantum.h" - -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif +#define XXX KC_NO #ifndef FLIP_HALF #define LAYOUT( \ - L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ - L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ - L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ - L31, L32, R32, R33, \ - L33, L34, R30, R31, \ - L44, L43, R41, R40, \ - L42, L41, R43, R42 \ - ) \ - { \ - { L00, L01, L02, L03, L04 }, \ - { L10, L11, L12, L13, L14 }, \ - { L20, L21, L22, L23, L24 }, \ - { KC_NO, L31, L32, L33, L34 }, \ - { KC_NO, L41, L42, L43, L44 }, \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L31, L32, R32, R33, \ + L33, L34, R30, R31, \ + L44, L43, R41, R40, \ + L42, L41, R43, R42 \ +) { \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { XXX, L31, L32, L33, L34 }, \ + { XXX, L41, L42, L43, L44 }, \ \ - { R04, R03, R02, R01, R00 }, \ - { R14, R13, R12, R11, R10 }, \ - { R24, R23, R22, R21, R20 }, \ - { KC_NO, R33, R32, R31, R30 }, \ - { KC_NO, R43, R42, R41, R40 } \ - } + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { XXX, R33, R32, R31, R30 }, \ + { XXX, R43, R42, R41, R40 } \ +} #else - - - #define LAYOUT( \ - L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ - L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ - L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ - L31, L32, R32, R33, \ - L33, L34, R30, R31, \ - L43, L44, R40, R41, \ - L41, L42, R42, R43 \ - ) \ - { \ - { R04, R03, R02, R01, R00 }, \ - { R14, R13, R12, R11, R10 }, \ - { R24, R23, R22, R21, R20 }, \ - { KC_NO, R33, R32, R31, R30 }, \ - { KC_NO, R43, R42, R41, R40 }, \ + L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ + L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ + L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ + L31, L32, R32, R33, \ + L33, L34, R30, R31, \ + L43, L44, R40, R41, \ + L41, L42, R42, R43 \ +) { \ + { R04, R03, R02, R01, R00 }, \ + { R14, R13, R12, R11, R10 }, \ + { R24, R23, R22, R21, R20 }, \ + { XXX, R33, R32, R31, R30 }, \ + { XXX, R43, R42, R41, R40 }, \ \ - { L00, L01, L02, L03, L04 }, \ - { L10, L11, L12, L13, L14 }, \ - { L20, L21, L22, L23, L24 }, \ - { KC_NO, L31, L32, L33, L34 }, \ - { KC_NO, L41, L42, L43, L44 } \ -\ - } + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { XXX, L31, L32, L33, L34 }, \ + { XXX, L41, L42, L43, L44 } \ +} #endif - diff --git a/keyboards/handwired/dactyl_manuform/4x5/config.h b/keyboards/handwired/dactyl_manuform/4x5/config.h index 22f800d0e..8a06aeab8 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/config.h @@ -21,10 +21,9 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define PRODUCT_ID 0x3435 -#define DEVICE_VER 0x0001 - -#define MANUFACTURER tshort +#define PRODUCT_ID 0x3435 +#define DEVICE_VER 0x0001 +#define MANUFACTURER tshort /* key matrix size */ // Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/4x5/info.json b/keyboards/handwired/dactyl_manuform/4x5/info.json index 4ee52e164..31039b895 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/info.json +++ b/keyboards/handwired/dactyl_manuform/4x5/info.json @@ -7,52 +7,65 @@ "layouts": { "LAYOUT": { "layout": [ - {"label":"L00", "x":0, "y":0}, - {"label":"L01", "x":1, "y":0}, - {"label":"L02", "x":2, "y":0}, - {"label":"L03", "x":3, "y":0}, - {"label":"L04", "x":4, "y":0}, - {"label":"R00", "x":10, "y":0}, - {"label":"R01", "x":11, "y":0}, - {"label":"R02", "x":12, "y":0}, - {"label":"R03", "x":13, "y":0}, - {"label":"R04", "x":14, "y":0}, - {"label":"L10", "x":0, "y":1}, - {"label":"L11", "x":1, "y":1}, - {"label":"L12", "x":2, "y":1}, - {"label":"L13", "x":3, "y":1}, - {"label":"L14", "x":4, "y":1}, - {"label":"R10", "x":10, "y":1}, - {"label":"R11", "x":11, "y":1}, - {"label":"R12", "x":12, "y":1}, - {"label":"R13", "x":13, "y":1}, - {"label":"R14", "x":14, "y":1}, - {"label":"L20", "x":0, "y":2}, - {"label":"L21", "x":1, "y":2}, - {"label":"L22", "x":2, "y":2}, - {"label":"L23", "x":3, "y":2}, - {"label":"L24", "x":4, "y":2}, - {"label":"R20", "x":10, "y":2}, - {"label":"R21", "x":11, "y":2}, - {"label":"R22", "x":12, "y":2}, - {"label":"R23", "x":13, "y":2}, - {"label":"R24", "x":14, "y":2}, - {"label":"L31", "x":1, "y":3}, - {"label":"L32", "x":2, "y":3}, - {"label":"R32", "x":12, "y":3}, - {"label":"R33", "x":13, "y":3}, - {"label":"L33", "x":3, "y":4}, - {"label":"L34", "x":4, "y":4}, - {"label":"R30", "x":10, "y":4}, - {"label":"R31", "x":11, "y":4}, - {"label":"L44", "x":5, "y":5}, - {"label":"L43", "x":6, "y":5}, - {"label":"R41", "x":8, "y":5}, - {"label":"R40", "x":9, "y":5}, - {"label":"L42", "x":5, "y":6}, - {"label":"L41", "x":6, "y":6}, - {"label":"R43", "x":8, "y":6}, - {"label":"R42", "x":9, "y":6} + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y":0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + + {"x": 10, "y": 2}, + {"x": 11, "y": 2}, + {"x": 12, "y": 2}, + {"x": 13, "y": 2}, + {"x": 14, "y": 2}, + + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + + {"x": 12, "y": 3}, + {"x": 13, "y": 3}, + + {"x": 3, "y": 4}, + {"x": 4, "y": 4}, + + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + + {"x": 5, "y": 5}, + {"x": 6, "y": 5}, + + {"x": 8, "y": 5}, + {"x": 9, "y": 5}, + + {"x": 5, "y": 6}, + {"x": 6, "y": 6}, + + {"x": 8, "y": 6}, + {"x": 9, "y": 6} ] } } diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h index 6b0ddbfe8..18320c095 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h @@ -21,12 +21,11 @@ along with this program. If not, see . #pragma once /* Use I2C or Serial, not both */ - #define USE_SERIAL -// #define USE_I2C +//#define USE_I2C /* Select hand configuration */ +//#define MASTER_LEFT +//#define MASTER_RIGHT -// #define MASTER_LEFT -// #define MASTER_RIGHT #define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c index 1a328f9d0..7f71f3db8 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/keymap.c @@ -1,14 +1,9 @@ #include QMK_KEYBOARD_H - #define _BASE 0 #define _RAISE 1 #define _LOWER 2 -// Fillers to make layering more clear - -#define ____ KC_TRNS - #define SFT_ESC SFT_T(KC_ESC) #define CTL_BSPC CTL_T(KC_BSPC) #define ALT_SPC ALT_T(KC_SPC) @@ -25,101 +20,98 @@ #define LOWER MO(_LOWER) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base (qwerty) + * ,----------------------------------, ,----------------------------------, + * | q | w | e | r | t | | y | u | i | o | p | + * |------+------+------+------+------| |-------------+------+------+------| + * | a | s | d | f | g | | h | j | k | l | ; | + * |------+------+------+------+------| |------|------+------+------+------| + * | z | x | c | v | b | | n | m | , | . | ' | + * |------+------+------+-------------, ,-------------+------+------+------, + * | [ | ] | | - | = | + * '------+------'-------------' '-------------'------+------' + * | ESC | BS | | SPACE|ENTER | + * | + | + | | + | + | + * | SHIFT| CTRL | | ALT |SHIFT | + * '------+------' '------+------' + * '------+------' '------+------' + * | TAB | HOME | | END | DEL | + * '------+------' '------+------' + * | Raise| ~ | | GUI | Lower| + * '------+------' '------+------' + */ + [_BASE] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, + KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, + SFT_ESC, CTL_BSPC, ALT_SPC, SFT_ENT, + KC_TAB, KC_HOME, KC_END, KC_DEL, + RAISE, KC_GRV, KC_LGUI, LOWER + ), -/* Base (qwerty) - * ,----------------------------------, ,----------------------------------, - * | q | w | e | r | t | | y | u | i | o | p | - * |------+------+------+------+------| |-------------+------+------+------| - * | a | s | d | f | g | | h | j | k | l | ; | - * |------+------+------+------+------| |------|------+------+------+------| - * | z | x | c | v | b | | n | m | , | . | ' | - * |------+------+------+-------------, ,-------------+------+------+------, - * | [ | ] | | - | = | - * '------+------'-------------' '-------------'------+------' - * | ESC | BS | | SPACE|ENTER | - * | + | + | | + | + | - * | SHIFT| CTRL | | ALT |SHIFT | - * '------+------' '------+------' - * '------+------' '------+------' - * | TAB | HOME | | END | DEL | - * '------+------' '------+------' - * | Raise| ~ | | GUI | Lower| - * '------+------' '------+------' - */ + /* Raise + * ,----------------------------------, ,----------------------------------, + * | | | mup | | | | VOL+ | | up | | PgUp | + * |------+------+------+------+------| |-------------+------+------+------| + * | | mleft| mdown|mright| | | MUTE | left | down |right | PgDn | + * |------+------+------+------+------| |------|------+------+------+------| + * | | | | | | | VOL- | / | \ | ? | | | + * |------+------+------+-------------, ,-------------+------+------+------, + * | | | | mbtn |mbtn2 | + * '------+------'-------------' '-------------'------+------' + * | | | | | | + * | | | | | | + * | | | | | | + * '------+------' '------+------' + * '------+------' '------+------' + * | | | | | | + * '------+------' '------+------' + * | | | | | | + * '------+------' '------+------' + */ + [_RAISE] = LAYOUT( + _______, _______, KC_MU, _______, _______, KC_VOLU, _______, KC_UP, _______, KC_PGUP, + _______, KC_ML, KC_MD, KC_MR, _______, KC_MUTE, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, _______, _______, _______, _______, KC_VOLD, KC_SLSH, KC_BSLS, KC_QUES, KC_PIPE, + _______, _______, KC_MB1, KC_MB2, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), -[_BASE] = LAYOUT( \ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, \ - KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, \ - SFT_ESC, CTL_BSPC, ALT_SPC, SFT_ENT, \ - KC_TAB, KC_HOME, KC_END, KC_DEL, \ - RAISE, KC_GRV, KC_LGUI, LOWER -), - -/* Raise - * ,----------------------------------, ,----------------------------------, - * | | | mup | | | | VOL+ | | up | | PgUp | - * |------+------+------+------+------| |-------------+------+------+------| - * | | mleft| mdown|mright| | | MUTE | left | down |right | PgDn | - * |------+------+------+------+------| |------|------+------+------+------| - * | | | | | | | VOL- | / | \ | ? | | | - * |------+------+------+-------------, ,-------------+------+------+------, - * | | | | mbtn |mbtn2 | - * '------+------'-------------' '-------------'------+------' - * | | | | | | - * | | | | | | - * | | | | | | - * '------+------' '------+------' - * '------+------' '------+------' - * | | | | | | - * '------+------' '------+------' - * | | | | | | - * '------+------' '------+------' - */ - -[_RAISE] = LAYOUT( \ - ____, ____, KC_MU, ____, ____, KC_VOLU, ____, KC_UP, ____, KC_PGUP, \ - ____, KC_ML, KC_MD, KC_MR, ____, KC_MUTE, KC_LEFT, KC_DOWN, KC_RIGHT, KC_PGDOWN, \ - ____, ____, ____, ____, ____, KC_VOLD, KC_SLSH, KC_BSLS, KC_QUES, KC_PIPE, \ - ____, ____, KC_MB1, KC_MB2, \ - ____, ____, ____, ____, \ - ____, ____, ____, ____, \ - ____, ____, ____, ____ \ -), -/* Lower - * ,----------------------------------, ,----------------------------------, - * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | - * |------+------+------+------+------| |-------------+------+------+------| - * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - * |------+------+------+------+------| |------|------+------+------+------| - * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | - * |------+------+------+-------------, ,-------------+------+------+------, - * | F11 | F12 | | - | = | - * '------+------'-------------' '-------------'------+------' - * | | | | | | - * | | | | | | - * | | | | | | - * '------+------' '------+------' - * '------+------' '------+------' - * | | | | | | - * '------+------' '------+------' - * | | | | | | - * '------+------' '------+------' - */ - -[_LOWER] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ - KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ - KC_F11, KC_F12, ____, ____, \ - ____, ____, ____, ____, \ - ____, ____, ____, ____, \ - ____, ____, ____, ____ \ -) + /* Lower + * ,----------------------------------, ,----------------------------------, + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |-------------+------+------+------| + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------| |------|------+------+------+------| + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+-------------, ,-------------+------+------+------, + * | F11 | F12 | | - | = | + * '------+------'-------------' '-------------'------+------' + * | | | | | | + * | | | | | | + * | | | | | | + * '------+------' '------+------' + * '------+------' '------+------' + * | | | | | | + * '------+------' '------+------' + * | | | | | | + * '------+------' '------+------' + */ + [_LOWER] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_F11, KC_F12, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ) }; void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); } diff --git a/keyboards/handwired/dactyl_manuform/4x5/rules.mk b/keyboards/handwired/dactyl_manuform/4x5/rules.mk index 750807051..caba0940c 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/rules.mk +++ b/keyboards/handwired/dactyl_manuform/4x5/rules.mk @@ -1,20 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina # Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = 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 +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 +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/dactyl_manuform/4x6/4x6.c b/keyboards/handwired/dactyl_manuform/4x6/4x6.c index 1d305c854..5e68c1a9f 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/4x6.c +++ b/keyboards/handwired/dactyl_manuform/4x6/4x6.c @@ -1,14 +1 @@ #include "4x6.h" - - -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -#endif - -void matrix_init_kb(void) { - matrix_init_user(); -}; - diff --git a/keyboards/handwired/dactyl_manuform/4x6/4x6.h b/keyboards/handwired/dactyl_manuform/4x6/4x6.h index 25741be57..dcdb1a39e 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/4x6.h +++ b/keyboards/handwired/dactyl_manuform/4x6/4x6.h @@ -1,36 +1,27 @@ #pragma once #include "dactyl_manuform.h" -#include "quantum.h" -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif +#define XXX KC_NO -#define LAYOUT(\ +#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, \ - L32, L33, R32, R33, \ - L34, L35, R30, R31, \ - L44, L45, R40, R41, \ - L42, L43, R42, R43 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { KC_NO, KC_NO, L32, L33, L34, L35 }, \ - { KC_NO, KC_NO, L42, L43, L44, L45 }, \ + L32, L33, R32, R33, \ + L34, L35, R30, R31, \ + L44, L45, R40, R41, \ + L42, L43, R42, R43 \ +) { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { XXX, XXX, L32, L33, L34, L35 }, \ + { XXX, XXX, L42, L43, L44, L45 }, \ \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, KC_NO, KC_NO }, \ - { R40, R41, R42, R43, KC_NO, KC_NO } \ -\ - } + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, XXX, XXX }, \ + { R40, R41, R42, R43, XXX, XXX } \ +} diff --git a/keyboards/handwired/dactyl_manuform/4x6/config.h b/keyboards/handwired/dactyl_manuform/4x6/config.h index 6de9b3616..2e79517b2 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/config.h +++ b/keyboards/handwired/dactyl_manuform/4x6/config.h @@ -21,8 +21,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define PRODUCT_ID 0x3436 -#define DEVICE_VER 0x0001 +#define PRODUCT_ID 0x3436 +#define DEVICE_VER 0x0001 /* key matrix size */ // Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/4x6/info.json b/keyboards/handwired/dactyl_manuform/4x6/info.json index ba358a703..11895a7d1 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/info.json +++ b/keyboards/handwired/dactyl_manuform/4x6/info.json @@ -7,59 +7,72 @@ "layouts": { "LAYOUT": { "layout": [ - {"label":"L00", "x":0, "y":0}, - {"label":"L01", "x":1, "y":0}, - {"label":"L02", "x":2, "y":0}, - {"label":"L03", "x":3, "y":0}, - {"label":"L04", "x":4, "y":0}, - {"label":"L05", "x":5, "y":0}, - {"label":"R00", "x":11, "y":0}, - {"label":"R01", "x":12, "y":0}, - {"label":"R02", "x":13, "y":0}, - {"label":"R03", "x":14, "y":0}, - {"label":"R04", "x":15, "y":0}, - {"label":"R05", "x":16, "y":0}, - {"label":"L10", "x":0, "y":1}, - {"label":"L11", "x":1, "y":1}, - {"label":"L12", "x":2, "y":1}, - {"label":"L13", "x":3, "y":1}, - {"label":"L14", "x":4, "y":1}, - {"label":"L15", "x":5, "y":1}, - {"label":"R10", "x":11, "y":1}, - {"label":"R11", "x":12, "y":1}, - {"label":"R12", "x":13, "y":1}, - {"label":"R13", "x":14, "y":1}, - {"label":"R14", "x":15, "y":1}, - {"label":"R15", "x":16, "y":1}, - {"label":"L20", "x":0, "y":2}, - {"label":"L21", "x":1, "y":2}, - {"label":"L22", "x":2, "y":2}, - {"label":"L23", "x":3, "y":2}, - {"label":"L24", "x":4, "y":2}, - {"label":"L25", "x":5, "y":2}, - {"label":"R20", "x":11, "y":2}, - {"label":"R21", "x":12, "y":2}, - {"label":"R22", "x":13, "y":2}, - {"label":"R23", "x":14, "y":2}, - {"label":"R24", "x":15, "y":2}, - {"label":"R25", "x":16, "y":2}, - {"label":"L32", "x":2, "y":3}, - {"label":"L33", "x":3, "y":3}, - {"label":"R32", "x":13, "y":3}, - {"label":"R33", "x":14, "y":3}, - {"label":"L34", "x":4, "y":4}, - {"label":"L35", "x":5, "y":4}, - {"label":"R30", "x":11, "y":4}, - {"label":"R31", "x":12, "y":4}, - {"label":"L44", "x":6, "y":5}, - {"label":"L45", "x":7, "y":5}, - {"label":"R40", "x":9, "y":5}, - {"label":"R41", "x":10, "y":5}, - {"label":"L42", "x":6, "y":6}, - {"label":"L43", "x":7, "y":6}, - {"label":"R42", "x":9, "y":6}, - {"label":"R43", "x":10, "y":6} - ] + {"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": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5, "y": 2}, + + {"x": 11, "y": 2}, + {"x": 12, "y": 2}, + {"x": 13, "y": 2}, + {"x": 14, "y": 2}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + + {"x": 13, "y": 3}, + {"x": 14, "y": 3}, + + {"x": 4, "y": 4}, + {"x": 5, "y": 4}, + + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + + {"x": 6, "y": 5}, + {"x": 7, "y": 5}, + + {"x": 9, "y": 5}, + {"x": 10, "y": 5}, + + {"x": 6, "y": 6}, + {"x": 7, "y": 6}, + + {"x": 9, "y": 6}, + {"x": 10, "y": 6} + ] } } } diff --git a/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/config.h index 1fc2c617f..18320c095 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/config.h @@ -22,10 +22,10 @@ along with this program. If not, see . /* Use I2C or Serial, not both */ #define USE_SERIAL -// #define USE_I2C +//#define USE_I2C /* Select hand configuration */ +//#define MASTER_LEFT +//#define MASTER_RIGHT -// #define MASTER_LEFT -// #define MASTER_RIGHT #define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/keymap.c index 52ddfad03..999cc3011 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/keymap.c @@ -1,14 +1,9 @@ #include QMK_KEYBOARD_H - #define _BASE 0 #define _RAISE 1 #define _LOWER 2 -// Fillers to make layering more clear - -#define ____ KC_TRNS - #define SFT_ESC SFT_T(KC_ESC) #define CTL_BSPC CTL_T(KC_BSPC) #define ALT_SPC ALT_T(KC_SPC) @@ -25,61 +20,58 @@ #define LOWER MO(_LOWER) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base (qwerty) + * +-----------------------------------------+ +-----------------------------------------+ + * | ESC | q | w | e | r | t | | y | u | i | o | p | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | TAB | a | s | d | f | g | | h | j | k | l | ; | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | SHFT | z | x | c | v | b | | n | m | , | . | / | | + * +------+------+------+------+-------------+ +-------------+------+------+------+------+ + * | [ | ] | | | | + * +-------------+-------------+ +-------------+-------------+ + * | | | | | | + * |------+------| |------+------| + * | | | | | | + * +-------------+ +-------------+ + * +-------------+ +-------------+ + * | | | | | | + * |------+------| |------+------| + * | | | | | | + * +-------------+ +-------------+ + */ + [_BASE] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_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_BSLS, + KC_LBRC, KC_RBRC, KC_PLUS, KC_EQL, + RAISE, KC_SPC, KC_ENT, LOWER, + KC_TAB, KC_HOME, KC_END, KC_DEL, + KC_BSPC, KC_GRV, KC_LGUI, KC_LALT + ), -/* Base (qwerty) - * +-----------------------------------------+ +-----------------------------------------+ - * | ESC | q | w | e | r | t | | y | u | i | o | p | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | TAB | a | s | d | f | g | | h | j | k | l | ; | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | SHFT | z | x | c | v | b | | n | m | , | . | / | | - * +------+------+------+------+-------------+ +-------------+------+------+------+------+ - * | [ | ] | | | | - * +-------------+-------------+ +-------------+-------------+ - * | | | | | | - * |------+------| |------+------| - * | | | | | | - * +-------------+ +-------------+ - * +-------------+ +-------------+ - * | | | | | | - * |------+------| |------+------| - * | | | | | | - * +-------------+ +-------------+ - */ + [_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, RESET, KC_PLUS, + _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END , KC_LPRN, KC_RPRN, KC_P4, KC_P5, KC_P6, KC_MINS, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_EQL, KC_UNDS, + _______, KC_PSCR, _______, KC_P0, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), -[_BASE] = LAYOUT( \ - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_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_BSLASH, \ - KC_LBRC,KC_RBRC, KC_PLUS,KC_EQL, \ - RAISE, KC_SPC, KC_ENT, LOWER, \ - KC_TAB, KC_HOME, KC_END, KC_DEL, \ - KC_BSPC,KC_GRV, KC_LGUI,KC_LALT \ -), - -[_LOWER] = LAYOUT( - _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, RESET, KC_PLUS, \ - _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4, KC_P5, KC_P6, KC_MINS,KC_PIPE, \ - _______,_______,_______,_______,_______,_______, _______, KC_P1, KC_P2, KC_P3, KC_EQL, KC_UNDS, \ - _______,KC_PSCR, _______, KC_P0, \ - _______,_______, _______,_______, \ - _______,_______, _______,_______, \ - _______,_______, _______,_______ \ -), - -[_RAISE] = LAYOUT( - _______,RESET, _______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS, KC_SLCK,KC_MUTE, \ - _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, \ - _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, \ - _______,_______, KC_EQL, _______, \ - _______,_______, _______,_______, \ - _______,_______, _______,_______, \ - _______,_______, _______,_______ \ -) + [_RAISE] = LAYOUT( + _______, RESET, _______, _______, _______, KC_LBRC, KC_RBRC, _______, KC_NLCK, KC_INS, KC_SLCK, KC_MUTE, + _______, KC_LEFT, KC_UP , KC_DOWN, KC_RGHT, KC_LPRN, KC_RPRN, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, + _______, _______, KC_EQL, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ) }; - void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); } diff --git a/keyboards/handwired/dactyl_manuform/4x6/rules.mk b/keyboards/handwired/dactyl_manuform/4x6/rules.mk index 750807051..caba0940c 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/rules.mk +++ b/keyboards/handwired/dactyl_manuform/4x6/rules.mk @@ -1,20 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina # Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = 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 +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 +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/dactyl_manuform/5x6/5x6.c b/keyboards/handwired/dactyl_manuform/5x6/5x6.c index 68fceffd9..0e9d5481c 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/5x6.c +++ b/keyboards/handwired/dactyl_manuform/5x6/5x6.c @@ -1,23 +1 @@ #include "5x6.h" - - -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -#endif - -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - diff --git a/keyboards/handwired/dactyl_manuform/5x6/5x6.h b/keyboards/handwired/dactyl_manuform/5x6/5x6.h index 5292ca097..606a21349 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/5x6.h +++ b/keyboards/handwired/dactyl_manuform/5x6/5x6.h @@ -1,38 +1,30 @@ #pragma once #include "dactyl_manuform.h" -#include "quantum.h" -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif +#define XXX KC_NO -#define LAYOUT_5x6(\ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ - L42, L43, R42, R43, \ - L44, L45, R40, R41, \ - L54, L55, R50, R51, \ - L52, L53, R52, R53 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { KC_NO, KC_NO, L42, L43, L44, L45 }, \ - { KC_NO, KC_NO, L52, L53, L54, L55 }, \ - \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 }, \ - { R40, R41, R42, R43, KC_NO, KC_NO }, \ - { R50, R51, R52, R53, KC_NO, KC_NO } \ +#define LAYOUT_5x6( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L42, L43, R42, R43, \ + L44, L45, R40, R41, \ + L54, L55, R50, R51, \ + L52, L53, R52, R53 \ +) { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { XXX, XXX, L42, L43, L44, L45 }, \ + { XXX, XXX, L52, L53, L54, L55 }, \ +\ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, XXX, XXX }, \ + { R50, R51, R52, R53, XXX, XXX } \ } diff --git a/keyboards/handwired/dactyl_manuform/5x6/config.h b/keyboards/handwired/dactyl_manuform/5x6/config.h index dc395d868..6b93da958 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/config.h @@ -20,9 +20,9 @@ along with this program. If not, see . #include "config_common.h" -#define PRODUCT_ID 0x3536 -#define DEVICE_VER 0x0001 -#define PRODUCT Dactyl-Manuform (5x6) +#define PRODUCT_ID 0x3536 +#define DEVICE_VER 0x0001 +#define PRODUCT Dactyl-Manuform (5x6) /* key matrix size */ // Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/5x6/info.json b/keyboards/handwired/dactyl_manuform/5x6/info.json index 14afc704c..d34b66544 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/info.json +++ b/keyboards/handwired/dactyl_manuform/5x6/info.json @@ -7,70 +7,85 @@ "layouts": { "LAYOUT_5x6": { "layout": [ - {"label":"L00", "x":0, "y":0}, - {"label":"L01", "x":1, "y":0}, - {"label":"L02", "x":2, "y":0}, - {"label":"L03", "x":3, "y":0}, - {"label":"L04", "x":4, "y":0}, - {"label":"L05", "x":5, "y":0}, - {"label":"R00", "x":11, "y":0}, - {"label":"R01", "x":12, "y":0}, - {"label":"R02", "x":13, "y":0}, - {"label":"R03", "x":14, "y":0}, - {"label":"R04", "x":15, "y":0}, - {"label":"R05", "x":16, "y":0}, - {"label":"L10", "x":0, "y":1}, - {"label":"L11", "x":1, "y":1}, - {"label":"L12", "x":2, "y":1}, - {"label":"L13", "x":3, "y":1}, - {"label":"L14", "x":4, "y":1}, - {"label":"L15", "x":5, "y":1}, - {"label":"R10", "x":11, "y":1}, - {"label":"R11", "x":12, "y":1}, - {"label":"R12", "x":13, "y":1}, - {"label":"R13", "x":14, "y":1}, - {"label":"R14", "x":15, "y":1}, - {"label":"R15", "x":16, "y":1}, - {"label":"L20", "x":0, "y":2}, - {"label":"L21", "x":1, "y":2}, - {"label":"L22", "x":2, "y":2}, - {"label":"L23", "x":3, "y":2}, - {"label":"L24", "x":4, "y":2}, - {"label":"L25", "x":5, "y":2}, - {"label":"R20", "x":11, "y":2}, - {"label":"R21", "x":12, "y":2}, - {"label":"R22", "x":13, "y":2}, - {"label":"R23", "x":14, "y":2}, - {"label":"R24", "x":15, "y":2}, - {"label":"R25", "x":16, "y":2}, - {"label":"L30", "x":0, "y":3}, - {"label":"L31", "x":1, "y":3}, - {"label":"L32", "x":2, "y":3}, - {"label":"L33", "x":3, "y":3}, - {"label":"L34", "x":4, "y":3}, - {"label":"L35", "x":5, "y":3}, - {"label":"R30", "x":11, "y":3}, - {"label":"R31", "x":12, "y":3}, - {"label":"R32", "x":13, "y":3}, - {"label":"R33", "x":14, "y":3}, - {"label":"R34", "x":15, "y":3}, - {"label":"R35", "x":16, "y":3}, - {"label":"L42", "x":2, "y":4}, - {"label":"L43", "x":3, "y":4}, - {"label":"R42", "x":13, "y":4}, - {"label":"R43", "x":14, "y":4}, - {"label":"L44", "x":4, "y":5}, - {"label":"L45", "x":5, "y":5}, - {"label":"R40", "x":11, "y":5}, - {"label":"R41", "x":12, "y":5}, - {"label":"L54", "x":6, "y":6}, - {"label":"L55", "x":7, "y":6}, - {"label":"R50", "x":9, "y":6}, - {"label":"R51", "x":10, "y":6}, - {"label":"L52", "x":6, "y":7}, - {"label":"L53", "x":7, "y":7}, - {"label":"R52", "x":9, "y":7}, - {"label":"R53", "x":10, "y":7} + {"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": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5, "y": 2}, + + {"x": 11, "y": 2}, + {"x": 12, "y": 2}, + {"x": 13, "y": 2}, + {"x": 14, "y": 2}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + {"x": 4, "y": 3}, + {"x": 5, "y": 3}, + + {"x": 11, "y": 3}, + {"x": 12, "y": 3}, + {"x": 13, "y": 3}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + + {"x": 4, "y": 5}, + {"x": 5, "y": 5}, + + {"x": 11, "y": 5}, + {"x": 12, "y": 5}, + + {"x": 6, "y": 6}, + {"x": 7, "y": 6}, + + {"x": 9, "y": 6}, + {"x": 10, "y": 6}, + + {"x": 6, "y": 7}, + {"x": 7, "y": 7}, + + {"x": 9, "y": 7}, + {"x": 10, "y": 7} ] } } diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/config.h index 29ab59ad6..5a20f9473 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/config.h @@ -15,13 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ - #pragma once - #define USE_SERIAL #define MASTER_LEFT -// #define MASTER_RIGHT +//#define MASTER_RIGHT + //#define EE_HANDS -// Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c index 0910faf89..5bb5836fb 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/keymap.c @@ -1,8 +1,5 @@ -/* A standard layout for the Dactyl Manuform 5x6 Keyboard */ - #include QMK_KEYBOARD_H - #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 @@ -11,39 +8,37 @@ #define LOWER MO(_LOWER) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_5x6( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS, + KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, + KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH, + KC_LBRC,KC_RBRC, KC_PLUS, KC_EQL, + RAISE,KC_SPC, KC_ENT, LOWER, + KC_TAB,KC_HOME, KC_END, KC_DEL, + KC_BSPC, KC_GRV, KC_LGUI, KC_LALT + ), - [_QWERTY] = LAYOUT_5x6( - KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC, - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS, - KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, - KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH, - KC_LBRC,KC_RBRC, KC_PLUS, KC_EQL, - RAISE,KC_SPC, KC_ENT, LOWER, - KC_TAB,KC_HOME, KC_END, KC_DEL, - KC_BSPC, KC_GRV, KC_LGUI, KC_LALT - ), + [_LOWER] = LAYOUT_5x6( + KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS, + _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, + _______,_______,_______,_______,_______,_______, _______, KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS, + _______,KC_PSCR, _______, KC_P0, + _______,_______, _______,_______, + _______,_______, _______,_______, + _______,_______, _______,_______ - [_LOWER] = LAYOUT_5x6( + ), - KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, - _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS, - _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, - _______,_______,_______,_______,_______,_______, _______, KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS, - _______,KC_PSCR, _______, KC_P0, - _______,_______, _______,_______, - _______,_______, _______,_______, - _______,_______, _______,_______ - - ), - - [_RAISE] = LAYOUT_5x6( - KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 , - _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, - _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, - _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, - _______,_______, KC_EQL ,_______, - _______,_______, _______,_______, - _______,_______, _______,_______, - _______,_______, _______,_______ - ), + [_RAISE] = LAYOUT_5x6( + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 , + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, + _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, + _______,_______, KC_EQL ,_______, + _______,_______, _______,_______, + _______,_______, _______,_______, + _______,_______, _______,_______ + ) }; diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c index f8dfb2718..de931feab 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/keymap.c @@ -16,16 +16,13 @@ enum dactyl_layers { #define KILL LGUI(LSFT(KC_C)) #define OPEN LGUI(KC_P) #define KC_QSM LSFT(SE_PLUS) -#define KC_AA SE_AA -#define KC_AE SE_AE -#define KC_OE SE_OSLH const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_5x6( - KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , SE_APOS, - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_AA , - KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_OE , KC_AE , + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , SE_QUOT, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , SE_ARNG, + KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , SE_ODIA, SE_ADIA, KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SE_SLSH, SE_MINS, KC_EXLM, KC_QSM , SE_PLUS, SE_EQL , RAISE , KC_SPC , KC_ENT , LOWER , @@ -37,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { SE_TILD, KC_EXLM, SE_AT , KC_HASH, SE_DLR , KC_PERC, SE_CIRC, SE_AMPR, SE_ASTR, SE_SLSH, SE_LPRN, SE_RPRN, SE_ACUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, SE_LCBR, SE_RCBR, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, SE_LBRC, SE_RBRC, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, SE_LESS, SE_GRTR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, SE_LABK, SE_RABK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/handwired/dactyl_manuform/5x6/rules.mk b/keyboards/handwired/dactyl_manuform/5x6/rules.mk index 750807051..caba0940c 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/rules.mk +++ b/keyboards/handwired/dactyl_manuform/5x6/rules.mk @@ -1,20 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina # Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = 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 +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 +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/dactyl_manuform/5x6_2_5/5x6_2_5.h b/keyboards/handwired/dactyl_manuform/5x6_2_5/5x6_2_5.h index c41037ce6..790fdb069 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_2_5/5x6_2_5.h +++ b/keyboards/handwired/dactyl_manuform/5x6_2_5/5x6_2_5.h @@ -18,26 +18,27 @@ #include "dactyl_manuform.h" -#define LAYOUT_5x6_2_5(\ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ - L40, L41, L42, L43, L44, L55, L53, R52, R50, R41, R42, R43, R44, R45, \ - L54, L52, R53, R51 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { L40, L41, L42, L43, L44, KC_NO }, \ - { KC_NO, KC_NO, L52, L53, L54, L55 }, \ - \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 }, \ - { KC_NO, R41, R42, R43, R44, R45 }, \ - { R50, R51, R52, R53, KC_NO, KC_NO } \ +#define XXX KC_NO + +#define LAYOUT_5x6_2_5( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L55, L53, R52, R50, R41, R42, R43, R44, R45, \ + L54, L52, R53, R51 \ +) { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, XXX }, \ + { XXX, XXX, L52, L53, L54, L55 }, \ +\ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { XXX, R41, R42, R43, R44, R45 }, \ + { R50, R51, R52, R53, XXX, XXX } \ } diff --git a/keyboards/handwired/dactyl_manuform/5x6_2_5/config.h b/keyboards/handwired/dactyl_manuform/5x6_2_5/config.h index 029f1723b..79ea625d9 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_2_5/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6_2_5/config.h @@ -19,18 +19,14 @@ along with this program. If not, see . #include "config_common.h" -#define PRODUCT_ID 0x3536 -#define DEVICE_VER 0x0003 -#define PRODUCT Dactyl-Manuform (5x6+2) -// #define PRODUCT Dactyl-Manuform (5x6+2) BLE +#define PRODUCT_ID 0x3536 +#define DEVICE_VER 0x0003 +#define PRODUCT Dactyl-Manuform (5x6+2) /* key matrix size */ #define MATRIX_ROWS 12 #define MATRIX_COLS 6 -// wiring of each half -// ../../../../docs/proton_c_conversion.md - // left half pro-mirco #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } diff --git a/keyboards/handwired/dactyl_manuform/5x6_2_5/info.json b/keyboards/handwired/dactyl_manuform/5x6_2_5/info.json index ad227d5f5..aa7e2369b 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_2_5/info.json +++ b/keyboards/handwired/dactyl_manuform/5x6_2_5/info.json @@ -7,79 +7,85 @@ "layouts": { "LAYOUT_5x6_2_5": { "layout": [ - {"label":"L00", "x":0, "y":0}, - {"label":"L01", "x":1, "y":0}, - {"label":"L02", "x":2, "y":0}, - {"label":"L03", "x":3, "y":0}, - {"label":"L04", "x":4, "y":0}, - {"label":"L05", "x":5, "y":0}, - {"label":"R00", "x":11, "y":0}, - {"label":"R01", "x":12, "y":0}, - {"label":"R02", "x":13, "y":0}, - {"label":"R03", "x":14, "y":0}, - {"label":"R04", "x":15, "y":0}, - {"label":"R05", "x":16, "y":0}, + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, - {"label":"L10", "x":0, "y":1}, - {"label":"L11", "x":1, "y":1}, - {"label":"L12", "x":2, "y":1}, - {"label":"L13", "x":3, "y":1}, - {"label":"L14", "x":4, "y":1}, - {"label":"L15", "x":5, "y":1}, - {"label":"R10", "x":11, "y":1}, - {"label":"R11", "x":12, "y":1}, - {"label":"R12", "x":13, "y":1}, - {"label":"R13", "x":14, "y":1}, - {"label":"R14", "x":15, "y":1}, - {"label":"R15", "x":16, "y":1}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, - {"label":"L20", "x":0, "y":2}, - {"label":"L21", "x":1, "y":2}, - {"label":"L22", "x":2, "y":2}, - {"label":"L23", "x":3, "y":2}, - {"label":"L24", "x":4, "y":2}, - {"label":"L25", "x":5, "y":2}, - {"label":"R20", "x":11, "y":2}, - {"label":"R21", "x":12, "y":2}, - {"label":"R22", "x":13, "y":2}, - {"label":"R23", "x":14, "y":2}, - {"label":"R24", "x":15, "y":2}, - {"label":"R25", "x":16, "y":2}, + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, - {"label":"L30", "x":0, "y":3}, - {"label":"L31", "x":1, "y":3}, - {"label":"L32", "x":2, "y":3}, - {"label":"L33", "x":3, "y":3}, - {"label":"L34", "x":4, "y":3}, - {"label":"L35", "x":5, "y":3}, - {"label":"R30", "x":11, "y":3}, - {"label":"R31", "x":12, "y":3}, - {"label":"R32", "x":13, "y":3}, - {"label":"R33", "x":14, "y":3}, - {"label":"R34", "x":15, "y":3}, - {"label":"R35", "x":16, "y":3}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, - {"label":"L40", "x":0, "y":4}, - {"label":"L41", "x":1, "y":4}, - {"label":"L42", "x":2, "y":4}, - {"label":"L43", "x":3, "y":4}, - {"label":"L44", "x":5, "y":4}, - {"label":"L45", "x":6, "y":4}, - {"label":"L53", "x":7, "y":4}, + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5, "y": 2}, - {"label":"R52", "x":9, "y":4}, - {"label":"R40", "x":10, "y":4}, - {"label":"R41", "x":11, "y":4}, - {"label":"R42", "x":13, "y":4}, - {"label":"R43", "x":14, "y":4}, - {"label":"R44", "x":15, "y":4}, - {"label":"R45", "x":16, "y":4}, + {"x": 11, "y": 2}, + {"x": 12, "y": 2}, + {"x": 13, "y": 2}, + {"x": 14, "y": 2}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, - {"label":"L54", "x":6, "y":5}, - {"label":"L52", "x":7, "y":5}, + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + {"x": 4, "y": 3}, + {"x": 5, "y": 3}, - {"label":"R53", "x":9, "y":5}, - {"label":"R51", "x":10, "y":5} + {"x": 11, "y": 3}, + {"x": 12, "y": 3}, + {"x": 13, "y": 3}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + + {"x": 5, "y": 4}, + {"x": 6, "y": 4}, + {"x": 7, "y": 4}, + + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + + {"x": 13, "y":4}, + {"x": 14, "y":4}, + {"x": 15, "y":4}, + {"x": 16, "y":4}, + + {"x": 6, "y": 5}, + {"x": 7, "y": 5}, + + {"x": 9, "y": 5}, + {"x": 10, "y": 5} ] } } diff --git a/keyboards/handwired/dactyl_manuform/5x6_2_5/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_2_5/rules.mk index d5ba60f2a..ec12188f3 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_2_5/rules.mk +++ b/keyboards/handwired/dactyl_manuform/5x6_2_5/rules.mk @@ -1,14 +1,23 @@ -BOOTMAGIC_ENABLE = lite -COMMAND_ENABLE = no +# MCU name +MCU = atmega32u4 -# # Pro-Micro -# NKRO_ENABLE = yes +# Bootloader selection +BOOTLOADER = caterina -# # # Adafruit Feather -# # NKRO_ENABLE = no -# # # Processor frequency -# F_CPU = 8000000 -# F_USB = $(F_CPU) -# # # BLUETOOTH_ENABLE = no -# # BLUETOOTH = AdafruitBLE -# # CONSOLE_DEBUG = yes +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +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 +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.c b/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.c index bacda3640..e4ad432cc 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.c +++ b/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.c @@ -1,2 +1 @@ #include "5x6_5.h" - diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.h b/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.h index deb288a1f..794b0be9f 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.h +++ b/keyboards/handwired/dactyl_manuform/5x6_5/5x6_5.h @@ -2,26 +2,27 @@ #include "dactyl_manuform.h" -#define LAYOUT_5x6_5(\ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ - L42, L43, L44, L55, L53, R52, R50, R41, R42, R43, \ - L54, L52, R53, R51 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { KC_NO, KC_NO, L42, L43, L44, KC_NO }, \ - { KC_NO, KC_NO, L52, L53, L54, L55 }, \ - \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 }, \ - { KC_NO, R41, R42, R43, KC_NO, KC_NO }, \ - { R50, R51, R52, R53, KC_NO, KC_NO } \ +#define XXX KC_NO + +#define LAYOUT_5x6_5( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L42, L43, L44, L55, L53, R52, R50, R41, R42, R43, \ + L54, L52, R53, R51 \ +) { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { XXX, XXX, L42, L43, L44, XXX }, \ + { XXX, XXX, L52, L53, L54, L55 }, \ +\ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { XXX, R41, R42, R43, XXX, XXX }, \ + { R50, R51, R52, R53, XXX, XXX } \ } diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/config.h b/keyboards/handwired/dactyl_manuform/5x6_5/config.h index 1e68b6df0..031ccf88d 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6_5/config.h @@ -20,9 +20,9 @@ along with this program. If not, see . #include "config_common.h" -#define PRODUCT_ID 0x3536 -#define DEVICE_VER 0x0002 -#define PRODUCT Dactyl-Manuform (5x6) +#define PRODUCT_ID 0x3536 +#define DEVICE_VER 0x0002 +#define PRODUCT Dactyl-Manuform (5x6) /* key matrix size */ // Rows are doubled-up @@ -30,7 +30,6 @@ along with this program. If not, see . #define MATRIX_COLS 6 // wiring of each half -// ../../../../docs/proton_c_conversion.md #define MATRIX_COL_PINS { D4, C6, D7, E6, B4, B5 } #define MATRIX_ROW_PINS { F6, F7, B1, B3, B2, B6 } diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/info.json b/keyboards/handwired/dactyl_manuform/5x6_5/info.json index 3e9b66a6a..dff99d33d 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/info.json +++ b/keyboards/handwired/dactyl_manuform/5x6_5/info.json @@ -7,75 +7,81 @@ "layouts": { "LAYOUT_5x6_5": { "layout": [ - {"label":"L00", "x":0, "y":0}, - {"label":"L01", "x":1, "y":0}, - {"label":"L02", "x":2, "y":0}, - {"label":"L03", "x":3, "y":0}, - {"label":"L04", "x":4, "y":0}, - {"label":"L05", "x":5, "y":0}, - {"label":"R00", "x":11, "y":0}, - {"label":"R01", "x":12, "y":0}, - {"label":"R02", "x":13, "y":0}, - {"label":"R03", "x":14, "y":0}, - {"label":"R04", "x":15, "y":0}, - {"label":"R05", "x":16, "y":0}, + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, - {"label":"L10", "x":0, "y":1}, - {"label":"L11", "x":1, "y":1}, - {"label":"L12", "x":2, "y":1}, - {"label":"L13", "x":3, "y":1}, - {"label":"L14", "x":4, "y":1}, - {"label":"L15", "x":5, "y":1}, - {"label":"R10", "x":11, "y":1}, - {"label":"R11", "x":12, "y":1}, - {"label":"R12", "x":13, "y":1}, - {"label":"R13", "x":14, "y":1}, - {"label":"R14", "x":15, "y":1}, - {"label":"R15", "x":16, "y":1}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, - {"label":"L20", "x":0, "y":2}, - {"label":"L21", "x":1, "y":2}, - {"label":"L22", "x":2, "y":2}, - {"label":"L23", "x":3, "y":2}, - {"label":"L24", "x":4, "y":2}, - {"label":"L25", "x":5, "y":2}, - {"label":"R20", "x":11, "y":2}, - {"label":"R21", "x":12, "y":2}, - {"label":"R22", "x":13, "y":2}, - {"label":"R23", "x":14, "y":2}, - {"label":"R24", "x":15, "y":2}, - {"label":"R25", "x":16, "y":2}, + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, - {"label":"L30", "x":0, "y":3}, - {"label":"L31", "x":1, "y":3}, - {"label":"L32", "x":2, "y":3}, - {"label":"L33", "x":3, "y":3}, - {"label":"L34", "x":4, "y":3}, - {"label":"L35", "x":5, "y":3}, - {"label":"R30", "x":11, "y":3}, - {"label":"R31", "x":12, "y":3}, - {"label":"R32", "x":13, "y":3}, - {"label":"R33", "x":14, "y":3}, - {"label":"R34", "x":15, "y":3}, - {"label":"R35", "x":16, "y":3}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, - {"label":"L42", "x":2, "y":4}, - {"label":"L43", "x":3, "y":4}, - {"label":"L44", "x":5, "y":4}, - {"label":"L45", "x":6, "y":4}, - {"label":"L53", "x":7, "y":4}, + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5, "y": 2}, - {"label":"R52", "x":9, "y":4}, - {"label":"R40", "x":10, "y":4}, - {"label":"R41", "x":11, "y":4}, - {"label":"R42", "x":13, "y":4}, - {"label":"R43", "x":14, "y":4}, + {"x": 11, "y": 2}, + {"x": 12, "y": 2}, + {"x": 13, "y": 2}, + {"x": 14, "y": 2}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, - {"label":"L54", "x":6, "y":5}, - {"label":"L52", "x":7, "y":5}, + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + {"x": 4, "y": 3}, + {"x": 5, "y": 3}, - {"label":"R53", "x":9, "y":5}, - {"label":"R51", "x":10, "y":5} + {"x": 11, "y": 3}, + {"x": 12, "y": 3}, + {"x": 13, "y": 3}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + + {"x": 5, "y": 4}, + {"x": 6, "y": 4}, + {"x": 7, "y": 4}, + + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4}, + + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + + {"x": 6, "y": 5}, + {"x": 7, "y": 5}, + + {"x": 9, "y": 5}, + {"x": 10, "y": 5} ] } } diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/rules.mk index 2bd6620c2..6e58ff5d1 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/rules.mk +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/rules.mk @@ -1,4 +1,5 @@ KEY_LOCK_ENABLE = yes CONSOLE_ENABLE = no -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/rules.mk index 5a8c85453..d720c0c2d 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/rules.mk +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes COMMAND_ENABLE = yes MOUSEKEY_ENABLE = no diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_5/rules.mk index a20a3e7bd..a32f31c1f 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/rules.mk +++ b/keyboards/handwired/dactyl_manuform/5x6_5/rules.mk @@ -1,3 +1,23 @@ -BOOTMAGIC_ENABLE = lite -COMMAND_ENABLE = no -NKRO_ENABLE = yes +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c deleted file mode 100644 index 4048fb233..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.c +++ /dev/null @@ -1,228 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "5x6_right_trackball.h" - -#ifndef TRACKBALL_DPI_OPTIONS -# define TRACKBALL_DPI_OPTIONS { 1200, 1600, 2400 } -# ifndef TRACKBALL_DPI_DEFAULT -# define TRACKBALL_DPI_DEFAULT 1 -# endif -#endif -#ifndef TRACKBALL_DPI_DEFAULT -# define TRACKBALL_DPI_DEFAULT 0 -#endif - -keyboard_config_t keyboard_config; -uint16_t dpi_array[] = TRACKBALL_DPI_OPTIONS; -#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) - -bool BurstState = false; // init burst state for Trackball module -uint16_t MotionStart = 0; // Timer for accel, 0 is resting state - -__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { - mouse_report->x = x; - mouse_report->y = y; -} - -__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { - report_pmw_t data = pmw_read_burst(); - if (data.isOnSurface && data.isMotion) { - // Reset timer if stopped moving - if (!data.isMotion) { - if (MotionStart != 0) MotionStart = 0; - return; - } - - // Set timer if new motion - if ((MotionStart == 0) && data.isMotion) { - if (debug_mouse) dprintf("Starting motion.\n"); - MotionStart = timer_read(); - } - - if (debug_mouse) { - dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); - } - if (debug_mouse) { - dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); - } -#if defined(PROFILE_LINEAR) - float scale = float(timer_elaspsed(MotionStart)) / 1000.0; - data.dx *= scale; - data.dy *= scale; -#elif defined(PROFILE_INVERSE) - // TODO -#else - // no post processing -#endif - - // Wrap to HID size - data.dx = constrain(data.dx, -127, 127); - data.dy = constrain(data.dy, -127, 127); - if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); - // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); - - mouse_report->x = -data.dx; - mouse_report->y = data.dy; - } -} - -bool process_record_kb(uint16_t keycode, keyrecord_t* record) { - if (!process_record_user(keycode, record)) { return false; } - -#ifdef POINTING_DEVICE_ENABLE - if (keycode == DPI_CONFIG && record->event.pressed) { - if ((get_mods()|get_oneshot_mods()) & MOD_MASK_SHIFT) { - keyboard_config.dpi_config = (keyboard_config.dpi_config - 1) % DPI_OPTION_SIZE; - } else { - keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE; - } - eeconfig_update_kb(keyboard_config.raw); - trackball_set_cpi(dpi_array[keyboard_config.dpi_config]); - } -#endif - -/* If Mousekeys is disabled, then use handle the mouse button - * keycodes. This makes things simpler, and allows usage of - * the keycodes in a consistent manner. But only do this if - * Mousekeys is not enable, so it's not handled twice. - */ -#ifndef MOUSEKEY_ENABLE - if (IS_MOUSEKEY_BUTTON(keycode)) { - report_mouse_t currentReport = pointing_device_get_report(); - if (record->event.pressed) { - currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); - } else { - currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); - } - pointing_device_set_report(currentReport); - pointing_device_send(); - } -#endif - - return true; -} - -// Hardware Setup -void keyboard_pre_init_kb(void) { - // debug_enable = true; - // debug_matrix = true; - // debug_mouse = true; - // debug_encoder = true; - - /* Ground all output pins connected to ground. This provides additional - * pathways to ground. If you're messing with this, know this: driving ANY - * of these pins high will cause a short. On the MCU. Ka-blooey. - */ - - // This is the debug LED. -#if defined(DEBUG_LED_PIN) - setPinOutput(DEBUG_LED_PIN); - writePin(DEBUG_LED_PIN, debug_enable); -#endif - - keyboard_pre_init_user(); -} - -#ifdef POINTING_DEVICE_ENABLE -void pointing_device_init(void) { - if (!is_keyboard_left()) { - // initialize ball sensor - pmw_spi_init(); - } - trackball_set_cpi(dpi_array[keyboard_config.dpi_config]); -} - -static bool has_report_changed(report_mouse_t new, report_mouse_t old) { - return (new.buttons != old.buttons) || - (new.x && new.x != old.x) || - (new.y && new.y != old.y) || - (new.h && new.h != old.h) || - (new.v && new.v != old.v); -} - -void pointing_device_task(void) { - report_mouse_t mouse_report = pointing_device_get_report(); - if (!is_keyboard_left()) { - process_mouse(&mouse_report); - } - - pointing_device_set_report(mouse_report); - pointing_device_send(); -} -#endif - -void eeconfig_init_kb(void) { - keyboard_config.dpi_config = TRACKBALL_DPI_DEFAULT; -#ifdef POINTING_DEVICE_ENABLE - trackball_set_cpi(dpi_array[keyboard_config.dpi_config]); -#endif - eeconfig_update_kb(keyboard_config.raw); - eeconfig_init_user(); -} - -void matrix_init_kb(void) { - // is safe to just read DPI setting since matrix init - // comes before pointing device init. - keyboard_config.raw = eeconfig_read_kb(); - if (keyboard_config.dpi_config > DPI_OPTION_SIZE) { - eeconfig_init_kb(); - } - matrix_init_user(); -} - -#ifdef POINTING_DEVICE_ENABLE -void pointing_device_send(void) { - static report_mouse_t old_report = {}; - report_mouse_t mouseReport = pointing_device_get_report(); - if (is_keyboard_master()) { - int8_t x = mouseReport.x, y = mouseReport.y; - mouseReport.x = 0; - mouseReport.y = 0; - process_mouse_user(&mouseReport, x, y); - if (has_report_changed(mouseReport, old_report)) { - host_mouse_send(&mouseReport); - } - } else { - master_mouse_send(mouseReport.x, mouseReport.y); - } - mouseReport.x = 0; - mouseReport.y = 0; - mouseReport.v = 0; - mouseReport.h = 0; - old_report = mouseReport; - pointing_device_set_report(mouseReport); -} -#endif - -#ifdef SWAP_HANDS_ENABLE -const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { - /* Left hand, matrix positions */ - {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, - {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}}, - {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}}, - {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}}, - {{5, 10}, {4, 10}, {3, 10}, {2, 10}, {1, 10}, {0, 10}}, - {{5, 11}, {4, 11}, {3, 11}, {2, 11}, {1, 11}, {0, 11}}, - /* Right hand, matrix positions */ - {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, - {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, - {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, - {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, - {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, - {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}} -}; -#endif diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.h deleted file mode 100644 index c8650f73d..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/5x6_right_trackball.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . - */ - -#pragma once - -#include "dactyl_manuform.h" -#include "quantum.h" -#include "spi_master.h" -#include "pmw3360.h" -#include "pointing_device.h" - - -#define ___ KC_NO - -#define LAYOUT_5x6_right_trackball(\ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ - L42, L43, R42, R43, \ - L44, L45, R41, \ - L54, L55, R51, \ - L52, L53, R52, R53 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { ___, ___, L42, L43, L44, L45 }, \ - { ___, ___, L52, L53, L54, L55 }, \ - \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 }, \ - { ___, R41, R42, R43, ___, ___ }, \ - { ___, R51, R52, R53, ___, ___ } \ -} - - -void process_wheel(report_mouse_t* mouse_report); -void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v); - -typedef union { - uint32_t raw; - struct { - uint8_t dpi_config; - }; -} keyboard_config_t; - -extern keyboard_config_t keyboard_config; - -enum ploopy_keycodes { - DPI_CONFIG = SAFE_RANGE, - KEYMAP_SAFE_RANGE, -}; - -void master_mouse_send(int8_t x, int8_t y); -void trackball_set_cpi(uint16_t cpi); diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h deleted file mode 100644 index bc6d66bb9..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/config.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include "config_common.h" - -#define PRODUCT_ID 0x3536 -#define DEVICE_VER 0x0001 -#define PRODUCT Tractyl-Manuform (5x6 with right side Trackball) - -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 12 -#define MATRIX_COLS 6 - -// wiring of each half -#define MATRIX_COL_PINS { C0, C1, C2, C3, C4, C5 } -#define MATRIX_ROW_PINS { F7, F6, F5, F4, F3, F2 } - -#define DIODE_DIRECTION COL2ROW - -// WS2812 RGB LED strip input and number of LEDs -#define RGB_DI_PIN E7 -#define RGBLED_NUM 58 -#define RGBLIGHT_SPLIT -#define RGBLED_SPLIT { 30 , 28 } -#define RGBLIGHT_SLEEP -// #define RGBW -#define RGBLIGHT_LIMIT_VAL 100 -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - -#define DEBUG_LED_PIN D6 - -#define USB_POLLING_INTERVAL_MS 1 - -#define ROTATIONAL_TRANSFORM_ANGLE -25 - -/* Bootmagic Lite key configuration */ -#define BOOTMAGIC_LITE_ROW 0 -#define BOOTMAGIC_LITE_COLUMN 0 -#define BOOTMAGIC_LITE_ROW_RIGHT 6 -#define BOOTMAGIC_LITE_COLUMN_RIGHT 5 - -#define AUDIO_PIN C6 -#define AUDIO_PIN_ALT B7 - -#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095 -#define DYNAMIC_KEYMAP_LAYER_COUNT 16 - -/* serial.c configuration for split keyboard */ -#undef SOFT_SERIAL_PIN -#define SOFT_SERIAL_PIN D2 diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/info.json b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/info.json deleted file mode 100644 index 8a413ec44..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/info.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "keyboard_name": "Dactyl Manuform 5x6", - "url": "", - "maintainer": "qmk", - "width": 17, - "height": 8, - "layouts": { - "LAYOUT_5x6_right_trackball": { - "layout": [ - {"label":"L00", "x":0, "y":0}, - {"label":"L01", "x":1, "y":0}, - {"label":"L02", "x":2, "y":0}, - {"label":"L03", "x":3, "y":0}, - {"label":"L04", "x":4, "y":0}, - {"label":"L05", "x":5, "y":0}, - {"label":"R00", "x":11, "y":0}, - {"label":"R01", "x":12, "y":0}, - {"label":"R02", "x":13, "y":0}, - {"label":"R03", "x":14, "y":0}, - {"label":"R04", "x":15, "y":0}, - {"label":"R05", "x":16, "y":0}, - {"label":"L10", "x":0, "y":1}, - {"label":"L11", "x":1, "y":1}, - {"label":"L12", "x":2, "y":1}, - {"label":"L13", "x":3, "y":1}, - {"label":"L14", "x":4, "y":1}, - {"label":"L15", "x":5, "y":1}, - {"label":"R10", "x":11, "y":1}, - {"label":"R11", "x":12, "y":1}, - {"label":"R12", "x":13, "y":1}, - {"label":"R13", "x":14, "y":1}, - {"label":"R14", "x":15, "y":1}, - {"label":"R15", "x":16, "y":1}, - {"label":"L20", "x":0, "y":2}, - {"label":"L21", "x":1, "y":2}, - {"label":"L22", "x":2, "y":2}, - {"label":"L23", "x":3, "y":2}, - {"label":"L24", "x":4, "y":2}, - {"label":"L25", "x":5, "y":2}, - {"label":"R20", "x":11, "y":2}, - {"label":"R21", "x":12, "y":2}, - {"label":"R22", "x":13, "y":2}, - {"label":"R23", "x":14, "y":2}, - {"label":"R24", "x":15, "y":2}, - {"label":"R25", "x":16, "y":2}, - {"label":"L30", "x":0, "y":3}, - {"label":"L31", "x":1, "y":3}, - {"label":"L32", "x":2, "y":3}, - {"label":"L33", "x":3, "y":3}, - {"label":"L34", "x":4, "y":3}, - {"label":"L35", "x":5, "y":3}, - {"label":"R30", "x":11, "y":3}, - {"label":"R31", "x":12, "y":3}, - {"label":"R32", "x":13, "y":3}, - {"label":"R33", "x":14, "y":3}, - {"label":"R34", "x":15, "y":3}, - {"label":"R35", "x":16, "y":3}, - {"label":"L42", "x":2, "y":4}, - {"label":"L43", "x":3, "y":4}, - {"label":"R42", "x":13, "y":4}, - {"label":"R43", "x":14, "y":4}, - {"label":"L44", "x":4, "y":5}, - {"label":"L45", "x":5, "y":5}, - {"label":"R41", "x":12, "y":5}, - {"label":"L54", "x":6, "y":6}, - {"label":"L55", "x":7, "y":6}, - {"label":"R51", "x":10, "y":6}, - {"label":"L52", "x":6, "y":7}, - {"label":"L53", "x":7, "y":7}, - {"label":"R52", "x":9, "y":7}, - {"label":"R53", "x":10, "y":7} - ] - } - } -} diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/config.h deleted file mode 100644 index 5bad6bcab..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/config.h +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . - */ - - - -#pragma once - - -#include "../drashna/config.h" diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/keymap.c deleted file mode 100644 index 037f59af8..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/keymap.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . - */ - -// placeholder diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/rules.mk deleted file mode 100644 index 457cda5b0..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/default/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -USER_NAME := drashna -SRC += ../drashna/keymap.c - -include $(KEYBOARD_PATH_1)/keymaps/drashna/rules.mk diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h deleted file mode 100644 index dedd1f5fe..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/config.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . - */ - -#pragma once - -// #define USE_I2C -#define SELECT_SOFT_SERIAL_SPEED 0 -// #define SERIAL_USE_MULTI_TRANSACTION -#define SPLIT_MODS_ENABLE -#define EE_HANDS - -#define TRACKBALL_DPI_OPTIONS \ - { 1200, 1800, 2600, 3400 } - -#define RGBLIGHT_MAX_BRIGHTNESS 60 - -#undef DEBOUNCE -#define DEBOUNCE 10 - -#define SOLENOID_PIN F1 -#define SOLENOID_DEFAULT_DWELL 8 - -#define OLED_DISPLAY_128X64 -#define OLED_BRIGHTNESS 50 - -#define MK_KINETIC_SPEED diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c deleted file mode 100644 index b3300daa9..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/keymap.c +++ /dev/null @@ -1,250 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "drashna.h" - -// clang-format off -#define LAYOUT_5x6_right_trackball_wrapper(...) LAYOUT_5x6_right_trackball(__VA_ARGS__) -#define LAYOUT_5x6_right_trackball_base( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ - ) \ - LAYOUT_5x6_right_trackball_wrapper( \ - KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \ - SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \ - LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \ - OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - OS_LALT, OS_LGUI, TG_GAME, TG_DBLO, \ - OS_LGUI, KC_GRV, OS_RGUI, \ - KC_SPC, OS_LGUI, KC_ENT, \ - BK_LWER, TT(_MOUSE), TT(_MOUSE), DL_RAIS \ - ) -#define LAYOUT_5x6_right_trackball_base_wrapper(...) LAYOUT_5x6_right_trackball_base(__VA_ARGS__) - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_5x6_right_trackball_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), - - [_COLEMAK] = LAYOUT_5x6_right_trackball_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), - - [_DVORAK] = LAYOUT_5x6_right_trackball_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), - - [_WORKMAN] = LAYOUT_5x6_right_trackball_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_5x6_right_trackball_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_5x6_right_trackball_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_5x6_right_trackball_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_5x6_right_trackball_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - - [_MOUSE] = LAYOUT_5x6_right_trackball( - _______, _______, _______, _______, _______, _______, DPI_CONFIG, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, _______, - _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, - _______, _______, _______, - _______, _______, _______, _______ - ), - [_GAMEPAD] = LAYOUT_5x6_right_trackball( - KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, DPI_CONFIG, _______, _______, _______, _______, _______, - KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, - KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, - KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_H, _______, _______, _______, _______, _______, _______, - KC_I, KC_T, TG_GAME, KC_NO, - KC_V, KC_O, _______, - KC_SPC, KC_P, _______, - KC_H, KC_LGUI, _______, _______ - ), - [_DIABLO] = LAYOUT_5x6_right_trackball( - KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, - KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, _______, _______, _______, _______, _______, _______, - KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, _______, _______, _______, _______, _______, _______, - KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, _______, _______, _______, _______, _______, _______, - KC_F, KC_L, KC_NO, TG_DBLO, - KC_DIABLO_CLEAR, KC_F, _______, - SFT_T(KC_SPC), KC_J, _______, - ALT_T(KC_Q), KC_LGUI, _______, _______ - ), - [_LOWER] = LAYOUT_5x6_right_trackball_wrapper( - KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11, - _______, _________________LOWER_L1__________________, _________________LOWER_R1__________________, _______, - _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, - _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, - _______, _______, _______, _______, - _______, _______, _______, - _______, _______, _______, - _______, _______, _______, _______ - ), - [_RAISE] = LAYOUT_5x6_right_trackball_wrapper( - KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11, - KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, - _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, - _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, - _______, _______, _______, _______, - _______, _______, _______, - _______, _______, _______, - _______, _______, _______, _______ - ), - [_ADJUST] = LAYOUT_5x6_right_trackball_wrapper( - KC_MAKE, ___________________BLANK___________________, _________________ADJUST_R1_________________, KC_RST, - VRSN, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, EEP_RST, - _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG_MODS, - _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY, - HPT_DWLI, HPT_DWLD, _______, _______, - HPT_TOG, HPT_BUZ, KC_NUKE, - _______, _______, _______, - _______, _______, KC_NUKE, _______ - ), -}; -// clang-format on - -#ifdef POINTING_DEVICE_ENABLE -static uint16_t mouse_timer = 0; -static uint16_t mouse_debounce_timer = 0; -static uint8_t mouse_keycode_tracker = 0; -bool tap_toggling = false; - -void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { - if ((x || y) && timer_elapsed(mouse_timer) > 125) { - mouse_timer = timer_read(); - if (!layer_state_is(_MOUSE) && !(layer_state_is(_GAMEPAD) || layer_state_is(_DIABLO)) && timer_elapsed(mouse_debounce_timer) > 125) { - layer_on(_MOUSE); - } - } - -# ifdef TAPPING_TERM_PER_KEY - if (timer_elapsed(mouse_debounce_timer) > get_tapping_term(KC_BTN1, NULL) -# else - if (timer_elapsed(mouse_debounce_timer) > TAPPING_TERM -# endif - || (layer_state_is(_GAMEPAD) || layer_state_is(_DIABLO))) { - mouse_report->x = x; - mouse_report->y = y; - } -# ifdef OLED_DRIVER_ENABLE - if (x || y) oled_timer = timer_read32(); -# endif -} - -void matrix_scan_keymap(void) { - if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker && !tap_toggling) { - layer_off(_MOUSE); - } - if (tap_toggling) { - if (!layer_state_is(_MOUSE)) { - layer_on(_MOUSE); - } - } -} - -bool process_record_keymap(uint16_t keycode, keyrecord_t* record) { - switch (keycode) { - case TT(_MOUSE): { - if (record->event.pressed) { - mouse_keycode_tracker++; - } else { -# if TAPPING_TOGGLE != 0 - if (record->tap.count == TAPPING_TOGGLE) { - tap_toggling ^= 1; -# if TAPPING_TOGGLE == 1 - if (!tap_toggling) mouse_keycode_tracker -= record->tap.count + 1; -# else - if (!tap_toggling) mouse_keycode_tracker -= record->tap.count; -# endif - } else { - mouse_keycode_tracker--; - } -# endif - } - mouse_timer = timer_read(); - break; - } - case MO(_MOUSE): - case DPI_CONFIG: - case KC_MS_UP ... KC_MS_WH_RIGHT: - record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--; - mouse_timer = timer_read(); - break; - default: - if (layer_state_is(_MOUSE) && !mouse_keycode_tracker) { - layer_off(_MOUSE); - } - mouse_keycode_tracker = 0; - mouse_debounce_timer = timer_read(); - break; - } - return true; -} - -layer_state_t layer_state_set_keymap(layer_state_t state) { - if (layer_state_cmp(state, _GAMEPAD) || layer_state_cmp(state, _DIABLO)) { - state |= (1UL << _MOUSE); - } - return state; -} -#endif - -void matrix_init_keymap(void) { -#ifdef AUDIO_ENABLE - extern audio_config_t audio_config; - - if (!is_keyboard_master()) { - audio_stop_all(); - audio_config.enable = false; - } -#endif -} - -void keyboard_post_init_keymap(void) { - matrix_init_keymap(); -} diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk deleted file mode 100644 index 754f0e45d..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/keymaps/drashna/rules.mk +++ /dev/null @@ -1,8 +0,0 @@ -RGBLIGHT_STARTUP_ANIMATION = yes -COMMAND_ENABLE = no -AUDIO_ENABLE = yes -TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes -OLED_DRIVER_ENABLE = yes -WPM_ENABLE = yes -# DEBOUNCE_TYPE = sym_eager_pk diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.c deleted file mode 100644 index 59e349512..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.c +++ /dev/null @@ -1,221 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) - * Copyright 2019 Sunjun Kim - * Copyright 2020 Ploopy Corporation - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#ifdef POINTING_DEVICE_ENABLE - -#include "wait.h" -#include "debug.h" -#include "print.h" -#include "pmw3360.h" -#include "pmw3360_firmware.h" - -bool _inBurst = false; - -#ifndef PMW_CPI -# define PMW_CPI 1600 -#endif -#ifndef SPI_DIVISOR -# define SPI_DIVISOR 2 -#endif -#ifndef ROTATIONAL_TRANSFORM_ANGLE -# define ROTATIONAL_TRANSFORM_ANGLE 0x00 -#endif - -void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } - -bool spi_start_adv(void) { - bool status = spi_start(SPI_SS_PIN, false, 3, SPI_DIVISOR); - wait_us(1); - return status; -} - -void spi_stop_adv(void) { - wait_us(1); - spi_stop(); -} - -spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data) { - if (reg_addr != REG_Motion_Burst) { - _inBurst = false; - } - - spi_start_adv(); - // send address of the register, with MSBit = 1 to indicate it's a write - spi_status_t status = spi_write(reg_addr | 0x80); - status = spi_write(data); - - // tSCLK-NCS for write operation - wait_us(20); - - // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound - wait_us(100); - spi_stop(); - return status; -} - -uint8_t spi_read_adv(uint8_t reg_addr) { - spi_start_adv(); - // send adress of the register, with MSBit = 0 to indicate it's a read - spi_write(reg_addr & 0x7f); - - uint8_t data = spi_read(); - - // tSCLK-NCS for read operation is 120ns - wait_us(1); - - // tSRW/tSRR (=20us) minus tSCLK-NCS - wait_us(19); - - spi_stop(); - return data; -} - -void pmw_set_cpi(uint16_t cpi) { - int cpival = constrain((cpi / 100) - 1, 0, 0x77); // limits to 0--119 - - spi_start_adv(); - spi_write_adv(REG_Config1, cpival); - spi_stop(); -} - -bool pmw_spi_init(void) { - spi_init(); - _inBurst = false; - - spi_stop(); - spi_start_adv(); - spi_stop(); - - spi_write_adv(REG_Shutdown, 0xb6); // Shutdown first - wait_ms(300); - - spi_start_adv(); - wait_us(40); - spi_stop_adv(); - wait_us(40); - - spi_write_adv(REG_Power_Up_Reset, 0x5a); - wait_ms(50); - - spi_read_adv(REG_Motion); - spi_read_adv(REG_Delta_X_L); - spi_read_adv(REG_Delta_X_H); - spi_read_adv(REG_Delta_Y_L); - spi_read_adv(REG_Delta_Y_H); - - pmw_upload_firmware(); - - spi_stop_adv(); - - wait_ms(10); - pmw_set_cpi(PMW_CPI); - - wait_ms(1); - - return pmw_check_signature(); -} - -void pmw_upload_firmware(void) { - spi_write_adv(REG_Config2, 0x00); - - spi_write_adv(REG_Angle_Tune, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30)); - - spi_write_adv(REG_SROM_Enable, 0x1d); - - wait_ms(10); - - spi_write_adv(REG_SROM_Enable, 0x18); - - spi_start_adv(); - spi_write(REG_SROM_Load_Burst | 0x80); - wait_us(15); - - unsigned char c; - for (int i = 0; i < firmware_length; i++) { - c = (unsigned char)pgm_read_byte(firmware_data + i); - spi_write(c); - wait_us(15); - } - wait_us(200); - - spi_read_adv(REG_SROM_ID); - - spi_write_adv(REG_Config2, 0x00); - - spi_stop(); - wait_ms(10); -} - -bool pmw_check_signature(void) { - uint8_t pid = spi_read_adv(REG_Product_ID); - uint8_t iv_pid = spi_read_adv(REG_Inverse_Product_ID); - uint8_t SROM_ver = spi_read_adv(REG_SROM_ID); - return (pid == 0x42 && iv_pid == 0xBD && SROM_ver == 0x04); // signature for SROM 0x04 -} - -report_pmw_t pmw_read_burst(void) { - if (!_inBurst) { - dprintf("burst on"); - spi_write_adv(REG_Motion_Burst, 0x00); - _inBurst = true; - } - - spi_start_adv(); - spi_write(REG_Motion_Burst); - wait_us(35); // waits for tSRAD - - report_pmw_t data; - data.motion = 0; - data.dx = 0; - data.mdx = 0; - data.dy = 0; - data.mdx = 0; - - data.motion = spi_read(); - spi_write(0x00); // skip Observation - data.dx = spi_read(); - data.mdx = spi_read(); - data.dy = spi_read(); - data.mdy = spi_read(); - - spi_stop(); - - print_byte(data.motion); - print_byte(data.dx); - print_byte(data.mdx); - print_byte(data.dy); - print_byte(data.mdy); - dprintf("\n"); - - data.isMotion = (data.motion & 0x80) != 0; - data.isOnSurface = (data.motion & 0x08) == 0; - data.dx |= (data.mdx << 8); - data.dx = data.dx * -1; - data.dy |= (data.mdy << 8); - data.dy = data.dy * -1; - - spi_stop(); - - if (data.motion & 0b111) { // panic recovery, sometimes burst mode works weird. - _inBurst = false; - } - - return data; -} - -#endif diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.h deleted file mode 100644 index c1d5e3bad..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pmw3360.h +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) - * Copyright 2019 Sunjun Kim - * Copyright 2020 Ploopy Corporation - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 "spi_master.h" - -// Registers -#define REG_Product_ID 0x00 -#define REG_Revision_ID 0x01 -#define REG_Motion 0x02 -#define REG_Delta_X_L 0x03 -#define REG_Delta_X_H 0x04 -#define REG_Delta_Y_L 0x05 -#define REG_Delta_Y_H 0x06 -#define REG_SQUAL 0x07 -#define REG_Raw_Data_Sum 0x08 -#define REG_Maximum_Raw_data 0x09 -#define REG_Minimum_Raw_data 0x0A -#define REG_Shutter_Lower 0x0B -#define REG_Shutter_Upper 0x0C -#define REG_Control 0x0D -#define REG_Config1 0x0F -#define REG_Config2 0x10 -#define REG_Angle_Tune 0x11 -#define REG_Frame_Capture 0x12 -#define REG_SROM_Enable 0x13 -#define REG_Run_Downshift 0x14 -#define REG_Rest1_Rate_Lower 0x15 -#define REG_Rest1_Rate_Upper 0x16 -#define REG_Rest1_Downshift 0x17 -#define REG_Rest2_Rate_Lower 0x18 -#define REG_Rest2_Rate_Upper 0x19 -#define REG_Rest2_Downshift 0x1A -#define REG_Rest3_Rate_Lower 0x1B -#define REG_Rest3_Rate_Upper 0x1C -#define REG_Observation 0x24 -#define REG_Data_Out_Lower 0x25 -#define REG_Data_Out_Upper 0x26 -#define REG_Raw_Data_Dump 0x29 -#define REG_SROM_ID 0x2A -#define REG_Min_SQ_Run 0x2B -#define REG_Raw_Data_Threshold 0x2C -#define REG_Config5 0x2F -#define REG_Power_Up_Reset 0x3A -#define REG_Shutdown 0x3B -#define REG_Inverse_Product_ID 0x3F -#define REG_LiftCutoff_Tune3 0x41 -#define REG_Angle_Snap 0x42 -#define REG_LiftCutoff_Tune1 0x4A -#define REG_Motion_Burst 0x50 -#define REG_LiftCutoff_Tune_Timeout 0x58 -#define REG_LiftCutoff_Tune_Min_Length 0x5A -#define REG_SROM_Load_Burst 0x62 -#define REG_Lift_Config 0x63 -#define REG_Raw_Data_Burst 0x64 -#define REG_LiftCutoff_Tune2 0x65 - -#ifdef CONSOLE_ENABLE -void print_byte(uint8_t byte); -#endif - -typedef struct { - int8_t motion; - bool isMotion; // True if a motion is detected. - bool isOnSurface; // True when a chip is on a surface - int16_t dx; // displacement on x directions. Unit: Count. (CPI * Count = Inch value) - int8_t mdx; - int16_t dy; // displacement on y directions. - int8_t mdy; -} report_pmw_t; - - - -bool spi_start_adv(void); -void spi_stop_adv(void); -spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data); -uint8_t spi_read_adv(uint8_t reg_addr); -bool pmw_spi_init(void); -void pmw_set_cpi(uint16_t cpi); -void pmw_upload_firmware(void); -bool pmw_check_signature(void); -report_pmw_t pmw_read_burst(void); - - -#define degToRad(angleInDegrees) ((angleInDegrees)*M_PI / 180.0) -#define radToDeg(angleInRadians) ((angleInRadians)*180.0 / M_PI) -#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt))) diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c deleted file mode 100644 index 1a9aeb2e3..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/pointer_transport.c +++ /dev/null @@ -1,616 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 -#include - -#include "matrix.h" -#include QMK_KEYBOARD_H - -#define ROWS_PER_HAND (MATRIX_ROWS / 2) -#define SYNC_TIMER_OFFSET 2 - -#ifdef RGBLIGHT_ENABLE -# include "rgblight.h" -#endif - -#ifdef BACKLIGHT_ENABLE -# include "backlight.h" -#endif - -#ifdef ENCODER_ENABLE -# include "encoder.h" -static pin_t encoders_pad[] = ENCODERS_PAD_A; -# define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t)) -#endif - -#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) -# include "led_matrix.h" -#endif -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) -# include "rgb_matrix.h" -#endif - -#ifdef POINTING_DEVICE_ENABLE -static uint16_t device_cpi = 0; -static int8_t split_mouse_x = 0, split_mouse_y = 0; -#endif - -#ifdef OLED_DRIVER_ENABLE -# include "oled_driver.h" -#endif - -#if defined(USE_I2C) - -# include "i2c_master.h" -# include "i2c_slave.h" - -typedef struct _I2C_slave_buffer_t { -# ifndef DISABLE_SYNC_TIMER - uint32_t sync_timer; -# endif -# ifdef SPLIT_TRANSPORT_MIRROR - matrix_row_t mmatrix[ROWS_PER_HAND]; -# endif - matrix_row_t smatrix[ROWS_PER_HAND]; -# ifdef SPLIT_MODS_ENABLE - uint8_t real_mods; - uint8_t weak_mods; -# ifndef NO_ACTION_ONESHOT - uint8_t oneshot_mods; -# endif -# endif -# ifdef BACKLIGHT_ENABLE - uint8_t backlight_level; -# endif -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - rgblight_syncinfo_t rgblight_sync; -# endif -# ifdef ENCODER_ENABLE - uint8_t encoder_state[NUMBER_OF_ENCODERS]; -# endif -# ifdef WPM_ENABLE - uint8_t current_wpm; -# endif - int8_t mouse_x; - int8_t mouse_y; - uint16_t device_cpi; - bool oled_on; - layer_state_t t_layer_state; - layer_state_t t_default_layer_state; -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - led_eeconfig_t led_matrix; - bool led_suspend_state; -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - rgb_config_t rgb_matrix; - bool rgb_suspend_state; -# endif -} __attribute__((packed)) I2C_slave_buffer_t; - -static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg; - -# define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level) -# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync) -# define I2C_KEYMAP_MASTER_START offsetof(I2C_slave_buffer_t, mmatrix) -# define I2C_KEYMAP_SLAVE_START offsetof(I2C_slave_buffer_t, smatrix) -# define I2C_SYNC_TIME_START offsetof(I2C_slave_buffer_t, sync_timer) -# define I2C_REAL_MODS_START offsetof(I2C_slave_buffer_t, real_mods) -# define I2C_WEAK_MODS_START offsetof(I2C_slave_buffer_t, weak_mods) -# define I2C_ONESHOT_MODS_START offsetof(I2C_slave_buffer_t, oneshot_mods) -# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state) -# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm) -# define I2C_MOUSE_X_START offsetof(I2C_slave_buffer_t, mouse_x) -# define I2C_MOUSE_Y_START offsetof(I2C_slave_buffer_t, mouse_y) -# define I2C_MOUSE_DPI_START offsetof(I2C_slave_buffer_t, device_cpi) -# define I2C_OLED_ON_START offsetof(I2C_slave_buffer_t, oled_on) -# define I2C_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_layer_state) -# define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_default_layer_state) -# define I2C_LED_MATRIX_START offsetof(I2C_slave_buffer_t, led_matrix) -# define I2C_LED_SUSPEND_START offsetof(I2C_slave_buffer_t, led_suspend_state) -# define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix) -# define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state) - -# define TIMEOUT 100 - -# ifndef SLAVE_I2C_ADDRESS -# define SLAVE_I2C_ADDRESS 0x32 -# endif - -// Get rows from other half over i2c -bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_SLAVE_START, (void *)slave_matrix, sizeof(i2c_buffer->smatrix), TIMEOUT); -# ifdef SPLIT_TRANSPORT_MIRROR - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_MASTER_START, (void *)master_matrix, sizeof(i2c_buffer->mmatrix), TIMEOUT); -# endif - // write backlight info -# ifdef BACKLIGHT_ENABLE - uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0; - if (level != i2c_buffer->backlight_level) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) { - i2c_buffer->backlight_level = level; - } - } -# endif - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - if (rgblight_get_change_flags()) { - rgblight_syncinfo_t rgblight_sync; - rgblight_get_syncinfo(&rgblight_sync); - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgblight_sync, sizeof(rgblight_sync), TIMEOUT) >= 0) { - rgblight_clear_change_flags(); - } - } -# endif - -# ifdef ENCODER_ENABLE - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(i2c_buffer->encoder_state), TIMEOUT); - encoder_update_raw(i2c_buffer->encoder_state); -# endif - -# ifdef WPM_ENABLE - uint8_t current_wpm = get_current_wpm(); - if (current_wpm != i2c_buffer->current_wpm) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WPM_START, (void *)¤t_wpm, sizeof(current_wpm), TIMEOUT) >= 0) { - i2c_buffer->current_wpm = current_wpm; - } - } -# endif - -# ifdef POINTING_DEVICE_ENABLE - if (is_keyboard_left()) { - report_mouse_t temp_report = pointing_device_get_report(); - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT); - temp_report.x = i2c_buffer->mouse_x; - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT); - temp_report.y = i2c_buffer->mouse_y; - pointing_device_set_report(temp_report); - - if (device_cpi != i2c_buffer->device_cpi) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_DPI_START, (void *)&device_cpi, sizeof(device_cpi), TIMEOUT) >= 0) { - i2c_buffer->device_cpi = device_cpi - } - } - } -# endif - -# ifdef SPLIT_MODS_ENABLE - uint8_t real_mods = get_mods(); - if (real_mods != i2c_buffer->real_mods) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_REAL_MODS_START, (void *)&real_mods, sizeof(real_mods), TIMEOUT) >= 0) { - i2c_buffer->real_mods = real_mods; - } - } - - uint8_t weak_mods = get_weak_mods(); - if (weak_mods != i2c_buffer->weak_mods) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WEAK_MODS_START, (void *)&weak_mods, sizeof(weak_mods), TIMEOUT) >= 0) { - i2c_buffer->weak_mods = weak_mods; - } - } - -# ifndef NO_ACTION_ONESHOT - uint8_t oneshot_mods = get_oneshot_mods(); - if (oneshot_mods != i2c_buffer->oneshot_mods) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_ONESHOT_MODS_START, (void *)&oneshot_mods, sizeof(oneshot_mods), TIMEOUT) >= 0) { - i2c_buffer->oneshot_mods = oneshot_mods; - } - } -# endif -# endif - - if (layer_state != i2c_buffer->t_layer_state) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&layer_state, sizeof(layer_state), TIMEOUT) >= 0) { - i2c_buffer->t_layer_state = layer_state; - } - } - - if (default_layer_state != i2c_buffer->t_default_layer_state) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_DEFAULT_LAYER_STATE_START, (void *)&default_layer_state, sizeof(default_layer_state), TIMEOUT) >= 0) { - i2c_buffer->t_default_layer_state = default_layer_state; - } - } - -# ifdef OLED_DRIVER_ENABLE - bool is_oled_on = is_oled_on(); - if (is_oled_on != i2c_buffer->oled_on) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled_on, sizeof(is_oled_on), TIMEOUT) >= 0) { - i2c_buffer->oled_on = is_oled_on; - } - } -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT); - bool suspend_state = led_matrix_get_suspend_state(); - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT); - bool suspend_state = rgb_matrix_get_suspend_state(); - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT); -# endif - -# ifndef DISABLE_SYNC_TIMER - i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT); -# endif - - return true; -} - -void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { -# ifndef DISABLE_SYNC_TIMER - sync_timer_update(i2c_buffer->sync_timer); -# endif - // Copy matrix to I2C buffer - memcpy((void *)i2c_buffer->smatrix, (void *)slave_matrix, sizeof(i2c_buffer->smatrix)); -# ifdef SPLIT_TRANSPORT_MIRROR - memcpy((void *)master_matrix, (void *)i2c_buffer->mmatrix, sizeof(i2c_buffer->mmatrix)); -# endif - -// Read Backlight Info -# ifdef BACKLIGHT_ENABLE - backlight_set(i2c_buffer->backlight_level); -# endif - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - // Update the RGB with the new data - if (i2c_buffer->rgblight_sync.status.change_flags != 0) { - rgblight_update_sync(&i2c_buffer->rgblight_sync, false); - i2c_buffer->rgblight_sync.status.change_flags = 0; - } -# endif - -# ifdef ENCODER_ENABLE - encoder_state_raw(i2c_buffer->encoder_state); -# endif - -# ifdef WPM_ENABLE - set_current_wpm(i2c_buffer->current_wpm); -# endif - -# ifdef POINTING_DEVICE_ENABLE - if (!is_keyboard_left()) { - static uint16_t cpi; - if (cpi != i2c_buffer->device_cpi) { - cpi = i2c_buffer->device_cpi; - pmw_set_cpi(cpi); - } - i2c_buffer->mouse_x = split_mouse_x; - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT); - i2c_buffer->mouse_y = split_mouse_y; - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT); - } - -# endif - -# ifdef SPLIT_MODS_ENABLE - set_mods(i2c_buffer->real_mods); - set_weak_mods(i2c_buffer->weak_mods); -# ifndef NO_ACTION_ONESHOT - set_oneshot_mods(i2c_buffer->oneshot_mods); -# endif -# endif - - if (layer_state != i2c_buffer->t_layer_state) { - layer_state = i2c_buffer->t_layer_state; - } - if (default_layer_state != i2c_buffer->t_default_layer_state) { - default_layer_state = i2c_buffer->t_default_layer_state; - } - -# ifdef OLED_DRIVER_ENABLE - if (i2c_buffer->oled_on) { - oled_on(); - } else { - oled_off(); - } -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - memcpy((void *)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix)); - led_matrix_set_suspend_state(i2c_buffer->led_suspend_state); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix)); - rgb_matrix_set_suspend_state(i2c_buffer->rgb_suspend_state); -# endif -} - -void transport_master_init(void) { i2c_init(); } - -void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); } - -#else // USE_SERIAL - -# include "serial.h" - -typedef struct _Serial_s2m_buffer_t { - // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack - matrix_row_t smatrix[ROWS_PER_HAND]; -# ifdef ENCODER_ENABLE - uint8_t encoder_state[NUMBER_OF_ENCODERS]; -# endif - int8_t mouse_x; - int8_t mouse_y; -} __attribute__((packed)) Serial_s2m_buffer_t; - -typedef struct _Serial_m2s_buffer_t { -# ifdef SPLIT_MODS_ENABLE - uint8_t real_mods; - uint8_t weak_mods; -# ifndef NO_ACTION_ONESHOT - uint8_t oneshot_mods; -# endif -# endif -# ifndef DISABLE_SYNC_TIMER - uint32_t sync_timer; -# endif -# ifdef SPLIT_TRANSPORT_MIRROR - matrix_row_t mmatrix[ROWS_PER_HAND]; -# endif -# ifdef BACKLIGHT_ENABLE - uint8_t backlight_level; -# endif -# ifdef WPM_ENABLE - uint8_t current_wpm; -# endif - uint16_t device_cpi; - bool oled_on; - layer_state_t t_layer_state; - layer_state_t t_default_layer_state; -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - led_eeconfig_t led_matrix; - bool led_suspend_state; -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - rgb_config_t rgb_matrix; - bool rgb_suspend_state; -# endif -} __attribute__((packed)) Serial_m2s_buffer_t; - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) -// When MCUs on both sides drive their respective RGB LED chains, -// it is necessary to synchronize, so it is necessary to communicate RGB -// information. In that case, define RGBLIGHT_SPLIT with info on the number -// of LEDs on each half. -// -// Otherwise, if the master side MCU drives both sides RGB LED chains, -// there is no need to communicate. - -typedef struct _Serial_rgblight_t { - rgblight_syncinfo_t rgblight_sync; -} Serial_rgblight_t; - -volatile Serial_rgblight_t serial_rgblight = {}; -uint8_t volatile status_rgblight = 0; -# endif - -volatile Serial_s2m_buffer_t serial_s2m_buffer = {}; -volatile Serial_m2s_buffer_t serial_m2s_buffer = {}; -uint8_t volatile status0 = 0; - -enum serial_transaction_id { - GET_SLAVE_MATRIX = 0, -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - PUT_RGBLIGHT, -# endif -}; - -SSTD_t transactions[] = { - [GET_SLAVE_MATRIX] = - { - (uint8_t *)&status0, - sizeof(serial_m2s_buffer), - (uint8_t *)&serial_m2s_buffer, - sizeof(serial_s2m_buffer), - (uint8_t *)&serial_s2m_buffer, - }, -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - [PUT_RGBLIGHT] = - { - (uint8_t *)&status_rgblight, sizeof(serial_rgblight), (uint8_t *)&serial_rgblight, 0, NULL // no slave to master transfer - }, -# endif -}; - -void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } - -void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); } - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - -// rgblight synchronization information communication. - -void transport_rgblight_master(void) { - if (rgblight_get_change_flags()) { - rgblight_get_syncinfo((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync); - if (soft_serial_transaction(PUT_RGBLIGHT) == TRANSACTION_END) { - rgblight_clear_change_flags(); - } - } -} - -void transport_rgblight_slave(void) { - if (status_rgblight == TRANSACTION_ACCEPTED) { - rgblight_update_sync((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync, false); - status_rgblight = TRANSACTION_END; - } -} - -# else -# define transport_rgblight_master() -# define transport_rgblight_slave() -# endif - -bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { -# ifndef SERIAL_USE_MULTI_TRANSACTION - if (soft_serial_transaction() != TRANSACTION_END) { - return false; - } -# else - transport_rgblight_master(); - if (soft_serial_transaction(GET_SLAVE_MATRIX) != TRANSACTION_END) { - return false; - } -# endif - - // TODO: if MATRIX_COLS > 8 change to unpack() - for (int i = 0; i < ROWS_PER_HAND; ++i) { - slave_matrix[i] = serial_s2m_buffer.smatrix[i]; -# ifdef SPLIT_TRANSPORT_MIRROR - serial_m2s_buffer.mmatrix[i] = master_matrix[i]; -# endif - } - -# ifdef BACKLIGHT_ENABLE - // Write backlight level for slave to read - serial_m2s_buffer.backlight_level = is_backlight_enabled() ? get_backlight_level() : 0; -# endif - -# ifdef ENCODER_ENABLE - encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state); -# endif - -# ifdef WPM_ENABLE - // Write wpm to slave - serial_m2s_buffer.current_wpm = get_current_wpm(); -# endif - -# ifdef SPLIT_MODS_ENABLE - serial_m2s_buffer.real_mods = get_mods(); - serial_m2s_buffer.weak_mods = get_weak_mods(); -# ifndef NO_ACTION_ONESHOT - serial_m2s_buffer.oneshot_mods = get_oneshot_mods(); -# endif -# endif - -# ifdef POINTING_DEVICE_ENABLE - if (is_keyboard_left()) { - report_mouse_t temp_report = pointing_device_get_report(); - temp_report.x = serial_s2m_buffer.mouse_x; - temp_report.y = serial_s2m_buffer.mouse_y; - pointing_device_set_report(temp_report); - serial_m2s_buffer.device_cpi = device_cpi; - } -# endif - - serial_m2s_buffer.t_layer_state = layer_state; - serial_m2s_buffer.t_default_layer_state = default_layer_state; -# ifdef OLED_DRIVER_ENABLE - serial_m2s_buffer.oled_on = is_oled_on(); -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - serial_m2s_buffer.led_matrix = led_matrix_eeconfig; - serial_m2s_buffer.led_suspend_state = led_matrix_get_suspend_state(); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - serial_m2s_buffer.rgb_matrix = rgb_matrix_config; - serial_m2s_buffer.rgb_suspend_state = rgb_matrix_get_suspend_state(); -# endif -# ifndef DISABLE_SYNC_TIMER - serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; -# endif - return true; -} - -void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { - transport_rgblight_slave(); -# ifndef DISABLE_SYNC_TIMER - sync_timer_update(serial_m2s_buffer.sync_timer); -# endif - - // TODO: if MATRIX_COLS > 8 change to pack() - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_s2m_buffer.smatrix[i] = slave_matrix[i]; -# ifdef SPLIT_TRANSPORT_MIRROR - master_matrix[i] = serial_m2s_buffer.mmatrix[i]; -# endif - } - -# ifdef BACKLIGHT_ENABLE - backlight_set(serial_m2s_buffer.backlight_level); -# endif - -# ifdef ENCODER_ENABLE - encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state); -# endif - -# ifdef WPM_ENABLE - set_current_wpm(serial_m2s_buffer.current_wpm); -# endif - -# ifdef SPLIT_MODS_ENABLE - set_mods(serial_m2s_buffer.real_mods); - set_weak_mods(serial_m2s_buffer.weak_mods); -# ifndef NO_ACTION_ONESHOT - set_oneshot_mods(serial_m2s_buffer.oneshot_mods); -# endif -# endif - -# ifdef POINTING_DEVICE_ENABLE - if (!is_keyboard_left()) { - static uint16_t cpi; - if (cpi != serial_m2s_buffer.device_cpi) { - cpi = serial_m2s_buffer.device_cpi; - pmw_set_cpi(cpi); - } - serial_s2m_buffer.mouse_x = split_mouse_x; - serial_s2m_buffer.mouse_y = split_mouse_y; - } -# endif - - if (layer_state != serial_m2s_buffer.t_layer_state) { - layer_state = serial_m2s_buffer.t_layer_state; - } - if (default_layer_state != serial_m2s_buffer.t_default_layer_state) { - default_layer_state = serial_m2s_buffer.t_default_layer_state; - } -# ifdef OLED_DRIVER_ENABLE - if (serial_m2s_buffer.oled_on) { - oled_on(); - } else { - oled_off(); - } -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - led_matrix_eeconfig = serial_m2s_buffer.led_matrix; - led_matrix_set_suspend_state(serial_m2s_buffer.led_suspend_state); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - rgb_matrix_config = serial_m2s_buffer.rgb_matrix; - rgb_matrix_set_suspend_state(serial_m2s_buffer.rgb_suspend_state); -# endif -} - -#endif - -#ifdef POINTING_DEVICE_ENABLE -void master_mouse_send(int8_t x, int8_t y) { - split_mouse_x = x; - split_mouse_y = y; -} -void trackball_set_cpi(uint16_t cpi) { - if (!is_keyboard_left()) { - pmw_set_cpi(cpi); - } else { - device_cpi = cpi; - } -} -#endif diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/post_config.h b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/post_config.h deleted file mode 100644 index 40f1029b5..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/post_config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . - */ - -#pragma once - -#ifndef MOUSEKEY_WHEEL_DELTA -# define MOUSEKEY_WHEEL_DELTA 1 -#endif -#ifndef MOUSEKEY_WHEEL_DELAY -# define MOUSEKEY_WHEEL_DELAY 200 -#endif -#ifndef MOUSEKEY_WHEEL_INTERVAL -# define MOUSEKEY_WHEEL_INTERVAL 50 -#endif -#ifndef MOUSEKEY_WHEEL_MAX_SPEED -# define MOUSEKEY_WHEEL_MAX_SPEED 8 -#endif -#ifndef MOUSEKEY_WHEEL_TIME_TO_MAX -# define MOUSEKEY_WHEEL_TIME_TO_MAX 80 -#endif diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk deleted file mode 100644 index 3fb9ab2a8..000000000 --- a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/rules.mk +++ /dev/null @@ -1,31 +0,0 @@ -# MCU name -MCU = at90usb1286 - -# Bootloader selection -BOOTLOADER = halfkay - -# 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 -SWAP_HANDS_ENABLE = yes -POINTING_DEVICE_ENABLE = yes -MOUSE_SHARED_EP = no - -SPLIT_KEYBOARD = yes -SPLIT_TRANSPORT = custom - -SRC += pmw3360.c -QUANTUM_LIB_SRC += pointer_transport.c serial.c i2c_master.c i2c_slave.c spi_master.c diff --git a/keyboards/handwired/dactyl_manuform/5x7/5x7.c b/keyboards/handwired/dactyl_manuform/5x7/5x7.c index 135014d65..aae28e450 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/5x7.c +++ b/keyboards/handwired/dactyl_manuform/5x7/5x7.c @@ -1,23 +1 @@ #include "5x7.h" - - -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -#endif - -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - diff --git a/keyboards/handwired/dactyl_manuform/5x7/5x7.h b/keyboards/handwired/dactyl_manuform/5x7/5x7.h index c01fce957..0c0c781be 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/5x7.h +++ b/keyboards/handwired/dactyl_manuform/5x7/5x7.h @@ -1,23 +1,16 @@ #pragma once #include "dactyl_manuform.h" -#include "quantum.h" -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif +#define XXX KC_NO #define LAYOUT_5x7( \ - L11, L12, L13, L14, L15, L16, L17, \ - L21, L22, L23, L24, L25, L26, L27, \ - L31, L32, L33, L34, L35, L36, L37, \ - L41, L42, L43, L44, L45, L46, \ - L51, L52, L53, L54, \ - L55, L56, \ + L11, L12, L13, L14, L15, L16, L17, \ + L21, L22, L23, L24, L25, L26, L27, \ + L31, L32, L33, L34, L35, L36, L37, \ + L41, L42, L43, L44, L45, L46, \ + L51, L52, L53, L54, \ + L55, L56, \ L65, L66, \ L63, L64, \ R11, R12, R13, R14, R15, R16, R17, \ @@ -25,21 +18,20 @@ R31, R32, R33, R34, R35, R36, R37, \ R42, R43, R44, R45, R46, R47, \ R54, R55, R56, R57, \ - R52, R53, \ - R62, R63, \ - R64, R65 \ - ) \ - { \ - { L11, L12, L13, L14, L15, L16, L17 }, \ - { L21, L22, L23, L24, L25, L26, L27 }, \ - { L31, L32, L33, L34, L35, L36, L37 }, \ - { L41, L42, L43, L44, L45, L46, KC_NO }, \ - { L51, L52, L53, L54, L55, L56, KC_NO }, \ - { KC_NO, KC_NO, L63, L64, L65, L66, KC_NO }, \ - { R11, R12, R13, R14, R15, R16, R17 }, \ - { R21, R22, R23, R24, R25, R26, R27 }, \ - { R31, R32, R33, R34, R35, R36, R37 }, \ - { KC_NO, R42, R43, R44, R45, R46, R47 }, \ - { KC_NO, R52, R53, R54, R55, R56, R57 }, \ - { KC_NO, R62, R63, R64, R65, KC_NO, KC_NO } \ + R52, R53, \ + R62, R63, \ + R64, R65 \ +) { \ + { L11, L12, L13, L14, L15, L16, L17 }, \ + { L21, L22, L23, L24, L25, L26, L27 }, \ + { L31, L32, L33, L34, L35, L36, L37 }, \ + { L41, L42, L43, L44, L45, L46, XXX }, \ + { L51, L52, L53, L54, L55, L56, XXX }, \ + { XXX, XXX, L63, L64, L65, L66, XXX }, \ + { R11, R12, R13, R14, R15, R16, R17 }, \ + { R21, R22, R23, R24, R25, R26, R27 }, \ + { R31, R32, R33, R34, R35, R36, R37 }, \ + { XXX, R42, R43, R44, R45, R46, R47 }, \ + { XXX, R52, R53, R54, R55, R56, R57 }, \ + { XXX, R62, R63, R64, R65, XXX, XXX } \ } diff --git a/keyboards/handwired/dactyl_manuform/5x7/config.h b/keyboards/handwired/dactyl_manuform/5x7/config.h index 32c351a47..6b915d611 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/config.h +++ b/keyboards/handwired/dactyl_manuform/5x7/config.h @@ -20,9 +20,9 @@ along with this program. If not, see . #include "config_common.h" -#define PRODUCT_ID 0x3537 -#define DEVICE_VER 0x0001 -#define PRODUCT Dactyl-Manuform (5x7) +#define PRODUCT_ID 0x3537 +#define DEVICE_VER 0x0001 +#define PRODUCT Dactyl-Manuform (5x7) /* key matrix size */ // Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/5x7/info.json b/keyboards/handwired/dactyl_manuform/5x7/info.json index 33ba1b0e7..18f5005db 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/info.json +++ b/keyboards/handwired/dactyl_manuform/5x7/info.json @@ -7,80 +7,95 @@ "layouts": { "LAYOUT_5x7": { "layout": [ - {"label":"L11", "x":0, "y":0}, - {"label":"L12", "x":1, "y":0}, - {"label":"L13", "x":2, "y":0}, - {"label":"L14", "x":3, "y":0}, - {"label":"L15", "x":4, "y":0}, - {"label":"L16", "x":5, "y":0}, - {"label":"L17", "x":6, "y":0}, - {"label":"L21", "x":0, "y":1}, - {"label":"L22", "x":1, "y":1}, - {"label":"L23", "x":2, "y":1}, - {"label":"L24", "x":3, "y":1}, - {"label":"L25", "x":4, "y":1}, - {"label":"L26", "x":5, "y":1}, - {"label":"L27", "x":6, "y":1}, - {"label":"L31", "x":0, "y":2}, - {"label":"L32", "x":1, "y":2}, - {"label":"L33", "x":2, "y":2}, - {"label":"L34", "x":3, "y":2}, - {"label":"L35", "x":4, "y":2}, - {"label":"L36", "x":5, "y":2}, - {"label":"L37", "x":6, "y":2}, - {"label":"L41", "x":0, "y":3}, - {"label":"L42", "x":1, "y":3}, - {"label":"L43", "x":2, "y":3}, - {"label":"L44", "x":3, "y":3}, - {"label":"L45", "x":4, "y":3}, - {"label":"L46", "x":5, "y":3}, - {"label":"L51", "x":0, "y":4}, - {"label":"L52", "x":1, "y":4}, - {"label":"L53", "x":2, "y":4}, - {"label":"L54", "x":3, "y":4}, - {"label":"L55", "x":4, "y":5}, - {"label":"L56", "x":5, "y":5}, - {"label":"L65", "x":6, "y":6}, - {"label":"L66", "x":7, "y":6}, - {"label":"L63", "x":6, "y":7}, - {"label":"L64", "x":7, "y":7}, - {"label":"R11", "x":10, "y":0}, - {"label":"R12", "x":11, "y":0}, - {"label":"R13", "x":12, "y":0}, - {"label":"R14", "x":13, "y":0}, - {"label":"R15", "x":14, "y":0}, - {"label":"R16", "x":15, "y":0}, - {"label":"R17", "x":16, "y":0}, - {"label":"R21", "x":10, "y":1}, - {"label":"R22", "x":11, "y":1}, - {"label":"R23", "x":12, "y":1}, - {"label":"R24", "x":13, "y":1}, - {"label":"R25", "x":14, "y":1}, - {"label":"R26", "x":15, "y":1}, - {"label":"R27", "x":16, "y":1}, - {"label":"R31", "x":10, "y":2}, - {"label":"R32", "x":11, "y":2}, - {"label":"R33", "x":12, "y":2}, - {"label":"R34", "x":13, "y":2}, - {"label":"R35", "x":14, "y":2}, - {"label":"R36", "x":15, "y":2}, - {"label":"R37", "x":16, "y":2}, - {"label":"R42", "x":11, "y":3}, - {"label":"R43", "x":12, "y":3}, - {"label":"R44", "x":13, "y":3}, - {"label":"R45", "x":14, "y":3}, - {"label":"R46", "x":15, "y":3}, - {"label":"R47", "x":16, "y":3}, - {"label":"R54", "x":13, "y":4}, - {"label":"R55", "x":14, "y":4}, - {"label":"R56", "x":15, "y":4}, - {"label":"R57", "x":16, "y":4}, - {"label":"R52", "x":11, "y":5}, - {"label":"R53", "x":12, "y":5}, - {"label":"R62", "x":9, "y":6}, - {"label":"R63", "x":10, "y":6}, - {"label":"R64", "x":9, "y":7}, - {"label":"R65", "x":10, "y":7} + {"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": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5, "y": 2}, + {"x": 6, "y": 2}, + + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + {"x": 4, "y": 3}, + {"x": 5, "y": 3}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + + {"x": 4, "y": 5}, + {"x": 5, "y": 5}, + + {"x": 6, "y": 6}, + {"x": 7, "y": 6}, + + {"x": 6, "y": 7}, + {"x": 7, "y": 7}, + + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, + + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + + {"x": 10, "y": 2}, + {"x": 11, "y": 2}, + {"x": 12, "y": 2}, + {"x": 13, "y": 2}, + {"x": 14, "y": 2}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + + {"x": 11, "y": 3}, + {"x": 12, "y": 3}, + {"x": 13, "y": 3}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4}, + {"x": 16, "y": 4}, + + {"x": 11, "y": 5}, + {"x": 12, "y": 5}, + + {"x": 9, "y": 6}, + {"x": 10, "y": 6}, + + {"x":9, "y":7}, + {"x":10, "y":7} ] } } diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/config.h index 29ab59ad6..5a20f9473 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/config.h @@ -15,13 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ - #pragma once - #define USE_SERIAL #define MASTER_LEFT -// #define MASTER_RIGHT +//#define MASTER_RIGHT + //#define EE_HANDS -// Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c index eb4deb628..3aaeb9989 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H - // 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 @@ -10,71 +9,72 @@ #define _NUMPAD 2 // Some basic macros -#define TASK LCTL(LSFT(KC_ESC)) -#define TAB_R LCTL(KC_TAB) -#define TAB_L LCTL(LSFT(KC_TAB)) -#define TAB_RO LCTL(LSFT(KC_T)) +#define TASK LCTL(LSFT(KC_ESC)) +#define TAB_R LCTL(KC_TAB) +#define TAB_L LCTL(LSFT(KC_TAB)) +#define TAB_RO LCTL(LSFT(KC_T)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[_QWERTY] = LAYOUT_5x7( - // left hand - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, TAB_RO, - OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_CAPS, KC_LGUI, TAB_L, TAB_R, - TT(_FN), KC_SPC, - KC_END, KC_HOME, - KC_PSCR, TASK, + [_QWERTY] = LAYOUT_5x7( + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, TAB_RO, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_CAPS, KC_LGUI, TAB_L, TAB_R, + TT(_FN), KC_SPC, + KC_END, KC_HOME, + KC_PSCR, TASK, // right hand - KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, - KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - TG(_NUMPAD), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), - KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, - KC_BSPC, KC_ENT, - KC_PGUP, KC_PGDN, - KC_LCTL, KC_LALT), + KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, + KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + TG(_NUMPAD), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), + KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, + KC_BSPC, KC_ENT, + KC_PGUP, KC_PGDN, + KC_LCTL, KC_LALT + ), -[_FN] = LAYOUT_5x7( - // left hand - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - _______, _______, _______, KC_UP, _______, _______, _______, - _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, RESET, - _______, _______, _______, _______, _______, _______, - KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, - _______, _______, - _______, _______, - _______, _______, + [_FN] = LAYOUT_5x7( + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, RESET, + _______, _______, _______, _______, _______, _______, + KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, + _______, _______, + _______, _______, + _______, _______, // right hand - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - KC_DEL, _______, - _______, _______, - _______, _______), + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + KC_DEL, _______, + _______, _______, + _______, _______ + ), -[_NUMPAD] = LAYOUT_5x7( - // left hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, - _______, _______, - _______, _______, + [_NUMPAD] = LAYOUT_5x7( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, // right hand - _______, _______, KC_NLCK, _______, KC_PMNS, KC_PPLS, _______, - _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, - _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, - _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, - KC_P0, KC_PDOT, _______, _______, - _______, KC_PENT, - _______, _______, - _______, _______), - + _______, _______, KC_NLCK, _______, KC_PMNS, KC_PPLS, _______, + _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, + KC_P0, KC_PDOT, _______, _______, + _______, KC_PENT, + _______, _______, + _______, _______ + ), }; diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h index 29ab59ad6..5a20f9473 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h @@ -15,13 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ - #pragma once - #define USE_SERIAL #define MASTER_LEFT -// #define MASTER_RIGHT +//#define MASTER_RIGHT + //#define EE_HANDS -// Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/keymap.c b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/keymap.c index 07c5ec9ba..5f5ef54df 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/keymap.c @@ -1,6 +1,5 @@ #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 @@ -11,113 +10,114 @@ #define _BLANK 3 // Some basic macros -#define TASK LCTL(LSFT(KC_ESC)) -#define TAB_R LCTL(KC_TAB) -#define TAB_L LCTL(LSFT(KC_TAB)) -#define TAB_RO LCTL(LSFT(KC_T)) +#define TASK LCTL(LSFT(KC_ESC)) +#define TAB_R LCTL(KC_TAB) +#define TAB_L LCTL(LSFT(KC_TAB)) +#define TAB_RO LCTL(LSFT(KC_T)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[_QWERTY] = LAYOUT_5x7( - // left hand - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, TAB_RO, - OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_CAPS, KC_LGUI, TAB_L, TAB_R, - TT(_FN), KC_SPC, - KC_END, KC_HOME, - KC_PSCR, TASK, + [_QWERTY] = LAYOUT_5x7( + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, TAB_RO, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_CAPS, KC_LGUI, TAB_L, TAB_R, + TT(_FN), KC_SPC, + KC_END, KC_HOME, + KC_PSCR, TASK, // right hand - KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, - KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - TG(_NUMPAD), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), - KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, - KC_BSPC, KC_ENT, - KC_PGUP, KC_PGDN, - KC_LCTL, KC_LALT), + KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, + KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + TG(_NUMPAD), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), + KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, + KC_BSPC, KC_ENT, + KC_PGUP, KC_PGDN, + KC_LCTL, KC_LALT + ), -[_FN] = LAYOUT_5x7( - // left hand - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - _______, _______, _______, KC_UP, _______, _______, _______, - _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, RESET, - _______, _______, _______, _______, _______, _______, - KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, - _______, _______, - _______, _______, - _______, _______, + [_FN] = LAYOUT_5x7( + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, RESET, + _______, _______, _______, _______, _______, _______, + KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, + _______, _______, + _______, _______, + _______, _______, // right hand - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - KC_DEL, _______, - _______, _______, - _______, _______), + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + KC_DEL, _______, + _______, _______, + _______, _______ + ), -[_NUMPAD] = LAYOUT_5x7( - // left hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, - _______, _______, - _______, _______, + [_NUMPAD] = LAYOUT_5x7( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, // right hand - _______, _______, KC_NLCK, _______, KC_PMNS, KC_PPLS, _______, - _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, - _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, - _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, - KC_P0, KC_PDOT, _______, _______, - _______, KC_PENT, - _______, _______, - _______, _______), + _______, _______, KC_NLCK, _______, KC_PMNS, KC_PPLS, _______, + _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, + KC_P0, KC_PDOT, _______, _______, + _______, KC_PENT, + _______, _______, + _______, _______ + ), - -[_NUMPAD] = LAYOUT_5x7( - // left hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, - _______, _______, - _______, _______, + [_NUMPAD] = LAYOUT_5x7( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, // right hand - _______, _______, KC_NLCK, _______, KC_PMNS, KC_PPLS, _______, - _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, - _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, - _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, - KC_P0, KC_PDOT, _______, _______, - _______, KC_PENT, - _______, _______, - _______, _______), + _______, _______, KC_NLCK, _______, KC_PMNS, KC_PPLS, _______, + _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, + KC_P0, KC_PDOT, _______, _______, + _______, KC_PENT, + _______, _______, + _______, _______ + ), -[_BLANK] = LAYOUT_5x7( - // left hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, - _______, _______, - _______, _______, + [_BLANK] = LAYOUT_5x7( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, // right hand - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, - _______, _______, - _______, _______, - _______, _______), - - + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______ + ) }; diff --git a/keyboards/handwired/dactyl_manuform/5x7/rules.mk b/keyboards/handwired/dactyl_manuform/5x7/rules.mk index 750807051..caba0940c 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/rules.mk +++ b/keyboards/handwired/dactyl_manuform/5x7/rules.mk @@ -1,20 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina # Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = 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 +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 +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/dactyl_manuform/6x6/6x6.c b/keyboards/handwired/dactyl_manuform/6x6/6x6.c index 9eb27531a..7d3524a57 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/6x6.c +++ b/keyboards/handwired/dactyl_manuform/6x6/6x6.c @@ -1,23 +1 @@ #include "6x6.h" - - -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -#endif - -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; - diff --git a/keyboards/handwired/dactyl_manuform/6x6/6x6.h b/keyboards/handwired/dactyl_manuform/6x6/6x6.h index 039e6b40d..821abe030 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/6x6.h +++ b/keyboards/handwired/dactyl_manuform/6x6/6x6.h @@ -1,42 +1,33 @@ #pragma once #include "dactyl_manuform.h" -#include "quantum.h" +#define XXX KC_NO -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif - -#define LAYOUT_6x6(\ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ - L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45, \ - L52, L53, R52, R53, \ - L54, L55, R50, R51, \ - L64, L65, R60, R61, \ - L62, L63, R62, R63 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { L40, L41, L42, L43, L44, L45 }, \ - { KC_NO, KC_NO, L52, L53, L54, L55 }, \ - { KC_NO, KC_NO, L62, L63, L64, L65 }, \ - \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { R30, R31, R32, R33, R34, R35 }, \ - { R40, R41, R42, R43, R44, R45 }, \ - { R50, R51, R52, R53, KC_NO, KC_NO }, \ - { R60, R61, R62, R63, KC_NO, KC_NO } \ +#define LAYOUT_6x6( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45, \ + L52, L53, R52, R53, \ + L54, L55, R50, R51, \ + L64, L65, R60, R61, \ + L62, L63, R62, R63 \ +) { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { L40, L41, L42, L43, L44, L45 }, \ + { XXX, XXX, L52, L53, L54, L55 }, \ + { XXX, XXX, L62, L63, L64, L65 }, \ +\ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { R40, R41, R42, R43, R44, R45 }, \ + { R50, R51, R52, R53, XXX, XXX }, \ + { R60, R61, R62, R63, XXX, XXX } \ } diff --git a/keyboards/handwired/dactyl_manuform/6x6/config.h b/keyboards/handwired/dactyl_manuform/6x6/config.h index dd47f44c9..9323e3302 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/config.h +++ b/keyboards/handwired/dactyl_manuform/6x6/config.h @@ -20,9 +20,9 @@ along with this program. If not, see . #include "config_common.h" -#define PRODUCT_ID 0x3636 -#define DEVICE_VER 0x0001 -#define PRODUCT Dactyl-Manuform (6x6) +#define PRODUCT_ID 0x3636 +#define DEVICE_VER 0x0001 +#define PRODUCT Dactyl-Manuform (6x6) /* key matrix size */ // Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/6x6/info.json b/keyboards/handwired/dactyl_manuform/6x6/info.json index e617b39a8..6873873a7 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/info.json +++ b/keyboards/handwired/dactyl_manuform/6x6/info.json @@ -7,82 +7,99 @@ "layouts": { "LAYOUT_6x6": { "layout": [ - {"label":"L00", "x":0, "y":0}, - {"label":"L01", "x":1, "y":0}, - {"label":"L02", "x":2, "y":0}, - {"label":"L03", "x":3, "y":0}, - {"label":"L04", "x":4, "y":0}, - {"label":"L05", "x":5, "y":0}, - {"label":"R00", "x":11, "y":0}, - {"label":"R01", "x":12, "y":0}, - {"label":"R02", "x":13, "y":0}, - {"label":"R03", "x":14, "y":0}, - {"label":"R04", "x":15, "y":0}, - {"label":"R05", "x":16, "y":0}, - {"label":"L10", "x":0, "y":1}, - {"label":"L11", "x":1, "y":1}, - {"label":"L12", "x":2, "y":1}, - {"label":"L13", "x":3, "y":1}, - {"label":"L14", "x":4, "y":1}, - {"label":"L15", "x":5, "y":1}, - {"label":"R10", "x":11, "y":1}, - {"label":"R11", "x":12, "y":1}, - {"label":"R12", "x":13, "y":1}, - {"label":"R13", "x":14, "y":1}, - {"label":"R14", "x":15, "y":1}, - {"label":"R15", "x":16, "y":1}, - {"label":"L20", "x":0, "y":2}, - {"label":"L21", "x":1, "y":2}, - {"label":"L22", "x":2, "y":2}, - {"label":"L23", "x":3, "y":2}, - {"label":"L24", "x":4, "y":2}, - {"label":"L25", "x":5, "y":2}, - {"label":"R20", "x":11, "y":2}, - {"label":"R21", "x":12, "y":2}, - {"label":"R22", "x":13, "y":2}, - {"label":"R23", "x":14, "y":2}, - {"label":"R24", "x":15, "y":2}, - {"label":"R25", "x":16, "y":2}, - {"label":"L30", "x":0, "y":3}, - {"label":"L31", "x":1, "y":3}, - {"label":"L32", "x":2, "y":3}, - {"label":"L33", "x":3, "y":3}, - {"label":"L34", "x":4, "y":3}, - {"label":"L35", "x":5, "y":3}, - {"label":"R30", "x":11, "y":3}, - {"label":"R31", "x":12, "y":3}, - {"label":"R32", "x":13, "y":3}, - {"label":"R33", "x":14, "y":3}, - {"label":"R34", "x":15, "y":3}, - {"label":"R35", "x":16, "y":3}, - {"label":"L40", "x":0, "y":4}, - {"label":"L41", "x":1, "y":4}, - {"label":"L42", "x":2, "y":4}, - {"label":"L43", "x":3, "y":4}, - {"label":"L44", "x":4, "y":4}, - {"label":"L45", "x":5, "y":4}, - {"label":"R40", "x":11, "y":4}, - {"label":"R41", "x":12, "y":4}, - {"label":"R42", "x":13, "y":4}, - {"label":"R43", "x":14, "y":4}, - {"label":"R44", "x":15, "y":4}, - {"label":"R45", "x":16, "y":4}, - {"label":"L52", "x":2, "y":5}, - {"label":"L53", "x":3, "y":5}, - {"label":"R52", "x":13, "y":5}, - {"label":"R53", "x":14, "y":5}, - {"label":"L54", "x":4, "y":6}, - {"label":"L55", "x":5, "y":6}, - {"label":"R50", "x":11, "y":6}, - {"label":"R51", "x":12, "y":6}, - {"label":"L64", "x":6, "y":7}, - {"label":"L65", "x":7, "y":7}, - {"label":"R60", "x":9, "y":7}, - {"label":"R61", "x":10, "y":7}, - {"label":"L62", "x":6, "y":8}, - {"label":"L63", "x":7, "y":8}, - {"label":"R62", "x":9, "y":8}, - {"label":"R63", "x":10, "y":8} + {"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": 11, "y": 0}, + {"x": 12, "y": 0}, + {"x": 13, "y": 0}, + {"x": 14, "y": 0}, + {"x": 15, "y": 0}, + {"x": 16, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, + {"x": 15, "y": 1}, + {"x": 16, "y": 1}, + + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5, "y": 2}, + + {"x": 11, "y": 2}, + {"x": 12, "y": 2}, + {"x": 13, "y": 2}, + {"x": 14, "y": 2}, + {"x": 15, "y": 2}, + {"x": 16, "y": 2}, + + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + {"x": 4, "y": 3}, + {"x": 5, "y": 3}, + + {"x": 11, "y": 3}, + {"x": 12, "y": 3}, + {"x": 13, "y": 3}, + {"x": 14, "y": 3}, + {"x": 15, "y": 3}, + {"x": 16, "y": 3}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4}, + {"x": 5, "y": 4}, + + {"x": 11, "y": 4}, + {"x": 12, "y": 4}, + {"x": 13, "y": 4}, + {"x": 14, "y": 4}, + {"x": 15, "y": 4}, + {"x": 16, "y": 4}, + + {"x": 2, "y": 5}, + {"x": 3, "y": 5}, + + {"x": 13, "y": 5}, + {"x": 14, "y": 5}, + + {"x": 4, "y": 6}, + {"x": 5, "y": 6}, + + {"x": 11, "y": 6}, + {"x": 12, "y": 6}, + + {"x": 6, "y": 7}, + {"x": 7, "y": 7}, + + {"x": 9, "y": 7}, + {"x": 10, "y": 7}, + + {"x": 6, "y": 8}, + {"x": 7, "y": 8}, + + {"x": 9, "y": 8}, + {"x": 10, "y": 8} ] } } diff --git a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/config.h index 29ab59ad6..5a20f9473 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/config.h @@ -15,13 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ - #pragma once - #define USE_SERIAL #define MASTER_LEFT -// #define MASTER_RIGHT +//#define MASTER_RIGHT + //#define EE_HANDS -// Rows are doubled-up diff --git a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c index fd2e5f413..41e96b53d 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H - #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 @@ -9,45 +8,39 @@ #define LOWER MO(_LOWER) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_6x6( + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 , + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS, + KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, + KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH, + KC_LBRC,KC_RBRC, KC_PLUS, KC_EQL, + RAISE,KC_SPC, KC_ENT, LOWER, + KC_TAB,KC_HOME, KC_END, KC_DEL, + KC_BSPC, KC_GRV, KC_LGUI, KC_LALT + ), - [_QWERTY] = LAYOUT_6x6( + [_LOWER] = LAYOUT_6x6( + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 , + KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS, + _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, + _______,_______,_______,_______,_______,_______, _______, KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS, + _______,KC_PSCR, _______, KC_P0, + _______,_______, _______,_______, + _______,_______, _______,_______, + _______,_______, _______,_______ + ), - KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 , - KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC, - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS, - KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, - KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH, - KC_LBRC,KC_RBRC, KC_PLUS, KC_EQL, - RAISE,KC_SPC, KC_ENT, LOWER, - KC_TAB,KC_HOME, KC_END, KC_DEL, - KC_BSPC, KC_GRV, KC_LGUI, KC_LALT - ), - - [_LOWER] = LAYOUT_6x6( - - KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 , - KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, - _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS, - _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, - _______,_______,_______,_______,_______,_______, _______, KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS, - _______,KC_PSCR, _______, KC_P0, - _______,_______, _______,_______, - _______,_______, _______,_______, - _______,_______, _______,_______ - ), - - [_RAISE] = LAYOUT_6x6( - - KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 , - _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, - _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, - _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, - _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, - - _______,_______, KC_EQL ,_______, - _______,_______, _______,_______, + [_RAISE] = LAYOUT_6x6( + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 , + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, + _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, + _______,_______, KC_EQL ,_______, + _______,_______, _______,_______, _______,_______, _______,_______, _______,_______, _______,_______ - ), - + ) }; diff --git a/keyboards/handwired/dactyl_manuform/6x6/rules.mk b/keyboards/handwired/dactyl_manuform/6x6/rules.mk index 750807051..caba0940c 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/rules.mk +++ b/keyboards/handwired/dactyl_manuform/6x6/rules.mk @@ -1,20 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina # Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically +# change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = 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 +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 +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/dactyl_manuform/config.h b/keyboards/handwired/dactyl_manuform/config.h index 6c4ec0f19..18942f9e5 100644 --- a/keyboards/handwired/dactyl_manuform/config.h +++ b/keyboards/handwired/dactyl_manuform/config.h @@ -21,14 +21,14 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x444D -#define MANUFACTURER tshort +#define VENDOR_ID 0x444D +#define MANUFACTURER tshort /* mouse config */ -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 60 -#define MOUSEKEY_MAX_SPEED 7 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 /* Set 0 if debouncing isn't needed */ @@ -44,21 +44,3 @@ along with this program. If not, see . /* Enables This makes it easier for fast typists to use dual-function keys */ #define PERMISSIVE_HOLD - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION diff --git a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h index 1b6b105ec..11c999777 100644 --- a/keyboards/handwired/dactyl_manuform/dactyl_manuform.h +++ b/keyboards/handwired/dactyl_manuform/dactyl_manuform.h @@ -1,32 +1,21 @@ #pragma once -#ifdef KEYBOARD_handwired_dactyl_manuform_4x5 - #include "4x5.h" -#elif KEYBOARD_handwired_dactyl_manuform_4x6 - #include "4x6.h" -#elif KEYBOARD_handwired_dactyl_manuform_5x6 - #include "5x6.h" -#elif KEYBOARD_handwired_dactyl_manuform_5x6_5 - #include "5x6_5.h" -#elif KEYBOARD_handwired_dactyl_manuform_5x6_2_5 - #include "5x6_2_5.h" -#elif KEYBOARD_handwired_dactyl_manuform_5x7 - #include "5x7.h" -#elif KEYBOARD_handwired_dactyl_manuform_6x6 - #include "6x6.h" -#elif KEYBOARD_handwired_dactyl_manuform_dmote_62key - #include "62key.h" -#elif KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball -# include "5x6_right_trackball.h" +#if defined(KEYBOARD_handwired_dactyl_manuform_4x5) +# include "4x5.h" +#elif defined(KEYBOARD_handwired_dactyl_manuform_4x6) +# include "4x6.h" +#elif defined(KEYBOARD_handwired_dactyl_manuform_5x6) +# include "5x6.h" +#elif defined(KEYBOARD_handwired_dactyl_manuform_5x6_5) +# include "5x6_5.h" +#elif defined(KEYBOARD_handwired_dactyl_manuform_5x6_2_5) +# include "5x6_2_5.h" +#elif defined(KEYBOARD_handwired_dactyl_manuform_5x7) +# include "5x7.h" +#elif defined(KEYBOARD_handwired_dactyl_manuform_6x6) +# include "6x6.h" +#elif defined(KEYBOARD_handwired_dactyl_manuform_dmote_62key) +# include "62key.h" #endif #include "quantum.h" - - -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/62key.c b/keyboards/handwired/dactyl_manuform/dmote/62key/62key.c index e5d444277..8d0d95e16 100644 --- a/keyboards/handwired/dactyl_manuform/dmote/62key/62key.c +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/62key.c @@ -1,5 +1 @@ #include "62key.h" - -void matrix_init_kb(void) { - matrix_init_user(); -}; diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/62key.h b/keyboards/handwired/dactyl_manuform/dmote/62key/62key.h index 273410165..2d52e7e5f 100644 --- a/keyboards/handwired/dactyl_manuform/dmote/62key/62key.h +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/62key.h @@ -1,15 +1,6 @@ #pragma once #include "dactyl_manuform.h" -#include "quantum.h" - -#ifdef USE_I2C -#include -#ifdef __AVR__ - #include - #include -#endif -#endif // This uses the same coordinate system as the program that defines // the case model, but not the same coordinates. @@ -21,34 +12,33 @@ // cluster so that everything can be contained in a 6x6 pattern. #define LAYOUT_62key( \ - LA_20, LA_10, LF_35, LF_25, LF_15, LF_05, \ - LF_55, LF_45, LF_34, LF_24, LF_14, LF_04, \ - LF_54, LF_44, LF_33, LF_23, LF_13, LF_03, \ - LF_53, LF_43, LF_32, LF_22, LF_12, \ - LF_21, LT_21, LT_22, \ + LA_20, LA_10, LF_35, LF_25, LF_15, LF_05, \ + LF_55, LF_45, LF_34, LF_24, LF_14, LF_04, \ + LF_54, LF_44, LF_33, LF_23, LF_13, LF_03, \ + LF_53, LF_43, LF_32, LF_22, LF_12, \ + LF_21, LT_21, LT_22, \ LT_10, LT_11, LT_12, \ - LT_01, LT_02, \ - \ - RF_05, RF_15, RF_25, RF_35, RA_10, RA_20, \ - RF_04, RF_14, RF_24, RF_34, RF_45, RF_55, \ - RF_03, RF_13, RF_23, RF_33, RF_44, RF_54, \ - RF_12, RF_22, RF_32, RF_43, RF_53, \ - RT_22, RT_21, RF_21, \ - RT_12, RT_11, RT_10, \ - RT_02, RT_01 \ - ) \ - { \ + LT_01, LT_02, \ +\ + RF_05, RF_15, RF_25, RF_35, RA_10, RA_20, \ + RF_04, RF_14, RF_24, RF_34, RF_45, RF_55, \ + RF_03, RF_13, RF_23, RF_33, RF_44, RF_54, \ + RF_12, RF_22, RF_32, RF_43, RF_53, \ + RT_22, RT_21, RF_21, \ + RT_12, RT_11, RT_10, \ + RT_02, RT_01 \ +) { \ { LA_20, LA_10, LF_35, LF_25, LF_15, LF_05 }, \ { LF_55, LF_45, LF_34, LF_24, LF_14, LF_04 }, \ { LF_54, LF_44, LF_33, LF_23, LF_13, LF_03 }, \ { LF_53, LF_43, LF_32, LF_22, LF_12, LT_22 }, \ { KC_NO, KC_NO, LT_21, LF_21, LT_11, LT_12 }, \ { KC_NO, KC_NO, LT_10, KC_NO, LT_01, LT_02 }, \ - \ +\ { RA_20, RA_10, RF_35, RF_25, RF_15, RF_05 }, \ { RF_55, RF_45, RF_34, RF_24, RF_14, RF_04 }, \ { RF_54, RF_44, RF_33, RF_23, RF_13, RF_03 }, \ { RF_53, RF_43, RF_32, RF_22, RF_12, RT_22 }, \ { KC_NO, KC_NO, RT_21, RF_21, RT_11, RT_12 }, \ - { KC_NO, KC_NO, RT_10, KC_NO, RT_01, RT_02 }, \ - } + { KC_NO, KC_NO, RT_10, KC_NO, RT_01, RT_02 } \ +} diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/config.h b/keyboards/handwired/dactyl_manuform/dmote/62key/config.h index cb2132707..cb65d8c19 100644 --- a/keyboards/handwired/dactyl_manuform/dmote/62key/config.h +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/config.h @@ -1,9 +1,10 @@ #pragma once #include "config_common.h" -#define PRODUCT_ID 0x3632 -#define DEVICE_VER 0x0001 -#define PRODUCT DMOTE (62-key) + +#define PRODUCT_ID 0x3632 +#define DEVICE_VER 0x0001 +#define PRODUCT DMOTE (62-key) #define MATRIX_ROWS 12 #define MATRIX_COLS 6 @@ -48,5 +49,3 @@ #define RGB_DI_PIN D1 #define RGBLED_NUM 6 // Used when chaining strips #define RGBLED_SPLIT { 3, 3 } // Used when not chaining strips -#define ws2812_PORTREG PORTD -#define ws2812_DDRREG DDRD diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/info.json b/keyboards/handwired/dactyl_manuform/dmote/62key/info.json index 8e54b8db4..ce492e70a 100644 --- a/keyboards/handwired/dactyl_manuform/dmote/62key/info.json +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/info.json @@ -7,84 +7,82 @@ "layouts": { "LAYOUT_62key": { "layout": [ - {"x":0, "y":0}, - {"x":1, "y":0}, - {"x":2, "y":0}, - {"x":3, "y":0}, - {"x":4, "y":0}, - {"x":5, "y":0}, + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, - {"x":0, "y":1}, - {"x":1, "y":1}, - {"x":2, "y":1}, - {"x":3, "y":1}, - {"x":4, "y":1}, - {"x":5, "y":1}, + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, - {"x":0, "y":2}, - {"x":1, "y":2}, - {"x":2, "y":2}, - {"x":3, "y":2}, - {"x":4, "y":2}, - {"x":5, "y":2}, + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5, "y": 2}, - {"x":0, "y":3}, - {"x":1, "y":3}, - {"x":2, "y":3}, - {"x":3, "y":3}, - {"x":4, "y":3}, + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + {"x": 4, "y": 3}, - {"x":3, "y":4}, - {"x":4.5, "y":4.5}, - {"x":5.5, "y":4.5}, + {"x": 3, "y": 4}, + {"x": 4.5, "y": 4.5}, + {"x": 5.5, "y": 4.5}, - {"x":4, "y":5.5}, - {"x":5, "y":5.5}, - {"x":6, "y":5.5}, + {"x": 4, "y": 5.5}, + {"x": 5, "y": 5.5}, + {"x": 6, "y": 5.5}, - {"x":4.5, "y":6.5}, - {"x":5.5, "y":6.5}, + {"x": 4.5, "y": 6.5}, + {"x": 5.5, "y": 6.5}, + {"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":9, "y":0}, - {"x":10, "y":0}, - {"x":11, "y":0}, - {"x":12, "y":0}, - {"x":13, "y":0}, - {"x":14, "y":0}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + {"x": 13, "y": 1}, + {"x": 14, "y": 1}, - {"x":9, "y":1}, - {"x":10, "y":1}, - {"x":11, "y":1}, - {"x":12, "y":1}, - {"x":13, "y":1}, - {"x":14, "y":1}, + {"x": 9, "y": 2}, + {"x": 10, "y": 2}, + {"x": 11, "y": 2}, + {"x": 12, "y": 2}, + {"x": 13, "y": 2}, + {"x": 14, "y": 2}, - {"x":9, "y":2}, - {"x":10, "y":2}, - {"x":11, "y":2}, - {"x":12, "y":2}, - {"x":13, "y":2}, - {"x":14, "y":2}, + {"x": 10, "y": 3}, + {"x": 11, "y": 3}, + {"x": 12, "y": 3}, + {"x": 13, "y": 3}, + {"x": 14, "y": 3}, - {"x":10, "y":3}, - {"x":11, "y":3}, - {"x":12, "y":3}, - {"x":13, "y":3}, - {"x":14, "y":3}, + {"x": 8.5, "y": 4.5}, + {"x": 9.5, "y": 4.5}, + {"x": 11, "y": 4}, - {"x":8.5, "y":4.5}, - {"x":9.5, "y":4.5}, - {"x":11, "y":4}, + {"x": 8, "y": 5.5}, + {"x": 9, "y": 5.5}, + {"x": 10, "y": 5.5}, - {"x":8, "y":5.5}, - {"x":9, "y":5.5}, - {"x":10, "y":5.5}, - - {"x":8.5, "y":6.5}, - {"x":9.5, "y":6.5} + {"x": 8.5, "y": 6.5}, + {"x": 9.5, "y": 6.5} ] } } } - diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c index 25bd7da39..d11f07548 100644 --- a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/keymap.c @@ -1,9 +1,8 @@ -#include "62key.h" -#include "rgblight.h" +#include QMK_KEYBOARD_H + #include "keymap_colemak.h" #include "sendstring_colemak.h" - // Automatic Layer ID: enum layer_names { _QWERTY, // OS-side Colemak. Default. @@ -14,71 +13,71 @@ enum layer_names { // Shorthand: #define LAYER_N MO(_NUMERIC) #define LAYER_C TG(_COLEMAK) -#define PASTE LSFT(KC_INS) // Terminal-compatible paste. -#define SLQ RALT(KC_9) // Single left-side quotation mark (in Colemak). -#define SRQ RALT(KC_0) -#define EMDASH RALT(LSFT(KC_MINUS)) // Em dash character (in Colemak). +#define PASTE LSFT(KC_INS) // Terminal-compatible paste. +#define SLQ RALT(KC_9) // Single left-side quotation mark (in Colemak). +#define SRQ RALT(KC_0) +#define EMDASH RALT(LSFT(KC_MINUS)) // Em dash character (in Colemak). #define BK_LCTL CTL_T(KC_LBRACKET) #define BK_RCTL RCTL_T(KC_RBRACKET) // TODO: Mod-tap ALT with a curvilinear brace. // https://github.com/qmk/qmk_firmware/pull/2055 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_62key( + KC_VOLD, KC_VOLU, CM_W, CM_F, CM_P, CM_G, + KC_TAB, CM_Q, CM_R, CM_S, CM_T, CM_D, + KC_BSPC, CM_A, CM_X, CM_C, CM_V, CM_B, + SLQ, CM_Z, KC_HOME, KC_PGUP, KC_END, + KC_PGDN, KC_ENT, KC_SPC, + KC_LSPO, KC_LGUI, KC_MINS, + BK_LCTL, KC_LALT, -[_QWERTY] = LAYOUT_62key( - KC_VOLD, KC_VOLU, CM_W, CM_F, CM_P, CM_G, - KC_TAB, CM_Q, CM_R, CM_S, CM_T, CM_D, - KC_BSPC, CM_A, CM_X, CM_C, CM_V, CM_B, - SLQ, CM_Z, KC_HOME, KC_PGUP, KC_END, - KC_PGDN, KC_ENT, KC_SPC, - KC_LSPO, KC_LGUI, KC_MINS, - BK_LCTL, KC_LALT, + CM_J, CM_L, CM_U, CM_Y, KC_MPLY, KC_MUTE, + CM_H, CM_N, CM_E, CM_I, CM_SCLN, KC_BSLS, + CM_K, CM_M, KC_COMM, KC_DOT, CM_O, KC_QUOT, + KC_LEFT, KC_UP, KC_RGHT, KC_SLSH, SRQ, + KC_DEL, KC_ESC, KC_DOWN, + KC_EQL, LAYER_N, KC_RSPC, + KC_RALT, BK_RCTL + ), - CM_J, CM_L, CM_U, CM_Y, KC_MPLY, KC_MUTE, - CM_H, CM_N, CM_E, CM_I, CM_SCLN, KC_BSLS, - CM_K, CM_M, KC_COMM, KC_DOT, CM_O, KC_QUOT, - KC_LEFT, KC_UP, KC_RGHT, KC_SLSH, SRQ, - KC_DEL, KC_ESC, KC_DOWN, - KC_EQL, LAYER_N, KC_RSPC, - KC_RALT, BK_RCTL -), + [_COLEMAK] = LAYOUT_62key( + _______, _______, KC_W, KC_F, KC_P, KC_G, + _______, KC_Q, KC_R, KC_S, KC_T, KC_D, + _______, KC_A, KC_X, KC_C, KC_V, KC_B, + _______, KC_Z, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, -[_COLEMAK] = LAYOUT_62key( - _______, _______, KC_W, KC_F, KC_P, KC_G, - _______, KC_Q, KC_R, KC_S, KC_T, KC_D, - _______, KC_A, KC_X, KC_C, KC_V, KC_B, - _______, KC_Z, _______, _______, _______, - _______, _______, _______, - _______, _______, _______, - _______, _______, + KC_J, KC_L, KC_U, KC_Y, _______, _______, + KC_H, KC_N, KC_E, KC_I, KC_SCLN, _______, + KC_K, KC_M, _______, _______, KC_O, _______, + _______, _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______ + ), - KC_J, KC_L, KC_U, KC_Y, _______, _______, - KC_H, KC_N, KC_E, KC_I, KC_SCLN, _______, - KC_K, KC_M, _______, _______, KC_O, _______, - _______, _______, _______, _______, _______, - _______, _______, _______, - _______, _______, _______, - _______, _______ -), + [_NUMERIC] = LAYOUT_62key( + LAYER_C, KC_INS, KC_F2, KC_F3, KC_F4, KC_F5, + KC_F12, KC_F1, KC_2, KC_3, KC_4, KC_5, + _______, KC_1, KC_AT, KC_HASH, KC_DLR, KC_PERC, + KC_GRV, KC_EXLM, KC_BTN1, KC_WH_U, KC_BTN2, + KC_WH_D, RGB_MOD, _______, + _______, _______, EMDASH, + _______, _______, -[_NUMERIC] = LAYOUT_62key( - LAYER_C, KC_INS, KC_F2, KC_F3, KC_F4, KC_F5, - KC_F12, KC_F1, KC_2, KC_3, KC_4, KC_5, - _______, KC_1, KC_AT, KC_HASH, KC_DLR, KC_PERC, - KC_GRV, KC_EXLM, KC_BTN1, KC_WH_U, KC_BTN2, - KC_WH_D, RGB_MOD, _______, - _______, _______, EMDASH, - _______, _______, - - KC_F6, KC_F7, KC_F8, KC_F9, RESET, KC_WAKE, // * - KC_6, KC_7, KC_8, KC_9, KC_F10, KC_F11, - KC_CIRC, KC_AMPR, KC_ASTR, KC_APP, KC_0, PASTE, - KC_MS_L, KC_MS_U, KC_MS_R, KC_PSCR, RGB_TOG, - KC_ACL1, KC_ACL2, KC_MS_D, - KC_ACL0, _______, _______, - _______, _______ -) + KC_F6, KC_F7, KC_F8, KC_F9, RESET, KC_WAKE, // * + KC_6, KC_7, KC_8, KC_9, KC_F10, KC_F11, + KC_CIRC, KC_AMPR, KC_ASTR, KC_APP, KC_0, PASTE, + KC_MS_L, KC_MS_U, KC_MS_R, KC_PSCR, RGB_TOG, + KC_ACL1, KC_ACL2, KC_MS_D, + KC_ACL0, _______, _______, + _______, _______ + ) }; + // *KC_WAKE: Used in place of KC_SLEP because X11 with i3 on prerelease // Debian 10 was seeing duplicate keypress and release events for sleep // (regardless of i3 binding), which ruined the function. @@ -111,22 +110,19 @@ void modal_leds(void) { uint16_t hue = 355; // Rough match to printed case. uint8_t saturation = 255; uint8_t value = 0; - if (layer_state_is(_COLEMAK)) { hue -= 50; saturation -= 20; value += 20; }; - if (layer_state_is(_NUMERIC)) { value += 30; }; - if (mods & MOD_MASK_SHIFT) { saturation -= 20; value += 30; }; - if (mods & MOD_MASK_ALT) { hue -= 100; saturation -= 20; value += 30; }; - if (mods & MOD_MASK_CTRL) { hue -= 200; saturation -= 20; value += 30; }; + if (layer_state_is(_COLEMAK)) { hue -= 50; saturation -= 20; value += 20; } + if (layer_state_is(_NUMERIC)) { value += 30; } + if (mods & MOD_MASK_SHIFT) { saturation -= 20; value += 30; } + if (mods & MOD_MASK_ALT) { hue -= 100; saturation -= 20; value += 30; } + if (mods & MOD_MASK_CTRL) { hue -= 200; saturation -= 20; value += 30; } // rgblight_sethsv_eeprom_helper is not a great API function but it does // affect both halves of a split keyboard. rgblight_sethsv_eeprom_helper(hue, saturation, value, false); _leds_dirty = false; } -void matrix_init_user(void) { -} - void matrix_scan_user(void) { - if (_leds_dirty) { modal_leds(); }; + if (_leds_dirty) { modal_leds(); } } bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -134,12 +130,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Static lighting is amenable to customization. rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); _initialized = true; - }; + } if (keycode == KC_WAKE) { // Turn the lights off before going to sleep. rgblight_sethsv_eeprom_helper(0, 0, 0, false); } else { _leds_dirty = true; - }; + } return true; } diff --git a/keyboards/handwired/dactyl_manuform/rules.mk b/keyboards/handwired/dactyl_manuform/rules.mk deleted file mode 100644 index 1ba5f5a09..000000000 --- a/keyboards/handwired/dactyl_manuform/rules.mk +++ /dev/null @@ -1,34 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = caterina - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/dactyl_promicro/rules.mk b/keyboards/handwired/dactyl_promicro/rules.mk index 1ba5f5a09..e92befce6 100644 --- a/keyboards/handwired/dactyl_promicro/rules.mk +++ b/keyboards/handwired/dactyl_promicro/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/handwired/dactyl_rah/rules.mk b/keyboards/handwired/dactyl_rah/rules.mk index 9a9bf7d69..caba0940c 100644 --- a/keyboards/handwired/dactyl_rah/rules.mk +++ b/keyboards/handwired/dactyl_rah/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/daishi/daishi.h b/keyboards/handwired/daishi/daishi.h index 49e377589..0d0c57ab2 100644 --- a/keyboards/handwired/daishi/daishi.h +++ b/keyboards/handwired/daishi/daishi.h @@ -2,8 +2,6 @@ #include "quantum.h" -#define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise) - // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ diff --git a/keyboards/handwired/daishi/keymaps/default/keymap.c b/keyboards/handwired/daishi/keymaps/default/keymap.c index 5214e8b6f..a1ef825ff 100644 --- a/keyboards/handwired/daishi/keymaps/default/keymap.c +++ b/keyboards/handwired/daishi/keymaps/default/keymap.c @@ -82,8 +82,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -bool encoder_update(bool clockwise) { - if (clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { + if (clockwise) { tap_code(KC_VOLU); } else { tap_code(KC_VOLD); diff --git a/keyboards/handwired/daishi/rules.mk b/keyboards/handwired/daishi/rules.mk index 5e8cc85e6..179605a76 100644 --- a/keyboards/handwired/daishi/rules.mk +++ b/keyboards/handwired/daishi/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/handwired/datahand/rules.mk b/keyboards/handwired/datahand/rules.mk index a46dcedb1..0fb3a2513 100644 --- a/keyboards/handwired/datahand/rules.mk +++ b/keyboards/handwired/datahand/rules.mk @@ -12,14 +12,13 @@ MCU = at90usb1286 BOOTLOADER = halfkay # Build Options -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/ddg_56/rules.mk b/keyboards/handwired/ddg_56/rules.mk index 56c900712..17c7ee57b 100644 --- a/keyboards/handwired/ddg_56/rules.mk +++ b/keyboards/handwired/ddg_56/rules.mk @@ -9,13 +9,12 @@ BOOTLOADER = stm32-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/handwired/eagleii/rules.mk b/keyboards/handwired/eagleii/rules.mk index aeee86d3a..6054d779a 100644 --- a/keyboards/handwired/eagleii/rules.mk +++ b/keyboards/handwired/eagleii/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/handwired/ergocheap/rules.mk b/keyboards/handwired/ergocheap/rules.mk index b126207bc..fc66e5ff7 100644 --- a/keyboards/handwired/ergocheap/rules.mk +++ b/keyboards/handwired/ergocheap/rules.mk @@ -10,7 +10,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/evk/v1_3/rules.mk b/keyboards/handwired/evk/v1_3/rules.mk index 02a74ee91..ac0644817 100644 --- a/keyboards/handwired/evk/v1_3/rules.mk +++ b/keyboards/handwired/evk/v1_3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/fc200rt_qmk/rules.mk b/keyboards/handwired/fc200rt_qmk/rules.mk index 55a088771..9fe6bd9b8 100644 --- a/keyboards/handwired/fc200rt_qmk/rules.mk +++ b/keyboards/handwired/fc200rt_qmk/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/fivethirteen/rules.mk b/keyboards/handwired/fivethirteen/rules.mk index 64d566cb1..3fcc255ad 100644 --- a/keyboards/handwired/fivethirteen/rules.mk +++ b/keyboards/handwired/fivethirteen/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/floorboard/config.h b/keyboards/handwired/floorboard/config.h index 2ff291234..d53675303 100644 --- a/keyboards/handwired/floorboard/config.h +++ b/keyboards/handwired/floorboard/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/floorboard/rules.mk b/keyboards/handwired/floorboard/rules.mk index be14c2e65..f17907fcf 100644 --- a/keyboards/handwired/floorboard/rules.mk +++ b/keyboards/handwired/floorboard/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -19,7 +19,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/frankie_macropad/keymaps/default/config.h b/keyboards/handwired/frankie_macropad/keymaps/default/config.h new file mode 100644 index 000000000..dd687cad5 --- /dev/null +++ b/keyboards/handwired/frankie_macropad/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define LAYER_STATE_8BIT diff --git a/keyboards/handwired/frankie_macropad/rules.mk b/keyboards/handwired/frankie_macropad/rules.mk index b5b6e3977..22f4e4c3e 100644 --- a/keyboards/handwired/frankie_macropad/rules.mk +++ b/keyboards/handwired/frankie_macropad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/frenchdev/keymaps/default/keymap.c b/keyboards/handwired/frenchdev/keymaps/default/keymap.c index b0713b730..2ef10ca11 100644 --- a/keyboards/handwired/frenchdev/keymaps/default/keymap.c +++ b/keyboards/handwired/frenchdev/keymaps/default/keymap.c @@ -65,9 +65,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_BASE] = LAYOUT( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - KC_ESC, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_DTRM, BP_DCRC, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, KC_BSPC, \ - KC_TAB, BP_B, BP_ECUT, BP_O, BP_P, BP_EGRV, BP_UNDS, BP_EQL, BP_K, BP_V, BP_D, BP_L, BP_J, KC_ENT, \ - BP_GRV, BP_A, BP_U, BP_E, BP_I, BP_F, BP_SCLN, BP_EXLM, BP_C, BP_T, BP_S, BP_R, BP_N, BP_APOS, \ + KC_ESC, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, BP_DIAE, BP_DCIR, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, KC_BSPC, \ + KC_TAB, BP_B, BP_EACU, BP_O, BP_P, BP_EGRV, BP_UNDS, BP_EQL, BP_K, BP_V, BP_D, BP_L, BP_J, KC_ENT, \ + BP_GRV, BP_A, BP_U, BP_E, BP_I, BP_F, BP_SCLN, BP_EXLM, BP_C, BP_T, BP_S, BP_R, BP_N, BP_QUOT, \ M_SF, BP_Z, BP_AGRV, BP_Y, BP_X, KC_RBRC, M_SFS, BP_CBSP, L2INS, L2LOC, BP_CDEL, M_SFS, BP_M, BP_G, KC_UP, BP_H, BP_Q, M_SF, \ KC_LCTL, KC_LGUI, KC_PSLS, BP_DOT, BP_COMM, KC_SPACE,M_L1E, KC_LALT, KC_CAPS, M_L1E, KC_SPACE, KC_LEFT, KC_DOWN, KC_RIGHT,BP_COLN, KC_RCTL, \ //left pedals @@ -97,9 +97,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_SYMBOLS] = 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, BP_DCUR, BP_PARG, BP_SECT, BP_DGRK, KC_TRNS, BP_TILD, BP_DCAR, BP_LEQL, BP_GEQL, BP_PSMS, BP_OBEL, BP_TIMS, KC_TRNS, \ - KC_TRNS, BP_BSLS, BP_ASTR, BP_LCBR, BP_RCBR, BP_GRV, KC_TRNS, BP_DIFF, BP_HASH, BP_LBRC, BP_RBRC, BP_PERC, BP_PMIL, KC_TRNS, \ - KC_TRNS, BP_EQL, BP_UGRV, BP_LPRN, BP_RPRN, BP_PLUS, BP_COLN, BP_QEST, BP_CCED, BP_LESS, BP_GRTR, BP_AMPR, BP_UNDS, KC_TRNS, \ + KC_TRNS, BP_CURR, BP_PARA, BP_SECT, BP_DGRK, KC_TRNS, BP_TILD, BP_CARN, BP_LEQL, BP_GEQL, BP_PLMN, BP_DIV, BP_MUL, KC_TRNS, \ + KC_TRNS, BP_BSLS, BP_ASTR, BP_LCBR, BP_RCBR, BP_GRV, KC_TRNS, BP_NEQL, BP_HASH, BP_LBRC, BP_RBRC, BP_PERC, BP_PERM, KC_TRNS, \ + KC_TRNS, BP_EQL, BP_UGRV, BP_LPRN, BP_RPRN, BP_PLUS, BP_COLN, BP_QUES, BP_CCED, BP_LABK, BP_RABK, BP_AMPR, BP_UNDS, KC_TRNS, \ KC_TRNS, M_UN, M_CUT, M_CP, M_PS, M_SE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BP_DLR, BP_EQL, KC_PGUP, BP_PIPE, BP_SLSH, KC_TRNS, \ KC_TRNS, KC_TRNS, BP_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, \ //left pedals diff --git a/keyboards/handwired/frenchdev/rules.mk b/keyboards/handwired/frenchdev/rules.mk index abf4e62c4..5af8b3b61 100644 --- a/keyboards/handwired/frenchdev/rules.mk +++ b/keyboards/handwired/frenchdev/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -24,12 +24,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work UNICODE_ENABLE = yes # Unicode BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGBLIGHT_ENABLE = no -API_SYSEX_ENABLE = no # project specific files SRC = i2c_master.c \ diff --git a/keyboards/handwired/freoduo/rules.mk b/keyboards/handwired/freoduo/rules.mk index e3da3753e..b0bd53fd8 100644 --- a/keyboards/handwired/freoduo/rules.mk +++ b/keyboards/handwired/freoduo/rules.mk @@ -7,11 +7,11 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 +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 @@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output VELOCIKEY_ENABLE = yes -SPLIT_KEYBOARD = yes \ No newline at end of file +SPLIT_KEYBOARD = yes diff --git a/keyboards/handwired/fruity60/rules.mk b/keyboards/handwired/fruity60/rules.mk index 8c7a0a73b..1d771f61d 100644 --- a/keyboards/handwired/fruity60/rules.mk +++ b/keyboards/handwired/fruity60/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -28,7 +28,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/gamenum/rules.mk b/keyboards/handwired/gamenum/rules.mk index 398932983..e8792f8dd 100644 --- a/keyboards/handwired/gamenum/rules.mk +++ b/keyboards/handwired/gamenum/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/hacked_motospeed/config.h b/keyboards/handwired/hacked_motospeed/config.h index 29a0a6dcf..bfa1e220f 100644 --- a/keyboards/handwired/hacked_motospeed/config.h +++ b/keyboards/handwired/hacked_motospeed/config.h @@ -191,26 +191,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/hacked_motospeed/rules.mk b/keyboards/handwired/hacked_motospeed/rules.mk index 46ef60a8b..3ca539b7c 100644 --- a/keyboards/handwired/hacked_motospeed/rules.mk +++ b/keyboards/handwired/hacked_motospeed/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/heisenberg/config.h b/keyboards/handwired/heisenberg/config.h index ba35f24ac..006f1e689 100644 --- a/keyboards/handwired/heisenberg/config.h +++ b/keyboards/handwired/heisenberg/config.h @@ -205,26 +205,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/heisenberg/rules.mk b/keyboards/handwired/heisenberg/rules.mk index 8d79915fd..620554d9d 100644 --- a/keyboards/handwired/heisenberg/rules.mk +++ b/keyboards/handwired/heisenberg/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 diff --git a/keyboards/handwired/hexon38/rules.mk b/keyboards/handwired/hexon38/rules.mk index 93b7a1176..0216030b4 100644 --- a/keyboards/handwired/hexon38/rules.mk +++ b/keyboards/handwired/hexon38/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32u4 BOOTLOADER = halfkay # Enabled build options: -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/handwired/hnah108/rules.mk b/keyboards/handwired/hnah108/rules.mk index f0a39faeb..eb456a0b7 100644 --- a/keyboards/handwired/hnah108/rules.mk +++ b/keyboards/handwired/hnah108/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/hnah40/config.h b/keyboards/handwired/hnah40/config.h index 6bc98a10c..9e314812b 100644 --- a/keyboards/handwired/hnah40/config.h +++ b/keyboards/handwired/hnah40/config.h @@ -168,23 +168,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/handwired/hnah40/rules.mk b/keyboards/handwired/hnah40/rules.mk index 3005ce89d..7a88b3fab 100644 --- a/keyboards/handwired/hnah40/rules.mk +++ b/keyboards/handwired/hnah40/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/hnah40rgb/config.h b/keyboards/handwired/hnah40rgb/config.h index e6271738c..3d558f97f 100644 --- a/keyboards/handwired/hnah40rgb/config.h +++ b/keyboards/handwired/hnah40rgb/config.h @@ -60,7 +60,7 @@ along with this program. If not, see . #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set diff --git a/keyboards/handwired/hnah40rgb/rules.mk b/keyboards/handwired/hnah40rgb/rules.mk index 016367866..5059216f3 100644 --- a/keyboards/handwired/hnah40rgb/rules.mk +++ b/keyboards/handwired/hnah40rgb/rules.mk @@ -13,7 +13,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/ibm122m/config.h b/keyboards/handwired/ibm122m/config.h index bd1fdc97d..903a63e44 100644 --- a/keyboards/handwired/ibm122m/config.h +++ b/keyboards/handwired/ibm122m/config.h @@ -158,23 +158,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/handwired/ibm122m/rules.mk b/keyboards/handwired/ibm122m/rules.mk index c26bc7a99..866442361 100644 --- a/keyboards/handwired/ibm122m/rules.mk +++ b/keyboards/handwired/ibm122m/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 diff --git a/keyboards/handwired/ibm_wheelwriter/rules.mk b/keyboards/handwired/ibm_wheelwriter/rules.mk index 7b69908b1..f68b5b1df 100644 --- a/keyboards/handwired/ibm_wheelwriter/rules.mk +++ b/keyboards/handwired/ibm_wheelwriter/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/jn68m/rules.mk b/keyboards/handwired/jn68m/rules.mk index 679f9c6bd..0eb22e174 100644 --- a/keyboards/handwired/jn68m/rules.mk +++ b/keyboards/handwired/jn68m/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/jopr/jopr.c b/keyboards/handwired/jopr/jopr.c index 3dccb719c..a337867dd 100644 --- a/keyboards/handwired/jopr/jopr.c +++ b/keyboards/handwired/jopr/jopr.c @@ -1,8 +1,4 @@ #include "jopr.h" -void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; void led_init_ports(void) { setPinOutput(F0); diff --git a/keyboards/handwired/jopr/rules.mk b/keyboards/handwired/jopr/rules.mk index ae10be0d2..0abf765fb 100644 --- a/keyboards/handwired/jopr/rules.mk +++ b/keyboards/handwired/jopr/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/handwired/jot50/rules.mk b/keyboards/handwired/jot50/rules.mk index d01dfefa5..7088d3a29 100644 --- a/keyboards/handwired/jot50/rules.mk +++ b/keyboards/handwired/jot50/rules.mk @@ -16,19 +16,17 @@ BOOTLOADER = caterina # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/jotanck/rules.mk b/keyboards/handwired/jotanck/rules.mk index 2a233cccd..949eb41b0 100644 --- a/keyboards/handwired/jotanck/rules.mk +++ b/keyboards/handwired/jotanck/rules.mk @@ -16,19 +16,17 @@ BOOTLOADER = caterina # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/jotpad16/rules.mk b/keyboards/handwired/jotpad16/rules.mk index 79c32c5c3..37692a34f 100644 --- a/keyboards/handwired/jotpad16/rules.mk +++ b/keyboards/handwired/jotpad16/rules.mk @@ -16,19 +16,17 @@ BOOTLOADER = caterina # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/jtallbean/split_65/config.h b/keyboards/handwired/jtallbean/split_65/config.h index 105e76438..96b9385b4 100644 --- a/keyboards/handwired/jtallbean/split_65/config.h +++ b/keyboards/handwired/jtallbean/split_65/config.h @@ -197,26 +197,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/jtallbean/split_65/rules.mk b/keyboards/handwired/jtallbean/split_65/rules.mk index 5fa9d561b..898327cbe 100644 --- a/keyboards/handwired/jtallbean/split_65/rules.mk +++ b/keyboards/handwired/jtallbean/split_65/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 SPLIT_KEYBOARD = yes # Enable split keyboard support diff --git a/keyboards/handwired/juliet/config.h b/keyboards/handwired/juliet/config.h index 988c578ba..2a2331b21 100644 --- a/keyboards/handwired/juliet/config.h +++ b/keyboards/handwired/juliet/config.h @@ -189,26 +189,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/handwired/juliet/rules.mk b/keyboards/handwired/juliet/rules.mk index 264ff6dcb..d9687772c 100644 --- a/keyboards/handwired/juliet/rules.mk +++ b/keyboards/handwired/juliet/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/k8split/rules.mk b/keyboards/handwired/k8split/rules.mk index cedc7b4de..c2358a17f 100644 --- a/keyboards/handwired/k8split/rules.mk +++ b/keyboards/handwired/k8split/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/k_numpad17/rules.mk b/keyboards/handwired/k_numpad17/rules.mk index e1f2d2a14..e371cbade 100644 --- a/keyboards/handwired/k_numpad17/rules.mk +++ b/keyboards/handwired/k_numpad17/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Key at 0,0 makes the keyboard go into bootloader +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/handwired/kbod/keymaps/default/rules.mk b/keyboards/handwired/kbod/keymaps/default/rules.mk index 5b9ff0bfd..1e7592c41 100644 --- a/keyboards/handwired/kbod/keymaps/default/rules.mk +++ b/keyboards/handwired/kbod/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/handwired/kbod/rules.mk b/keyboards/handwired/kbod/rules.mk index ddff1d354..251ba2954 100644 --- a/keyboards/handwired/kbod/rules.mk +++ b/keyboards/handwired/kbod/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/ks63/rules.mk b/keyboards/handwired/ks63/rules.mk index a97b8ea70..75b8e530b 100644 --- a/keyboards/handwired/ks63/rules.mk +++ b/keyboards/handwired/ks63/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/lagrange/rules.mk b/keyboards/handwired/lagrange/rules.mk index ea7413b97..d1318ce57 100644 --- a/keyboards/handwired/lagrange/rules.mk +++ b/keyboards/handwired/lagrange/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/leftynumpad/rules.mk b/keyboards/handwired/leftynumpad/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/handwired/leftynumpad/rules.mk +++ b/keyboards/handwired/leftynumpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/lovelive9/rules.mk b/keyboards/handwired/lovelive9/rules.mk index 4799b5ec9..88b50bf3f 100644 --- a/keyboards/handwired/lovelive9/rules.mk +++ b/keyboards/handwired/lovelive9/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/handwired/magicforce61/rules.mk b/keyboards/handwired/magicforce61/rules.mk index b72fff096..ece324277 100644 --- a/keyboards/handwired/magicforce61/rules.mk +++ b/keyboards/handwired/magicforce61/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/magicforce68/rules.mk b/keyboards/handwired/magicforce68/rules.mk index 398932983..e8792f8dd 100644 --- a/keyboards/handwired/magicforce68/rules.mk +++ b/keyboards/handwired/magicforce68/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/marauder/keymaps/orvia/keymap.c b/keyboards/handwired/marauder/keymaps/orvia/keymap.c index ad081c868..87a0a93cc 100644 --- a/keyboards/handwired/marauder/keymaps/orvia/keymap.c +++ b/keyboards/handwired/marauder/keymaps/orvia/keymap.c @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE // WPM-responsive animation stuff here # define IDLE_FRAMES 5 # define IDLE_SPEED 20 // below this wpm value your animation will idle diff --git a/keyboards/handwired/marauder/keymaps/orvia/rules.mk b/keyboards/handwired/marauder/keymaps/orvia/rules.mk index 9ce099c8f..9b5ee6b6f 100644 --- a/keyboards/handwired/marauder/keymaps/orvia/rules.mk +++ b/keyboards/handwired/marauder/keymaps/orvia/rules.mk @@ -1,3 +1,4 @@ VIA_ENABLE = yes -OLED_DRIVER_ENABLE = yes # OLED Driver Enable +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # OLED Driver Enable WPM_ENABLE = yes # WPM counting Enable diff --git a/keyboards/handwired/marauder/rules.mk b/keyboards/handwired/marauder/rules.mk index a4f16938d..54e43dd5a 100644 --- a/keyboards/handwired/marauder/rules.mk +++ b/keyboards/handwired/marauder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/mechboards_micropad/config.h b/keyboards/handwired/mechboards_micropad/config.h index 7006f50c0..fbeb07ab6 100644 --- a/keyboards/handwired/mechboards_micropad/config.h +++ b/keyboards/handwired/mechboards_micropad/config.h @@ -188,26 +188,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/mechboards_micropad/rules.mk b/keyboards/handwired/mechboards_micropad/rules.mk index 6c03d99a4..0417abe59 100644 --- a/keyboards/handwired/mechboards_micropad/rules.mk +++ b/keyboards/handwired/mechboards_micropad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk b/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk index c3cea9618..2a28f5aca 100644 --- a/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk +++ b/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk @@ -2,5 +2,5 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite UNICODEMAP_ENABLE = yes # Unicode Map diff --git a/keyboards/handwired/minorca/rules.mk b/keyboards/handwired/minorca/rules.mk index f3f1502de..d80e89a6d 100644 --- a/keyboards/handwired/minorca/rules.mk +++ b/keyboards/handwired/minorca/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/handwired/ms_sculpt_mobile/keymaps/default/rules.mk b/keyboards/handwired/ms_sculpt_mobile/keymaps/default/rules.mk index 3955a3ff4..b89249d93 100644 --- a/keyboards/handwired/ms_sculpt_mobile/keymaps/default/rules.mk +++ b/keyboards/handwired/ms_sculpt_mobile/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/rules.mk b/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/rules.mk index ddfea8255..6d1eae2bf 100644 --- a/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/rules.mk +++ b/keyboards/handwired/ms_sculpt_mobile/keymaps/milestogo/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/handwired/ms_sculpt_mobile/rules.mk b/keyboards/handwired/ms_sculpt_mobile/rules.mk index d38138bbb..b9fea8336 100644 --- a/keyboards/handwired/ms_sculpt_mobile/rules.mk +++ b/keyboards/handwired/ms_sculpt_mobile/rules.mk @@ -22,7 +22,7 @@ else BOOTLOADER = atmel-dfu endif -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -32,7 +32,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/myskeeb/rules.mk b/keyboards/handwired/myskeeb/rules.mk index 9ab054973..b3f998ddf 100644 --- a/keyboards/handwired/myskeeb/rules.mk +++ b/keyboards/handwired/myskeeb/rules.mk @@ -13,7 +13,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,11 +24,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -MIDI_ENABLE = no # MIDI controls BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode SPLIT_KEYBOARD = yes # Enables split keyboard support -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 NO_USB_STARTUP_CHECK = yes TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/nicekey/rules.mk b/keyboards/handwired/nicekey/rules.mk index 61c1fa79a..ea150da48 100644 --- a/keyboards/handwired/nicekey/rules.mk +++ b/keyboards/handwired/nicekey/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/handwired/not_so_minidox/rules.mk b/keyboards/handwired/not_so_minidox/rules.mk index 6e87d7545..2cadc2210 100644 --- a/keyboards/handwired/not_so_minidox/rules.mk +++ b/keyboards/handwired/not_so_minidox/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/handwired/novem/rules.mk b/keyboards/handwired/novem/rules.mk index 21e28e680..5b47ff97f 100644 --- a/keyboards/handwired/novem/rules.mk +++ b/keyboards/handwired/novem/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/numpad20/rules.mk b/keyboards/handwired/numpad20/rules.mk index b5e96d74b..77f39e3ce 100644 --- a/keyboards/handwired/numpad20/rules.mk +++ b/keyboards/handwired/numpad20/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c index 5a30f5c57..482287740 100644 --- a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c +++ b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c @@ -341,7 +341,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void matrix_init_user(void) { set_unicode_input_mode(UC_WINC); }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_P(PSTR(" spaget v1\n\n"), false); diff --git a/keyboards/handwired/obuwunkunubi/spaget/rules.mk b/keyboards/handwired/obuwunkunubi/spaget/rules.mk index 8be738f3e..dec0af7e3 100644 --- a/keyboards/handwired/obuwunkunubi/spaget/rules.mk +++ b/keyboards/handwired/obuwunkunubi/spaget/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,13 +22,13 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend AUDIO_ENABLE = no # Audio output on port C6 -OLED_DRIVER_ENABLE = yes # Enable OLED display support +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable OLED display support ENCODER_ENABLE = yes # Enable encoder support diff --git a/keyboards/handwired/oem_iso_fullsize/rules.mk b/keyboards/handwired/oem_iso_fullsize/rules.mk index 04d0c78e8..d0b07a435 100644 --- a/keyboards/handwired/oem_iso_fullsize/rules.mk +++ b/keyboards/handwired/oem_iso_fullsize/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/onekey/keymaps/digitizer/keymap.c b/keyboards/handwired/onekey/keymaps/digitizer/keymap.c new file mode 100644 index 000000000..6b304e86f --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/digitizer/keymap.c @@ -0,0 +1,38 @@ + /* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "digitizer.h" + +#include "math.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {LAYOUT_ortho_1x1(KC_A)}; + +uint32_t timer = 0; + +void matrix_scan_user() { + if (timer_elapsed32(timer) < 200) { + return; + } + + timer = timer_read32(); + digitizer_t digitizer; + digitizer.x = 0.5 - 0.2 * cos(timer_read() / 250. / 6.28); + digitizer.y = 0.5 - 0.2 * sin(timer_read() / 250. / 6.28); + digitizer.tipswitch = 0; + digitizer.inrange = 1; + digitizer_set_report(digitizer); +} diff --git a/keyboards/handwired/onekey/keymaps/digitizer/rules.mk b/keyboards/handwired/onekey/keymaps/digitizer/rules.mk new file mode 100644 index 000000000..ea9f9bd9a --- /dev/null +++ b/keyboards/handwired/onekey/keymaps/digitizer/rules.mk @@ -0,0 +1 @@ +DIGITIZER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/onekey/keymaps/oled/rules.mk b/keyboards/handwired/onekey/keymaps/oled/rules.mk index 2ef0a8d04..6b69e50db 100644 --- a/keyboards/handwired/onekey/keymaps/oled/rules.mk +++ b/keyboards/handwired/onekey/keymaps/oled/rules.mk @@ -1,2 +1,3 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/onekey/rules.mk b/keyboards/handwired/onekey/rules.mk index d4676e449..6d90c347c 100644 --- a/keyboards/handwired/onekey/rules.mk +++ b/keyboards/handwired/onekey/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/ortho5x13/rules.mk b/keyboards/handwired/ortho5x13/rules.mk index b5e96d74b..77f39e3ce 100644 --- a/keyboards/handwired/ortho5x13/rules.mk +++ b/keyboards/handwired/ortho5x13/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/ortho5x14/rules.mk b/keyboards/handwired/ortho5x14/rules.mk index c0fc51be6..87e3acb3b 100644 --- a/keyboards/handwired/ortho5x14/rules.mk +++ b/keyboards/handwired/ortho5x14/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/owlet60/config.h b/keyboards/handwired/owlet60/config.h index 27317233e..ef1e410d1 100644 --- a/keyboards/handwired/owlet60/config.h +++ b/keyboards/handwired/owlet60/config.h @@ -193,26 +193,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c index f63ec1893..9e9697658 100644 --- a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c @@ -73,7 +73,7 @@ void led_set_user(uint8_t usb_led) { } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { //return OLED_ROTATION_180; return OLED_ROTATION_180; diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/rules.mk b/keyboards/handwired/owlet60/keymaps/oled_testing/rules.mk index 48a51b225..d34d066de 100644 --- a/keyboards/handwired/owlet60/keymaps/oled_testing/rules.mk +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes \ No newline at end of file +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/handwired/owlet60/rules.mk b/keyboards/handwired/owlet60/rules.mk index 65fb1259f..bb8f05651 100644 --- a/keyboards/handwired/owlet60/rules.mk +++ b/keyboards/handwired/owlet60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -25,12 +25,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 CUSTOM_MATRIX = yes -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no SRC += matrix.c diff --git a/keyboards/handwired/p1800fl/config.h b/keyboards/handwired/p1800fl/config.h deleted file mode 100644 index 793d8f19c..000000000 --- a/keyboards/handwired/p1800fl/config.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright 2020 marhalloweenvt - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3EAE -#define DEVICE_VER 0x0001 -#define MANUFACTURER marhalloweenvt -#define PRODUCT p1800fl - -/* key matrix size */ -#define MATRIX_ROWS 6 -#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 { B6, B5, B4, D7, D6, D4 } -#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, E6, B0, B1, B2, B3, D0, D1, D2} -#define UNUSED_PINS - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -#define BACKLIGHT_PIN B7 -#define BACKLIGHT_BREATHING -#define BACKLIGHT_LEVELS 5 - -/* 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 - -/* disable these deprecated features by default */ -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -/* QMK DFU key configuration */ -#define QMK_ESC_OUTPUT C7 // usually COL -#define QMK_ESC_INPUT B6 // usually ROW \ No newline at end of file diff --git a/keyboards/handwired/p1800fl/info.json b/keyboards/handwired/p1800fl/info.json deleted file mode 100644 index 93f4e8aae..000000000 --- a/keyboards/handwired/p1800fl/info.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "keyboard_name": "p1800fl", - "url": "", - "maintainer": "marhalloweenvt", - "width": 19.5, - "height": 5.25, - "layouts": { - "LAYOUT": { - "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"!", "x":1, "y":0}, - {"label":"@", "x":2, "y":0}, - {"label":"#", "x":3, "y":0}, - {"label":"$", "x":4, "y":0}, - {"label":"%", "x":5, "y":0}, - {"label":"^", "x":6, "y":0}, - {"label":"&", "x":7, "y":0}, - {"label":"*", "x":8, "y":0}, - {"label":"(", "x":9, "y":0}, - {"label":")", "x":10, "y":0}, - {"label":"_", "x":11, "y":0}, - {"label":"+", "x":12, "y":0}, - {"label":"Backspace", "x":13, "y":0}, - {"label":"Backspace", "x":14, "y":0}, - {"label":"Num Lock", "x":15.5, "y":0}, - {"label":"/", "x":16.5, "y":0}, - {"label":"*", "x":17.5, "y":0}, - {"label":"-", "x":18.5, "y":0}, - {"label":"Tab", "x":0, "y":1, "w":1.5}, - {"label":"Q", "x":1.5, "y":1}, - {"label":"W", "x":2.5, "y":1}, - {"label":"E", "x":3.5, "y":1}, - {"label":"R", "x":4.5, "y":1}, - {"label":"T", "x":5.5, "y":1}, - {"label":"Y", "x":6.5, "y":1}, - {"label":"U", "x":7.5, "y":1}, - {"label":"I", "x":8.5, "y":1}, - {"label":"O", "x":9.5, "y":1}, - {"label":"P", "x":10.5, "y":1}, - {"label":"{", "x":11.5, "y":1}, - {"label":"}", "x":12.5, "y":1}, - {"label":"|", "x":13.5, "y":1, "w":1.5}, - {"label":"7", "x":15.5, "y":1}, - {"label":"8", "x":16.5, "y":1}, - {"label":"9", "x":17.5, "y":1}, - {"label":"+", "x":18.5, "y":1}, - {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, - {"label":"A", "x":1.75, "y":2}, - {"label":"S", "x":2.75, "y":2}, - {"label":"D", "x":3.75, "y":2}, - {"label":"F", "x":4.75, "y":2}, - {"label":"G", "x":5.75, "y":2}, - {"label":"H", "x":6.75, "y":2}, - {"label":"J", "x":7.75, "y":2}, - {"label":"K", "x":8.75, "y":2}, - {"label":"L", "x":9.75, "y":2}, - {"label":":", "x":10.75, "y":2}, - {"label":"\"", "x":11.75, "y":2}, - {"label":"Enter", "x":12.75, "y":2}, - {"label":"Enter", "x":13.75, "y":2, "w":1.25}, - {"label":"4", "x":15.5, "y":2}, - {"label":"5", "x":16.5, "y":2}, - {"label":"6", "x":17.5, "y":2}, - {"label":"+", "x":18.5, "y":2}, - {"label":"Shift", "x":0, "y":3, "w":1.25}, - {"label":"Shift", "x":1.25, "y":3}, - {"label":"Z", "x":2.25, "y":3}, - {"label":"X", "x":3.25, "y":3}, - {"label":"C", "x":4.25, "y":3}, - {"label":"V", "x":5.25, "y":3}, - {"label":"B", "x":6.25, "y":3}, - {"label":"N", "x":7.25, "y":3}, - {"label":"M", "x":8.25, "y":3}, - {"label":"<", "x":9.25, "y":3}, - {"label":">", "x":10.25, "y":3}, - {"label":"?", "x":11.25, "y":3}, - {"label":"Shift", "x":12.25, "y":3, "w":1.75}, - {"label":"Up", "x":14.25, "y":3.25}, - {"label":"1", "x":15.5, "y":3}, - {"label":"2", "x":16.5, "y":3}, - {"label":"3", "x":17.5, "y":3}, - {"label":"Enter", "x":18.5, "y":3}, - {"label":"Ctrl", "x":0, "y":4, "w":1.25}, - {"label":"Win", "x":1.25, "y":4, "w":1.25}, - {"label":"Alt", "x":2.5, "y":4, "w":1.25}, - {"label":"6.25x", "x":3.75, "y":4, "w":6.25}, - {"label":"Ctrl", "x":10, "y":4}, - {"label":"Win", "x":11, "y":4}, - {"label":"Alt", "x":12, "y":4}, - {"label":"Left", "x":13.25, "y":4.25}, - {"label":"Down", "x":14.25, "y":4.25}, - {"label":"Right", "x":15.25, "y":4.25}, - {"label":"0", "x":16.5, "y":4}, - {"label":".", "x":17.5, "y":4}, - {"label":"Enter", "x":18.5, "y":4} - ] - } - } -} diff --git a/keyboards/handwired/p1800fl/keymaps/default/keymap.c b/keyboards/handwired/p1800fl/keymaps/default/keymap.c deleted file mode 100644 index 03b6a1efd..000000000 --- a/keyboards/handwired/p1800fl/keymaps/default/keymap.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2020 marhalloweenvt - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -// Defines names for use in layer keycodes and the keymap -enum layer_names { - _BASE, - _FN -}; - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base */ - [_BASE] = LAYOUT( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PEQL, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), - [_FN] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, BL_TOGG, BL_INC, KC_PAST, RESET, - _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, BL_BRTG, BL_DEC, _______, EEP_RST, - _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______ - ) -}; diff --git a/keyboards/handwired/p1800fl/readme.md b/keyboards/handwired/p1800fl/readme.md deleted file mode 100644 index 545bd691a..000000000 --- a/keyboards/handwired/p1800fl/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# p1800fl - -![p1800fl](https://i.imgur.com/GQd28rN.jpg) - -A 1800 Frow-less keyboard project from our local makers. - -* Keyboard Maintainer: [marhalloweenvt](https://github.com/marhalloweenvt) -* Hardware Supported: p1800fl -* Hardware Availability: p1800fl - -Make example for this keyboard (after setting up your build environment): - - make handwired/p1800fl:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/p1800fl/rules.mk b/keyboards/handwired/p1800fl/rules.mk deleted file mode 100644 index cde197a0d..000000000 --- a/keyboards/handwired/p1800fl/rules.mk +++ /dev/null @@ -1,30 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = qmk-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = full # 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 = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/p65rgb/config.h b/keyboards/handwired/p65rgb/config.h index c50fc2826..142d3c03e 100644 --- a/keyboards/handwired/p65rgb/config.h +++ b/keyboards/handwired/p65rgb/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define RGB_DI_PIN B4 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_LED_PROCESS_LIMIT 4 diff --git a/keyboards/handwired/p65rgb/rules.mk b/keyboards/handwired/p65rgb/rules.mk index 00d15f090..f20ccbcde 100644 --- a/keyboards/handwired/p65rgb/rules.mk +++ b/keyboards/handwired/p65rgb/rules.mk @@ -2,19 +2,12 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -27,6 +20,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 +LTO_ENABLE = yes diff --git a/keyboards/handwired/pilcrow/keymaps/default/rules.mk b/keyboards/handwired/pilcrow/keymaps/default/rules.mk index 3955a3ff4..b89249d93 100644 --- a/keyboards/handwired/pilcrow/keymaps/default/rules.mk +++ b/keyboards/handwired/pilcrow/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/handwired/pilcrow/rules.mk b/keyboards/handwired/pilcrow/rules.mk index b5e96d74b..77f39e3ce 100644 --- a/keyboards/handwired/pilcrow/rules.mk +++ b/keyboards/handwired/pilcrow/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/pill60/keymaps/default/keymap.c b/keyboards/handwired/pill60/keymaps/default/keymap.c index 55996c018..00f506bb4 100644 --- a/keyboards/handwired/pill60/keymaps/default/keymap.c +++ b/keyboards/handwired/pill60/keymaps/default/keymap.c @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_oled(void) { oled_write_P(PSTR("Pill60"), false); diff --git a/keyboards/handwired/pill60/rules.mk b/keyboards/handwired/pill60/rules.mk index 7658a814d..1ab034be3 100644 --- a/keyboards/handwired/pill60/rules.mk +++ b/keyboards/handwired/pill60/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -15,7 +15,8 @@ BACKLIGHT_DRIVER = software RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes DEFAULT_FOLDER = handwired/pill60/bluepill diff --git a/keyboards/handwired/postageboard/mini/rules.mk b/keyboards/handwired/postageboard/mini/rules.mk index 824b47d6f..ea7c28f80 100644 --- a/keyboards/handwired/postageboard/mini/rules.mk +++ b/keyboards/handwired/postageboard/mini/rules.mk @@ -11,7 +11,7 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,6 +22,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/postageboard/r1/rules.mk b/keyboards/handwired/postageboard/r1/rules.mk index 824b47d6f..ea7c28f80 100644 --- a/keyboards/handwired/postageboard/r1/rules.mk +++ b/keyboards/handwired/postageboard/r1/rules.mk @@ -11,7 +11,7 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,6 +22,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/prime_exl/keymaps/via/keymap.c b/keyboards/handwired/prime_exl/keymaps/via/keymap.c index 1b62d25ba..c707e8a20 100644 --- a/keyboards/handwired/prime_exl/keymaps/via/keymap.c +++ b/keyboards/handwired/prime_exl/keymaps/via/keymap.c @@ -90,7 +90,7 @@ void led_set_user(uint8_t usb_led) { } //function for layer indicator LED -uint32_t layer_state_set_user(uint32_t state) +layer_state_t layer_state_set_user(layer_state_t state) { if (biton32(state) == 1) { writePinHigh(C6); diff --git a/keyboards/handwired/prime_exl/rules.mk b/keyboards/handwired/prime_exl/rules.mk index c3e319a13..988d681b9 100644 --- a/keyboards/handwired/prime_exl/rules.mk +++ b/keyboards/handwired/prime_exl/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/prime_exl_plus/rules.mk b/keyboards/handwired/prime_exl_plus/rules.mk index 0a3654309..7cb0cb0cd 100644 --- a/keyboards/handwired/prime_exl_plus/rules.mk +++ b/keyboards/handwired/prime_exl_plus/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/prkl30/feather/rules.mk b/keyboards/handwired/prkl30/feather/rules.mk index 366e53cf7..df6bafa69 100644 --- a/keyboards/handwired/prkl30/feather/rules.mk +++ b/keyboards/handwired/prkl30/feather/rules.mk @@ -18,7 +18,7 @@ BOOTLOADER = caterina # change yes to no to disable # BLUETOOTH = AdafruitBLE -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite ENCODER_ENABLE = yes MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control diff --git a/keyboards/handwired/prkl30/promicro/rules.mk b/keyboards/handwired/prkl30/promicro/rules.mk index aa303a4bf..a3f1dc9e0 100644 --- a/keyboards/handwired/prkl30/promicro/rules.mk +++ b/keyboards/handwired/prkl30/promicro/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 = no # Enable Bootmagic Lite ENCODER_ENABLE = yes MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index ba2c25ea1..48eb39f72 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -20,23 +20,26 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x17EF // Lenovo +#define VENDOR_ID 0x17EF // Lenovo //#define PRODUCT_ID 0x6009 // ThinkPad Keyboard with TrackPoint //#define PRODUCT_ID 0x6047 // ThinkPad Compact USB Keyboard with TrackPoint -#define PRODUCT_ID 0x6048 // ThinkPad Compact Bluetooth Keyboard with TrackPoint +#define PRODUCT_ID 0x6048 // ThinkPad Compact Bluetooth Keyboard with TrackPoint //#define PRODUCT_ID 0x6067 // ThinkPad Pro Docking Station -#define DEVICE_VER 0x0001 -#define MANUFACTURER Priyadi -#define PRODUCT Promethium Keyboard +#define DEVICE_VER 0x0001 +#define MANUFACTURER Priyadi +#define PRODUCT Promethium Keyboard /* key matrix size */ -#define MATRIX_COLS 6 -#define MATRIX_ROWS 9 +#define MATRIX_COLS 6 +#define MATRIX_ROWS 9 /* default pin-out */ -#define MATRIX_COL_PINS { F4, F1, F0, D6, D0, D1 } -#define MATRIX_ROW_PINS { F5, F6, F7 } -#define TRACKPOINT_PINS { B7, B6, D7 } +#define MATRIX_COL_PINS \ + { F4, F1, F0, D6, D0, D1 } +#define MATRIX_ROW_PINS \ + { F5, F6, F7, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } +#define TRACKPOINT_PINS \ + { B7, B6, D7 } #define UNUSED_PINS /* @@ -48,15 +51,15 @@ along with this program. If not, see . * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * -*/ -#define DIODE_DIRECTION COL2ROW + */ +#define DIODE_DIRECTION COL2ROW // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -90,9 +93,7 @@ along with this program. If not, see . //#define FORCE_NKRO /* key combination for command */ -#define IS_COMMAND() ( \ - get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \ -) +#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL))) /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true @@ -149,178 +150,178 @@ along with this program. If not, see . //#define NO_ACTION_FUNCTION #define PS2_MOUSE_INIT_DELAY 2000 -#define BATTERY_POLL 30000 -#define MAX_VOLTAGE 4.2 -#define MIN_VOLTAGE 3.2 +#define BATTERY_POLL 30000 +#define MAX_VOLTAGE 4.2 +#define MIN_VOLTAGE 3.2 -#ifndef __ASSEMBLER__ // assembler doesn't like enum in .h file +#ifndef __ASSEMBLER__ // assembler doesn't like enum in .h file enum led_sequence { - LED_IND_LINUX, - LED_IND_APPLE, - LED_IND_WINDOWS, - LED_IND_QWERTY, - LED_IND_ALT, - LED_IND_AUDIO, - LED_IND_BLUETOOTH, - LED_IND_USB, + LED_IND_LINUX, + LED_IND_APPLE, + LED_IND_WINDOWS, + LED_IND_QWERTY, + LED_IND_ALT, + LED_IND_AUDIO, + LED_IND_BLUETOOTH, + LED_IND_USB, - LED_IND_BATTERY, - LED_IND_CAPSLOCK, - LED_IND_GUI, - LED_IND_FUN, - LED_IND_NUM, - LED_IND_PUNC, - LED_IND_EMOJI, - LED_IND_GREEK, + LED_IND_BATTERY, + LED_IND_CAPSLOCK, + LED_IND_GUI, + LED_IND_FUN, + LED_IND_NUM, + LED_IND_PUNC, + LED_IND_EMOJI, + LED_IND_GREEK, - LED_BKSP, - LED_ENT, - LED_RSFT, - LED_RCTL, + LED_BKSP, + LED_ENT, + LED_RSFT, + LED_RCTL, - LED_RALT, - LED_SLSH, - LED_SCLN, - LED_P, + LED_RALT, + LED_SLSH, + LED_SCLN, + LED_P, - LED_O, - LED_L, - LED_DOT, - LED_RGUI, + LED_O, + LED_L, + LED_DOT, + LED_RGUI, - LED_GREEK, - LED_COMM, - LED_K, - LED_I, + LED_GREEK, + LED_COMM, + LED_K, + LED_I, - LED_U, - LED_J, - LED_M, - LED_FUN, + LED_U, + LED_J, + LED_M, + LED_FUN, - LED_RSPC, - LED_N, - LED_HH, - LED_Y, + LED_RSPC, + LED_N, + LED_HH, + LED_Y, - LED_TRACKPOINT3, - LED_TRACKPOINT2, - LED_TRACKPOINT1, + LED_TRACKPOINT3, + LED_TRACKPOINT2, + LED_TRACKPOINT1, - LED_T, - LED_G, - LED_B, - LED_LSPC, + LED_T, + LED_G, + LED_B, + LED_LSPC, - LED_NUM, - LED_V, - LED_F, - LED_R, + LED_NUM, + LED_V, + LED_F, + LED_R, - LED_E, - LED_D, - LED_C, - LED_EMPTY, + LED_E, + LED_D, + LED_C, + LED_EMPTY, - LED_LGUI, - LED_X, - LED_S, - LED_W, + LED_LGUI, + LED_X, + LED_S, + LED_W, - LED_Q, - LED_A, - LED_Z, - LED_LALT, + LED_Q, + LED_A, + LED_Z, + LED_LALT, - LED_LCTL, - LED_LSFT, - LED_ESC, - LED_TAB, + LED_LCTL, + LED_LSFT, + LED_ESC, + LED_TAB, - LED_TOTAL + LED_TOTAL }; -#define RGB_DI_PIN B5 -#define RGBSPS_NUM LED_TOTAL +# define RGB_DI_PIN B5 +# define RGBSPS_NUM LED_TOTAL #endif /* PS/2 mouse */ #ifdef PS2_USE_BUSYWAIT -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 3 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 +# define PS2_CLOCK_PORT PORTD +# define PS2_CLOCK_PIN PIND +# define PS2_CLOCK_DDR DDRD +# define PS2_CLOCK_BIT 3 +# define PS2_DATA_PORT PORTD +# define PS2_DATA_PIN PIND +# define PS2_DATA_DDR DDRD +# define PS2_DATA_BIT 2 #endif /* PS/2 mouse interrupt version */ #ifdef PS2_USE_INT /* uses INT1 for clock line(ATMega32U4) */ -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 3 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 2 +# define PS2_CLOCK_PORT PORTD +# define PS2_CLOCK_PIN PIND +# define PS2_CLOCK_DDR DDRD +# define PS2_CLOCK_BIT 3 +# define PS2_DATA_PORT PORTD +# define PS2_DATA_PIN PIND +# define PS2_DATA_DDR DDRD +# define PS2_DATA_BIT 2 -#define PS2_INT_INIT() do { \ - EICRA |= ((1<. #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/sick68/rules.mk b/keyboards/handwired/sick68/rules.mk index c74742abd..660d8c4bc 100644 --- a/keyboards/handwired/sick68/rules.mk +++ b/keyboards/handwired/sick68/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/sick_pad/rules.mk b/keyboards/handwired/sick_pad/rules.mk index 4fe7d9aff..9d49c0155 100644 --- a/keyboards/handwired/sick_pad/rules.mk +++ b/keyboards/handwired/sick_pad/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/slash/rules.mk b/keyboards/handwired/slash/rules.mk index 9726e7144..29af1e54d 100644 --- a/keyboards/handwired/slash/rules.mk +++ b/keyboards/handwired/slash/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode #BLUETOOTH_ENABLE = Yes # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH = AdafruitBLE diff --git a/keyboards/handwired/sono1/rules.mk b/keyboards/handwired/sono1/rules.mk index 558598d74..b98666291 100644 --- a/keyboards/handwired/sono1/rules.mk +++ b/keyboards/handwired/sono1/rules.mk @@ -10,7 +10,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/space_oddity/rules.mk b/keyboards/handwired/space_oddity/rules.mk index 97f9cfd80..2d500143f 100644 --- a/keyboards/handwired/space_oddity/rules.mk +++ b/keyboards/handwired/space_oddity/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/handwired/split89/rules.mk b/keyboards/handwired/split89/rules.mk index 9b916f556..2b0933d53 100644 --- a/keyboards/handwired/split89/rules.mk +++ b/keyboards/handwired/split89/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/splittest/rules.mk b/keyboards/handwired/splittest/rules.mk index 2aa484db0..22df34eea 100644 --- a/keyboards/handwired/splittest/rules.mk +++ b/keyboards/handwired/splittest/rules.mk @@ -2,14 +2,13 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/handwired/steamvan/rev1/rules.mk b/keyboards/handwired/steamvan/rev1/rules.mk index 99edf7c17..e0ddc06f5 100644 --- a/keyboards/handwired/steamvan/rev1/rules.mk +++ b/keyboards/handwired/steamvan/rev1/rules.mk @@ -12,7 +12,7 @@ WS2812_DRIVER = spi # comment out to disable the options. # BACKLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -20,7 +20,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID LEADER_ENABLE = yes diff --git a/keyboards/handwired/sticc14/config.h b/keyboards/handwired/sticc14/config.h index effec0467..fbe420b57 100644 --- a/keyboards/handwired/sticc14/config.h +++ b/keyboards/handwired/sticc14/config.h @@ -192,26 +192,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/sticc14/rules.mk b/keyboards/handwired/sticc14/rules.mk index 60ef8b9e5..8973a9b39 100644 --- a/keyboards/handwired/sticc14/rules.mk +++ b/keyboards/handwired/sticc14/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/stream_cheap/2x3/rules.mk b/keyboards/handwired/stream_cheap/2x3/rules.mk index 2d79fa435..58ee686dc 100644 --- a/keyboards/handwired/stream_cheap/2x3/rules.mk +++ b/keyboards/handwired/stream_cheap/2x3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/stream_cheap/2x4/config.h b/keyboards/handwired/stream_cheap/2x4/config.h index eb6fcbce1..432f23c7d 100644 --- a/keyboards/handwired/stream_cheap/2x4/config.h +++ b/keyboards/handwired/stream_cheap/2x4/config.h @@ -3,18 +3,21 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x7363 // Stream Cheap -#define PRODUCT_ID 0x1214 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Stream Cheap -#define PRODUCT 2x4 +#define VENDOR_ID 0x7363 // Stream Cheap +#define PRODUCT_ID 0x1214 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Stream Cheap +#define PRODUCT 2x4 /* key matrix size */ #define MATRIX_ROWS 2 #define MATRIX_COLS 4 /* define direct pins used */ -#define DIRECT_PINS { { D1,D0,D4,C6}, { D7,E6,B4,B5} } +#define DIRECT_PINS \ + { \ + {D1, D0, D4, C6}, { D7, E6, B4, B5 } \ + } /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/handwired/stream_cheap/2x4/keymaps/via/keymap.c b/keyboards/handwired/stream_cheap/2x4/keymaps/via/keymap.c index 7f952a7bd..8824e2145 100644 --- a/keyboards/handwired/stream_cheap/2x4/keymaps/via/keymap.c +++ b/keyboards/handwired/stream_cheap/2x4/keymaps/via/keymap.c @@ -1,43 +1,21 @@ /* Copyright 2021 Matthias Liffers - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #include QMK_KEYBOARD_H -enum layers { - NORMAL_LAYER, - SECOND_LAYER, - THIRD_LAYER, - FOURTH_LAYER -}; +enum layers { NORMAL_LAYER, SECOND_LAYER, THIRD_LAYER, FOURTH_LAYER }; -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [NORMAL_LAYER] = LAYOUT_ortho_2x4( - KC_A, KC_A, KC_A, TO(3), - KC_A, KC_A, KC_A, TO(1) - ), - [SECOND_LAYER] = LAYOUT_ortho_2x4( - KC_B, KC_B, KC_B, TO(0), - KC_B, KC_B, KC_B, TO(2) - ), - [THIRD_LAYER] = LAYOUT_ortho_2x4( - KC_C, KC_C, KC_C, TO(1), - KC_C, KC_C, KC_C, TO(3) - ), - [FOURTH_LAYER] = LAYOUT_ortho_2x4( - KC_D, KC_D, KC_D, TO(2), - KC_D, KC_D, KC_D, TO(0) - ) -}; +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[NORMAL_LAYER] = LAYOUT_ortho_2x4(KC_A, KC_A, KC_A, TO(3), KC_A, KC_A, KC_A, TO(1)), [SECOND_LAYER] = LAYOUT_ortho_2x4(KC_B, KC_B, KC_B, TO(0), KC_B, KC_B, KC_B, TO(2)), [THIRD_LAYER] = LAYOUT_ortho_2x4(KC_C, KC_C, KC_C, TO(1), KC_C, KC_C, KC_C, TO(3)), [FOURTH_LAYER] = LAYOUT_ortho_2x4(KC_D, KC_D, KC_D, TO(2), KC_D, KC_D, KC_D, TO(0))}; diff --git a/keyboards/handwired/stream_cheap/2x4/keymaps/via/stream_cheap_2x4.json b/keyboards/handwired/stream_cheap/2x4/keymaps/via/stream_cheap_2x4.json new file mode 100644 index 000000000..78f41b174 --- /dev/null +++ b/keyboards/handwired/stream_cheap/2x4/keymaps/via/stream_cheap_2x4.json @@ -0,0 +1,24 @@ +{ + "name": "Stream Cheap 2x4", + "vendorId": "0x7363", + "productId": "0x3032", + "lighting": "none", + "matrix": {"rows": 2, "cols": 4}, + "layouts": { + "keymap": [ + {"name": "Stream Cheap 2x4"}, + [ + "0,0", + "0,1", + "0,2", + "0,3" + ], + [ + "1,0", + "1,1", + "1,2", + "1,3" + ] + ] + } +} diff --git a/keyboards/handwired/stream_cheap/2x4/rules.mk b/keyboards/handwired/stream_cheap/2x4/rules.mk index e4ffb10d0..75ba55e53 100644 --- a/keyboards/handwired/stream_cheap/2x4/rules.mk +++ b/keyboards/handwired/stream_cheap/2x4/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -20,3 +20,4 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes # Enable optimizations diff --git a/keyboards/handwired/stream_cheap/2x5/rules.mk b/keyboards/handwired/stream_cheap/2x5/rules.mk index e4ffb10d0..f0e9a7a83 100644 --- a/keyboards/handwired/stream_cheap/2x5/rules.mk +++ b/keyboards/handwired/stream_cheap/2x5/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/stream_cheap/readme.md b/keyboards/handwired/stream_cheap/readme.md index 1b4d77ea9..4343e2312 100644 --- a/keyboards/handwired/stream_cheap/readme.md +++ b/keyboards/handwired/stream_cheap/readme.md @@ -18,6 +18,7 @@ Make example for this keyboard (after setting up your build environment): make handwired/stream_cheap/2x3:default make handwired/stream_cheap/2x4:default + make handwired/stream_cheap/2x4:via make handwired/stream_cheap/2x5:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/swiftrax/astro65/config.h b/keyboards/handwired/swiftrax/astro65/config.h index 84cc9b53c..6f77ba200 100644 --- a/keyboards/handwired/swiftrax/astro65/config.h +++ b/keyboards/handwired/swiftrax/astro65/config.h @@ -26,13 +26,15 @@ along with this program. If not, see . #define MANUFACTURER Swiftrax #define PRODUCT Astro65 /* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 16 +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 // ROWS: Top to bottom, COLS: Left to right -#define MATRIX_ROW_PINS { B0, B3, F7, B1, B2 } -#define MATRIX_COL_PINS { E6, D5, C7, C6, B6, B5, B4, D7, D6, D4, F0, F1, F4, F5, F6 } +#define MATRIX_ROW_PINS \ + { B0, B3, F7, B1, B2 } +#define MATRIX_COL_PINS \ + { E6, D5, D3, D4, D6, D7, B4, B5, B6, C6, C7, F6, F5, F4, F1, F0 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/swiftrax/astro65/rules.mk b/keyboards/handwired/swiftrax/astro65/rules.mk index 1a5f11e31..3d76b0f3f 100644 --- a/keyboards/handwired/swiftrax/astro65/rules.mk +++ b/keyboards/handwired/swiftrax/astro65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/bebol/rules.mk b/keyboards/handwired/swiftrax/bebol/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/handwired/swiftrax/bebol/rules.mk +++ b/keyboards/handwired/swiftrax/bebol/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/beegboy/rules.mk b/keyboards/handwired/swiftrax/beegboy/rules.mk index eefa7d85e..8b0ddc7a8 100644 --- a/keyboards/handwired/swiftrax/beegboy/rules.mk +++ b/keyboards/handwired/swiftrax/beegboy/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/cowfish/rules.mk b/keyboards/handwired/swiftrax/cowfish/rules.mk index aed5553f6..1b98d920d 100644 --- a/keyboards/handwired/swiftrax/cowfish/rules.mk +++ b/keyboards/handwired/swiftrax/cowfish/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/swiftrax/equator/rules.mk b/keyboards/handwired/swiftrax/equator/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/handwired/swiftrax/equator/rules.mk +++ b/keyboards/handwired/swiftrax/equator/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/joypad/rules.mk b/keyboards/handwired/swiftrax/joypad/rules.mk index c86285502..2025632b1 100644 --- a/keyboards/handwired/swiftrax/joypad/rules.mk +++ b/keyboards/handwired/swiftrax/joypad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/koalafications/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/koalafications/keymaps/default/keymap.c index 31437a041..e702c1899 100644 --- a/keyboards/handwired/swiftrax/koalafications/keymaps/default/keymap.c +++ b/keyboards/handwired/swiftrax/koalafications/keymaps/default/keymap.c @@ -25,14 +25,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [1] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), [2] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; @@ -60,36 +60,36 @@ static void render_anim(void){ static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 48, 48, 16, 0, 0, 24, 60, 60, 24, 0, 0,248, 4, 4, 12, 16, 96, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 48, 48, 16, 0, 0, 24, 60, 60, 24, 0, 0,248, 4, 4, 12, 16, 96, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, 64, }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 56, 56, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 56, 56, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18,130, 71, 24, 32, 32, 32, 32, 16, 12, 4, 36, 36, 68, 68, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, 64, }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 16, 16, 16, 16, 0, 0, 8, 8, 8, 8, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 16, 16, 16, 16, 0, 0, 8, 8, 8, 8, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 17, 17, 9, 9, 9,193, 39, 8, 16, 16, 16, 16, 8, 36, 66,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18,146, 71, 24, 32, 32, 32, 32, 16, 12, 4, 36, 36, 68, 68, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, 64, }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 32, 32, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 32, 32, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 16, 16, 16, 16, 8, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 24, 32, 32, 32, 32, 16, 12, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, 64, }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 8, 24, 24, 8, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 8, 24, 24, 8, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 16, 16, 16, 16, 8, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 24, 32, 32, 32, 32, 16, 12, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, 64, } @@ -106,7 +106,7 @@ static void render_anim(void){ animation_phase(); } anim_sleep = timer_read32(); - } + } else { if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) oled_off(); @@ -122,4 +122,4 @@ static void render_anim(void){ void oled_task_user(void) { render_anim(); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/handwired/swiftrax/koalafications/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/koalafications/keymaps/via/keymap.c index bf64c6d03..973b36bff 100644 --- a/keyboards/handwired/swiftrax/koalafications/keymaps/via/keymap.c +++ b/keyboards/handwired/swiftrax/koalafications/keymaps/via/keymap.c @@ -25,14 +25,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_UP , KC_END , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [1] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), [2] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; @@ -60,36 +60,36 @@ static void render_anim(void){ static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 8, 24, 24, 8, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 8, 24, 24, 8, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 16, 16, 16, 16, 8, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 24, 32, 32, 32, 32, 16, 12, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, 64, }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 32, 32, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 32, 32, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 16, 16, 16, 16, 8, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 24, 32, 32, 32, 32, 16, 12, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, 64, }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 16, 16, 16, 16, 0, 0, 8, 8, 8, 8, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 16, 16, 16, 16, 0, 0, 8, 8, 8, 8, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 17, 17, 9, 9, 9,193, 39, 8, 16, 16, 16, 16, 8, 36, 66,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18,146, 71, 24, 32, 32, 32, 32, 16, 12, 4, 36, 36, 68, 68, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, 64, }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 56, 56, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 56, 56, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18,130, 71, 24, 32, 32, 32, 32, 16, 12, 4, 36, 36, 68, 68, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, 64, }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 48, 48, 16, 0, 0, 24, 60, 60, 24, 0, 0,248, 4, 4, 12, 16, 96, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 48, 48, 16, 0, 0, 24, 60, 60, 24, 0, 0,248, 4, 4, 12, 16, 96, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, 64, } @@ -106,7 +106,7 @@ static void render_anim(void){ animation_phase(); } anim_sleep = timer_read32(); - } + } else { if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) oled_off(); @@ -122,4 +122,4 @@ static void render_anim(void){ void oled_task_user(void) { render_anim(); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/handwired/swiftrax/koalafications/rules.mk b/keyboards/handwired/swiftrax/koalafications/rules.mk index ff3041267..bd8cd8012 100644 --- a/keyboards/handwired/swiftrax/koalafications/rules.mk +++ b/keyboards/handwired/swiftrax/koalafications/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -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 -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 WPM_ENABLE = yes diff --git a/keyboards/handwired/swiftrax/nodu/rules.mk b/keyboards/handwired/swiftrax/nodu/rules.mk index f4b86c599..a2e4da3da 100644 --- a/keyboards/handwired/swiftrax/nodu/rules.mk +++ b/keyboards/handwired/swiftrax/nodu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/pandamic/rules.mk b/keyboards/handwired/swiftrax/pandamic/rules.mk index f83e0a1fd..61501d8c2 100644 --- a/keyboards/handwired/swiftrax/pandamic/rules.mk +++ b/keyboards/handwired/swiftrax/pandamic/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/the_galleon/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/the_galleon/keymaps/default/keymap.c index 8c9f69683..efa8c2703 100644 --- a/keyboards/handwired/swiftrax/the_galleon/keymaps/default/keymap.c +++ b/keyboards/handwired/swiftrax/the_galleon/keymaps/default/keymap.c @@ -18,32 +18,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( - KC_MUTE, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_MPRV, KC_VOLU, KC_VOLD, KC_MNXT, - 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_HOME, KC_PGUP, KC_PGDN, KC_END, - 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + KC_MUTE, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_MPRV, KC_VOLU, KC_VOLD, KC_MNXT, + 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_HOME, KC_PGUP, KC_PGDN, KC_END, + 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), [1] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), [2] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; @@ -63,14 +63,14 @@ static void render_anim(void){ static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 12, 56,224,128, 0,128,128,192,192,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,128, 0, 8, 48, 64, 0, 24,224, 0, 0, 0,192, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64,255,255,255,255,255,255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,132, 72, 72, 8,192,225,242,248,252,252,252,252,248,240,225,192, 4, 2, 34, 18, 9, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 24, 14, 3, 28,112,255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0,255,255,254,252,252,252,124, 62, 30, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 16, 16, 8,136, 64, 35, 7, 15,159, 63, 63, 63,191, 31, 15, 7, 3, 96,128, 2, 18, 33, 33, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64,255,255,255,255,255,255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,132, 72, 72, 8,192,225,242,248,252,252,252,252,248,240,225,192, 4, 2, 34, 18, 9, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 24, 14, 3, 28,112,255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0,255,255,254,252,252,252,124, 62, 30, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 16, 16, 8,136, 64, 35, 7, 15,159, 63, 63, 63,191, 31, 15, 7, 3, 96,128, 2, 18, 33, 33, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 96, 56, 8, 7, 3, 7, 7, 15, 15, 31,112, 0, 0, 0, 0, 0, 0, 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 2, 1, 0, 0, 0, 1, 6, 8, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 4, 8, 48,224,128, 0,128,128,192,192,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,128, 8, 48, 64, 0, 24,224, 0, 0, 0,192, 32, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 34, 34, 34, 68, 68, 4,192,225,242,248,252,252,252,252,248,241,224,192, 2, 1, 17, 9,132,132,132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 32, 16, 8, 20,114,255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0,127,255,254,252,124, 60, 28, 30, 14, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 4,132, 64, 35, 7,143, 31, 63, 63, 63, 63, 31, 15, 7, 3, 96,128, 1, 17, 32, 32, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 34, 34, 34, 68, 68, 4,192,225,242,248,252,252,252,252,248,241,224,192, 2, 1, 17, 9,132,132,132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 32, 16, 8, 20,114,255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0,127,255,254,252,124, 60, 28, 30, 14, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 4,132, 64, 35, 7,143, 31, 63, 63, 63, 63, 31, 15, 7, 3, 96,128, 1, 17, 32, 32, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127,131, 7, 7, 15, 15, 31,112, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 12, 2, 1, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, } }; @@ -86,7 +86,7 @@ static void render_anim(void){ animation_phase(); } anim_sleep = timer_read32(); - } + } else { if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) oled_off(); diff --git a/keyboards/handwired/swiftrax/the_galleon/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/the_galleon/keymaps/via/keymap.c index 8c9f69683..efa8c2703 100644 --- a/keyboards/handwired/swiftrax/the_galleon/keymaps/via/keymap.c +++ b/keyboards/handwired/swiftrax/the_galleon/keymaps/via/keymap.c @@ -18,32 +18,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( - KC_MUTE, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_MPRV, KC_VOLU, KC_VOLD, KC_MNXT, - 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_HOME, KC_PGUP, KC_PGDN, KC_END, - 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + KC_MUTE, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_MPRV, KC_VOLU, KC_VOLD, KC_MNXT, + 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_HOME, KC_PGUP, KC_PGDN, KC_END, + 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), [1] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), [2] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; @@ -63,14 +63,14 @@ static void render_anim(void){ static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 12, 56,224,128, 0,128,128,192,192,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,128, 0, 8, 48, 64, 0, 24,224, 0, 0, 0,192, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64,255,255,255,255,255,255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,132, 72, 72, 8,192,225,242,248,252,252,252,252,248,240,225,192, 4, 2, 34, 18, 9, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 24, 14, 3, 28,112,255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0,255,255,254,252,252,252,124, 62, 30, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 16, 16, 8,136, 64, 35, 7, 15,159, 63, 63, 63,191, 31, 15, 7, 3, 96,128, 2, 18, 33, 33, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64,255,255,255,255,255,255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,132, 72, 72, 8,192,225,242,248,252,252,252,252,248,240,225,192, 4, 2, 34, 18, 9, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 24, 14, 3, 28,112,255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0,255,255,254,252,252,252,124, 62, 30, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 16, 16, 8,136, 64, 35, 7, 15,159, 63, 63, 63,191, 31, 15, 7, 3, 96,128, 2, 18, 33, 33, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 96, 56, 8, 7, 3, 7, 7, 15, 15, 31,112, 0, 0, 0, 0, 0, 0, 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 2, 1, 0, 0, 0, 1, 6, 8, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 4, 4, 8, 48,224,128, 0,128,128,192,192,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,128, 8, 48, 64, 0, 24,224, 0, 0, 0,192, 32, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 34, 34, 34, 68, 68, 4,192,225,242,248,252,252,252,252,248,241,224,192, 2, 1, 17, 9,132,132,132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 32, 16, 8, 20,114,255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0,127,255,254,252,124, 60, 28, 30, 14, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 4,132, 64, 35, 7,143, 31, 63, 63, 63, 63, 31, 15, 7, 3, 96,128, 1, 17, 32, 32, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 34, 34, 34, 68, 68, 4,192,225,242,248,252,252,252,252,248,241,224,192, 2, 1, 17, 9,132,132,132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 32, 16, 8, 20,114,255,255,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0,127,255,254,252,124, 60, 28, 30, 14, 7, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 4,132, 64, 35, 7,143, 31, 63, 63, 63, 63, 31, 15, 7, 3, 96,128, 1, 17, 32, 32, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127,131, 7, 7, 15, 15, 31,112, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 12, 2, 1, 0, 0, 0, 0, 7, 8, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, } }; @@ -86,7 +86,7 @@ static void render_anim(void){ animation_phase(); } anim_sleep = timer_read32(); - } + } else { if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) oled_off(); diff --git a/keyboards/handwired/swiftrax/the_galleon/rules.mk b/keyboards/handwired/swiftrax/the_galleon/rules.mk index 58b70131e..2d8bf4d2c 100644 --- a/keyboards/handwired/swiftrax/the_galleon/rules.mk +++ b/keyboards/handwired/swiftrax/the_galleon/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,4 +21,5 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = no # Rotary Encoder -OLED_DRIVER_ENABLE = yes # I2C OLED +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # I2C OLED diff --git a/keyboards/handwired/swiftrax/unsplit/rules.mk b/keyboards/handwired/swiftrax/unsplit/rules.mk index dc796be5e..a6f39b141 100644 --- a/keyboards/handwired/swiftrax/unsplit/rules.mk +++ b/keyboards/handwired/swiftrax/unsplit/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/walter/rules.mk b/keyboards/handwired/swiftrax/walter/rules.mk index 89bd1be0a..c497c3247 100644 --- a/keyboards/handwired/swiftrax/walter/rules.mk +++ b/keyboards/handwired/swiftrax/walter/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c index c84efe291..ba0018a70 100644 --- a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c +++ b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c @@ -32,7 +32,7 @@ along with this program. If not, see . # define MATRIX_DEBUG_DELAY_END() # define MATRIX_DEBUG_GAP() #else -# define MATRIX_DEBUG_GAP() asm volatile("nop \n nop":::"memory") +# define MATRIX_DEBUG_GAP() asm volatile("nop \n nop" ::: "memory") #endif #ifndef MATRIX_IO_DELAY_ALWAYS @@ -44,16 +44,16 @@ static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; #elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; -# ifdef MATRIX_MUL_SELECT -static const pin_t col_sel[MATRIX_COLS] = MATRIX_MUL_SEL; -# endif +# ifdef MATRIX_MUL_SELECT +static const pin_t col_sel[MATRIX_COLS] = MATRIX_MUL_SEL; +# endif #endif #ifdef MATRIX_IO_DELAY_PORTS -static const pin_t delay_ports[] = { MATRIX_IO_DELAY_PORTS }; -static const port_data_t delay_masks[] = { MATRIX_IO_DELAY_MASKS }; +static const pin_t delay_ports[] = {MATRIX_IO_DELAY_PORTS}; +static const port_data_t delay_masks[] = {MATRIX_IO_DELAY_MASKS}; # ifdef MATRIX_IO_DELAY_MULSEL -static const uint8_t delay_sel[] = { MATRIX_IO_DELAY_MULSEL }; +static const uint8_t delay_sel[] = {MATRIX_IO_DELAY_MULSEL}; # endif #endif @@ -120,10 +120,10 @@ static void unselect_rows(void) { } static void init_pins(void) { -#ifdef MATRIX_MUL_SELECT +# ifdef MATRIX_MUL_SELECT setPinOutput(MATRIX_MUL_SELECT); writePinLow(MATRIX_MUL_SELECT); -#endif +# endif unselect_rows(); for (uint8_t x = 0; x < MATRIX_COLS; x++) { setPinInputHigh_atomic(col_pins[x]); @@ -141,10 +141,10 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // For each col... for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { // Select the col pin to read (active low) -#ifdef MATRIX_MUL_SELECT - writePin(MATRIX_MUL_SELECT,col_sel[col_index]); +# ifdef MATRIX_MUL_SELECT + writePin(MATRIX_MUL_SELECT, col_sel[col_index]); waitInputPinDelay(); -#endif +# endif uint8_t pin_state = readPin(col_pins[col_index]); // Populate the matrix row with the state of the col pin @@ -153,37 +153,38 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // Unselect row unselect_row(current_row); -#ifdef MATRIX_IO_DELAY_PORTS +# ifdef MATRIX_IO_DELAY_PORTS if (current_row_value) { // wait for col signal to go HIGH bool is_pressed; do { MATRIX_DEBUG_DELAY_START(); is_pressed = false; - for (uint8_t i = 0; i < sizeof(delay_ports)/sizeof(pin_t); i++ ) { -# ifdef MATRIX_IO_DELAY_MULSEL + for (uint8_t i = 0; i < sizeof(delay_ports) / sizeof(pin_t); i++) { +# ifdef MATRIX_IO_DELAY_MULSEL writePin(MATRIX_MUL_SELECT, delay_sel[i]); waitInputPinDelay(); -# endif - is_pressed |= ( (readPort(delay_ports[i]) & delay_masks[i]) != delay_masks[i] ); +# endif + is_pressed |= ((readPort(delay_ports[i]) & delay_masks[i]) != delay_masks[i]); } MATRIX_DEBUG_DELAY_END(); } while (is_pressed); } -#endif -#ifdef MATRIX_IO_DELAY_ADAPTIVE +# endif +# ifdef MATRIX_IO_DELAY_ADAPTIVE if (current_row_value) { // wait for col signal to go HIGH for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { MATRIX_DEBUG_DELAY_START(); -#ifdef MATRIX_MUL_SELECT - writePin(MATRIX_MUL_SELECT,col_sel[col_index]); +# ifdef MATRIX_MUL_SELECT + writePin(MATRIX_MUL_SELECT, col_sel[col_index]); waitInputPinDelay(); -#endif - while (readPin(col_pins[col_index]) == 0) {} +# endif + while (readPin(col_pins[col_index]) == 0) { + } MATRIX_DEBUG_DELAY_END(); } } -#endif -#ifdef MATRIX_IO_DELAY_ADAPTIVE2 +# endif +# ifdef MATRIX_IO_DELAY_ADAPTIVE2 if (current_row_value) { // wait for col signal to go HIGH pin_t state; do { @@ -192,19 +193,19 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { MATRIX_DEBUG_DELAY_END(); MATRIX_DEBUG_DELAY_START(); -#ifdef MATRIX_MUL_SELECT - writePin(MATRIX_MUL_SELECT,col_sel[col_index]); +# ifdef MATRIX_MUL_SELECT + writePin(MATRIX_MUL_SELECT, col_sel[col_index]); waitInputPinDelay(); -#endif +# endif state |= (readPin(col_pins[col_index]) == 0); } MATRIX_DEBUG_DELAY_END(); } while (state); } -#endif +# endif if (MATRIX_IO_DELAY_ALWAYS || current_row + 1 < MATRIX_ROWS) { MATRIX_DEBUG_DELAY_START(); - matrix_output_unselect_delay(); // wait for col signal to go HIGH + matrix_output_unselect_delay(current_row, current_row_value != 0); // wait for col signal to go HIGH MATRIX_DEBUG_DELAY_END(); } @@ -237,6 +238,7 @@ static void init_pins(void) { static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { bool matrix_changed = false; + bool key_pressed = false; // Select col select_col(current_col); @@ -252,6 +254,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) if (readPin(row_pins[row_index]) == 0) { // Pin LO, set col bit current_row_value |= (MATRIX_ROW_SHIFTER << current_col); + key_pressed = true; } else { // Pin HI, clear col bit current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col); @@ -267,7 +270,7 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) // Unselect col unselect_col(current_col); if (MATRIX_IO_DELAY_ALWAYS || current_col + 1 < MATRIX_COLS) { - matrix_output_unselect_delay(); // wait for col signal to go HIGH + matrix_output_unselect_delay(current_col, key_pressed); // wait for col signal to go HIGH } return matrix_changed; @@ -311,11 +314,13 @@ uint8_t matrix_scan(void) { changed |= read_rows_on_col(raw_matrix, current_col); } #endif - MATRIX_DEBUG_SCAN_END(); MATRIX_DEBUG_GAP(); + MATRIX_DEBUG_SCAN_END(); + MATRIX_DEBUG_GAP(); MATRIX_DEBUG_SCAN_START(); debounce(raw_matrix, matrix, MATRIX_ROWS, changed); - MATRIX_DEBUG_SCAN_END(); MATRIX_DEBUG_GAP(); + MATRIX_DEBUG_SCAN_END(); + MATRIX_DEBUG_GAP(); MATRIX_DEBUG_SCAN_START(); matrix_scan_quantum(); diff --git a/keyboards/handwired/symmetric70_proto/promicro/rules.mk b/keyboards/handwired/symmetric70_proto/promicro/rules.mk index 822b1a84d..ff631aa31 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/rules.mk +++ b/keyboards/handwired/symmetric70_proto/promicro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/symmetric70_proto/proton_c/proton_c.c b/keyboards/handwired/symmetric70_proto/proton_c/proton_c.c index 3fe5bc297..dfdc9d759 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/proton_c.c +++ b/keyboards/handwired/symmetric70_proto/proton_c/proton_c.c @@ -4,9 +4,9 @@ /* In tmk_core/common/wait.h, the implementation for PROTOCOL_CHIBIOS * calls 'chThdSleepMicroseconds(1)' when 'wait_us(0)'. * However, 'wait_us(0)' should do nothing. */ -void matrix_output_unselect_delay(void) { -# if !defined(MATRIX_IO_DELAY) || MATRIX_IO_DELAY > 0 +void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { +# if !defined(MATRIX_IO_DELAY) || MATRIX_IO_DELAY > 0 matrix_io_delay(); -# endif +# endif } #endif diff --git a/keyboards/handwired/symmetric70_proto/proton_c/rules.mk b/keyboards/handwired/symmetric70_proto/proton_c/rules.mk index e8b094846..b39c045c1 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/rules.mk +++ b/keyboards/handwired/symmetric70_proto/proton_c/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/symmetry60/rules.mk b/keyboards/handwired/symmetry60/rules.mk index f41c45fff..e5485b508 100644 --- a/keyboards/handwired/symmetry60/rules.mk +++ b/keyboards/handwired/symmetry60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/t111/rules.mk b/keyboards/handwired/t111/rules.mk index 558598d74..b98666291 100644 --- a/keyboards/handwired/t111/rules.mk +++ b/keyboards/handwired/t111/rules.mk @@ -10,7 +10,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/tennie/config.h b/keyboards/handwired/tennie/config.h index 90e9b720e..b1bddac45 100644 --- a/keyboards/handwired/tennie/config.h +++ b/keyboards/handwired/tennie/config.h @@ -42,7 +42,7 @@ along with this program. If not, see . */ #define MATRIX_ROW_PINS { C6, D4, D0} #define MATRIX_COL_PINS { D7, E6, B4, B5 } -#define UNUSED_PINS { B1, B2, B3, B6, F4, F5, F6, F7 D1} +#define UNUSED_PINS { B1, B2, B3, B6, F4, F5, F6, F7, D1} /* COL2ROW, ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -183,26 +183,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ //#define BOOTMAGIC_LITE_ROW 0 //#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/tennie/rules.mk b/keyboards/handwired/tennie/rules.mk index 0331d6400..b1918eecb 100644 --- a/keyboards/handwired/tennie/rules.mk +++ b/keyboards/handwired/tennie/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -25,7 +25,6 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/terminus_mini/config.h b/keyboards/handwired/terminus_mini/config.h index 25ea22f7a..c31cf7059 100644 --- a/keyboards/handwired/terminus_mini/config.h +++ b/keyboards/handwired/terminus_mini/config.h @@ -158,24 +158,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/handwired/terminus_mini/keymaps/default/rules.mk b/keyboards/handwired/terminus_mini/keymaps/default/rules.mk index a0c29684b..47eb7a721 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/rules.mk +++ b/keyboards/handwired/terminus_mini/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the rules.mk in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/handwired/terminus_mini/rules.mk b/keyboards/handwired/terminus_mini/rules.mk index 684da4cbb..77046efbd 100644 --- a/keyboards/handwired/terminus_mini/rules.mk +++ b/keyboards/handwired/terminus_mini/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -22,7 +22,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = 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 diff --git a/keyboards/handwired/trackpoint/rules.mk b/keyboards/handwired/trackpoint/rules.mk index 668b3bb1f..efaffe048 100644 --- a/keyboards/handwired/trackpoint/rules.mk +++ b/keyboards/handwired/trackpoint/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32u4 BOOTLOADER = halfkay -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -20,7 +20,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration 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 -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c new file mode 100644 index 000000000..7ea4d9747 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.c @@ -0,0 +1,67 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "4x6_right.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 24, 23, 18, 17, 10, 9 }, + { 25, 22, 19, 16, 11, 8 }, + { 26, 21, 20, 15, 12, 7 }, + { NO_LED, NO_LED, NO_LED, 14, 13, 6 }, + { NO_LED, NO_LED, NO_LED, 14, 13, 6 }, + { 51, 50, 45, 44, 37, 36 }, + { 52, 49, 46, 43, 38, 35 }, + { 53, 48, 47, 42, 39, 34 }, + { NO_LED, NO_LED, NO_LED, 41, 40, 33 }, + { NO_LED, NO_LED, NO_LED, 41, 40, 33 } +}, { + { 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, + { 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, + { 60, 55 }, { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, + { 16, 42 }, { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }, { 139, 16 }, + { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, { 139, 39 }, + { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, { 164, 55 }, + { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, { 208, 42 }, + { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 } +}, { + 2, 2, 2, 2, 2, 2, 1, + 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 1, 1, 1, 2, + 2, 2, 2, 2, 2, 1, 4, + 4, 4, 4, 4, 4, 1, 1, + 4, 4, 4, 4, 4, 4, 4, + 4, 4, 1, 1, 1 +} }; +#endif + +#ifdef SWAP_HANDS_ENABLE +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, + {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, + {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}}, + {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}}, + {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}}, + /* Right hand, matrix positions */ + {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, + {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, + {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, + {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, + {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}} +}; +#endif diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.h b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.h new file mode 100644 index 000000000..66b588078 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/4x6_right.h @@ -0,0 +1,47 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . + */ + +#pragma once + +#include "tractyl_manuform.h" +#include "quantum.h" + +#define ___ KC_NO + +// clang-format off +#define LAYOUT_4x6_right(\ + 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, \ + L32, L33, R32, R33, \ + L34, L35, R31, \ + L44, L45, R41, \ + L42, L43, R42, R43 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { ___, ___, L32, L33, L34, L35 }, \ + { ___, ___, L42, L43, L44, L45 }, \ + \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { ___, R31, R32, R33, ___, ___ }, \ + { ___, R41, R42, R43, ___, ___ } \ +} +// clang-format on diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/config.h b/keyboards/handwired/tractyl_manuform/4x6_right/config.h new file mode 100644 index 000000000..913a9f0aa --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/config.h @@ -0,0 +1,91 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +#define PRODUCT_ID 0x3537 +#define DEVICE_VER 0x0001 +#define PRODUCT Tractyl Manuform(4x6) + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_COL_PINS { C0, C1, C2, C3, C4, C5 } +#define MATRIX_ROW_PINS { A0, A1, A2, A3, A4 } + +#define DIODE_DIRECTION COL2ROW + +// WS2812 RGB LED strip input and number of LEDs +#define RGB_DI_PIN E7 +#define DRIVER_LED_TOTAL 62 +#define RGB_MATRIX_SPLIT { 32, 30 } +#define RGB_DISABLE_WHEN_USB_SUSPENDED +#define RGB_MATRIX_KEYPRESSES +// #define RGB_MATRIX_KEYRELEASES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 80 + +#define SPLIT_TRANSPORT_MIRROR +#define SPLIT_HAND_PIN A6 + + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +// #define DEBUG_LED_PIN D6 + +#define ROTATIONAL_TRANSFORM_ANGLE -25 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 +#define BOOTMAGIC_LITE_ROW_RIGHT 4 +#define BOOTMAGIC_LITE_COLUMN_RIGHT 5 + +#define AUDIO_PIN C6 +#define AUDIO_PIN_ALT B7 + +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095 +#define DYNAMIC_KEYMAP_LAYER_COUNT 16 +#define LAYER_STATE_16BIT + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D3 +#define EE_HANDS + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* PMW3360 Settings */ +#define PMW3360_CS_PIN B0 diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/info.json b/keyboards/handwired/tractyl_manuform/4x6_right/info.json new file mode 100644 index 000000000..03a570730 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/info.json @@ -0,0 +1,75 @@ +{ + "keyboard_name": "Tractyl Manuform 4x6", + "url": "", + "maintainer": "drashna", + "width": 17, + "height": 8, + "layouts": { + "LAYOUT_5x6_right": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"R00", "x":11, "y":0}, + {"label":"R01", "x":12, "y":0}, + {"label":"R02", "x":13, "y":0}, + {"label":"R03", "x":14, "y":0}, + {"label":"R04", "x":15, "y":0}, + {"label":"R05", "x":16, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"R10", "x":11, "y":1}, + {"label":"R11", "x":12, "y":1}, + {"label":"R12", "x":13, "y":1}, + {"label":"R13", "x":14, "y":1}, + {"label":"R14", "x":15, "y":1}, + {"label":"R15", "x":16, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"R20", "x":11, "y":2}, + {"label":"R21", "x":12, "y":2}, + {"label":"R22", "x":13, "y":2}, + {"label":"R23", "x":14, "y":2}, + {"label":"R24", "x":15, "y":2}, + {"label":"R25", "x":16, "y":2}, + {"label":"L30", "x":0, "y":3}, + {"label":"L31", "x":1, "y":3}, + {"label":"L32", "x":2, "y":3}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3}, + {"label":"L35", "x":5, "y":3}, + {"label":"R30", "x":11, "y":3}, + {"label":"R31", "x":12, "y":3}, + {"label":"R32", "x":13, "y":3}, + {"label":"R33", "x":14, "y":3}, + {"label":"R34", "x":15, "y":3}, + {"label":"R35", "x":16, "y":3}, + {"label":"L42", "x":2, "y":4}, + {"label":"L43", "x":3, "y":4}, + {"label":"R42", "x":13, "y":4}, + {"label":"R43", "x":14, "y":4}, + {"label":"L44", "x":4, "y":5}, + {"label":"L45", "x":5, "y":5}, + {"label":"R41", "x":12, "y":5}, + {"label":"L54", "x":6, "y":6}, + {"label":"L55", "x":7, "y":6}, + {"label":"R51", "x":10, "y":6}, + {"label":"L52", "x":6, "y":7}, + {"label":"L53", "x":7, "y":7}, + {"label":"R52", "x":9, "y":7}, + {"label":"R53", "x":10, "y":7} + ] + } + } +} diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/default/keymap.c b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/default/keymap.c new file mode 100644 index 000000000..d79f60b12 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/default/keymap.c @@ -0,0 +1,62 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 + +enum custom_layers { + _QWERTY, + _LOWER, + _RAISE, +}; + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_4x6_right( + 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_BSLASH, + KC_LBRC,KC_RBRC, KC_PLUS, KC_EQL, + RAISE, KC_SPC, LOWER, + KC_TAB, KC_HOME, KC_ENT, + KC_BSPC,KC_GRV, KC_LGUI,KC_DEL +), + +[_LOWER] = LAYOUT_4x6_right( + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7, KC_P8, KC_P9, RESET, KC_PLUS, + _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4, KC_P5, KC_P6, KC_MINS,KC_PIPE, + _______,_______,_______,_______,_______,_______, _______, KC_P1, KC_P2, KC_P3, KC_EQL, KC_UNDS, + _______,KC_PSCR, _______, KC_P0, + _______,_______, _______, + _______,_______, _______, + _______,_______, _______,_______ +), + +[_RAISE] = LAYOUT_4x6_right( + _______,RESET, _______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS, KC_SLCK,KC_MUTE, + _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, + _______,_______, KC_EQL ,_______, + _______,_______, _______, + _______,_______, _______, + _______,_______, _______,_______ +), +}; diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/config.h b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/config.h new file mode 100644 index 000000000..21bc8e616 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/config.h @@ -0,0 +1,36 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . + */ + +#pragma once + +// #define USE_I2C +// #define SELECT_SOFT_SERIAL_SPEED 1 +// #define SERIAL_USE_MULTI_TRANSACTION +#define SPLIT_MODS_ENABLE +#define EE_HANDS + +#define TRACKBALL_DPI_OPTIONS { 1200, 1800, 2600, 3400 } + +#define RGBLIGHT_MAX_BRIGHTNESS 60 + +#undef DEBOUNCE +#define DEBOUNCE 10 + +#define SOLENOID_PIN F1 +#define SOLENOID_DEFAULT_DWELL 8 + +#define OLED_DISPLAY_128X64 +#define OLED_BRIGHTNESS 50 diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c new file mode 100644 index 000000000..78a7db67a --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c @@ -0,0 +1,217 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "drashna.h" + +// clang-format off +#define LAYOUT_4x6_right_wrapper(...) LAYOUT_4x6_right(__VA_ARGS__) +#define LAYOUT_4x6_right_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_4x6_right_wrapper( \ + SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + OS_LGUI, OS_LALT, OS_RGUI, OS_RALT, \ + KC_PSCR, KC_GRV, MEH_T(KC_BTN3), \ + KC_SPC, OS_LGUI, KC_ENT, \ + BK_LWER, TT(_MOUSE), TT(_MOUSE), DL_RAIS \ + ) +#define LAYOUT_base_wrapper(...) LAYOUT_4x6_right_base(__VA_ARGS__) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_MOUSE] = LAYOUT_4x6_right( + _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, DPI_CONFIG, _______, + _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, _______, + _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______ + ), + [_GAMEPAD] = LAYOUT_4x6_right( + KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, + KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_H, _______, _______, _______, _______, _______, _______, + KC_I, KC_T, TG_GAME, KC_NO, + KC_V, KC_O, _______, + KC_SPC, KC_P, _______, + KC_H, KC_LGUI, _______, _______ + ), + [_DIABLO] = LAYOUT_4x6_right( + KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, _______, _______, _______, _______, _______, _______, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, _______, _______, _______, _______, _______, _______, + KC_F, KC_L, KC_NO, TG_DBLO, + KC_DIABLO_CLEAR, KC_F, _______, + SFT_T(KC_SPC), KC_J, _______, + ALT_T(KC_Q), KC_LGUI, _______, _______ + ), + [_LOWER] = LAYOUT_4x6_right_wrapper( + KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, + _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______ + ), + [_RAISE] = LAYOUT_4x6_right_wrapper( + KC_F12, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_F11, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______ + ), + [_ADJUST] = LAYOUT_4x6_right_wrapper( + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + UC_MOD, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, + HPT_DWLI, HPT_DWLD, TG_GAME, TG_DBLO, + HPT_TOG, HPT_BUZ, KC_NUKE, + _______, _______, _______, + _______, _______, KC_NUKE, _______ + ), +}; +// clang-format on + +#ifdef POINTING_DEVICE_ENABLE +static uint16_t mouse_timer = 0; +static uint16_t mouse_debounce_timer = 0; +static uint8_t mouse_keycode_tracker = 0; +bool tap_toggling = false; + +void process_mouse_user(report_mouse_t* mouse_report, int8_t x, int8_t y) { + if ((x || y) && timer_elapsed(mouse_timer) > 125) { + mouse_timer = timer_read(); + if (!layer_state_is(_MOUSE) && !(layer_state_is(_GAMEPAD) || layer_state_is(_DIABLO)) && timer_elapsed(mouse_debounce_timer) > 125) { + layer_on(_MOUSE); + } + } + +# ifdef TAPPING_TERM_PER_KEY + if (timer_elapsed(mouse_debounce_timer) > get_tapping_term(KC_BTN1, NULL) +# else + if (timer_elapsed(mouse_debounce_timer) > TAPPING_TERM +# endif + || (layer_state_is(_GAMEPAD) || layer_state_is(_DIABLO))) { + mouse_report->x = x; + mouse_report->y = y; + } +# ifdef OLED_ENABLE + if (x || y) oled_timer = timer_read32(); +# endif +} + +void matrix_scan_keymap(void) { + if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker && !tap_toggling) { + layer_off(_MOUSE); + } + if (tap_toggling) { + if (!layer_state_is(_MOUSE)) { + layer_on(_MOUSE); + } + } +} + +bool process_record_keymap(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case TT(_MOUSE): + { + if (record->event.pressed) { + mouse_keycode_tracker++; + } else { +# if TAPPING_TOGGLE != 0 + if (record->tap.count == TAPPING_TOGGLE) { + tap_toggling ^= 1; +# if TAPPING_TOGGLE == 1 + if (!tap_toggling) mouse_keycode_tracker -= record->tap.count + 1; +# else + if (!tap_toggling) mouse_keycode_tracker -= record->tap.count; +# endif + } else { + mouse_keycode_tracker--; + } +# endif + } + mouse_timer = timer_read(); + break; + } + case MO(_MOUSE): + case DPI_CONFIG: + case KC_MS_UP ... KC_MS_WH_RIGHT: + record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--; + mouse_timer = timer_read(); + break; + default: + if (layer_state_is(_MOUSE) && !mouse_keycode_tracker) { + layer_off(_MOUSE); + } + mouse_keycode_tracker = 0; + mouse_debounce_timer = timer_read(); + break; + } + return true; +} + +layer_state_t layer_state_set_keymap(layer_state_t state) { + if (layer_state_cmp(state, _GAMEPAD) || layer_state_cmp(state, _DIABLO)) { + state |= (1UL << _MOUSE); + } + return state; +} +#endif + +void matrix_init_keymap(void) { +#ifdef AUDIO_ENABLE + extern audio_config_t audio_config; + + if (!is_keyboard_master()) { + audio_stop_all(); + audio_config.enable = false; + } +#endif +} + +void keyboard_post_init_keymap(void) { matrix_init_keymap(); } diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/rules.mk b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/rules.mk new file mode 100644 index 000000000..7fef013a3 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/rules.mk @@ -0,0 +1,9 @@ +RGBLIGHT_STARTUP_ANIMATION = yes +AUDIO_ENABLE = yes +HAPTIC_ENABLE = no +COMMAND_ENABLE = no +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes +OLED_ENABLE = yes +WPM_ENABLE = yes +# DEBOUNCE_TYPE = sym_eager_pk diff --git a/keyboards/handwired/dactyl_manuform/5x6_right_trackball/readme.md b/keyboards/handwired/tractyl_manuform/4x6_right/readme.md similarity index 100% rename from keyboards/handwired/dactyl_manuform/5x6_right_trackball/readme.md rename to keyboards/handwired/tractyl_manuform/4x6_right/readme.md diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk b/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk new file mode 100644 index 000000000..460802a1b --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = no +RGB_MATRIX_DRIVER = WS2812 + + +POINTING_DEVICE_ENABLE = yes +MOUSE_SHARED_EP = no + +SPLIT_KEYBOARD = yes + +SRC += drivers/sensors/pmw3360.c +QUANTUM_LIB_SRC += spi_master.c tm_sync.c diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c new file mode 100644 index 000000000..af9cbda49 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c @@ -0,0 +1,39 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "5x6_right.h" + +#ifdef SWAP_HANDS_ENABLE +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{5, 6}, {4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, + {{5, 7}, {4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}}, + {{5, 8}, {4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}}, + {{5, 9}, {4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}}, + {{5, 10}, {4, 10}, {3, 10}, {2, 10}, {1, 10}, {0, 10}}, + {{5, 11}, {4, 11}, {3, 11}, {2, 11}, {1, 11}, {0, 11}}, + /* Right hand, matrix positions */ + {{5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, + {{5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, + {{5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, + {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, + {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, + {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}}; + +# ifdef ENCODER_MAP_ENABLE +const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0}; +# endif +#endif diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.h b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.h new file mode 100644 index 000000000..24aac66ae --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.h @@ -0,0 +1,55 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . + */ + +#pragma once + +#include "tractyl_manuform.h" +#if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right_f411) +# include "f411.h" +#elif defined(KEYBOARD_handwired_tractyl_manuform_5x6_right_teensy2pp) +# include "teensy2pp.h" +#endif +#include "quantum.h" + +#define ___ KC_NO + +// clang-format off +#define LAYOUT_5x6_right(\ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ + L42, L43, R42, R43, \ + L44, L45, R41, \ + L54, L55, R51, \ + L52, L53, R52, R53 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { ___, ___, L42, L43, L44, L45 }, \ + { ___, ___, L52, L53, L54, L55 }, \ + \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 }, \ + { ___, R41, R42, R43, ___, ___ }, \ + { ___, R51, R52, R53, ___, ___ } \ +} +// clang-format on diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/config.h new file mode 100644 index 000000000..d1860c337 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +#define PRODUCT_ID 0x3536 +#define DEVICE_VER 0x0001 + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 12 +#define MATRIX_COLS 6 + +#define DIODE_DIRECTION COL2ROW + +#define ROTATIONAL_TRANSFORM_ANGLE -25 + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 +#define BOOTMAGIC_LITE_ROW_RIGHT 6 +#define BOOTMAGIC_LITE_COLUMN_RIGHT 5 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 16 +#define LAYER_STATE_16BIT + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/chconf.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/chconf.h new file mode 100644 index 000000000..8b55eaeef --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/chconf.h @@ -0,0 +1,38 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/handwired/onekey/blackpill_f411/chconf.h -r platforms/chibios/common/configs/chconf.h` + */ + +#pragma once + +#define CH_CFG_ST_FREQUENCY 10000 + +#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE + +#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE + +#define CH_CFG_FACTORY_SEMAPHORES TRUE + +#define CH_CFG_FACTORY_MAILBOXES TRUE + +#define CH_CFG_FACTORY_OBJ_FIFOS TRUE + +#define CH_CFG_FACTORY_PIPES TRUE + +#include_next diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h new file mode 100644 index 000000000..cc4efedb8 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h @@ -0,0 +1,96 @@ +/* +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 PRODUCT Tractyl Manuform(5x6) BlackPill + +// wiring of each half +#define MATRIX_COL_PINS \ + { A15, B3, B4, B5, B6, B7 } +#define MATRIX_ROW_PINS \ + { B12, B13, B14, B15, A8, A9 } + +#define DIODE_DIRECTION COL2ROW + +#define USB_VBUS_PIN B10 +#define SPLIT_HAND_PIN C14 // high = left, low = right + +// WS2812 RGB LED strip input and number of LEDs +#define RGB_DI_PIN A1 +#define WS2812_PWM_DRIVER PWMD5 // default: PWMD2 +#define WS2812_PWM_CHANNEL 2 // default: 2 +#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 +//#define WS2812_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy). +#define WS2812_DMA_STREAM STM32_DMA1_STREAM0 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +#define WS2812_DMA_CHANNEL 6 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. + +#define RGBLED_NUM 20 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT \ + { 10, 10 } + +#define DEBUG_LED_PIN C13 + +#define AUDIO_PIN A0 +#define AUDIO_PWM_DRIVER PWMD5 +#define AUDIO_PWM_CHANNEL 1 +#define AUDIO_STATE_TIMER GPTD4 + +/* serial.c configuration for split keyboard */ +#define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. +#define SERIAL_USART_TX_PIN A2 +#define SERIAL_USART_RX_PIN A3 +#define SERIAL_USART_DRIVER SD2 +#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 +#define SERIAL_USART_RX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 +#define SERIAL_USART_TIMEOUT 100 // USART driver timeout. default 100 +#undef SOFT_SERIAL_PIN + +// #define EE_HANDS + +#define I2C_DRIVER I2CD1 +#define I2C1_SCL_BANK GPIOB +#define I2C1_SDA_BANK GPIOB +#define I2C1_SCL 8 +#define I2C1_SDA 9 +#define I2C1_SCL_PAL_MODE 4 +#define I2C1_SDA_PAL_MODE 4 +#define I2C1_CLOCK_SPEED 400000 + +#define ENCODERS_PAD_A \ + { B1 } +#define ENCODERS_PAD_B \ + { B2 } + +#define SPI_DRIVER SPID1 +#define SPI_SCK_PIN A5 +#define SPI_SCK_PAL_MODE 5 +#define SPI_MOSI_PIN A7 +#define SPI_MOSI_PAL_MODE 5 +#define SPI_MISO_PIN A6 +#define SPI_MISO_PAL_MODE 5 + +#define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4 +// #define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 64 +// #define EXTERNAL_EEPROM_BYTE_COUNT 8196 +// #define EXTERNAL_EEPROM_PAGE_SIZE 32 +// #define EXTERNAL_EEPROM_ADDRESS_SIZE 2 +// #define DEBUG_EEPROM_OUTPUT + +#define PMW3360_CS_PIN B0 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c b/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c new file mode 100644 index 000000000..1f6028c72 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.c @@ -0,0 +1,26 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "f411.h" + +void matrix_init_sub_kb(void) { setPinInputHigh(A0); } + +void matrix_scan_sub_kb(void) { + if (!readPin(A0)) { + reset_keyboard(); + } + matrix_scan_user(); +} diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.h new file mode 100644 index 000000000..525b0378b --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/f411.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . + */ + +#pragma once + +#include "5x6_right.h" diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/halconf.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/halconf.h new file mode 100644 index 000000000..94f4aff83 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/halconf.h @@ -0,0 +1,25 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +// #define HAL_USE_DAC TRUE +#define HAL_USE_PWM TRUE +#define HAL_USE_SERIAL TRUE +#define HAL_USE_I2C TRUE +#define HAL_USE_SPI TRUE +#define HAL_USE_GPT TRUE + +#include_next diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/mcuconf.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/mcuconf.h new file mode 100644 index 000000000..0f58208cc --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/mcuconf.h @@ -0,0 +1,34 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include_next "mcuconf.h" + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM5 +#define STM32_PWM_USE_TIM5 TRUE + +#undef STM32_GPT_USE_TIM4 +#define STM32_GPT_USE_TIM4 TRUE + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +#undef STM32_SERIAL_USE_USART2 +#define STM32_SERIAL_USE_USART2 TRUE diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk new file mode 100644 index 000000000..ede1a6baf --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk @@ -0,0 +1,13 @@ +# MCU name +MCU = STM32F411 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +KEYBOARD_SHARED_EP = yes +CONSOLE_ENABLE = yes + +EEPROM_DRIVER = spi +WS2812_DRIVER = pwm +SERIAL_DRIVER = usart +AUDIO_DRIVER = pwm_hardware diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/info.json b/keyboards/handwired/tractyl_manuform/5x6_right/info.json new file mode 100644 index 000000000..b6d4db4e7 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/info.json @@ -0,0 +1,75 @@ +{ + "keyboard_name": "Tractyl Manuform 5x6", + "url": "", + "maintainer": "drashna", + "width": 17, + "height": 8, + "layouts": { + "LAYOUT_5x6_right": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"R00", "x":11, "y":0}, + {"label":"R01", "x":12, "y":0}, + {"label":"R02", "x":13, "y":0}, + {"label":"R03", "x":14, "y":0}, + {"label":"R04", "x":15, "y":0}, + {"label":"R05", "x":16, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"R10", "x":11, "y":1}, + {"label":"R11", "x":12, "y":1}, + {"label":"R12", "x":13, "y":1}, + {"label":"R13", "x":14, "y":1}, + {"label":"R14", "x":15, "y":1}, + {"label":"R15", "x":16, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"R20", "x":11, "y":2}, + {"label":"R21", "x":12, "y":2}, + {"label":"R22", "x":13, "y":2}, + {"label":"R23", "x":14, "y":2}, + {"label":"R24", "x":15, "y":2}, + {"label":"R25", "x":16, "y":2}, + {"label":"L30", "x":0, "y":3}, + {"label":"L31", "x":1, "y":3}, + {"label":"L32", "x":2, "y":3}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3}, + {"label":"L35", "x":5, "y":3}, + {"label":"R30", "x":11, "y":3}, + {"label":"R31", "x":12, "y":3}, + {"label":"R32", "x":13, "y":3}, + {"label":"R33", "x":14, "y":3}, + {"label":"R34", "x":15, "y":3}, + {"label":"R35", "x":16, "y":3}, + {"label":"L42", "x":2, "y":4}, + {"label":"L43", "x":3, "y":4}, + {"label":"R42", "x":13, "y":4}, + {"label":"R43", "x":14, "y":4}, + {"label":"L44", "x":4, "y":5}, + {"label":"L45", "x":5, "y":5}, + {"label":"R41", "x":12, "y":5}, + {"label":"L54", "x":6, "y":6}, + {"label":"L55", "x":7, "y":6}, + {"label":"R51", "x":10, "y":6}, + {"label":"L52", "x":6, "y":7}, + {"label":"L53", "x":7, "y":7}, + {"label":"R52", "x":9, "y":7}, + {"label":"R53", "x":10, "y":7} + ] + } + } +} diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/default/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/default/keymap.c new file mode 100644 index 000000000..30dafdf51 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 + +enum custom_layers { + _QWERTY, + _LOWER, + _RAISE, +}; + + +#define RAISE MO(_RAISE) +#define LOWER MO(_LOWER) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_5x6_right( + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_MINS, + KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT, + KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH, + KC_LBRC,KC_RBRC, KC_PLUS, KC_EQL, + RAISE,KC_SPC, LOWER, + KC_TAB,KC_HOME, KC_DEL, + KC_BSPC, KC_GRV, KC_LGUI, KC_ENT + ), + + [_LOWER] = LAYOUT_5x6_right( + KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS, + _______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE, + _______,_______,_______,_______,_______,_______, _______, KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS, + _______,KC_PSCR, _______, KC_P0, + _______,_______, _______, + _______,_______, _______, + _______,_______, _______,_______ + + ), + + [_RAISE] = LAYOUT_5x6_right( + KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 , + _______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE, + _______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU, + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD, + _______,_______, KC_EQL ,_______, + _______,_______, _______, + _______,_______, _______, + _______,_______, _______,_______ + ), +}; diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h new file mode 100644 index 000000000..21bc8e616 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/config.h @@ -0,0 +1,36 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . + */ + +#pragma once + +// #define USE_I2C +// #define SELECT_SOFT_SERIAL_SPEED 1 +// #define SERIAL_USE_MULTI_TRANSACTION +#define SPLIT_MODS_ENABLE +#define EE_HANDS + +#define TRACKBALL_DPI_OPTIONS { 1200, 1800, 2600, 3400 } + +#define RGBLIGHT_MAX_BRIGHTNESS 60 + +#undef DEBOUNCE +#define DEBOUNCE 10 + +#define SOLENOID_PIN F1 +#define SOLENOID_DEFAULT_DWELL 8 + +#define OLED_DISPLAY_128X64 +#define OLED_BRIGHTNESS 50 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c new file mode 100644 index 000000000..aa93de75d --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c @@ -0,0 +1,404 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "drashna.h" + +enum tractyl_keycodes { + KC_ACCEL = NEW_SAFE_RANGE, +}; + +bool enable_acceleration = false; +// clang-format off +#define LAYOUT_5x6_right_wrapper(...) LAYOUT_5x6_right(__VA_ARGS__) +#define LAYOUT_5x6_right_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_5x6_right_wrapper( \ + KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, UC_IRNY, \ + SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + OS_LALT, OS_LGUI, OS_RGUI, OS_RALT, \ + KC_MUTE, KC_GRV, KC_BTN3, \ + KC_SPC, OS_LGUI, KC_ENT, \ + BK_LWER, TT(_MOUSE), TT(_MOUSE), DL_RAIS \ + ) +#define LAYOUT_base_wrapper(...) LAYOUT_5x6_right_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_MOUSE] = LAYOUT_5x6_right( + _______, _______, _______, _______, _______, _______, DPI_CONFIG, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, _______, + _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______, + _______, _______, _______, _______, + _______, _______, KC_BTN3, + KC_ACCEL, _______, _______, + _______, _______, _______, _______ + ), + [_GAMEPAD] = LAYOUT_5x6_right( + KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, DPI_CONFIG, _______, _______, _______, _______, _______, + KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, + KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_H, _______, _______, _______, _______, _______, _______, + KC_I, KC_T, TG_GAME, KC_NO, + KC_V, KC_O, _______, + KC_SPC, KC_P, _______, + KC_H, KC_LGUI, _______, _______ + ), + [_DIABLO] = LAYOUT_5x6_right( + KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, _______, _______, _______, _______, _______, _______, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_G, _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, _______, _______, _______, _______, _______, _______, + KC_F, KC_L, KC_NO, TG_DBLO, + KC_DIABLO_CLEAR, KC_F, _______, + SFT_T(KC_SPC), KC_J, _______, + ALT_T(KC_Q), KC_LGUI, _______, _______ + ), + [_LOWER] = LAYOUT_5x6_right_wrapper( + KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11, + _______, _________________LOWER_L1__________________, _________________LOWER_R1__________________, _______, + _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______ + ), + [_RAISE] = LAYOUT_5x6_right_wrapper( + KC_F12, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, KC_F11, + KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, _______ + ), + [_ADJUST] = LAYOUT_5x6_right_wrapper( + KC_MAKE, ___________________BLANK___________________, _________________ADJUST_R1_________________, KC_RST, + VRSN, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, EEP_RST, + UC_MOD, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG_MODS, + _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY, + HPT_DWLI, HPT_DWLD, TG_GAME, TG_DBLO, + HPT_TOG, HPT_BUZ, KC_NUKE, + _______, _______, _______, + _______, _______, KC_NUKE, _______ + ), +}; + +#define BASE_ENCODERS { { KC_VOLD, KC_VOLU }, { KC_WH_D, KC_WH_U } } + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_DEFAULT_LAYER_1] = BASE_ENCODERS, + [_DEFAULT_LAYER_2] = BASE_ENCODERS, + [_DEFAULT_LAYER_3] = BASE_ENCODERS, + [_DEFAULT_LAYER_4] = BASE_ENCODERS, + [_GAMEPAD] = { { _______, _______ }, { _______, _______ } }, + [_DIABLO] = { { _______, _______ }, { _______, _______ } }, + [_MOUSE] = { { _______, _______ }, { KC_WH_D, KC_WH_U } }, + [_MEDIA] = { { _______, _______ }, { _______, _______ } }, + [_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } }, + [_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } }, + [_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } }, +}; +#else +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + tap_code_delay(clockwise ? KC_VOLD : KC_VOLU, 5); + } else if (index == 1) { + tap_code_delay(clockwise ? KC_WH_D : KC_WH_U, 5); + } + return false; +} +#endif +// clang-format on + +#ifdef POINTING_DEVICE_ENABLE +static uint16_t mouse_timer = 0; +static uint16_t mouse_debounce_timer = 0; +static uint8_t mouse_keycode_tracker = 0; +bool tap_toggling = false; + +# ifdef TAPPING_TERM_PER_KEY +# define TAP_CHECK get_tapping_term(KC_BTN1, NULL) +# else +# ifndef TAPPING_TERM +# define TAPPING_TERM 200 +# endif +# define TAP_CHECK TAPPING_TERM +# endif + +void process_mouse_user(report_mouse_t* mouse_report, int8_t x, int8_t y) { + if (x != 0 && y != 0) { + mouse_timer = timer_read(); +# ifdef OLED_ENABLE + oled_timer = timer_read32(); +# endif + if (timer_elapsed(mouse_debounce_timer) > TAP_CHECK) { + if (enable_acceleration) { + x = (x > 0 ? x * x / 16 + x : -x * x / 16 + x); + y = (y > 0 ? y * y / 16 + y : -y * y / 16 + y); + } + mouse_report->x = x; + mouse_report->y = y; + if (!layer_state_is(_MOUSE)) { + layer_on(_MOUSE); + } + } + } +} + +void matrix_scan_keymap(void) { + if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker && !tap_toggling) { + layer_off(_MOUSE); + } + if (tap_toggling) { + if (!layer_state_is(_MOUSE)) { + layer_on(_MOUSE); + } + } +} + +bool process_record_keymap(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case TT(_MOUSE): + if (record->event.pressed) { + mouse_keycode_tracker++; + } else { +# if TAPPING_TOGGLE != 0 + if (record->tap.count == TAPPING_TOGGLE) { + tap_toggling ^= 1; +# if TAPPING_TOGGLE == 1 + if (!tap_toggling) mouse_keycode_tracker -= record->tap.count + 1; +# else + if (!tap_toggling) mouse_keycode_tracker -= record->tap.count; +# endif + } else { + mouse_keycode_tracker--; + } +# endif + } + mouse_timer = timer_read(); + break; + case TG(_MOUSE): + if (record->event.pressed) { + tap_toggling ^= 1; + } + break; + case MO(_MOUSE): + case DPI_CONFIG: + case KC_MS_UP ... KC_MS_WH_RIGHT: + record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--; + mouse_timer = timer_read(); + case KC_ACCEL: + enable_acceleration = record->event.pressed; + break; + default: + if (IS_NOEVENT(record->event)) break; + if ((keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) && (((keycode >> 0x8) & 0xF) == _MOUSE)) { + record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--; + mouse_timer = timer_read(); + break; + } + if (layer_state_is(_MOUSE) && !mouse_keycode_tracker) { + layer_off(_MOUSE); + } + mouse_keycode_tracker = 0; + mouse_debounce_timer = timer_read(); + break; + } + return true; +} + +layer_state_t layer_state_set_keymap(layer_state_t state) { + if (layer_state_cmp(state, _GAMEPAD) || layer_state_cmp(state, _DIABLO)) { + state |= ((layer_state_t)1 << _MOUSE); + } + return state; +} +#endif + +#ifdef OLED_DRIVER_ENABLE +// WPM-responsive animation stuff here +# define SLEEP_FRAMES 2 +# define SLEEP_SPEED 10 // below this wpm value your animation will idle + +# define WAKE_FRAMES 2 // uncomment if >1 + +# define KAKI_FRAMES 3 +# define KAKI_SPEED 40 // above this wpm value typing animation to triggere + +# define RTOGI_FRAMES 2 +//#define LTOGI_FRAMES 2 + +//#define ANIM_FRAME_DURATION 500 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +# define ANIM_SIZE 512 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_frame_duration = 500; +uint8_t current_sleep_frame = 0; +uint8_t current_wake_frame = 0; // uncomment if WAKE_FRAMES >1 +uint8_t current_kaki_frame = 0; +uint8_t current_rtogi_frame = 0; +// uint8_t current_ltogi_frame = 0; + +void render_kitty(void) { + // Images credit j-inc(/James Incandenza) and pixelbenny. Credit to obosob for initial animation approach. + static const char PROGMEM sleep[SLEEP_FRAMES][ANIM_SIZE] = {{ + // 'sleep1', 128x32px + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xa8, 0x48, 0xa8, 0x18, 0x08, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x80, 0x44, 0x84, 0x06, 0x05, 0x04, 0x80, 0x40, 0x20, 0x10, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x04, 0x02, 0x7a, 0x86, 0x01, 0x80, 0x80, 0x01, 0x03, 0x05, 0x07, 0x01, 0x00, 0x00, 0x80, 0x83, 0x45, 0xfa, 0x3c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x33, 0x24, 0x28, 0x28, 0x29, 0x29, 0x29, 0x3a, 0x18, 0x1c, 0x39, 0x24, 0x24, 0x3a, 0x2d, 0x26, 0x31, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + {// 'sleep2', 128x32px + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x22, 0x3a, 0x2a, 0x26, 0x22, 0x80, 0xc0, 0x80, 0x00, 0x24, 0x34, 0x2c, 0xe4, 0x60, 0x10, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x38, 0x04, 0x02, 0x02, 0x01, 0x79, 0x87, 0x01, 0x80, 0x81, 0x83, 0x05, 0x05, 0x03, 0x01, 0x00, 0x00, 0x80, 0x43, 0x05, 0xfa, 0x3c, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, 0x33, 0x24, 0x28, 0x28, 0x28, 0x29, 0x29, 0x3a, 0x18, 0x1c, 0x39, 0x24, 0x24, 0x3a, 0x2d, 0x26, 0x31, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; + static const char PROGMEM wake[WAKE_FRAMES][ANIM_SIZE] = {{ + // 'mati2', 128x32px + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x08, 0x10, 0x60, 0x80, 0x00, 0x80, 0x60, 0x10, 0x08, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x40, 0x40, 0x5c, 0x00, 0x01, 0x41, 0x01, 0x00, 0x5c, 0x40, 0x40, 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x80, 0xe1, 0x12, 0x0a, 0x06, 0x00, 0x80, 0x00, 0x06, 0x0a, 0x12, 0xe1, 0x80, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x10, 0x10, 0x1f, 0x11, 0x10, 0x10, 0x14, 0x14, 0x1f, 0x1c, 0x14, 0x14, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + {// 'mati3', 128x32px + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x30, 0x08, 0x10, 0x60, 0x80, 0x00, 0x80, 0x60, 0x10, 0x08, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x90, 0x12, 0x0a, 0x02, 0xf4, 0x09, 0x0d, 0xf1, 0x04, 0x02, 0x0a, 0x12, 0x90, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x80, 0xe1, 0x12, 0x0a, 0x06, 0x01, 0x81, 0x00, 0x06, 0x0a, 0x12, 0xe1, 0x80, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x10, 0x10, 0x1f, 0x11, 0x10, 0x10, 0x14, 0x14, 0x1f, 0x1c, 0x14, 0x14, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; + static const char PROGMEM kaki[KAKI_FRAMES][ANIM_SIZE] = {{ + // 'jare2', 128x32px + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x80, 0x80, 0x00, 0xfc, 0x84, 0x08, 0x08, 0x10, 0x20, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1e, 0x60, 0x80, 0x00, 0x00, 0x91, 0xa1, 0x80, 0x00, 0x00, 0x22, 0x84, 0x40, 0x50, 0x48, 0xc1, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x41, 0x82, 0xe2, 0x12, 0x0a, 0x06, 0x00, 0x80, 0x88, 0x4f, 0x02, 0x22, 0xe2, 0x9f, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x14, 0x10, 0x10, 0x10, 0x10, 0x10, 0x14, 0x14, 0x1f, 0x1a, 0x0a, 0x0a, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + { + // 'kaki1', 128x32px + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x06, 0x1a, 0x22, 0xc2, 0x04, 0x04, 0x04, 0x07, 0x00, 0xc0, 0x20, 0x10, 0x80, 0x80, 0x01, 0x01, 0x02, 0xfc, 0xfe, 0x02, 0x3c, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0d, 0x8d, 0x55, 0x50, 0x94, 0xf0, 0x10, 0x09, 0x08, 0x00, 0x80, 0x00, 0x06, 0x09, 0x1b, 0xee, 0x00, 0x00, 0x00, 0x00, 0x81, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x10, 0x10, 0x1f, 0x19, 0x18, 0x1c, 0x14, 0x16, 0x15, 0x14, 0x14, 0x14, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + {// 'kaki2', 128x32px + 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x01, 0x02, 0x04, 0x04, 0x03, 0x80, 0x40, 0x40, 0x20, 0x00, 0x01, 0x02, 0x8c, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x0d, 0x8d, 0x55, 0x50, 0x94, 0xf0, 0x10, 0x0a, 0x0e, 0x1d, 0x95, 0x24, 0x24, 0x27, 0x13, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x02, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1f, 0x14, 0x14, 0x10, 0x10, 0x11, 0x1f, 0x10, 0x10, 0x18, 0x0f, 0x18, 0x10, 0x10, 0x1f, 0x19, 0x18, 0x1c, 0x14, 0x14, 0x17, 0x14, 0x14, 0x14, 0x14, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; + static const char PROGMEM rtogi[KAKI_FRAMES][ANIM_SIZE] = {{ + // 'rtogi1', 128x32px + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x10, 0x08, 0x04, 0x02, 0x01, 0x0f, 0x90, 0x10, 0x20, 0xf0, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x48, 0x47, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x88, 0xc7, 0xc4, 0x62, 0x23, 0x11, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x40, 0x20, 0x10, 0x88, 0xcc, 0x43, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x80, 0x80, 0xc0, 0xe1, 0xfe, 0xb8, 0x88, 0x0c, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x05, 0x04, 0x04, 0x04, 0x07, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, + {// 'rtogi2', 128x32px + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x20, 0x10, 0x10, 0x08, 0x04, 0x02, 0x01, 0x1f, 0xa0, 0x20, 0x40, 0x80, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x08, 0x48, 0x47, 0x88, 0x00, 0x00, 0x00, 0x00, 0x24, 0x24, 0x28, 0x6b, 0x40, 0xa0, 0x99, 0x86, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0f, 0x11, 0x22, 0x44, 0x48, 0x4c, 0x43, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x80, 0x80, 0xc0, 0xe1, 0xfe, 0xb8, 0x88, 0x0c, 0x04, 0x06, 0x06, 0x06, 0x0e, 0x0e, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x05, 0x04, 0x04, 0x04, 0x07, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; + + // assumes 1 frame prep stage + extern bool swap_hands; + void animation_phase(void) { + if (swap_hands) { + anim_frame_duration = 300; + current_rtogi_frame = (current_rtogi_frame + 1) % RTOGI_FRAMES; + oled_write_raw_P(rtogi[abs((RTOGI_FRAMES - 1) - current_rtogi_frame)], ANIM_SIZE); + } else { + if (get_current_wpm() <= SLEEP_SPEED) { + anim_frame_duration = 500; + current_sleep_frame = (current_sleep_frame + 1) % SLEEP_FRAMES; + oled_write_raw_P(sleep[abs((SLEEP_FRAMES - 1) - current_sleep_frame)], ANIM_SIZE); + } + // if(get_current_wpm() >IDLE_SPEED && get_current_wpm() SLEEP_SPEED) { + anim_frame_duration = 800; + current_wake_frame = (current_wake_frame + 1) % WAKE_FRAMES; + oled_write_raw_P(wake[abs((WAKE_FRAMES - 1) - current_wake_frame)], ANIM_SIZE); + // oled_write_raw_P(wake[0], ANIM_SIZE); // remove if IDLE_FRAMES >1 + } + if (get_current_wpm() >= KAKI_SPEED) { + anim_frame_duration = 500; + current_kaki_frame = (current_kaki_frame + 1) % KAKI_FRAMES; + oled_write_raw_P(kaki[abs((KAKI_FRAMES - 1) - current_kaki_frame)], ANIM_SIZE); + } + } + } + if (get_current_wpm() != 000) { + // if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + if (timer_elapsed32(anim_timer) > anim_frame_duration) { + anim_timer = timer_read32(); + animation_phase(); + } + } else { + // if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + if (timer_elapsed32(anim_timer) > anim_frame_duration) { + anim_timer = timer_read32(); + animation_phase(); + } + } +} + +void oled_driver_render_logo_left(void) { + render_kitty(); + + oled_set_cursor(6, 0); + oled_write_P(PSTR(" Tractyl "), true); + oled_set_cursor(6, 1); + oled_write_P(PSTR(" Manuform "), true); + oled_set_cursor(6, 2); +# if defined(WPM_ENABLE) + render_wpm(1); +# endif + oled_set_cursor(6, 3); +# if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right) + render_pointing_dpi_status(0); +# endif + oled_set_cursor(0, 4); +} +#endif diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rgblight_breathe_table.h b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rgblight_breathe_table.h new file mode 100644 index 000000000..fb921079b --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rgblight_breathe_table.h @@ -0,0 +1,117 @@ +#pragma once + +#define RGBLIGHT_EFFECT_BREATHE_TABLE + +// clang-format off + +// Breathing center: 1.85 +// Breathing max: 100 + +const uint8_t PROGMEM rgblight_effect_breathe_table[] = { +#if RGBLIGHT_BREATHE_TABLE_SIZE == 256 + 0x0D, 0x0E, 0x0E, 0x0F, 0x0F, 0x10, 0x10, 0x11, + 0x11, 0x12, 0x13, 0x13, 0x14, 0x14, 0x15, 0x16, + 0x16, 0x17, 0x18, 0x18, 0x19, 0x19, 0x1A, 0x1B, + 0x1B, 0x1C, 0x1D, 0x1E, 0x1E, 0x1F, 0x20, 0x20, + 0x21, 0x22, 0x22, 0x23, 0x24, 0x25, 0x25, 0x26, + 0x27, 0x28, 0x28, 0x29, 0x2A, 0x2B, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2E, 0x2F, 0x30, 0x31, 0x31, 0x32, + 0x33, 0x34, 0x34, 0x35, 0x36, 0x37, 0x38, 0x38, + 0x39, 0x3A, 0x3B, 0x3B, 0x3C, 0x3D, 0x3D, 0x3E, + 0x3F, 0x40, 0x40, 0x41, 0x42, 0x42, 0x43, 0x44, + 0x44, 0x45, 0x46, 0x46, 0x47, 0x48, 0x48, 0x49, + 0x4A, 0x4A, 0x4B, 0x4B, 0x4C, 0x4C, 0x4D, 0x4D, + 0x4E, 0x4E, 0x4F, 0x4F, 0x50, 0x50, 0x51, 0x51, + 0x51, 0x52, 0x52, 0x53, 0x53, 0x53, 0x54, 0x54, + 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x56, + 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, + 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, + 0x56, 0x55, 0x55, 0x55, 0x55, 0x55, 0x54, 0x54, + 0x54, 0x54, 0x53, 0x53, 0x53, 0x52, 0x52, 0x51, + 0x51, 0x51, 0x50, 0x50, 0x4F, 0x4F, 0x4E, 0x4E, + 0x4D, 0x4D, 0x4C, 0x4C, 0x4B, 0x4B, 0x4A, 0x4A, + 0x49, 0x48, 0x48, 0x47, 0x46, 0x46, 0x45, 0x44, + 0x44, 0x43, 0x42, 0x42, 0x41, 0x40, 0x40, 0x3F, + 0x3E, 0x3D, 0x3D, 0x3C, 0x3B, 0x3B, 0x3A, 0x39, + 0x38, 0x38, 0x37, 0x36, 0x35, 0x34, 0x34, 0x33, + 0x32, 0x31, 0x31, 0x30, 0x2F, 0x2E, 0x2E, 0x2D, + 0x2C, 0x2B, 0x2B, 0x2A, 0x29, 0x28, 0x28, 0x27, + 0x26, 0x25, 0x25, 0x24, 0x23, 0x22, 0x22, 0x21, + 0x20, 0x20, 0x1F, 0x1E, 0x1E, 0x1D, 0x1C, 0x1B, + 0x1B, 0x1A, 0x19, 0x19, 0x18, 0x18, 0x17, 0x16, + 0x16, 0x15, 0x14, 0x14, 0x13, 0x13, 0x12, 0x11, + 0x11, 0x10, 0x10, 0x0F, 0x0F, 0x0E, 0x0E, 0x0D +#endif + +#if RGBLIGHT_BREATHE_TABLE_SIZE == 128 + 0x0D, 0x0E, 0x0F, 0x10, + 0x11, 0x13, 0x14, 0x15, + 0x16, 0x18, 0x19, 0x1A, + 0x1B, 0x1D, 0x1E, 0x20, + 0x21, 0x22, 0x24, 0x25, + 0x27, 0x28, 0x2A, 0x2B, + 0x2D, 0x2E, 0x30, 0x31, + 0x33, 0x34, 0x36, 0x38, + 0x39, 0x3B, 0x3C, 0x3D, + 0x3F, 0x40, 0x42, 0x43, + 0x44, 0x46, 0x47, 0x48, + 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, + 0x51, 0x52, 0x53, 0x54, + 0x54, 0x55, 0x55, 0x55, + 0x56, 0x56, 0x56, 0x56, + 0x56, 0x56, 0x56, 0x56, + 0x56, 0x55, 0x55, 0x54, + 0x54, 0x53, 0x53, 0x52, + 0x51, 0x50, 0x4F, 0x4E, + 0x4D, 0x4C, 0x4B, 0x4A, + 0x49, 0x48, 0x46, 0x45, + 0x44, 0x42, 0x41, 0x40, + 0x3E, 0x3D, 0x3B, 0x3A, + 0x38, 0x37, 0x35, 0x34, + 0x32, 0x31, 0x2F, 0x2E, + 0x2C, 0x2B, 0x29, 0x28, + 0x26, 0x25, 0x23, 0x22, + 0x20, 0x1F, 0x1E, 0x1C, + 0x1B, 0x19, 0x18, 0x17, + 0x16, 0x14, 0x13, 0x12, + 0x11, 0x10, 0x0F, 0x0E +#endif + +#if RGBLIGHT_BREATHE_TABLE_SIZE == 64 + 0x0D, 0x0F, + 0x11, 0x14, + 0x16, 0x19, + 0x1B, 0x1E, + 0x21, 0x24, + 0x27, 0x2A, + 0x2D, 0x30, + 0x33, 0x36, + 0x39, 0x3C, + 0x3F, 0x42, + 0x44, 0x47, + 0x4A, 0x4C, + 0x4E, 0x50, + 0x51, 0x53, + 0x54, 0x55, + 0x56, 0x56, + 0x56, 0x56, + 0x56, 0x55, + 0x54, 0x53, + 0x51, 0x4F, + 0x4D, 0x4B, + 0x49, 0x46, + 0x44, 0x41, + 0x3E, 0x3B, + 0x38, 0x35, + 0x32, 0x2F, + 0x2C, 0x29, + 0x26, 0x23, + 0x20, 0x1E, + 0x1B, 0x18, + 0x16, 0x13, + 0x11, 0x0F +#endif +}; + +static const int table_scale = 256 / sizeof(rgblight_effect_breathe_table); diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk new file mode 100644 index 000000000..b123ce1a8 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk @@ -0,0 +1,14 @@ +RGBLIGHT_ENABLE = yes +RGBLIGHT_STARTUP_ANIMATION = yes +AUDIO_ENABLE = yes +HAPTIC_ENABLE = no +COMMAND_ENABLE = no +TAP_DANCE_ENABLE = yes +UNICODE_ENABLE = yes +OLED_ENABLE = yes +WPM_ENABLE = yes +ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes +# DEBOUNCE_TYPE = sym_eager_pk + +LTO_SUPPORTED = no diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/readme.md b/keyboards/handwired/tractyl_manuform/5x6_right/readme.md new file mode 100644 index 000000000..b6e38dc84 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/readme.md @@ -0,0 +1,21 @@ +# Drashna's Dactyl Manuform (5x6) with a right side trackball + +![](https://preview.redd.it/zwt91036m3y51.jpg?width=960&crop=smart&auto=webp&s=e030deb7d8285c95a1a30c69a7e7a71f750e87bb) + +It's a Dactyl Manuform with an integrated thumb based trackball, using the pmw3360 optical sensor. + +It's powered by 2x Teensy++ 2.0's, using Drashna's [Teensy VBUS Hack](https://docs.qmk.fm/#/feature_split_keyboard?id=hardware-considerations-and-mods) for better detection. + + +* Keyboard Maintainer: [Drashna Jael're](https://github.com/drashna) +* Hardware Supported: [Design files](https://gitlab.com/keyboards1/dm_r_track/-/tree/master/boolean), [Teensy++ 2.0 (2x)](https://www.pjrc.com/store/teensypp.html), [PMW3360 Optical Sensor](https://www.tindie.com/products/jkicklighter/pmw3360-motion-sensor/) + +Make example for this keyboard (after setting up your build environment): + + make handwired/dactyl_manuform/5x6_right_trackball:default + +Flashing example for this keyboard: + + make handwired/dactyl_manuform/5x6_right_trackball:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/rules.mk new file mode 100644 index 000000000..8a69f2b28 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/rules.mk @@ -0,0 +1,27 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +SWAP_HANDS_ENABLE = yes + +POINTING_DEVICE_ENABLE = yes +MOUSE_SHARED_EP = no + +SPLIT_KEYBOARD = yes + +SRC += drivers/sensors/pmw3360.c +QUANTUM_LIB_SRC += spi_master.c tm_sync.c + +DEFAULT_FOLDER = handwired/tractyl_manuform/5x6_right/teensy2pp diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h new file mode 100644 index 000000000..239102059 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h @@ -0,0 +1,54 @@ +/* +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 PRODUCT Tractyl Manuform(5x6) Teensy 2.0 ++ + +// wiring of each half +#define MATRIX_COL_PINS \ + { C0, C1, C2, C3, C4, C5 } +#define MATRIX_ROW_PINS \ + { F7, F6, F5, F4, F3, F2 } + +#define DIODE_DIRECTION COL2ROW + +// WS2812 RGB LED strip input and number of LEDs +#define RGB_DI_PIN E7 +#define RGBLED_NUM 20 +#define RGBLIGHT_SPLIT +#define RGBLED_SPLIT \ + { 10, 10 } +#define RGBLIGHT_LIMIT_VAL 80 + +#define DEBUG_LED_PIN D6 + +#define AUDIO_PIN C6 +#define AUDIO_PIN_ALT B7 + +/* serial.c configuration for split keyboard */ +#define SOFT_SERIAL_PIN D2 +#define EE_HANDS + +#define ENCODERS_PAD_A \ + { D5 } +#define ENCODERS_PAD_B \ + { D4 } + +/* PMW3360 Settings */ +#define PMW3360_CS_PIN B0 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/rules.mk new file mode 100644 index 000000000..149471682 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/rules.mk @@ -0,0 +1,5 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +BOOTLOADER = halfkay diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/teensy2pp.h b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/teensy2pp.h new file mode 100644 index 000000000..525b0378b --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/teensy2pp.h @@ -0,0 +1,19 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . + */ + +#pragma once + +#include "5x6_right.h" diff --git a/keyboards/handwired/tractyl_manuform/config.h b/keyboards/handwired/tractyl_manuform/config.h new file mode 100644 index 000000000..ec67cff1a --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/config.h @@ -0,0 +1,45 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x44DD +#define MANUFACTURER Drashna + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define USB_POLLING_INTERVAL_MS 1 + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define SPLIT_TRANSACTION_IDS_KB RPC_ID_KB_CONFIG_SYNC, RPC_ID_POINTER_STATE_SYNC diff --git a/keyboards/handwired/tractyl_manuform/post_config.h b/keyboards/handwired/tractyl_manuform/post_config.h new file mode 100644 index 000000000..147e92873 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/post_config.h @@ -0,0 +1,96 @@ +/* +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 + +// mouse config +# ifndef MOUSEKEY_MOVE_DELTA +# ifndef MK_KINETIC_SPEED +# define MOUSEKEY_MOVE_DELTA 5 +# else +# define MOUSEKEY_MOVE_DELTA 25 +# endif +# endif +# ifndef MOUSEKEY_DELAY +# ifndef MK_KINETIC_SPEED +# define MOUSEKEY_DELAY 300 +# else +# define MOUSEKEY_DELAY 8 +# endif +# endif +# ifndef MOUSEKEY_INTERVAL +# ifndef MK_KINETIC_SPEED +# define MOUSEKEY_INTERVAL 50 +# else +# define MOUSEKEY_INTERVAL 20 +# endif +# endif +# ifndef MOUSEKEY_MAX_SPEED +# define MOUSEKEY_MAX_SPEED 7 +# endif +# ifndef MOUSEKEY_TIME_TO_MAX +# define MOUSEKEY_TIME_TO_MAX 60 +# endif +# ifndef MOUSEKEY_INITIAL_SPEED +# define MOUSEKEY_INITIAL_SPEED 100 +# endif +# ifndef MOUSEKEY_BASE_SPEED +# define MOUSEKEY_BASE_SPEED 1000 +# endif +# ifndef MOUSEKEY_DECELERATED_SPEED +# define MOUSEKEY_DECELERATED_SPEED 400 +# endif +# ifndef MOUSEKEY_ACCELERATED_SPEED +# define MOUSEKEY_ACCELERATED_SPEED 3000 +# endif + + +// mouse scroll config +# ifndef MOUSEKEY_WHEEL_DELAY +# define MOUSEKEY_WHEEL_DELAY 15 +# endif +# ifndef MOUSEKEY_WHEEL_DELTA +# define MOUSEKEY_WHEEL_DELTA 1 +# endif +# ifndef MOUSEKEY_WHEEL_INTERVAL +# define MOUSEKEY_WHEEL_INTERVAL 50 +# endif +# ifndef MOUSEKEY_WHEEL_MAX_SPEED +# define MOUSEKEY_WHEEL_MAX_SPEED 8 +# endif +# ifndef MOUSEKEY_WHEEL_TIME_TO_MAX +# define MOUSEKEY_WHEEL_TIME_TO_MAX 80 +# endif + +# ifndef MOUSEKEY_WHEEL_INITIAL_MOVEMENTS +# define MOUSEKEY_WHEEL_INITIAL_MOVEMENTS 8 +# endif +# ifndef MOUSEKEY_WHEEL_BASE_MOVEMENTS +# define MOUSEKEY_WHEEL_BASE_MOVEMENTS 48 +# endif +# ifndef MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS +# define MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS 48 +# endif +# ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS +# define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8 +# endif + + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif diff --git a/keyboards/handwired/tractyl_manuform/readme.md b/keyboards/handwired/tractyl_manuform/readme.md new file mode 100644 index 000000000..3221da0e9 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/readme.md @@ -0,0 +1,159 @@ +Dactyl Manuform (4x5, 5x6, 5x7, 6x6) +====== +the [Dactyl-Manuform](https://github.com/tshort/dactyl-keyboard) is a split curved keyboard based on the design of [adereth dactyl](https://github.com/adereth/dactyl-keyboard) and thumb cluster design of the [manuform](https://geekhack.org/index.php?topic=46015.0) keyboard, the hardware is similar to the let's split keyboard. all information needed for making one is in the first link. +![Imgur](https://i.imgur.com/7y0Vbyd.jpg) + + +## First Time Setup + +Download or clone the `qmk_firmware` repo and navigate to its top level directory. Once your build environment is setup, you'll be able to generate the default .hex using: + +Depending on your Layout chose one of the follwing commands: + +``` +$ make handwired/dactyl_manuform/YOUR_LAYOUT:YOUR_KEYMAP_NAME +``` + +example: +``` +$ make handwired/dactyl_manuform/4x5:default +``` + +If everything worked correctly you will see a file: + +``` +dactyl_manuform_YOUR_LAYOUT_YOUR_KEYMAP_NAME.hex +``` + +For more information on customizing keymaps, take a look at the primary documentation for [Customizing Your Keymap](/docs/faq_keymap.md) in the main readme.md. + + +## Keymaps + +### [Keymaps 4x5](/keyboards/handwired/dactyl_manuform/4x5/keymaps/) + +#### Default +Simple QWERTY layout with 3 Layers. +#### Dvorak + +### [Keymaps 5x6](/keyboards/handwired/dactyl_manuform/5x6/keymaps/) + +#### Default +Just a copy of the Impstyle keymap. Feel free to adjust it. + +#### Impstyle +A simple QWERTY keymap with 3 Layers. Both sides are connected via serial and the Left ist the master. + +### [Keymaps 5x7 aka almost Ergodox](/keyboards/handwired/dactyl_manuform/5x7/keymaps/) +#### Default +Keymap of Loligagger from geekhack. + +### [Keymaps 6x6](/keyboards/handwired/dactyl_manuform/6x6/keymaps/) + +#### Default +Simple QWERTY layout with 3 Layers. + +## Required Hardware + +Apart from diodes and key switches for the keyboard matrix in each half, you +will need: + +* 2 Arduino Pro Micros. You can find these on AliExpress for ≈3.50USD each. +* 2 TRRS sockets and 1 TRRS cable, or 2 TRS sockets and 1 TRS cable + +Alternatively, you can use any sort of cable and socket that has at least 3 +wires. If you want to use I2C to communicate between halves, you will need a +cable with at least 4 wires and 2x 4.7kΩ pull-up resistors + +## Optional Hardware +A speaker can be hooked-up to either side to the `5` (`C6`) pin and `GND`, and turned on via `AUDIO_ENABLE`. + +## Wiring + +The 3 wires of the TRS/TRRS cable need to connect GND, VCC, and digital pin 3 (i.e. +PD0 on the ATmega32u4) between the two Pro Micros. + +Next, wire your key matrix to any of the remaining 17 IO pins of the pro micro +and modify the `matrix.c` accordingly. + +The wiring for serial: + +![serial wiring](https://i.imgur.com/C3D1GAQ.png) + +The wiring for i2c: + +![i2c wiring](https://i.imgur.com/Hbzhc6E.png) + +The pull-up resistors may be placed on either half. It is also possible +to use 4 resistors and have the pull-ups in both halves, but this is +unnecessary in simple use cases. + +You can change your configuration between serial and i2c by modifying your `config.h` file. + +## Notes on Software Configuration + +the keymaps in here are for the 4x5 layout of the keyboard only. + +## Flashing + +To flash your firmware take a look at: [Flashing Instructions and Bootloader Information](https://docs.qmk.fm/#/flashing) + + +## Choosing which board to plug the USB cable into (choosing Master) + +Because the two boards are identical, the firmware has logic to differentiate the left and right board. + +It uses two strategies to figure things out: looking at the EEPROM (memory on the chip) or looking if the current board has the usb cable. + +The EEPROM approach requires additional setup (flashing the eeprom) but allows you to swap the usb cable to either side. + +The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. + +### Setting the left hand as master + +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. + +### Setting the right hand as master + +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define MASTER_RIGHT +``` + +### Setting EE_hands to use either hands as master + +If you define `EE_HANDS` in your `config.h`, you will need to set the +EEPROM for the left and right halves. + +The EEPROM is used to store whether the +half is left handed or right handed. This makes it so that the same firmware +file will run on both hands instead of having to flash left and right handed +versions of the firmware to each half. To flash the EEPROM file for the left +half run: +``` +make handwired/dactyl_promicro:default:dfu-split-left +make handwired/dactyl_promicro:default:dfu-split-right +``` + +After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. + +Note that you need to program both halves, but you have the option of using +different keymaps for each half. You could program the left half with a QWERTY +layout and the right half with a Colemak layout using bootmagic's default layout option. +Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the +right half is connected. + + +Notes on Using Pro Micro 3.3V +----------------------------- + +Do update the `F_CPU` parameter in `rules.mk` to `8000000` which reflects +the frequency on the 3.3V board. + +Also, if the slave board is producing weird characters in certain columns, +update the following line in `matrix.c` to the following: + +``` +// wait_us(30); // without this wait read unstable value. +wait_us(300); // without this wait read unstable value. +``` diff --git a/keyboards/handwired/tractyl_manuform/tm_sync.c b/keyboards/handwired/tractyl_manuform/tm_sync.c new file mode 100644 index 000000000..2a8847b3e --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/tm_sync.c @@ -0,0 +1,119 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "tractyl_manuform.h" +#include "transactions.h" +#include +#include "drivers/sensors/pmw3360.h" + +kb_config_data_t kb_config; +kb_pointer_data_t kb_pointer; + +void kb_config_sync_handler(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + if (initiator2target_buffer_size == sizeof(kb_config)) { + memcpy(&kb_config, initiator2target_buffer, sizeof(kb_config)); + } +} +void kb_pointer_sync_handler(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + if (target2initiator_buffer_size == sizeof(kb_pointer)) { + memcpy(target2initiator_buffer, &kb_pointer, sizeof(kb_pointer)); + } +} + +void keyboard_pre_init_sync(void) { + memset(&kb_config, 0, sizeof(kb_config)); + memset(&kb_pointer, 0, sizeof(kb_pointer)); +} + +void keyboard_post_init_kb(void) { + // Register keyboard state sync split transaction + transaction_register_rpc(RPC_ID_KB_CONFIG_SYNC, kb_config_sync_handler); + transaction_register_rpc(RPC_ID_POINTER_STATE_SYNC, kb_pointer_sync_handler); + + keyboard_post_init_user(); +} + +void kb_config_update(void) { + if (is_keyboard_master()) { + static uint16_t cpi = 0; + if (cpi != kb_config.device_cpi) { + cpi = kb_config.device_cpi; + pmw_set_cpi(cpi); + } + } +} + +void kb_config_sync(void) { + if (is_keyboard_master()) { + // Keep track of the last state, so that we can tell if we need to propagate to slave + static kb_config_data_t last_kb_config; + static uint32_t last_sync = 0; + bool needs_sync = false; + + // Check if the state values are different + if (memcmp(&kb_config, &last_kb_config, sizeof(kb_config))) { + needs_sync = true; + memcpy(&last_kb_config, &kb_config, sizeof(kb_config)); + } + // Send to slave every 500ms regardless of state change + if (timer_elapsed32(last_sync) > 500) { + needs_sync = true; + } + + // Perform the sync if requested + if (needs_sync) { + if (transaction_rpc_send(RPC_ID_KB_CONFIG_SYNC, sizeof(kb_config), &kb_config)) { + last_sync = timer_read32(); + } + } + } +} + +void kb_pointer_sync(void) { + if (is_keyboard_master() && is_keyboard_left()) { + // Keep track of the last state, so that we can tell if we need to propagate to slave + static uint32_t last_sync = 0; + + // Perform the sync if requested + if (timer_elapsed32(last_sync) >= 5) { + if (transaction_rpc_recv(RPC_ID_POINTER_STATE_SYNC, sizeof(kb_pointer), &kb_pointer)) { + last_sync = timer_read32(); + } + } + } +} + +void housekeeping_task_kb(void) { + // Update kb_config so we can send to slave + kb_config_update(); + // Data sync from master to slave + kb_config_sync(); + kb_pointer_sync(); +} + +void kb_pointer_sync_send(int8_t x, int8_t y) { + kb_pointer.mouse_x = x; + kb_pointer.mouse_y = y; +} + +kb_pointer_data_t kb_pointer_sync_get(void) { return (kb_pointer_data_t){.mouse_x = kb_pointer.mouse_x, .mouse_y = kb_pointer.mouse_y}; } + +void trackball_set_cpi(uint16_t cpi) { + kb_config.device_cpi = cpi; + if (!is_keyboard_left()) { + pmw_set_cpi(cpi); + } +} diff --git a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c new file mode 100644 index 000000000..61a6740a2 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c @@ -0,0 +1,199 @@ +/* Copyright 2020 Christopher Courtney (@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 "tractyl_manuform.h" +#include "transactions.h" +#include +#include "drivers/sensors/pmw3360.h" + +#ifndef TRACKBALL_DPI_OPTIONS +# define TRACKBALL_DPI_OPTIONS \ + { 1200, 1600, 2400 } +# ifndef TRACKBALL_DPI_DEFAULT +# define TRACKBALL_DPI_DEFAULT 1 +# endif +#endif +#ifndef TRACKBALL_DPI_DEFAULT +# define TRACKBALL_DPI_DEFAULT 0 +#endif + +keyboard_config_t keyboard_config; +uint16_t dpi_array[] = TRACKBALL_DPI_OPTIONS; +#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) + +bool BurstState = false; // init burst state for Trackball module +uint16_t MotionStart = 0; // Timer for accel, 0 is resting state + +__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int8_t x, int8_t y) { + mouse_report->x = x; + mouse_report->y = y; +} + +__attribute__((weak)) kb_pointer_data_t process_mouse(void) { + kb_pointer_data_t temp_data = {.mouse_x = 0, .mouse_y = 0}; + + report_pmw_t data = pmw_read_burst(); + if (data.isOnSurface && data.isMotion) { + // Reset timer if stopped moving + if (!data.isMotion) { + if (MotionStart != 0) MotionStart = 0; + return temp_data; + } + + // Set timer if new motion + if ((MotionStart == 0) && data.isMotion) { + if (debug_mouse) dprintf("Starting motion.\n"); + MotionStart = timer_read(); + } + + if (debug_mouse) { dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); } + if (debug_mouse) { dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); } +#if defined(PROFILE_LINEAR) + float scale = float(timer_elaspsed(MotionStart)) / 1000.0; + data.dx *= scale; + data.dy *= scale; +#elif defined(PROFILE_INVERSE) + // TODO +#else + // no post processing +#endif + + // Wrap to HID size + data.dx = constrain(data.dx, -127, 127); + data.dy = constrain(data.dy, -127, 127); + if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); + // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); + + temp_data.mouse_x = -data.dx; + temp_data.mouse_y = data.dy; + } + return temp_data; +} + +bool process_record_kb(uint16_t keycode, keyrecord_t* record) { + if (!process_record_user(keycode, record)) { return false; } + +#ifdef POINTING_DEVICE_ENABLE + if (keycode == DPI_CONFIG && record->event.pressed) { + if ((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) { + keyboard_config.dpi_config = (keyboard_config.dpi_config - 1) % DPI_OPTION_SIZE; + } else { + keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE; + } + eeconfig_update_kb(keyboard_config.raw); + trackball_set_cpi(dpi_array[keyboard_config.dpi_config]); + } +#endif + +/* If Mousekeys is disabled, then use handle the mouse button + * keycodes. This makes things simpler, and allows usage of + * the keycodes in a consistent manner. But only do this if + * Mousekeys is not enable, so it's not handled twice. + */ +#ifndef MOUSEKEY_ENABLE + if (IS_MOUSEKEY_BUTTON(keycode)) { + report_mouse_t currentReport = pointing_device_get_report(); + if (record->event.pressed) { + currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); + } else { + currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); + } + pointing_device_set_report(currentReport); + pointing_device_send(); + } +#endif + + return true; +} +__attribute__((weak)) void keyboard_pre_init_sync(void) {} + +// Hardware Setup +void keyboard_pre_init_kb(void) { + // debug_enable = true; + // debug_matrix = true; + // debug_mouse = true; + // debug_encoder = true; + + /* Ground all output pins connected to ground. This provides additional + * pathways to ground. If you're messing with this, know this: driving ANY + * of these pins high will cause a short. On the MCU. Ka-blooey. + */ + + // This is the debug LED. +#if defined(DEBUG_LED_PIN) + setPinOutput(DEBUG_LED_PIN); + writePin(DEBUG_LED_PIN, debug_enable); +#endif + + keyboard_pre_init_sync(); + keyboard_pre_init_user(); +} + +#ifdef POINTING_DEVICE_ENABLE +void pointing_device_init(void) { + if (!is_keyboard_left()) { + // initialize ball sensor + pmw_spi_init(); + } + trackball_set_cpi(dpi_array[keyboard_config.dpi_config]); +} + +void pointing_device_task(void) { + report_mouse_t mouse_report = pointing_device_get_report(); + kb_pointer_data_t data = {.mouse_x = mouse_report.x, .mouse_y = mouse_report.y}; + if (is_keyboard_left()) { + if (is_keyboard_master()) { + data = kb_pointer_sync_get(); + process_mouse_user(&mouse_report, data.mouse_x, data.mouse_y); + } + } else { + data = process_mouse(); + if (!is_keyboard_master()) { + kb_pointer_sync_send(data.mouse_x, data.mouse_y); + } else { + process_mouse_user(&mouse_report, data.mouse_x, data.mouse_y); + } + } + + pointing_device_set_report(mouse_report); + pointing_device_send(); +} +#endif + +void eeconfig_init_kb(void) { + keyboard_config.dpi_config = TRACKBALL_DPI_DEFAULT; +#ifdef POINTING_DEVICE_ENABLE + trackball_set_cpi(dpi_array[keyboard_config.dpi_config]); +#endif + eeconfig_update_kb(keyboard_config.raw); + eeconfig_init_user(); +} + +__attribute__((weak)) void matrix_init_sub_kb(void) {} +void matrix_init_kb(void) { + // is safe to just read DPI setting since matrix init + // comes before pointing device init. + keyboard_config.raw = eeconfig_read_kb(); + if (keyboard_config.dpi_config > DPI_OPTION_SIZE) { eeconfig_init_kb(); } + matrix_init_sub_kb(); + matrix_init_user(); +} + +__attribute__((weak)) void matrix_scan_sub_kb(void) {} +void matrix_scan_kb(void) { + matrix_scan_sub_kb(); + matrix_scan_user(); +} diff --git a/keyboards/handwired/tractyl_manuform/tractyl_manuform.h b/keyboards/handwired/tractyl_manuform/tractyl_manuform.h new file mode 100644 index 000000000..f49569310 --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.h @@ -0,0 +1,57 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . + */ + +#pragma once + +#include "quantum.h" +#include "pointing_device.h" + +#if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right) +# include "5x6_right.h" +#elif defined(KEYBOARD_handwired_tractyl_manuform_4x6_right) +# include "4x6_right.h" +#endif + +typedef union { + uint32_t raw; + struct { + uint8_t dpi_config; + }; +} keyboard_config_t; + +extern keyboard_config_t keyboard_config; + +enum ploopy_keycodes { + DPI_CONFIG = SAFE_RANGE, + KEYMAP_SAFE_RANGE, +}; + +typedef struct { + uint16_t device_cpi; +} kb_config_data_t; + +typedef struct { + int8_t mouse_x; + int8_t mouse_y; +} kb_pointer_data_t; + +kb_pointer_data_t process_mouse(void); +void process_mouse_user(report_mouse_t* mouse_report, int8_t x, int8_t y); +void kb_pointer_sync_send(int8_t x, int8_t y); +kb_pointer_data_t kb_pointer_sync_get(void); +void trackball_set_cpi(uint16_t cpi); +void matrix_init_sub_kb(void); +void matrix_scan_sub_kb(void); diff --git a/keyboards/handwired/traveller/rules.mk b/keyboards/handwired/traveller/rules.mk index 806a19af3..88ed45787 100644 --- a/keyboards/handwired/traveller/rules.mk +++ b/keyboards/handwired/traveller/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c b/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c index 958c17e42..b61867529 100644 --- a/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c +++ b/keyboards/handwired/tritium_numpad/keymaps/blu/keymap.c @@ -6,7 +6,7 @@ void keyboard_pre_init_user(void) setPinOutput(B0); } -uint32_t layer_state_set_user(uint32_t state) +layer_state_t layer_state_set_user(layer_state_t state) { // Switch layer LED accordingly switch (biton32(state)) { @@ -22,19 +22,19 @@ uint32_t layer_state_set_user(uint32_t state) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_ortho_6x4( - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_P4, KC_P5, KC_P6, KC_BSPC, - KC_P1, KC_P2, KC_P3, KC_PENT, - KC_P0, KC_UP, KC_PDOT, TT(1), + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_BSPC, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_UP, KC_PDOT, TT(1), KC_LEFT, KC_DOWN, KC_RGHT, BL_STEP ), [1] = LAYOUT_ortho_6x4( - KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_K, KC_NO, KC_NO, - KC_H, KC_NO, KC_L, KC_NO, - KC_NO, KC_J, KC_NO, KC_NO, - KC_LSFT, KC_Z, KC_X, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_K, KC_NO, KC_NO, + KC_H, KC_NO, KC_L, KC_NO, + KC_NO, KC_J, KC_NO, KC_NO, + KC_LSFT, KC_Z, KC_X, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO ) }; diff --git a/keyboards/handwired/tritium_numpad/rules.mk b/keyboards/handwired/tritium_numpad/rules.mk index 42dfc5cbe..0854ee555 100644 --- a/keyboards/handwired/tritium_numpad/rules.mk +++ b/keyboards/handwired/tritium_numpad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Key at 0,0 makes the keyboard go into bootloader(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) @@ -22,9 +22,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -LAYOUTS = numpad_6x4 ortho_6x4 nontra_6x4 +LAYOUTS = numpad_6x4 ortho_6x4 diff --git a/keyboards/handwired/twadlee/tp69/config.h b/keyboards/handwired/twadlee/tp69/config.h index 0387c7d7e..27c48fb94 100644 --- a/keyboards/handwired/twadlee/tp69/config.h +++ b/keyboards/handwired/twadlee/tp69/config.h @@ -196,25 +196,6 @@ along with this program. If not, see . /* disable these deprecated features by default */ #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/handwired/twadlee/tp69/rules.mk b/keyboards/handwired/twadlee/tp69/rules.mk index b6d70c196..e393238a0 100644 --- a/keyboards/handwired/twadlee/tp69/rules.mk +++ b/keyboards/handwired/twadlee/tp69/rules.mk @@ -4,7 +4,7 @@ MCU = MKL26Z64 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -15,7 +15,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 PS2_MOUSE_ENABLE = no diff --git a/keyboards/handwired/unicomp_mini_m/rules.mk b/keyboards/handwired/unicomp_mini_m/rules.mk index 92cbe9b13..7724cc943 100644 --- a/keyboards/handwired/unicomp_mini_m/rules.mk +++ b/keyboards/handwired/unicomp_mini_m/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/unk/rules.mk b/keyboards/handwired/unk/rules.mk index e4972eb1d..7ce16d550 100644 --- a/keyboards/handwired/unk/rules.mk +++ b/keyboards/handwired/unk/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/videowriter/rules.mk b/keyboards/handwired/videowriter/rules.mk index 38356d996..fa8e52186 100644 --- a/keyboards/handwired/videowriter/rules.mk +++ b/keyboards/handwired/videowriter/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/handwired/wabi/rules.mk b/keyboards/handwired/wabi/rules.mk index f0423ca89..c5a6b0626 100644 --- a/keyboards/handwired/wabi/rules.mk +++ b/keyboards/handwired/wabi/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/woodpad/rules.mk b/keyboards/handwired/woodpad/rules.mk index 8c2c2fbdc..2d87cd58d 100644 --- a/keyboards/handwired/woodpad/rules.mk +++ b/keyboards/handwired/woodpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/wulkan/keymaps/default/keymap.c b/keyboards/handwired/wulkan/keymaps/default/keymap.c index fec8442ee..ad503114f 100644 --- a/keyboards/handwired/wulkan/keymaps/default/keymap.c +++ b/keyboards/handwired/wulkan/keymaps/default/keymap.c @@ -8,21 +8,21 @@ enum layers { }; enum unicode_names { - SE_AA_HIGH, - SE_AE_HIGH, - SE_OE_HIGH, - SE_AA_LOW, - SE_AE_LOW, - SE_OE_LOW, + SE_ARNG_HIGH, + SE_ADIA_HIGH, + SE_ODIA_HIGH, + SE_ARNG_LOW, + SE_ADIA_LOW, + SE_ODIA_LOW, }; const uint32_t PROGMEM unicode_map[] = { - [SE_AA_HIGH] = 0x00C5, - [SE_AE_HIGH] = 0x00C4, - [SE_OE_HIGH] = 0x00D6, - [SE_AA_LOW] = 0x00E5, - [SE_AE_LOW] = 0x00E4, - [SE_OE_LOW] = 0x00F6, + [SE_ARNG_HIGH] = 0x00C5, + [SE_ADIA_HIGH] = 0x00C4, + [SE_ODIA_HIGH] = 0x00D6, + [SE_ARNG_LOW] = 0x00E5, + [SE_ADIA_LOW] = 0x00E4, + [SE_ODIA_LOW] = 0x00F6, }; #define LOWER MO(_LOWER) @@ -95,8 +95,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_ortho_4x12( - _______, RESET, _______, _______, KC_WH_U, _______, _______, KC_MS_U, _______, _______, XP(SE_AA_LOW, SE_AA_HIGH), KC_DEL, - _______, _______, _______, _______, KC_WH_D, _______, KC_MS_L, KC_MS_D, KC_MS_R, XP(SE_OE_LOW, SE_OE_HIGH), XP(SE_AE_LOW, SE_AE_HIGH), _______, + _______, RESET, _______, _______, KC_WH_U, _______, _______, KC_MS_U, _______, _______, XP(SE_ARNG_LOW, SE_ARNG_HIGH), KC_DEL, + _______, _______, _______, _______, KC_WH_D, _______, KC_MS_L, KC_MS_D, KC_MS_R, XP(SE_ODIA_LOW, SE_ODIA_HIGH), XP(SE_ADIA_LOW, SE_ADIA_HIGH), _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, KC_BTN1, _______, KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/handwired/wulkan/rules.mk b/keyboards/handwired/wulkan/rules.mk index 83f0d7f48..a5fed9a51 100644 --- a/keyboards/handwired/wulkan/rules.mk +++ b/keyboards/handwired/wulkan/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -18,7 +18,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover AUDIO_ENABLE = no RGBLIGHT_ENABLE = no LAYOUTS = ortho_4x12 -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID NO_SUSPEND_POWER_DOWN = yes diff --git a/keyboards/handwired/xealous/rules.mk b/keyboards/handwired/xealous/rules.mk index 2d816ab7c..4aeb76922 100644 --- a/keyboards/handwired/xealous/rules.mk +++ b/keyboards/handwired/xealous/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID @@ -34,8 +33,6 @@ SUBPROJECT_rev1 = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SRC += matrix.c -DEBOUNCE_TYPE = eager_pk - -LAYOUTS = split60 +DEBOUNCE_TYPE = sym_eager_pk DEFAULT_FOLDER = handwired/xealous/rev1 diff --git a/keyboards/handwired/xealousbrown/matrix.c b/keyboards/handwired/xealousbrown/matrix.c index ba86ab7af..f27a13df7 100644 --- a/keyboards/handwired/xealousbrown/matrix.c +++ b/keyboards/handwired/xealousbrown/matrix.c @@ -100,7 +100,7 @@ uint8_t matrix_scan_custom(matrix_row_t current_matrix[]) { // Set row, read cols for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { select_row(current_row); - matrix_output_select_delay(); + matrix_output_unselect_delay(current_row, changed); matrix_row_t cols = read_cols(); changed |= (current_matrix[current_row] != cols); @@ -108,9 +108,8 @@ uint8_t matrix_scan_custom(matrix_row_t current_matrix[]) { unselect_rows(); //this internally calls matrix_io_delay() - matrix_output_unselect_delay(); + matrix_output_unselect_delay(current_row, changed); } return changed; } - diff --git a/keyboards/handwired/xealousbrown/rules.mk b/keyboards/handwired/xealousbrown/rules.mk index 04a01ec6b..0174baff6 100644 --- a/keyboards/handwired/xealousbrown/rules.mk +++ b/keyboards/handwired/xealousbrown/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/z150/rules.mk b/keyboards/handwired/z150/rules.mk index b9b242568..b99c75a19 100644 --- a/keyboards/handwired/z150/rules.mk +++ b/keyboards/handwired/z150/rules.mk @@ -10,7 +10,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/zergo/rules.mk b/keyboards/handwired/zergo/rules.mk index ea5530ffa..8f0fa0209 100644 --- a/keyboards/handwired/zergo/rules.mk +++ b/keyboards/handwired/zergo/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hardlineworks/otd_plus/config.h b/keyboards/hardlineworks/otd_plus/config.h index 5474dbfee..15e6df758 100644 --- a/keyboards/hardlineworks/otd_plus/config.h +++ b/keyboards/hardlineworks/otd_plus/config.h @@ -20,8 +20,8 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -#define CAPS_LOCK_LED_PIN F4 -#define SCROLL_LOCK_LED_PIN D5 +#define LED_CAPS_LOCK_PIN F4 +#define LED_SCROLL_LOCK_PIN D5 /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/hardlineworks/otd_plus/otd_plus.c b/keyboards/hardlineworks/otd_plus/otd_plus.c index f7f96800d..29d395d28 100644 --- a/keyboards/hardlineworks/otd_plus/otd_plus.c +++ b/keyboards/hardlineworks/otd_plus/otd_plus.c @@ -1,12 +1 @@ #include "otd_plus.h" - -void keyboard_pre_init_kb(void) { - led_init_ports(); - keyboard_pre_init_user(); -} -void led_init_ports(void) { - setPinOutput(CAPS_LOCK_LED_PIN); - setPinOutput(SCROLL_LOCK_LED_PIN); -} - - diff --git a/keyboards/hardlineworks/otd_plus/rules.mk b/keyboards/hardlineworks/otd_plus/rules.mk index e07b7a000..4ab24eb89 100644 --- a/keyboards/hardlineworks/otd_plus/rules.mk +++ b/keyboards/hardlineworks/otd_plus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hecomi/alpha/config.h b/keyboards/hecomi/alpha/config.h index cdb06f66f..1fd634a3c 100644 --- a/keyboards/hecomi/alpha/config.h +++ b/keyboards/hecomi/alpha/config.h @@ -183,26 +183,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hecomi/alpha/rules.mk b/keyboards/hecomi/alpha/rules.mk index 002be917f..aa424cf46 100644 --- a/keyboards/hecomi/alpha/rules.mk +++ b/keyboards/hecomi/alpha/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/hecomi/rules.mk b/keyboards/hecomi/rules.mk index f91432cad..abd4a8553 100644 --- a/keyboards/hecomi/rules.mk +++ b/keyboards/hecomi/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/heliar/wm1_hotswap/rules.mk b/keyboards/heliar/wm1_hotswap/rules.mk index 74214d81a..fd7bab90a 100644 --- a/keyboards/heliar/wm1_hotswap/rules.mk +++ b/keyboards/heliar/wm1_hotswap/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu ## Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/helix/pico/keymaps/default/config.h b/keyboards/helix/pico/keymaps/default/config.h index 765318519..0bd76a18b 100644 --- a/keyboards/helix/pico/keymaps/default/config.h +++ b/keyboards/helix/pico/keymaps/default/config.h @@ -36,7 +36,6 @@ along with this program. If not, see . #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 diff --git a/keyboards/helix/pico/local_features.mk b/keyboards/helix/pico/local_features.mk index 25dcb8b6d..be5c739f9 100644 --- a/keyboards/helix/pico/local_features.mk +++ b/keyboards/helix/pico/local_features.mk @@ -138,7 +138,6 @@ ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) $(eval $(call HELIX_CUSTOMISE_MSG)) ifneq ($(strip $(SHOW_VERBOSE_INFO)),) $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE)) - $(info -- OLED_DRIVER_ENABLE = $(OLED_DRIVER_ENABLE)) $(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE)) $(info -- OPT_DEFS = $(OPT_DEFS)) $(info -- SPLIT_KEYBOARD = $(SPLIT_KEYBOARD)) @@ -146,3 +145,5 @@ ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) $(info ) endif endif + +OLED_ENABLE = no # disable OLED in TOP/common_features.mk diff --git a/keyboards/helix/rev2/config.h b/keyboards/helix/rev2/config.h index 73f0c6199..041acee21 100644 --- a/keyboards/helix/rev2/config.h +++ b/keyboards/helix/rev2/config.h @@ -42,8 +42,8 @@ along with this program. If not, see . // #define EE_HANDS // Helix keyboard OLED support -// see ./rules.mk: OLED_ENABLE=yes or no -#ifdef OLED_ENABLE +// see ./local_features.mk: OLED_SELECT=local +#ifdef OLED_LOCAL_ENABLE #define SSD1306OLED #endif diff --git a/keyboards/helix/rev2/keymaps/default/oled_display.c b/keyboards/helix/rev2/keymaps/default/oled_display.c index 04d6408c6..36a7cf0b1 100644 --- a/keyboards/helix/rev2/keymaps/default/oled_display.c +++ b/keyboards/helix/rev2/keymaps/default/oled_display.c @@ -36,9 +36,9 @@ enum layer_number { }; //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#if defined(SSD1306OLED) || defined(OLED_DRIVER_ENABLE) +#if defined(SSD1306OLED) || defined(OLED_ENABLE) -# if defined(OLED_DRIVER_ENABLE) +# if defined(OLED_ENABLE) oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) { return OLED_ROTATION_0; diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index 206e836ec..c16f3e2b8 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -5,7 +5,7 @@ # See TOP/keyboards/helix/rules.mk for a list of options that can be set. # See TOP/docs/config_options.md for more information. # -LTO_ENABLE = no # if firmware size over limit, try this option +LTO_ENABLE = yes # if firmware size over limit, try this option # Helix Spacific Build Options # you can uncomment and edit follows 7 Variables diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c index 4bbab1dc4..500a7bbf1 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c @@ -2,7 +2,7 @@ #include #include "oled.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_host_led_state(void) { char led_state_str[24]; uint8_t leds = host_keyboard_leds(); @@ -65,4 +65,4 @@ void oled_task_user(void) { render_logo(); } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/helix/rev2/keymaps/five_rows/oled_display.c b/keyboards/helix/rev2/keymaps/five_rows/oled_display.c index 689efe4c8..090e8aaec 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/oled_display.c +++ b/keyboards/helix/rev2/keymaps/five_rows/oled_display.c @@ -35,9 +35,9 @@ void init_helix_oled(void) { } //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#if defined(SSD1306OLED) || defined(OLED_DRIVER_ENABLE) +#if defined(SSD1306OLED) || defined(OLED_ENABLE) -# if defined(OLED_DRIVER_ENABLE) +# if defined(OLED_ENABLE) oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) { return OLED_ROTATION_0; diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk index 58b7ef4ef..e59ce7332 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk @@ -31,7 +31,6 @@ ifneq ($(strip $(HELIX)),) $(if $(SHOW_PARCE),$(info parse -$1-)) #debug ifeq ($(strip $1),dispoff) OLED_ENABLE = no - OLED_DRIVER_ENABLE = no LED_BACK_ENABLE = no LED_UNDERGLOW_ENABLE = no endif diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c index 0dae2524d..a22a4b166 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/keymap.c @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_BASE] = LAYOUT( \ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \ - JP_ZHTG, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, \ + JP_ZKHK, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, \ KC_LCTL, KC_LALT, KC_LGUI, ML_ADJ, ML_LOW, KC_SPC, KC_BSPC, KC_SPC, KC_SPC, ML_RAI, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT \ @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, \ KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, \ KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, \ - KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_ENT, JP_ZHTG, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \ + KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_ENT, JP_ZKHK, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, \ KC_SPC, ML_RAIE, JP_RBRC, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT, ML_ADJ, KC_LCTL, KC_LALT, KC_LGUI, JP_LBRC, ML_LOWE, KC_BSPC \ ), diff --git a/keyboards/helix/rev2/keymaps/fraanrosi/config.h b/keyboards/helix/rev2/keymaps/fraanrosi/config.h index c8da81057..6c816d0ac 100644 --- a/keyboards/helix/rev2/keymaps/fraanrosi/config.h +++ b/keyboards/helix/rev2/keymaps/fraanrosi/config.h @@ -25,7 +25,9 @@ along with this program. If not, see . // If you need more program area, try select and reduce rgblight modes to use. -#define RGBLIGHT_ANIMATIONS +#ifndef LED_ANIMATIONS +# define LED_ANIMATIONS +#endif // Selection of RGBLIGHT MODE to use. #if defined(LED_ANIMATIONS) @@ -38,6 +40,7 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_STATIC_GRADIENT #define RGBLIGHT_EFFECT_RGB_TEST #define RGBLIGHT_EFFECT_ALTERNATING + #define RGBLIGHT_EFFECT_TWINKLE #endif #undef RGBLIGHT_HUE_STEP diff --git a/keyboards/helix/rev2/keymaps/froggy_106/keymap.c b/keyboards/helix/rev2/keymaps/froggy_106/keymap.c index d32c4fa0c..3a433e56f 100644 --- a/keyboards/helix/rev2/keymaps/froggy_106/keymap.c +++ b/keyboards/helix/rev2/keymaps/froggy_106/keymap.c @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), L_SYM, L_NUM, OPT_TAP_SP, KC_ENT, _______, _______, _______, _______, _______, _______, _______ \ ), [_BASE_106] = LAYOUT( \ - LCTL(KC_Z), JP_SCLN, JP_LBRC, JP_LPRN, JP_LT, JP_LCBR, _______, _______, _______, _______, _______, _______, \ + LCTL(KC_Z), JP_SCLN, JP_LBRC, JP_LPRN, JP_LABK, JP_LCBR, _______, _______, _______, _______, _______, _______, \ KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \ KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \ OSM(MOD_LSFT), KC_Y, KC_S, KC_N, KC_I, KC_U, KC_SPC, _______, _______, _______, _______, _______, _______, _______, \ @@ -131,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______,_______, KC_COMM,DESKTOP, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), [_OPT_106] = LAYOUT( \ - KC_ESC, JP_COLN,JP_RBRC, JP_RPRN,JP_GT, JP_RCBR, _______, _______, _______, _______, _______, _______, \ + KC_ESC, JP_COLN,JP_RBRC, JP_RPRN,JP_RABK, JP_RCBR, _______, _______, _______, _______, _______, _______, \ EISU, KC_J, KC_M, KC_B, JP_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \ KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \ _______, KC_X, KC_G, KC_W, JP_MINS, KC_DEL, KC_ESC, _______, _______, _______, _______, _______, _______, _______, \ @@ -363,7 +363,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //case JP_SCLN: // == KC_SCLN case JP_LBRC: case JP_LPRN: - //case JP_LT: // == KC_LT + //case JP_LABK: // == KC_LT case JP_LCBR: if (IS_MODE_106()) { if (keycode == KC_LBRC || keycode == KC_LPRN || keycode == KC_LCBR) diff --git a/keyboards/helix/rev2/keymaps/xulkal/rules.mk b/keyboards/helix/rev2/keymaps/xulkal/rules.mk index 7fac4df7e..bdf0479a4 100644 --- a/keyboards/helix/rev2/keymaps/xulkal/rules.mk +++ b/keyboards/helix/rev2/keymaps/xulkal/rules.mk @@ -4,7 +4,8 @@ OPT_DEFS += -DRGBLIGHT_ANIMATIONS # Helix specific define for correct RGBLED_NUM OPT_DEFS += -DRGBLED_BACK -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Helix specific font file OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" # Xulkal specific oled define diff --git a/keyboards/helix/rev2/local_features.mk b/keyboards/helix/rev2/local_features.mk index ce3853a02..47e8c6a83 100644 --- a/keyboards/helix/rev2/local_features.mk +++ b/keyboards/helix/rev2/local_features.mk @@ -156,17 +156,20 @@ endif ifeq ($(strip $(OLED_ENABLE)), yes) ifeq ($(strip $(OLED_SELECT)),core) - OLED_DRIVER_ENABLE = yes + OLED_ENABLE = yes + OLED_DRIVER = SSD1306 ifeq ($(strip $(LOCAL_GLCDFONT)), yes) OPT_DEFS += -DOLED_FONT_H=\ else OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" endif else + OLED_ENABLE = no # disable OLED in TOP/common_features.mk + OLED_LOCAL_ENABLE = yes SRC += local_drivers/i2c.c SRC += local_drivers/ssd1306.c KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers - OPT_DEFS += -DOLED_ENABLE + OPT_DEFS += -DOLED_LOCAL_ENABLE ifeq ($(strip $(LOCAL_GLCDFONT)), yes) OPT_DEFS += -DLOCAL_GLCDFONT endif @@ -177,7 +180,8 @@ ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) $(eval $(call HELIX_CUSTOMISE_MSG)) ifneq ($(strip $(SHOW_VERBOSE_INFO)),) $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE)) - $(info -- OLED_DRIVER_ENABLE = $(OLED_DRIVER_ENABLE)) + $(info -- OLED_DRIVER = $(OLED_DRIVER)) + $(info -- OLED_LOCAL_ENABLE = $(OLED_LOCAL_ENABLE)) $(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE)) $(info -- OPT_DEFS = $(OPT_DEFS)) $(info -- SPLIT_KEYBOARD = $(SPLIT_KEYBOARD)) diff --git a/keyboards/helix/rev3_4rows/config.h b/keyboards/helix/rev3_4rows/config.h index 9102104bf..aa9e1d6dc 100644 --- a/keyboards/helix/rev3_4rows/config.h +++ b/keyboards/helix/rev3_4rows/config.h @@ -68,7 +68,7 @@ along with this program. If not, see . # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) @@ -218,26 +218,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/helix/rev3_4rows/oled_display.c b/keyboards/helix/rev3_4rows/oled_display.c index 7716a172c..23edbf7be 100644 --- a/keyboards/helix/rev3_4rows/oled_display.c +++ b/keyboards/helix/rev3_4rows/oled_display.c @@ -35,7 +35,7 @@ enum layer_names { _ADJUST }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_status(void) { diff --git a/keyboards/helix/rev3_4rows/rev3_4rows.c b/keyboards/helix/rev3_4rows/rev3_4rows.c index 4477b3922..7b3294110 100644 --- a/keyboards/helix/rev3_4rows/rev3_4rows.c +++ b/keyboards/helix/rev3_4rows/rev3_4rows.c @@ -31,7 +31,7 @@ void set_mac_mode(bool macmode) { } #ifdef DIP_SWITCH_ENABLE -void dip_switch_update_kb(uint8_t index, bool active) { +bool dip_switch_update_kb(uint8_t index, bool active) { switch (index) { case 0: if(active) { // Left no.1 Helix rev3 common @@ -44,5 +44,6 @@ void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); break; } + return true; } #endif diff --git a/keyboards/helix/rev3_4rows/rules.mk b/keyboards/helix/rev3_4rows/rules.mk index 530d1d750..f29deaf58 100644 --- a/keyboards/helix/rev3_4rows/rules.mk +++ b/keyboards/helix/rev3_4rows/rules.mk @@ -3,7 +3,8 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow SPLIT_KEYBOARD = yes RGB_MATRIX_ENABLE = no RGB_MATRIX_DRIVER = WS2812 -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes DIP_SWITCH_ENABLE = no LTO_ENABLE = yes diff --git a/keyboards/helix/rev3_5rows/config.h b/keyboards/helix/rev3_5rows/config.h index 4dda76206..ebe1e41c8 100644 --- a/keyboards/helix/rev3_5rows/config.h +++ b/keyboards/helix/rev3_5rows/config.h @@ -68,7 +68,7 @@ along with this program. If not, see . # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) @@ -218,26 +218,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c index 689efe4c8..090e8aaec 100644 --- a/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c @@ -35,9 +35,9 @@ void init_helix_oled(void) { } //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#if defined(SSD1306OLED) || defined(OLED_DRIVER_ENABLE) +#if defined(SSD1306OLED) || defined(OLED_ENABLE) -# if defined(OLED_DRIVER_ENABLE) +# if defined(OLED_ENABLE) oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) { return OLED_ROTATION_0; diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/rules.mk b/keyboards/helix/rev3_5rows/keymaps/five_rows/rules.mk index 734479764..d10972bbd 100644 --- a/keyboards/helix/rev3_5rows/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/rules.mk @@ -19,7 +19,7 @@ ifneq ($(strip $(HELIX)),) # parse 'dispoff', 'consle', 'back', 'oled', 'no-ani', 'mini-ani', 'lto', 'no-lto', 'no-enc', 'scan' $(if $(SHOW_PARCE),$(info parse .$1.)) #debug ifeq ($(strip $1),dispoff) - OLED_DRIVER_ENABLE = no + OLED_ENABLE = no RGBLIGHT_ENABLE = no endif ifeq ($(strip $1),console) @@ -38,7 +38,7 @@ ifneq ($(strip $(HELIX)),) ENCODER_ENABLE = no endif ifeq ($(strip $1),oled) - OLED_DRIVER_ENABLE = yes + OLED_ENABLE = yes endif ifeq ($(strip $1),back) RGBLIGHT_ENABLE = yes diff --git a/keyboards/helix/rev3_5rows/oled_display.c b/keyboards/helix/rev3_5rows/oled_display.c index ffe8b594b..fbaa9bc56 100644 --- a/keyboards/helix/rev3_5rows/oled_display.c +++ b/keyboards/helix/rev3_5rows/oled_display.c @@ -35,7 +35,7 @@ enum layer_names { _ADJUST }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_status(void) { diff --git a/keyboards/helix/rev3_5rows/rev3_5rows.c b/keyboards/helix/rev3_5rows/rev3_5rows.c index 4477b3922..7b3294110 100644 --- a/keyboards/helix/rev3_5rows/rev3_5rows.c +++ b/keyboards/helix/rev3_5rows/rev3_5rows.c @@ -31,7 +31,7 @@ void set_mac_mode(bool macmode) { } #ifdef DIP_SWITCH_ENABLE -void dip_switch_update_kb(uint8_t index, bool active) { +bool dip_switch_update_kb(uint8_t index, bool active) { switch (index) { case 0: if(active) { // Left no.1 Helix rev3 common @@ -44,5 +44,6 @@ void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); break; } + return true; } #endif diff --git a/keyboards/helix/rev3_5rows/rules.mk b/keyboards/helix/rev3_5rows/rules.mk index 530d1d750..f29deaf58 100644 --- a/keyboards/helix/rev3_5rows/rules.mk +++ b/keyboards/helix/rev3_5rows/rules.mk @@ -3,7 +3,8 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow SPLIT_KEYBOARD = yes RGB_MATRIX_ENABLE = no RGB_MATRIX_DRIVER = WS2812 -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes DIP_SWITCH_ENABLE = no LTO_ENABLE = yes diff --git a/keyboards/helix/rules.mk b/keyboards/helix/rules.mk index 54a4d774f..ef12cb305 100644 --- a/keyboards/helix/rules.mk +++ b/keyboards/helix/rules.mk @@ -17,14 +17,13 @@ BOOTLOADER = caterina # # See TOP/docs/config_options.md for more information. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk b/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk index a85669aa2..4e4deffa1 100644 --- a/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h index 916a403eb..0b811fd03 100644 --- a/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h +++ b/keyboards/hhkb/ansi/keymaps/shela/keymap_jis2us.h @@ -40,10 +40,10 @@ const uint16_t PROGMEM keymap_jis2us[][2] = { [KC_BSLS] = { JP_YEN, JP_PIPE }, /* ] and } -> \ and | */ [KC_NUHS] = { JP_YEN, JP_PIPE }, /* ] and } -> \ and | */ [KC_SCLN] = { JP_SCLN, JP_COLN }, /* ; and + -> ; and : */ - [KC_QUOT] = { JP_QUOT, JP_DQT }, /* : and * -> ' and " */ + [KC_QUOT] = { JP_QUOT, JP_DQUO }, /* : and * -> ' and " */ [KC_GRV] = { JP_GRV, JP_TILD }, /* Han/Zen -> ` and ~ */ - [KC_COMM] = { JP_COMM, JP_LT }, /* , and < -> , and < */ - [KC_DOT] = { JP_DOT, JP_GT }, /* . and > -> . and > */ + [KC_COMM] = { JP_COMM, JP_LABK }, /* , and < -> , and < */ + [KC_DOT] = { JP_DOT, JP_RABK }, /* . and > -> . and > */ [KC_SLSH] = { JP_SLSH, JP_QUES }, /* / and ? -> / and ? */ }; // clang-format on diff --git a/keyboards/hhkb/ansi/matrix.c b/keyboards/hhkb/ansi/matrix.c index 879eb337c..529ba8b8f 100644 --- a/keyboards/hhkb/ansi/matrix.c +++ b/keyboards/hhkb/ansi/matrix.c @@ -26,6 +26,7 @@ along with this program. If not, see . #include "util.h" #include "timer.h" #include "matrix.h" +#include "avr/timer_avr.h" #include "hhkb_avr.h" #include #include "suspend.h" diff --git a/keyboards/hhkb/ansi/rules.mk b/keyboards/hhkb/ansi/rules.mk index 3ff7170e0..56c7fd771 100644 --- a/keyboards/hhkb/ansi/rules.mk +++ b/keyboards/hhkb/ansi/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,7 @@ CUSTOM_MATRIX = yes # Custom matrix file for the HHKB # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend # NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = yes # MIDI controls +MIDI_ENABLE = no # MIDI support # UNICODE_ENABLE = yes # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/hhkb/jp/matrix.c b/keyboards/hhkb/jp/matrix.c index fed2b3c3a..c0dca6a99 100644 --- a/keyboards/hhkb/jp/matrix.c +++ b/keyboards/hhkb/jp/matrix.c @@ -26,6 +26,7 @@ along with this program. If not, see . #include "util.h" #include "timer.h" #include "matrix.h" +#include "avr/timer_avr.h" #include "hhkb_avr.h" #include #include "suspend.h" diff --git a/keyboards/hhkb/jp/rules.mk b/keyboards/hhkb/jp/rules.mk index f1294ed61..1902cf432 100644 --- a/keyboards/hhkb/jp/rules.mk +++ b/keyboards/hhkb/jp/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,7 @@ CUSTOM_MATRIX = yes # Custom matrix file for the HHKB # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend # NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = yes # MIDI controls +MIDI_ENABLE = no # MIDI support # UNICODE_ENABLE = yes # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/hhkb_lite_2/rules.mk b/keyboards/hhkb_lite_2/rules.mk index aa224ffe4..049e5a76f 100644 --- a/keyboards/hhkb_lite_2/rules.mk +++ b/keyboards/hhkb_lite_2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h index e0f92dee8..73ed005b7 100755 --- a/keyboards/hid_liber/config.h +++ b/keyboards/hid_liber/config.h @@ -140,24 +140,4 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/hid_liber/keymaps/bakageta/rules.mk b/keyboards/hid_liber/keymaps/bakageta/rules.mk index 1697e07c5..8cb28dd5d 100755 --- a/keyboards/hid_liber/keymaps/bakageta/rules.mk +++ b/keyboards/hid_liber/keymaps/bakageta/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/hid_liber/rules.mk b/keyboards/hid_liber/rules.mk index ea64be00d..118d1fe9b 100755 --- a/keyboards/hid_liber/rules.mk +++ b/keyboards/hid_liber/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -26,7 +26,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/hidtech/bastyl/rules.mk b/keyboards/hidtech/bastyl/rules.mk index cc88208e3..fc12eaf0f 100644 --- a/keyboards/hidtech/bastyl/rules.mk +++ b/keyboards/hidtech/bastyl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hifumi/rules.mk b/keyboards/hifumi/rules.mk index 539fb7790..8c0146e7a 100644 --- a/keyboards/hifumi/rules.mk +++ b/keyboards/hifumi/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/hineybush/h10/rules.mk b/keyboards/hineybush/h10/rules.mk index 730ceccf7..fd5c198a7 100644 --- a/keyboards/hineybush/h10/rules.mk +++ b/keyboards/hineybush/h10/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -18,7 +18,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/hineybush/h60/rules.mk b/keyboards/hineybush/h60/rules.mk index 3046ecffd..cd766bcd4 100644 --- a/keyboards/hineybush/h60/rules.mk +++ b/keyboards/hineybush/h60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -18,7 +18,6 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/hineybush/h660s/rules.mk b/keyboards/hineybush/h660s/rules.mk index bfa9a933f..096da003c 100644 --- a/keyboards/hineybush/h660s/rules.mk +++ b/keyboards/hineybush/h660s/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hineybush/h75_singa/config.h b/keyboards/hineybush/h75_singa/config.h index c2b3f65a8..f20c07f80 100644 --- a/keyboards/hineybush/h75_singa/config.h +++ b/keyboards/hineybush/h75_singa/config.h @@ -188,26 +188,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hineybush/h75_singa/rules.mk b/keyboards/hineybush/h75_singa/rules.mk index b4c66cbc2..76705259a 100644 --- a/keyboards/hineybush/h75_singa/rules.mk +++ b/keyboards/hineybush/h75_singa/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c b/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c index fde263715..d59438f6b 100644 --- a/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c +++ b/keyboards/hineybush/h87a/keymaps/gam3cat/keymap.c @@ -244,7 +244,7 @@ void matrix_scan_user(void) { } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case _BL: custom_backlight_level(0); diff --git a/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk b/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk index 8ac43eadb..7b35b9017 100644 --- a/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk +++ b/keyboards/hineybush/h87a/keymaps/gam3cat/rules.mk @@ -4,7 +4,7 @@ # TAP_DANCE_ENABLE = no # Enable TapDance functionality RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+1500) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -18,6 +18,5 @@ UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 #VARIABLE_TRACE = no # Use this to debug changes to variable values -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/hineybush/h87a/rules.mk b/keyboards/hineybush/h87a/rules.mk index c4a2d842a..10fd20ad7 100644 --- a/keyboards/hineybush/h87a/rules.mk +++ b/keyboards/hineybush/h87a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/hineybush/h88/rules.mk b/keyboards/hineybush/h88/rules.mk index 5e0d1726f..917aa0bfa 100644 --- a/keyboards/hineybush/h88/rules.mk +++ b/keyboards/hineybush/h88/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/hineybush/hbcp/rules.mk b/keyboards/hineybush/hbcp/rules.mk index c6441d0e8..1405a1d49 100644 --- a/keyboards/hineybush/hbcp/rules.mk +++ b/keyboards/hineybush/hbcp/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/hineybush/hineyg80/rules.mk b/keyboards/hineybush/hineyg80/rules.mk index f1d011ad6..6e747adc4 100644 --- a/keyboards/hineybush/hineyg80/rules.mk +++ b/keyboards/hineybush/hineyg80/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/hineybush/physix/config.h b/keyboards/hineybush/physix/config.h index 57544e197..4c5879b08 100644 --- a/keyboards/hineybush/physix/config.h +++ b/keyboards/hineybush/physix/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hineybush/physix/rules.mk b/keyboards/hineybush/physix/rules.mk index ca67560c2..5d8ebe07f 100644 --- a/keyboards/hineybush/physix/rules.mk +++ b/keyboards/hineybush/physix/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/hineybush/sm68/config.h b/keyboards/hineybush/sm68/config.h index b9cca329c..344def6eb 100644 --- a/keyboards/hineybush/sm68/config.h +++ b/keyboards/hineybush/sm68/config.h @@ -184,26 +184,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/hineybush/sm68/rules.mk b/keyboards/hineybush/sm68/rules.mk index 7ce1eab6d..54bb816fc 100644 --- a/keyboards/hineybush/sm68/rules.mk +++ b/keyboards/hineybush/sm68/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/holyswitch/southpaw75/rules.mk b/keyboards/holyswitch/southpaw75/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/holyswitch/southpaw75/rules.mk +++ b/keyboards/holyswitch/southpaw75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/honeycomb/rules.mk b/keyboards/honeycomb/rules.mk index a9a01d867..fe5ed813e 100755 --- a/keyboards/honeycomb/rules.mk +++ b/keyboards/honeycomb/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite #MOUSEKEY_ENABLE = yes # Mouse keys POINTING_DEVICE_ENABLE = yes # Generic Pointer, not as big as mouse keys hopefully. EXTRAKEY_ENABLE = yes # Audio control and System control @@ -25,7 +25,7 @@ CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/hotdox/rules.mk b/keyboards/hotdox/rules.mk index dd175e9f6..c180f985a 100644 --- a/keyboards/hotdox/rules.mk +++ b/keyboards/hotdox/rules.mk @@ -16,7 +16,7 @@ BOOTLOADER = atmel-dfu # CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDone UNICODE_ENABLE = yes # Unicode -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -27,7 +27,6 @@ USB_6KRO_ENABLE = no # USB 6key Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality SWAP_HANDS_ENABLE = no # Disable Onehand RGBLIGHT_ENABLE = no -MIDI_ENABLE = no # project specific files SRC = matrix.c \ diff --git a/keyboards/hp69/rules.mk b/keyboards/hp69/rules.mk index 13e88cfe2..d9c7ee0e5 100644 --- a/keyboards/hp69/rules.mk +++ b/keyboards/hp69/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h index 68c75b2af..41246b6ee 100644 --- a/keyboards/hs60/v1/config.h +++ b/keyboards/hs60/v1/config.h @@ -118,7 +118,7 @@ along with this program. If not, see . //#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 215 #define DRIVER_ADDR_1 0b1110100 diff --git a/keyboards/hs60/v1/rules.mk b/keyboards/hs60/v1/rules.mk index 5a261bf6e..0cba72e57 100644 --- a/keyboards/hs60/v1/rules.mk +++ b/keyboards/hs60/v1/rules.mk @@ -19,7 +19,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -29,7 +29,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/hs60/v1/v1.c b/keyboards/hs60/v1/v1.c index 70c1c2128..58b19b640 100644 --- a/keyboards/hs60/v1/v1.c +++ b/keyboards/hs60/v1/v1.c @@ -91,7 +91,7 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) #ifdef HS60_ANSI -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -199,7 +199,7 @@ led_config_t g_led_config = { { #else -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/hs60/v2/ansi/rules.mk b/keyboards/hs60/v2/ansi/rules.mk index 1a0c1abbd..4ec0d8ef3 100644 --- a/keyboards/hs60/v2/ansi/rules.mk +++ b/keyboards/hs60/v2/ansi/rules.mk @@ -14,7 +14,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -31,6 +31,6 @@ LAYOUTS = 60_ansi # project specific files SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ - drivers/issi/is31fl3733.c \ + drivers/led/issi/is31fl3733.c \ quantum/color.c \ - drivers/chibios/i2c_master.c + i2c_master.c diff --git a/keyboards/hs60/v2/hhkb/rules.mk b/keyboards/hs60/v2/hhkb/rules.mk index 87d86ccd4..da021bdfa 100644 --- a/keyboards/hs60/v2/hhkb/rules.mk +++ b/keyboards/hs60/v2/hhkb/rules.mk @@ -14,7 +14,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -29,6 +29,6 @@ CIE1931_CURVE = yes # project specific files SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ - drivers/issi/is31fl3733.c \ + drivers/led/issi/is31fl3733.c \ quantum/color.c \ - drivers/chibios/i2c_master.c + i2c_master.c diff --git a/keyboards/hs60/v2/iso/rules.mk b/keyboards/hs60/v2/iso/rules.mk index 53b801289..50c50b3aa 100644 --- a/keyboards/hs60/v2/iso/rules.mk +++ b/keyboards/hs60/v2/iso/rules.mk @@ -14,7 +14,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -31,6 +31,6 @@ LAYOUTS = 60_iso # project specific files SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ - drivers/issi/is31fl3733.c \ + drivers/led/issi/is31fl3733.c \ quantum/color.c \ - drivers/chibios/i2c_master.c + i2c_master.c diff --git a/keyboards/hub16/keymaps/peepeetee/rules.mk b/keyboards/hub16/keymaps/peepeetee/rules.mk index 384d149ae..976443cf4 100644 --- a/keyboards/hub16/keymaps/peepeetee/rules.mk +++ b/keyboards/hub16/keymaps/peepeetee/rules.mk @@ -1 +1 @@ -BOOTMAGIC_ENABLE = lite \ No newline at end of file +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite \ No newline at end of file diff --git a/keyboards/hub16/rules.mk b/keyboards/hub16/rules.mk index 07d286c17..6bd1f0fbd 100755 --- a/keyboards/hub16/rules.mk +++ b/keyboards/hub16/rules.mk @@ -4,7 +4,7 @@ BOOTLOADER = caterina # Build Options CUSTOM_MATRIX = lite # Custom scanning of matrix -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hub20/keymaps/left_hand_numpad/keymap.c b/keyboards/hub20/keymaps/left_hand_numpad/keymap.c index 395ebc15b..b5817ab3c 100644 --- a/keyboards/hub20/keymaps/left_hand_numpad/keymap.c +++ b/keyboards/hub20/keymaps/left_hand_numpad/keymap.c @@ -15,15 +15,13 @@ */ #include QMK_KEYBOARD_H - - // #define LED_MERGE_NUMPAD_LEFT_HANDED_PLUS TRUE // #define LED_MERGE_NUMPAD_LEFT_HANDED_ENTER TRUE // #define LED_MERGE_NUMPAD_LEFT_HANDED_ZERO TRUE +#define MO_NLCK LT(1, KC_NLCK) // Numlock on tap, layer change on hold -#define MO_NLCK LT(1, KC_NLCK) // Numlock on tap, layer change on hold - +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_left_handed( KC_MUTE, KC_MPLY, @@ -42,8 +40,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______ ) }; +// clang-format of -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { /* Left Encoder */ if (clockwise) { tap_code(KC_VOLU); @@ -57,5 +56,5 @@ void encoder_update_user(uint8_t index, bool clockwise) { tap_code(KC_MPRV); } } + return true; } - diff --git a/keyboards/hub20/keymaps/right_hand_numpad/keymap.c b/keyboards/hub20/keymaps/right_hand_numpad/keymap.c index 89466d31b..ad3e5f49a 100644 --- a/keyboards/hub20/keymaps/right_hand_numpad/keymap.c +++ b/keyboards/hub20/keymaps/right_hand_numpad/keymap.c @@ -15,15 +15,13 @@ */ #include QMK_KEYBOARD_H - - // #define LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS TRUE // #define LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER TRUE // #define LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO TRUE +#define MO_NLCK LT(1, KC_NLCK) // Numlock on tap, layer change on hold -#define MO_NLCK LT(1, KC_NLCK) // Numlock on tap, layer change on hold - +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //NOT TESTED, WAITING ENDORSEMENT FROM MANUFACTURER @@ -44,11 +42,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______ ) }; +// clang-format on - - - -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { /* Left Encoder */ if (clockwise) { tap_code(KC_VOLU); @@ -62,5 +58,5 @@ void encoder_update_user(uint8_t index, bool clockwise) { tap_code(KC_MPRV); } } + return true; } - diff --git a/keyboards/hub20/rules.mk b/keyboards/hub20/rules.mk index 59a4b8aa1..f9d0e479a 100644 --- a/keyboards/hub20/rules.mk +++ b/keyboards/hub20/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ianklug/grooveboard/rules.mk b/keyboards/ianklug/grooveboard/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/ianklug/grooveboard/rules.mk +++ b/keyboards/ianklug/grooveboard/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/id67/rules.mk b/keyboards/id67/rules.mk index 411e7f4d3..2b2b536e9 100644 --- a/keyboards/id67/rules.mk +++ b/keyboards/id67/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/id80/config.h b/keyboards/id80/config.h index fb11ab2cb..c6cf66738 100644 --- a/keyboards/id80/config.h +++ b/keyboards/id80/config.h @@ -57,7 +57,8 @@ along with this program. If not, see . #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 -#define CAPS_LOCK_LED_PIN C7 +#define LED_CAPS_LOCK_PIN C7 +#define LED_PIN_ON_STATE 0 #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN diff --git a/keyboards/id80/id80.c b/keyboards/id80/id80.c index 5e5dbc312..4a06660de 100644 --- a/keyboards/id80/id80.c +++ b/keyboards/id80/id80.c @@ -14,23 +14,3 @@ * along with this program. If not, see . */ #include "id80.h" - -void matrix_init_kb(void) { - led_init_ports(); - matrix_init_user(); -} - -void led_init_ports(void) { - setPinOutput(CAPS_LOCK_LED_PIN); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - writePin(CAPS_LOCK_LED_PIN, !led_state.caps_lock); - } - return res; -} - -// partially generated by KBFirmware JSON to QMK Parser -// https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/id80/rules.mk b/keyboards/id80/rules.mk index 18bd81e57..c03f367ea 100644 --- a/keyboards/id80/rules.mk +++ b/keyboards/id80/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/id87/config.h b/keyboards/id87/config.h index e0a81eb75..a268091d4 100644 --- a/keyboards/id87/config.h +++ b/keyboards/id87/config.h @@ -51,7 +51,7 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 #endif -#define CAPS_LOCK_LED_PIN C7 +#define LED_CAPS_LOCK_PIN C7 /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/id87/id87.c b/keyboards/id87/id87.c index 0ec1c76bc..145edc163 100644 --- a/keyboards/id87/id87.c +++ b/keyboards/id87/id87.c @@ -13,20 +13,3 @@ along with this program. If not, see . */ #include "id87.h" - -void matrix_init_kb(void) { - led_init_ports(); - matrix_init_user(); -} - -void led_init_ports(void) { - setPinOutput(CAPS_LOCK_LED_PIN); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if (res) { - writePin(CAPS_LOCK_LED_PIN, led_state.caps_lock); - } - return res; -} \ No newline at end of file diff --git a/keyboards/id87/rules.mk b/keyboards/id87/rules.mk index 35ecb2901..d05f920d8 100644 --- a/keyboards/id87/rules.mk +++ b/keyboards/id87/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/idb/idb_60/rules.mk b/keyboards/idb/idb_60/rules.mk index 607993b93..acf7b7553 100644 --- a/keyboards/idb/idb_60/rules.mk +++ b/keyboards/idb/idb_60/rules.mk @@ -13,7 +13,7 @@ BOOTLOADER = atmel-dfu # Build Options # Comment out to disable the options. -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/idobo/config.h b/keyboards/idobo/config.h index 00b28f309..7b14613fc 100644 --- a/keyboards/idobo/config.h +++ b/keyboards/idobo/config.h @@ -165,26 +165,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/idobo/rules.mk b/keyboards/idobo/rules.mk index 563fa6df7..98d5d265d 100644 --- a/keyboards/idobo/rules.mk +++ b/keyboards/idobo/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/illuminati/is0/config.h b/keyboards/illuminati/is0/config.h index eea6dbb1e..24242a75b 100644 --- a/keyboards/illuminati/is0/config.h +++ b/keyboards/illuminati/is0/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/illuminati/is0/rules.mk b/keyboards/illuminati/is0/rules.mk index c88ed2840..37a9928eb 100644 --- a/keyboards/illuminati/is0/rules.mk +++ b/keyboards/illuminati/is0/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/illusion/rosa/rules.mk b/keyboards/illusion/rosa/rules.mk index 95ab087c8..c66c60bd7 100644 --- a/keyboards/illusion/rosa/rules.mk +++ b/keyboards/illusion/rosa/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ilumkb/primus75/rules.mk b/keyboards/ilumkb/primus75/rules.mk index b0ed9e41e..4cc1ef31d 100644 --- a/keyboards/ilumkb/primus75/rules.mk +++ b/keyboards/ilumkb/primus75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/volcano660/config.h b/keyboards/ilumkb/volcano660/config.h similarity index 100% rename from keyboards/dztech/volcano660/config.h rename to keyboards/ilumkb/volcano660/config.h diff --git a/keyboards/dztech/volcano660/info.json b/keyboards/ilumkb/volcano660/info.json similarity index 100% rename from keyboards/dztech/volcano660/info.json rename to keyboards/ilumkb/volcano660/info.json diff --git a/keyboards/dztech/volcano660/keymaps/default/keymap.c b/keyboards/ilumkb/volcano660/keymaps/default/keymap.c old mode 100755 new mode 100644 similarity index 100% rename from keyboards/dztech/volcano660/keymaps/default/keymap.c rename to keyboards/ilumkb/volcano660/keymaps/default/keymap.c diff --git a/keyboards/dztech/volcano660/keymaps/via/keymap.c b/keyboards/ilumkb/volcano660/keymaps/via/keymap.c old mode 100755 new mode 100644 similarity index 100% rename from keyboards/dztech/volcano660/keymaps/via/keymap.c rename to keyboards/ilumkb/volcano660/keymaps/via/keymap.c diff --git a/keyboards/bm16a/keymaps/via/rules.mk b/keyboards/ilumkb/volcano660/keymaps/via/rules.mk similarity index 100% rename from keyboards/bm16a/keymaps/via/rules.mk rename to keyboards/ilumkb/volcano660/keymaps/via/rules.mk diff --git a/keyboards/ilumkb/volcano660/readme.md b/keyboards/ilumkb/volcano660/readme.md new file mode 100644 index 000000000..490bf6cf5 --- /dev/null +++ b/keyboards/ilumkb/volcano660/readme.md @@ -0,0 +1,12 @@ +# Volcano660 + +* Keyboard Maintainer: moyi4681 +* Hardware Supported: volcano660 PCB +* Hardware Availability: iLumkb + +Make example for this keyboard (after setting up your build environment): + + make ilumkb/volcano660:default + make ilumkb/volcano660:via + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ilumkb/volcano660/rules.mk b/keyboards/ilumkb/volcano660/rules.mk new file mode 100644 index 000000000..c23060121 --- /dev/null +++ b/keyboards/ilumkb/volcano660/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 = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/dztech/volcano660/volcano660.c b/keyboards/ilumkb/volcano660/volcano660.c similarity index 100% rename from keyboards/dztech/volcano660/volcano660.c rename to keyboards/ilumkb/volcano660/volcano660.c diff --git a/keyboards/dztech/volcano660/volcano660.h b/keyboards/ilumkb/volcano660/volcano660.h similarity index 100% rename from keyboards/dztech/volcano660/volcano660.h rename to keyboards/ilumkb/volcano660/volcano660.h diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.c b/keyboards/inett_studio/sqx/hotswap/hotswap.c index be8985c87..5b3c8df82 100644 --- a/keyboards/inett_studio/sqx/hotswap/hotswap.c +++ b/keyboards/inett_studio/sqx/hotswap/hotswap.c @@ -20,7 +20,7 @@ #include "hotswap.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/inett_studio/sqx/hotswap/rules.mk b/keyboards/inett_studio/sqx/hotswap/rules.mk index 47793919c..7204dd113 100644 --- a/keyboards/inett_studio/sqx/hotswap/rules.mk +++ b/keyboards/inett_studio/sqx/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/inett_studio/sqx/universal/rules.mk b/keyboards/inett_studio/sqx/universal/rules.mk index c9965b068..e2065f6c7 100644 --- a/keyboards/inett_studio/sqx/universal/rules.mk +++ b/keyboards/inett_studio/sqx/universal/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/inett_studio/sqx/universal/universal.c b/keyboards/inett_studio/sqx/universal/universal.c index 42d99330d..dd431a7f4 100644 --- a/keyboards/inett_studio/sqx/universal/universal.c +++ b/keyboards/inett_studio/sqx/universal/universal.c @@ -20,7 +20,7 @@ #include "universal.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/infinity60/keymaps/jpetermans/keymap.c b/keyboards/infinity60/keymaps/jpetermans/keymap.c index c34d56ec8..3c2e0d4da 100644 --- a/keyboards/infinity60/keymaps/jpetermans/keymap.c +++ b/keyboards/infinity60/keymaps/jpetermans/keymap.c @@ -11,20 +11,25 @@ //IS31 chip has 8 available led pages, using 0 for all leds and 7 for single toggles #define max_pages 6 -enum ic60_keycodes { - NUMPAD, - FNAV, - MEDIA, - BACKLIGHT, - BRIGHT, - DIM, - ALL, - GAME, +enum led_modes { + MODE_ALL, + MODE_GAME, MODE_SINGLE, MODE_PAGE, MODE_FLASH }; +enum macro_id { + LED_ALL = SAFE_RANGE, + LED_GAME, + LED_BACKLIGHT, + LED_BRIGHT, + LED_DIM, + LED_SINGLE, + LED_PAGE, + LED_FLASH +}; + uint8_t current_layer_global = 0; uint8_t led_mode_global = MODE_SINGLE; uint8_t backlight_status_global = 1; //init on/off state of backlight @@ -77,10 +82,10 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* media */ [_MEDIA] = LAYOUT_60_ansi_split_bs_rshift( \ - _______,F(MODE_SINGLE),F(MODE_PAGE),F(MODE_FLASH),_______,_______,_______, _______, _______, _______,KC_MUTE, KC_VOLD, KC_VOLU,_______,KC_NO,\ + _______,LED_SINGLE,LED_PAGE,LED_FLASH,_______,_______,_______, _______, _______, _______,KC_MUTE, KC_VOLD, KC_VOLU,_______,KC_NO,\ _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,\ - _______,_______,_______,_______,_______,F(GAME),_______, _______, _______, _______,_______, _______,_______, \ - _______,_______,F(ALL) ,F(BRIGHT),F(DIM),F(BACKLIGHT),_______, _______, KC_MPRV, KC_MNXT,KC_MSTP, _______,KC_NO, \ + _______,_______,_______,_______,_______,LED_GAME,_______, _______, _______, _______,_______, _______,_______, \ + _______,_______,LED_ALL ,LED_BRIGHT,LED_DIM,LED_BACKLIGHT,_______, _______, KC_MPRV, KC_MNXT,KC_MSTP, _______,KC_NO, \ _______,_______,_______, KC_MPLY, _______,_______, _______,_______ \ ), /* ~ */ @@ -101,22 +106,6 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -//id for user defined functions and macros -enum function_id { - NONE, -}; - -enum macro_id { - ACTION_LEDS_ALL, - ACTION_LEDS_GAME, - ACTION_LEDS_BACKLIGHT, - ACTION_LEDS_BRIGHT, - ACTION_LEDS_DIM, - ACTION_LEDS_SINGLE, - ACTION_LEDS_PAGE, - ACTION_LEDS_FLASH -}; - /* ================================== * LED MAPPING * ==================================*/ @@ -158,74 +147,62 @@ uint8_t led_game[5] = { 47,48,51 }; -//======== qmk functions ========= -const uint16_t fn_actions[] = { - [ALL] = ACTION_FUNCTION(ACTION_LEDS_ALL), - [GAME] = ACTION_FUNCTION(ACTION_LEDS_GAME), - [BACKLIGHT] = ACTION_FUNCTION(ACTION_LEDS_BACKLIGHT), - [BRIGHT] = ACTION_FUNCTION(ACTION_LEDS_BRIGHT), - [DIM] = ACTION_FUNCTION(ACTION_LEDS_DIM), - [MODE_SINGLE] = ACTION_FUNCTION(ACTION_LEDS_SINGLE), - [MODE_PAGE] = ACTION_FUNCTION(ACTION_LEDS_PAGE), - [MODE_FLASH] = ACTION_FUNCTION(ACTION_LEDS_FLASH), -}; - -/* custom action function */ -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) { msg_t msg; - switch(id) { - case ACTION_LEDS_ALL: + switch(keycode) { + case LED_ALL: if(record->event.pressed) { - led_mode_global = led_mode_global == ALL ? MODE_SINGLE : ALL; + led_mode_global = led_mode_global == MODE_ALL ? MODE_SINGLE : MODE_ALL; msg=TOGGLE_ALL; chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); } - break; + return false; - case ACTION_LEDS_BACKLIGHT: + case LED_BACKLIGHT: if(record->event.pressed) { backlight_status_global ^= 1; msg=(backlight_status_global << 8) | TOGGLE_BACKLIGHT; chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); } - break; + return false; - case ACTION_LEDS_GAME: + case LED_GAME: if(record->event.pressed) { - led_mode_global = led_mode_global == GAME ? MODE_SINGLE : GAME; + led_mode_global = led_mode_global == MODE_GAME ? MODE_SINGLE : MODE_GAME; msg=(4 << 8) | DISPLAY_PAGE; chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); } - break; + return false; - case ACTION_LEDS_BRIGHT: + case LED_BRIGHT: if(record->event.pressed) { msg=(1 << 8) | STEP_BRIGHTNESS; chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); } - break; + return false; - case ACTION_LEDS_DIM: + case LED_DIM: if(record->event.pressed) { msg=(0 << 8) | STEP_BRIGHTNESS; chMBPost(&led_mailbox, msg, TIME_IMMEDIATE); } - break; + return false; //set led_mode for matrix_scan to toggle leds - case ACTION_LEDS_SINGLE: + case LED_SINGLE: led_mode_global = MODE_SINGLE; - break; - case ACTION_LEDS_PAGE: + return false; + case LED_PAGE: led_mode_global = MODE_PAGE; - break; - case ACTION_LEDS_FLASH: + return false; + case LED_FLASH: led_mode_global = MODE_FLASH; - break; + return false; } + return true; } // Runs just one time when the keyboard initializes. @@ -257,7 +234,7 @@ void matrix_scan_user(void) { return; } - if (led_layer_state != layer_state && led_mode_global != GAME && led_mode_global != ALL) { + if (led_layer_state != layer_state && led_mode_global != MODE_GAME && led_mode_global != MODE_ALL) { //check mode //Turn on layer indicator or page depending on mode switch(led_mode_global) { diff --git a/keyboards/infinity60/rules.mk b/keyboards/infinity60/rules.mk index f4100174d..a3254ca24 100644 --- a/keyboards/infinity60/rules.mk +++ b/keyboards/infinity60/rules.mk @@ -16,7 +16,7 @@ BOARD = MCHCK_K20 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/iriskeyboards/rules.mk b/keyboards/iriskeyboards/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/iriskeyboards/rules.mk +++ b/keyboards/iriskeyboards/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/iron180/rules.mk b/keyboards/iron180/rules.mk index f444528f1..a4f84f999 100644 --- a/keyboards/iron180/rules.mk +++ b/keyboards/iron180/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ivy/rules.mk b/keyboards/ivy/rules.mk index 97c9aa136..85a7b65a2 100644 --- a/keyboards/ivy/rules.mk +++ b/keyboards/ivy/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/j80/rules.mk b/keyboards/j80/rules.mk index 4b21de4e8..feb1d6027 100644 --- a/keyboards/j80/rules.mk +++ b/keyboards/j80/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jacky_studio/bear_65/rules.mk b/keyboards/jacky_studio/bear_65/rules.mk index 6f70cbbd6..a260e2609 100644 --- a/keyboards/jacky_studio/bear_65/rules.mk +++ b/keyboards/jacky_studio/bear_65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jacky_studio/s7_elephant/rev1/rules.mk b/keyboards/jacky_studio/s7_elephant/rev1/rules.mk index 6a8c1054e..6852ee4c6 100644 --- a/keyboards/jacky_studio/s7_elephant/rev1/rules.mk +++ b/keyboards/jacky_studio/s7_elephant/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jacky_studio/s7_elephant/rev2/rules.mk b/keyboards/jacky_studio/s7_elephant/rev2/rules.mk index 321f7fc68..276f14a19 100644 --- a/keyboards/jacky_studio/s7_elephant/rev2/rules.mk +++ b/keyboards/jacky_studio/s7_elephant/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jae/j01/config.h b/keyboards/jae/j01/config.h index db40ee5c2..e2282a37b 100644 --- a/keyboards/jae/j01/config.h +++ b/keyboards/jae/j01/config.h @@ -167,26 +167,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 2 diff --git a/keyboards/jae/j01/rules.mk b/keyboards/jae/j01/rules.mk index 4219cb80c..b2811ee40 100644 --- a/keyboards/jae/j01/rules.mk +++ b/keyboards/jae/j01/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/jagdpietr/drakon/drakon.c b/keyboards/jagdpietr/drakon/drakon.c index e1e6e641d..2aec1f4b5 100644 --- a/keyboards/jagdpietr/drakon/drakon.c +++ b/keyboards/jagdpietr/drakon/drakon.c @@ -28,7 +28,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE // Defines names for use in layer keycodes and the keymap enum Layer_names { diff --git a/keyboards/jagdpietr/drakon/rules.mk b/keyboards/jagdpietr/drakon/rules.mk index a74fce289..752683f25 100644 --- a/keyboards/jagdpietr/drakon/rules.mk +++ b/keyboards/jagdpietr/drakon/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -23,5 +23,6 @@ AUDIO_ENABLE = no # Audio output LTO_ENABLE = yes WPM_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes diff --git a/keyboards/jc65/v32a/rules.mk b/keyboards/jc65/v32a/rules.mk index 20f0222c1..bb26ba442 100644 --- a/keyboards/jc65/v32a/rules.mk +++ b/keyboards/jc65/v32a/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c b/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c index 2b13f63ed..7572b9e07 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c @@ -223,7 +223,7 @@ void matrix_scan_user(void) { } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case _BL: custom_backlight_level(0); diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk index aaffae573..5ff16d471 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk @@ -4,7 +4,7 @@ # TAP_DANCE_ENABLE = no # Enable TapDance functionality RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+1500) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -17,6 +17,5 @@ UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6#VARIABLE_TRACE = no # Use this to debug changes to variable values -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/jc65/v32u4/rules.mk b/keyboards/jc65/v32u4/rules.mk index 34206244a..4b23576e3 100644 --- a/keyboards/jc65/v32u4/rules.mk +++ b/keyboards/jc65/v32u4/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/jd40/rules.mk b/keyboards/jd40/rules.mk index 18780b47b..954d22b02 100644 --- a/keyboards/jd40/rules.mk +++ b/keyboards/jd40/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,7 @@ KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls +MIDI_ENABLE = no # MIDI support # UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable RGB Underglow diff --git a/keyboards/jd45/keymaps/mjt6u/rules.mk b/keyboards/jd45/keymaps/mjt6u/rules.mk index 2cf0221ed..1d2e0f09e 100644 --- a/keyboards/jd45/keymaps/mjt6u/rules.mk +++ b/keyboards/jd45/keymaps/mjt6u/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/jd45/rules.mk b/keyboards/jd45/rules.mk index 82e70975d..20ec8ca7c 100644 --- a/keyboards/jd45/rules.mk +++ b/keyboards/jd45/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -23,6 +23,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend # NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = YES # MIDI controls +MIDI_ENABLE = yes # MIDI support # UNICODE_ENABLE = YES # Unicode BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/jian/keymaps/advanced/keymap.c b/keyboards/jian/keymaps/advanced/keymap.c index 25108aa13..4aad7b65a 100644 --- a/keyboards/jian/keymaps/advanced/keymap.c +++ b/keyboards/jian/keymaps/advanced/keymap.c @@ -278,7 +278,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif // ALT_LAYOUTS_ENABLE }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/jiran/rules.mk b/keyboards/jiran/rules.mk index 9156f166f..13c88e0b2 100644 --- a/keyboards/jiran/rules.mk +++ b/keyboards/jiran/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jisplit89/keymaps/salicylic/keymap.c b/keyboards/jisplit89/keymaps/salicylic/keymap.c index a4c7c99f1..ffd3b853b 100644 --- a/keyboards/jisplit89/keymaps/salicylic/keymap.c +++ b/keyboards/jisplit89/keymaps/salicylic/keymap.c @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, KC_HOME, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| -LCTL_T(JP_QUOT),JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, KC_END, +LCTL_T(JP_QUOT),JP_HASH,JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, KC_END, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| SFT_T(JP_CIRC),JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, KC_PGDN, KC_UP, KC_PGUP, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/jisplit89/rules.mk b/keyboards/jisplit89/rules.mk index 4c02d3ad5..c75f40673 100644 --- a/keyboards/jisplit89/rules.mk +++ b/keyboards/jisplit89/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -18,7 +18,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/jj40/keymaps/fun40/rules.mk b/keyboards/jj40/keymaps/fun40/rules.mk deleted file mode 100644 index 3ec0a7515..000000000 --- a/keyboards/jj40/keymaps/fun40/rules.mk +++ /dev/null @@ -1,21 +0,0 @@ - - -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID - -RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes -DISABLE_WS2812 = yes - - -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/jj40/keymaps/oscillope/rules.mk b/keyboards/jj40/keymaps/oscillope/rules.mk deleted file mode 100644 index a121bbc77..000000000 --- a/keyboards/jj40/keymaps/oscillope/rules.mk +++ /dev/null @@ -1,14 +0,0 @@ -# build options -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = yes - -BACKLIGHT_ENABLE = no -BACKLIGHT_CUSTOM_DRIVER = no - -RGBLIGHT_ENABLE = no -RGBLIGHT_CUSTOM_DRIVER = no - -KEY_LOCK_ENABLE = yes diff --git a/keyboards/jj40/keymaps/skewwhiffy/keymap.c b/keyboards/jj40/keymaps/skewwhiffy/keymap.c deleted file mode 100644 index 6b193a15c..000000000 --- a/keyboards/jj40/keymaps/skewwhiffy/keymap.c +++ /dev/null @@ -1,219 +0,0 @@ -/* Copyright 2017 Kenny Hung - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H -#include "keymap_uk.h" - -// Layer shorthand -enum Layers { - cm, // colemak - dv, // dvorak - qw, // qwerty - nbl, // numbers left - nbr, // numbers right - syl, // symbols left - syr, // symbols right - nal, // navigation left - nar // navigation right -}; - -// Layer buttons -#define _Z_SFT SFT_T(UK_Z) -#define _SCLSH SFT_T(UK_SCLN) -#define _SLSH SFT_T(UK_SLSH) - -#define _X_NB LT(nbl, UK_X) -#define _Q_NB LT(nbl, UK_Q) -#define _DOT_NB LT(nbr, UK_DOT) -#define _V_NB LT(nbr, UK_V) -#define __NBL LT(nbl, _______) -#define __NBR LT(nbr, _______) - -#define _C_SY LT(syl, UK_C) -#define _J_SY LT(syl, UK_J) -#define _W_SY LT(syr, UK_W) -#define _COM_SY LT(syr, UK_COMM) -#define __SYL LT(syl, _______) -#define __SYR LT(syr, _______) - -#define _V_NAL LT(nal, UK_V) -#define _K_NAL LT(nal, UK_K) -#define _M_NAR LT(nar, UK_M) -#define __NAL LT(nal, _______) -#define __NAR LT(nar, _______) - -// Custom hotkeys -#define _TERM LCTL(UK_QUOT) // Hotkey for terminal -#define _S_TAB S(UK_TAB) -#define _C_LEFT LCTL(UK_LEFT) -#define _C_RGHT LCTL(UK_RGHT) -#define _A_LEFT LALT(UK_LEFT) -#define _A_RGHT LALT(UK_RGHT) - -// Custom hotkeys -#define _TERM LCTL(UK_QUOT) // Hotkey for terminal -#define _S_TAB S(UK_TAB) -#define _C_LEFT LCTL(UK_LEFT) -#define _C_RGHT LCTL(UK_RGHT) -#define _A_LEFT LALT(UK_LEFT) -#define _A_RGHT LALT(UK_RGHT) - -enum custom_keycodes { - IJ_OMN = SAFE_RANGE // IntelliJ Omnibox -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Colemak - * .-----------------------------------------------------------------------------------------------------------. - * | Q | W | F | P | G | | | J | L | U | Y | ; | - * |-----------------------------------------------------------------------------------------------------------| - * | A | R | S | T | D | | | H | N | E | I | O | - * |-----------------------------------------------------------------------------------------------------------| - * | Z | X | C | V | B | | | K | M | , | . | / | - * | SHIFT | NUMBER | SYMBOL | NAV | | | | | NAV | SYMBOL | FUNC | SHIFT | - * |-----------------------------------------------------------------------------------------------------------| - * | LSHIFT | LCTRL | LALT | LGUI | SPACE | ENT | DEL | BKSPC | RGUI | RALT | RCTRL | RSHIFT | - * .-----------------------------------------------------------------------------------------------------------. - */ - [cm] = LAYOUT_ortho_4x12( \ - UK_Q, UK_W, UK_F, UK_P, UK_G, _______, _______, UK_J, UK_L, UK_U, UK_Y, UK_SCLN, \ - UK_A, UK_R, UK_S, UK_T, UK_D, _______, _______, UK_H, UK_N, UK_E, UK_I, UK_O, \ - _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, UK_K, _M_NAR, _COM_SY, _DOT_NB, _SLSH, \ - UK_LSFT, UK_LCTL, UK_LALT, UK_LGUI, UK_SPC, UK_ENT, UK_DEL, UK_BSPC, UK_RGUI, UK_RALT, UK_RCTL, UK_RSFT \ - ), - -/* Dvorak - * .-----------------------------------------------------------------------------------------------------------. - * | ' | , | . | P | Y | | | F | G | C | R | L | - * |-----------------------------------------------------------------------------------------------------------| - * | A | O | E | U | I | | | D | H | T | N | S | - * |-----------------------------------------------------------------------------------------------------------| - * | ; | Q | J | K | X | | | B | M | W | V | Z | - * | SHIFT | NUMBER | SYMBOL | NAV | | | | | NAV | SYMBOL | FUNC | SHIFT | - * |-----------------------------------------------------------------------------------------------------------| - * | | | | | | | | | | | | | - * |-----------------------------------------------------------------------------------------------------------| - */ - [dv] = LAYOUT_ortho_4x12( \ - UK_QUOT, UK_COMM, UK_DOT, UK_P, UK_Y, _______, _______, UK_F, UK_G, UK_C, UK_R, UK_L, \ - UK_A, UK_O, UK_E, UK_U, UK_I, _______, _______, UK_D, UK_H, UK_T, UK_N, UK_S, \ - _SCLSH, _Q_NB, _J_SY, _K_NAL, UK_X, _______, _______, UK_B, _M_NAR, _W_SY, _V_NB, _Z_SFT, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - -/* QWERTY - * .-----------------------------------------------------------------------------------------------------------. - * | Q | W | E | R | T | | | Y | U | I | O | P | - * |-----------------------------------------------------------------------------------------------------------| - * | A | S | D | F | G | | | H | J | K | L | ; | - * |-----------------------------------------------------------------------------------------------------------| - * | Z | X | C | V | B | | | N | M | , | . | / | - * | SHIFT | NUMBER | SYMBOL | NAV | | | | | NAV | SYMBOL | FUNC | SHIFT | - * |-----------------------------------------------------------------------------------------------------------| - * | | | | | | | | | | | | | - * .-----------------------------------------------------------------------------------------------------------. - */ - [qw] = LAYOUT_ortho_4x12( \ - UK_Q, UK_W, UK_E, UK_R, UK_T, _______, _______, UK_Y, UK_U, UK_I, UK_O, UK_P, \ - UK_A, UK_S, UK_D, UK_F, UK_G, _______, _______, UK_H, UK_J, UK_K, UK_L, UK_SCLN, \ - _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, UK_N, _M_NAR, _COM_SY, _DOT_NB, _SLSH, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - -/* Numbers _NB - * .-----------------------------------------------------------------------------------------------------------. - * | | F7 | F8 | F9 | F10 | | | | 7 | 8 | 9 | | - * |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | F4 | F5 | F6 | F11 | | | | 4 | 5 | 6 | | - * |-----------------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | | F1 | F2 | F3 | F12 | | | 0 | 1 | 2 | 3 | . | - * |-----------------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | | | | | | | | - * '-----------------------------------------------------------------------------------------------------------' - */ - [nbl] = LAYOUT_ortho_4x12( \ - _______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, UK_7, UK_8, UK_9, _______, \ - _______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, UK_4, UK_5, UK_6, _______, \ - _______, __NBL, UK_F2, UK_F3, UK_F12, _______, _______, UK_0, UK_1, UK_2, UK_3, UK_DOT, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - [nbr] = LAYOUT_ortho_4x12( \ - _______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, UK_7, UK_8, UK_9, _______, \ - _______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, UK_4, UK_5, UK_6, _______, \ - _______, UK_F1, UK_F2, UK_F3, UK_F12, _______, _______, UK_0, UK_1, UK_2, __NBR, UK_DOT, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - -/* Symbols _SY - * .-----------------------------------------------------------------------------------------------------------. - * | ! | £ | _ | - | ~ | | | \ | { | } | / | # | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | $ | % | + | = | | | | " | ( | ) | ' | @ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | ^ | & | * | | | | | | < | [ | ] | > | ` | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | | | - * '-----------------------------------------------------------------------------------------------------------' - */ - [syl] = LAYOUT_ortho_4x12( \ - UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, \ - UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT, \ - UK_CIRC, UK_AMPR, __SYL, UK_PIPE, _______, _______, _______, UK_LABK, UK_LBRC, UK_RBRC, UK_RABK, UK_GRV, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - [syr] = LAYOUT_ortho_4x12( \ - UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, \ - UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT, \ - UK_CIRC, UK_AMPR, UK_ASTR, UK_PIPE, _______, _______, _______, UK_LABK, UK_LBRC, __SYR, UK_RABK, UK_GRV, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - -/* - * Navigation - * .-----------------------------------------------------------------------------------------------------------. - * | Esc | Ctrl L | Up | Ctrl R | RGB RMD| RGB HD | RGB HI | RGB_TG | PtSn | ScLk | Pause | DVORAK | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | Tab | Left | Down | Right | RGB MD | RGB SD | RGB SI | COLEMAK| Insert | Home | PgUp | Term | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | ShTab | Alt L | IJ Omni| Alt R | | RGB VD | RGB VI | | ScLk | End | PgDn | QWERTY | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | | | - * '-----------------------------------------------------------------------------------------------------------' - */ - [nal] = LAYOUT_ortho_4x12( \ - UK_ESC, _C_LEFT, UK_UP, _C_RGHT, RGB_RMOD,RGB_HUD, RGB_HUI, RGB_TOG, UK_PSCR, UK_SLCK, UK_PAUS, DF(dv), \ - UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, RGB_MOD, RGB_SAD, RGB_SAI, DF(cm), UK_INS, UK_HOME, UK_PGUP, _TERM, \ - _S_TAB, _A_LEFT, IJ_OMN, __NAL, _______, RGB_VAD, RGB_VAI, _______, UK_SLCK, UK_END, UK_PGDN, DF(qw), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - [nar] = LAYOUT_ortho_4x12( \ - UK_ESC, _C_LEFT, UK_UP, _C_RGHT, RGB_RMOD,RGB_HUD, RGB_HUI, RGB_TOG, UK_PSCR, UK_SLCK, UK_PAUS, DF(dv), \ - UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, RGB_MOD, RGB_SAD, RGB_SAI, DF(cm), UK_INS, UK_HOME, UK_PGUP, _TERM, \ - _S_TAB, _A_LEFT, IJ_OMN, _A_RGHT, _______, RGB_VAD, RGB_VAI, _______, __NAR, UK_END, UK_PGDN, DF(qw), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch(keycode) { - case IJ_OMN: - SEND_STRING(SS_TAP(X_LSHIFT)SS_TAP(X_LSHIFT)); - return false; - } - } - return true; -} diff --git a/keyboards/jj40/keymaps/stevexyz/rules.mk b/keyboards/jj40/keymaps/stevexyz/rules.mk deleted file mode 100644 index 41036eed4..000000000 --- a/keyboards/jj40/keymaps/stevexyz/rules.mk +++ /dev/null @@ -1,19 +0,0 @@ -# Build Options (yes/no) -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # USB Nkey Rollover (see: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work) -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 - -TAP_DANCE_ENABLE = yes - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/jj40/keymaps/waples/rules.mk b/keyboards/jj40/keymaps/waples/rules.mk deleted file mode 100644 index 4395f7f8f..000000000 --- a/keyboards/jj40/keymaps/waples/rules.mk +++ /dev/null @@ -1,10 +0,0 @@ -# build options -BOOTMAGIC_ENABLE = full -MOUSEKEY_ENABLE = no -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes -KEY_LOCK_ENABLE = yes diff --git a/keyboards/jj40/readme.md b/keyboards/jj40/readme.md deleted file mode 100644 index 5f4d2c8a9..000000000 --- a/keyboards/jj40/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# jj40 - -![jj40](https://ae01.alicdn.com/kf/HTB18bq6bOERMeJjSspiq6zZLFXar.jpg?size=359506&height=562&width=750&hash=663a22d0109e2416ec8f54a7658686da) - -A compact 40% (12x4) ortholinear keyboard kit made and KPRepublic on AliExpress. - -* Keyboard Maintainer: [QMK Community](https://github.com/qmk) -* Hardware Supported: Atmega32A -* Hardware Availability: [AliExpress](https://www.aliexpress.com/store/product/jj40-Custom-Mechanical-Keyboard-40-PCB-programmed-40-planck-layouts-bface-firmware-gh40/3034003_32828781103.html) - -Make example for this keyboard (after setting up your build environment): - - make jj40:default - -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) - - make jj40:default:flash - -**Reset Key**: Hold down the *Top Right Key* key, commonly programmed as *Backspace* while plugging in the keyboard. - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk deleted file mode 100644 index c3776d1f3..000000000 --- a/keyboards/jj40/rules.mk +++ /dev/null @@ -1,37 +0,0 @@ -# MCU name -MCU = atmega32a - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = bootloadHID - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -WS2812_DRIVER = i2c -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 - -LAYOUTS = ortho_4x12 planck_mit - -# Disable unsupported hardware -AUDIO_SUPPORTED = no diff --git a/keyboards/jj4x4/readme.md b/keyboards/jj4x4/readme.md deleted file mode 100644 index 714e8e88f..000000000 --- a/keyboards/jj4x4/readme.md +++ /dev/null @@ -1,39 +0,0 @@ -# JJ4x4 - -![jj4x4](https://cdn.shopify.com/s/files/1/2711/4238/products/JJ4x4case-1_1024x1024.jpg?v=1532325339) - -A 4x4 keypad kit made and KPRepublic on AliExpress. This is a chopped off version of the JJ40 with rearranged keys. - -* Keyboard Maintainer: [QMK Community](https://github.com/qmk) -* Hardware Supported: Atmega32A -* Hardware Availability: [AliExpress](https://www.aliexpress.com/item/jj4x4-jj4X4-16-keys-Custom-Mechanical-Keyboard-PCB-programmed-numpad-layouts-bface-firmware-with-rgb-bottom/32901955446.html) - -Make example for this keyboard (after setting up your build environment): - - make jj4x4:default - -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) - - make jj4x4:default:flash - -**Reset Key**: - -Hold down the key located at *K11*, commonly programmed as *8* while plugging in the keyboard USB cable. - -Key *K11* is in the above picture: - -Row 2 from the top, Column 2 from the left, see the schematic below: - -``` -,-----------------------. -| | | | | -|-----`-----`-----`-----| -| | K11 | | | -|-----`-----`-----`-----| -| | | | | -|-----`-----`-----`-----| -| | | | | -`-----`-----`-----`-----' -``` - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/jj4x4/rules.mk b/keyboards/jj4x4/rules.mk deleted file mode 100644 index bf2062542..000000000 --- a/keyboards/jj4x4/rules.mk +++ /dev/null @@ -1,34 +0,0 @@ -# MCU name -MCU = atmega32a - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = bootloadHID - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -WS2812_DRIVER = i2c -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 - -LAYOUTS = ortho_4x4 diff --git a/keyboards/jj50/keymaps/abstractkb/keymap.c b/keyboards/jj50/keymaps/abstractkb/keymap.c deleted file mode 100644 index 2de5ce6b9..000000000 --- a/keyboards/jj50/keymaps/abstractkb/keymap.c +++ /dev/null @@ -1,135 +0,0 @@ -/* -Base Copyright 2017 Luiz Ribeiro -Modified 2017 Andrew Novak -Modified 2018 Wayne Jones (WarmCatUK) -Modified 2019 AbstractKB - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public LicensezZZ -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -enum layers { - _DEFLT, - _RAISE, - _LOWER, - _FN -}; - -enum custom_keycodes { - MYRGB_TG = SAFE_RANGE -}; - -bool rgbinit = true; -bool rgbon = true; - -const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one - -void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); - led_set_user(host_keyboard_leds()); -} - -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { - case _RAISE: - rgblight_sethsv_noeeprom(170,255,255); - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - break; - case _LOWER: - rgblight_sethsv_noeeprom(0,255,255); - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - break; - case _FN: - rgblight_sethsv_noeeprom(0,255,255); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); - break; - default: //_DEFLT - rgblight_sethsv_noeeprom(0,0,255); - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - break; - } - - return state; -} - -void led_set_user(uint8_t usb_led) { - if (usb_led & (1<event.pressed) { - myrgb_toggle(); - } - return false; - default: - return true; - } -} - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_DEFLT] = 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, \ - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - MO(_FN), KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ - ), - - - [_RAISE] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LGUI(KC_LEFT)), LGUI(KC_L), LCTL(LGUI(KC_RGHT)), _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_CAPS, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \ - ), - - - [_LOWER] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_BSLS, _______, \ - _______, _______, _______, KC_LBRC, KC_RBRC, S(KC_9),S(KC_0),S(KC_LBRC),S(KC_RBRC),_______,_______,_______, \ - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - - - [_FN] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MYRGB_TG \ - ) -}; diff --git a/keyboards/jj50/keymaps/abstractkb_gergomatch/keymap.c b/keyboards/jj50/keymaps/abstractkb_gergomatch/keymap.c deleted file mode 100644 index 9c129ba9a..000000000 --- a/keyboards/jj50/keymaps/abstractkb_gergomatch/keymap.c +++ /dev/null @@ -1,135 +0,0 @@ -/* -Base Copyright 2017 Luiz Ribeiro -Modified 2017 Andrew Novak -Modified 2018 Wayne Jones (WarmCatUK) -Modified 2019 AbstractKB - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public LicensezZZ -along with this program. If not, see . -*/ - -#include QMK_KEYBOARD_H - -enum layers { - _DEFLT, - _FUNC, - _SYM, - _META -}; - -enum custom_keycodes { - MYRGB_TG = SAFE_RANGE -}; - -bool rgbinit = true; -bool rgbon = true; - -const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one - -void keyboard_post_init_user(void) { - rgblight_enable_noeeprom(); - led_set_user(host_keyboard_leds()); -} - -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { - case _FUNC: - rgblight_sethsv_noeeprom(170,255,255); - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - break; - case _SYM: - rgblight_sethsv_noeeprom(0,255,255); - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - break; - case _META: - rgblight_sethsv_noeeprom(0,255,255); - rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); - break; - default: //_DEFLT - rgblight_sethsv_noeeprom(0,0,255); - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - break; - } - - return state; -} - -void led_set_user(uint8_t usb_led) { - if (usb_led & (1<event.pressed) { - myrgb_toggle(); - } - return false; - default: - return true; - } -} - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_DEFLT] = 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, \ - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, MO(_META), KC_LGUI, KC_LALT, MO(_SYM),KC_SPC,KC_SPC,MO(_FUNC),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ - ), - - - [_FUNC] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LGUI(KC_LEFT)), LGUI(KC_L), LCTL(LGUI(KC_RGHT)), _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_CAPS, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \ - ), - - - [_SYM] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______,S(KC_1),S(KC_2),S(KC_LBRC),S(KC_RBRC),S(KC_BSLS),_______, S(KC_MINS), _______, _______, _______, _______, \ - _______, S(KC_3), S(KC_4), S(KC_9), S(KC_0), KC_GRV, S(KC_EQL), KC_MINS, KC_BSLS, S(KC_8), _______, _______, \ - _______, S(KC_5), S(KC_6), KC_LBRC,KC_RBRC,S(KC_GRV), S(KC_7),KC_EQL, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - - - [_META] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MYRGB_TG \ - ) -}; diff --git a/keyboards/jj50/readme.md b/keyboards/jj50/readme.md deleted file mode 100644 index 9719f01ec..000000000 --- a/keyboards/jj50/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# JJ50 - -![JJ50 + SA Vilebloom (w/ Sakurios) by u/rendleshift](https://i.imgur.com/SwYZ4wol.jpg) - -A compact 50% (5x12) ortholinear keyboard made and sold by KPrepublic. - -* Keyboard Maintainer: [QMK Community](https://github.com/qmk) -* Hardware Supported: Atmega32A -* Hardware Availability: [AliExpress](https://www.aliexpress.com/item/jj50-v1-0-Custom-Mechanical-Keyboard-50-PCB-programmed-50-preonic-layouts-bface-firmware-with-rgb/32848915277.html); [KPrepublic](https://kprepublic.com/collections/jj50-50/products/jj50-50-custom-keyboard-pcb-similar-with-preonic) - -Make example for this keyboard (after setting up your build environment): - - make jj50:default - -Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) - - make jj50:default:flash - -**Reset Key**: Hold down the key `Backspace` (`Key below the top right key`) while plugging in the keyboard. - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/jj50/rules.mk b/keyboards/jj50/rules.mk deleted file mode 100644 index 8f78a7674..000000000 --- a/keyboards/jj50/rules.mk +++ /dev/null @@ -1,27 +0,0 @@ -# MCU name -MCU = atmega32a - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = bootloadHID - -# build options -BOOTMAGIC_ENABLE = 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 -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality -WS2812_DRIVER = i2c # This driver powers the RGB Lighting and RGB Matrix features -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -LTO_ENABLE = yes # Enable link time optimization - -LAYOUTS = ortho_5x12 diff --git a/keyboards/jkdlab/binary_monkey/rules.mk b/keyboards/jkdlab/binary_monkey/rules.mk index a90eef1fc..23ba502fc 100644 --- a/keyboards/jkdlab/binary_monkey/rules.mk +++ b/keyboards/jkdlab/binary_monkey/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jm60/rules.mk b/keyboards/jm60/rules.mk index 6aa824bae..0ec0b45d3 100644 --- a/keyboards/jm60/rules.mk +++ b/keyboards/jm60/rules.mk @@ -7,7 +7,7 @@ BOARD = ST_NUCLEO64_F103RB # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jnao/rules.mk b/keyboards/jnao/rules.mk index a64e40057..715a32008 100644 --- a/keyboards/jnao/rules.mk +++ b/keyboards/jnao/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/jones/v03/rules.mk b/keyboards/jones/v03/rules.mk index 2a33056c2..464a27523 100644 --- a/keyboards/jones/v03/rules.mk +++ b/keyboards/jones/v03/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jones/v03_1/rules.mk b/keyboards/jones/v03_1/rules.mk index 07203872f..17b7c15f5 100644 --- a/keyboards/jones/v03_1/rules.mk +++ b/keyboards/jones/v03_1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/just60/rules.mk b/keyboards/just60/rules.mk index f38f6a27e..20e26261e 100644 --- a/keyboards/just60/rules.mk +++ b/keyboards/just60/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = lufa-ms # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,6 +28,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/k_type/is31fl3733-dual.h b/keyboards/k_type/is31fl3733-dual.h index 272bcdc41..aab170a3f 100644 --- a/keyboards/k_type/is31fl3733-dual.h +++ b/keyboards/k_type/is31fl3733-dual.h @@ -28,7 +28,7 @@ typedef struct is31_led { uint8_t b; } __attribute__((packed)) is31_led; -extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; +extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; void IS31FL3733_init(uint8_t bus, uint8_t addr, uint8_t sync); bool IS31FL3733_write_register(uint8_t index, uint8_t addr, uint8_t reg, uint8_t data); diff --git a/keyboards/k_type/k_type.c b/keyboards/k_type/k_type.c index 61c588145..924862277 100644 --- a/keyboards/k_type/k_type.c +++ b/keyboards/k_type/k_type.c @@ -23,7 +23,7 @@ along with this program. If not, see . #include "is31fl3733-dual.h" -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { { 0, B_1, A_1, C_1 }, { 0, B_2, A_2, C_2 }, { 0, B_3, A_3, C_3 }, diff --git a/keyboards/k_type/rules.mk b/keyboards/k_type/rules.mk index 369cab4f0..ea52f8274 100644 --- a/keyboards/k_type/rules.mk +++ b/keyboards/k_type/rules.mk @@ -7,13 +7,14 @@ BOOTLOADER = kiibohd # Board: it should exist either in /os/hal/boards/ # or /boards # This board was copied from PJRC_TEENSY_3_1. The only difference should be a -# hack to ensure the watchdog has started before trying to disable it. +# hack to ensure the watchdog has started before trying to disable it, and an +# override to disable restart of USB driver after returning from suspend. BOARD = IC_TEENSY_3_1 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/kabedon/kabedon78s/rules.mk b/keyboards/kabedon/kabedon78s/rules.mk index 0a28dcbff..8ae24cfb0 100644 --- a/keyboards/kabedon/kabedon78s/rules.mk +++ b/keyboards/kabedon/kabedon78s/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kabedon/kabedon980/rules.mk b/keyboards/kabedon/kabedon980/rules.mk index 0a28dcbff..8ae24cfb0 100644 --- a/keyboards/kabedon/kabedon980/rules.mk +++ b/keyboards/kabedon/kabedon980/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kabedon/kabedon98e/rules.mk b/keyboards/kabedon/kabedon98e/rules.mk index d5855bafa..d9b839042 100644 --- a/keyboards/kabedon/kabedon98e/rules.mk +++ b/keyboards/kabedon/kabedon98e/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kagamidget/config.h b/keyboards/kagamidget/config.h index f073a18e3..4e0c68fa9 100644 --- a/keyboards/kagamidget/config.h +++ b/keyboards/kagamidget/config.h @@ -160,26 +160,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kagamidget/rules.mk b/keyboards/kagamidget/rules.mk index fb92bfecd..e2da0b16e 100644 --- a/keyboards/kagamidget/rules.mk +++ b/keyboards/kagamidget/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kb_elmo/aek2_usb/rules.mk b/keyboards/kb_elmo/aek2_usb/rules.mk index e5b427e5a..a6e50e417 100644 --- a/keyboards/kb_elmo/aek2_usb/rules.mk +++ b/keyboards/kb_elmo/aek2_usb/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/elmopad/rules.mk b/keyboards/kb_elmo/elmopad/rules.mk index 6e2010833..d67199de8 100644 --- a/keyboards/kb_elmo/elmopad/rules.mk +++ b/keyboards/kb_elmo/elmopad/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/m0110a_usb/rules.mk b/keyboards/kb_elmo/m0110a_usb/rules.mk index e5b427e5a..a6e50e417 100644 --- a/keyboards/kb_elmo/m0110a_usb/rules.mk +++ b/keyboards/kb_elmo/m0110a_usb/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/m0116_usb/rules.mk b/keyboards/kb_elmo/m0116_usb/rules.mk index e5b427e5a..a6e50e417 100644 --- a/keyboards/kb_elmo/m0116_usb/rules.mk +++ b/keyboards/kb_elmo/m0116_usb/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/noah_avr/rules.mk b/keyboards/kb_elmo/noah_avr/rules.mk index c82741ffc..42b9b82a9 100644 --- a/keyboards/kb_elmo/noah_avr/rules.mk +++ b/keyboards/kb_elmo/noah_avr/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/sesame/rules.mk b/keyboards/kb_elmo/sesame/rules.mk index 0198f3038..5b9861d70 100644 --- a/keyboards/kb_elmo/sesame/rules.mk +++ b/keyboards/kb_elmo/sesame/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/twelvekey/rules.mk b/keyboards/kb_elmo/twelvekey/rules.mk index d099a1068..17212e0d6 100644 --- a/keyboards/kb_elmo/twelvekey/rules.mk +++ b/keyboards/kb_elmo/twelvekey/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdclack/kaishi65/config.h b/keyboards/kbdclack/kaishi65/config.h index dc9d1d51f..794cd54a9 100644 --- a/keyboards/kbdclack/kaishi65/config.h +++ b/keyboards/kbdclack/kaishi65/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kbdclack/kaishi65/rules.mk b/keyboards/kbdclack/kaishi65/rules.mk index bcd350e89..5af763368 100644 --- a/keyboards/kbdclack/kaishi65/rules.mk +++ b/keyboards/kbdclack/kaishi65/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/bella/rgb/config.h b/keyboards/kbdfans/bella/rgb/config.h index f56049690..07594a34a 100644 --- a/keyboards/kbdfans/bella/rgb/config.h +++ b/keyboards/kbdfans/bella/rgb/config.h @@ -37,7 +37,7 @@ /* disable these deprecated features by default */ #ifdef RGB_MATRIX_ENABLE #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_LED_PROCESS_LIMIT 4 diff --git a/keyboards/kbdfans/bella/rgb/rgb.c b/keyboards/kbdfans/bella/rgb/rgb.c index e197d9b53..17cf99214 100644 --- a/keyboards/kbdfans/bella/rgb/rgb.c +++ b/keyboards/kbdfans/bella/rgb/rgb.c @@ -15,7 +15,7 @@ */ #include "rgb.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB6 */ {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB32 */ {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB45 */ diff --git a/keyboards/kbdfans/bella/rgb/rules.mk b/keyboards/kbdfans/bella/rgb/rules.mk index bba2c1a6c..11f748ffb 100644 --- a/keyboards/kbdfans/bella/rgb/rules.mk +++ b/keyboards/kbdfans/bella/rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/bella/rgb_iso/config.h b/keyboards/kbdfans/bella/rgb_iso/config.h index fc7a9d7c0..4fda99867 100644 --- a/keyboards/kbdfans/bella/rgb_iso/config.h +++ b/keyboards/kbdfans/bella/rgb_iso/config.h @@ -37,7 +37,7 @@ /* disable these deprecated features by default */ #ifdef RGB_MATRIX_ENABLE #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_LED_PROCESS_LIMIT 4 diff --git a/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c b/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c index 1a853ac8a..0c431b154 100644 --- a/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c +++ b/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c @@ -15,7 +15,7 @@ */ #include "rgb_iso.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB6 */ {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB32 */ {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB45 */ diff --git a/keyboards/kbdfans/bella/rgb_iso/rules.mk b/keyboards/kbdfans/bella/rgb_iso/rules.mk index bba2c1a6c..11f748ffb 100644 --- a/keyboards/kbdfans/bella/rgb_iso/rules.mk +++ b/keyboards/kbdfans/bella/rgb_iso/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/bella/soldered/rules.mk b/keyboards/kbdfans/bella/soldered/rules.mk index b0ed9e41e..4cc1ef31d 100755 --- a/keyboards/kbdfans/bella/soldered/rules.mk +++ b/keyboards/kbdfans/bella/soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd19x/config.h b/keyboards/kbdfans/kbd19x/config.h index 090beb590..d3549b0aa 100644 --- a/keyboards/kbdfans/kbd19x/config.h +++ b/keyboards/kbdfans/kbd19x/config.h @@ -171,23 +171,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/kbdfans/kbd19x/rules.mk b/keyboards/kbdfans/kbd19x/rules.mk index 914ef3c21..dd2c8f6b7 100644 --- a/keyboards/kbdfans/kbd19x/rules.mk +++ b/keyboards/kbdfans/kbd19x/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/kbd4x/config.h b/keyboards/kbdfans/kbd4x/config.h index 9efffa0b1..5c655278f 100644 --- a/keyboards/kbdfans/kbd4x/config.h +++ b/keyboards/kbdfans/kbd4x/config.h @@ -166,23 +166,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/kbdfans/kbd4x/rules.mk b/keyboards/kbdfans/kbd4x/rules.mk index 38cca183c..785653214 100644 --- a/keyboards/kbdfans/kbd4x/rules.mk +++ b/keyboards/kbdfans/kbd4x/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/kbd66/config.h b/keyboards/kbdfans/kbd66/config.h index 8b5be9f0a..15a3b4b81 100644 --- a/keyboards/kbdfans/kbd66/config.h +++ b/keyboards/kbdfans/kbd66/config.h @@ -156,23 +156,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/kbdfans/kbd66/rules.mk b/keyboards/kbdfans/kbd66/rules.mk index 4f42fb7f8..1329c8350 100644 --- a/keyboards/kbdfans/kbd66/rules.mk +++ b/keyboards/kbdfans/kbd66/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/kbd67/hotswap/config.h b/keyboards/kbdfans/kbd67/hotswap/config.h index 400b7540c..3bee63332 100644 --- a/keyboards/kbdfans/kbd67/hotswap/config.h +++ b/keyboards/kbdfans/kbd67/hotswap/config.h @@ -185,26 +185,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/rules.mk b/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/rules.mk index f24246449..98bf07960 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/rules.mk +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/rules.mk @@ -1,2 +1,2 @@ # Build Options -BOOTMAGIC_ENABLE = full # Use full Bootmagic +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/rules.mk b/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/rules.mk index 16eb6cb44..0bef91295 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/rules.mk +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/stevanmilic/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/kbdfans/kbd67/hotswap/rules.mk b/keyboards/kbdfans/kbd67/hotswap/rules.mk index 12610edcc..4a2801684 100644 --- a/keyboards/kbdfans/kbd67/hotswap/rules.mk +++ b/keyboards/kbdfans/kbd67/hotswap/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk b/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk index 8a4949096..8686f77d7 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk +++ b/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/pascalpfeil/config.h b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/pascalpfeil/config.h index e5b7c718a..2cd513223 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/pascalpfeil/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/pascalpfeil/config.h @@ -23,15 +23,10 @@ #define QMK_KEYS_PER_SCAN 4 /* Force NKRO on boot up */ -#define FORCE_NKRO - +#define FORCE_NKRO #ifdef RGB_MATRIX_ENABLE - -#undef RGB_DISABLE_WHEN_USB_SUSPENDED -#define RGB_DISABLE_WHEN_USB_SUSPENDED true - -#undef RGB_DISABLE_TIMEOUT -#define RGB_DISABLE_TIMEOUT 900000 - +# define RGB_DISABLE_WHEN_USB_SUSPENDED +# undef RGB_DISABLE_TIMEOUT +# define RGB_DISABLE_TIMEOUT 900000 #endif diff --git a/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c b/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c index 13684ce09..7a105ae54 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/mkiirgb.c @@ -13,5 +13,5 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - -#include "mkiirgb.h" \ No newline at end of file + +#include "mkiirgb.h" diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h index a832110d3..b0b7e1dad 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h @@ -16,9 +16,9 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DEBOUNCE 3 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #define DISABLE_RGB_MATRIX_BAND_SAT #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/rules.mk b/keyboards/kbdfans/kbd67/mkiirgb/v1/rules.mk index 85897df63..e7c5b3780 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v1/rules.mk +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/rules.mk @@ -6,7 +6,7 @@ BOARD = QMK_PROTON_C BOOTLOADER = stm32-dfu BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c b/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c index 466b0148a..53b57dc73 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c @@ -16,108 +16,88 @@ #include "v1.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - - {0, C8_8, C7_8, C6_8}, // LA17 - {0, C9_8, C7_7, C6_7}, // LA16 - {0, C9_7, C8_7, C6_6}, // LA15 - {0, C9_6, C8_6, C7_6}, // LA14 - {0, C9_5, C8_5, C7_5}, // LA13 - {0, C9_4, C8_4, C7_4}, // LA12 - {0, C9_3, C8_3, C7_3}, // LA11 - {0, C9_2, C8_2, C7_2}, // LA10 - {0, C9_1, C8_1, C7_1}, // LA9 - {0, C2_9, C3_9, C4_9}, // LB0 - {0, C1_9, C3_10, C4_10}, // LB1 - {0, C1_10, C2_10, C4_11}, // LB2 - {0, C1_11, C2_11, C3_11}, // LB3 - {0, C1_13, C2_13, C3_13}, // LB5 - {0, C1_14, C2_14, C3_14}, // LB6 - - {0, C1_7, C2_7, C3_7}, // LA7 - {0, C1_6, C2_6, C3_6}, // LA6 - {0, C1_5, C2_5, C3_5}, // LA5 - {0, C1_4, C2_4, C3_4}, // LA4 - {0, C1_3, C2_3, C3_3}, // LA3 - {0, C1_2, C2_2, C4_3}, // LA2 - {0, C1_1, C3_2, C4_2}, // LA1 - {0, C2_1, C3_1, C4_1}, // LA0 - {0, C9_9, C8_9, C7_9}, // LB9 - {0, C9_10, C8_10, C7_10}, // LB10 - {0, C9_11, C8_11, C7_11}, // LB11 - {0, C9_12, C8_12, C7_12}, // LB12 - {0, C9_13, C8_13, C7_13}, // LB13 - {0, C9_14, C8_14, C7_14}, // LB14 - {0, C1_15, C2_15, C3_15}, // LB7 +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { - {0, C1_8, C2_8, C3_8}, // LA8 - {1, C9_6, C8_6, C7_6}, // LC14 - {1, C9_5, C8_5, C7_5}, // LC13 - {1, C9_4, C8_4, C7_4}, // LC12 - {1, C9_3, C8_3, C7_3}, // LC11 - {1, C9_2, C8_2, C7_2}, // LC10 - {1, C9_1, C8_1, C7_1}, // LC9 - {1, C2_9, C3_9, C4_9}, // LD0 - {1, C1_9, C3_10, C4_10}, // LD1 - {1, C1_10, C2_10, C4_11}, // LD2 - {1, C1_11, C2_11, C3_11}, // LD3 - {1, C1_12, C2_12, C3_12}, // LD4 - {1, C1_13, C2_13, C3_13}, // LD5 - {0, C1_16, C2_16, C3_16}, // LB8 + {0, C8_8, C7_8, C6_8}, // LA17 + {0, C9_8, C7_7, C6_7}, // LA16 + {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_6, C8_6, C7_6}, // LA14 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_1, C8_1, C7_1}, // LA9 + {0, C2_9, C3_9, C4_9}, // LB0 + {0, C1_9, C3_10, C4_10}, // LB1 + {0, C1_10, C2_10, C4_11}, // LB2 + {0, C1_11, C2_11, C3_11}, // LB3 + {0, C1_13, C2_13, C3_13}, // LB5 + {0, C1_14, C2_14, C3_14}, // LB6 - {1, C9_8, C7_7, C6_7}, // LC16 - {1, C1_5, C2_5, C3_5}, // LC5 - {1, C1_4, C2_4, C3_4}, // LC4 - {1, C1_3, C2_3, C3_3}, // LC3 - {1, C1_2, C2_2, C4_3}, // LC2 - {1, C1_1, C3_2, C4_2}, // LC1 - {1, C9_9, C8_9, C7_9}, // LD9 - {1, C9_10, C8_10, C7_10}, // LD10 - {1, C9_11, C8_11, C7_11}, // LD11 - {1, C9_12, C8_12, C7_12}, // LD12 - {1, C1_14, C2_14, C3_14}, // LD6 - {1, C1_15, C2_15, C3_15}, // LD7 - {1, C1_16, C2_16, C3_16}, // LD8 - {0, C9_15, C8_15, C6_14}, // LB15 + {0, C1_7, C2_7, C3_7}, // LA7 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_1, C3_2, C4_2}, // LA1 + {0, C2_1, C3_1, C4_1}, // LA0 + {0, C9_9, C8_9, C7_9}, // LB9 + {0, C9_10, C8_10, C7_10}, // LB10 + {0, C9_11, C8_11, C7_11}, // LB11 + {0, C9_12, C8_12, C7_12}, // LB12 + {0, C9_13, C8_13, C7_13}, // LB13 + {0, C9_14, C8_14, C7_14}, // LB14 + {0, C1_15, C2_15, C3_15}, // LB7 - {1, C8_8, C7_8, C6_8}, // LC17 - {1, C1_8, C2_8, C3_8}, // LC8 - {1, C1_7, C2_7, C3_7}, // LC7 - {1, C2_1, C3_1, C4_1}, // LC0 - {1, C9_14, C8_14, C7_14}, // LD14 - {1, C9_15, C8_15, C6_14}, // LD15 - {1, C8_16, C7_16, C6_16}, // LD17 - {0, C8_16, C7_16, C6_16}, // LB17 - {0, C9_16, C7_15, C6_15}, // LB16 + {0, C1_8, C2_8, C3_8}, // LA8 + {1, C9_6, C8_6, C7_6}, // LC14 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_1, C8_1, C7_1}, // LC9 + {1, C2_9, C3_9, C4_9}, // LD0 + {1, C1_9, C3_10, C4_10}, // LD1 + {1, C1_10, C2_10, C4_11}, // LD2 + {1, C1_11, C2_11, C3_11}, // LD3 + {1, C1_12, C2_12, C3_12}, // LD4 + {1, C1_13, C2_13, C3_13}, // LD5 + {0, C1_16, C2_16, C3_16}, // LB8 + + {1, C9_8, C7_7, C6_7}, // LC16 + {1, C1_5, C2_5, C3_5}, // LC5 + {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_1, C3_2, C4_2}, // LC1 + {1, C9_9, C8_9, C7_9}, // LD9 + {1, C9_10, C8_10, C7_10}, // LD10 + {1, C9_11, C8_11, C7_11}, // LD11 + {1, C9_12, C8_12, C7_12}, // LD12 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_16, C2_16, C3_16}, // LD8 + {0, C9_15, C8_15, C6_14}, // LB15 + + {1, C8_8, C7_8, C6_8}, // LC17 + {1, C1_8, C2_8, C3_8}, // LC8 + {1, C1_7, C2_7, C3_7}, // LC7 + {1, C2_1, C3_1, C4_1}, // LC0 + {1, C9_14, C8_14, C7_14}, // LD14 + {1, C9_15, C8_15, C6_14}, // LD15 + {1, C8_16, C7_16, C6_16}, // LD17 + {0, C8_16, C7_16, C6_16}, // LB17 + {0, C9_16, C7_15, C6_15}, // LB16 }; -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED,42, 43 }, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED,56, 57 }, - { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, NO_LED, 63, 64, NO_LED, 65, 66 } -}, { - {0,0},{15,0},{30,0},{45,0},{60,0},{75,0},{90,0},{105,0},{120,0},{135,0},{150,0},{165,0},{180,0},{203,0},{224,0}, - {4,16},{23,16},{38,16},{53,16},{68,16},{83,16},{98,16},{113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, - {6,32},{26,32},{41,32},{56,32},{71,32},{86,32},{101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{201,32},{224,32}, - {9,48},{34,48},{49,48},{64,48},{79,48},{94,48},{109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, - {2,64},{21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,64},{224,64} -}, { - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1 -} }; +led_config_t g_led_config = {{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, {15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29}, {30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43}, {44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, NO_LED, 56, 57}, {58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, NO_LED, 63, 64, NO_LED, 65, 66}}, + {{0, 0}, {15, 0}, {30, 0}, {45, 0}, {60, 0}, {75, 0}, {90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {203, 0}, {224, 0}, {4, 16}, {23, 16}, {38, 16}, {53, 16}, {68, 16}, {83, 16}, {98, 16}, {113, 16}, {128, 16}, {143, 16}, {158, 16}, {173, 16}, {188, 16}, {206, 16}, {224, 16}, {6, 32}, {26, 32}, {41, 32}, {56, 32}, {71, 32}, {86, 32}, {101, 32}, {116, 32}, {131, 32}, {146, 32}, {161, 32}, {176, 32}, {201, 32}, {224, 32}, {9, 48}, {34, 48}, {49, 48}, {64, 48}, {79, 48}, {94, 48}, {109, 48}, {124, 48}, {139, 48}, {154, 48}, {169, 48}, {189, 48}, {210, 48}, {224, 48}, {2, 64}, {21, 64}, {39, 64}, {96, 64}, {152, 64}, {171, 64}, {195, 64}, {210, 64}, {224, 64}}, + {1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1}}; - -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +__attribute__((weak)) void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } } diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h index 1ac9c770d..51e732f10 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h @@ -16,10 +16,10 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DEBOUNCE 3 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #define DISABLE_RGB_MATRIX_BAND_SAT #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk b/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk index 39ea07487..44ce87e44 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c b/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c index 951dd028f..562b9c454 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c @@ -16,79 +16,79 @@ #include "v2.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - - {0, C8_8, C7_8, C6_8}, // LA17 - {0, C9_8, C7_7, C6_7}, // LA16 - {0, C9_7, C8_7, C6_6}, // LA15 - {0, C9_6, C8_6, C7_6}, // LA14 - {0, C9_5, C8_5, C7_5}, // LA13 - {0, C9_4, C8_4, C7_4}, // LA12 - {0, C9_3, C8_3, C7_3}, // LA11 - {0, C9_2, C8_2, C7_2}, // LA10 - {0, C9_1, C8_1, C7_1}, // LA9 - {0, C2_9, C3_9, C4_9}, // LB0 - {0, C1_9, C3_10, C4_10}, // LB1 - {0, C1_10, C2_10, C4_11}, // LB2 - {0, C1_11, C2_11, C3_11}, // LB3 - {0, C1_13, C2_13, C3_13}, // LB5 - {0, C1_14, C2_14, C3_14}, // LB6 - - {0, C1_7, C2_7, C3_7}, // LA7 - {0, C1_6, C2_6, C3_6}, // LA6 - {0, C1_5, C2_5, C3_5}, // LA5 - {0, C1_4, C2_4, C3_4}, // LA4 - {0, C1_3, C2_3, C3_3}, // LA3 - {0, C1_2, C2_2, C4_3}, // LA2 - {0, C1_1, C3_2, C4_2}, // LA1 - {0, C2_1, C3_1, C4_1}, // LA0 - {0, C9_9, C8_9, C7_9}, // LB9 - {0, C9_10, C8_10, C7_10}, // LB10 - {0, C9_11, C8_11, C7_11}, // LB11 - {0, C9_12, C8_12, C7_12}, // LB12 - {0, C9_13, C8_13, C7_13}, // LB13 - {0, C9_14, C8_14, C7_14}, // LB14 - {0, C1_15, C2_15, C3_15}, // LB7 +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { + + {0, C8_8, C7_8, C6_8}, // LA17 + {0, C9_8, C7_7, C6_7}, // LA16 + {0, C9_7, C8_7, C6_6}, // LA15 + {0, C9_6, C8_6, C7_6}, // LA14 + {0, C9_5, C8_5, C7_5}, // LA13 + {0, C9_4, C8_4, C7_4}, // LA12 + {0, C9_3, C8_3, C7_3}, // LA11 + {0, C9_2, C8_2, C7_2}, // LA10 + {0, C9_1, C8_1, C7_1}, // LA9 + {0, C2_9, C3_9, C4_9}, // LB0 + {0, C1_9, C3_10, C4_10}, // LB1 + {0, C1_10, C2_10, C4_11}, // LB2 + {0, C1_11, C2_11, C3_11}, // LB3 + {0, C1_13, C2_13, C3_13}, // LB5 + {0, C1_14, C2_14, C3_14}, // LB6 + + {0, C1_7, C2_7, C3_7}, // LA7 + {0, C1_6, C2_6, C3_6}, // LA6 + {0, C1_5, C2_5, C3_5}, // LA5 + {0, C1_4, C2_4, C3_4}, // LA4 + {0, C1_3, C2_3, C3_3}, // LA3 + {0, C1_2, C2_2, C4_3}, // LA2 + {0, C1_1, C3_2, C4_2}, // LA1 + {0, C2_1, C3_1, C4_1}, // LA0 + {0, C9_9, C8_9, C7_9}, // LB9 + {0, C9_10, C8_10, C7_10}, // LB10 + {0, C9_11, C8_11, C7_11}, // LB11 + {0, C9_12, C8_12, C7_12}, // LB12 + {0, C9_13, C8_13, C7_13}, // LB13 + {0, C9_14, C8_14, C7_14}, // LB14 + {0, C1_15, C2_15, C3_15}, // LB7 {0, C1_8, C2_8, C3_8}, // LA8 - {1, C9_6, C8_6, C7_6}, // LC14 - {1, C9_5, C8_5, C7_5}, // LC13 - {1, C9_4, C8_4, C7_4}, // LC12 - {1, C9_3, C8_3, C7_3}, // LC11 - {1, C9_2, C8_2, C7_2}, // LC10 - {1, C9_1, C8_1, C7_1}, // LC9 - {1, C2_9, C3_9, C4_9}, // LD0 - {1, C1_9, C3_10, C4_10}, // LD1 - {1, C1_10, C2_10, C4_11}, // LD2 - {1, C1_11, C2_11, C3_11}, // LD3 - {1, C1_12, C2_12, C3_12}, // LD4 - {1, C1_13, C2_13, C3_13}, // LD5 - {0, C1_16, C2_16, C3_16}, // LB8 + {1, C9_6, C8_6, C7_6}, // LC14 + {1, C9_5, C8_5, C7_5}, // LC13 + {1, C9_4, C8_4, C7_4}, // LC12 + {1, C9_3, C8_3, C7_3}, // LC11 + {1, C9_2, C8_2, C7_2}, // LC10 + {1, C9_1, C8_1, C7_1}, // LC9 + {1, C2_9, C3_9, C4_9}, // LD0 + {1, C1_9, C3_10, C4_10}, // LD1 + {1, C1_10, C2_10, C4_11}, // LD2 + {1, C1_11, C2_11, C3_11}, // LD3 + {1, C1_12, C2_12, C3_12}, // LD4 + {1, C1_13, C2_13, C3_13}, // LD5 + {0, C1_16, C2_16, C3_16}, // LB8 - {1, C9_8, C7_7, C6_7}, // LC16 - {1, C1_5, C2_5, C3_5}, // LC5 - {1, C1_4, C2_4, C3_4}, // LC4 - {1, C1_3, C2_3, C3_3}, // LC3 - {1, C1_2, C2_2, C4_3}, // LC2 - {1, C1_1, C3_2, C4_2}, // LC1 - {1, C9_9, C8_9, C7_9}, // LD9 - {1, C9_10, C8_10, C7_10}, // LD10 - {1, C9_11, C8_11, C7_11}, // LD11 - {1, C9_12, C8_12, C7_12}, // LD12 - {1, C1_14, C2_14, C3_14}, // LD6 - {1, C1_15, C2_15, C3_15}, // LD7 - {1, C1_16, C2_16, C3_16}, // LD8 - {0, C9_15, C8_15, C6_14}, // LB15 + {1, C9_8, C7_7, C6_7}, // LC16 + {1, C1_5, C2_5, C3_5}, // LC5 + {1, C1_4, C2_4, C3_4}, // LC4 + {1, C1_3, C2_3, C3_3}, // LC3 + {1, C1_2, C2_2, C4_3}, // LC2 + {1, C1_1, C3_2, C4_2}, // LC1 + {1, C9_9, C8_9, C7_9}, // LD9 + {1, C9_10, C8_10, C7_10}, // LD10 + {1, C9_11, C8_11, C7_11}, // LD11 + {1, C9_12, C8_12, C7_12}, // LD12 + {1, C1_14, C2_14, C3_14}, // LD6 + {1, C1_15, C2_15, C3_15}, // LD7 + {1, C1_16, C2_16, C3_16}, // LD8 + {0, C9_15, C8_15, C6_14}, // LB15 - {1, C8_8, C7_8, C6_8}, // LC17 - {1, C1_8, C2_8, C3_8}, // LC8 - {1, C1_7, C2_7, C3_7}, // LC7 - {1, C2_1, C3_1, C4_1}, // LC0 - {1, C9_14, C8_14, C7_14}, // LD14 - {1, C9_15, C8_15, C6_14}, // LD15 - {1, C8_16, C7_16, C6_16}, // LD17 - {0, C8_16, C7_16, C6_16}, // LB17 - {0, C9_16, C7_15, C6_15}, // LB16 + {1, C8_8, C7_8, C6_8}, // LC17 + {1, C1_8, C2_8, C3_8}, // LC8 + {1, C1_7, C2_7, C3_7}, // LC7 + {1, C2_1, C3_1, C4_1}, // LC0 + {1, C9_14, C8_14, C7_14}, // LD14 + {1, C9_15, C8_15, C6_14}, // LD15 + {1, C8_16, C7_16, C6_16}, // LD17 + {0, C8_16, C7_16, C6_16}, // LB17 + {0, C9_16, C7_15, C6_15}, // LB16 }; @@ -100,24 +100,22 @@ led_config_t g_led_config = { { { 58, 59, 60, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, NO_LED, 63, 64, NO_LED, 65, 66 } }, { {0,0},{15,0},{30,0},{45,0},{60,0},{75,0},{90,0},{105,0},{120,0},{135,0},{150,0},{165,0},{180,0},{203,0},{224,0}, - {4,16},{23,16},{38,16},{53,16},{68,16},{83,16},{98,16},{113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, - {6,32},{26,32},{41,32},{56,32},{71,32},{86,32},{101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{201,32},{224,32}, - {9,48},{34,48},{49,48},{64,48},{79,48},{94,48},{109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, - {2,64},{21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,64},{224,64} + {4,16},{23,16},{38,16},{53,16},{68,16},{83,16},{98,16},{113,16},{128,16},{143,16},{158,16},{173,16},{188,16},{206,16},{224,16}, + {6,32},{26,32},{41,32},{56,32},{71,32},{86,32},{101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{201,32},{224,32}, + {9,48},{34,48},{49,48},{64,48},{79,48},{94,48},{109,48},{124,48},{139,48},{154,48},{169,48},{189,48},{210,48},{224,48}, + {2,64},{21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,64},{224,64} }, { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1 } }; __attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } } diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h index 6a783f55a..1ee83cdc9 100755 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h @@ -42,7 +42,7 @@ #define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define USB_SUSPEND_WAKEUP_DELAY 5000 #define RGB_MATRIX_KEYPRESSES #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c index 585ae39b6..6e368a5c7 100755 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c @@ -18,80 +18,80 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS21_SW1, CS20_SW1, CS19_SW1}, {0, CS21_SW2, CS20_SW2, CS19_SW2}, - {0, CS21_SW3, CS20_SW3, CS19_SW3}, - {0, CS21_SW4, CS20_SW4, CS19_SW4}, + {0, CS21_SW3, CS20_SW3, CS19_SW3}, + {0, CS21_SW4, CS20_SW4, CS19_SW4}, {0, CS21_SW5, CS20_SW5, CS19_SW5}, {0, CS21_SW6, CS20_SW6, CS19_SW6}, - {0, CS21_SW7, CS20_SW7, CS19_SW7}, - {0, CS21_SW8, CS20_SW8, CS19_SW8}, - {0, CS24_SW1, CS23_SW1, CS22_SW1}, - {0, CS24_SW2, CS23_SW2, CS22_SW2}, + {0, CS21_SW7, CS20_SW7, CS19_SW7}, + {0, CS21_SW8, CS20_SW8, CS19_SW8}, + {0, CS24_SW1, CS23_SW1, CS22_SW1}, + {0, CS24_SW2, CS23_SW2, CS22_SW2}, {0, CS24_SW3, CS23_SW3, CS22_SW3}, - {0, CS24_SW4, CS23_SW4, CS22_SW4}, + {0, CS24_SW4, CS23_SW4, CS22_SW4}, {0, CS24_SW5, CS23_SW5, CS22_SW5}, {0, CS24_SW6, CS23_SW6, CS22_SW6}, - {0, CS24_SW7, CS23_SW7, CS22_SW7}, - - {0, CS15_SW1, CS14_SW1, CS13_SW1}, + {0, CS24_SW7, CS23_SW7, CS22_SW7}, + + {0, CS15_SW1, CS14_SW1, CS13_SW1}, {0, CS15_SW2, CS14_SW2, CS13_SW2}, {0, CS15_SW3, CS14_SW3, CS13_SW3}, {0, CS15_SW4, CS14_SW4, CS13_SW4}, {0, CS15_SW5, CS14_SW5, CS13_SW5}, {0, CS15_SW6, CS14_SW6, CS13_SW6}, {0, CS15_SW7, CS14_SW7, CS13_SW7}, - {0, CS15_SW8, CS14_SW8, CS13_SW8}, - {0, CS30_SW1, CS29_SW1, CS28_SW1}, + {0, CS15_SW8, CS14_SW8, CS13_SW8}, + {0, CS30_SW1, CS29_SW1, CS28_SW1}, {0, CS30_SW2, CS29_SW2, CS28_SW2}, {0, CS30_SW3, CS29_SW3, CS28_SW3}, {0, CS30_SW4, CS29_SW4, CS28_SW4}, {0, CS30_SW5, CS29_SW5, CS28_SW5}, {0, CS30_SW6, CS29_SW6, CS28_SW6}, - {0, CS30_SW7, CS29_SW7, CS28_SW7}, - - {0, CS12_SW1, CS11_SW1, CS10_SW1}, - {0, CS12_SW2, CS11_SW2, CS10_SW2}, - {0, CS12_SW3, CS11_SW3, CS10_SW3}, - {0, CS12_SW4, CS11_SW4, CS10_SW4}, - {0, CS12_SW5, CS11_SW5, CS10_SW5}, - {0, CS12_SW6, CS11_SW6, CS10_SW6}, - {0, CS12_SW7, CS11_SW7, CS10_SW7}, - {0, CS12_SW8, CS11_SW8, CS10_SW8}, - {0, CS33_SW1, CS32_SW1, CS31_SW1}, - {0, CS33_SW2, CS32_SW2, CS31_SW2}, - {0, CS33_SW3, CS32_SW3, CS31_SW3}, - {0, CS33_SW4, CS32_SW4, CS31_SW4}, - {0, CS33_SW5, CS32_SW5, CS31_SW5}, - {0, CS33_SW7, CS32_SW7, CS31_SW7}, - - {0, CS9_SW1, CS8_SW1, CS7_SW1}, - {0, CS9_SW2, CS8_SW2, CS7_SW2}, - {0, CS9_SW3, CS8_SW3, CS7_SW3}, - {0, CS9_SW4, CS8_SW4, CS7_SW4}, - {0, CS9_SW5, CS8_SW5, CS7_SW5}, - {0, CS9_SW6, CS8_SW6, CS7_SW6}, - {0, CS9_SW7, CS8_SW7, CS7_SW7}, - {0, CS9_SW8, CS8_SW8, CS7_SW8}, + {0, CS30_SW7, CS29_SW7, CS28_SW7}, + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, + {0, CS12_SW2, CS11_SW2, CS10_SW2}, + {0, CS12_SW3, CS11_SW3, CS10_SW3}, + {0, CS12_SW4, CS11_SW4, CS10_SW4}, + {0, CS12_SW5, CS11_SW5, CS10_SW5}, + {0, CS12_SW6, CS11_SW6, CS10_SW6}, + {0, CS12_SW7, CS11_SW7, CS10_SW7}, + {0, CS12_SW8, CS11_SW8, CS10_SW8}, + {0, CS33_SW1, CS32_SW1, CS31_SW1}, + {0, CS33_SW2, CS32_SW2, CS31_SW2}, + {0, CS33_SW3, CS32_SW3, CS31_SW3}, + {0, CS33_SW4, CS32_SW4, CS31_SW4}, + {0, CS33_SW5, CS32_SW5, CS31_SW5}, + {0, CS33_SW7, CS32_SW7, CS31_SW7}, + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, + {0, CS9_SW2, CS8_SW2, CS7_SW2}, + {0, CS9_SW3, CS8_SW3, CS7_SW3}, + {0, CS9_SW4, CS8_SW4, CS7_SW4}, + {0, CS9_SW5, CS8_SW5, CS7_SW5}, + {0, CS9_SW6, CS8_SW6, CS7_SW6}, + {0, CS9_SW7, CS8_SW7, CS7_SW7}, + {0, CS9_SW8, CS8_SW8, CS7_SW8}, {0, CS36_SW1, CS35_SW1, CS34_SW1}, {0, CS36_SW2, CS35_SW2, CS34_SW2}, {0, CS36_SW3, CS35_SW3, CS34_SW3}, {0, CS36_SW4, CS35_SW4, CS34_SW4}, {0, CS36_SW5, CS35_SW5, CS34_SW5}, {0, CS36_SW7, CS35_SW7, CS34_SW7}, - + {0, CS3_SW1, CS2_SW1, CS1_SW1}, {0, CS3_SW2, CS2_SW2, CS1_SW2}, {0, CS3_SW3, CS2_SW3, CS1_SW3}, {0, CS3_SW6, CS2_SW6, CS1_SW6}, -// {0, CS39_SW1, CS38_SW1, CS37_SW1}, +// {0, CS39_SW1, CS38_SW1, CS37_SW1}, {0, CS39_SW2, CS38_SW2, CS37_SW2}, {0, CS39_SW3, CS38_SW3, CS37_SW3}, {0, CS39_SW4, CS38_SW4, CS37_SW4}, {0, CS39_SW5, CS38_SW5, CS37_SW5}, - {0, CS39_SW7, CS38_SW7, CS37_SW7} - + {0, CS39_SW7, CS38_SW7, CS37_SW7} + }; led_config_t g_led_config = { { // Key Matrix to LED Index @@ -112,17 +112,15 @@ led_config_t g_led_config = { { // LED Index to Flag 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1 + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1 } }; __attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ - if (host_keyboard_led_state().caps_lock) - { +void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } } diff --git a/keyboards/kbdfans/kbd67/rev1/config.h b/keyboards/kbdfans/kbd67/rev1/config.h index b12b83683..b8aad647c 100644 --- a/keyboards/kbdfans/kbd67/rev1/config.h +++ b/keyboards/kbdfans/kbd67/rev1/config.h @@ -182,26 +182,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h b/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h index a3ed4f762..90fb10ebb 100644 --- a/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h @@ -16,4 +16,4 @@ #pragma once -// place overrides here +#define LAYER_STATE_8BIT diff --git a/keyboards/kbdfans/kbd67/rev1/rules.mk b/keyboards/kbdfans/kbd67/rev1/rules.mk index 786722eb7..fe5da7716 100644 --- a/keyboards/kbdfans/kbd67/rev1/rules.mk +++ b/keyboards/kbdfans/kbd67/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/kbd67/rev2/info.json b/keyboards/kbdfans/kbd67/rev2/info.json index b5cc79654..208a13c58 100644 --- a/keyboards/kbdfans/kbd67/rev2/info.json +++ b/keyboards/kbdfans/kbd67/rev2/info.json @@ -235,7 +235,7 @@ {"x":14, "y":4}, {"x":15, "y":4}] }, - "LAYOUT_65_ansi_blocker_splitbs": { + "LAYOUT_65_ansi_blocker_split_bs": { "layout": [ {"x":0, "y":0}, {"x":1, "y":0}, diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/rules.mk b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/rules.mk index 108a7517f..3031077b9 100644 --- a/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/rules.mk +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kbdfans/kbd67/rev2/rules.mk b/keyboards/kbdfans/kbd67/rev2/rules.mk index 280e0b41e..e209df498 100644 --- a/keyboards/kbdfans/kbd67/rev2/rules.mk +++ b/keyboards/kbdfans/kbd67/rev2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/kbd6x/config.h b/keyboards/kbdfans/kbd6x/config.h index 390e5a66e..d9758edb8 100644 --- a/keyboards/kbdfans/kbd6x/config.h +++ b/keyboards/kbdfans/kbd6x/config.h @@ -169,23 +169,3 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk index e2f34468a..0f7f72f34 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk @@ -1,5 +1,5 @@ # Generic features -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = no EXTRAKEY_ENABLE = yes diff --git a/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c index 1e0fc8ad7..6bbbdd87c 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c @@ -29,15 +29,15 @@ void eeconfig_init_user(void) { set_unicode_input_mode(UC_LNX); } -#define DE_AE UC(0x00E4) -#define DE_SS UC(0x00DF) -#define DE_OE UC(0x00F6) -#define DE_UE UC(0x00FC) -#define DE_AE_CAP UC(0x00C4) -#define DE_OE_CAP UC(0x00D6) -#define DE_UE_CAP UC(0x00DC) +#define DE_ADIA UC(0x00E4) +#define DE_SS UC(0x00DF) +#define DE_ODIA UC(0x00F6) +#define DE_UDIA UC(0x00FC) +#define DE_ADIA_CAP UC(0x00C4) +#define DE_ODIA_CAP UC(0x00D6) +#define DE_UDIA_CAP UC(0x00DC) -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case NM_MODE: rgblight_setrgb (0x00, 0x66, 0x00); @@ -174,15 +174,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [ACCENT] = LAYOUT( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, - _______, RGB_TOG, RGB_MODE_PLAIN, _______, _______, _______, _______, _______, DE_UE, _______, _______, _______, _______, _______, - _______, DE_AE, UC_Z, DE_SS, _______, _______, _______, _______, _______, _______, DE_OE, _______, _______, + _______, RGB_TOG, RGB_MODE_PLAIN, _______, _______, _______, _______, _______, DE_UDIA, _______, _______, _______, _______, _______, + _______, DE_ADIA, UC_Z, DE_SS, _______, _______, _______, _______, _______, _______, DE_ODIA, _______, _______, OSL(ACCENT_CAP), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(CL), _______, _______, _______, _______, _______, _______, _______ ), [ACCENT_CAP] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, DE_UE_CAP, _______, _______, _______, _______, _______, - _______, DE_AE_CAP, _______, DE_SS, _______, _______, _______, _______, _______, _______, DE_OE_CAP, _______, TO(CL), + _______, _______, _______, _______, _______, _______, _______, _______, DE_UDIA_CAP, _______, _______, _______, _______, _______, + _______, DE_ADIA_CAP, _______, DE_SS, _______, _______, _______, _______, _______, _______, DE_ODIA_CAP, _______, TO(CL), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/kbdfans/kbd6x/keymaps/othi/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/othi/rules.mk index 00bd80ef0..9a4459c28 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/othi/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/othi/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kbdfans/kbd6x/keymaps/wanleg/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/wanleg/rules.mk index 92cc41e21..76c257581 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/wanleg/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/wanleg/rules.mk @@ -1,3 +1,3 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) \ No newline at end of file diff --git a/keyboards/kbdfans/kbd6x/rules.mk b/keyboards/kbdfans/kbd6x/rules.mk index 7d9f13e31..eabefb6bd 100644 --- a/keyboards/kbdfans/kbd6x/rules.mk +++ b/keyboards/kbdfans/kbd6x/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes diff --git a/keyboards/kbdfans/kbd75/keymaps/adit/keymap.c b/keyboards/kbdfans/kbd75/keymaps/adit/keymap.c index 778515788..af4243c49 100644 --- a/keyboards/kbdfans/kbd75/keymaps/adit/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/adit/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( @@ -23,37 +21,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c index 533d83fdb..998f1a25d 100644 --- a/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case WINDOWS_LAYER: rgblight_setrgb_blue(); diff --git a/keyboards/kbdfans/kbd75/keymaps/noroadsleft/rules.mk b/keyboards/kbdfans/kbd75/keymaps/noroadsleft/rules.mk index 6867e0a60..87373812c 100644 --- a/keyboards/kbdfans/kbd75/keymaps/noroadsleft/rules.mk +++ b/keyboards/kbdfans/kbd75/keymaps/noroadsleft/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite CONSOLE_ENABLE = yes TAP_DANCE_ENABLE = yes diff --git a/keyboards/kbdfans/kbd75/keymaps/tucznak/rules.mk b/keyboards/kbdfans/kbd75/keymaps/tucznak/rules.mk index c854fdd2d..77bc0e2b0 100644 --- a/keyboards/kbdfans/kbd75/keymaps/tucznak/rules.mk +++ b/keyboards/kbdfans/kbd75/keymaps/tucznak/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kbdfans/kbd75/rev1/rules.mk b/keyboards/kbdfans/kbd75/rev1/rules.mk index 054cb687b..fb31f5609 100644 --- a/keyboards/kbdfans/kbd75/rev1/rules.mk +++ b/keyboards/kbdfans/kbd75/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd75/rev2/rules.mk b/keyboards/kbdfans/kbd75/rev2/rules.mk index 054cb687b..fb31f5609 100644 --- a/keyboards/kbdfans/kbd75/rev2/rules.mk +++ b/keyboards/kbdfans/kbd75/rev2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd8x/rules.mk b/keyboards/kbdfans/kbd8x/rules.mk index b1ac31739..a4f86de37 100644 --- a/keyboards/kbdfans/kbd8x/rules.mk +++ b/keyboards/kbdfans/kbd8x/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd8x_mk2/config.h b/keyboards/kbdfans/kbd8x_mk2/config.h index 008b6b517..a8ead3fd1 100644 --- a/keyboards/kbdfans/kbd8x_mk2/config.h +++ b/keyboards/kbdfans/kbd8x_mk2/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kbdfans/kbd8x_mk2/rules.mk b/keyboards/kbdfans/kbd8x_mk2/rules.mk index 3bb1ec74e..6524858e4 100644 --- a/keyboards/kbdfans/kbd8x_mk2/rules.mk +++ b/keyboards/kbdfans/kbd8x_mk2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/kbdmini/config.h b/keyboards/kbdfans/kbdmini/config.h index 5a36e983d..fc65f4341 100644 --- a/keyboards/kbdfans/kbdmini/config.h +++ b/keyboards/kbdfans/kbdmini/config.h @@ -35,7 +35,7 @@ #ifdef RGB_MATRIX_ENABLE #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/kbdfans/kbdmini/kbdmini.c b/keyboards/kbdfans/kbdmini/kbdmini.c index 0e0df2f9a..799803c6f 100644 --- a/keyboards/kbdfans/kbdmini/kbdmini.c +++ b/keyboards/kbdfans/kbdmini/kbdmini.c @@ -1,6 +1,6 @@ #include "kbdmini.h" -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { { 0, B_9, A_9, C_9 }, //LA33 { 0, B_10, A_10, C_10 }, //LA37 { 0, B_11, A_11, C_11 }, //LA41 diff --git a/keyboards/kbdfans/kbdmini/rules.mk b/keyboards/kbdfans/kbdmini/rules.mk index aaab18afc..e9716f3f3 100644 --- a/keyboards/kbdfans/kbdmini/rules.mk +++ b/keyboards/kbdfans/kbdmini/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbdpad/mk1/rules.mk b/keyboards/kbdfans/kbdpad/mk1/rules.mk index 679ac08fa..d46766338 100644 --- a/keyboards/kbdfans/kbdpad/mk1/rules.mk +++ b/keyboards/kbdfans/kbdpad/mk1/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/kbdfans/kbdpad_mk2/config.h b/keyboards/kbdfans/kbdpad_mk2/config.h index 2c32d1c8a..e99a73696 100644 --- a/keyboards/kbdfans/kbdpad_mk2/config.h +++ b/keyboards/kbdfans/kbdpad_mk2/config.h @@ -193,26 +193,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kbdfans/kbdpad_mk2/rules.mk b/keyboards/kbdfans/kbdpad_mk2/rules.mk index 32e834ee0..406195888 100644 --- a/keyboards/kbdfans/kbdpad_mk2/rules.mk +++ b/keyboards/kbdfans/kbdpad_mk2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/maja/config.h b/keyboards/kbdfans/maja/config.h index d8553766b..3722c8381 100755 --- a/keyboards/kbdfans/maja/config.h +++ b/keyboards/kbdfans/maja/config.h @@ -18,9 +18,9 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DEBOUNCE 3 #define RGB_DISABLE_AFTER_TIMEOUT 0 -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_KEYPRESSES -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #define DISABLE_RGB_MATRIX_BAND_SAT #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/keyboards/kbdfans/maja/maja.c b/keyboards/kbdfans/maja/maja.c index a0afcbda8..9619a84b4 100755 --- a/keyboards/kbdfans/maja/maja.c +++ b/keyboards/kbdfans/maja/maja.c @@ -1,6 +1,6 @@ #include "maja.h" -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, C2_1, C3_1, C4_1}, // LA0 {0, C1_1, C3_2, C4_2}, // LA1 {0, C1_2, C2_2, C4_3}, // LA2 diff --git a/keyboards/kbdfans/maja/rules.mk b/keyboards/kbdfans/maja/rules.mk index c499a39aa..03054bc70 100755 --- a/keyboards/kbdfans/maja/rules.mk +++ b/keyboards/kbdfans/maja/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kbdfans/maja_soldered/rules.mk b/keyboards/kbdfans/maja_soldered/rules.mk index 6cd4d9260..481b64bcd 100755 --- a/keyboards/kbdfans/maja_soldered/rules.mk +++ b/keyboards/kbdfans/maja_soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kc60/keymaps/stanleylai/keymap.c b/keyboards/kc60/keymaps/stanleylai/keymap.c index 887b5da72..54428f287 100644 --- a/keyboards/kc60/keymaps/stanleylai/keymap.c +++ b/keyboards/kc60/keymaps/stanleylai/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Base Default Layer // Mac Modifier Layout. Use BootMagic to toggle GUI and ALT positions. [_BL] = LAYOUT( - F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + KC_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, \ LT(_FL, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, MO(_FL), KC_UP, \ @@ -46,39 +46,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_NO, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS), #endif }; - - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/kc60/keymaps/stanleylai/rules.mk b/keyboards/kc60/keymaps/stanleylai/rules.mk index b4471d606..39223abfa 100644 --- a/keyboards/kc60/keymaps/stanleylai/rules.mk +++ b/keyboards/kc60/keymaps/stanleylai/rules.mk @@ -3,7 +3,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kc60/keymaps/wigguno/rules.mk b/keyboards/kc60/keymaps/wigguno/rules.mk index d95742d42..43fcc254d 100644 --- a/keyboards/kc60/keymaps/wigguno/rules.mk +++ b/keyboards/kc60/keymaps/wigguno/rules.mk @@ -3,7 +3,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kc60/rules.mk b/keyboards/kc60/rules.mk index 8f3ab9eb5..33d1cdb81 100644 --- a/keyboards/kc60/rules.mk +++ b/keyboards/kc60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/kc60se/config.h b/keyboards/kc60se/config.h index 697e20d34..ec0758794 100644 --- a/keyboards/kc60se/config.h +++ b/keyboards/kc60se/config.h @@ -146,23 +146,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/kc60se/rules.mk b/keyboards/kc60se/rules.mk index 0006d9bb8..c828d55d4 100644 --- a/keyboards/kc60se/rules.mk +++ b/keyboards/kc60se/rules.mk @@ -13,7 +13,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = lite # plugin usb while holding down Esc, will toggle on NKRO and change will persist +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # default keymap does not map mouse EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -23,7 +23,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c b/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c index d1792d2b2..a449c3ec3 100644 --- a/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c +++ b/keyboards/keebio/bdn9/keymaps/vosechu-ksp/keymap.c @@ -58,7 +58,7 @@ bool panic_mode = false; bool flight_mode = false; bool rcs_mode = false; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { base_mode = false; panic_mode = false; flight_mode = false; diff --git a/keyboards/keebio/bdn9/rev1/rules.mk b/keyboards/keebio/bdn9/rev1/rules.mk index b3c34d2d4..e9d43ac08 100644 --- a/keyboards/keebio/bdn9/rev1/rules.mk +++ b/keyboards/keebio/bdn9/rev1/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/keebio/bdn9/rev2/rules.mk b/keyboards/keebio/bdn9/rev2/rules.mk index df6de1407..ab83f7512 100644 --- a/keyboards/keebio/bdn9/rev2/rules.mk +++ b/keyboards/keebio/bdn9/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -18,7 +18,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 ENCODER_ENABLE = yes diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c b/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c index f97f0abf1..29531b997 100644 --- a/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c +++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/keymap.c @@ -21,11 +21,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_LIST] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_BASE), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) @@ -41,7 +41,7 @@ void matrix_post_init_user(void) { led_set_user(host_keyboard_leds()); } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case _LIST: rgblight_sethsv_noeeprom(0,255,255); @@ -52,7 +52,7 @@ uint32_t layer_state_set_user(uint32_t state) { rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); break; } - + return state; } diff --git a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/keymap.c b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/keymap.c index d15569ee9..ba272ca63 100644 --- a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/keymap.c +++ b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/keymap.c @@ -61,7 +61,7 @@ void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { -[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer [LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap [RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap [EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap @@ -77,7 +77,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak (Default layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) - ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | | | | | Adjust| | F12 | F6 | F7 | F8 | F9 | F10 | F11 | |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| | = | 1 | 2 | 3 | 4 | 5 | | | | | Numpad| | | 6 | 7 | 8 | 9 | 0 | - | @@ -93,16 +93,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_COLEMAK] = LAYOUT( \ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_HOME, KC_PAUS, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_HOME, KC_PAUS, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* QWERTY (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) - ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | | | | | Adjust| | F12 | F6 | F7 | F8 | F9 | F10 | F11 | |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| | = | 1 | 2 | 3 | 4 | 5 | | | | | Numpad| | | 6 | 7 | 8 | 9 | 0 | - | @@ -118,16 +118,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = LAYOUT( \ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_HOME, KC_PAUS, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_HOME, KC_PAUS, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Numbers/Symbols layer (Multiple characters: single-tap for first, double-tap for second) - ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. | | | | | | | | | | | | | | | | | | | | |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| | F12 | F1 | F2 | F3 | F4 | F5 | | | | | | | | F6 | F7 | F8 | F9 | F10 | F12 | @@ -160,7 +160,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Function layer - ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. | | | | | | | | | | | | | | | | | | | | |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| | F12 | F1 | F2 | F3 | F4 | F5 | | | | | | | | F6 | F7 | F8 | F9 | F10 | F12 | @@ -194,7 +194,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Numpad layer (Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) - ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. | | | | | | | | | | | | | | | | | | | | |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| | | NumLk | | | | | | | | | | | Tab | NumLk | KP / | KP * | KP - | | | @@ -219,7 +219,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak gaming/vanilla (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Del/NS2 on right side to access Adjust layer) - ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | Adjust| | F12 | F6 | F7 | F8 | F9 | F10 | F11 | |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| | = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | Numpad| | | 6 | 7 | 8 | 9 | 0 | - | @@ -235,16 +235,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_COLEMAKGM] = LAYOUT( \ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_HOME, KC_PAUS, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, KC_LALT, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_END, _______, ENTNS, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_HOME, KC_PAUS, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ESC, KC_LALT, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_END, _______, ENTNS, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* QWERTY gaming/vanilla (Limited access to Function or Numbers layers; mainly used for gaming; Ent/NS + Del/NS2 on right side to access Adjust layer) - ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | | Adjust| | F12 | F6 | F7 | F8 | F9 | F10 | F11 | |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| | = | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | Numpad| | | 6 | 7 | 8 | 9 | 0 | - | @@ -260,16 +260,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTYGM] = LAYOUT( \ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_HOME, KC_PAUS, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_PGUP, KC_SLCK, _______, _______, 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_ESC, KC_LALT, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_END, _______, ENTNS, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_HOME, KC_PAUS, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_PGUP, KC_SLCK, _______, _______, 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_ESC, KC_LALT, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, KC_END, _______, ENTNS, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Adjust layer (Enter/Number + Delete/Number2 under non-gaming/vanilla layers or press & hold Adjust key on function row; Numpad is a toggle) - ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. + ,-----------------------------------------------------------------------. ,-----------------------------------------------------------------------. | | | | | | | | | | | | | | | | | | | | |-------+-------+-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------+-------+-------| | |Colemak| Qwerty| |ColmkGM| QWGM | | | | | | | | Numpad| | | | | RESET | @@ -304,7 +304,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); } diff --git a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/rules.mk b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/rules.mk index cf63c44f4..390cb3fd6 100644 --- a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/rules.mk +++ b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/keymap.c b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/keymap.c index e42f6797e..fe951ac01 100644 --- a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/keymap.c +++ b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/keymap.c @@ -50,7 +50,7 @@ void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { -[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer [LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap [RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap [EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap @@ -97,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak (Default layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) - ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | | | | | Adjust | | F12 | F6 | F7 | F8 | F9 | F10 | F11 | |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| | = | 1 | 2 | 3 | 4 | 5 | | | | | Numpad | | | 6 | 7 | 8 | 9 | 0 | - | @@ -113,17 +113,17 @@ Colemak */ [_COLEMAK] = LAYOUT( \ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_HOME, KC_PAUS, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, _______, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_HOME, KC_PAUS, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* QWERTY (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) - ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | | | | | Adjust | | F12 | F6 | F7 | F8 | F9 | F10 | F11 | |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| | = | 1 | 2 | 3 | 4 | 5 | | | | | Numpad | | | 6 | 7 | 8 | 9 | 0 | - | @@ -139,17 +139,17 @@ QWERTY */ [_QWERTY] = LAYOUT( \ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, ADJUST, _______, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_HOME, KC_PAUS, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, NUMPAD, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_HOME, KC_PAUS, _______, _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_PGUP, KC_SLCK, _______, _______, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, CTLESC, ALTAPP, KC_PGDN, KC_PSCR, KC_RALT, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, ENTNS, KC_BSPC, KC_END, _______, KC_ENT, DELNS, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Numbers/Symbols layer (Multiple characters: single-tap for first, double-tap for second) - ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. | | | | | | | | | | | | | | | | | | | | |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| | F12 | F1 | F2 | F3 | F4 | F5 | | | | | | | | F6 | F7 | F8 | F9 | F10 | F12 | @@ -183,7 +183,7 @@ Numbers/Symbols layer /* Function layer - ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. | | | | | | | | | | | | | | | | | | | | |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| | F12 | F1 | F2 | F3 | F4 | F5 | | | | | | | | F6 | F7 | F8 | F9 | F10 | F12 | @@ -218,7 +218,7 @@ Function layer /* Numpad layer (Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) - ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. | | | | | | | | | | | | | | | | | | | | |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| | | NumLk | | | | | | | | | | | Tab | NumLk | KP / | KP * | KP - | | | @@ -244,7 +244,7 @@ Numpad layer /* Gaming (Toggle gaming layer with limited dual-role keys and layer access; NKRO turned on by default; Ent/NS + Delete/Numbers2 to access Adjust layer) - ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. | | | | | | | F6 | F7 | F8 | | | | | | | | | | | |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| | | | | | | | 6 | 7 | 8 | | | | | | | | | | | @@ -260,17 +260,17 @@ Gaming */ [_GAMING] = LAYOUT( \ _______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, KC_6, KC_7, KC_8, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, KC_J, KC_L, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LCTL, _______, _______, _______, _______, _______, KC_H, KC_N, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LSFT, _______, _______, _______, _______, _______, KC_ESC, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, - _______, _______, _______, _______, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, _______, _______, ENTNS, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, KC_6, KC_7, KC_8, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_J, KC_L, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, _______, _______, _______, _______, _______, KC_H, KC_N, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, KC_ESC, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, _______, KC_LALT, KC_SPC, KC_ENT, KC_BSPC, _______, _______, ENTNS, _______, _______, _______, _______, _______, _______, _______ ), /* Adjust layer (Press and hold Adjust key on the function row or Enter/Number + Delete/Number2 to access; Numpad and NKRO are on toggle) - ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. + ,--------------------------------------------------------------------------------. ,--------------------------------------------------------------------------------. | | | | | | | | | | | | | | | | | | | | |--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| | | Colemak| Qwerty | | Gaming | | | | | | | | | Numpad | | | | | RESET | @@ -304,7 +304,7 @@ Adjust layer }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); } diff --git a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/rules.mk b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/rules.mk index cf63c44f4..390cb3fd6 100644 --- a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/rules.mk +++ b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/keebio/bfo9000/rules.mk b/keyboards/keebio/bfo9000/rules.mk index af9ca797b..7dac8a22b 100644 --- a/keyboards/keebio/bfo9000/rules.mk +++ b/keyboards/keebio/bfo9000/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/keebio/choconum/config.h b/keyboards/keebio/choconum/config.h index 30befff05..15b3eecbe 100644 --- a/keyboards/keebio/choconum/config.h +++ b/keyboards/keebio/choconum/config.h @@ -149,26 +149,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/keebio/choconum/rules.mk b/keyboards/keebio/choconum/rules.mk index f166909c5..998a9310c 100644 --- a/keyboards/keebio/choconum/rules.mk +++ b/keyboards/keebio/choconum/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -18,7 +18,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/keebio/chocopad/rules.mk b/keyboards/keebio/chocopad/rules.mk index a21d919d7..e35a99f3b 100644 --- a/keyboards/keebio/chocopad/rules.mk +++ b/keyboards/keebio/chocopad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebio/dilly/rules.mk b/keyboards/keebio/dilly/rules.mk index dd730c950..dfdd23cb8 100644 --- a/keyboards/keebio/dilly/rules.mk +++ b/keyboards/keebio/dilly/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebio/dsp40/rev1/rules.mk b/keyboards/keebio/dsp40/rev1/rules.mk index ab4684228..93646041f 100644 --- a/keyboards/keebio/dsp40/rev1/rules.mk +++ b/keyboards/keebio/dsp40/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/keebio/ergodicity/config.h b/keyboards/keebio/ergodicity/config.h index 612f90a5d..0d038a870 100644 --- a/keyboards/keebio/ergodicity/config.h +++ b/keyboards/keebio/ergodicity/config.h @@ -176,26 +176,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/keebio/ergodicity/rules.mk b/keyboards/keebio/ergodicity/rules.mk index 215430b27..090d3b1d7 100644 --- a/keyboards/keebio/ergodicity/rules.mk +++ b/keyboards/keebio/ergodicity/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/keebio/foldkb/rules.mk b/keyboards/keebio/foldkb/rules.mk index 4f3a43261..fd28474ae 100644 --- a/keyboards/keebio/foldkb/rules.mk +++ b/keyboards/keebio/foldkb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/keebio/fourier/rules.mk b/keyboards/keebio/fourier/rules.mk index 6ad9ad9ce..b9d91e6fe 100644 --- a/keyboards/keebio/fourier/rules.mk +++ b/keyboards/keebio/fourier/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 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 diff --git a/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c b/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c index ce2fee792..ff98545ba 100644 --- a/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c +++ b/keyboards/keebio/iris/keymaps/antonlindstrom/keymap.c @@ -13,10 +13,6 @@ #define KC_RASE MO(_RAISE) #define KC_RST RESET -#define KC_AA SE_AA -#define KC_AE SE_AE -#define KC_OE SE_OSLH - #define KC_LBR SE_LBRC #define KC_RBR SE_RBRC @@ -26,9 +22,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,----+----+----+----+----+----. ,----+----+----+----+----+----. KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_BSPC, //|----+----+----+----+----+----| |----+----+----+----+----+----| - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_AA , + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , SE_ARNG , //|----+----+----+----+----+----| |----+----+----+----+----+----| - KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_OE , KC_AE , + KC_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , SE_ODIA , SE_ADIA , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_LBR ,KC_RBR , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_MINS, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' @@ -42,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| SE_ACUT,RGB_TOG,RGB_MOD,RGB_M_B,RGB_M_K,_______, _______,_______,_______,_______,_______,SE_ASTR, //|-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------| - _______,_______,SE_LESS,SE_GRTR,SE_PIPE,SE_SLSH, SE_BSLS,SE_LCBR,SE_RCBR,SE_LBRC,SE_RBRC,SE_APOS, + _______,_______,SE_LABK,SE_RABK,SE_PIPE,SE_SLSH, SE_BSLS,SE_LCBR,SE_RCBR,SE_LBRC,SE_RBRC,SE_QUOT, //|-------+-------+-------+-------+-------+-------+-------. ,-------|-------+-------+-------+-------+-------+-------| _______,KC_NUBS,_______,_______,_______,_______,SE_LCBR, SE_RCBR,_______,_______,_______,_______,_______,_______, //`-------+-------+-------+--+----+-------+-------+-------/ \-------+-------+-------+-------+-------+-------+-------' diff --git a/keyboards/keebio/iris/keymaps/ddone/rules.mk b/keyboards/keebio/iris/keymaps/ddone/rules.mk index c81eaa937..f652b45c9 100644 --- a/keyboards/keebio/iris/keymaps/ddone/rules.mk +++ b/keyboards/keebio/iris/keymaps/ddone/rules.mk @@ -1,4 +1,4 @@ LTO_ENABLE = yes COMMAND_ENABLE = no MOUSEKEY_ENABLE = yes -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c index fe5e67b52..45b05e350 100644 --- a/keyboards/keebio/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c @@ -38,58 +38,32 @@ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ ) -#define LAYOUT_iris_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), - [_QWERTY] = LAYOUT_iris_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), - [_COLEMAK] = LAYOUT_iris_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), - - [_DVORAK] = LAYOUT_iris_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), - - [_WORKMAN] = LAYOUT_iris_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_iris_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_iris_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_iris_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_iris_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), [_GAMEPAD] = LAYOUT_wrapper( KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/keebio/iris/keymaps/drashna/rules.mk b/keyboards/keebio/iris/keymaps/drashna/rules.mk index cb398cd4e..41c67b573 100644 --- a/keyboards/keebio/iris/keymaps/drashna/rules.mk +++ b/keyboards/keebio/iris/keymaps/drashna/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -12,7 +12,6 @@ SWAP_HANDS_ENABLE = no SPACE_CADET_ENABLE = no INDICATOR_LIGHTS = no -RGBLIGHT_TWINKLE = no RGBLIGHT_STARTUP_ANIMATION = no BOOTLOADER = qmk-dfu diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/config.h b/keyboards/keebio/iris/keymaps/drashna_lp/config.h deleted file mode 100644 index 414acab84..000000000 --- a/keyboards/keebio/iris/keymaps/drashna_lp/config.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . - */ - -#pragma once - -/* Use I2C or Serial, not both */ -#include "../drashna/config.h" - -#ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 16 // Number of LEDs -# undef RGBLED_SPLIT -# define RGBLED_SPLIT \ - { 8, 8 } -#endif - -#undef PRODUCT -#ifdef KEYBOARD_keebio_iris_rev2 -# define PRODUCT Drashna Hacked Iris LP Rev .2(Backlit) -#endif - -#undef SHFT_LED1 -#define SHFT_LED1 5 -#undef SHFT_LED2 -#define SHFT_LED2 10 - -#undef CTRL_LED1 -#define CTRL_LED1 6 -#undef CTRL_LED2 -#define CTRL_LED2 9 - -#undef ALT_LED1 -#define ALT_LED1 7 -#undef GUI_LED1 -#define GUI_LED1 8 - -#define DRASHNA_LP diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/keymap.c b/keyboards/keebio/iris/keymaps/drashna_lp/keymap.c deleted file mode 100644 index ff7bd09c0..000000000 --- a/keyboards/keebio/iris/keymaps/drashna_lp/keymap.c +++ /dev/null @@ -1 +0,0 @@ -// placeholder diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/rules.mk b/keyboards/keebio/iris/keymaps/drashna_lp/rules.mk deleted file mode 100644 index d3f6f5550..000000000 --- a/keyboards/keebio/iris/keymaps/drashna_lp/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -USER_NAME := drashna -SRC += ../drashna/keymap.c - -include $(KEYBOARD_PATH_2)/keymaps/drashna/rules.mk - -AUDIO_ENABLE = no -BACKLIGHT_ENABLE = yes diff --git a/keyboards/keebio/iris/keymaps/drashna_old/config.h b/keyboards/keebio/iris/keymaps/drashna_old/config.h deleted file mode 100644 index f08b22dca..000000000 --- a/keyboards/keebio/iris/keymaps/drashna_old/config.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . - */ - -#pragma once - -/* Use I2C or Serial, not both */ -#include "../drashna/config.h" - -#ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 16 // Number of LEDs -# undef RGBLED_SPLIT -# define RGBLED_SPLIT { 8, 8 } -#endif - -#undef PRODUCT -#ifdef KEYBOARD_keebio_iris_rev2 -# define PRODUCT Drashna Hacked Iris Rev.2 (16 LED) -#endif - -#undef SHFT_LED1 -#define SHFT_LED1 5 -#undef SHFT_LED2 -#define SHFT_LED2 10 - -#undef CTRL_LED1 -#define CTRL_LED1 6 -#undef CTRL_LED2 -#define CTRL_LED2 9 - -#undef ALT_LED1 -#define ALT_LED1 7 -#undef GUI_LED1 -#define GUI_LED1 8 diff --git a/keyboards/keebio/iris/keymaps/drashna_old/keymap.c b/keyboards/keebio/iris/keymaps/drashna_old/keymap.c deleted file mode 100644 index ff7bd09c0..000000000 --- a/keyboards/keebio/iris/keymaps/drashna_old/keymap.c +++ /dev/null @@ -1 +0,0 @@ -// placeholder diff --git a/keyboards/keebio/iris/keymaps/drashna_old/rules.mk b/keyboards/keebio/iris/keymaps/drashna_old/rules.mk deleted file mode 100644 index 73f37c6c5..000000000 --- a/keyboards/keebio/iris/keymaps/drashna_old/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -USER_NAME := drashna -SRC += ../drashna/keymap.c - -include $(KEYBOARD_PATH_2)/keymaps/drashna/rules.mk diff --git a/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk b/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk index 4ee94a983..685b3b2cf 100644 --- a/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk +++ b/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/keebio/iris/keymaps/nstickney/keymap.c b/keyboards/keebio/iris/keymaps/nstickney/keymap.c index bbf560fc3..07c4fd28e 100644 --- a/keyboards/keebio/iris/keymaps/nstickney/keymap.c +++ b/keyboards/keebio/iris/keymaps/nstickney/keymap.c @@ -26,8 +26,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { AC_SLSH, FC_BSLS, KC_SPC, KC_ENT, FC_MINS, AC_EQL ), - [SYMB] = LAYOUT(_______, XP(IEX, SS1), X(SS2), X(SS3), XP(CUR, GBP), X(EUR), X(V14), X(V12), X(V34), XP(LSQ, LDQ), XP(RSQ, RDQ), _______, _______, XP(A_D, AXD), XP(A_R, ACR), XP(E_A, ECA), XP(REG, CPL), X(THR), XP(U_D, UCD), XP(U_A, UCA), XP(I_A, ICA), XP(O_A, OCA), XP(O_D, OCD), _______, _______, XP(A_A, ACA), XP(S_S, SEC), XP(ETH, ETC), X(EMD), _______, _______, _______, _______, XP(O_S, OCS), XP(PLC, DEG), XP(ACT, DIS), _______, XP(AEL, AEC), _______, XP(CPR, CNT), _______, _______, _______, _______, XP(N_T, NCT), X(MCR), XP(C_C, CCC), _______, _______, _______, X(IQM), XP(NOT, BKB), _______, _______, X(YEN), XP(MLT, DIV)), + [SYMB] = LAYOUT( + _______, XP(IEX, SS1), X(SS2), X(SS3), XP(CUR, GBP), X(EUR), X(V14), X(V12), X(V34), XP(LSQ, LDQ), XP(RSQ, RDQ), _______, + _______, XP(A_D, AXD), XP(A_R, ACR), XP(E_A, ECA), XP(REG, CPL), X(THR), XP(U_D, UCD), XP(U_A, UCA), XP(I_A, ICA), XP(O_A, OCA), XP(O_D, OCD), _______, + _______, XP(A_A, ACA), XP(S_S, SEC), XP(ETH, ETC), X(EMD), _______, _______, _______, _______, XP(O_S, OCS), XP(PLC, DEG), XP(ACT, DIS), + _______, XP(AEL, AEC), _______, XP(CPR, CNT), _______, _______, _______, _______, XP(N_T, NCT), X(MCR), XP(C_C, CCC), _______, _______, _______, + X(IQM), XP(NOT, BKB), _______, _______, X(YEN), XP(MLT, DIV) + ), - [NUMP] = LAYOUT(_______, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, _______, _______, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, _______, _______, _______, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, _______, _______, _______, _______, KC_PENT, _______, _______), + [NUMP] = LAYOUT( + _______, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, + _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, + _______, _______, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, _______, _______, _______, KC_P0, KC_PCMM, KC_PDOT, KC_PPLS, _______, + _______, _______, _______, KC_PENT, _______, _______ + ), - [FCTN] = LAYOUT(KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_SYSREQ, KC_PSCR, RGB_TOG, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_LOCK, KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), KC_INS, KC_PAUS, RGB_VAI, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BRIU, KC_CLR, _______, KC_MPRV, KC_MRWD, KC_MPLY, KC_MFFD, KC_MNXT, KC_F11, KC_F12, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, _______, _______, _______, _______, _______, _______, _______)}; + [FCTN] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_SYSREQ, + KC_PSCR, RGB_TOG, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_LOCK, KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), KC_INS, + KC_PAUS, RGB_VAI, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BRIU, KC_CLR, + _______, KC_MPRV, KC_MRWD, KC_MPLY, KC_MFFD, KC_MNXT, KC_F11, KC_F12, KC_MSTP, KC_MUTE, KC_VOLD, KC_VOLU, KC_BRID, _______, + _______, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c b/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c index 9027bdab6..dd7996a28 100644 --- a/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c +++ b/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c @@ -38,19 +38,15 @@ enum custom_keycodes { #define KC_ADJ ADJUST #define KC_RST RESET -#define KC_AA SE_AA -#define KC_AE SE_AE -#define KC_OE SE_OSLH - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ -LT(_LOWER, KC_TAB),KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_AA, +LT(_LOWER, KC_TAB),KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_OE, KC_AE, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SE_ODIA, SE_ADIA, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, RAISE, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ @@ -66,7 +62,7 @@ LT(_LOWER, KC_TAB),KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, SE_BSLS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, SE_LBRC, SE_RBRC, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_GRAVE, KC_CIRC, KC_QUOTE, SE_LESS, SE_GRTR, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_GRAVE, KC_CIRC, KC_QUOTE, SE_LABK, SE_RABK, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS // └────────┴────────┴────────┘ └────────┴────────┴────────┘ diff --git a/keyboards/keebio/iris/keymaps/vyolle/rules.mk b/keyboards/keebio/iris/keymaps/vyolle/rules.mk index f93940de3..56073e8b9 100644 --- a/keyboards/keebio/iris/keymaps/vyolle/rules.mk +++ b/keyboards/keebio/iris/keymaps/vyolle/rules.mk @@ -4,4 +4,4 @@ STENO_ENABLE = no # Additional protocols for Stenography(+1700), require AUDIO_ENABLE = no # Audio output on port C6 MIDI_ENABLE = no # MIDI controls NKRO_ENABLE = yes -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/keebio/iris/rev1/rules.mk b/keyboards/keebio/iris/rev1/rules.mk index 765fa7f07..21333e543 100644 --- a/keyboards/keebio/iris/rev1/rules.mk +++ b/keyboards/keebio/iris/rev1/rules.mk @@ -16,14 +16,13 @@ BOOTLOADER = caterina # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/keebio/iris/rev1_led/rules.mk b/keyboards/keebio/iris/rev1_led/rules.mk index 765fa7f07..21333e543 100644 --- a/keyboards/keebio/iris/rev1_led/rules.mk +++ b/keyboards/keebio/iris/rev1_led/rules.mk @@ -16,14 +16,13 @@ BOOTLOADER = caterina # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/keebio/iris/rev2/rules.mk b/keyboards/keebio/iris/rev2/rules.mk index 765fa7f07..291d3f075 100644 --- a/keyboards/keebio/iris/rev2/rules.mk +++ b/keyboards/keebio/iris/rev2/rules.mk @@ -16,14 +16,13 @@ BOOTLOADER = caterina # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID @@ -32,3 +31,5 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes + +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/keebio/iris/rev3/rules.mk b/keyboards/keebio/iris/rev3/rules.mk index ea92bc98f..505c7bd5b 100644 --- a/keyboards/keebio/iris/rev3/rules.mk +++ b/keyboards/keebio/iris/rev3/rules.mk @@ -16,14 +16,13 @@ BOOTLOADER = qmk-dfu # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID @@ -33,3 +32,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes ENCODER_ENABLE = yes +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/keebio/iris/rev4/rules.mk b/keyboards/keebio/iris/rev4/rules.mk index ea92bc98f..382e7d572 100644 --- a/keyboards/keebio/iris/rev4/rules.mk +++ b/keyboards/keebio/iris/rev4/rules.mk @@ -16,14 +16,13 @@ BOOTLOADER = qmk-dfu # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug +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 = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID @@ -33,3 +32,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes ENCODER_ENABLE = yes + +LTO_ENABLE = yes diff --git a/keyboards/keebio/kbo5000/keymaps/via/rules.mk b/keyboards/keebio/kbo5000/keymaps/via/rules.mk index 4b1bcabda..36b7ba9cb 100644 --- a/keyboards/keebio/kbo5000/keymaps/via/rules.mk +++ b/keyboards/keebio/kbo5000/keymaps/via/rules.mk @@ -1,3 +1,2 @@ VIA_ENABLE = yes -CONSOLE_ENABLE = yes LTO_ENABLE = yes diff --git a/keyboards/keebio/kbo5000/rules.mk b/keyboards/keebio/kbo5000/rules.mk index 5292231d5..12ef951dd 100644 --- a/keyboards/keebio/kbo5000/rules.mk +++ b/keyboards/keebio/kbo5000/rules.mk @@ -14,14 +14,13 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug +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 = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/keebio/laplace/rules.mk b/keyboards/keebio/laplace/rules.mk index 8d273917c..528730642 100644 --- a/keyboards/keebio/laplace/rules.mk +++ b/keyboards/keebio/laplace/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # 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 diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c b/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c index 0023b8424..d9edfebaa 100644 --- a/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c +++ b/keyboards/keebio/levinson/keymaps/issmirnov/keymap.c @@ -87,7 +87,7 @@ void matrix_scan_user(void) { // only runs when when the layer is changed, good for updating LED's and clearing sticky state // RGB modes: https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { #ifdef RGBLIGHT_ENABLE layer_state_set_rgb(state); #endif diff --git a/keyboards/keebio/levinson/keymaps/jyh2/rules.mk b/keyboards/keebio/levinson/keymaps/jyh2/rules.mk index fbb3b49d6..fb670123e 100644 --- a/keyboards/keebio/levinson/keymaps/jyh2/rules.mk +++ b/keyboards/keebio/levinson/keymaps/jyh2/rules.mk @@ -1,2 +1,2 @@ RGBLIGHT_ENABLE=yes -BOOTMAGIC_ENABLE=no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite diff --git a/keyboards/keebio/levinson/keymaps/ksamborski/rules.mk b/keyboards/keebio/levinson/keymaps/ksamborski/rules.mk index 1ce3f222f..d9c186d42 100644 --- a/keyboards/keebio/levinson/keymaps/ksamborski/rules.mk +++ b/keyboards/keebio/levinson/keymaps/ksamborski/rules.mk @@ -1,3 +1,3 @@ RGBLIGHT_ENABLE=yes -BOOTMAGIC_ENABLE=no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite DYNAMIC_MACRO_ENABLE=yes diff --git a/keyboards/keebio/levinson/keymaps/losinggeneration/rules.mk b/keyboards/keebio/levinson/keymaps/losinggeneration/rules.mk index ee3ea67f7..b10c462f7 100644 --- a/keyboards/keebio/levinson/keymaps/losinggeneration/rules.mk +++ b/keyboards/keebio/levinson/keymaps/losinggeneration/rules.mk @@ -5,7 +5,7 @@ AUDIO_ENABLE = no # Audio output on port C6 BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no # Console for debug(+400) MIDI_ENABLE = no # MIDI controls diff --git a/keyboards/keebio/levinson/keymaps/steno/rules.mk b/keyboards/keebio/levinson/keymaps/steno/rules.mk index 7693b24b5..18da5e15b 100644 --- a/keyboards/keebio/levinson/keymaps/steno/rules.mk +++ b/keyboards/keebio/levinson/keymaps/steno/rules.mk @@ -4,4 +4,4 @@ STENO_ENABLE = yes # Additional protocols for Stenography, requires VIR AUDIO_ENABLE = no # Audio output on port C6 MIDI_ENABLE = no # MIDI controls NKRO_ENABLE = yes -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c b/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c index b9341ff35..16aa965d7 100644 --- a/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c +++ b/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c @@ -232,6 +232,6 @@ void set_state_leds(void) { } } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); } diff --git a/keyboards/keebio/levinson/rules.mk b/keyboards/keebio/levinson/rules.mk index d2046720c..448921eb9 100644 --- a/keyboards/keebio/levinson/rules.mk +++ b/keyboards/keebio/levinson/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/keebio/nyquist/keymaps/DivergeJM/rules.mk b/keyboards/keebio/nyquist/keymaps/DivergeJM/rules.mk index 2c26b47ea..bbed7e858 100644 --- a/keyboards/keebio/nyquist/keymaps/DivergeJM/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/DivergeJM/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk b/keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk index 93cf3c8ea..f8da5a5f5 100644 --- a/keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/keebio/nyquist/keymaps/georgepetri/rules.mk b/keyboards/keebio/nyquist/keymaps/georgepetri/rules.mk index 4010d90f0..072f9b2ed 100644 --- a/keyboards/keebio/nyquist/keymaps/georgepetri/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/georgepetri/rules.mk @@ -2,4 +2,4 @@ MOUSEKEY_ENABLE = no COMMAND_ENABLE = no RGBLIGHT_ENABLE = yes LTO_ENABLE = yes -DEBOUNCE_TYPE = eager_pk +DEBOUNCE_TYPE = sym_eager_pk diff --git a/keyboards/keebio/nyquist/keymaps/georgepetri3/rules.mk b/keyboards/keebio/nyquist/keymaps/georgepetri3/rules.mk index 4010d90f0..072f9b2ed 100644 --- a/keyboards/keebio/nyquist/keymaps/georgepetri3/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/georgepetri3/rules.mk @@ -2,4 +2,4 @@ MOUSEKEY_ENABLE = no COMMAND_ENABLE = no RGBLIGHT_ENABLE = yes LTO_ENABLE = yes -DEBOUNCE_TYPE = eager_pk +DEBOUNCE_TYPE = sym_eager_pk diff --git a/keyboards/keebio/nyquist/keymaps/losinggeneration/rules.mk b/keyboards/keebio/nyquist/keymaps/losinggeneration/rules.mk index 17ef68483..34b0ba318 100644 --- a/keyboards/keebio/nyquist/keymaps/losinggeneration/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/losinggeneration/rules.mk @@ -5,7 +5,7 @@ AUDIO_ENABLE = no # Audio output on port C6 BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no # Console for debug(+400) MIDI_ENABLE = no # MIDI controls diff --git a/keyboards/keebio/nyquist/keymaps/pitty/keymap.c b/keyboards/keebio/nyquist/keymaps/pitty/keymap.c index 4dec42b85..31912bb63 100644 --- a/keyboards/keebio/nyquist/keymaps/pitty/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/pitty/keymap.c @@ -139,7 +139,7 @@ bool rgb_layer_change = true; #define rgblight_set_white rgblight_sethsv (0x00, 0x00, 0xFF); #define rgblight_set_black rgblight_sethsv (0x00, 0x00, 0x00); -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { #ifdef RGBLIGHT_ENABLE uint8_t default_layer = eeconfig_read_default_layer(); if (rgb_layer_change) { diff --git a/keyboards/keebio/nyquist/keymaps/skug/keymap.c b/keyboards/keebio/nyquist/keymaps/skug/keymap.c index be77cb24b..f9f66892a 100644 --- a/keyboards/keebio/nyquist/keymaps/skug/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/skug/keymap.c @@ -19,12 +19,10 @@ extern keymap_config_t keymap_config; -#define CT_APOS CTL_T(SE_APOS) +#define CT_APOS CTL_T(SE_QUOT) #define CT_TILD CTL_T(SE_TILD) -#define MD_OSLH LT(MDIA, SE_OSLH) -#define SM_AE LT(SYMB, SE_AE) -#define SE_LT SE_LESS -#define SE_GT LSFT(SE_LESS) +#define MD_ODIA LT(MDIA, SE_ODIA) +#define SM_ADIA LT(SYMB, SE_ADIA) enum layer_names { BASE, @@ -61,8 +59,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT( \ // LEFT HAND RIGHT HAND KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, \ - MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MD_OSLH, SM_AE, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, \ + MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MD_ODIA, SM_ADIA, \ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSPC, \ CT_APOS, SE_ACUT, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_ENT, KC_SPC, KC_BSPC, KC_ALGR, SE_ASTR, CT_TILD \ ), @@ -83,8 +81,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [GAME] = LAYOUT( \ // LEFT HAND RIGHT HAND KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, \ - MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MD_OSLH, SM_AE, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, \ + MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MD_ODIA, SM_ADIA, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSFT, \ KC_LCTL, SE_ACUT, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_ENT, KC_SPC, KC_BSPC, KC_ALGR, SE_ASTR, KC_RCTL \ ), @@ -107,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_EXLM, SE_AT, SE_LCBR, SE_RCBR, SE_PIPE, KC_UP, KC_7, KC_8, KC_9, SE_ASTR, KC_F12, \ _______, KC_HASH, SE_DLR, SE_LPRN, SE_RPRN, SE_GRV, KC_DOWN, KC_4, KC_5, KC_6, SE_PLUS, _______, \ _______, KC_PERC, SE_CIRC, SE_LBRC, SE_RBRC, SE_TILD, SE_AMPR, KC_1, KC_2, KC_3, SE_MINS, _______, \ - _______, _______, _______, SE_LT, SE_GT, _______, _______, _______, KC_DOT, KC_0, SE_EQL, _______ \ + _______, _______, _______, SE_LABK, SE_RABK, _______, _______, _______, KC_DOT, KC_0, SE_EQL, _______ \ ), /* Media layer diff --git a/keyboards/keebio/nyquist/nyquist.h b/keyboards/keebio/nyquist/nyquist.h index 25da44172..63d7680f0 100644 --- a/keyboards/keebio/nyquist/nyquist.h +++ b/keyboards/keebio/nyquist/nyquist.h @@ -11,17 +11,3 @@ #endif #include "quantum.h" - -#define LAYOUT_ortho_4x12( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ - ) \ - LAYOUT_ortho_5x12( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ - ) diff --git a/keyboards/keebio/nyquist/rev1/rev1.h b/keyboards/keebio/nyquist/rev1/rev1.h index 20f53b3b4..5896a826c 100644 --- a/keyboards/keebio/nyquist/rev1/rev1.h +++ b/keyboards/keebio/nyquist/rev1/rev1.h @@ -34,6 +34,22 @@ { R35, R34, R33, R32, R31, R30 }, \ { R45, R44, R43, R42, R41, R40 } \ } +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 } \ + } #else // Keymap with right side flipped // (TRRS jack on both halves are to the right) @@ -56,6 +72,22 @@ { R30, R31, R32, R33, R34, R35 }, \ { R40, R41, R42, R43, R44, R45 } \ } +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ + } #endif #define LAYOUT_ortho_5x12 LAYOUT diff --git a/keyboards/keebio/nyquist/rev1/rules.mk b/keyboards/keebio/nyquist/rev1/rules.mk index a3c3f036b..e3c2c93ab 100644 --- a/keyboards/keebio/nyquist/rev1/rules.mk +++ b/keyboards/keebio/nyquist/rev1/rules.mk @@ -14,14 +14,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/keebio/nyquist/rev2/rev2.h b/keyboards/keebio/nyquist/rev2/rev2.h index 20f53b3b4..5896a826c 100644 --- a/keyboards/keebio/nyquist/rev2/rev2.h +++ b/keyboards/keebio/nyquist/rev2/rev2.h @@ -34,6 +34,22 @@ { R35, R34, R33, R32, R31, R30 }, \ { R45, R44, R43, R42, R41, R40 } \ } +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 } \ + } #else // Keymap with right side flipped // (TRRS jack on both halves are to the right) @@ -56,6 +72,22 @@ { R30, R31, R32, R33, R34, R35 }, \ { R40, R41, R42, R43, R44, R45 } \ } +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ + } #endif #define LAYOUT_ortho_5x12 LAYOUT diff --git a/keyboards/keebio/nyquist/rev2/rules.mk b/keyboards/keebio/nyquist/rev2/rules.mk index 05c0f5ed0..0ce5e3b0b 100644 --- a/keyboards/keebio/nyquist/rev2/rules.mk +++ b/keyboards/keebio/nyquist/rev2/rules.mk @@ -14,14 +14,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/keebio/nyquist/rev3/rev3.h b/keyboards/keebio/nyquist/rev3/rev3.h index 274b83926..506fcc6e3 100644 --- a/keyboards/keebio/nyquist/rev3/rev3.h +++ b/keyboards/keebio/nyquist/rev3/rev3.h @@ -31,4 +31,21 @@ { R40, R41, R42, R43, R44, R45 } \ } +#define LAYOUT_ortho_4x12( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { R30, R31, R32, R33, R34, R35 } \ + } + #define LAYOUT_ortho_5x12 LAYOUT diff --git a/keyboards/keebio/nyquist/rev3/rules.mk b/keyboards/keebio/nyquist/rev3/rules.mk index 16d445b62..b6699927d 100644 --- a/keyboards/keebio/nyquist/rev3/rules.mk +++ b/keyboards/keebio/nyquist/rev3/rules.mk @@ -14,14 +14,13 @@ BOOTLOADER = qmk-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk b/keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk index 70fa71100..ca8d5989f 100644 --- a/keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk @@ -4,7 +4,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c index 9ee3eb810..a367e877f 100644 --- a/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/georgepetri/keymap.c @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 , KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_BSPC ,KC_DEL ,KC_MINS ,KC_EQL ,KC_HOME, // ├────────┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┘ ┌───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_LBRC ,KC_RBRC ,KC_BSLS ,KC_END , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T , KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_LBRC ,KC_RBRC ,KC_BSLS ,KC_END , // ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤ KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G , KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_QUOT ,KC_ENT ,KC_PGUP , // ├───────────────┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┐ └─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴─────┬──┴───────────────────┼────────┤ @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_L] = LAYOUT_65( // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ - _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 , KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ ,_______ ,_______ ,_______ ,KC_INS , + _______ ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 , KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,_______ ,_______ ,_______ ,_______ ,KC_INS , // ├────────┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┘ ┌───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────────┼────────┤ _______ ,KC_F11 ,KC_F12 ,_______ ,_______ ,_______ , _______ ,KC_MINS ,KC_EQL ,_______ ,_______ ,_______ ,_______ ,_______, KC_PAUS , // ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤ @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_R] = LAYOUT_65( // ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , + _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , // ├────────┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┘ ┌───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────┬───┴────────┼────────┤ _______ ,KC_TL ,KC_TR ,KC_TC ,KC_TRO ,_______ , _______ ,KC_TL , KC_TR , KC_TC , KC_TRO ,_______ ,_______ ,_______, _______ , // ├─────────────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┐ └─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴─┬──────┴────────────┼────────┤ @@ -81,7 +81,7 @@ void update_led(void) { } } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { update_led(); return state; } diff --git a/keyboards/keebio/quefrency/keymaps/via/rules.mk b/keyboards/keebio/quefrency/keymaps/via/rules.mk index 4b1bcabda..36b7ba9cb 100644 --- a/keyboards/keebio/quefrency/keymaps/via/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/via/rules.mk @@ -1,3 +1,2 @@ VIA_ENABLE = yes -CONSOLE_ENABLE = yes LTO_ENABLE = yes diff --git a/keyboards/keebio/quefrency/rev2/config.h b/keyboards/keebio/quefrency/rev2/config.h index 31d37a783..1fb689677 100644 --- a/keyboards/keebio/quefrency/rev2/config.h +++ b/keyboards/keebio/quefrency/rev2/config.h @@ -51,11 +51,6 @@ along with this program. If not, see . /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - /* ws2812 RGB LED */ #define RGB_DI_PIN E6 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/keebio/quefrency/rev3/config.h b/keyboards/keebio/quefrency/rev3/config.h index 5ab6d743f..2f1311e94 100644 --- a/keyboards/keebio/quefrency/rev3/config.h +++ b/keyboards/keebio/quefrency/rev3/config.h @@ -51,11 +51,6 @@ along with this program. If not, see . /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - /* ws2812 RGB LED */ #define RGB_DI_PIN E6 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/keebio/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk index 2c5ad0c36..472de032c 100644 --- a/keyboards/keebio/quefrency/rules.mk +++ b/keyboards/keebio/quefrency/rules.mk @@ -1,14 +1,13 @@ # MCU name MCU = atmega32u4 -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug +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 @@ -19,3 +18,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes DEFAULT_FOLDER = keebio/quefrency/rev1 +LTO_ENABLE = yes diff --git a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c index e345ce4a3..d03916617 100644 --- a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c +++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c @@ -242,7 +242,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); } diff --git a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk index cf63c44f4..390cb3fd6 100644 --- a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk +++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/keebio/rorschach/keymaps/tuesdayjohn/keymap.c b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/keymap.c index 19de124f8..ceb75d4f4 100644 --- a/keyboards/keebio/rorschach/keymaps/tuesdayjohn/keymap.c +++ b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/keymap.c @@ -48,7 +48,7 @@ void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { -[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer [LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap [RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap [EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap @@ -92,7 +92,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { #define NKROTG MAGIC_TOGGLE_NKRO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* +/* Colemak (Defauit layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) ,-----------------------------------------------------. ,-----------------------------------------------------. @@ -138,7 +138,7 @@ QWERTY ENTNS, KC_BSPC, KC_ENT, DELNS ), -/* +/* Number/symbol layer (Multiple characters: single-tap for first, double-tap for second) ,-----------------------------------------------------. ,-----------------------------------------------------. @@ -270,7 +270,7 @@ Adjust layer }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); } diff --git a/keyboards/keebio/rorschach/keymaps/tuesdayjohn/rules.mk b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/rules.mk index cf63c44f4..390cb3fd6 100644 --- a/keyboards/keebio/rorschach/keymaps/tuesdayjohn/rules.mk +++ b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/keebio/rorschach/rules.mk b/keyboards/keebio/rorschach/rules.mk index caf5fdf82..3c8a30a49 100644 --- a/keyboards/keebio/rorschach/rules.mk +++ b/keyboards/keebio/rorschach/rules.mk @@ -11,14 +11,13 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = caterina -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/keebio/sinc/keymaps/via/rules.mk b/keyboards/keebio/sinc/keymaps/via/rules.mk index 4b1bcabda..36b7ba9cb 100644 --- a/keyboards/keebio/sinc/keymaps/via/rules.mk +++ b/keyboards/keebio/sinc/keymaps/via/rules.mk @@ -1,3 +1,2 @@ VIA_ENABLE = yes -CONSOLE_ENABLE = yes LTO_ENABLE = yes diff --git a/keyboards/keebio/sinc/rules.mk b/keyboards/keebio/sinc/rules.mk index 209b74de9..7e0882872 100644 --- a/keyboards/keebio/sinc/rules.mk +++ b/keyboards/keebio/sinc/rules.mk @@ -14,14 +14,13 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug +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 = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/keebio/stick/rules.mk b/keyboards/keebio/stick/rules.mk index 36791b6c6..77a19d034 100644 --- a/keyboards/keebio/stick/rules.mk +++ b/keyboards/keebio/stick/rules.mk @@ -7,10 +7,10 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug +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 diff --git a/keyboards/keebio/tragicforce68/rules.mk b/keyboards/keebio/tragicforce68/rules.mk index 549ffe9fa..eecf8301d 100644 --- a/keyboards/keebio/tragicforce68/rules.mk +++ b/keyboards/keebio/tragicforce68/rules.mk @@ -14,17 +14,16 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/keebio/tukey/rules.mk b/keyboards/keebio/tukey/rules.mk index 0bf336fe0..d196d80cf 100644 --- a/keyboards/keebio/tukey/rules.mk +++ b/keyboards/keebio/tukey/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/keebio/viterbi/keymaps/drashna/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk index 3246c1807..487031b36 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/rules.mk +++ b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -12,7 +12,6 @@ SPACE_CADET_ENABLE = no NO_SECRETS = yes INDICATOR_LIGHTS = no -RGBLIGHT_TWINKLE = no LAYOUTS = ortho_5x7 # SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC)) diff --git a/keyboards/keebio/viterbi/keymaps/drashna_old/config.h b/keyboards/keebio/viterbi/keymaps/drashna_old/config.h deleted file mode 100644 index 5697f7f11..000000000 --- a/keyboards/keebio/viterbi/keymaps/drashna_old/config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2017 Danny Nguyen - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include "../drashna/config.h" - -#ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 12 -#endif diff --git a/keyboards/keebio/viterbi/keymaps/drashna_old/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna_old/keymap.c deleted file mode 100644 index 2d361da9a..000000000 --- a/keyboards/keebio/viterbi/keymaps/drashna_old/keymap.c +++ /dev/null @@ -1 +0,0 @@ -//placeholder \ No newline at end of file diff --git a/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk deleted file mode 100644 index 73f37c6c5..000000000 --- a/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -USER_NAME := drashna -SRC += ../drashna/keymap.c - -include $(KEYBOARD_PATH_2)/keymaps/drashna/rules.mk diff --git a/keyboards/keebio/viterbi/rev2/rules.mk b/keyboards/keebio/viterbi/rev2/rules.mk index f95e7ae6a..829d6a56e 100644 --- a/keyboards/keebio/viterbi/rev2/rules.mk +++ b/keyboards/keebio/viterbi/rev2/rules.mk @@ -1,3 +1,5 @@ BACKLIGHT_ENABLE = yes LAYOUTS = ortho_5x14 + +LTO_ENABLE = yes \ No newline at end of file diff --git a/keyboards/keebio/viterbi/rules.mk b/keyboards/keebio/viterbi/rules.mk index 0b746d172..fe9b6dc56 100644 --- a/keyboards/keebio/viterbi/rules.mk +++ b/keyboards/keebio/viterbi/rules.mk @@ -15,20 +15,19 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 +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 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes diff --git a/keyboards/keebio/wavelet/rules.mk b/keyboards/keebio/wavelet/rules.mk index cf4cab56e..a5fad2932 100644 --- a/keyboards/keebio/wavelet/rules.mk +++ b/keyboards/keebio/wavelet/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/keebio/wtf60/rules.mk b/keyboards/keebio/wtf60/rules.mk index 487df752e..af6c1b486 100644 --- a/keyboards/keebio/wtf60/rules.mk +++ b/keyboards/keebio/wtf60/rules.mk @@ -7,10 +7,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug +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 diff --git a/keyboards/keebsforall/freebird60/rules.mk b/keyboards/keebsforall/freebird60/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/keebsforall/freebird60/rules.mk +++ b/keyboards/keebsforall/freebird60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebwerk/mega/ansi/ansi.c b/keyboards/keebwerk/mega/ansi/ansi.c index b5eb0bbad..532cdec9a 100755 --- a/keyboards/keebwerk/mega/ansi/ansi.c +++ b/keyboards/keebwerk/mega/ansi/ansi.c @@ -18,7 +18,7 @@ #endif #include "ansi.h" -#include "drivers/issi/is31fl3733.h" +#include "drivers/led/issi/is31fl3733.h" uint8_t R = 0; uint8_t G = 0; diff --git a/keyboards/keebwerk/mega/ansi/rules.mk b/keyboards/keebwerk/mega/ansi/rules.mk index 6a1a9cbfa..92e0e919f 100755 --- a/keyboards/keebwerk/mega/ansi/rules.mk +++ b/keyboards/keebwerk/mega/ansi/rules.mk @@ -12,7 +12,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -34,6 +34,6 @@ LAYOUTS = 65_ansi # project specific files SRC += keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ - drivers/issi/is31fl3733.c \ + drivers/led/issi/is31fl3733.c \ quantum/color.c -QUANTUM_LIB_SRC += drivers/chibios/i2c_master.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/keebwerk/nano_slider/config.h b/keyboards/keebwerk/nano_slider/config.h index 0e17f2002..d5bf9c3b9 100644 --- a/keyboards/keebwerk/nano_slider/config.h +++ b/keyboards/keebwerk/nano_slider/config.h @@ -163,26 +163,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/keebwerk/nano_slider/rules.mk b/keyboards/keebwerk/nano_slider/rules.mk index 3e1d8fe62..c3e5c6203 100644 --- a/keyboards/keebwerk/nano_slider/rules.mk +++ b/keyboards/keebwerk/nano_slider/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebzdotnet/fme/rules.mk b/keyboards/keebzdotnet/fme/rules.mk index 91f48bd44..efca6bac6 100644 --- a/keyboards/keebzdotnet/fme/rules.mk +++ b/keyboards/keebzdotnet/fme/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebzdotnet/wazowski/config.h b/keyboards/keebzdotnet/wazowski/config.h index 42d14bd2f..3786c4b0e 100644 --- a/keyboards/keebzdotnet/wazowski/config.h +++ b/keyboards/keebzdotnet/wazowski/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/keebzdotnet/wazowski/rules.mk b/keyboards/keebzdotnet/wazowski/rules.mk index 15bafda8e..e7e400e80 100644 --- a/keyboards/keebzdotnet/wazowski/rules.mk +++ b/keyboards/keebzdotnet/wazowski/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/keybage/radpad/config.h b/keyboards/keybage/radpad/config.h index 4692b3818..0d885ddea 100644 --- a/keyboards/keybage/radpad/config.h +++ b/keyboards/keybage/radpad/config.h @@ -61,7 +61,7 @@ along with this program. If not, see . #define BOOTMAGIC_LITE_COLUMN 3 /* OLED Configuration */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #define OLED_TIMEOUT 60000 #define OLED_LOGO_TIMEOUT 3000 // How long (in ms) the logo appears at start up #endif diff --git a/keyboards/keybage/radpad/keymaps/default/keymap.c b/keyboards/keybage/radpad/keymaps/default/keymap.c index 69bb3c685..190400f7f 100644 --- a/keyboards/keybage/radpad/keymaps/default/keymap.c +++ b/keyboards/keybage/radpad/keymaps/default/keymap.c @@ -54,7 +54,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static uint32_t oled_logo_timer = 0; bool oled_logo_cleared = false; // Set to true if you don't want a logo at all diff --git a/keyboards/keybage/radpad/rules.mk b/keyboards/keybage/radpad/rules.mk index 74f4c4874..de52147e1 100644 --- a/keyboards/keybage/radpad/rules.mk +++ b/keyboards/keybage/radpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,5 +21,6 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes diff --git a/keyboards/keyboardio/atreus/rules.mk b/keyboards/keyboardio/atreus/rules.mk index 76ff03a80..c97ebb17d 100644 --- a/keyboards/keyboardio/atreus/rules.mk +++ b/keyboards/keyboardio/atreus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c b/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c index b4bd53e3f..3171dd36f 100644 --- a/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c +++ b/keyboards/keyboardio/model01/keymaps/tw1t611/keymap.c @@ -11,9 +11,9 @@ enum { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DEF] = LAYOUT( _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , DE_SS , - KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_MOD, KC_MUTE, KC_Y , KC_U , KC_I , KC_O , KC_P , DE_AE , - KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , DE_PARA, _______, KC_H , KC_J , KC_K , KC_L , DE_SLSH, DE_OE , - DE_PIPE, KC_Z , KC_X , KC_C , KC_V , KC_B , _______, _______, KC_N , KC_M , DE_COMM, DE_DOT , DE_MINS, DE_UE , + KC_ESC , KC_Q , KC_W , KC_E , KC_R , KC_T , RGB_MOD, KC_MUTE, KC_Y , KC_U , KC_I , KC_O , KC_P , DE_ADIA, + KC_TAB , KC_A , KC_S , KC_D , KC_F , KC_G , DE_SECT, _______, KC_H , KC_J , KC_K , KC_L , DE_SLSH, DE_ODIA, + DE_PIPE, KC_Z , KC_X , KC_C , KC_V , KC_B , _______, _______, KC_N , KC_M , DE_COMM, DE_DOT , DE_MINS, DE_UDIA, KC_LALT, KC_LGUI, KC_SPC , KC_ENT , KC_LSFT, MO(MOD), @@ -22,9 +22,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [MOD] = LAYOUT( KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , - DE_CIRC, DE_QUOT, DE_DQOT, DE_LCBR, DE_RCBR, DE_GRV , RGB_TOG, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , DE_EQL , DE_PERC, - DE_TILD, DE_EXLM, DE_DLR , DE_LPRN, DE_RPRN, DE_AMPR, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, DE_QST , DE_ASTR, - DE_BSLS, DE_HASH, DE_LESS, DE_LBRC, DE_RBRC, DE_MORE, _______, RESET , DE_AT , DE_EURO, DE_SCLN, DE_COLN, DE_UNDS, DE_PLUS, + DE_CIRC, DE_QUOT, DE_DQUO, DE_LCBR, DE_RCBR, DE_GRV , RGB_TOG, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , DE_EQL , DE_PERC, + DE_TILD, DE_EXLM, DE_DLR , DE_LPRN, DE_RPRN, DE_AMPR, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, DE_QUES, DE_ASTR, + DE_BSLS, DE_HASH, DE_LABK, DE_LBRC, DE_RBRC, DE_RABK, _______, RESET , DE_AT , DE_EURO, DE_SCLN, DE_COLN, DE_UNDS, DE_PLUS, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/keyboardio/model01/rules.mk b/keyboards/keyboardio/model01/rules.mk index a8c627562..925e575e0 100644 --- a/keyboards/keyboardio/model01/rules.mk +++ b/keyboards/keyboardio/model01/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -23,7 +23,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode CUSTOM_MATRIX = yes diff --git a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c b/keyboards/keycapsss/kimiko/keymaps/default/keymap.c index 4a008b466..17bc1c7b3 100644 --- a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c +++ b/keyboards/keycapsss/kimiko/keymaps/default/keymap.c @@ -122,7 +122,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { return state; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) { return OLED_ROTATION_270; diff --git a/keyboards/keycapsss/kimiko/keymaps/default/rules.mk b/keyboards/keycapsss/kimiko/keymaps/default/rules.mk index 947873117..5dc0c6407 100644 --- a/keyboards/keycapsss/kimiko/keymaps/default/rules.mk +++ b/keyboards/keycapsss/kimiko/keymaps/default/rules.mk @@ -1,4 +1,5 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays ENCODER_ENABLE = yes # ENables the use of one or more encoders RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/keycapsss/kimiko/rules.mk b/keyboards/keycapsss/kimiko/rules.mk index 9be186a88..74d7e305d 100644 --- a/keyboards/keycapsss/kimiko/rules.mk +++ b/keyboards/keycapsss/kimiko/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keycapsss/o4l_5x12/rules.mk b/keyboards/keycapsss/o4l_5x12/rules.mk index 05de11caf..385f3c7f3 100644 --- a/keyboards/keycapsss/o4l_5x12/rules.mk +++ b/keyboards/keycapsss/o4l_5x12/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c index 6e338dc10..714a5c80f 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c @@ -34,7 +34,7 @@ void keyboard_post_init_user(void) { // Rev3 and above only -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_ln_P(PSTR("Plaid-Pad ///////////"), false); } diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c index f53d28987..014167601 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c @@ -98,7 +98,7 @@ void process_combo_event(uint16_t combo_index, bool pressed) { } } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_space(void) { oled_write_P(PSTR(" "), false); diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/rules.mk b/keyboards/keycapsss/plaid_pad/keymaps/oled/rules.mk index a95ca8d77..9ce6e078d 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/oled/rules.mk +++ b/keyboards/keycapsss/plaid_pad/keymaps/oled/rules.mk @@ -1,2 +1,3 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays COMBO_ENABLE = yes diff --git a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c index 0f32532d9..673ea1c20 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c @@ -61,7 +61,7 @@ void keyboard_post_init_user(void) { // Rev3 and above only -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_ln_P(PSTR("Plaid-Pad ///////////"), false); } diff --git a/keyboards/keycapsss/plaid_pad/rev3/rules.mk b/keyboards/keycapsss/plaid_pad/rev3/rules.mk index 9cc93aab4..e72f11863 100644 --- a/keyboards/keycapsss/plaid_pad/rev3/rules.mk +++ b/keyboards/keycapsss/plaid_pad/rev3/rules.mk @@ -1,2 +1,3 @@ ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays diff --git a/keyboards/keycapsss/plaid_pad/rules.mk b/keyboards/keycapsss/plaid_pad/rules.mk index d4485d939..0a8ba1c45 100644 --- a/keyboards/keycapsss/plaid_pad/rules.mk +++ b/keyboards/keycapsss/plaid_pad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keychron/q1/q1.c b/keyboards/keychron/q1/q1.c index b496e278e..a316c1fdc 100644 --- a/keyboards/keychron/q1/q1.c +++ b/keyboards/keychron/q1/q1.c @@ -26,9 +26,10 @@ const matrix_row_t matrix_mask[] = { 0b0111111111111111, }; -void dip_switch_update_kb(uint8_t index, bool active) { +bool dip_switch_update_kb(uint8_t index, bool active) { + if (!dip_switch_update_user(index, active)) { return false;} if (index == 0) { - default_layer_set(1UL << (active ? 2 : 0)); + default_layer_set(1UL << (active ? 2 : 0)); } - dip_switch_update_user(index, active); -} \ No newline at end of file + return true; +} diff --git a/keyboards/keychron/q1/rev_0100/rev_0100.c b/keyboards/keychron/q1/rev_0100/rev_0100.c index 9227e01b1..abc4f2716 100644 --- a/keyboards/keychron/q1/rev_0100/rev_0100.c +++ b/keyboards/keychron/q1/rev_0100/rev_0100.c @@ -17,7 +17,7 @@ #include "quantum.h" -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -31,7 +31,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, C_6, A_6, B_6}, {0, C_7, A_7, B_7}, {0, C_8, A_8, B_8}, - {0, C_9, A_9, B_9}, + {0, C_9, A_9, B_9}, {0, C_10, A_10, B_10}, {0, C_11, A_11, B_11}, {0, C_12, A_12, B_12}, @@ -42,7 +42,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, F_1, D_1, E_1}, {0, F_2, D_2, E_2}, - {0, F_3, D_3, E_3}, + {0, F_3, D_3, E_3}, {0, F_4, D_4, E_4}, {0, F_5, D_5, E_5}, {0, F_6, D_6, E_6}, @@ -70,8 +70,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, I_12, G_12, H_12}, {0, I_13, G_13, H_13}, {0, I_14, G_14, H_14}, - {0, I_16, G_16, H_16}, - + {0, I_16, G_16, H_16}, + {0, L_1, J_1, K_1}, {0, L_2, J_2, K_2}, {0, L_3, J_3, K_3}, @@ -86,7 +86,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, L_12, J_12, K_12}, {0, L_14, J_14, K_14}, {0, L_16, J_16, K_16}, - + {1, C_1, A_1, B_1}, {1, C_3, A_3, B_3}, {1, C_4, A_4, B_4}, @@ -100,15 +100,15 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {1, C_12, A_12, B_12}, {1, C_14, A_14, B_14}, {1, C_15, A_15, B_15}, - + {1, F_1, D_1, E_1}, {1, F_2, D_2, E_2}, {1, F_3, D_3, E_3}, {1, F_7, D_7, E_7}, {1, F_11, D_11, E_11}, {1, F_12, D_12, E_12}, - {1, F_13, D_13, E_13}, - {1, F_14, D_14, E_14}, + {1, F_13, D_13, E_13}, + {1, F_14, D_14, E_14}, {1, F_15, D_15, E_15}, {1, F_16, D_16, E_16} @@ -128,7 +128,7 @@ led_config_t g_led_config = { {0,13}, {15,13}, {30,13}, {45,13}, {60,13}, {75,13}, {90,13}, {105,13}, {120,13}, {135,13}, {150,13}, {165,13}, {180,13}, {195,13}, {224,13}, {0,26}, {15,26}, {30,26}, {45,26}, {60,26}, {75,26}, {90,26}, {105,26}, {120,26}, {135,26}, {150,26}, {165,26}, {180,26}, {195,26}, {224,26}, {0,39}, {15,39}, {30,39}, {45,39}, {60,39}, {75,39}, {90,39}, {105,39}, {120,39}, {135,39}, {150,39}, {165,39}, {195,39}, {224,39}, - {0,52}, {30,52}, {45,52}, {60,52}, {75,52}, {90,52}, {105,52}, {120,52}, {135,52}, {150,52}, {165,52}, {195,52}, {210,52}, + {0,52}, {30,52}, {45,52}, {60,52}, {75,52}, {90,52}, {105,52}, {120,52}, {135,52}, {150,52}, {165,52}, {195,52}, {210,52}, {0,64}, {15,64}, {30,64}, {90,64}, {150,64}, {165,64}, {180,64}, {195,64}, {210,64}, {224,64}, }, { @@ -136,8 +136,8 @@ led_config_t g_led_config = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 } -}; \ No newline at end of file +}; diff --git a/keyboards/keychron/q1/rev_0100/rules.mk b/keyboards/keychron/q1/rev_0100/rules.mk index 9b1725158..9615d19b5 100644 --- a/keyboards/keychron/q1/rev_0100/rules.mk +++ b/keyboards/keychron/q1/rev_0100/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,4 +22,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output DIP_SWITCH_ENABLE = yes RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = IS31FL3733 \ No newline at end of file +RGB_MATRIX_DRIVER = IS31FL3733 diff --git a/keyboards/keychron/q1/rev_0102/rev_0102.c b/keyboards/keychron/q1/rev_0102/rev_0102.c index b7f767c41..722284aaa 100644 --- a/keyboards/keychron/q1/rev_0102/rev_0102.c +++ b/keyboards/keychron/q1/rev_0102/rev_0102.c @@ -13,11 +13,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include "quantum.h" -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -31,7 +31,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, C_6, A_6, B_6}, {0, C_7, A_7, B_7}, {0, C_8, A_8, B_8}, - {0, C_9, A_9, B_9}, + {0, C_9, A_9, B_9}, {0, C_10, A_10, B_10}, {0, C_11, A_11, B_11}, {0, C_12, A_12, B_12}, @@ -42,7 +42,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, F_1, D_1, E_1}, {0, F_2, D_2, E_2}, - {0, F_3, D_3, E_3}, + {0, F_3, D_3, E_3}, {0, F_4, D_4, E_4}, {0, F_5, D_5, E_5}, {0, F_6, D_6, E_6}, @@ -69,8 +69,8 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, I_11, G_11, H_11}, {0, I_12, G_12, H_12}, {0, I_13, G_13, H_13}, - {0, I_16, G_16, H_16}, - + {0, I_16, G_16, H_16}, + {0, L_1, J_1, K_1}, {0, L_2, J_2, K_2}, {0, L_3, J_3, K_3}, @@ -86,7 +86,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, L_14, J_14, K_14}, {0, I_14, G_14, H_14}, {0, L_16, J_16, K_16}, - + {1, C_1, A_1, B_1}, {1, C_2, A_2, B_2}, {1, C_3, A_3, B_3}, @@ -101,15 +101,15 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {1, C_12, A_12, B_12}, {1, C_14, A_14, B_14}, {1, C_15, A_15, B_15}, - + {1, F_1, D_1, E_1}, {1, F_2, D_2, E_2}, {1, F_3, D_3, E_3}, {1, F_7, D_7, E_7}, {1, F_11, D_11, E_11}, {1, F_12, D_12, E_12}, - {1, F_13, D_13, E_13}, - {1, F_14, D_14, E_14}, + {1, F_13, D_13, E_13}, + {1, F_14, D_14, E_14}, {1, F_15, D_15, E_15}, {1, F_16, D_16, E_16} }; @@ -128,7 +128,7 @@ led_config_t g_led_config = { {0,13}, {15,13}, {30,13}, {45,13}, {60,13}, {75,13}, {90,13}, {105,13}, {120,13}, {135,13}, {150,13}, {165,13}, {180,13}, {195,13}, {224,13}, {0,26}, {15,26}, {30,26}, {45,26}, {60,26}, {75,26}, {90,26}, {105,26}, {120,26}, {135,26}, {150,26}, {165,26}, {180,26}, {224,26}, {0,39}, {15,39}, {30,39}, {45,39}, {60,39}, {75,39}, {90,39}, {105,39}, {120,39}, {135,39}, {150,39}, {165,39}, {180,39}, {195,26}, {224,39}, - {0,52}, {15,52}, {30,52}, {45,52}, {60,52}, {75,52}, {90,52}, {105,52}, {120,52}, {135,52}, {150,52}, {165,52}, {180,52}, {210,52}, + {0,52}, {15,52}, {30,52}, {45,52}, {60,52}, {75,52}, {90,52}, {105,52}, {120,52}, {135,52}, {150,52}, {165,52}, {180,52}, {210,52}, {0,64}, {15,64}, {30,64}, {90,64}, {150,64}, {165,64}, {180,64}, {195,64}, {210,64}, {224,64}, }, { @@ -136,8 +136,8 @@ led_config_t g_led_config = { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 } -}; \ No newline at end of file +}; diff --git a/keyboards/keyhive/maypad/config.h b/keyboards/keyhive/maypad/config.h index 3f671243a..774dd74c9 100644 --- a/keyboards/keyhive/maypad/config.h +++ b/keyboards/keyhive/maypad/config.h @@ -191,26 +191,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/keyhive/maypad/rules.mk b/keyboards/keyhive/maypad/rules.mk index fe60f513e..9adbffc4f 100644 --- a/keyboards/keyhive/maypad/rules.mk +++ b/keyboards/keyhive/maypad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/keyprez/corgi/rules.mk b/keyboards/keyprez/corgi/rules.mk index fb12719ce..b3a90d9f2 100644 --- a/keyboards/keyprez/corgi/rules.mk +++ b/keyboards/keyprez/corgi/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keysofkings/twokey/rules.mk b/keyboards/keysofkings/twokey/rules.mk index d892fd2b7..05a5f10b1 100755 --- a/keyboards/keysofkings/twokey/rules.mk +++ b/keyboards/keysofkings/twokey/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kikoslab/kl90/keymaps/default/keymap.c b/keyboards/kikoslab/kl90/keymaps/default/keymap.c index 04af4ba92..94ebe2633 100644 --- a/keyboards/kikoslab/kl90/keymaps/default/keymap.c +++ b/keyboards/kikoslab/kl90/keymaps/default/keymap.c @@ -61,7 +61,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; diff --git a/keyboards/kikoslab/kl90/keymaps/via/keymap.c b/keyboards/kikoslab/kl90/keymaps/via/keymap.c index 04af4ba92..94ebe2633 100644 --- a/keyboards/kikoslab/kl90/keymaps/via/keymap.c +++ b/keyboards/kikoslab/kl90/keymaps/via/keymap.c @@ -61,7 +61,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; diff --git a/keyboards/kikoslab/kl90/rules.mk b/keyboards/kikoslab/kl90/rules.mk index 3d7e4db92..f88f2a496 100644 --- a/keyboards/kikoslab/kl90/rules.mk +++ b/keyboards/kikoslab/kl90/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,4 +21,5 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/kindakeyboards/conone65/rules.mk b/keyboards/kindakeyboards/conone65/rules.mk index 7210ffcf0..733dfe35b 100644 --- a/keyboards/kindakeyboards/conone65/rules.mk +++ b/keyboards/kindakeyboards/conone65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -LAYOUTS = 65_ansi 65_ansi_split_bs 65_iso 65_iso_split_bs \ No newline at end of file +LAYOUTS = 65_ansi 65_ansi_split_bs 65_iso diff --git a/keyboards/kinesis/alvicstep/config.h b/keyboards/kinesis/alvicstep/config.h index 73aa4dd4d..02c7725ce 100644 --- a/keyboards/kinesis/alvicstep/config.h +++ b/keyboards/kinesis/alvicstep/config.h @@ -23,7 +23,7 @@ * */ //Passed through the port multipler, so 4 pins =16 -#define MATRIX_ROW_PINS { F0,F1, F2, F3 } +#define MATRIX_ROW_PINS { F0, F1, F2, F3, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } // May be upside down. #define MATRIX_COL_PINS { B0,B1, B2, B3, B4, B5, B6, B7 } diff --git a/keyboards/kinesis/keymaps/carpalx/rules.mk b/keyboards/kinesis/keymaps/carpalx/rules.mk index 9c6a4673d..1c26f881f 100644 --- a/keyboards/kinesis/keymaps/carpalx/rules.mk +++ b/keyboards/kinesis/keymaps/carpalx/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kinesis/keymaps/default/rules.mk b/keyboards/kinesis/keymaps/default/rules.mk index 46af5cd7b..eb94d17f0 100644 --- a/keyboards/kinesis/keymaps/default/rules.mk +++ b/keyboards/kinesis/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kinesis/keymaps/default_pretty/rules.mk b/keyboards/kinesis/keymaps/default_pretty/rules.mk index 46af5cd7b..eb94d17f0 100644 --- a/keyboards/kinesis/keymaps/default_pretty/rules.mk +++ b/keyboards/kinesis/keymaps/default_pretty/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kinesis/keymaps/dvorak/rules.mk b/keyboards/kinesis/keymaps/dvorak/rules.mk index 46af5cd7b..eb94d17f0 100644 --- a/keyboards/kinesis/keymaps/dvorak/rules.mk +++ b/keyboards/kinesis/keymaps/dvorak/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c index 10b0c2cb7..183b1c430 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c +++ b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -61,7 +61,7 @@ void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { -[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer [LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap [RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap [EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap @@ -97,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | Space | Enter |App/Alt| | RGUI | Delete| Bspc | | / | / |-------| |-------| / | / | | Fn | Number| Bspc | | Enter |Number2| Fn2 | - `-----------------------' `-----------------------' + `-----------------------' `-----------------------' */ [_COLEMAK] = LAYOUT_pretty( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, @@ -133,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | Space | Enter |App/Alt| | RGUI | Delete| Bspc | | / | / |-------| |-------| / | / | | Fn | Number| Bspc | | Enter |Number2| Fn2 | - `-----------------------' `-----------------------' + `-----------------------' `-----------------------' */ [_QWERTY] = LAYOUT_pretty( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, @@ -169,15 +169,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | | | | | | | |-------| |-------| | | | | | | | | | | - `-----------------------' `-----------------------' + `-----------------------' `-----------------------' */ [_NUMBERS] = LAYOUT_pretty( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______, - KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, + KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -186,10 +186,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NUMBERS2] = LAYOUT_pretty( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______, - KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, + KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -216,7 +216,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | | | | | | | |-------| |-------| | | | | | | | | | | - `-----------------------' `-----------------------' + `-----------------------' `-----------------------' */ [_FUNCTION] = LAYOUT_pretty( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -264,7 +264,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | | | | | | | |-------| |-------| | | | | | | | | | | - `-----------------------' `-----------------------' + `-----------------------' `-----------------------' */ [_NUMPAD] = LAYOUT_pretty( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -300,7 +300,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | LAlt | | RGUI | Delete| Bspc | | Space | Enter |-------| |-------| / | / | | | | Bspc | | Ent/NS|Number2| Fn2 | - `-----------------------' `-----------------------' + `-----------------------' `-----------------------' */ [_COLEMAKGM] = LAYOUT_pretty( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, @@ -336,7 +336,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | LAlt | | RGUI | Delete| Bspc | | Space | Enter |-------| |-------| / | / | | | | Bspc | | Ent/NS|Number2| Fn2 | - `-----------------------' `-----------------------' + `-----------------------' `-----------------------' */ [_QWERTYGM] = LAYOUT_pretty( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, @@ -372,7 +372,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | | | | | | | |-------| |-------| | | | | | | | | | | - `-----------------------' `-----------------------' + `-----------------------' `-----------------------' */ [_ADJUST] = LAYOUT_pretty( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -380,7 +380,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -392,7 +392,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -400,7 +400,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); } diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk b/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk index d2e362886..2cd0c1a9d 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk +++ b/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk @@ -4,7 +4,7 @@ # DEFAULT_FOLDER = kinesis/stapelberg -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/kinesis/keymaps/jwon/rules.mk b/keyboards/kinesis/keymaps/jwon/rules.mk index e04ac19e4..1b8ed2110 100644 --- a/keyboards/kinesis/keymaps/jwon/rules.mk +++ b/keyboards/kinesis/keymaps/jwon/rules.mk @@ -1,3 +1,3 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no NKRO_ENABLE = yes diff --git a/keyboards/kinesis/keymaps/milestogo/rules.mk b/keyboards/kinesis/keymaps/milestogo/rules.mk index 7a331cd53..93e7cd8bb 100644 --- a/keyboards/kinesis/keymaps/milestogo/rules.mk +++ b/keyboards/kinesis/keymaps/milestogo/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kinesis/keymaps/stapelberg/rules.mk b/keyboards/kinesis/keymaps/stapelberg/rules.mk index f5557c73b..8117fc858 100644 --- a/keyboards/kinesis/keymaps/stapelberg/rules.mk +++ b/keyboards/kinesis/keymaps/stapelberg/rules.mk @@ -1,3 +1,3 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = yes NKRO_ENABLE = yes diff --git a/keyboards/kinesis/keymaps/tuesdayjohn/keymap.c b/keyboards/kinesis/keymaps/tuesdayjohn/keymap.c index 0cdb7d584..2e844f19b 100644 --- a/keyboards/kinesis/keymaps/tuesdayjohn/keymap.c +++ b/keyboards/kinesis/keymaps/tuesdayjohn/keymap.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -20,7 +20,7 @@ enum kinesis_keycodes { QWERTY, GAMING }; - + //Tap Dance Declarations enum { ADJ = 0, @@ -50,7 +50,7 @@ void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { -[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer [LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap [RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap [EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap @@ -117,7 +117,7 @@ Colemak | Space | Enter | App/Alt| | RGUI | Delete | Bspc | | / | / |--------| |--------| / | / | | Fn | Number | Bspc | | Enter | Number2| Fn2 | - `--------------------------' `--------------------------' + `--------------------------' `--------------------------' */ [_COLEMAK] = LAYOUT_pretty( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, @@ -154,7 +154,7 @@ QWERTY | Space | Enter | App/Alt| | RGUI | Delete | Bspc | | / | / |--------| |--------| / | / | | Fn | Number | Bspc | | Enter | Number2| Fn2 | - `--------------------------' `--------------------------' + `--------------------------' `--------------------------' */ [_QWERTY] = LAYOUT_pretty( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, @@ -168,7 +168,7 @@ QWERTY SPCFN, ENTNS, KC_BSPC, KC_ENT, DELNS, BSPCFN ), -/* +/* Numbers/Symbols layer (Multiple characters: single-tap for first, double-tap for second) ,--------------------------------------------------------------. ,--------------------------------------------------------------. @@ -191,15 +191,15 @@ Numbers/Symbols layer | | | | | | | | | | |--------| |--------| | | | | | | | | | | - `--------------------------' `--------------------------' + `--------------------------' `--------------------------' */ [_NUMBERS] = LAYOUT_pretty( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, - KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -208,10 +208,10 @@ Numbers/Symbols layer [_NUMBERS2] = LAYOUT_pretty( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_DOT, TD_SLAS, TD_MNUN, TD_PLEQ, TD_GVTL, TD_LBCB, TD_RBCB, _______, _______, _______, - KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, + KC_LPRN, KC_RPRN, TD_LBCB, TD_RBCB, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -239,7 +239,7 @@ Function layer | | | | | | | | | | |--------| |--------| | | | | | | | | | | - `--------------------------' `--------------------------' + `--------------------------' `--------------------------' */ [_FUNCTION] = LAYOUT_pretty( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -288,7 +288,7 @@ Numpad layer | | | | | | | | | | |--------| |--------| | | | | | | | | | | - `--------------------------' `--------------------------' + `--------------------------' `--------------------------' */ [_NUMPAD] = LAYOUT_pretty( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -325,7 +325,7 @@ Gaming | | | LAlt | | RGUI | Delete | Bspc | | Space | Enter |--------| |--------| / | / | | | | Bspc | |Enter/NS| Number2| Fn2 | - `--------------------------' `--------------------------' + `--------------------------' `--------------------------' */ [_GAMING] = LAYOUT_pretty( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -362,7 +362,7 @@ Adjust layer | | | | | | | | | | |--------| |--------| | | | | | | | | | | - `--------------------------' `--------------------------' + `--------------------------' `--------------------------' */ [_ADJUST] = LAYOUT_pretty( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -370,7 +370,7 @@ Adjust layer _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -382,7 +382,7 @@ Adjust layer _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ @@ -390,7 +390,7 @@ Adjust layer }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _NUMBERS, _NUMBERS2, _ADJUST); } diff --git a/keyboards/kinesis/keymaps/tuesdayjohn/rules.mk b/keyboards/kinesis/keymaps/tuesdayjohn/rules.mk index cf63c44f4..390cb3fd6 100644 --- a/keyboards/kinesis/keymaps/tuesdayjohn/rules.mk +++ b/keyboards/kinesis/keymaps/tuesdayjohn/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/kinesis/keymaps/tw1t611/keymap.c b/keyboards/kinesis/keymaps/tw1t611/keymap.c index afeaf7711..c94f06bbb 100644 --- a/keyboards/kinesis/keymaps/tw1t611/keymap.c +++ b/keyboards/kinesis/keymaps/tw1t611/keymap.c @@ -17,9 +17,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC ,KC_LSFT,KC_BSPC , KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR,KC_SLCK,KC_PAUS,KC_FN0 ,RESET, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,DE_SS , - KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_AE , - KC_H ,KC_J ,KC_K ,KC_L ,DE_SLSH,DE_OE , - KC_N ,KC_M ,DE_COMM,DE_DOT ,DE_MINS,DE_UE , + KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_ADIA, + KC_H ,KC_J ,KC_K ,KC_L ,DE_SLSH,DE_ODIA, + KC_N ,KC_M ,DE_COMM,DE_DOT ,DE_MINS,DE_UDIA, _______,_______,_______,_______, KC_LGUI,KC_LCTL, KC_END , @@ -28,9 +28,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MOD] = LAYOUT( _______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, - DE_CIRC,DE_QUOT,DE_DQOT,DE_LCBR,DE_RCBR,DE_GRV , + DE_CIRC,DE_QUOT,DE_DQUO,DE_LCBR,DE_RCBR,DE_GRV , DE_TILD,DE_EXLM,DE_DLR ,DE_LPRN,DE_RPRN,DE_AMPR, - DE_BSLS,DE_HASH,DE_LESS,DE_LBRC,DE_RBRC,DE_MORE, + DE_BSLS,DE_HASH,DE_LABK,DE_LBRC,DE_RBRC,DE_RABK, _______,_______,_______,_______, _______,_______, _______, @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, KC_HOME,KC_PGDN,KC_PGUP,KC_END ,DE_EQL ,DE_PERC, - KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,DE_QST ,DE_ASTR, + KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,DE_QUES,DE_ASTR, DE_AT ,DE_EURO,DE_SCLN,DE_COLN,DE_UNDS,DE_PLUS, _______,_______,_______,_______, _______,_______, diff --git a/keyboards/kinesis/keymaps/tw1t611/rules.mk b/keyboards/kinesis/keymaps/tw1t611/rules.mk index 7a331cd53..93e7cd8bb 100644 --- a/keyboards/kinesis/keymaps/tw1t611/rules.mk +++ b/keyboards/kinesis/keymaps/tw1t611/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kinesis/keymaps/xyverz/rules.mk b/keyboards/kinesis/keymaps/xyverz/rules.mk index f21a27fea..d0e540272 100644 --- a/keyboards/kinesis/keymaps/xyverz/rules.mk +++ b/keyboards/kinesis/keymaps/xyverz/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kinesis/kinesis.h b/keyboards/kinesis/kinesis.h index 0833992b8..1635c3443 100644 --- a/keyboards/kinesis/kinesis.h +++ b/keyboards/kinesis/kinesis.h @@ -16,6 +16,9 @@ #ifdef KEYBOARD_kinesis_kint36 #include "kint36.h" #endif +#ifdef KEYBOARD_kinesis_kint41 + #include "kint41.h" +#endif #include "quantum.h" diff --git a/keyboards/kinesis/kint36/config.h b/keyboards/kinesis/kint36/config.h index 17a2b715f..ab34daa7b 100644 --- a/keyboards/kinesis/kint36/config.h +++ b/keyboards/kinesis/kint36/config.h @@ -68,3 +68,5 @@ #define LED_CAPS_LOCK_PIN C7 #define LED_SCROLL_LOCK_PIN A5 #define LED_COMPOSE_PIN E26 + +#define EEPROM_SIZE 4096 diff --git a/keyboards/kinesis/kint36/keymaps/kzar/rules.mk b/keyboards/kinesis/kint36/keymaps/kzar/rules.mk index 753718884..a88176512 100644 --- a/keyboards/kinesis/kint36/keymaps/kzar/rules.mk +++ b/keyboards/kinesis/kint36/keymaps/kzar/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = yes MOUSEKEY_ENABLE = no NKRO_ENABLE = yes diff --git a/keyboards/kinesis/kint41/chconf.h b/keyboards/kinesis/kint41/chconf.h new file mode 100644 index 000000000..0cd253b95 --- /dev/null +++ b/keyboards/kinesis/kint41/chconf.h @@ -0,0 +1,33 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/kinesis/kint36/chconf.h -r platforms/chibios/common/configs/chconf.h` + */ + +#pragma once + +#define CH_CFG_ST_TIMEDELTA 0 + +#define CH_CFG_TIME_QUANTUM 20 + +// One tick (minimum sleep interval) will be 100 μs. This value cannot be +// increased arbitrarily: chSysTimerHandlerI() must be executed in less than one +// tick as per http://forum.chibios.org/viewtopic.php?t=3712#p27851 +#define CH_CFG_ST_FREQUENCY 10000 + +#include_next diff --git a/keyboards/kinesis/kint41/config.h b/keyboards/kinesis/kint41/config.h new file mode 100644 index 000000000..349d3ee36 --- /dev/null +++ b/keyboards/kinesis/kint41/config.h @@ -0,0 +1,105 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 */ +#undef VENDOR_ID +#define VENDOR_ID 0x1209 +#undef PRODUCT_ID +#define PRODUCT_ID 0x345C +#undef DEVICE_VER +#define DEVICE_VER 0x0001 +#undef MANUFACTURER +#define MANUFACTURER "https://github.com/stapelberg" +#undef PRODUCT +#define PRODUCT "kinT (kint41)" + +/* key matrix size */ +#define MATRIX_ROWS 15 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS \ + { \ + LINE_PIN8, /* ROW_EQL */ \ + LINE_PIN9, /* ROW_1 */ \ + LINE_PIN10, /* ROW_2 */ \ + LINE_PIN11, /* ROW_3 */ \ + LINE_PIN7, /* ROW_4 */ \ + LINE_PIN16, /* ROW_5 */ \ + LINE_PIN5, /* ROW_6 */ \ + LINE_PIN3, /* ROW_7 */ \ + LINE_PIN4, /* ROW_8 */ \ + LINE_PIN1, /* ROW_9 */ \ + LINE_PIN0, /* ROW_0 */ \ + LINE_PIN2, /* ROW_MIN */ \ + LINE_PIN17, /* ROW_ESC */ \ + LINE_PIN23, /* ROW_F1 */ \ + LINE_PIN21 /* ROW_F2 */ \ + } + +#define MATRIX_COL_PINS \ + { \ + LINE_PIN18, /* COL_0 */ \ + LINE_PIN14, /* COL_1 */ \ + LINE_PIN15, /* COL_2 */ \ + LINE_PIN20, /* COL_3 */ \ + LINE_PIN22, /* COL_4 */ \ + LINE_PIN19, /* COL_5 */ \ + LINE_PIN6 /* COL_6 */ \ + } + +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Well-worn Cherry MX key switches can bounce for up to 20ms, despite the + * Cherry data sheet specifying 5ms. Because we use the sym_eager_pk debounce + * algorithm, this debounce latency only affects key releases (not key + * presses). */ +#undef DEBOUNCE +#define DEBOUNCE 20 + +#define IGNORE_MOD_TAP_INTERRUPT + +// Reduce input latency by lowering the USB polling interval +// from its 10ms default to the 125μs minimum that USB 2.x (High Speed) allows: +#define USB_POLLING_INTERVAL_MS 1 + +/* We use the i.MX RT1060 high-speed GPIOs (GPIO6-9) which are connected to the + * AHB bus (AHB_CLK_ROOT), which runs at the same speed as the ARM Core Clock, + * i.e. 600 MHz. See MIMXRT1062, page 949, 12.1 Chip-specific GPIO information. + * No additional delay is necessary. */ + +// in clock cycles +#define GPIO_INPUT_PIN_DELAY 0 + +#define LED_PIN_ON_STATE 0 +#define LED_NUM_LOCK_PIN LINE_PIN26 +#define LED_CAPS_LOCK_PIN LINE_PIN12 +#define LED_SCROLL_LOCK_PIN LINE_PIN25 +#define LED_COMPOSE_PIN LINE_PIN24 diff --git a/keyboards/kinesis/kint41/kint41.c b/keyboards/kinesis/kint41/kint41.c new file mode 100644 index 000000000..ab6567d09 --- /dev/null +++ b/keyboards/kinesis/kint41/kint41.c @@ -0,0 +1,52 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "kint41.h" + +void matrix_init_kb(void) { + matrix_init_user(); + +// Turn on the Teensy 4.x Power LED: +#define LED_POWER LINE_PIN13 + setPinOutput(LED_POWER); + writePinHigh(LED_POWER); +} + +// delay_inline sleeps for |cycles| (e.g. sleeping for F_CPU will sleep 1s). +// delay_inline assumes the cycle counter has already been initialized and +// should not be modified, i.e. it is safe to call during keyboard matrix scan. +// +// ChibiOS enables the cycle counter in chcore_v7m.c: +// https://github.com/ChibiOS/ChibiOS/blob/b63023915c304092acb9f33bbab40f3ec07a7f0e/os/common/ports/ARMCMx/chcore_v7m.c#L263 +static void delay_inline(const uint32_t cycles) { + const uint32_t start = DWT->CYCCNT; + while ((DWT->CYCCNT - start) < cycles) { + // busy-loop until time has passed + } +} + +void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { + // Use the cycle counter to do precise timing in microseconds. The ChibiOS + // thread sleep functions only allow sleep durations starting at 1 tick, which + // is 100μs in our configuration. + + // Empirically: e.g. 5μs is not enough, will result in keys that don’t work + // and ghost key presses. 10μs seems to work well. + + // 600 cycles at 0.6 cycles/ns == 1μs + const uint32_t cycles_per_us = 600; + delay_inline(10 * cycles_per_us); +} diff --git a/keyboards/kinesis/kint41/kint41.h b/keyboards/kinesis/kint41/kint41.h new file mode 100644 index 000000000..d427a1c2d --- /dev/null +++ b/keyboards/kinesis/kint41/kint41.h @@ -0,0 +1,92 @@ +/* Copyright 2020 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments as on the physical keyboard +// The second converts the arguments into the 2-D scanned array + +#define LAYOUT( \ + kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, \ + k00, k10, k20, k30, k40, k50, \ + k01, k11, k21, k31, k41, k51, \ + k02, k12, k22, k32, k42, k52, \ + k03, k13, k23, k33, k43, k53, \ + k14, k24, k34, k54, \ + k56, k55, \ + k35, \ + k36, k46, k25, \ + \ + kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \ + k60, k70, k80, k90, kA0, kB0, \ + k61, k71, k81, k91, kA1, kB1, \ + k62, k72, k82, k92, kA2, kB2, \ + k63, k73, k83, k93, kA3, kB3, \ + k64, k84, k94, kA4, \ + k96, k85, \ + k86, \ + k66, k75, k65 \ +) { \ + { k00, k01, k02, k03, ___, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___ }, \ + { k20, k21, k22, k23, k24, k25, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, ___, ___, k46 }, \ + { k50, k51, k52, k53, k54, k55, k56 }, \ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, ___, k75, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86 }, \ + { k90, k91, k92, k93, k94, ___, k96 }, \ + { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \ + { kB0, kB1, kB2, kB3, ___, ___, ___ }, \ + { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \ + { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, ___ }, \ +} + +/* ---------------- LEFT HAND ----------------- ---------------- RIGHT HAND ---------------- */ +#define LAYOUT_pretty( \ + kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \ + k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, kA0, kB0, \ + k01, k11, k21, k31, k41, k51, k61, k71, k81, k91, kA1, kB1, \ + k02, k12, k22, k32, k42, k52, k62, k72, k82, k92, kA2, kB2, \ + k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, kA3, kB3, \ + k14, k24, k34, k54, k64, k84, k94, kA4, \ + k56, k55, k96, k85, \ + k35, k86, \ + k36, k46, k25, k66, k75, k65 \ +) { \ + { k00, k01, k02, k03, ___, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___ }, \ + { k20, k21, k22, k23, k24, k25, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, ___, ___, k46 }, \ + { k50, k51, k52, k53, k54, k55, k56 }, \ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, ___, k75, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86 }, \ + { k90, k91, k92, k93, k94, ___, k96 }, \ + { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \ + { kB0, kB1, kB2, kB3, ___, ___, ___ }, \ + { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \ + { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, ___ } \ +} diff --git a/keyboards/kinesis/kint41/mcuconf.h b/keyboards/kinesis/kint41/mcuconf.h new file mode 100644 index 000000000..1ab5054ff --- /dev/null +++ b/keyboards/kinesis/kint41/mcuconf.h @@ -0,0 +1,22 @@ +/* + 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 MIMXRT1062_MCUCONF + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/kinesis/kint41/readme.md b/keyboards/kinesis/kint41/readme.md new file mode 100644 index 000000000..90781dc97 --- /dev/null +++ b/keyboards/kinesis/kint41/readme.md @@ -0,0 +1,3 @@ +# kinesis_kint41 keyboard firmware + +Please see https://github.com/kinx-project/kint for details. diff --git a/keyboards/kinesis/kint41/rules.mk b/keyboards/kinesis/kint41/rules.mk new file mode 100644 index 000000000..4d77da427 --- /dev/null +++ b/keyboards/kinesis/kint41/rules.mk @@ -0,0 +1,12 @@ +MCU_FAMILY = MIMXRT1062 +MCU_SERIES = MIMXRT1062 +MCU_LDSCRIPT = MIMXRT1062 +MCU_STARTUP = MIMXRT1062 +BOARD = IC_TEENSY_4_1 +MCU = cortex-m4 +ARMV = 7 + +# Debounce eagerly (report change immediately), keep per-key timers. We can use +# this because the Cherry MX keyswitches on the Kinesis only produce noise while +# pressed. +DEBOUNCE_TYPE = sym_eager_pk diff --git a/keyboards/kinesis/nguyenvietyen/config.h b/keyboards/kinesis/nguyenvietyen/config.h index 52f4c8054..f1b41e61b 100644 --- a/keyboards/kinesis/nguyenvietyen/config.h +++ b/keyboards/kinesis/nguyenvietyen/config.h @@ -19,7 +19,7 @@ * */ // Passed through the port multipler, so 4 pins =16 -#define MATRIX_ROW_PINS { D0, D1, D2, D3 } +#define MATRIX_ROW_PINS { D0, D1, D2, D3, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } #define UNUSED_PINS diff --git a/keyboards/kinesis/nguyenvietyen/rules.mk b/keyboards/kinesis/nguyenvietyen/rules.mk index a401973aa..8ed5c746f 100644 --- a/keyboards/kinesis/nguyenvietyen/rules.mk +++ b/keyboards/kinesis/nguyenvietyen/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes COMMAND_ENABLE = yes diff --git a/keyboards/kinesis/rules.mk b/keyboards/kinesis/rules.mk index 651751fa6..ddae2e886 100644 --- a/keyboards/kinesis/rules.mk +++ b/keyboards/kinesis/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output should be port E6, current quantum library hardcodes C6, which we use for programming diff --git a/keyboards/kineticlabs/emu/hotswap/rules.mk b/keyboards/kineticlabs/emu/hotswap/rules.mk index 72eed40eb..f4890478e 100644 --- a/keyboards/kineticlabs/emu/hotswap/rules.mk +++ b/keyboards/kineticlabs/emu/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kineticlabs/emu/soldered/rules.mk b/keyboards/kineticlabs/emu/soldered/rules.mk index 72eed40eb..f4890478e 100644 --- a/keyboards/kineticlabs/emu/soldered/rules.mk +++ b/keyboards/kineticlabs/emu/soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kingly_keys/ave/ortho/rules.mk b/keyboards/kingly_keys/ave/ortho/rules.mk index 611eb0ce1..e3ccc9fea 100644 --- a/keyboards/kingly_keys/ave/ortho/rules.mk +++ b/keyboards/kingly_keys/ave/ortho/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kingly_keys/ave/staggered/rules.mk b/keyboards/kingly_keys/ave/staggered/rules.mk index 611eb0ce1..e3ccc9fea 100644 --- a/keyboards/kingly_keys/ave/staggered/rules.mk +++ b/keyboards/kingly_keys/ave/staggered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kingly_keys/little_foot/rules.mk b/keyboards/kingly_keys/little_foot/rules.mk index c314b98dd..bd5990ab5 100644 --- a/keyboards/kingly_keys/little_foot/rules.mk +++ b/keyboards/kingly_keys/little_foot/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c b/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c index a636bb476..45e83f761 100755 --- a/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c +++ b/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c @@ -71,9 +71,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_270; + return OLED_ROTATION_270; } void oled_task_user(void) { diff --git a/keyboards/kingly_keys/romac/keymaps/boss566y/rules.mk b/keyboards/kingly_keys/romac/keymaps/boss566y/rules.mk index 73fd595ab..eee9c0d53 100755 --- a/keyboards/kingly_keys/romac/keymaps/boss566y/rules.mk +++ b/keyboards/kingly_keys/romac/keymaps/boss566y/rules.mk @@ -1,3 +1,4 @@ VIA_ENABLE = yes BOOTLOADER = qmk-dfu -OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C \ No newline at end of file +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C diff --git a/keyboards/kingly_keys/romac/rules.mk b/keyboards/kingly_keys/romac/rules.mk index 9bd22f18b..81c1b5e03 100644 --- a/keyboards/kingly_keys/romac/rules.mk +++ b/keyboards/kingly_keys/romac/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c b/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c index 556af1d1e..29262b8c3 100644 --- a/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c +++ b/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c @@ -27,7 +27,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_1, KC_2, KC_3, MO(1), KC_0, KC_DOT ), - + [FN] = LAYOUT( KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_END, KC_PGDN, @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 180 degrees if offhand } diff --git a/keyboards/kingly_keys/romac_plus/rules.mk b/keyboards/kingly_keys/romac_plus/rules.mk index 806b6355b..6308f17c9 100644 --- a/keyboards/kingly_keys/romac_plus/rules.mk +++ b/keyboards/kingly_keys/romac_plus/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE @@ -23,9 +23,9 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 ENCODER_ENABLE = yes # Enable support for EC11 Rotary Encoder -OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C diff --git a/keyboards/kingly_keys/ropro/rules.mk b/keyboards/kingly_keys/ropro/rules.mk index a8cce7780..f5bad3f64 100644 --- a/keyboards/kingly_keys/ropro/rules.mk +++ b/keyboards/kingly_keys/ropro/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kingly_keys/smd_milk/rules.mk b/keyboards/kingly_keys/smd_milk/rules.mk index f34f8891b..8ea4fb638 100644 --- a/keyboards/kingly_keys/smd_milk/rules.mk +++ b/keyboards/kingly_keys/smd_milk/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/kingly_keys/soap/rules.mk b/keyboards/kingly_keys/soap/rules.mk index e6d997bfe..821830ad1 100644 --- a/keyboards/kingly_keys/soap/rules.mk +++ b/keyboards/kingly_keys/soap/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kira75/config.h b/keyboards/kira75/config.h index ca6c16fcd..408714cb3 100644 --- a/keyboards/kira75/config.h +++ b/keyboards/kira75/config.h @@ -164,24 +164,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/kira75/rules.mk b/keyboards/kira75/rules.mk index e6066e582..e1bd282f2 100644 --- a/keyboards/kira75/rules.mk +++ b/keyboards/kira75/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kira80/rules.mk b/keyboards/kira80/rules.mk index 02f34c5e8..adf5b87fa 100644 --- a/keyboards/kira80/rules.mk +++ b/keyboards/kira80/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kiwikeebs/macro/rules.mk b/keyboards/kiwikeebs/macro/rules.mk index 0c3a849c4..a71e4764c 100644 --- a/keyboards/kiwikeebs/macro/rules.mk +++ b/keyboards/kiwikeebs/macro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kiwikey/kawii9/rules.mk b/keyboards/kiwikey/kawii9/rules.mk index 682c48b12..8b0aaf0d5 100644 --- a/keyboards/kiwikey/kawii9/rules.mk +++ b/keyboards/kiwikey/kawii9/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kiwikey/wanderland/keymaps/stanrc85/keymap.c b/keyboards/kiwikey/wanderland/keymaps/stanrc85/keymap.c index cd11c427b..de683e641 100644 --- a/keyboards/kiwikey/wanderland/keymaps/stanrc85/keymap.c +++ b/keyboards/kiwikey/wanderland/keymaps/stanrc85/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(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, diff --git a/keyboards/kiwikey/wanderland/keymaps/stanrc85/rules.mk b/keyboards/kiwikey/wanderland/keymaps/stanrc85/rules.mk index c58266213..d34d066de 100644 --- a/keyboards/kiwikey/wanderland/keymaps/stanrc85/rules.mk +++ b/keyboards/kiwikey/wanderland/keymaps/stanrc85/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/kiwikey/wanderland/rules.mk b/keyboards/kiwikey/wanderland/rules.mk index a48a691a9..838544556 100644 --- a/keyboards/kiwikey/wanderland/rules.mk +++ b/keyboards/kiwikey/wanderland/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h index 45cbff9fa..e916b4972 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h @@ -38,7 +38,7 @@ along with this program. If not, see . #define MATRIX_ROW_PINS \ { D0, D1, D2, D3, D5, B7 } #define MATRIX_COL_PINS \ - { B6, C6, C7, F1, F0, B5 } + { B6, C6, C7, F1, F0, B5, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } #define UNUSED_PINS /* COL2ROW, ROW2COL*/ @@ -150,23 +150,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/kmac/rules.mk b/keyboards/kmac/rules.mk index 2a35f70cd..810de56a2 100644 --- a/keyboards/kmac/rules.mk +++ b/keyboards/kmac/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -29,7 +29,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_DRIVER = custom -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kmac_pad/rules.mk b/keyboards/kmac_pad/rules.mk index 3f63076c4..184a7e1de 100644 --- a/keyboards/kmac_pad/rules.mk +++ b/keyboards/kmac_pad/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kmini/kmini.c b/keyboards/kmini/kmini.c index f67231871..cd8cd68a9 100755 --- a/keyboards/kmini/kmini.c +++ b/keyboards/kmini/kmini.c @@ -15,27 +15,6 @@ */ #include "kmini.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); -} - void led_init_ports(void) { DDRB |= (1<<1); // OUT DDRB |= (1<<2); // OUT diff --git a/keyboards/kmini/rules.mk b/keyboards/kmini/rules.mk index 1694b9ac6..f4b00e7d1 100755 --- a/keyboards/kmini/rules.mk +++ b/keyboards/kmini/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/knobgoblin/knobgoblin.c b/keyboards/knobgoblin/knobgoblin.c index 1c66908ef..7349a3199 100644 --- a/keyboards/knobgoblin/knobgoblin.c +++ b/keyboards/knobgoblin/knobgoblin.c @@ -38,7 +38,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE /* rotate screen for proper orentation*/ __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } diff --git a/keyboards/knobgoblin/rules.mk b/keyboards/knobgoblin/rules.mk index 17211c095..89760507e 100644 --- a/keyboards/knobgoblin/rules.mk +++ b/keyboards/knobgoblin/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,4 +22,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/knops/mini/config.h b/keyboards/knops/mini/config.h index 000a9c623..cf603fbf6 100644 --- a/keyboards/knops/mini/config.h +++ b/keyboards/knops/mini/config.h @@ -157,24 +157,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c b/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c index 68c96fc19..3851719f1 100644 --- a/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c +++ b/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c @@ -203,27 +203,7 @@ void set_layer_led(int layerId) { } } -void matrix_init_user(void) { - led_init_ports(); - - PORTB |= (1 << 7); - DDRB &= ~(1<<7); - - PORTD |= (1<<7); - PORTC |= (1<<6); - PORTC |= (1<<7); - PORTD |= (1<<4); - PORTE |= (1<<6); - PORTB |= (1<<4); - PORTD |= (1<<6); - - set_layer_led(0); -} - -void matrix_scan_user(void) { -} - -void led_init_ports() { +void led_init_ports_user(void) { // led voor switch #1 DDRD |= (1<<7); PORTD &= ~(1<<7); @@ -276,6 +256,26 @@ void led_init_ports() { //led_set_layer(0); } +void matrix_init_user(void) { + led_init_ports_user(); + + PORTB |= (1 << 7); + DDRB &= ~(1<<7); + + PORTD |= (1<<7); + PORTC |= (1<<6); + PORTC |= (1<<7); + PORTD |= (1<<4); + PORTE |= (1<<6); + PORTB |= (1<<4); + PORTD |= (1<<6); + + set_layer_led(0); +} + +void matrix_scan_user(void) { +} + void led_set_user(uint8_t usb_led) { if (usb_led & (1 << USB_LED_NUM_LOCK)) { diff --git a/keyboards/knops/mini/keymaps/default/keymap.c b/keyboards/knops/mini/keymaps/default/keymap.c index 859f07aa0..ee6a0741c 100644 --- a/keyboards/knops/mini/keymaps/default/keymap.c +++ b/keyboards/knops/mini/keymaps/default/keymap.c @@ -129,72 +129,52 @@ void set_layer_led(int layerId) { } } -void matrix_init_user(void) { - led_init_ports(); - - PORTB |= (1 << 7); - DDRB &= ~(1<<7); - - PORTD |= (1<<7); - PORTC |= (1<<6); - PORTC |= (1<<7); - PORTD |= (1<<4); - PORTE |= (1<<6); - PORTB |= (1<<4); - PORTD |= (1<<6); - - set_layer_led(0); -} - -void matrix_scan_user(void) { -} - -void led_init_ports() { +void led_init_ports_user(void) { // led voor switch #1 DDRD |= (1<<7); PORTD &= ~(1<<7); - + // led voor switch #2 DDRC |= (1<<6); DDRC |= (1<<7); PORTC &= ~(1<<6); PORTC &= ~(1<<7); - + // led voor switch #3 DDRD |= (1<<4); PORTD &= ~(1<<4); - + // led voor switch #4 DDRE |= (1<<6); PORTE &= ~(1<<6); - + // led voor switch #5 DDRB |= (1<<4); PORTB &= ~(1<<4); - + // led voor switch #6 DDRD |= (1<<6); PORTD &= ~(1<<6); - + /* DDRD |= (1<<7); PORTD |= (1<<7); - + DDRC |= (1<<6); PORTC |= (1<<6); - + DDRD |= (1<<4); PORTD |= (1<<4); - + DDRE |= (1<<6); PORTE |= (1<<6); - + DDRB |= (1<<4); PORTB |= (1<<4); - + DDRD |= (1<<6); PORTD |= (1<<6); - // */ + // */ DDRD |= (1<<5); DDRB |= (1<<6); @@ -202,42 +182,62 @@ void led_init_ports() { //led_set_layer(0); } +void matrix_init_user(void) { + led_init_ports_user(); + + PORTB |= (1 << 7); + DDRB &= ~(1<<7); + + PORTD |= (1<<7); + PORTC |= (1<<6); + PORTC |= (1<<7); + PORTD |= (1<<4); + PORTE |= (1<<6); + PORTB |= (1<<4); + PORTD |= (1<<6); + + set_layer_led(0); +} + +void matrix_scan_user(void) { +} + void led_set_user(uint8_t usb_led) { if (usb_led & (1 << USB_LED_NUM_LOCK)) { - + } else { - + } if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - + } else { - + } if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - + } else { - + } if (usb_led & (1 << USB_LED_COMPOSE)) { - + } else { - + } if (usb_led & (1 << USB_LED_KANA)) { - + } else { - + } } -/* +/* * NOTE: * * In case you don't understand this coding stuff, please @@ -257,11 +257,11 @@ void led_set_user(uint8_t usb_led) { * | | | | | | | set_switch_led( [1-6], [true/false]); * | 4 | | 5 | | 6 | <--- * |_____| |_____| |_____| -* +* * < 0 > < 1 > < 2 > <--- These front-LEDs are called 'Layer LEDs' * To turn one of them on, use: * set_layer_led( [0-2] ); -* +* */ /* @@ -272,14 +272,14 @@ void led_set_user(uint8_t usb_led) { */ void led_set_layer(int layer) { switch(layer) { - + /** * Here is an example to turn LEDs on and of. By default: * - the LEDs are turned on in layer 0 * - the LEDs are turned off in layer 1 * - the LEDs don't change from state for layer 2 - */ - + */ + case 0: set_layer_led(0); // Turn on only the first/left layer indicator set_switch_led(1, true); @@ -289,7 +289,7 @@ void led_set_layer(int layer) { set_switch_led(5, true); set_switch_led(6, true); break; - + case 1: set_layer_led(1); // Turn on only the second/middle layer indicator set_switch_led(1, false); @@ -299,12 +299,12 @@ void led_set_layer(int layer) { set_switch_led(5, false); set_switch_led(6, false); break; - + case 2: set_layer_led(2); // Turn on only the third/right layer indicator - + // Keep leds for layer two in their current state, since we don't use set_switch_led(SWITCH_ID, TRUE_OR_FALSE) - + break; } } diff --git a/keyboards/knops/mini/keymaps/knops/keymap.c b/keyboards/knops/mini/keymaps/knops/keymap.c index 7bc7fbe43..15d9e5bc1 100644 --- a/keyboards/knops/mini/keymaps/knops/keymap.c +++ b/keyboards/knops/mini/keymaps/knops/keymap.c @@ -82,10 +82,10 @@ void set_led_state(int ledId, bool state) { } } -void led_init_ports() { +void led_init_ports_user(void) { PORTB |= (1 << 7); DDRB &= ~(1<<7); - + DDRD |= (1<<7); DDRC |= (1<<6); DDRC |= (1<<7); @@ -106,10 +106,10 @@ void led_set_layer(int layer) { } void matrix_init_user(void) { - led_init_ports(); - + led_init_ports_user(); + led_set_layer(1); - + /*KNOPS_INIT*/ } @@ -132,11 +132,11 @@ void led_set_user(uint8_t usb_led) { } bool process_record_user (uint16_t keycode, keyrecord_t *record) { - + /*KNOPS_PROCESS_STATE*/ return NULL; - + } diff --git a/keyboards/knops/mini/keymaps/mverteuil/keymap.c b/keyboards/knops/mini/keymaps/mverteuil/keymap.c index 5ecba0d5a..12afb57da 100644 --- a/keyboards/knops/mini/keymaps/mverteuil/keymap.c +++ b/keyboards/knops/mini/keymaps/mverteuil/keymap.c @@ -270,7 +270,7 @@ void led_set_layer(int layer) { /* * Prepare all LED ports for output */ -void led_init_ports() { +void led_init_ports_user(void) { setPinOutput(D7); // Switch 1 LED setPinOutput(C6); // Switch 2 LED Pin1 setPinOutput(C7); // Switch 2 LED Pin2 @@ -291,7 +291,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { } void matrix_init_user(void) { - led_init_ports(); + led_init_ports_user(); led_init_animation(); } diff --git a/keyboards/knops/mini/rules.mk b/keyboards/knops/mini/rules.mk index c0abf739e..4ee7fa222 100644 --- a/keyboards/knops/mini/rules.mk +++ b/keyboards/knops/mini/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kona_classic/config.h b/keyboards/kona_classic/config.h index 083a3e90a..e16f3017d 100644 --- a/keyboards/kona_classic/config.h +++ b/keyboards/kona_classic/config.h @@ -154,24 +154,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/kona_classic/keymaps/ansi/rules.mk b/keyboards/kona_classic/keymaps/ansi/rules.mk index fec19c9df..87e38e8c5 100644 --- a/keyboards/kona_classic/keymaps/ansi/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk b/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk index fec19c9df..87e38e8c5 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk index fec19c9df..87e38e8c5 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/ansi_split/rules.mk b/keyboards/kona_classic/keymaps/ansi_split/rules.mk index fec19c9df..87e38e8c5 100644 --- a/keyboards/kona_classic/keymaps/ansi_split/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_split/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk b/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk index fec19c9df..87e38e8c5 100644 --- a/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/default/rules.mk b/keyboards/kona_classic/keymaps/default/rules.mk index fec19c9df..87e38e8c5 100644 --- a/keyboards/kona_classic/keymaps/default/rules.mk +++ b/keyboards/kona_classic/keymaps/default/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/iso/rules.mk b/keyboards/kona_classic/keymaps/iso/rules.mk index fec19c9df..87e38e8c5 100644 --- a/keyboards/kona_classic/keymaps/iso/rules.mk +++ b/keyboards/kona_classic/keymaps/iso/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/iso_arrows/rules.mk b/keyboards/kona_classic/keymaps/iso_arrows/rules.mk index fec19c9df..87e38e8c5 100644 --- a/keyboards/kona_classic/keymaps/iso_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_arrows/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/iso_split/rules.mk b/keyboards/kona_classic/keymaps/iso_split/rules.mk index fec19c9df..87e38e8c5 100644 --- a/keyboards/kona_classic/keymaps/iso_split/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_split/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk b/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk index fec19c9df..87e38e8c5 100644 --- a/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/rules.mk b/keyboards/kona_classic/rules.mk index 8c5740b51..04a659636 100644 --- a/keyboards/kona_classic/rules.mk +++ b/keyboards/kona_classic/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kopibeng/xt65/rules.mk b/keyboards/kopibeng/xt65/rules.mk index 1d60cf3c2..a7eaf89e1 100644 --- a/keyboards/kopibeng/xt65/rules.mk +++ b/keyboards/kopibeng/xt65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bm16a/bm16a.c b/keyboards/kprepublic/bm16a/bm16a.c similarity index 100% rename from keyboards/bm16a/bm16a.c rename to keyboards/kprepublic/bm16a/bm16a.c diff --git a/keyboards/bm16a/bm16a.h b/keyboards/kprepublic/bm16a/bm16a.h similarity index 100% rename from keyboards/bm16a/bm16a.h rename to keyboards/kprepublic/bm16a/bm16a.h diff --git a/keyboards/kprepublic/bm16a/config.h b/keyboards/kprepublic/bm16a/config.h new file mode 100644 index 000000000..16bc83827 --- /dev/null +++ b/keyboards/kprepublic/bm16a/config.h @@ -0,0 +1,194 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 // "KP" +#define PRODUCT_ID 0x016A +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPrepublic +#define PRODUCT bm16a + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D3, D5, D1, D2} +#define MATRIX_COL_PINS { D6, D4, D7, B4} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B6 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN E2 +#define RGBLED_NUM 4 +#define RGBLIGHT_ANIMATIONS +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/bm16a/info.json b/keyboards/kprepublic/bm16a/info.json similarity index 100% rename from keyboards/bm16a/info.json rename to keyboards/kprepublic/bm16a/info.json diff --git a/keyboards/bm16a/keymaps/default/config.h b/keyboards/kprepublic/bm16a/keymaps/default/config.h similarity index 100% rename from keyboards/bm16a/keymaps/default/config.h rename to keyboards/kprepublic/bm16a/keymaps/default/config.h diff --git a/keyboards/bm16a/keymaps/default/keymap.c b/keyboards/kprepublic/bm16a/keymaps/default/keymap.c similarity index 100% rename from keyboards/bm16a/keymaps/default/keymap.c rename to keyboards/kprepublic/bm16a/keymaps/default/keymap.c diff --git a/keyboards/bm16a/keymaps/default/readme.md b/keyboards/kprepublic/bm16a/keymaps/default/readme.md similarity index 100% rename from keyboards/bm16a/keymaps/default/readme.md rename to keyboards/kprepublic/bm16a/keymaps/default/readme.md diff --git a/keyboards/bm16a/keymaps/factory/keymap.c b/keyboards/kprepublic/bm16a/keymaps/factory/keymap.c similarity index 100% rename from keyboards/bm16a/keymaps/factory/keymap.c rename to keyboards/kprepublic/bm16a/keymaps/factory/keymap.c diff --git a/keyboards/bm16a/keymaps/factory/readme.md b/keyboards/kprepublic/bm16a/keymaps/factory/readme.md similarity index 100% rename from keyboards/bm16a/keymaps/factory/readme.md rename to keyboards/kprepublic/bm16a/keymaps/factory/readme.md diff --git a/keyboards/bm16a/keymaps/via/keymap.c b/keyboards/kprepublic/bm16a/keymaps/via/keymap.c similarity index 100% rename from keyboards/bm16a/keymaps/via/keymap.c rename to keyboards/kprepublic/bm16a/keymaps/via/keymap.c diff --git a/keyboards/bm16a/keymaps/via/readme.md b/keyboards/kprepublic/bm16a/keymaps/via/readme.md similarity index 100% rename from keyboards/bm16a/keymaps/via/readme.md rename to keyboards/kprepublic/bm16a/keymaps/via/readme.md diff --git a/keyboards/bm60poker/keymaps/via/rules.mk b/keyboards/kprepublic/bm16a/keymaps/via/rules.mk similarity index 100% rename from keyboards/bm60poker/keymaps/via/rules.mk rename to keyboards/kprepublic/bm16a/keymaps/via/rules.mk diff --git a/keyboards/kprepublic/bm16a/readme.md b/keyboards/kprepublic/bm16a/readme.md new file mode 100644 index 000000000..b1c111b74 --- /dev/null +++ b/keyboards/kprepublic/bm16a/readme.md @@ -0,0 +1,15 @@ +# bm16a + +![bm16a](https://ae01.alicdn.com/kf/HTB1RRRQaZfrK1RjSszcq6xGGFXaY.jpg) + +A 16 key macropad, with USB C, RGB underglow and backlight. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: The PCBs, controllers supported +* Hardware Availability: [KPrepublic](https://kprepublic.com/products/bm16a-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx); [AliExpress](https://www.aliexpress.com/store/product/bm16a-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom/3034003_32970629907.html) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm16a:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm16a/rules.mk b/keyboards/kprepublic/bm16a/rules.mk new file mode 100644 index 000000000..5b4383394 --- /dev/null +++ b/keyboards/kprepublic/bm16a/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +LAYOUTS = ortho_4x4 diff --git a/keyboards/bm16s/bm16s.h b/keyboards/kprepublic/bm16s/bm16s.h similarity index 100% rename from keyboards/bm16s/bm16s.h rename to keyboards/kprepublic/bm16s/bm16s.h diff --git a/keyboards/bm16s/config.h b/keyboards/kprepublic/bm16s/config.h similarity index 100% rename from keyboards/bm16s/config.h rename to keyboards/kprepublic/bm16s/config.h diff --git a/keyboards/bm16s/info.json b/keyboards/kprepublic/bm16s/info.json similarity index 100% rename from keyboards/bm16s/info.json rename to keyboards/kprepublic/bm16s/info.json diff --git a/keyboards/bm16s/keymaps/default/keymap.c b/keyboards/kprepublic/bm16s/keymaps/default/keymap.c similarity index 100% rename from keyboards/bm16s/keymaps/default/keymap.c rename to keyboards/kprepublic/bm16s/keymaps/default/keymap.c diff --git a/keyboards/bm16s/keymaps/media/keymap.c b/keyboards/kprepublic/bm16s/keymaps/media/keymap.c similarity index 100% rename from keyboards/bm16s/keymaps/media/keymap.c rename to keyboards/kprepublic/bm16s/keymaps/media/keymap.c diff --git a/keyboards/bm16s/keymaps/via/keymap.c b/keyboards/kprepublic/bm16s/keymaps/via/keymap.c similarity index 100% rename from keyboards/bm16s/keymaps/via/keymap.c rename to keyboards/kprepublic/bm16s/keymaps/via/keymap.c diff --git a/keyboards/bm16s/keymaps/via/readme.md b/keyboards/kprepublic/bm16s/keymaps/via/readme.md similarity index 100% rename from keyboards/bm16s/keymaps/via/readme.md rename to keyboards/kprepublic/bm16s/keymaps/via/readme.md diff --git a/keyboards/bm16s/keymaps/via/rules.mk b/keyboards/kprepublic/bm16s/keymaps/via/rules.mk similarity index 100% rename from keyboards/bm16s/keymaps/via/rules.mk rename to keyboards/kprepublic/bm16s/keymaps/via/rules.mk diff --git a/keyboards/kprepublic/bm16s/readme.md b/keyboards/kprepublic/bm16s/readme.md new file mode 100644 index 000000000..6a887e553 --- /dev/null +++ b/keyboards/kprepublic/bm16s/readme.md @@ -0,0 +1,13 @@ +# bm16s + +A 16-key macropad, with USB C and per-key RGB backlighting. This is a variant of the BM16A, but with low profile Choc switches. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: The PCBs, controllers supported +* Hardware Availability: [KPrepublic](https://kprepublic.com/collections/pcb/products/bm16s-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-switch-leds-choc-switch); [AliExpress](https://www.aliexpress.com/item/bm16s-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-switch/32999247908.html); [Massdrop](https://www.massdrop.com/buy/78169) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm16s:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm16s/rules.mk b/keyboards/kprepublic/bm16s/rules.mk new file mode 100755 index 000000000..b0c9fdd86 --- /dev/null +++ b/keyboards/kprepublic/bm16s/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes + +LAYOUTS = ortho_4x4 diff --git a/keyboards/bm40hsrgb/bm40hsrgb.c b/keyboards/kprepublic/bm40hsrgb/bm40hsrgb.c similarity index 100% rename from keyboards/bm40hsrgb/bm40hsrgb.c rename to keyboards/kprepublic/bm40hsrgb/bm40hsrgb.c diff --git a/keyboards/bm40hsrgb/bm40hsrgb.h b/keyboards/kprepublic/bm40hsrgb/bm40hsrgb.h similarity index 100% rename from keyboards/bm40hsrgb/bm40hsrgb.h rename to keyboards/kprepublic/bm40hsrgb/bm40hsrgb.h diff --git a/keyboards/kprepublic/bm40hsrgb/config.h b/keyboards/kprepublic/bm40hsrgb/config.h new file mode 100755 index 000000000..554927a49 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/config.h @@ -0,0 +1,57 @@ +/* Copyright 2020 tominabox1 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 0x4B50 // "KP" +#define PRODUCT_ID 0x3430 // "40" +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPRepublic +#define PRODUCT BM40 Hotswap RGB + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B3, B2, E6, B5 } +#define MATRIX_COL_PINS { B6, C6, B4, D7, D4, D6, C7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define RGB_DI_PIN E2 +#define DRIVER_LED_TOTAL 53 +#ifdef RGB_DI_PIN +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value +#endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value +#endif diff --git a/keyboards/bm40hsrgb/info.json b/keyboards/kprepublic/bm40hsrgb/info.json similarity index 100% rename from keyboards/bm40hsrgb/info.json rename to keyboards/kprepublic/bm40hsrgb/info.json diff --git a/keyboards/bm40hsrgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/default/keymap.c similarity index 100% rename from keyboards/bm40hsrgb/keymaps/default/keymap.c rename to keyboards/kprepublic/bm40hsrgb/keymaps/default/keymap.c diff --git a/keyboards/bm40hsrgb/keymaps/default/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/default/readme.md similarity index 100% rename from keyboards/bm40hsrgb/keymaps/default/readme.md rename to keyboards/kprepublic/bm40hsrgb/keymaps/default/readme.md diff --git a/keyboards/bm40hsrgb/keymaps/signynt/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h similarity index 100% rename from keyboards/bm40hsrgb/keymaps/signynt/config.h rename to keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h diff --git a/keyboards/bm40hsrgb/keymaps/signynt/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c similarity index 100% rename from keyboards/bm40hsrgb/keymaps/signynt/keymap.c rename to keyboards/kprepublic/bm40hsrgb/keymaps/signynt/keymap.c diff --git a/keyboards/bm40hsrgb/keymaps/signynt/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/readme.md similarity index 100% rename from keyboards/bm40hsrgb/keymaps/signynt/readme.md rename to keyboards/kprepublic/bm40hsrgb/keymaps/signynt/readme.md diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/rules.mk new file mode 100644 index 000000000..73ac4823d --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/rules.mk @@ -0,0 +1,7 @@ +#rules + +MOUSEKEY_ENABLE = yes # Mouse keys +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +EXTRAKEY_ENABLE = yes # Audio control and System control +TAP_DANCE_ENABLE = yes +#RGB_MATRIX_ENABLE = no diff --git a/keyboards/bm40hsrgb/keymaps/signynt_2_loud/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h similarity index 100% rename from keyboards/bm40hsrgb/keymaps/signynt_2_loud/config.h rename to keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h diff --git a/keyboards/bm40hsrgb/keymaps/signynt_2_loud/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c similarity index 100% rename from keyboards/bm40hsrgb/keymaps/signynt_2_loud/keymap.c rename to keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/keymap.c diff --git a/keyboards/bm40hsrgb/keymaps/signynt_2_loud/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/readme.md similarity index 100% rename from keyboards/bm40hsrgb/keymaps/signynt_2_loud/readme.md rename to keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/readme.md diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/rules.mk new file mode 100644 index 000000000..73ac4823d --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/rules.mk @@ -0,0 +1,7 @@ +#rules + +MOUSEKEY_ENABLE = yes # Mouse keys +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +EXTRAKEY_ENABLE = yes # Audio control and System control +TAP_DANCE_ENABLE = yes +#RGB_MATRIX_ENABLE = no diff --git a/keyboards/bm40hsrgb/keymaps/signynt_2_quiet/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h similarity index 100% rename from keyboards/bm40hsrgb/keymaps/signynt_2_quiet/config.h rename to keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h diff --git a/keyboards/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c similarity index 100% rename from keyboards/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c rename to keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/keymap.c diff --git a/keyboards/bm40hsrgb/keymaps/signynt_2_quiet/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/readme.md similarity index 100% rename from keyboards/bm40hsrgb/keymaps/signynt_2_quiet/readme.md rename to keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/readme.md diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk new file mode 100644 index 000000000..73ac4823d --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk @@ -0,0 +1,7 @@ +#rules + +MOUSEKEY_ENABLE = yes # Mouse keys +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +EXTRAKEY_ENABLE = yes # Audio control and System control +TAP_DANCE_ENABLE = yes +#RGB_MATRIX_ENABLE = no diff --git a/keyboards/bm40hsrgb/keymaps/via/keymap.c b/keyboards/kprepublic/bm40hsrgb/keymaps/via/keymap.c similarity index 100% rename from keyboards/bm40hsrgb/keymaps/via/keymap.c rename to keyboards/kprepublic/bm40hsrgb/keymaps/via/keymap.c diff --git a/keyboards/bm40hsrgb/keymaps/via/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/via/readme.md similarity index 100% rename from keyboards/bm40hsrgb/keymaps/via/readme.md rename to keyboards/kprepublic/bm40hsrgb/keymaps/via/readme.md diff --git a/keyboards/dztech/volcano660/keymaps/via/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/via/rules.mk similarity index 100% rename from keyboards/dztech/volcano660/keymaps/via/rules.mk rename to keyboards/kprepublic/bm40hsrgb/keymaps/via/rules.mk diff --git a/keyboards/kprepublic/bm40hsrgb/readme.md b/keyboards/kprepublic/bm40hsrgb/readme.md new file mode 100644 index 000000000..609b3c418 --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/readme.md @@ -0,0 +1,21 @@ +# bm40hsrgb + +![BM40 RGB](https://rgoulter.com/images/keyboards/bm40rgb/bm40rgb_large.jpg) + +An ortholinear 40% hotswap keyboard with per-key RGB in-switch LEDs and RGB Backlighting, from KP Republic. + +This firmware was originally taken from a kbfirmware.json and manually converted. You may find the original `.json` files [here](https://drive.google.com/drive/folders/1tlTHQIFcluK2mjZ4UbbKCsdRLgSRSPw6). + +* Keyboard Maintainer: [rgoulter](https://github.com/rgoulter) +* Hardware Supported: bm40hsrgb PCB +* Hardware Availability: [KPRepublic](https://www.aliexpress.com/item/4001147779116.html) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm40hsrgb:default + +Flashing example for this keyboard: + + make kprepublic/bm40hsrgb:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm40hsrgb/rules.mk b/keyboards/kprepublic/bm40hsrgb/rules.mk new file mode 100755 index 000000000..a2dad1d0d --- /dev/null +++ b/keyboards/kprepublic/bm40hsrgb/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 + +LAYOUTS = planck_mit +LAYOUTS_HAS_RGB = yes diff --git a/keyboards/bm43a/bm43a.c b/keyboards/kprepublic/bm43a/bm43a.c similarity index 100% rename from keyboards/bm43a/bm43a.c rename to keyboards/kprepublic/bm43a/bm43a.c diff --git a/keyboards/bm43a/bm43a.h b/keyboards/kprepublic/bm43a/bm43a.h similarity index 100% rename from keyboards/bm43a/bm43a.h rename to keyboards/kprepublic/bm43a/bm43a.h diff --git a/keyboards/bm43a/config.h b/keyboards/kprepublic/bm43a/config.h similarity index 100% rename from keyboards/bm43a/config.h rename to keyboards/kprepublic/bm43a/config.h diff --git a/keyboards/bm43a/info.json b/keyboards/kprepublic/bm43a/info.json similarity index 100% rename from keyboards/bm43a/info.json rename to keyboards/kprepublic/bm43a/info.json diff --git a/keyboards/bm43a/keymaps/default/config.h b/keyboards/kprepublic/bm43a/keymaps/default/config.h similarity index 100% rename from keyboards/bm43a/keymaps/default/config.h rename to keyboards/kprepublic/bm43a/keymaps/default/config.h diff --git a/keyboards/bm43a/keymaps/default/keymap.c b/keyboards/kprepublic/bm43a/keymaps/default/keymap.c similarity index 100% rename from keyboards/bm43a/keymaps/default/keymap.c rename to keyboards/kprepublic/bm43a/keymaps/default/keymap.c diff --git a/keyboards/bm43a/keymaps/default/readme.md b/keyboards/kprepublic/bm43a/keymaps/default/readme.md similarity index 100% rename from keyboards/bm43a/keymaps/default/readme.md rename to keyboards/kprepublic/bm43a/keymaps/default/readme.md diff --git a/keyboards/bm43a/keymaps/stevexyz/keymap.c b/keyboards/kprepublic/bm43a/keymaps/stevexyz/keymap.c similarity index 100% rename from keyboards/bm43a/keymaps/stevexyz/keymap.c rename to keyboards/kprepublic/bm43a/keymaps/stevexyz/keymap.c diff --git a/keyboards/bm43a/keymaps/stevexyz/readme.md b/keyboards/kprepublic/bm43a/keymaps/stevexyz/readme.md similarity index 100% rename from keyboards/bm43a/keymaps/stevexyz/readme.md rename to keyboards/kprepublic/bm43a/keymaps/stevexyz/readme.md diff --git a/keyboards/kprepublic/bm43a/keymaps/stevexyz/rules.mk b/keyboards/kprepublic/bm43a/keymaps/stevexyz/rules.mk new file mode 100644 index 000000000..4b1dd152b --- /dev/null +++ b/keyboards/kprepublic/bm43a/keymaps/stevexyz/rules.mk @@ -0,0 +1,8 @@ +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug + +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/kprepublic/bm43a/readme.md b/keyboards/kprepublic/bm43a/readme.md new file mode 100644 index 000000000..6be28a7ef --- /dev/null +++ b/keyboards/kprepublic/bm43a/readme.md @@ -0,0 +1,15 @@ +# bm43a + +A 40% mechanical keyboard. + +This firmware was originally taken from a kbfirmware.json and converted through [kbf_qmk_converter](https://noroadsleft.github.io/kbf_qmk_converter/). You may find the original `.json` files [here](https://drive.google.com/drive/folders/11DowBYrFN_uCNa9Q9bXwuMn91vmZYBcG). + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: bm43a PCB +* Hardware Availability: [KPRepublic](https://kprepublic.com/products/bm43a-bm43-43-keys-40-custom-mechanical-keyboard-pcb-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm43a:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm43a/rules.mk b/keyboards/kprepublic/bm43a/rules.mk new file mode 100644 index 000000000..e28da405c --- /dev/null +++ b/keyboards/kprepublic/bm43a/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/bm60poker/bm60poker.c b/keyboards/kprepublic/bm60poker/bm60poker.c similarity index 100% rename from keyboards/bm60poker/bm60poker.c rename to keyboards/kprepublic/bm60poker/bm60poker.c diff --git a/keyboards/bm60poker/bm60poker.h b/keyboards/kprepublic/bm60poker/bm60poker.h similarity index 100% rename from keyboards/bm60poker/bm60poker.h rename to keyboards/kprepublic/bm60poker/bm60poker.h diff --git a/keyboards/bm60poker/config.h b/keyboards/kprepublic/bm60poker/config.h similarity index 100% rename from keyboards/bm60poker/config.h rename to keyboards/kprepublic/bm60poker/config.h diff --git a/keyboards/bm60poker/info.json b/keyboards/kprepublic/bm60poker/info.json similarity index 100% rename from keyboards/bm60poker/info.json rename to keyboards/kprepublic/bm60poker/info.json diff --git a/keyboards/bm60poker/keymaps/default/keymap.c b/keyboards/kprepublic/bm60poker/keymaps/default/keymap.c similarity index 100% rename from keyboards/bm60poker/keymaps/default/keymap.c rename to keyboards/kprepublic/bm60poker/keymaps/default/keymap.c diff --git a/keyboards/bm60poker/keymaps/ipetepete/keymap.c b/keyboards/kprepublic/bm60poker/keymaps/ipetepete/keymap.c similarity index 100% rename from keyboards/bm60poker/keymaps/ipetepete/keymap.c rename to keyboards/kprepublic/bm60poker/keymaps/ipetepete/keymap.c diff --git a/keyboards/bm60poker/keymaps/ipetepete/readme.md b/keyboards/kprepublic/bm60poker/keymaps/ipetepete/readme.md similarity index 100% rename from keyboards/bm60poker/keymaps/ipetepete/readme.md rename to keyboards/kprepublic/bm60poker/keymaps/ipetepete/readme.md diff --git a/keyboards/bm60poker/keymaps/ipetepete/rules.mk b/keyboards/kprepublic/bm60poker/keymaps/ipetepete/rules.mk similarity index 100% rename from keyboards/bm60poker/keymaps/ipetepete/rules.mk rename to keyboards/kprepublic/bm60poker/keymaps/ipetepete/rules.mk diff --git a/keyboards/bm60poker/keymaps/via/keymap.c b/keyboards/kprepublic/bm60poker/keymaps/via/keymap.c similarity index 100% rename from keyboards/bm60poker/keymaps/via/keymap.c rename to keyboards/kprepublic/bm60poker/keymaps/via/keymap.c diff --git a/keyboards/thevankeyboards/minivan/keymaps/via/rules.mk b/keyboards/kprepublic/bm60poker/keymaps/via/rules.mk similarity index 100% rename from keyboards/thevankeyboards/minivan/keymaps/via/rules.mk rename to keyboards/kprepublic/bm60poker/keymaps/via/rules.mk diff --git a/keyboards/kprepublic/bm60poker/readme.md b/keyboards/kprepublic/bm60poker/readme.md new file mode 100644 index 000000000..b276a1555 --- /dev/null +++ b/keyboards/kprepublic/bm60poker/readme.md @@ -0,0 +1,13 @@ +# BM60 Poker 60% Mechanical Keyboard RGB PCB + +A 60% hotswap inswitch RGB (north facing) keyboard from KP Republic. + +* Keyboard Maintainer: [ipetepete](https://github.com/ipetepete) +* Hardware Supported: BM60 POKER RGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-poker-60-gh60-hot-swap-custom-mechanical-keyboard-pcb-program-qmk-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm60poker:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm60poker/rules.mk b/keyboards/kprepublic/bm60poker/rules.mk new file mode 100644 index 000000000..fbd3f86af --- /dev/null +++ b/keyboards/kprepublic/bm60poker/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +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 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LAYOUTS = 60_ansi diff --git a/keyboards/bm60rgb/bm60rgb.c b/keyboards/kprepublic/bm60rgb/bm60rgb.c similarity index 100% rename from keyboards/bm60rgb/bm60rgb.c rename to keyboards/kprepublic/bm60rgb/bm60rgb.c diff --git a/keyboards/bm60rgb/bm60rgb.h b/keyboards/kprepublic/bm60rgb/bm60rgb.h similarity index 100% rename from keyboards/bm60rgb/bm60rgb.h rename to keyboards/kprepublic/bm60rgb/bm60rgb.h diff --git a/keyboards/bm60rgb/config.h b/keyboards/kprepublic/bm60rgb/config.h similarity index 100% rename from keyboards/bm60rgb/config.h rename to keyboards/kprepublic/bm60rgb/config.h diff --git a/keyboards/bm60rgb/info.json b/keyboards/kprepublic/bm60rgb/info.json similarity index 100% rename from keyboards/bm60rgb/info.json rename to keyboards/kprepublic/bm60rgb/info.json diff --git a/keyboards/bm60rgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm60rgb/keymaps/default/keymap.c similarity index 100% rename from keyboards/bm60rgb/keymaps/default/keymap.c rename to keyboards/kprepublic/bm60rgb/keymaps/default/keymap.c diff --git a/keyboards/bm60rgb/keymaps/default/readme.md b/keyboards/kprepublic/bm60rgb/keymaps/default/readme.md similarity index 100% rename from keyboards/bm60rgb/keymaps/default/readme.md rename to keyboards/kprepublic/bm60rgb/keymaps/default/readme.md diff --git a/keyboards/bm60rgb/keymaps/jbradforddillon/keymap.c b/keyboards/kprepublic/bm60rgb/keymaps/jbradforddillon/keymap.c similarity index 100% rename from keyboards/bm60rgb/keymaps/jbradforddillon/keymap.c rename to keyboards/kprepublic/bm60rgb/keymaps/jbradforddillon/keymap.c diff --git a/keyboards/bm60rgb/keymaps/jbradforddillon/readme.md b/keyboards/kprepublic/bm60rgb/keymaps/jbradforddillon/readme.md similarity index 100% rename from keyboards/bm60rgb/keymaps/jbradforddillon/readme.md rename to keyboards/kprepublic/bm60rgb/keymaps/jbradforddillon/readme.md diff --git a/keyboards/bm60rgb/keymaps/via/keymap.c b/keyboards/kprepublic/bm60rgb/keymaps/via/keymap.c similarity index 100% rename from keyboards/bm60rgb/keymaps/via/keymap.c rename to keyboards/kprepublic/bm60rgb/keymaps/via/keymap.c diff --git a/keyboards/bm60rgb/keymaps/via/readme.md b/keyboards/kprepublic/bm60rgb/keymaps/via/readme.md similarity index 100% rename from keyboards/bm60rgb/keymaps/via/readme.md rename to keyboards/kprepublic/bm60rgb/keymaps/via/readme.md diff --git a/keyboards/bm60rgb/keymaps/via/rules.mk b/keyboards/kprepublic/bm60rgb/keymaps/via/rules.mk similarity index 100% rename from keyboards/bm60rgb/keymaps/via/rules.mk rename to keyboards/kprepublic/bm60rgb/keymaps/via/rules.mk diff --git a/keyboards/kprepublic/bm60rgb/readme.md b/keyboards/kprepublic/bm60rgb/readme.md new file mode 100644 index 000000000..d0d5ff1a4 --- /dev/null +++ b/keyboards/kprepublic/bm60rgb/readme.md @@ -0,0 +1,13 @@ +# BM60 RGB + +A 60% hotswap inswitch RGB keyboard from KP Republic. + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: BM60 RGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-60-gh60-hot-swappable-pcb-programmed-qmk-firmware-type-c) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm60rgb:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm60rgb/rules.mk b/keyboards/kprepublic/bm60rgb/rules.mk new file mode 100644 index 000000000..e4e6b4ea1 --- /dev/null +++ b/keyboards/kprepublic/bm60rgb/rules.mk @@ -0,0 +1,38 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +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 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes + +LAYOUTS = 60_ansi_arrow + +# partially generated by KBFirmware JSON to QMK Parser +# https://noroadsleft.github.io/kbf_qmk_converter/ diff --git a/keyboards/bm60rgb_iso/bm60rgb_iso.c b/keyboards/kprepublic/bm60rgb_iso/bm60rgb_iso.c similarity index 100% rename from keyboards/bm60rgb_iso/bm60rgb_iso.c rename to keyboards/kprepublic/bm60rgb_iso/bm60rgb_iso.c diff --git a/keyboards/bm60rgb_iso/bm60rgb_iso.h b/keyboards/kprepublic/bm60rgb_iso/bm60rgb_iso.h similarity index 100% rename from keyboards/bm60rgb_iso/bm60rgb_iso.h rename to keyboards/kprepublic/bm60rgb_iso/bm60rgb_iso.h diff --git a/keyboards/bm60rgb_iso/config.h b/keyboards/kprepublic/bm60rgb_iso/config.h similarity index 100% rename from keyboards/bm60rgb_iso/config.h rename to keyboards/kprepublic/bm60rgb_iso/config.h diff --git a/keyboards/bm60rgb_iso/info.json b/keyboards/kprepublic/bm60rgb_iso/info.json similarity index 100% rename from keyboards/bm60rgb_iso/info.json rename to keyboards/kprepublic/bm60rgb_iso/info.json diff --git a/keyboards/bm60rgb_iso/keymaps/default/keymap.c b/keyboards/kprepublic/bm60rgb_iso/keymaps/default/keymap.c similarity index 100% rename from keyboards/bm60rgb_iso/keymaps/default/keymap.c rename to keyboards/kprepublic/bm60rgb_iso/keymaps/default/keymap.c diff --git a/keyboards/bm60rgb_iso/keymaps/default/readme.md b/keyboards/kprepublic/bm60rgb_iso/keymaps/default/readme.md similarity index 100% rename from keyboards/bm60rgb_iso/keymaps/default/readme.md rename to keyboards/kprepublic/bm60rgb_iso/keymaps/default/readme.md diff --git a/keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/config.h b/keyboards/kprepublic/bm60rgb_iso/keymaps/iso_nordic_sleepmode/config.h similarity index 100% rename from keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/config.h rename to keyboards/kprepublic/bm60rgb_iso/keymaps/iso_nordic_sleepmode/config.h diff --git a/keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/keymap.c b/keyboards/kprepublic/bm60rgb_iso/keymaps/iso_nordic_sleepmode/keymap.c similarity index 100% rename from keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/keymap.c rename to keyboards/kprepublic/bm60rgb_iso/keymaps/iso_nordic_sleepmode/keymap.c diff --git a/keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/readme.md b/keyboards/kprepublic/bm60rgb_iso/keymaps/iso_nordic_sleepmode/readme.md similarity index 100% rename from keyboards/bm60rgb_iso/keymaps/iso_nordic_sleepmode/readme.md rename to keyboards/kprepublic/bm60rgb_iso/keymaps/iso_nordic_sleepmode/readme.md diff --git a/keyboards/kprepublic/bm60rgb_iso/readme.md b/keyboards/kprepublic/bm60rgb_iso/readme.md new file mode 100644 index 000000000..fec112650 --- /dev/null +++ b/keyboards/kprepublic/bm60rgb_iso/readme.md @@ -0,0 +1,19 @@ +# BM60 RGB ISO + +![BM60 RGB ISO](https://i.imgur.com/i3gk2vql.jpg) + +A 60% ISO hotswap inswitch RGB keyboard. + +* Keyboard Maintainer: [markva](https://github.com/markva) +* Hardware Supported: BM60 RGB ISO +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-iso-uk-eu-rgb-60-hot-swappable-pcb-qmk-firmware-rgb-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm60rgb_iso:default + +Flashing example for this keyboard: + + make kprepublic/bm60rgb_iso:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm60rgb_iso/rules.mk b/keyboards/kprepublic/bm60rgb_iso/rules.mk new file mode 100644 index 000000000..3f935989e --- /dev/null +++ b/keyboards/kprepublic/bm60rgb_iso/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +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 +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes diff --git a/keyboards/bm65iso/bm65iso.c b/keyboards/kprepublic/bm65iso/bm65iso.c similarity index 100% rename from keyboards/bm65iso/bm65iso.c rename to keyboards/kprepublic/bm65iso/bm65iso.c diff --git a/keyboards/bm65iso/bm65iso.h b/keyboards/kprepublic/bm65iso/bm65iso.h similarity index 100% rename from keyboards/bm65iso/bm65iso.h rename to keyboards/kprepublic/bm65iso/bm65iso.h diff --git a/keyboards/bm65iso/config.h b/keyboards/kprepublic/bm65iso/config.h similarity index 100% rename from keyboards/bm65iso/config.h rename to keyboards/kprepublic/bm65iso/config.h diff --git a/keyboards/bm65iso/info.json b/keyboards/kprepublic/bm65iso/info.json similarity index 100% rename from keyboards/bm65iso/info.json rename to keyboards/kprepublic/bm65iso/info.json diff --git a/keyboards/bm65iso/keymaps/deadolus/config.h b/keyboards/kprepublic/bm65iso/keymaps/deadolus/config.h similarity index 100% rename from keyboards/bm65iso/keymaps/deadolus/config.h rename to keyboards/kprepublic/bm65iso/keymaps/deadolus/config.h diff --git a/keyboards/bm65iso/keymaps/deadolus/keymap.c b/keyboards/kprepublic/bm65iso/keymaps/deadolus/keymap.c similarity index 100% rename from keyboards/bm65iso/keymaps/deadolus/keymap.c rename to keyboards/kprepublic/bm65iso/keymaps/deadolus/keymap.c diff --git a/keyboards/bm65iso/keymaps/deadolus/keymap.h b/keyboards/kprepublic/bm65iso/keymaps/deadolus/keymap.h similarity index 100% rename from keyboards/bm65iso/keymaps/deadolus/keymap.h rename to keyboards/kprepublic/bm65iso/keymaps/deadolus/keymap.h diff --git a/keyboards/bm65iso/keymaps/deadolus/readme.md b/keyboards/kprepublic/bm65iso/keymaps/deadolus/readme.md similarity index 100% rename from keyboards/bm65iso/keymaps/deadolus/readme.md rename to keyboards/kprepublic/bm65iso/keymaps/deadolus/readme.md diff --git a/keyboards/bm65iso/keymaps/deadolus/rules.mk b/keyboards/kprepublic/bm65iso/keymaps/deadolus/rules.mk similarity index 100% rename from keyboards/bm65iso/keymaps/deadolus/rules.mk rename to keyboards/kprepublic/bm65iso/keymaps/deadolus/rules.mk diff --git a/keyboards/bm65iso/keymaps/default/keymap.c b/keyboards/kprepublic/bm65iso/keymaps/default/keymap.c similarity index 100% rename from keyboards/bm65iso/keymaps/default/keymap.c rename to keyboards/kprepublic/bm65iso/keymaps/default/keymap.c diff --git a/keyboards/bm65iso/keymaps/via/keymap.c b/keyboards/kprepublic/bm65iso/keymaps/via/keymap.c similarity index 100% rename from keyboards/bm65iso/keymaps/via/keymap.c rename to keyboards/kprepublic/bm65iso/keymaps/via/keymap.c diff --git a/keyboards/bm65iso/keymaps/via/readme.md b/keyboards/kprepublic/bm65iso/keymaps/via/readme.md similarity index 100% rename from keyboards/bm65iso/keymaps/via/readme.md rename to keyboards/kprepublic/bm65iso/keymaps/via/readme.md diff --git a/keyboards/bm65iso/keymaps/via/rules.mk b/keyboards/kprepublic/bm65iso/keymaps/via/rules.mk similarity index 100% rename from keyboards/bm65iso/keymaps/via/rules.mk rename to keyboards/kprepublic/bm65iso/keymaps/via/rules.mk diff --git a/keyboards/kprepublic/bm65iso/readme.md b/keyboards/kprepublic/bm65iso/readme.md new file mode 100644 index 000000000..466a0341a --- /dev/null +++ b/keyboards/kprepublic/bm65iso/readme.md @@ -0,0 +1,24 @@ +# bm65iso + +![bm65iso](https://ae01.alicdn.com/kf/He2fd118856c7490292bc3c299049fdbcp.jpg) + +A 65% hotswap in switch RGB keyboard from KPRepublic. + +* Keyboard Maintainer: [deadolus](https://github.com/deadolus) +* Hardware Supported: BM65 ISO +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm65rgb-bm65-iso-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-rgb-switch-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm65iso:default + +Flashing example for this keyboard: + + make kprepublic/bm65iso:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in +* Hold the Esc key while connecting the USB cable (also erases persistent settings) + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm65iso/rules.mk b/keyboards/kprepublic/bm65iso/rules.mk new file mode 100644 index 000000000..832e8f31f --- /dev/null +++ b/keyboards/kprepublic/bm65iso/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes + +LAYOUTS = 65_iso_blocker diff --git a/keyboards/bm68rgb/bm68rgb.c b/keyboards/kprepublic/bm68rgb/bm68rgb.c similarity index 100% rename from keyboards/bm68rgb/bm68rgb.c rename to keyboards/kprepublic/bm68rgb/bm68rgb.c diff --git a/keyboards/bm68rgb/bm68rgb.h b/keyboards/kprepublic/bm68rgb/bm68rgb.h similarity index 100% rename from keyboards/bm68rgb/bm68rgb.h rename to keyboards/kprepublic/bm68rgb/bm68rgb.h diff --git a/keyboards/bm68rgb/config.h b/keyboards/kprepublic/bm68rgb/config.h similarity index 100% rename from keyboards/bm68rgb/config.h rename to keyboards/kprepublic/bm68rgb/config.h diff --git a/keyboards/bm68rgb/info.json b/keyboards/kprepublic/bm68rgb/info.json similarity index 100% rename from keyboards/bm68rgb/info.json rename to keyboards/kprepublic/bm68rgb/info.json diff --git a/keyboards/bm68rgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm68rgb/keymaps/default/keymap.c similarity index 100% rename from keyboards/bm68rgb/keymaps/default/keymap.c rename to keyboards/kprepublic/bm68rgb/keymaps/default/keymap.c diff --git a/keyboards/bm68rgb/keymaps/default/readme.md b/keyboards/kprepublic/bm68rgb/keymaps/default/readme.md similarity index 100% rename from keyboards/bm68rgb/keymaps/default/readme.md rename to keyboards/kprepublic/bm68rgb/keymaps/default/readme.md diff --git a/keyboards/kprepublic/bm68rgb/keymaps/peepeetee/config.h b/keyboards/kprepublic/bm68rgb/keymaps/peepeetee/config.h new file mode 100644 index 000000000..aada255cd --- /dev/null +++ b/keyboards/kprepublic/bm68rgb/keymaps/peepeetee/config.h @@ -0,0 +1,132 @@ +/* Copyright 2021 peepeetee + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 MODS_SHIFT (get_mods() & MOD_MASK_SHIFT) +// #define MODS_CTRL (get_mods() & MOD_MASK_CTRL) +// #define MODS_ALT (get_mods() & MOD_MASK_ALT) + +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) // Key combination that allows the use of magic commands (useful for debugging) + +// #define NO_DEBUG // Disable debugging +// #define NO_PRINT // Disable printing/debugging using hid_listen +// #define NO_ACTION_LAYER // Disable layers +// #define NO_ACTION_TAPPING // Disable tap dance and other tapping features +// #define NO_ACTION_ONESHOT // Disable one-shot modifiers +// #define NO_ACTION_MACRO // Disable old style macro handling: MACRO() & action_get_macro +// #define TERMINAL_HELP +// #define MOUSEKEY_INTERVAL 20 +// #define MOUSEKEY_DELAY 0 +// #define MOUSEKEY_TIME_TO_MAX 60 +// #define MOUSEKEY_MAX_SPEED 10 +// #define MOUSEKEY_WHEEL_DELAY 0 +#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. +// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. +// #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) +// #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +// #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state + #define TAPPING_TERM 200 // How long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too +// #define TAPPING_TERM_PER_KEY // Enables handling for per key TAPPING_TERM settings +// #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release +// #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle +// #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details +// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details +// #define TAPPING_FORCE_HOLD // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) +// #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. +// #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall +// #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. +// #define ONESHOT_TIMEOUT 300 // How long before oneshot times out +// #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered +// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. +// #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. +// #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. +// #define TAP_HOLD_CAPS_DELAY 80 // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPSLOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. + +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_ALPHAS_MODS // Sets the default mode, if none has been set +// #define RGBLIGHT_HUE_STEP 12 // Units to step when in/decreasing hue +// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation +// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) +// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +// #define RGBLIGHT_ANIMATIONS // Run RGB animations +// #define RGBLIGHT_ANIMATIONS // Enable all additional animation modes. +// #define RGBLIGHT_EFFECT_ALTERNATING // Enable alternating animation mode. +// #define RGBLIGHT_EFFECT_BREATHING // Enable breathing animation mode. +// #define RGBLIGHT_EFFECT_CHRISTMAS // Enable christmas animation mode. +// #define RGBLIGHT_EFFECT_KNIGHT // Enable knight animation mode. +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD // Enable rainbow mood animation mode. +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL // Enable rainbow swirl animation mode. +// #define RGBLIGHT_EFFECT_RGB_TEST // Enable RGB test animation mode. +// #define RGBLIGHT_EFFECT_SNAKE // Enable snake animation mode. +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT // Enable static gradient mode. + +// #define RGBLIGHT_EFFECT_BREATHE_CENTER // If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // The maximum brightness for the breathing mode. Valid values are 1 to 255 +// #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 // How long to wait between light changes for the "Christmas" animation, in milliseconds +// #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 // The number of LEDs to group the red/green colors by for the "Christmas" animation +// #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM // The number of LEDs to have the "Knight" animation travel +// #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // The number of LEDs to light up for the "Knight" animation +// #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 // The number of LEDs to start the "Knight" animation from the start of the strip by +// #define RGBLIGHT_RAINBOW_SWIRL_RANGE 255 // Range adjustment for the rainbow swirl effect to get different swirls +// #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation + +// This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. +// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +// #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient top to bottom, speed controls how much gradient changes +#define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +//#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard + #define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue + #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +// =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= +// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +// =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== + #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +#define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +#define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out diff --git a/keyboards/bm68rgb/keymaps/peepeetee/keymap.c b/keyboards/kprepublic/bm68rgb/keymaps/peepeetee/keymap.c similarity index 100% rename from keyboards/bm68rgb/keymaps/peepeetee/keymap.c rename to keyboards/kprepublic/bm68rgb/keymaps/peepeetee/keymap.c diff --git a/keyboards/bm68rgb/keymaps/peepeetee/keymap.h b/keyboards/kprepublic/bm68rgb/keymaps/peepeetee/keymap.h similarity index 100% rename from keyboards/bm68rgb/keymaps/peepeetee/keymap.h rename to keyboards/kprepublic/bm68rgb/keymaps/peepeetee/keymap.h diff --git a/keyboards/bm68rgb/keymaps/peepeetee/readme.md b/keyboards/kprepublic/bm68rgb/keymaps/peepeetee/readme.md similarity index 100% rename from keyboards/bm68rgb/keymaps/peepeetee/readme.md rename to keyboards/kprepublic/bm68rgb/keymaps/peepeetee/readme.md diff --git a/keyboards/bm68rgb/keymaps/via/keymap.c b/keyboards/kprepublic/bm68rgb/keymaps/via/keymap.c similarity index 100% rename from keyboards/bm68rgb/keymaps/via/keymap.c rename to keyboards/kprepublic/bm68rgb/keymaps/via/keymap.c diff --git a/keyboards/bm68rgb/keymaps/via/readme.md b/keyboards/kprepublic/bm68rgb/keymaps/via/readme.md similarity index 100% rename from keyboards/bm68rgb/keymaps/via/readme.md rename to keyboards/kprepublic/bm68rgb/keymaps/via/readme.md diff --git a/keyboards/xd75/keymaps/via/rules.mk b/keyboards/kprepublic/bm68rgb/keymaps/via/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/via/rules.mk rename to keyboards/kprepublic/bm68rgb/keymaps/via/rules.mk diff --git a/keyboards/kprepublic/bm68rgb/readme.md b/keyboards/kprepublic/bm68rgb/readme.md new file mode 100644 index 000000000..f09efb1ab --- /dev/null +++ b/keyboards/kprepublic/bm68rgb/readme.md @@ -0,0 +1,24 @@ +# bm68rgb + +![bm68rgb](https://i.imgur.com/uuYP8OIl.jpeg) + +A 65% hotswap in switch RGB keyboard from KPRepublic. + +* Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) +* Hardware Supported: BM68 RGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm68rgb-bm68-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm68rgb:default + +Flashing example for this keyboard: + + make kprepublic/bm68rgb:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in +* Hold the Esc key while connecting the USB cable (also erases persistent settings) + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm68rgb/rules.mk b/keyboards/kprepublic/bm68rgb/rules.mk new file mode 100644 index 000000000..58c1f84d6 --- /dev/null +++ b/keyboards/kprepublic/bm68rgb/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes + +LAYOUTS = 65_ansi diff --git a/keyboards/kprepublic/cospad/config.h b/keyboards/kprepublic/cospad/config.h new file mode 100644 index 000000000..a18c2c1b2 --- /dev/null +++ b/keyboards/kprepublic/cospad/config.h @@ -0,0 +1,203 @@ +/* +Copyright 2020 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4B5C // "KP" +#define PRODUCT_ID 0xB1E5 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPrepublic +#define PRODUCT Cospad + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D4, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define LED_NUM_LOCK_PIN B2 +#define LED_PIN_ON_STATE 0 + +#define BACKLIGHT_PIN F7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_ON_STATE 0 + +#define RGB_DI_PIN F6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 4 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* 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/keyboards/cospad/cospad.c b/keyboards/kprepublic/cospad/cospad.c similarity index 100% rename from keyboards/cospad/cospad.c rename to keyboards/kprepublic/cospad/cospad.c diff --git a/keyboards/cospad/cospad.h b/keyboards/kprepublic/cospad/cospad.h similarity index 100% rename from keyboards/cospad/cospad.h rename to keyboards/kprepublic/cospad/cospad.h diff --git a/keyboards/cospad/info.json b/keyboards/kprepublic/cospad/info.json similarity index 100% rename from keyboards/cospad/info.json rename to keyboards/kprepublic/cospad/info.json diff --git a/keyboards/cospad/keymaps/default/keymap.c b/keyboards/kprepublic/cospad/keymaps/default/keymap.c similarity index 100% rename from keyboards/cospad/keymaps/default/keymap.c rename to keyboards/kprepublic/cospad/keymaps/default/keymap.c diff --git a/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c b/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c new file mode 100644 index 000000000..af56305e5 --- /dev/null +++ b/keyboards/kprepublic/cospad/keymaps/detrus/keymap.c @@ -0,0 +1,367 @@ +#include QMK_KEYBOARD_H +#include "led.h" +#include + +#ifdef RGBLIGHT_ENABLE +#include "rgblight.h" +#endif + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +enum cospad_layers { + _QWERTY_LAYER, + _QWERTZ_LAYER, + _COLEMA_LAYER, + _DVORAK_LAYER, + _QWERTY_LOWER_LAYER, + _QWERTZ_LOWER_LAYER, + _COLEMA_LOWER_LAYER, + _DVORAK_LOWER_LAYER, + _RAISE_LAYER, + _ALTER_LAYER, +}; + +// To switch the default layer used for the layout, there are special keycodes. +// Which onces detected below serve to switch it. +enum cospad_keycodes { + QWERTY = SAFE_RANGE, + QWERTZ, + COLEMAK, + DVORAK +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Keymap _QWERTY_LAYER: Default layer + * ,-----------------------. + * | T | G | B | Alt | + * |-----|-----|-----|-----| + * | R | F | V | LOW | + * |-----|-----|-----|-----| + * | E | D | C | | + * |-----|-----|-----| Spc | + * | W | S | X | | + * |-----|-----|-----|-----| + * | Q | A | Z | RAI | + * |-----|-----|-----|-----| + * | Esc | Tab | Sft | Ctl | + * `-----------------------' + * + * And it's LOWER layer + * ,-----------------------. + * | P | ; | / | Alt | + * |-----|-----|-----|-----| + * | O | L | . | LOW | + * |-----|-----|-----|-----| + * | I | K | , | | + * |-----|-----|-----| Ent | + * | U | J | M | | + * |-----|-----|-----|-----| + * | Y | H | N | RAI | + * |-----|-----|-----|-----| + * | Esc | Tab | Sft | Ctl | + * `-----------------------' + */ + [_QWERTY_LAYER] = LAYOUT_gamepad_6x4( + KC_T, KC_G, KC_B, KC_LALT, \ + KC_R, KC_F, KC_V, MO(_QWERTY_LOWER_LAYER),\ + KC_E, KC_D, KC_C, \ + KC_W, KC_S, KC_X, KC_SPACE, \ + KC_Q, KC_A, KC_Z, MO(_RAISE_LAYER),\ + KC_GESC, KC_TAB, KC_LSFT, KC_LCTRL), + [_QWERTY_LOWER_LAYER] = LAYOUT_gamepad_6x4( + KC_P, KC_SCLN, KC_SLSH, KC_LALT, \ + KC_O, KC_L, KC_DOT, _______, \ + KC_I, KC_K, KC_COMM, \ + KC_U, KC_J, KC_M, KC_ENTER, \ + KC_Y, KC_H, KC_N, _______, \ + _______, _______, _______, _______), + + + + /* Keymap _QWERTZ_LAYER: Alternate default layer + * ,-----------------------. + * | T | G | B | Alt | + * |-----|-----|-----|-----| + * | R | F | V | LOW | + * |-----|-----|-----|-----| + * | E | D | C | | + * |-----|-----|-----| Spc | + * | W | S | X | | + * |-----|-----|-----|-----| + * | Q | A | Y | RAI | + * |-----|-----|-----|-----| + * | Esc | Tab | Sft | Ctl | + * `-----------------------' + * + * And it's LOWER layer + * ,-----------------------. + * | P | ; | / | Alt | + * |-----|-----|-----|-----| + * | O | L | > | LOW | + * |-----|-----|-----|-----| + * | I | K | < | | + * |-----|-----|-----| Ent | + * | U | J | M | | + * |-----|-----|-----|-----| + * | Z | H | N | RAI | + * |-----|-----|-----|-----| + * | Esc | Tab | Sft | Ctl | + * `-----------------------' + */ + [_QWERTZ_LAYER] = LAYOUT_gamepad_6x4( + KC_T, KC_G, KC_B, KC_LALT, \ + KC_R, KC_F, KC_V, MO(_QWERTZ_LOWER_LAYER),\ + KC_E, KC_D, KC_C, \ + KC_W, KC_S, KC_X, KC_SPACE, \ + KC_Q, KC_A, KC_Y, MO(_RAISE_LAYER),\ + KC_GESC, KC_TAB, KC_LSFT, KC_LCTRL), + [_QWERTZ_LOWER_LAYER] = LAYOUT_gamepad_6x4( + KC_P, KC_SCLN, KC_SLSH, KC_LALT, \ + KC_O, KC_L, KC_DOT, _______, \ + KC_I, KC_K, KC_COMM, \ + KC_U, KC_J, KC_M, KC_ENTER, \ + KC_Z, KC_H, KC_N, _______, \ + _______, _______, _______, _______), + + + + /* Keymap _COLEMA_LAYER: Alternate default layer + * ,-----------------------. + * | G | D | B | Alt | + * |-----|-----|-----|-----| + * | P | T | V | LOW | + * |-----|-----|-----|-----| + * | F | S | C | | + * |-----|-----|-----| Spc | + * | W | R | X | | + * |-----|-----|-----|-----| + * | Q | A | Z | RAI | + * |-----|-----|-----|-----| + * | Esc | Tab | Sft | Ctl | + * `-----------------------' + * + * And it's LOWER layer + * ,-----------------------. + * | ; | O | / | Alt | + * |-----|-----|-----|-----| + * | Y | I | . | LOW | + * |-----|-----|-----|-----| + * | U | E | , | | + * |-----|-----|-----| Ent | + * | L | N | M | | + * |-----|-----|-----|-----| + * | J | H | K | RAI | + * |-----|-----|-----|-----| + * | Esc | Tab | Sft | Ctl | + * `-----------------------' + */ + [_COLEMA_LAYER] = LAYOUT_gamepad_6x4( + KC_T, KC_D, KC_B, KC_LALT, \ + KC_R, KC_T, KC_V, MO(_COLEMA_LOWER_LAYER),\ + KC_E, KC_S, KC_C, \ + KC_W, KC_R, KC_X, KC_SPACE, \ + KC_Q, KC_A, KC_Z, MO(_RAISE_LAYER),\ + KC_GESC, KC_TAB, KC_LSFT, KC_LCTRL), + [_COLEMA_LOWER_LAYER] = LAYOUT_gamepad_6x4( + KC_SCLN, KC_O, KC_SLSH, _______, \ + KC_Y, KC_I, KC_DOT, _______, \ + KC_U, KC_E, KC_COMM, \ + KC_L, KC_N, KC_M, KC_ENTER, \ + KC_J, KC_H, KC_K, _______, \ + KC_F, KC_G, _______, _______), + + + + /* Keymap _DVORAK_LAYER: Alternate default layer + * ,-----------------------. + * | Y | I | X | Alt | + * |-----|-----|-----|-----| + * | P | U | K | LOW | + * |-----|-----|-----|-----| + * | . | E | J | | + * |-----|-----|-----| Spc | + * | , | O | Q | | + * |-----|-----|-----|-----| + * | ' | A | ; | RAI | + * |-----|-----|-----|-----| + * | Esc | Tab | Sft | Ctl | + * `-----------------------' + * + * And it's LOWER layer + * ,-----------------------. + * | L | S | Z | Alt | + * |-----|-----|-----|-----| + * | R | N | V | LOW | + * |-----|-----|-----|-----| + * | C | T | W | | + * |-----|-----|-----| Ent | + * | G | H | M | | + * |-----|-----|-----|-----| + * | F | D | B | RAI | + * |-----|-----|-----|-----| + * | Esc | Tab | Sft | Ctl | + * `-----------------------' + */ + [_DVORAK_LAYER] = LAYOUT_gamepad_6x4( + KC_Y, KC_I, KC_X, KC_LALT, \ + KC_P, KC_U, KC_K, MO(_DVORAK_LOWER_LAYER),\ + KC_DOT, KC_E, KC_J, \ + KC_COMM, KC_O, KC_A, KC_SPACE, \ + KC_QUOT, KC_A, KC_SCLN, MO(_RAISE_LAYER),\ + KC_GESC, KC_TAB, KC_LSFT, KC_LCTRL), + [_DVORAK_LOWER_LAYER] = LAYOUT_gamepad_6x4( + KC_L, KC_S, KC_Z, KC_LALT, \ + KC_R, KC_N, KC_V, _______, \ + KC_C, KC_T, KC_W, \ + KC_G, KC_H, KC_M, KC_ENTER,\ + KC_F, KC_D, KC_B, _______, \ + _______, _______, _______, _______), + + + + /* Keymap _RAISE_LAYER: Additional layer to access more + * ,-----------------------. + * | 5 | 0 | del | Alt | + * |-----|-----|-----|-----| + * | 4 | 9 | -> | LOW | + * |-----|-----|-----|-----| + * | 3 | 8 | <- | | + * |-----|-----|-----| Spc | + * | 2 | 7 | -> | | + * |-----|-----|-----|-----| + * | 1 | 6 | <- | RAI | + * |-----|-----|-----|-----| + * | Esc | Tab | Sft | Ctl | + * `-----------------------' + */ + [_RAISE_LAYER] = LAYOUT_gamepad_6x4( + KC_5, KC_0, KC_BSPC, _______, \ + KC_4, KC_9, KC_RIGHT, _______, \ + KC_3, KC_8, KC_UP, \ + KC_2, KC_7, KC_DOWN, _______, \ + KC_1, KC_6, KC_LEFT, _______, \ + _______, _______, _______, _______), + + + + /* Keymap _ALTER_LAYER: Function layer used to control the Leds + * and use media buttons + * ,----------------------------------------. + * | Val Dec | Bl Toggle | Qwertz | Super | + * |---------|------------|---------|-------| + * | Val Inc | Bl Off | Qwerty | | + * |---------|------------|---------|-------| + * | Sat Dec | Bl On | Colemak | | + * |---------|------------|---------| | + * | Sat Inc | RGB Toggle | Dvorak | | + * |---------|------------|---------|-------| + * | Hue Dec | RGB Next | Vol Dwn | | + * |---------|------------|---------|-------| + * | Hue Inc | RGB Prev | Vol Up | Reset | + * `----------------------------------------' + */ + [_ALTER_LAYER] = LAYOUT_gamepad_6x4( + RGB_VAD, BL_TOGG, QWERTZ, KC_LGUI, \ + RGB_VAI, BL_OFF, QWERTY, _______, \ + RGB_SAD, BL_ON, COLEMAK, \ + RGB_SAI, RGB_TOG, DVORAK, _______, \ + RGB_HUD, RGB_MOD, KC_VOLD, _______, \ + RGB_HUI, RGB_RMOD, KC_VOLU, RESET), +}; + +// Makes sure to update the good tri-layer if a layer changes +layer_state_t layer_state_set_user(layer_state_t state) { + switch (biton32(default_layer_state)) { + case _QWERTY_LAYER: + state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER); + break; + case _QWERTZ_LAYER: + state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER); + break; + case _COLEMA_LAYER: + state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER); + break; + case _DVORAK_LAYER: + state = update_tri_layer_state(state, _RAISE_LAYER, _DVORAK_LOWER_LAYER, _ALTER_LAYER); + break; + } + return state; +} + +// Makes the tri-layer +uint32_t default_layer_state_set_kb(uint32_t state) { + switch (biton32(state)) { + case _QWERTY_LAYER: + state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER); + state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER); + state = update_tri_layer_state(state, _RAISE_LAYER, _DVORAK_LOWER_LAYER, _ALTER_LAYER); + layer_move(_QWERTY_LAYER); + break; + case _QWERTZ_LAYER: + state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER); + state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER); + state = update_tri_layer_state(state, _RAISE_LAYER, _DVORAK_LOWER_LAYER, _ALTER_LAYER); + layer_move(_QWERTZ_LAYER); + break; + case _COLEMA_LAYER: + state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER); + state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER); + state = update_tri_layer_state(state, _RAISE_LAYER, _DVORAK_LOWER_LAYER, _ALTER_LAYER); + layer_move(_COLEMA_LAYER); + break; + case _DVORAK_LAYER: + state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTY_LOWER_LAYER, _ALTER_LAYER); + state = update_tri_layer_state(state, _RAISE_LAYER, _QWERTZ_LOWER_LAYER, _ALTER_LAYER); + state = update_tri_layer_state(state, _RAISE_LAYER, _COLEMA_LOWER_LAYER, _ALTER_LAYER); + layer_move(_DVORAK_LAYER); + break; + } + return state; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case BL_TOGG: + if (record->event.pressed) { + cospad_bl_led_togg(); + } + return false; + case BL_ON: + if (record->event.pressed) { + cospad_bl_led_on(); + } + return false; + case BL_OFF: + if (record->event.pressed) { + cospad_bl_led_off(); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY_LAYER); + print("switched to QWERTY layout\n"); + } + return false; + break; + case QWERTZ: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTZ_LAYER); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMA_LAYER); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK_LAYER); + } + return false; + break; + default: + return true; + } +} diff --git a/keyboards/cospad/keymaps/split_plus_and_zero/keymap.c b/keyboards/kprepublic/cospad/keymaps/split_plus_and_zero/keymap.c similarity index 100% rename from keyboards/cospad/keymaps/split_plus_and_zero/keymap.c rename to keyboards/kprepublic/cospad/keymaps/split_plus_and_zero/keymap.c diff --git a/keyboards/cospad/keymaps/split_zero/keymap.c b/keyboards/kprepublic/cospad/keymaps/split_zero/keymap.c similarity index 100% rename from keyboards/cospad/keymaps/split_zero/keymap.c rename to keyboards/kprepublic/cospad/keymaps/split_zero/keymap.c diff --git a/keyboards/cospad/keymaps/via/keymap.c b/keyboards/kprepublic/cospad/keymaps/via/keymap.c similarity index 100% rename from keyboards/cospad/keymaps/via/keymap.c rename to keyboards/kprepublic/cospad/keymaps/via/keymap.c diff --git a/keyboards/cospad/keymaps/via/rules.mk b/keyboards/kprepublic/cospad/keymaps/via/rules.mk similarity index 100% rename from keyboards/cospad/keymaps/via/rules.mk rename to keyboards/kprepublic/cospad/keymaps/via/rules.mk diff --git a/keyboards/kprepublic/cospad/readme.md b/keyboards/kprepublic/cospad/readme.md new file mode 100644 index 000000000..70f9658cf --- /dev/null +++ b/keyboards/kprepublic/cospad/readme.md @@ -0,0 +1,18 @@ +# Cospad + +A DIY keypad kit sold by KPRepublic, runs TKG natively. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: Cospad PCB +* Hardware Availability: [KPrepublic on Aliexpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html) + +Supported Layouts: + +![Numpad layouts](https://i.imgur.com/t03lXJ4.png) +![Ortholinear layouts](https://i.imgur.com/mliUcCc.png) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/cospad:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/cospad/rules.mk b/keyboards/kprepublic/cospad/rules.mk new file mode 100644 index 000000000..7f464d7ac --- /dev/null +++ b/keyboards/kprepublic/cospad/rules.mk @@ -0,0 +1,31 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +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 = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +LAYOUTS = numpad_6x4 ortho_6x4 diff --git a/keyboards/jj40/config.h b/keyboards/kprepublic/jj40/config.h similarity index 100% rename from keyboards/jj40/config.h rename to keyboards/kprepublic/jj40/config.h diff --git a/keyboards/jj40/info.json b/keyboards/kprepublic/jj40/info.json similarity index 100% rename from keyboards/jj40/info.json rename to keyboards/kprepublic/jj40/info.json diff --git a/keyboards/jj40/jj40.c b/keyboards/kprepublic/jj40/jj40.c similarity index 100% rename from keyboards/jj40/jj40.c rename to keyboards/kprepublic/jj40/jj40.c diff --git a/keyboards/jj40/jj40.h b/keyboards/kprepublic/jj40/jj40.h similarity index 100% rename from keyboards/jj40/jj40.h rename to keyboards/kprepublic/jj40/jj40.h diff --git a/keyboards/jj40/keymaps/ajp10304/readme.md b/keyboards/kprepublic/jj40/keymaps/ajp10304/readme.md similarity index 100% rename from keyboards/jj40/keymaps/ajp10304/readme.md rename to keyboards/kprepublic/jj40/keymaps/ajp10304/readme.md diff --git a/keyboards/jj40/keymaps/cockpit/keymap.c b/keyboards/kprepublic/jj40/keymaps/cockpit/keymap.c similarity index 100% rename from keyboards/jj40/keymaps/cockpit/keymap.c rename to keyboards/kprepublic/jj40/keymaps/cockpit/keymap.c diff --git a/keyboards/jj40/keymaps/cockpit/readme.md b/keyboards/kprepublic/jj40/keymaps/cockpit/readme.md similarity index 100% rename from keyboards/jj40/keymaps/cockpit/readme.md rename to keyboards/kprepublic/jj40/keymaps/cockpit/readme.md diff --git a/keyboards/jj40/keymaps/default/keymap.c b/keyboards/kprepublic/jj40/keymaps/default/keymap.c similarity index 100% rename from keyboards/jj40/keymaps/default/keymap.c rename to keyboards/kprepublic/jj40/keymaps/default/keymap.c diff --git a/keyboards/jj40/keymaps/fun40/config.h b/keyboards/kprepublic/jj40/keymaps/fun40/config.h similarity index 100% rename from keyboards/jj40/keymaps/fun40/config.h rename to keyboards/kprepublic/jj40/keymaps/fun40/config.h diff --git a/keyboards/jj40/keymaps/fun40/keymap.c b/keyboards/kprepublic/jj40/keymaps/fun40/keymap.c similarity index 100% rename from keyboards/jj40/keymaps/fun40/keymap.c rename to keyboards/kprepublic/jj40/keymaps/fun40/keymap.c diff --git a/keyboards/jj40/keymaps/fun40/readme.md b/keyboards/kprepublic/jj40/keymaps/fun40/readme.md similarity index 100% rename from keyboards/jj40/keymaps/fun40/readme.md rename to keyboards/kprepublic/jj40/keymaps/fun40/readme.md diff --git a/keyboards/kprepublic/jj40/keymaps/fun40/rules.mk b/keyboards/kprepublic/jj40/keymaps/fun40/rules.mk new file mode 100644 index 000000000..187b59675 --- /dev/null +++ b/keyboards/kprepublic/jj40/keymaps/fun40/rules.mk @@ -0,0 +1,21 @@ + + +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes +DISABLE_WS2812 = yes + + +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + diff --git a/keyboards/jj40/keymaps/krusli/config.h b/keyboards/kprepublic/jj40/keymaps/krusli/config.h similarity index 100% rename from keyboards/jj40/keymaps/krusli/config.h rename to keyboards/kprepublic/jj40/keymaps/krusli/config.h diff --git a/keyboards/jj40/keymaps/krusli/keymap.c b/keyboards/kprepublic/jj40/keymaps/krusli/keymap.c similarity index 100% rename from keyboards/jj40/keymaps/krusli/keymap.c rename to keyboards/kprepublic/jj40/keymaps/krusli/keymap.c diff --git a/keyboards/jj40/keymaps/krusli/numpad.txt b/keyboards/kprepublic/jj40/keymaps/krusli/numpad.txt similarity index 100% rename from keyboards/jj40/keymaps/krusli/numpad.txt rename to keyboards/kprepublic/jj40/keymaps/krusli/numpad.txt diff --git a/keyboards/jj40/keymaps/krusli/readme.md b/keyboards/kprepublic/jj40/keymaps/krusli/readme.md similarity index 100% rename from keyboards/jj40/keymaps/krusli/readme.md rename to keyboards/kprepublic/jj40/keymaps/krusli/readme.md diff --git a/keyboards/jj40/keymaps/krusli/rules.mk b/keyboards/kprepublic/jj40/keymaps/krusli/rules.mk similarity index 100% rename from keyboards/jj40/keymaps/krusli/rules.mk rename to keyboards/kprepublic/jj40/keymaps/krusli/rules.mk diff --git a/keyboards/jj40/keymaps/oscillope/config.h b/keyboards/kprepublic/jj40/keymaps/oscillope/config.h similarity index 100% rename from keyboards/jj40/keymaps/oscillope/config.h rename to keyboards/kprepublic/jj40/keymaps/oscillope/config.h diff --git a/keyboards/jj40/keymaps/oscillope/keymap.c b/keyboards/kprepublic/jj40/keymaps/oscillope/keymap.c similarity index 100% rename from keyboards/jj40/keymaps/oscillope/keymap.c rename to keyboards/kprepublic/jj40/keymaps/oscillope/keymap.c diff --git a/keyboards/kprepublic/jj40/keymaps/oscillope/rules.mk b/keyboards/kprepublic/jj40/keymaps/oscillope/rules.mk new file mode 100644 index 000000000..8cf85a5d6 --- /dev/null +++ b/keyboards/kprepublic/jj40/keymaps/oscillope/rules.mk @@ -0,0 +1,11 @@ +# build options +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes + +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no + +KEY_LOCK_ENABLE = yes diff --git a/keyboards/kprepublic/jj40/keymaps/skewwhiffy/keymap.c b/keyboards/kprepublic/jj40/keymaps/skewwhiffy/keymap.c new file mode 100644 index 000000000..e6eef65d5 --- /dev/null +++ b/keyboards/kprepublic/jj40/keymaps/skewwhiffy/keymap.c @@ -0,0 +1,219 @@ +/* Copyright 2017 Kenny Hung + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "keymap_uk.h" + +// Layer shorthand +enum Layers { + cm, // colemak + dv, // dvorak + qw, // qwerty + nbl, // numbers left + nbr, // numbers right + syl, // symbols left + syr, // symbols right + nal, // navigation left + nar // navigation right +}; + +// Layer buttons +#define _Z_SFT SFT_T(UK_Z) +#define _SCLSH SFT_T(UK_SCLN) +#define _SLSH SFT_T(UK_SLSH) + +#define _X_NB LT(nbl, UK_X) +#define _Q_NB LT(nbl, UK_Q) +#define _DOT_NB LT(nbr, UK_DOT) +#define _V_NB LT(nbr, UK_V) +#define __NBL LT(nbl, _______) +#define __NBR LT(nbr, _______) + +#define _C_SY LT(syl, UK_C) +#define _J_SY LT(syl, UK_J) +#define _W_SY LT(syr, UK_W) +#define _COM_SY LT(syr, UK_COMM) +#define __SYL LT(syl, _______) +#define __SYR LT(syr, _______) + +#define _V_NAL LT(nal, UK_V) +#define _K_NAL LT(nal, UK_K) +#define _M_NAR LT(nar, UK_M) +#define __NAL LT(nal, _______) +#define __NAR LT(nar, _______) + +// Custom hotkeys +#define _TERM LCTL(UK_QUOT) // Hotkey for terminal +#define _S_TAB S(KC_TAB) +#define _C_LEFT LCTL(KC_LEFT) +#define _C_RGHT LCTL(KC_RGHT) +#define _A_LEFT LALT(KC_LEFT) +#define _A_RGHT LALT(KC_RGHT) + +// Custom hotkeys +#define _TERM LCTL(UK_QUOT) // Hotkey for terminal +#define _S_TAB S(KC_TAB) +#define _C_LEFT LCTL(KC_LEFT) +#define _C_RGHT LCTL(KC_RGHT) +#define _A_LEFT LALT(KC_LEFT) +#define _A_RGHT LALT(KC_RGHT) + +enum custom_keycodes { + IJ_OMN = SAFE_RANGE // IntelliJ Omnibox +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak + * .-----------------------------------------------------------------------------------------------------------. + * | Q | W | F | P | G | | | J | L | U | Y | ; | + * |-----------------------------------------------------------------------------------------------------------| + * | A | R | S | T | D | | | H | N | E | I | O | + * |-----------------------------------------------------------------------------------------------------------| + * | Z | X | C | V | B | | | K | M | , | . | / | + * | SHIFT | NUMBER | SYMBOL | NAV | | | | | NAV | SYMBOL | FUNC | SHIFT | + * |-----------------------------------------------------------------------------------------------------------| + * | LSHIFT | LCTRL | LALT | LGUI | SPACE | ENT | DEL | BKSPC | RGUI | RALT | RCTRL | RSHIFT | + * .-----------------------------------------------------------------------------------------------------------. + */ + [cm] = LAYOUT_ortho_4x12( \ + UK_Q, UK_W, UK_F, UK_P, UK_G, _______, _______, UK_J, UK_L, UK_U, UK_Y, UK_SCLN, \ + UK_A, UK_R, UK_S, UK_T, UK_D, _______, _______, UK_H, UK_N, UK_E, UK_I, UK_O, \ + _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, UK_K, _M_NAR, _COM_SY, _DOT_NB, _SLSH, \ + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_ENT, KC_DEL, KC_BSPC, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT \ + ), + +/* Dvorak + * .-----------------------------------------------------------------------------------------------------------. + * | ' | , | . | P | Y | | | F | G | C | R | L | + * |-----------------------------------------------------------------------------------------------------------| + * | A | O | E | U | I | | | D | H | T | N | S | + * |-----------------------------------------------------------------------------------------------------------| + * | ; | Q | J | K | X | | | B | M | W | V | Z | + * | SHIFT | NUMBER | SYMBOL | NAV | | | | | NAV | SYMBOL | FUNC | SHIFT | + * |-----------------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------------------------| + */ + [dv] = LAYOUT_ortho_4x12( \ + UK_QUOT, UK_COMM, UK_DOT, UK_P, UK_Y, _______, _______, UK_F, UK_G, UK_C, UK_R, UK_L, \ + UK_A, UK_O, UK_E, UK_U, UK_I, _______, _______, UK_D, UK_H, UK_T, UK_N, UK_S, \ + _SCLSH, _Q_NB, _J_SY, _K_NAL, UK_X, _______, _______, UK_B, _M_NAR, _W_SY, _V_NB, _Z_SFT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +/* QWERTY + * .-----------------------------------------------------------------------------------------------------------. + * | Q | W | E | R | T | | | Y | U | I | O | P | + * |-----------------------------------------------------------------------------------------------------------| + * | A | S | D | F | G | | | H | J | K | L | ; | + * |-----------------------------------------------------------------------------------------------------------| + * | Z | X | C | V | B | | | N | M | , | . | / | + * | SHIFT | NUMBER | SYMBOL | NAV | | | | | NAV | SYMBOL | FUNC | SHIFT | + * |-----------------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | + * .-----------------------------------------------------------------------------------------------------------. + */ + [qw] = LAYOUT_ortho_4x12( \ + UK_Q, UK_W, UK_E, UK_R, UK_T, _______, _______, UK_Y, UK_U, UK_I, UK_O, UK_P, \ + UK_A, UK_S, UK_D, UK_F, UK_G, _______, _______, UK_H, UK_J, UK_K, UK_L, UK_SCLN, \ + _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, UK_N, _M_NAR, _COM_SY, _DOT_NB, _SLSH, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +/* Numbers _NB + * .-----------------------------------------------------------------------------------------------------------. + * | | F7 | F8 | F9 | F10 | | | | 7 | 8 | 9 | | + * |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F4 | F5 | F6 | F11 | | | | 4 | 5 | 6 | | + * |-----------------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | F1 | F2 | F3 | F12 | | | 0 | 1 | 2 | 3 | . | + * |-----------------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [nbl] = LAYOUT_ortho_4x12( \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, UK_7, UK_8, UK_9, _______, \ + _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, _______, _______, UK_4, UK_5, UK_6, _______, \ + _______, __NBL, KC_F2, KC_F3, KC_F12, _______, _______, UK_0, UK_1, UK_2, UK_3, UK_DOT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [nbr] = LAYOUT_ortho_4x12( \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, UK_7, UK_8, UK_9, _______, \ + _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, _______, _______, UK_4, UK_5, UK_6, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, _______, UK_0, UK_1, UK_2, __NBR, UK_DOT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +/* Symbols _SY + * .-----------------------------------------------------------------------------------------------------------. + * | ! | £ | _ | - | ~ | | | \ | { | } | / | # | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | $ | % | + | = | | | | " | ( | ) | ' | @ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ^ | & | * | | | | | | < | [ | ] | > | ` | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [syl] = LAYOUT_ortho_4x12( \ + UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, \ + UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT, \ + UK_CIRC, UK_AMPR, __SYL, UK_PIPE, _______, _______, _______, UK_LABK, UK_LBRC, UK_RBRC, UK_RABK, UK_GRV, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [syr] = LAYOUT_ortho_4x12( \ + UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, \ + UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT, \ + UK_CIRC, UK_AMPR, UK_ASTR, UK_PIPE, _______, _______, _______, UK_LABK, UK_LBRC, __SYR, UK_RABK, UK_GRV, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +/* + * Navigation + * .-----------------------------------------------------------------------------------------------------------. + * | Esc | Ctrl L | Up | Ctrl R | RGB RMD| RGB HD | RGB HI | RGB_TG | PtSn | ScLk | Pause | DVORAK | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Tab | Left | Down | Right | RGB MD | RGB SD | RGB SI | COLEMAK| Insert | Home | PgUp | Term | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ShTab | Alt L | IJ Omni| Alt R | | RGB VD | RGB VI | | ScLk | End | PgDn | QWERTY | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [nal] = LAYOUT_ortho_4x12( \ + KC_ESC, _C_LEFT, KC_UP, _C_RGHT, RGB_RMOD,RGB_HUD, RGB_HUI, RGB_TOG, KC_PSCR, KC_SLCK, KC_PAUS, DF(dv), \ + KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, RGB_MOD, RGB_SAD, RGB_SAI, DF(cm), KC_INS, KC_HOME, KC_PGUP, _TERM, \ + _S_TAB, _A_LEFT, IJ_OMN, __NAL, _______, RGB_VAD, RGB_VAI, _______, KC_SLCK, KC_END, KC_PGDN, DF(qw), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [nar] = LAYOUT_ortho_4x12( \ + KC_ESC, _C_LEFT, KC_UP, _C_RGHT, RGB_RMOD,RGB_HUD, RGB_HUI, RGB_TOG, KC_PSCR, KC_SLCK, KC_PAUS, DF(dv), \ + KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, RGB_MOD, RGB_SAD, RGB_SAI, DF(cm), KC_INS, KC_HOME, KC_PGUP, _TERM, \ + _S_TAB, _A_LEFT, IJ_OMN, _A_RGHT, _______, RGB_VAD, RGB_VAI, _______, __NAR, KC_END, KC_PGDN, DF(qw), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case IJ_OMN: + SEND_STRING(SS_TAP(X_LSHIFT)SS_TAP(X_LSHIFT)); + return false; + } + } + return true; +} diff --git a/keyboards/jj40/keymaps/stevexyz/config.h b/keyboards/kprepublic/jj40/keymaps/stevexyz/config.h similarity index 100% rename from keyboards/jj40/keymaps/stevexyz/config.h rename to keyboards/kprepublic/jj40/keymaps/stevexyz/config.h diff --git a/keyboards/jj40/keymaps/stevexyz/keymap.c b/keyboards/kprepublic/jj40/keymaps/stevexyz/keymap.c similarity index 100% rename from keyboards/jj40/keymaps/stevexyz/keymap.c rename to keyboards/kprepublic/jj40/keymaps/stevexyz/keymap.c diff --git a/keyboards/jj40/keymaps/stevexyz/readme.md b/keyboards/kprepublic/jj40/keymaps/stevexyz/readme.md similarity index 100% rename from keyboards/jj40/keymaps/stevexyz/readme.md rename to keyboards/kprepublic/jj40/keymaps/stevexyz/readme.md diff --git a/keyboards/kprepublic/jj40/keymaps/stevexyz/rules.mk b/keyboards/kprepublic/jj40/keymaps/stevexyz/rules.mk new file mode 100644 index 000000000..b9152e31f --- /dev/null +++ b/keyboards/kprepublic/jj40/keymaps/stevexyz/rules.mk @@ -0,0 +1,19 @@ +# Build Options (yes/no) +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # USB Nkey Rollover (see: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work) +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +TAP_DANCE_ENABLE = yes + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/jj40/keymaps/suzuken/config.h b/keyboards/kprepublic/jj40/keymaps/suzuken/config.h similarity index 100% rename from keyboards/jj40/keymaps/suzuken/config.h rename to keyboards/kprepublic/jj40/keymaps/suzuken/config.h diff --git a/keyboards/jj40/keymaps/suzuken/keymap.c b/keyboards/kprepublic/jj40/keymaps/suzuken/keymap.c similarity index 100% rename from keyboards/jj40/keymaps/suzuken/keymap.c rename to keyboards/kprepublic/jj40/keymaps/suzuken/keymap.c diff --git a/keyboards/jj40/keymaps/via/keymap.c b/keyboards/kprepublic/jj40/keymaps/via/keymap.c similarity index 100% rename from keyboards/jj40/keymaps/via/keymap.c rename to keyboards/kprepublic/jj40/keymaps/via/keymap.c diff --git a/keyboards/jj40/keymaps/via/rules.mk b/keyboards/kprepublic/jj40/keymaps/via/rules.mk similarity index 100% rename from keyboards/jj40/keymaps/via/rules.mk rename to keyboards/kprepublic/jj40/keymaps/via/rules.mk diff --git a/keyboards/jj40/keymaps/waples/config.h b/keyboards/kprepublic/jj40/keymaps/waples/config.h similarity index 100% rename from keyboards/jj40/keymaps/waples/config.h rename to keyboards/kprepublic/jj40/keymaps/waples/config.h diff --git a/keyboards/jj40/keymaps/waples/keymap.c b/keyboards/kprepublic/jj40/keymaps/waples/keymap.c similarity index 100% rename from keyboards/jj40/keymaps/waples/keymap.c rename to keyboards/kprepublic/jj40/keymaps/waples/keymap.c diff --git a/keyboards/jj40/keymaps/waples/readme.md b/keyboards/kprepublic/jj40/keymaps/waples/readme.md similarity index 100% rename from keyboards/jj40/keymaps/waples/readme.md rename to keyboards/kprepublic/jj40/keymaps/waples/readme.md diff --git a/keyboards/kprepublic/jj40/keymaps/waples/rules.mk b/keyboards/kprepublic/jj40/keymaps/waples/rules.mk new file mode 100644 index 000000000..e75ff3b8b --- /dev/null +++ b/keyboards/kprepublic/jj40/keymaps/waples/rules.mk @@ -0,0 +1,10 @@ +# build options +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes +KEY_LOCK_ENABLE = yes diff --git a/keyboards/kprepublic/jj40/readme.md b/keyboards/kprepublic/jj40/readme.md new file mode 100644 index 000000000..06ca2e657 --- /dev/null +++ b/keyboards/kprepublic/jj40/readme.md @@ -0,0 +1,21 @@ +# jj40 + +![jj40](https://ae01.alicdn.com/kf/HTB18bq6bOERMeJjSspiq6zZLFXar.jpg?size=359506&height=562&width=750&hash=663a22d0109e2416ec8f54a7658686da) + +A compact 40% (12x4) ortholinear keyboard kit made and KPRepublic on AliExpress. + +* Keyboard Maintainer: [QMK Community](https://github.com/qmk) +* Hardware Supported: Atmega32A +* Hardware Availability: [AliExpress](https://www.aliexpress.com/store/product/jj40-Custom-Mechanical-Keyboard-40-PCB-programmed-40-planck-layouts-bface-firmware-gh40/3034003_32828781103.html) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/jj40:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make kprepublic/jj40:default:flash + +**Reset Key**: Hold down the *Top Right Key* key, commonly programmed as *Backspace* while plugging in the keyboard. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/jj40/rules.mk b/keyboards/kprepublic/jj40/rules.mk new file mode 100644 index 000000000..f288ed8cf --- /dev/null +++ b/keyboards/kprepublic/jj40/rules.mk @@ -0,0 +1,36 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +WS2812_DRIVER = i2c +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +LAYOUTS = ortho_4x12 planck_mit + +# Disable unsupported hardware +AUDIO_SUPPORTED = no diff --git a/keyboards/jj4x4/config.h b/keyboards/kprepublic/jj4x4/config.h similarity index 100% rename from keyboards/jj4x4/config.h rename to keyboards/kprepublic/jj4x4/config.h diff --git a/keyboards/jj4x4/info.json b/keyboards/kprepublic/jj4x4/info.json similarity index 100% rename from keyboards/jj4x4/info.json rename to keyboards/kprepublic/jj4x4/info.json diff --git a/keyboards/jj4x4/jj4x4.c b/keyboards/kprepublic/jj4x4/jj4x4.c similarity index 100% rename from keyboards/jj4x4/jj4x4.c rename to keyboards/kprepublic/jj4x4/jj4x4.c diff --git a/keyboards/jj4x4/jj4x4.h b/keyboards/kprepublic/jj4x4/jj4x4.h similarity index 100% rename from keyboards/jj4x4/jj4x4.h rename to keyboards/kprepublic/jj4x4/jj4x4.h diff --git a/keyboards/jj4x4/keymaps/default/keymap.c b/keyboards/kprepublic/jj4x4/keymaps/default/keymap.c similarity index 100% rename from keyboards/jj4x4/keymaps/default/keymap.c rename to keyboards/kprepublic/jj4x4/keymaps/default/keymap.c diff --git a/keyboards/jj4x4/keymaps/via/keymap.c b/keyboards/kprepublic/jj4x4/keymaps/via/keymap.c similarity index 100% rename from keyboards/jj4x4/keymaps/via/keymap.c rename to keyboards/kprepublic/jj4x4/keymaps/via/keymap.c diff --git a/keyboards/xd84/keymaps/via/rules.mk b/keyboards/kprepublic/jj4x4/keymaps/via/rules.mk similarity index 100% rename from keyboards/xd84/keymaps/via/rules.mk rename to keyboards/kprepublic/jj4x4/keymaps/via/rules.mk diff --git a/keyboards/kprepublic/jj4x4/readme.md b/keyboards/kprepublic/jj4x4/readme.md new file mode 100644 index 000000000..b6e586616 --- /dev/null +++ b/keyboards/kprepublic/jj4x4/readme.md @@ -0,0 +1,39 @@ +# JJ4x4 + +![jj4x4](https://cdn.shopify.com/s/files/1/2711/4238/products/JJ4x4case-1_1024x1024.jpg?v=1532325339) + +A 4x4 keypad kit made and KPRepublic on AliExpress. This is a chopped off version of the JJ40 with rearranged keys. + +* Keyboard Maintainer: [QMK Community](https://github.com/qmk) +* Hardware Supported: Atmega32A +* Hardware Availability: [AliExpress](https://www.aliexpress.com/item/jj4x4-jj4X4-16-keys-Custom-Mechanical-Keyboard-PCB-programmed-numpad-layouts-bface-firmware-with-rgb-bottom/32901955446.html) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/jj4x4:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make kprepublic/jj4x4:default:flash + +**Reset Key**: + +Hold down the key located at *K11*, commonly programmed as *8* while plugging in the keyboard USB cable. + +Key *K11* is in the above picture: + +Row 2 from the top, Column 2 from the left, see the schematic below: + +``` +,-----------------------. +| | | | | +|-----`-----`-----`-----| +| | K11 | | | +|-----`-----`-----`-----| +| | | | | +|-----`-----`-----`-----| +| | | | | +`-----`-----`-----`-----' +``` + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/jj4x4/rules.mk b/keyboards/kprepublic/jj4x4/rules.mk new file mode 100644 index 000000000..83fbd8987 --- /dev/null +++ b/keyboards/kprepublic/jj4x4/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +WS2812_DRIVER = i2c +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +LAYOUTS = ortho_4x4 diff --git a/keyboards/jj50/config.h b/keyboards/kprepublic/jj50/config.h similarity index 100% rename from keyboards/jj50/config.h rename to keyboards/kprepublic/jj50/config.h diff --git a/keyboards/jj50/info.json b/keyboards/kprepublic/jj50/info.json similarity index 100% rename from keyboards/jj50/info.json rename to keyboards/kprepublic/jj50/info.json diff --git a/keyboards/jj50/jj50.c b/keyboards/kprepublic/jj50/jj50.c similarity index 100% rename from keyboards/jj50/jj50.c rename to keyboards/kprepublic/jj50/jj50.c diff --git a/keyboards/jj50/jj50.h b/keyboards/kprepublic/jj50/jj50.h similarity index 100% rename from keyboards/jj50/jj50.h rename to keyboards/kprepublic/jj50/jj50.h diff --git a/keyboards/jj50/keymaps/abstractkb/config.h b/keyboards/kprepublic/jj50/keymaps/abstractkb/config.h similarity index 100% rename from keyboards/jj50/keymaps/abstractkb/config.h rename to keyboards/kprepublic/jj50/keymaps/abstractkb/config.h diff --git a/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c b/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c new file mode 100644 index 000000000..e25764936 --- /dev/null +++ b/keyboards/kprepublic/jj50/keymaps/abstractkb/keymap.c @@ -0,0 +1,135 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) +Modified 2019 AbstractKB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public LicensezZZ +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +enum layers { + _DEFLT, + _RAISE, + _LOWER, + _FN +}; + +enum custom_keycodes { + MYRGB_TG = SAFE_RANGE +}; + +bool rgbinit = true; +bool rgbon = true; + +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + led_set_user(host_keyboard_leds()); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (biton32(state)) { + case _RAISE: + rgblight_sethsv_noeeprom(170,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _LOWER: + rgblight_sethsv_noeeprom(0,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _FN: + rgblight_sethsv_noeeprom(0,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + break; + default: //_DEFLT + rgblight_sethsv_noeeprom(0,0,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + } + + return state; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<event.pressed) { + myrgb_toggle(); + } + return false; + default: + return true; + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DEFLT] = 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, \ + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + MO(_FN), KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER),KC_SPC,KC_SPC,MO(_RAISE),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + + [_RAISE] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LGUI(KC_LEFT)), LGUI(KC_L), LCTL(LGUI(KC_RGHT)), _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_CAPS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + + [_LOWER] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, KC_GRV, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_BSLS, _______, \ + _______, _______, _______, KC_LBRC, KC_RBRC, S(KC_9),S(KC_0),S(KC_LBRC),S(KC_RBRC),_______,_______,_______, \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + + [_FN] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MYRGB_TG \ + ) +}; diff --git a/keyboards/jj50/keymaps/abstractkb/readme.md b/keyboards/kprepublic/jj50/keymaps/abstractkb/readme.md similarity index 100% rename from keyboards/jj50/keymaps/abstractkb/readme.md rename to keyboards/kprepublic/jj50/keymaps/abstractkb/readme.md diff --git a/keyboards/jj50/keymaps/abstractkb_gergomatch/config.h b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/config.h similarity index 100% rename from keyboards/jj50/keymaps/abstractkb_gergomatch/config.h rename to keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/config.h diff --git a/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c new file mode 100644 index 000000000..baedbb4dd --- /dev/null +++ b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/keymap.c @@ -0,0 +1,135 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +Modified 2018 Wayne Jones (WarmCatUK) +Modified 2019 AbstractKB + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public LicensezZZ +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +enum layers { + _DEFLT, + _FUNC, + _SYM, + _META +}; + +enum custom_keycodes { + MYRGB_TG = SAFE_RANGE +}; + +bool rgbinit = true; +bool rgbon = true; + +const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {1,5,5}; //only using the first one + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + led_set_user(host_keyboard_leds()); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (biton32(state)) { + case _FUNC: + rgblight_sethsv_noeeprom(170,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _SYM: + rgblight_sethsv_noeeprom(0,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _META: + rgblight_sethsv_noeeprom(0,255,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); + break; + default: //_DEFLT + rgblight_sethsv_noeeprom(0,0,255); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + break; + } + + return state; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<event.pressed) { + myrgb_toggle(); + } + return false; + default: + return true; + } +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DEFLT] = 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, \ + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, MO(_META), KC_LGUI, KC_LALT, MO(_SYM),KC_SPC,KC_SPC,MO(_FUNC),KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + + [_FUNC] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LGUI(KC_LEFT)), LGUI(KC_L), LCTL(LGUI(KC_RGHT)), _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_CAPS, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + + [_SYM] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______,S(KC_1),S(KC_2),S(KC_LBRC),S(KC_RBRC),S(KC_BSLS),_______, S(KC_MINS), _______, _______, _______, _______, \ + _______, S(KC_3), S(KC_4), S(KC_9), S(KC_0), KC_GRV, S(KC_EQL), KC_MINS, KC_BSLS, S(KC_8), _______, _______, \ + _______, S(KC_5), S(KC_6), KC_LBRC,KC_RBRC,S(KC_GRV), S(KC_7),KC_EQL, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + + [_META] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MYRGB_TG \ + ) +}; diff --git a/keyboards/jj50/keymaps/abstractkb_gergomatch/readme.md b/keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/readme.md similarity index 100% rename from keyboards/jj50/keymaps/abstractkb_gergomatch/readme.md rename to keyboards/kprepublic/jj50/keymaps/abstractkb_gergomatch/readme.md diff --git a/keyboards/jj50/keymaps/archetype/README.md b/keyboards/kprepublic/jj50/keymaps/archetype/README.md similarity index 100% rename from keyboards/jj50/keymaps/archetype/README.md rename to keyboards/kprepublic/jj50/keymaps/archetype/README.md diff --git a/keyboards/jj50/keymaps/archetype/config.h b/keyboards/kprepublic/jj50/keymaps/archetype/config.h similarity index 100% rename from keyboards/jj50/keymaps/archetype/config.h rename to keyboards/kprepublic/jj50/keymaps/archetype/config.h diff --git a/keyboards/jj50/keymaps/archetype/keymap.c b/keyboards/kprepublic/jj50/keymaps/archetype/keymap.c similarity index 100% rename from keyboards/jj50/keymaps/archetype/keymap.c rename to keyboards/kprepublic/jj50/keymaps/archetype/keymap.c diff --git a/keyboards/jj50/keymaps/archetype/rules.mk b/keyboards/kprepublic/jj50/keymaps/archetype/rules.mk similarity index 100% rename from keyboards/jj50/keymaps/archetype/rules.mk rename to keyboards/kprepublic/jj50/keymaps/archetype/rules.mk diff --git a/keyboards/jj50/keymaps/default/README.md b/keyboards/kprepublic/jj50/keymaps/default/README.md similarity index 100% rename from keyboards/jj50/keymaps/default/README.md rename to keyboards/kprepublic/jj50/keymaps/default/README.md diff --git a/keyboards/jj50/keymaps/default/keymap.c b/keyboards/kprepublic/jj50/keymaps/default/keymap.c similarity index 100% rename from keyboards/jj50/keymaps/default/keymap.c rename to keyboards/kprepublic/jj50/keymaps/default/keymap.c diff --git a/keyboards/jj50/keymaps/yoonbae81/config.h b/keyboards/kprepublic/jj50/keymaps/yoonbae81/config.h similarity index 100% rename from keyboards/jj50/keymaps/yoonbae81/config.h rename to keyboards/kprepublic/jj50/keymaps/yoonbae81/config.h diff --git a/keyboards/jj50/keymaps/yoonbae81/keymap.c b/keyboards/kprepublic/jj50/keymaps/yoonbae81/keymap.c similarity index 100% rename from keyboards/jj50/keymaps/yoonbae81/keymap.c rename to keyboards/kprepublic/jj50/keymaps/yoonbae81/keymap.c diff --git a/keyboards/jj50/keymaps/yoonbae81/rules.mk b/keyboards/kprepublic/jj50/keymaps/yoonbae81/rules.mk similarity index 100% rename from keyboards/jj50/keymaps/yoonbae81/rules.mk rename to keyboards/kprepublic/jj50/keymaps/yoonbae81/rules.mk diff --git a/keyboards/kprepublic/jj50/readme.md b/keyboards/kprepublic/jj50/readme.md new file mode 100644 index 000000000..c34b5d8ee --- /dev/null +++ b/keyboards/kprepublic/jj50/readme.md @@ -0,0 +1,21 @@ +# JJ50 + +![JJ50 + SA Vilebloom (w/ Sakurios) by u/rendleshift](https://i.imgur.com/SwYZ4wol.jpg) + +A compact 50% (5x12) ortholinear keyboard made and sold by KPrepublic. + +* Keyboard Maintainer: [QMK Community](https://github.com/qmk) +* Hardware Supported: Atmega32A +* Hardware Availability: [AliExpress](https://www.aliexpress.com/item/jj50-v1-0-Custom-Mechanical-Keyboard-50-PCB-programmed-50-preonic-layouts-bface-firmware-with-rgb/32848915277.html); [KPrepublic](https://kprepublic.com/collections/jj50-50/products/jj50-50-custom-keyboard-pcb-similar-with-preonic) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/jj50:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make kprepublic/jj50:default:flash + +**Reset Key**: Hold down the key `Backspace` (`Key below the top right key`) while plugging in the keyboard. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/jj50/rules.mk b/keyboards/kprepublic/jj50/rules.mk new file mode 100644 index 000000000..b923675df --- /dev/null +++ b/keyboards/kprepublic/jj50/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality +WS2812_DRIVER = i2c # This driver powers the RGB Lighting and RGB Matrix features +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +LTO_ENABLE = yes # Enable link time optimization + +LAYOUTS = ortho_5x12 diff --git a/keyboards/ktec/daisy/config.h b/keyboards/ktec/daisy/config.h new file mode 100644 index 000000000..bf5210c0d --- /dev/null +++ b/keyboards/ktec/daisy/config.h @@ -0,0 +1,202 @@ +/* +Copyright 2020 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4B50 +#define PRODUCT_ID 0xD7DC +#define DEVICE_VER 0x0501 +#define MANUFACTURER KTEC +#define PRODUCT Daisy + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D2, D3, D5, B7 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6 } +#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 LED_CAPS_LOCK_PIN C6 +#define LED_PIN_ON_STATE 0 + +#define BACKLIGHT_PIN D0 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 6 + +#define RGB_DI_PIN C7 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 8 +# define RGBLIGHT_HUE_STEP 12 +# define RGBLIGHT_SAT_STEP 25 +# define RGBLIGHT_VAL_STEP 12 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +# define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP H +//#define MAGIC_KEY_HELP_ALT SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER0_ALT GRAVE +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER B +//#define MAGIC_KEY_BOOTLOADER_ALT ESC +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_EEPROM_CLEAR BSPACE +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* 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/keyboards/daisy/daisy.c b/keyboards/ktec/daisy/daisy.c similarity index 100% rename from keyboards/daisy/daisy.c rename to keyboards/ktec/daisy/daisy.c diff --git a/keyboards/daisy/daisy.h b/keyboards/ktec/daisy/daisy.h similarity index 100% rename from keyboards/daisy/daisy.h rename to keyboards/ktec/daisy/daisy.h diff --git a/keyboards/daisy/info.json b/keyboards/ktec/daisy/info.json similarity index 100% rename from keyboards/daisy/info.json rename to keyboards/ktec/daisy/info.json diff --git a/keyboards/daisy/keymaps/default/keymap.c b/keyboards/ktec/daisy/keymaps/default/keymap.c similarity index 100% rename from keyboards/daisy/keymaps/default/keymap.c rename to keyboards/ktec/daisy/keymaps/default/keymap.c diff --git a/keyboards/daisy/keymaps/default/readme.md b/keyboards/ktec/daisy/keymaps/default/readme.md similarity index 100% rename from keyboards/daisy/keymaps/default/readme.md rename to keyboards/ktec/daisy/keymaps/default/readme.md diff --git a/keyboards/daisy/keymaps/via/keymap.c b/keyboards/ktec/daisy/keymaps/via/keymap.c similarity index 100% rename from keyboards/daisy/keymaps/via/keymap.c rename to keyboards/ktec/daisy/keymaps/via/keymap.c diff --git a/keyboards/daisy/keymaps/via/readme.md b/keyboards/ktec/daisy/keymaps/via/readme.md similarity index 100% rename from keyboards/daisy/keymaps/via/readme.md rename to keyboards/ktec/daisy/keymaps/via/readme.md diff --git a/keyboards/daisy/keymaps/via/rules.mk b/keyboards/ktec/daisy/keymaps/via/rules.mk similarity index 100% rename from keyboards/daisy/keymaps/via/rules.mk rename to keyboards/ktec/daisy/keymaps/via/rules.mk diff --git a/keyboards/ktec/daisy/readme.md b/keyboards/ktec/daisy/readme.md new file mode 100644 index 000000000..b6a8e6012 --- /dev/null +++ b/keyboards/ktec/daisy/readme.md @@ -0,0 +1,15 @@ +# Daisy + +![Daisy PCB](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB1Pj1UggMPMeJjy1Xcq6xpppXa7_1024x1024.jpg) + +A 40% keyboard kit sold by KPrepublic. + +* Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) +* Hardware Supported: Daisy PCB Rev.1, Daisy PCB Rev.2 +* Hardware Availability: [KPrepublic](https://kprepublic.com/products/daisy-40-custom-keyboard-pcb) + +Make example for this keyboard (after setting up your build environment): + + make ktec/daisy:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ktec/daisy/rules.mk b/keyboards/ktec/daisy/rules.mk new file mode 100644 index 000000000..487c91915 --- /dev/null +++ b/keyboards/ktec/daisy/rules.mk @@ -0,0 +1,29 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ergodone/config.h b/keyboards/ktec/ergodone/config.h similarity index 100% rename from keyboards/ergodone/config.h rename to keyboards/ktec/ergodone/config.h diff --git a/keyboards/ergodone/ergodone.c b/keyboards/ktec/ergodone/ergodone.c similarity index 100% rename from keyboards/ergodone/ergodone.c rename to keyboards/ktec/ergodone/ergodone.c diff --git a/keyboards/ergodone/ergodone.h b/keyboards/ktec/ergodone/ergodone.h similarity index 100% rename from keyboards/ergodone/ergodone.h rename to keyboards/ktec/ergodone/ergodone.h diff --git a/keyboards/ergodone/expander.c b/keyboards/ktec/ergodone/expander.c similarity index 100% rename from keyboards/ergodone/expander.c rename to keyboards/ktec/ergodone/expander.c diff --git a/keyboards/ergodone/expander.h b/keyboards/ktec/ergodone/expander.h similarity index 100% rename from keyboards/ergodone/expander.h rename to keyboards/ktec/ergodone/expander.h diff --git a/keyboards/ergodone/i2cmaster.h b/keyboards/ktec/ergodone/i2cmaster.h similarity index 100% rename from keyboards/ergodone/i2cmaster.h rename to keyboards/ktec/ergodone/i2cmaster.h diff --git a/keyboards/ergodone/info.json b/keyboards/ktec/ergodone/info.json similarity index 100% rename from keyboards/ergodone/info.json rename to keyboards/ktec/ergodone/info.json diff --git a/keyboards/ergodone/keymaps/art/keymap.c b/keyboards/ktec/ergodone/keymaps/art/keymap.c similarity index 100% rename from keyboards/ergodone/keymaps/art/keymap.c rename to keyboards/ktec/ergodone/keymaps/art/keymap.c diff --git a/keyboards/ergodone/keymaps/default/keymap.c b/keyboards/ktec/ergodone/keymaps/default/keymap.c similarity index 100% rename from keyboards/ergodone/keymaps/default/keymap.c rename to keyboards/ktec/ergodone/keymaps/default/keymap.c diff --git a/keyboards/ergodone/keymaps/default/readme.md b/keyboards/ktec/ergodone/keymaps/default/readme.md similarity index 100% rename from keyboards/ergodone/keymaps/default/readme.md rename to keyboards/ktec/ergodone/keymaps/default/readme.md diff --git a/keyboards/ergodone/keymaps/eozaki/keymap.c b/keyboards/ktec/ergodone/keymaps/eozaki/keymap.c similarity index 100% rename from keyboards/ergodone/keymaps/eozaki/keymap.c rename to keyboards/ktec/ergodone/keymaps/eozaki/keymap.c diff --git a/keyboards/ergodone/keymaps/eozaki/readme.md b/keyboards/ktec/ergodone/keymaps/eozaki/readme.md similarity index 100% rename from keyboards/ergodone/keymaps/eozaki/readme.md rename to keyboards/ktec/ergodone/keymaps/eozaki/readme.md diff --git a/keyboards/ergodone/keymaps/erovia/config.h b/keyboards/ktec/ergodone/keymaps/erovia/config.h similarity index 100% rename from keyboards/ergodone/keymaps/erovia/config.h rename to keyboards/ktec/ergodone/keymaps/erovia/config.h diff --git a/keyboards/ktec/ergodone/keymaps/erovia/keymap.c b/keyboards/ktec/ergodone/keymaps/erovia/keymap.c new file mode 100644 index 000000000..279c8a57c --- /dev/null +++ b/keyboards/ktec/ergodone/keymaps/erovia/keymap.c @@ -0,0 +1,229 @@ +#include QMK_KEYBOARD_H +#include "version.h" +#include "bootmagic.h" + +#define QWERTY 0 // qwerty layer +#define COLEMAK 1 // colemak layer +#define FN 2 // function layer + +enum custom_keycodes { + QWRTY = SAFE_RANGE, // can always be here + CLMK, + VRSN, + FNCTN +}; + +/* false: Caps Lock LED is off + true: Caps Lock LED is on */ +bool CAPS_LED = false; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Qwerty layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Copy | | Paste| 6 | 7 | 8 | 9 | 0 | Sleep | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | Mute | | { | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | [ |------+------+------+------+------+--------| + * | Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| Fn1 | | } |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | ] | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCtrl | LGui | LAlt | Left | Right| | Down | Up | - | = | RCtrl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Caps | LGui | | Ins | Del | + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[QWERTY] = LAYOUT_ergodox( // layer 0 : qwerty + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_COPY, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MUTE, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, TT(FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_LEFT, KC_RGHT, + KC_CAPS, KC_LGUI, + KC_HOME, + KC_SPC, KC_BSPC, KC_END, + // right hand + KC_PASTE, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLEP, + KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOTE, + KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_DOWN, KC_UP, KC_MINS, KC_EQL, KC_RCTL, + KC_INS, KC_DEL, + KC_PGUP, + KC_PGDN, KC_TAB, KC_ENT +), +/* Keymap 1: Colemak layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Copy | | Paste| 6 | 7 | 8 | 9 | 0 | Sleep | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | F | P | B | Mute | | { | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | [ |------+------+------+------+------+--------| + * | Esc | A | R | S | T | G |------| |------| M | N | E | I | O | ' | + * |--------+------+------+------+------+------| Fn1 | | } |------+------+------+------+------+--------| + * | LShift | Z | X | C | D | V | | | ] | K | H | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCtrl | LGui | LAlt | Left | Right| | Down | Up | - | = | RCtrl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Caps | LGui | | Ins | Del | + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +[COLEMAK] = LAYOUT_ergodox( // layer 1 : colemak + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_COPY, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_MUTE, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_G, + KC_LSPO, KC_Z, KC_X, KC_C, KC_D, KC_V, TT(FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_LEFT, KC_RGHT, + KC_CAPS, KC_LGUI, + KC_HOME, + KC_SPC, KC_BSPC, KC_END, + // right hand + KC_PASTE, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLEP, + KC_LBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOTE, + KC_RBRC, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_DOWN, KC_UP, KC_MINS, KC_EQL, KC_RCTL, + KC_INS, KC_DEL, + KC_PGUP, + KC_PGDN, KC_TAB, KC_ENT +), +/* Keymap 2: Function Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | | | Prev | Play | Next | | | | | | | | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | |VolDn | VolUp|------| |------| |QWRTY | CLMK | | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// Functions +[FN] = LAYOUT_ergodox( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_F12, 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, QWRTY, CLMK, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case QWRTY: + if (record->event.pressed) { + set_single_persistent_default_layer(QWERTY); + } + return false; + break; + case CLMK: + if (record->event.pressed) { + set_single_persistent_default_layer(COLEMAK); + } + return false; + break; + case KC_CAPS: + if (record->event.pressed) { + // Turn LED1 On/Off for Caps Lock + if (CAPS_LED) { + ergodox_right_led_1_off(); + CAPS_LED = false; + } else { + ergodox_right_led_1_on(); + CAPS_LED = true; + } + } + return true; + break; + } + return true; +}; + +// Set LED according to the default layer +void default_layer_led_set(void) { + switch (biton32(eeconfig_read_default_layer())) { + case COLEMAK: + // LED2 for COLEMAK + ergodox_right_led_2_on(); + break; + case QWERTY: + // LED3 for QWERTY + ergodox_right_led_3_on(); + break; + }; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + default_layer_led_set(); +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + ergodox_led_all_off(); + switch (biton32(state)) { + case FN: + // Red led on Pro Micro for Fn layer + ergodox_board_led_on(); + break; + }; + + if (CAPS_LED) { + ergodox_right_led_1_on(); + } + + default_layer_led_set(); + + return state; +}; + +void suspend_power_down_user(void) { + ergodox_led_all_off(); +}; + +void suspend_wakeup_init_user(void) { + default_layer_led_set(); +}; diff --git a/keyboards/ergodone/keymaps/erovia/readme.md b/keyboards/ktec/ergodone/keymaps/erovia/readme.md similarity index 100% rename from keyboards/ergodone/keymaps/erovia/readme.md rename to keyboards/ktec/ergodone/keymaps/erovia/readme.md diff --git a/keyboards/ergodone/keymaps/erovia/rules.mk b/keyboards/ktec/ergodone/keymaps/erovia/rules.mk similarity index 100% rename from keyboards/ergodone/keymaps/erovia/rules.mk rename to keyboards/ktec/ergodone/keymaps/erovia/rules.mk diff --git a/keyboards/ergodone/keymaps/kloki/keymap.c b/keyboards/ktec/ergodone/keymaps/kloki/keymap.c similarity index 100% rename from keyboards/ergodone/keymaps/kloki/keymap.c rename to keyboards/ktec/ergodone/keymaps/kloki/keymap.c diff --git a/keyboards/ergodone/keymaps/kloki/readme.md b/keyboards/ktec/ergodone/keymaps/kloki/readme.md similarity index 100% rename from keyboards/ergodone/keymaps/kloki/readme.md rename to keyboards/ktec/ergodone/keymaps/kloki/readme.md diff --git a/keyboards/ergodone/keymaps/vega/keymap.c b/keyboards/ktec/ergodone/keymaps/vega/keymap.c similarity index 100% rename from keyboards/ergodone/keymaps/vega/keymap.c rename to keyboards/ktec/ergodone/keymaps/vega/keymap.c diff --git a/keyboards/ergodone/keymaps/vega/rules.mk b/keyboards/ktec/ergodone/keymaps/vega/rules.mk similarity index 100% rename from keyboards/ergodone/keymaps/vega/rules.mk rename to keyboards/ktec/ergodone/keymaps/vega/rules.mk diff --git a/keyboards/ergodone/keymaps/via/config.h b/keyboards/ktec/ergodone/keymaps/via/config.h similarity index 100% rename from keyboards/ergodone/keymaps/via/config.h rename to keyboards/ktec/ergodone/keymaps/via/config.h diff --git a/keyboards/ergodone/keymaps/via/keymap.c b/keyboards/ktec/ergodone/keymaps/via/keymap.c similarity index 100% rename from keyboards/ergodone/keymaps/via/keymap.c rename to keyboards/ktec/ergodone/keymaps/via/keymap.c diff --git a/keyboards/ergodone/keymaps/via/readme.md b/keyboards/ktec/ergodone/keymaps/via/readme.md similarity index 100% rename from keyboards/ergodone/keymaps/via/readme.md rename to keyboards/ktec/ergodone/keymaps/via/readme.md diff --git a/keyboards/ergodone/keymaps/via/rules.mk b/keyboards/ktec/ergodone/keymaps/via/rules.mk similarity index 100% rename from keyboards/ergodone/keymaps/via/rules.mk rename to keyboards/ktec/ergodone/keymaps/via/rules.mk diff --git a/keyboards/ergodone/matrix.c b/keyboards/ktec/ergodone/matrix.c similarity index 100% rename from keyboards/ergodone/matrix.c rename to keyboards/ktec/ergodone/matrix.c diff --git a/keyboards/ktec/ergodone/readme.md b/keyboards/ktec/ergodone/readme.md new file mode 100644 index 000000000..7998a274f --- /dev/null +++ b/keyboards/ktec/ergodone/readme.md @@ -0,0 +1,28 @@ +# ErgoDone + +![ErgoDone](https://i.imgur.com/QERsQGQ.jpg) + +The ErgoDone is a modified version of the ErgoDox, made by K.T.E.C., with pre-soldered components. It has different wiring and uses a SparkFun Pro Micro instead of Teensy. + +- Keyboard maintainer: [Yu He](http://github.com/yuhe00) +- Hardware supported: + - ErgoDone v1.3 (tested) +- Hardware availability: + - [AliExpress](https://www.aliexpress.com/store/product/ergodone-Custom-Mechanical-Keyboard-TKG-TOOLS-PCB-programmed-Ergonomic-Keyboard-Kit-similar-with-infinity-ergodox/3034003_32830050940.html) + - [KBDfans](https://kbdfans.myshopify.com/collections/pcb/products/ergodone-keyboard-pcb-1pcs-free-shipping) + +Make example for this keyboard (after setting up your build environment): + + make ktec/ergodone: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). + +## Flashing the firmware onto the keyboard + +The ErgoDone uses a customized HID bootloader rather than the Teensy one. It doesn't need an OS driver, and the required actions before flashing are a little different than with an ErgoDox. + +1. To enter flash mode, disconnect the keyboard first. Then, on the left-hand device, in the top row, press and hold the two rightmost keys while reconnecting the keyboard. +![Ergodone Flash Mode](https://i.imgur.com/sNivAnr.jpg) +2. To flash the .hex file, use the `hid_bootloader_cli` utlity from the [TKG Toolkit](https://github.com/kairyu/tkg-toolkit) (as of 2017-10-03, only [this old version](https://github.com/kairyu/tkg-toolkit/blob/b14c67ca8bc84c07e5fc6b2e01ae4002b808243a/windows/bin/hid_bootloader_cli.exe) works under Windows): + + hid_bootloader_cli -mmcu=atmega32u4 ergodone_default.hex diff --git a/keyboards/ktec/ergodone/rules.mk b/keyboards/ktec/ergodone/rules.mk new file mode 100644 index 000000000..7b88a1419 --- /dev/null +++ b/keyboards/ktec/ergodone/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDone +UNICODE_ENABLE = yes # Unicode +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA +USB_6KRO_ENABLE = no # USB 6key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +SWAP_HANDS_ENABLE = no # Disable Onehand +RGBLIGHT_ENABLE = no + +# project specific files +SRC = \ + twimaster.c \ + matrix.c \ + expander.c \ + +LAYOUTS = ergodox diff --git a/keyboards/ergodone/twimaster.c b/keyboards/ktec/ergodone/twimaster.c similarity index 100% rename from keyboards/ergodone/twimaster.c rename to keyboards/ktec/ergodone/twimaster.c diff --git a/keyboards/staryu/backlight_staryu.h b/keyboards/ktec/staryu/backlight_staryu.h similarity index 100% rename from keyboards/staryu/backlight_staryu.h rename to keyboards/ktec/staryu/backlight_staryu.h diff --git a/keyboards/staryu/config.h b/keyboards/ktec/staryu/config.h similarity index 100% rename from keyboards/staryu/config.h rename to keyboards/ktec/staryu/config.h diff --git a/keyboards/staryu/info.json b/keyboards/ktec/staryu/info.json similarity index 100% rename from keyboards/staryu/info.json rename to keyboards/ktec/staryu/info.json diff --git a/keyboards/staryu/keymaps/default/README.md b/keyboards/ktec/staryu/keymaps/default/README.md similarity index 100% rename from keyboards/staryu/keymaps/default/README.md rename to keyboards/ktec/staryu/keymaps/default/README.md diff --git a/keyboards/staryu/keymaps/default/keymap.c b/keyboards/ktec/staryu/keymaps/default/keymap.c similarity index 100% rename from keyboards/staryu/keymaps/default/keymap.c rename to keyboards/ktec/staryu/keymaps/default/keymap.c diff --git a/keyboards/staryu/keymaps/default/rules.mk b/keyboards/ktec/staryu/keymaps/default/rules.mk similarity index 100% rename from keyboards/staryu/keymaps/default/rules.mk rename to keyboards/ktec/staryu/keymaps/default/rules.mk diff --git a/keyboards/staryu/keymaps/krusli/README.md b/keyboards/ktec/staryu/keymaps/krusli/README.md similarity index 100% rename from keyboards/staryu/keymaps/krusli/README.md rename to keyboards/ktec/staryu/keymaps/krusli/README.md diff --git a/keyboards/staryu/keymaps/krusli/keymap.c b/keyboards/ktec/staryu/keymaps/krusli/keymap.c similarity index 100% rename from keyboards/staryu/keymaps/krusli/keymap.c rename to keyboards/ktec/staryu/keymaps/krusli/keymap.c diff --git a/keyboards/ktec/staryu/readme.md b/keyboards/ktec/staryu/readme.md new file mode 100644 index 000000000..f0d019de2 --- /dev/null +++ b/keyboards/ktec/staryu/readme.md @@ -0,0 +1,15 @@ +# Staryu + +![Staryu](https://i.imgur.com/obcCpZN.jpg) + +A 5 key macropad, designed by Kai and sold by KPRepublic. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: Staryu (only the non-lite version has been tested) +* Hardware Availability: [AliExpress](https://www.aliexpress.com/item/Staryu-Mini-Macro-Pad-custom-keyboard-by-tkg-kai-Mini-macro-pad-mechanical-keyboard-5-keys/32817560746.html) + +Make example for this keyboard (after setting up your build environment): + + make ktec/staryu:default + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/ktec/staryu/rules.mk b/keyboards/ktec/staryu/rules.mk new file mode 100755 index 000000000..697a58ff7 --- /dev/null +++ b/keyboards/ktec/staryu/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = lufa-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/staryu/staryu.c b/keyboards/ktec/staryu/staryu.c similarity index 100% rename from keyboards/staryu/staryu.c rename to keyboards/ktec/staryu/staryu.c diff --git a/keyboards/staryu/staryu.h b/keyboards/ktec/staryu/staryu.h similarity index 100% rename from keyboards/staryu/staryu.h rename to keyboards/ktec/staryu/staryu.h diff --git a/keyboards/kudox/rules.mk b/keyboards/kudox/rules.mk index bc8b8ae42..05fafb7b5 100644 --- a/keyboards/kudox/rules.mk +++ b/keyboards/kudox/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kudox_game/rules.mk b/keyboards/kudox_game/rules.mk index 8f217cde0..7ccaff5cd 100644 --- a/keyboards/kudox_game/rules.mk +++ b/keyboards/kudox_game/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kv/revt/rules.mk b/keyboards/kv/revt/rules.mk index 7d2acfcd0..10425b2ac 100644 --- a/keyboards/kv/revt/rules.mk +++ b/keyboards/kv/revt/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -19,6 +19,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/kwub/bloop/rules.mk b/keyboards/kwub/bloop/rules.mk index 32981133b..efca6bac6 100644 --- a/keyboards/kwub/bloop/rules.mk +++ b/keyboards/kwub/bloop/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ky01/rules.mk b/keyboards/ky01/rules.mk index 000f55911..b8a6e331c 100644 --- a/keyboards/ky01/rules.mk +++ b/keyboards/ky01/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/kyria/keymaps/asapjockey/config.h b/keyboards/kyria/keymaps/asapjockey/config.h deleted file mode 100644 index e878663bf..000000000 --- a/keyboards/kyria/keymaps/asapjockey/config.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_SLEEP -#endif - -// EC11K encoders have a different resolution than other EC11 encoders. -// When using the default resolution of 4, if you notice your encoder skipping -// every other tick, lower the resolution to 2. -#define ENCODER_RESOLUTION 2 - -// The Leader key allows to flexibly assign macros to key sequences. -#define LEADER_PER_KEY_TIMING -#define LEADER_TIMEOUT 350 - -#define TAPPING_TERM 200 - -// Allows to use either side as the master. Look at the documentation for info: -// https://docs.qmk.fm/#/config_options?id=setting-handedness -#define EE_HANDS - -// Allows media codes to properly register in macros and rotary encoder code -#define TAP_CODE_DELAY 10 \ No newline at end of file diff --git a/keyboards/kyria/keymaps/asapjockey/keymap.c b/keyboards/kyria/keymaps/asapjockey/keymap.c deleted file mode 100644 index 9d0d2955e..000000000 --- a/keyboards/kyria/keymaps/asapjockey/keymap.c +++ /dev/null @@ -1,313 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -enum layers { - QWERTY, - LOWER, - RAISE, - NAV, - ADJUST -}; - -enum custom_keycodes { - KC_LBR = SAFE_RANGE, - KC_RBR -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * Base Layer: QWERTY - * - * ,-------------------------------------------. ,-------------------------------------------. - * | TAB | Q | W | E | R | T | | Y | U | I | O | P | RCTL | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | LCTL | A | S | D | F | G | | H | J | K | L | ; : | ' " | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | LSFT | Z | X | C | V | B | Del | Raise| |Adjust| Esc | N | M | , < | . > | / ? | LSFT | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | LALT | | Bspc | Lower| | Enter| Space| [ { | ] } | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [QWERTY] = LAYOUT( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RCTL, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, MO(RAISE), MO(ADJUST), KC_ESC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, - XXXXXXX, KC_LALT, XXXXXXX, KC_BSPC, MO(LOWER), KC_ENT, KC_SPC, KC_LBR, KC_RBR, XXXXXXX - ), -/* - * Lower Layer: Numbers, functions, symbols - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | 1 ! | 2 @ | 3 # | 4 $ | 5 % | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | F1 | F2 | F3 | F4 | F5 | | | | | | F6 | F7 | F8 | F9 | F10 | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | ( | ) | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [LOWER] = LAYOUT( - _______, 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, _______ - ), -/* - * Raise Layer: Functions, Numbers - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | | F7 | F8 | F9 | | | | 7 & | 8 * | 9 ( | - _ | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | F4 | F5 | F6 | | | | 4 * | 5 % | 6 ^ | = + | RCTL | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | F1 | F2 | F3 | | | | | | | | 1 ! | 2 @ | 3 # | \ | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | 0 ) | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [RAISE] = LAYOUT( - _______, _______, KC_F7, KC_F8, KC_F9, _______, _______, KC_7, KC_8, KC_9, _______, _______, - _______, _______, KC_F4, KC_F5, KC_F6, _______, _______, KC_4, KC_5, KC_6, _______, KC_RCTL, - _______, _______, KC_F1, KC_F2, KC_F3, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______ - ), -/* - * Navigation Layer - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | | | | | | | | | Up | | | RGBTOG | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | | | | | | | Left | Down | Right| | RGBOFF | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | | RGBON | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | Reset|Debug | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [ADJUST] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, RGB_TOG, - _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, RGB_HUI, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, - _______, _______, _______, _______, _______, _______, _______, RESET, DEBUG, _______ - ), -// /* -// * Layer template -// * -// * ,-------------------------------------------. ,-------------------------------------------. -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | | | | | -// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' -// * | | | | | | | | | | | | -// * | | | | | | | | | | | | -// * `----------------------------------' `----------------------------------' -// */ -// [_LAYERINDEX] = LAYOUT( -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -// ), -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_LBR: { - if (record->event.pressed) { - if ((get_mods() & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { - register_code(KC_9); - } else { - register_code(KC_LBRC); - } - } else { // Release the key - if ((get_mods() & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { - unregister_code(KC_9); - } else { - unregister_code(KC_LBRC); - } - } - return false; - break; - } - case KC_RBR: { - if (record->event.pressed) { - if ((get_mods() & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { - register_code(KC_0); - } else { - register_code(KC_RBRC); - } - } else { // Release the key - if ((get_mods() & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { - unregister_code(KC_0); - } else { - unregister_code(KC_RBRC); - } - } - return false; - break; - } - } - return true; -} - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_ONE_KEY(KC_F) { // Shift + Ctrl + F - tap_code16(S(C(KC_F))); - } - } -} - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - -static void render_kyria_logo(void) { - static const char PROGMEM kyria_logo[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); -} - -static void render_qmk_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - - oled_write_P(qmk_logo, false); -} - -static void render_status(void) { - // QMK Logo and version information - render_qmk_logo(); - oled_write_P(PSTR(" Kyria rev1.0\n\n"), false); - - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (get_highest_layer(layer_state)) { - case QWERTY: - oled_write_P(PSTR("Default\n"), false); - break; - case LOWER: - oled_write_P(PSTR("Lower\n"), false); - break; - case RAISE: - oled_write_P(PSTR("Raise\n"), false); - break; - case NAV: - oled_write_P(PSTR("Navigation\n"), false); - break; - case ADJUST: - oled_write_P(PSTR("Adjust\n"), false); - break; - default: - oled_write_P(PSTR("Undefined\n"), false); - } - - // Host Keyboard LED Status - led_t led_state = host_keyboard_led_state(); - oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); - oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); - oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_kyria_logo(); - } -} -#endif - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - switch (get_highest_layer(layer_state)) { - case QWERTY: - if (clockwise) { // Ctrl + I - tap_code16(C(KC_I)); - } else { // Shift + F3 - tap_code16(S(KC_F3)); - } - break; - case LOWER: - // History scrubbing. For Adobe products, hold shift while moving - // backward to go forward instead. - if (clockwise) { - tap_code16(C(KC_Y)); - } else { - tap_code16(C(KC_Z)); - } - break; - case RAISE: - if (clockwise) { // Subscript: CTRL + = - tap_code16(C(KC_EQL)); - } - break; - default: - // Nothing - break; - } - } else if (index == 1) { - switch (get_highest_layer(layer_state)) { - case QWERTY: - // Scroll by letter horizontally - if (clockwise) { - tap_code16(KC_RGHT); - } else { - tap_code16(KC_LEFT); - } - case LOWER: - // Nothing - break; - case RAISE: - // Find previous/Find next - if (clockwise) { - tap_code(KC_F3); - } else { - tap_code16(S(KC_F3)); - } - default: - // Nothing - break; - } - } - return true; -} -#endif diff --git a/keyboards/kyria/keymaps/asapjockey/rules.mk b/keyboards/kyria/keymaps/asapjockey/rules.mk deleted file mode 100644 index 9b8e29419..000000000 --- a/keyboards/kyria/keymaps/asapjockey/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -LEADER_ENABLE = yes # Enable the Leader Key feature -MOUSEKEY_ENABLE = no diff --git a/keyboards/kyria/keymaps/benji/config.h b/keyboards/kyria/keymaps/benji/config.h deleted file mode 100644 index 442ecc605..000000000 --- a/keyboards/kyria/keymaps/benji/config.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 - #define OLED_FONT_H "keyboards/kyria/keymaps/benji/glcdfont.c" -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_LIMIT_VAL 150 -#endif - -// If you are using an Elite C rev3 on the slave side, uncomment the lines below: -// #define SPLIT_USB_DETECT -// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/kyria/keymaps/benji/keymap.c b/keyboards/kyria/keymaps/benji/keymap.c deleted file mode 100644 index 2e3e2b1cf..000000000 --- a/keyboards/kyria/keymaps/benji/keymap.c +++ /dev/null @@ -1,247 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -enum layers { - _QWERTY = 0, - _LOWER, - _RAISE, - _ADJUST -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * Base Layer: QWERTY - * - * ,-------------------------------------------. ,-------------------------------------------. - * |RAIS/ESC| Q | W | E | R | T | | Y | U | I | O | P | | \ | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * |Ctrl/BS | A | S | D | F | G | | H | J | K | L | ; : | ' " | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B |LShift|LShift| |LShift|LShift| N | M | , < | . > | / ? | - _ | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | GUI | Del | Enter| Space| Esc | | Enter| Space| Tab | Bksp | AltGr| - * | | | Alt | Lower| Raise| | Lower| Raise| | | | - * `----------------------------------' `----------------------------------' - */ - [_QWERTY] = LAYOUT( - LT(_RAISE, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, - MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LSFT, KC_LSFT, KC_LSFT, KC_LSFT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, - KC_LGUI, KC_DEL, MT(MOD_LALT, KC_ENT), LT(_LOWER, KC_SPC), KC_LGUI, LT(_LOWER, KC_ENT), LT(_RAISE, KC_SPC), KC_TAB, KC_BSPC, KC_RALT - ), - /* - * Lower Layer: Symbols - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | ! | @ | { | } | | | | | | | | | | \ | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` | | + | - | / | * | % | ' " | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | | | & | = | , | . | / ? | - _ | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | ; | = | | = | ; | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_LOWER] = LAYOUT( - _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, KC_BSLS, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, - _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, - _______, _______, _______, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, _______, _______, _______ - ), - /* - * Raise Layer: Number keys, media, navigation - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | Prev | Play | Next | VolUp| | Left | Down | Up | Right| | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | Mute | VolDn| | | | | | MLeft| Mdown| MUp |MRight| | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | |Mbtn1 |Mbtn2 |Mbtn3 | | | Mbtn4|Mbtn5 | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_RAISE] = LAYOUT( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, - _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, - _______, KC_BTN1, KC_BTN2, KC_BTN3, _______, KC_BTN4, KC_BTN5, _______, _______, _______ - ), - /* - * Adjust Layer: Function keys, RGB - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | TOG | SAI | HUI | VAI | MOD | | | | | F11 | F12 | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_ADJUST] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, - _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - // /* - // * Layer template - // * - // * ,-------------------------------------------. ,-------------------------------------------. - // * | | | | | | | | | | | | | | - // * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - // * | | | | | | | | | | | | | | - // * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - // * | | | | | | | | | | | | | | | | | | - // * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - // * | | | | | | | | | | | | - // * | | | | | | | | | | | | - // * `----------------------------------' `----------------------------------' - // */ - // [_LAYERINDEX] = LAYOUT( - // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - // ), -}; - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - -static void render_kyria_logo(void) { - static const char PROGMEM kyria_logo[] = { - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,48,24,108,244,130,194,193,25,125,119,97,1,193,226,178,52,44,24,48,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,64,64,192,64,64,64,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,136,24,48,56,28,221,193,156,62,127,127,127,62,156,193,221,156,14,6,4,140,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,64,64,64,64,64,64,64,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,48,76,230,243,253,254,252,190,255,223,255,255,159,158,254,249,243,230,76,48,192,0,0,0,0,0,0,0,0,0,1,6,12,26,22,38,35,65,64,67,119,95,76,65,33,32,23,27,12,6,1,0,0,0,0,0,0,0,0,0,0,192,48,12,6,3,1,0,192,224,240,248,252,254,255,224,128,0,1,3,6,12,48,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,96,130,7,15,7,3,2,6,13,255,255,255,7,2,2,3,7,7,7,131,96,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,96,128,0,0,0,127,255,255,255,255,255,255,255,255,227,99,62,0,0,128,96,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,6,4,8,9,19,17,17,19,17,19,18,10,8,4,6,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,6,4,8,8,17,17,17,17,17,17,17,8,8,4,6,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,96,48,152,72,228,52,34,10,74,74,58,178,50,116,228,200,24,176,96,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,96,48,152,200,228,228,242,242,242,242,242,242,242,228,228,200,152,48,96,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,1,0,0,192,240,248,248,248,248,184,152,140,204,249,231,255,191,159,223,6,1,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,1,0,63,127,249,240,240,241,251,159,191,159,251,241,240,240,249,127,63,0,1,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,12,24,49,39,79,79,143,143,143,143,149,149,149,67,65,33,49,24,12,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,12,24,48,32,64,71,159,135,159,135,159,135,159,135,159,71,64,32,48,24,12,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - - - -// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,232,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, -// 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, -// 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); -} - -static void render_qmk_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - - oled_write_P(qmk_logo, false); -} - -static void render_status(void) { - // QMK Logo and version information - //render_kyria_logo(); - render_qmk_logo(); - oled_write_P(PSTR("Kyria rev B3nJ.P0tt3r\n\n"), false); - - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (get_highest_layer(layer_state)) { - case _QWERTY: - oled_write_P(PSTR("Chandra\n"), false); - break; - case _LOWER: - oled_write_P(PSTR("Jace\n"), false); - break; - case _RAISE: - oled_write_P(PSTR("Karn\n"), false); - break; - case _ADJUST: - oled_write_P(PSTR("Teferi\n"), false); - break; - default: - oled_write_P(PSTR("Ashiok\n"), false); - } - - // Host Keyboard LED Status - led_t led_usb_state = host_keyboard_led_state(); - oled_write_P(led_usb_state.num_lock? PSTR("NUMLCK ") : PSTR(" "), false); - oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); - oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_kyria_logo(); - } -} -#endif - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - switch (get_highest_layer(layer_state)) { - case _RAISE: - // Volume control - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - break; - case _LOWER: - // Page up/Page down - if (clockwise) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - break; - case _QWERTY: - // Page up/Page down - if (clockwise) { - tap_code(KC_DOWN); - } else { - tap_code(KC_UP); - } - break; - default: - break; - - } - } - return true; -} -#endif diff --git a/keyboards/kyria/keymaps/benji/rules.mk b/keyboards/kyria/keymaps/benji/rules.mk deleted file mode 100644 index e3486a8a9..000000000 --- a/keyboards/kyria/keymaps/benji/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow \ No newline at end of file diff --git a/keyboards/kyria/keymaps/cjuniet/config.h b/keyboards/kyria/keymaps/cjuniet/config.h deleted file mode 100644 index d5d9c23bf..000000000 --- a/keyboards/kyria/keymaps/cjuniet/config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 - #define OLED_FONT_H "users/cjuniet/glcdfont.c" -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_SLEEP -#endif - -#define EE_HANDS - -#define LEADER_PER_KEY_TIMING -#define LEADER_TIMEOUT 250 - -#define TAPPING_TOGGLE 2 diff --git a/keyboards/kyria/keymaps/cjuniet/rules.mk b/keyboards/kyria/keymaps/cjuniet/rules.mk deleted file mode 100644 index 9699ed810..000000000 --- a/keyboards/kyria/keymaps/cjuniet/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -ENCODER_ENABLE = no -EXTRAKEY_ENABLE = yes -LEADER_ENABLE = yes -MOUSEKEY_ENABLE = yes -OLED_DRIVER_ENABLE = yes -RGBLIGHT_ENABLE = no diff --git a/keyboards/kyria/keymaps/corodiak/config.h b/keyboards/kyria/keymaps/corodiak/config.h deleted file mode 100644 index eed94d055..000000000 --- a/keyboards/kyria/keymaps/corodiak/config.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 -#endif - -// The Leader key allows to flexibly assign macros to key sequences. -#define LEADER_PER_KEY_TIMING -#define LEADER_TIMEOUT 350 - -#define TAPPING_TERM 200 - -// Turn off on slave -#define WAIT_FOR_USB - -// If you are using an Elite C rev3 on the slave side, uncomment the lines below: -#define SPLIT_USB_DETECT -#define NO_USB_STARTUP_CHECK - -// Allows to use either side as the master. Look at the documentation for info: -// https://docs.qmk.fm/#/config_options?id=setting-handedness -#define EE_HANDS diff --git a/keyboards/kyria/keymaps/corodiak/rules.mk b/keyboards/kyria/keymaps/corodiak/rules.mk deleted file mode 100644 index da64c4ea5..000000000 --- a/keyboards/kyria/keymaps/corodiak/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -# OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -# ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -LEADER_ENABLE = yes # Enables the Leader shortcut funtionality diff --git a/keyboards/kyria/keymaps/cwebster2/config.h b/keyboards/kyria/keymaps/cwebster2/config.h deleted file mode 100644 index 6a56d7ee9..000000000 --- a/keyboards/kyria/keymaps/cwebster2/config.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright 2020 Casey Webster - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE - //#define RGBLIGHT_ANIMATIONS - //#define RGBLIGHT_EFFECT_ALTERNATING - #define RGBLIGHT_EFFECT_BREATHING - //#define RGBLIGHT_EFFECT_CHRISTMAS - //#define RGBLIGHT_EFFECT_KNIGHT - //#define RGBLIGHT_EFFECT_RAINBOW_MOOD - //#define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_RGB_TEST - //#define RGBLIGHT_EFFECT_SNAKE - //#define RGBLIGHT_EFFECT_STATIC_GRADIENT - //#define RGBLIGHT_EFFECT_TWINKLE - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_SLEEP - #define RGBLIGHT_LIMIT_VAL 128 - #define RGBLIGHT_EFFECT_BREATHE_MAX 128 - #define RGBLIGHT_LAYERS - #define RGBLIGHT_MAX_LAYERS 16 - //#define RGBLIGHT_STARTUP_ANIMATION -#endif - -#ifdef COMBO_ENABLE - #define COMBO_COUNT 2 -#endif - -#define QMK_KEYS_PER_SCAN 4 - -#define EE_HANDS - -//#define DEBUG_MATRIX_SCAN_RATE -//#define SPLIT_MODS_ENABLE diff --git a/keyboards/kyria/keymaps/cwebster2/keymap.c b/keyboards/kyria/keymaps/cwebster2/keymap.c deleted file mode 100644 index 311ad167a..000000000 --- a/keyboards/kyria/keymaps/cwebster2/keymap.c +++ /dev/null @@ -1,397 +0,0 @@ -/* Copyright 2020 Casey Webster - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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 "raw_hid.h" -#define RAW_EPSIZE 8 -#include - -#include "cwebster2.h" - -#ifdef WPM_ENABLE -char wpm_str[10]; -uint16_t wpm_graph_timer = 0; -#endif - -#ifdef COMBO_ENABLE -enum combos { - ZX_COPY, - CV_PASTE -}; - -const uint16_t PROGMEM copy_combo[] = { KC_Z, KC_X, COMBO_END }; -const uint16_t PROGMEM paste_combo[] = { KC_C, KC_V, COMBO_END }; - -combo_t key_combos[COMBO_COUNT] = { - [ZX_COPY] = COMBO(copy_combo, LCTL_T(KC_C)), - [CV_PASTE] = COMBO(paste_combo, LCTL_T(KC_V)) -}; -#endif - -#define LAYOUT_kyria_base( \ - L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, \ - L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, \ - L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, \ - L33, L34, L35, R35, R34, R33 \ - ) \ - LAYOUT_kyria_wrapper ( \ - KC_GRV, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, KC_BSLS, \ - KC_CTLBS, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, KC_QUOT, \ - KC_EQL, L21, L22, L23, L24, L25, KC_LCCL, KC_LGUI, KC_ALTCL, KC_LSFT, R25, R24, R23, R22, R21, KC_MINS, \ - SCMD_T(KC_LBRC), C_S_T(KC_MINS), L33, L34, L35, R35, R34, R33, TO(_GAME), KC_PSCR \ - ) -#define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * Base Layer: QWERTY - */ - [_QWERTY] = LAYOUT_kyria_base_wrapper( - /* ,-----------------------. ,-----------------------. */ - _______QWERTY_L1______, _______QWERTY_R1______, - _______QWERTY_L2______, _______QWERTY_R2______, - _______QWERTY_L3______, _______QWERTY_R3______, - _______THUMBS_L_______, _______THUMBS_R_______ - /* `---------------------' `---------------------' */ - ), - [_COLEMAK] = LAYOUT_kyria_wrapper( - /* ,-----------------------. ,-----------------------. */ - KC_GRV, _______COLEMAK_L1_____, _______COLEMAK_R1_____, KC_BSLS, - KC_CTLBS, _______COLEMAK_L2_____, _______COLEMAK_R2_____, KC_SCLN, - KC_EQL, _______COLEMAK_L3_____, KC_LCCL, KC_LGUI, KC_ALTCL, KC_LSFT, _______COLEMAK_R3_____, KC_MINS, - SCMD_T(KC_LBRC), C_S_T(KC_MINS), _______THUMBS_L_______, _______THUMBS_R_______, TO(_QWERTY), KC_PSCR - /* `---------------------' `---------------------' */ - ), - // GAME layout -- qwerty without homerow mods - [_GAME] = LAYOUT_kyria_wrapper( - /* ,-------------------------------------------. ,-------------------------------------------. */ - KC_GRV, _______QWERTY_L1______, _______QWERTY_R1______, KC_BSLS, - KC_CTLBS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, _______QWERTY_L3______, KC_LCCL, KC_LALT, KC_ALTCL, KC_LSFT, _______QWERTY_R3______, KC_MINS, - KC_EQL, KC_0, _______NAKED_L___T____, _______THUMBS_R_______, TO(_COLEMAK), KC_F12 - /* `----------------------------------' `----------------------------------' */ - ), - [_FN] = LAYOUT_kyria_base_wrapper( - /* ,-----------------------. ,-----------------------. */ - _______FN_______L1____, _______INACTIVE_R1____, - _______FN_______L2____, _______INACTIVE_R2____, - _______FN_______L3____, _______NAV______R2____, - _______FN________T____, _______INACTIVE__T____ - /* `---------------------' `---------------------' */ - ), - [_SYMBOLS] = LAYOUT_kyria_base_wrapper( - /* ,-----------------------. ,-----------------------. */ - _______SYM______L1____, _______INACTIVE_R1____, - _______SYM______L2____, _______INACTIVE_R2____, - _______SYM______L3____, _______INACTIVE_R3____, - _______SYM_______T____, _______INACTIVE__T____ - /* `---------------------' `---------------------' */ - ), - [_NUM] = LAYOUT_kyria_base_wrapper( - /* ,-----------------------. ,-----------------------. */ - _______NUM______L1____, _______INACTIVE_R1____, - _______NUM______L2____, _______INACTIVE_R2____, - _______NUM______L3____, _______INACTIVE_R3____, - _______NUM_______T____, _______INACTIVE__T____ - /* `---------------------' `---------------------' */ - ), - [_NAV] = LAYOUT_kyria_base_wrapper( - /* ,-----------------------. ,-----------------------. */ - _______INACTIVE_L1____, _______NAV______R1____, - _______INACTIVE_L2____, _______NAV______R2____, - _______INACTIVE_L3____, _______NAV______R3____, - _______INACTIVE__T____, _______NAV_______T____ - /* `---------------------' `---------------------' */ - ), - [_MOUSE] = LAYOUT_kyria_base_wrapper( - /* ,-----------------------. ,-----------------------. */ - _______INACTIVE_L1____, _______MOUSE____R1____, - _______INACTIVE_L2____, _______MOUSE____R2____, - _______INACTIVE_L3____, _______MOUSE____R3____, - _______INACTIVE__T____, _______MOUSE_____T____ - /* `---------------------' `---------------------' */ - ), - [_MEDIA] = LAYOUT_kyria_base_wrapper( - /* ,-----------------------. ,-----------------------. */ - _______INACTIVE_L1____, _______MEDIA____R1____, - _______INACTIVE_L2____, _______MEDIA____R2____, - _______INACTIVE_L3____, _______MEDIA____R3____, - _______INACTIVE__T____, _______MEDIA_____T____ - /* `---------------------' `---------------------' */ - ), -}; - -#ifdef RAW_ENABLE -static void send_layer_via_hid(int layer) { - uint8_t data[RAW_EPSIZE]; - data[0] = 1; - data[1] = layer; - raw_hid_send(data, sizeof(data)); - return; -} -#endif - - -#ifdef RGBLIGHT_LAYERS -const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_AZURE} ); -const rgblight_segment_t PROGMEM my_colemak_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_BLUE} ); -const rgblight_segment_t PROGMEM my_game_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_RED} ); -const rgblight_segment_t PROGMEM my_fn_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_PINK} ); -const rgblight_segment_t PROGMEM my_symbols_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_GREEN} ); -const rgblight_segment_t PROGMEM my_num_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_CORAL} ); -const rgblight_segment_t PROGMEM my_nav_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_GOLDENROD} ); -const rgblight_segment_t PROGMEM my_mouse_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_TURQUOISE} ); -const rgblight_segment_t PROGMEM my_media_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_MAGENTA} ); - -const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {0, 3, HSV_RED}, - {7, 1, HSV_RED}, - {10, 3, HSV_RED}, - {17, 1, HSV_RED} -); - -const rgblight_segment_t PROGMEM my_shift_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {3, 1, HSV_RED}, - {13, 1, HSV_RED} -); - -const rgblight_segment_t PROGMEM my_ctrl_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {4, 1, HSV_ORANGE}, - {14, 1, HSV_ORANGE} -); - -const rgblight_segment_t PROGMEM my_alt_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {5, 1, HSV_GOLD}, - {15, 1, HSV_GOLD} -); - -const rgblight_segment_t PROGMEM my_gui_layer[] = RGBLIGHT_LAYER_SEGMENTS( - {9, 1, HSV_SPRINGGREEN}, - {19, 1, HSV_SPRINGGREEN} -); - -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - my_colemak_layer, - my_qwerty_layer, - my_game_layer, - my_fn_layer, - my_symbols_layer, - my_num_layer, - my_nav_layer, - my_mouse_layer, - my_media_layer, - my_capslock_layer, - my_shift_layer, - my_ctrl_layer, - my_alt_layer, - my_gui_layer -); - -void matrix_scan_keymap(void) { - uint8_t mods = mod_config(get_mods()); - rgblight_set_layer_state(10, mods & MOD_MASK_SHIFT); - rgblight_set_layer_state(11, mods & MOD_MASK_CTRL); - rgblight_set_layer_state(12, mods & MOD_MASK_ALT); - rgblight_set_layer_state(13, mods & MOD_MASK_GUI); -} -#endif - -void keyboard_post_init_user(void) { - rgblight_sethsv_noeeprom(HSV_BLUE); - keyboard_post_init_rgb(); -#ifdef RGBLIGHT_LAYERS - rgblight_layers = my_rgb_layers; -#else - rgblight_sethsv_noeeprom(HSV_BLUE); -#endif - /*debug_enable=true;*/ - /*debug_matrix=true;*/ -} - -//todo https://github.com/qmk/qmk_firmware/blob/debdc6379c7a72815df1f53e3406479381d243af/keyboards/crkbd/keymaps/soundmonster/keymap.c RGBRST - -layer_state_t layer_state_set_user(layer_state_t state) { -#ifdef RGBLIGHT_LAYERS - for (int i = _QWERTY; i < __LAST; i++) { - rgblight_set_layer_state(i, layer_state_cmp(state, i)); - } -# ifdef RAW_ENABLE - send_layer_via_hid(state); -# endif -#endif - return state; -} - -#ifdef RGBLIGHT_LAYERS -bool led_update_user(led_t led_state) { - rgblight_set_layer_state(9, led_state.caps_lock); - return true; -} -#endif - -#ifdef OLED_DRIVER_ENABLE -void suspend_power_down_user() { - oled_clear(); - oled_off(); -} - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - -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}; - - static const char PROGMEM logo[] = { - // canvas is 128x64. need 16 padding - // 80x32 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x60, 0xe0, 0xf0, 0xfe, 0xfe, 0xf0, 0x60, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x7c, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x7c, 0xf8, 0xe0, 0x60, 0x20, 0x10, 0x10, 0x0c, 0x0f, 0x09, 0x08, 0x00, 0x09, 0x9b, 0x5c, 0x50, 0x10, 0x20, 0x40, 0xe0, 0xf8, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x78, 0x38, 0x38, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x17, 0x15, 0x3d, 0xef, 0xaf, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x10, 0x00, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x40, 0xa0, 0xbf, 0xff, 0x3f, 0x3f, 0x3f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - oled_write_raw_P(logo, sizeof(logo)); - - oled_advance_page(false); - oled_advance_page(false); - oled_advance_page(false); - oled_advance_page(false); - oled_write_P(qmk_logo, false); - -#ifdef COMBO_ENABLE - oled_write_P(PSTR("Combos enabled: "), false); - if (is_combo_enabled()) { - oled_write_P(PSTR("Yes\n"), false); - } else { - oled_write_P(PSTR("No\n"), false); - } -#endif - -#ifdef SPLIT_MODS_ENABLE - uint8_t mods = get_mods() | get_weak_mods(); - oled_write_P((mods & MOD_MASK_GUI) ? PSTR("GUI ") : PSTR(" "), false); - oled_write_P((mods & MOD_MASK_ALT) ? PSTR("ALT ") : PSTR(" "), false); - oled_write_P((mods & MOD_MASK_CTRL) ? PSTR("CTRL ") : PSTR(" "), false); - oled_write_P((mods & MOD_MASK_SHIFT) ? PSTR("SHFT ") : PSTR(" "), false); - oled_write_P(PSTR("\n"), false); - -#endif - -#ifdef WPM_ENABLE - // Write WPM - sprintf(wpm_str, "WPM: %03d", get_current_wpm()); - //oled_write_P(PSTR("\n"), false); - oled_write_P(PSTR(" "), false); - oled_write(wpm_str, false); -#endif -} - - -static void render_status(void) { - static bool isColemak = false; - // QMK Logo and version information - oled_write_P(PSTR("Kyria rev1.3\n\n"), false); - - oled_write_P(isColemak ? PSTR("COLEMAK ") : PSTR("QWERTY "), false); - - // Host Keyboard Layer Status - switch (get_highest_layer(layer_state)) { - case _QWERTY: - oled_write_P(PSTR("Default\n"), false); - isColemak = false; - break; - case _SYMBOLS: - oled_write_P(PSTR("Shifted Sym\n"), false); - break; - case _NUM: - oled_write_P(PSTR("Numbers\n"), false); - break; - case _NAV: - oled_write_P(PSTR("Navigation\n"), false); - break; - case _FN: - oled_write_P(PSTR("Fn\n"), false); - break; - case _GAME: - oled_write_P(PSTR("Game\n"), false); - isColemak = false; - break; - case _COLEMAK: - oled_write_P(PSTR("Colemak-DHm\n"), false); - isColemak = true; - break; - case _MEDIA: - oled_write_P(PSTR("Media keys\n"), false); - break; - case _MOUSE: - oled_write_P(PSTR("Mouse keys\n"), false); - break; - default: - oled_write_P(PSTR("Undefined\n"), false); - } - - uint8_t mods = get_mods() | get_weak_mods(); - oled_write_P(PSTR("\n"), false); - oled_write_P((mods & MOD_MASK_GUI) ? PSTR("GUI ") : PSTR(" "), false); - oled_write_P((mods & MOD_MASK_ALT) ? PSTR("ALT ") : PSTR(" "), false); - oled_write_P((mods & MOD_MASK_CTRL) ? PSTR("CTRL ") : PSTR(" "), false); - oled_write_P((mods & MOD_MASK_SHIFT) ? PSTR("SHFT ") : PSTR(" "), false); - oled_write_P(PSTR("\n"), false); - -#define I3MASK MOD_BIT(KC_LGUI) -#define I3SMASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_LSFT)) -#define KMASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) - - oled_write_P((mods == I3MASK) ? PSTR("I3 ") : (mods == I3SMASK) ? PSTR("I3-SFT ") : PSTR(" "), false); - oled_write_P((mods == KMASK) ? PSTR("KITTY ") : PSTR(" "), false); - oled_write_P(PSTR("\n"), false); - - // Host Keyboard LED Status - uint8_t led_usb_state = host_keyboard_leds(); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); - -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_logo(); - } -} -#endif - - -#ifdef RAW_ENABLE -void raw_hid_receive(uint8_t *data, uint8_t length) { - // messages from host - // add ability to set color - raw_hid_send(data, length); -} -#endif diff --git a/keyboards/kyria/keymaps/cwebster2/rules.mk b/keyboards/kyria/keymaps/cwebster2/rules.mk deleted file mode 100644 index fe9ca3c2c..000000000 --- a/keyboards/kyria/keymaps/cwebster2/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -RAW_ENABLE = yes -WPM_ENABLE = yes -COMBO_ENABLE = no diff --git a/keyboards/kyria/keymaps/default/config.h b/keyboards/kyria/keymaps/default/config.h deleted file mode 100644 index 9c2fb52ab..000000000 --- a/keyboards/kyria/keymaps/default/config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_LIMIT_VAL 150 -#endif - -// If you are using an Elite C rev3 on the slave side, uncomment the lines below: -// #define SPLIT_USB_DETECT -// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/kyria/keymaps/default/keymap.c b/keyboards/kyria/keymaps/default/keymap.c deleted file mode 100644 index c6254c1a5..000000000 --- a/keyboards/kyria/keymaps/default/keymap.c +++ /dev/null @@ -1,220 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -enum layers { - _QWERTY = 0, - _LOWER, - _RAISE, - _ADJUST -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * Base Layer: QWERTY - * - * ,-------------------------------------------. ,-------------------------------------------. - * |RAIS/ESC| Q | W | E | R | T | | Y | U | I | O | P | | \ | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * |Ctrl/BS | A | S | D | F | G | | H | J | K | L | ; : | ' " | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B |LShift|LShift| |LShift|LShift| N | M | , < | . > | / ? | - _ | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | GUI | Del | Enter| Space| Esc | | Enter| Space| Tab | Bksp | AltGr| - * | | | Alt | Lower| Raise| | Lower| Raise| | | | - * `----------------------------------' `----------------------------------' - */ - [_QWERTY] = LAYOUT( - LT(_RAISE, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, - MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LSFT, KC_LSFT, KC_LSFT, KC_LSFT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, - KC_LGUI, KC_DEL, MT(MOD_LALT, KC_ENT), LT(_LOWER, KC_SPC), LT(_RAISE, KC_ESC), LT(_LOWER, KC_ENT), LT(_RAISE, KC_SPC), KC_TAB, KC_BSPC, KC_RALT - ), -/* - * Lower Layer: Symbols - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | ! | @ | { | } | | | | | | | | | | \ | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` | | + | - | / | * | % | ' " | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | | | & | = | , | . | / ? | - _ | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | ; | = | | = | ; | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_LOWER] = LAYOUT( - _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, KC_BSLS, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, - _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, - _______, _______, _______, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, _______, _______, _______ - ), -/* - * Raise Layer: Number keys, media, navigation - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | Prev | Play | Next | VolUp| | Left | Down | Up | Right| | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | Mute | VolDn| | | | | | MLeft| Mdown| MUp |MRight| | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_RAISE] = LAYOUT( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, - _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -/* - * Adjust Layer: Function keys, RGB - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | TOG | SAI | HUI | VAI | MOD | | | | | F11 | F12 | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_ADJUST] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, - _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -// /* -// * Layer template -// * -// * ,-------------------------------------------. ,-------------------------------------------. -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | | | | | -// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' -// * | | | | | | | | | | | | -// * | | | | | | | | | | | | -// * `----------------------------------' `----------------------------------' -// */ -// [_LAYERINDEX] = LAYOUT( -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -// ), -}; - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - -static void render_kyria_logo(void) { - static const char PROGMEM kyria_logo[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); -} - -static void render_qmk_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - - oled_write_P(qmk_logo, false); -} - -static void render_status(void) { - // QMK Logo and version information - render_qmk_logo(); - oled_write_P(PSTR("Kyria rev1.0\n\n"), false); - - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (get_highest_layer(layer_state)) { - case _QWERTY: - oled_write_P(PSTR("Default\n"), false); - break; - case _LOWER: - oled_write_P(PSTR("Lower\n"), false); - break; - case _RAISE: - oled_write_P(PSTR("Raise\n"), false); - break; - case _ADJUST: - oled_write_P(PSTR("Adjust\n"), false); - break; - default: - oled_write_P(PSTR("Undefined\n"), false); - } - - // Host Keyboard LED Status - uint8_t led_usb_state = host_keyboard_leds(); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_kyria_logo(); - } -} -#endif - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - // Volume control - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } - else if (index == 1) { - // Page up/Page down - if (clockwise) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - } - return true; -} -#endif diff --git a/keyboards/kyria/keymaps/default/rules.mk b/keyboards/kyria/keymaps/default/rules.mk deleted file mode 100644 index e3486a8a9..000000000 --- a/keyboards/kyria/keymaps/default/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow \ No newline at end of file diff --git a/keyboards/kyria/keymaps/drashna/config.h b/keyboards/kyria/keymaps/drashna/config.h deleted file mode 100644 index af6f73815..000000000 --- a/keyboards/kyria/keymaps/drashna/config.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . - */ - -#pragma once - -#define EE_HANDS - -#ifdef OLED_DRIVER_ENABLE -# define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_SLEEP -# define RGBLIGHT_LIMIT_VAL 200 -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_SPLIT -// # define RGBLIGHT_LAYERS -#endif - -#define KEYLOGGER_LENGTH 10 diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c deleted file mode 100644 index 4563a3c62..000000000 --- a/keyboards/kyria/keymaps/drashna/keymap.c +++ /dev/null @@ -1,194 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "drashna.h" - -/* - * The `LAYOUT_kyria_base` macro is a template to allow the use of identical - * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so - * that there is no need to set them up for each layout, and modify all of - * them if I want to change them. This helps to keep consistency and ease - * of use. K## is a placeholder to pass through the individual keycodes - */ - -// clang-format off -#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) -#define LAYOUT_kyria_base( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ - K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ - K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ - ) \ - LAYOUT_wrapper( \ - KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ - LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \ - OS_LSFT, CTL_T(K21), K22, K23, K24, K25, TG_GAME, MEH(KC_MINS), TG_DBLO, KC_CAPS, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ - ) -/* Re-pass though to allow templates to be used */ -#define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_kyria_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), - - [_COLEMAK] = LAYOUT_kyria_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), - - [_DVORAK] = LAYOUT_kyria_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), - - [_WORKMAN] = LAYOUT_kyria_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_kyria_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_kyria_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_kyria_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_kyria_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - - [_GAMEPAD] = LAYOUT_wrapper( - KC_ESC, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, - KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, - KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, _______, _______, _______, LALT(KC_PSCR), _______, _______, _______, _______, _______, _______, - _______, MAGIC_TOGGLE_NKRO, KC_V, KC_SPC, KC_H, _______, _______, _______, _______, _______ - ), - - [_DIABLO] = LAYOUT_wrapper( - KC_ESC, KC_S, KC_I, KC_F, KC_M, KC_T, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, - KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_J, KC_L, TG_DBLO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_DIABLO_CLEAR, KC_J, KC_NO, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO - ), - [_LOWER] = LAYOUT_wrapper( - KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, - _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, - _______, _________________LOWER_L3__________________, _______, _______, _______, _______, _________________LOWER_R3__________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [_RAISE] = LAYOUT_wrapper( - KC_F12, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_F11, - _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, - _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _________________RAISE_R3__________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [_ADJUST] = LAYOUT_wrapper( - KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, - VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, - _______, _________________ADJUST_L3_________________, HPT_TOG, HPT_FBK, MG_NKRO, UC_MOD, _________________ADJUST_R3_________________, TG_MODS, - _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, _______ - ), -// [_LAYERINDEX] = LAYOUT_wrapper( -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -// ), -}; -// clang-format on - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -#endif - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - // Volume control - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } else if (index == 1) { - // Page up/Page down - if (clockwise) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - } - return true; -} -#endif - -#ifdef RGBLIGHT_LAYERS -const rgblight_segment_t PROGMEM shift_layers[] = RGBLIGHT_LAYER_SEGMENTS( - { 8, 1, 120, 255, 255}, - { 18, 1, 120, 255, 255} -); -const rgblight_segment_t PROGMEM control_layers[] = RGBLIGHT_LAYER_SEGMENTS( - { 6, 1, 0, 255, 255}, - { 16, 1, 0, 255, 255} -); -const rgblight_segment_t PROGMEM alt_layers[] = RGBLIGHT_LAYER_SEGMENTS( - { 2, 1, 240, 255, 255}, - { 17, 1, 250, 255, 255} -); -const rgblight_segment_t PROGMEM gui_layers[] = RGBLIGHT_LAYER_SEGMENTS( - { 7, 1, 51, 255, 255}, - { 12, 1, 51, 255, 255} -); - -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - shift_layers, - control_layers, - alt_layers, - gui_layers -); - -void keyboard_post_init_keymap(void) { - rgblight_layers = my_rgb_layers; -} - -void matrix_scan_keymap(void) { - uint8_t mods = mod_config(get_mods()|get_oneshot_mods()); - rgblight_set_layer_state(0, mods & MOD_MASK_SHIFT); - rgblight_set_layer_state(1, mods & MOD_MASK_CTRL); - rgblight_set_layer_state(2, mods & MOD_MASK_ALT); - rgblight_set_layer_state(3, mods & MOD_MASK_GUI); -} -#endif diff --git a/keyboards/kyria/keymaps/drashna/rules.mk b/keyboards/kyria/keymaps/drashna/rules.mk deleted file mode 100644 index fb3c1cf84..000000000 --- a/keyboards/kyria/keymaps/drashna/rules.mk +++ /dev/null @@ -1,21 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # ENables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -RGBLIGHT_STARTUP_ANIMATION = no - -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -BOOTLOADER = atmel-dfu - -# SPLIT_TRANSPORT = mirror - -# TAP_DANCE_ENABLE = yes diff --git a/keyboards/kyria/keymaps/ghidalgo93/config.h b/keyboards/kyria/keymaps/ghidalgo93/config.h deleted file mode 100644 index c46873c8e..000000000 --- a/keyboards/kyria/keymaps/ghidalgo93/config.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 -#endif - -// encoder resolution from default 4 to 2 -#define ENCODER_RESOLUTION 2 - -// If you are using an Elite C rev3 on the slave side, uncomment the lines below: -// #define SPLIT_USB_DETECT -// #define NO_USB_STARTUP_CHECK - -//allows for either side as the master. -#define EE_HANDS - - - diff --git a/keyboards/kyria/keymaps/ghidalgo93/keymap.c b/keyboards/kyria/keymaps/ghidalgo93/keymap.c deleted file mode 100644 index 1adbcc6ee..000000000 --- a/keyboards/kyria/keymaps/ghidalgo93/keymap.c +++ /dev/null @@ -1,246 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - - -enum layers { - _QWERTY = 0, - _LOWER, - _RAISE, - _NAV, - _ADJUST -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * Base Layer: QWERTY - * - * ,-------------------------------------------. ,-------------------------------------------. - * | ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | Ctrl | A | S | D | F | G | | H | J | K | L | ; : | ' " | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | | | | | | N | M | , < | . > | / ? | - _ | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | GUI | | Tab | Enter| | Bksp | Space| Alt | Home | End | - * | | | LCTL | Lower| | | | Raise| | | | - * `----------------------------------' `----------------------------------' - */ - [_QWERTY] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, - KC_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_MINS, - _______, KC_LGUI , KC_LCTL, LT(_LOWER, KC_TAB), LT(_NAV, KC_ENT), KC_BSPC, LT(_RAISE, KC_SPC), KC_RALT, KC_HOME, KC_END - ), -/* - * Lower Layer: Number keys, media - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | | | | | | | | 7 | 8 | 9 | | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | Prev | Play | Next | VolUp| | | 4 | 5 | 6 | | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | Mute | VolDn| | | | | | 0 | 1 | 2 | 3 | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_LOWER] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, KC_7 , KC_8 , KC_9 , _______, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, _______, KC_4 , KC_5 , KC_6 , _______, _______, - _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_0 , KC_1 , KC_2 , KC_3 , _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -/* - * Raise Layer: Symbols - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | @ | ! | { | } | | | ` | ~ | & | * | | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | # | $ | ( | ) | | | _ | - | = | | | ' " | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | % | ^ | [ | ] | | | | | | | | + | \ | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_RAISE] = LAYOUT( - _______, KC_AT , KC_EXLM, KC_LCBR, KC_RCBR, _______, KC_GRV , KC_TILD, KC_AMPR, KC_ASTR, _______, _______, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, _______, KC_UNDS, KC_MINS, KC_EQL , KC_PIPE, KC_QUOT, _______, - _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_BSLS, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -// /* -// * Navigation Layer -// * -// * ,-------------------------------------------. ,-------------------------------------------. -// * | | | | | | | | home |pg dn |pg up | end | | | -// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -// * | | | | | | | | left | down | up | right| | | -// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | | | | | -// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' -// * | | | | | | | | | | | | -// * | | | | | | | | | | | | -// * `----------------------------------' `----------------------------------' -// */ - [_NAV] = LAYOUT( - _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, _______, - _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -/* - * Adjust Layer: Function keys, RGB - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | | | | | | | | | F11 | F12 | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_ADJUST] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F11, KC_F12, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -// /* -// * Layer template -// * -// * ,-------------------------------------------. ,-------------------------------------------. -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | | | | | -// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' -// * | | | | | | | | | | | | -// * | | | | | | | | | | | | -// * `----------------------------------' `----------------------------------' -// */ -// [_LAYERINDEX] = LAYOUT( -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -// ), -}; - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - -static void render_kyria_logo(void) { - static const char PROGMEM kyria_logo[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); -} - -static void render_qmk_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - - oled_write_P(qmk_logo, false); -} - -static void render_status(void) { - // QMK Logo and version information - render_qmk_logo(); - oled_write_P(PSTR("Kyria rev1.0\n\n"), false); - - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (get_highest_layer(layer_state)) { - case _QWERTY: - oled_write_P(PSTR("Default\n"), false); - break; - case _LOWER: - oled_write_P(PSTR("Lower\n"), false); - break; - case _RAISE: - oled_write_P(PSTR("Raise\n"), false); - break; - case _NAV: - oled_write_P(PSTR("Nav\n"), false); - break; - case _ADJUST: - oled_write_P(PSTR("Adjust\n"), false); - break; - default: - oled_write_P(PSTR("Undefined\n"), false); - } - - // Host Keyboard LED Status - led_t led_state = host_keyboard_led_state(); - oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); - oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); - oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_kyria_logo(); - } -} -#endif - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - // Volume control - if (clockwise) { - tap_code(KC_VOLD); - } else { - tap_code(KC_VOLU); - } - } - else if (index == 1) { - // Page up/Page down - if (clockwise) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - } - return true; -} -#endif diff --git a/keyboards/kyria/keymaps/ghidalgo93/rules.mk b/keyboards/kyria/keymaps/ghidalgo93/rules.mk deleted file mode 100644 index 449e3d950..000000000 --- a/keyboards/kyria/keymaps/ghidalgo93/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUTO_SHIFT_ENABLE = yes # Enable auto shift diff --git a/keyboards/kyria/keymaps/gotham/config.h b/keyboards/kyria/keymaps/gotham/config.h deleted file mode 100644 index 1b84d996f..000000000 --- a/keyboards/kyria/keymaps/gotham/config.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define EE_HANDS -#define IGNORE_MOD_TAP_INTERRUPT - -// Fix for Elite C rev3 -#define SPLIT_USB_DETECT -// Speed up slave half startup -#define SPLIT_USB_TIMEOUT 1000 - -#ifdef OLED_DRIVER_ENABLE -# define OLED_DISPLAY_128X64 -# define OLED_TIMEOUT 10000 -#endif - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_EFFECT_BREATHING -# define RGBLIGHT_EFFECT_RAINBOW_MOOD -# define RGBLIGHT_EFFECT_RAINBOW_SWIRL -# define RGBLIGHT_EFFECT_KNIGHT -#endif - -#ifdef ENCODER_ENABLE -# define ENCODER_DIRECTION_FLIP -# define ENCODER_RESOLUTION 2 -#endif - -#ifdef THUMBSTICK_ENABLE -# define THUMBSTICK_FLIP_X -# define THUMBSTICK_PIN_X F0 -# define THUMBSTICK_PIN_Y F1 -#endif diff --git a/keyboards/kyria/keymaps/gotham/keymap.c b/keyboards/kyria/keymaps/gotham/keymap.c deleted file mode 100644 index a725e61fe..000000000 --- a/keyboards/kyria/keymaps/gotham/keymap.c +++ /dev/null @@ -1,127 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H - -#include "keycodes.h" - -#ifdef ENCODER_ENABLE -# include "encoder_utils.h" -#endif - -#ifdef OLED_DRIVER_ENABLE -# include "oled_utils.h" -#endif - -#ifdef THUMBSTICK_ENABLE -# include "thumbstick.h" -#endif - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * Base Layer: QWERTY -*/ - [_QWERTY] = LAYOUT( - ESC_RAISE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BSLS_RAISE, - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SFT_QUOT, - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_NO, TMB_MODE, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, CTL_MINS, - ENC_MODE_L, KC_LALT, LT(_LOWER, KC_SPC), LT(_RAISE, KC_TAB), KC_LSFT, KC_EQL, LT(_RAISE, KC_ENT), LT(_LOWER, KC_BSPC), KC_DEL, ENC_MODE_R - ), -/* - * Lower Layer: Symbols, Navigation - */ - [_LOWER] = LAYOUT( - _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, KC_PIPE, - _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_GRV, KC_PGUP, KC_LEFT, KC_UP, KC_RGHT, _______, KC_QUOT, - _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_DOWN, KC_END, _______, KC_MINS, - _______, _______, _______, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, _______, _______, _______ - ), -/* - * Raise Layer: Number keys, media, more symbols - */ - [_RAISE] = LAYOUT( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_MINS, KC_PLUS, KC_ASTR, KC_SLSH, KC_PERC, _______, - _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_AMPR, KC_PIPE, KC_COMM, KC_DOT, KC_SLSH, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -/* - * Adjust Layer: Function keys, RGB - */ - [_ADJUST] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, - _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -}; -// clang-format on - -void matrix_init_user(void) { -#ifdef ENCODER_ENABLE - encoder_utils_init(); -#endif -} - -layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { -#ifdef ENCODER_ENABLE - case ENC_MODE_L: - if (record->event.pressed) { - cycle_encoder_mode(true, false); - } - break; - case ENC_MODE_R: - if (record->event.pressed) { - cycle_encoder_mode(false, false); - } - break; -#endif -#ifdef THUMBSTICK_ENABLE - case TMB_MODE: - if (record->event.pressed) { - thumbstick_mode_cycle(false); - } -#endif - } - return true; -} - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } - -void oled_task_user(void) { render_status(); } -#endif - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - encoder_action(get_encoder_mode(true), clockwise); -# ifdef OLED_DRIVER_ENABLE - oled_on(); -# endif - } else if (index == 1) { - encoder_action(get_encoder_mode(false), clockwise); -# ifdef OLED_DRIVER_ENABLE - oled_on(); -# endif - } - return true; -} -#endif diff --git a/keyboards/kyria/keymaps/gotham/rules.mk b/keyboards/kyria/keymaps/gotham/rules.mk deleted file mode 100644 index 0bd8badb4..000000000 --- a/keyboards/kyria/keymaps/gotham/rules.mk +++ /dev/null @@ -1,21 +0,0 @@ -CONSOLE_ENABLE = yes # Console for debug -ENCODER_ENABLE = yes # ENables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MOUSEKEY_ENABLE = no # Mouse keys -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -THUMBSTICK_ENABLE = yes # Enables analog thumbstick code - -ifeq ($(strip $(ENCODER_ENABLE)), yes) - SRC += encoder_utils.c -endif - -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) - SRC += oled_utils.c -endif - -ifeq ($(strip $(THUMBSTICK_ENABLE)), yes) - POINTING_DEVICE_ENABLE = yes - OPT_DEFS += -DTHUMBSTICK_ENABLE - SRC += analog.c - SRC += thumbstick.c -endif diff --git a/keyboards/kyria/keymaps/j-inc/config.h b/keyboards/kyria/keymaps/j-inc/config.h deleted file mode 100644 index 833fbe4bd..000000000 --- a/keyboards/kyria/keymaps/j-inc/config.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 - #define OLED_TIMEOUT 300000 -#endif - -// If you are using an Elite C rev3 on the slave side, uncomment the lines below: -#define SPLIT_USB_DETECT -#define NO_USB_STARTUP_CHECK -#define SPLIT_USB_TIMEOUT 1000 - -#define MASTER_RIGHT -#define ENCODER_DIRECTION_FLIP - - -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION -#define NO_ACTION_ONESHOT -#define OLED_FONT_END 127 - - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_LED_MAP {0,1,2,9,8,7,4,3,5,6,19,18,17,10,11,12,15,16,14,13} // Orients Kyria LEDs to a circle around both halves. - //#define RBGLIGHT_LED_MAP {9,8,6,7,5,3,2,4,1,0,10,12,13,11,14,16,17,15,18,19} // Orients Kyria LEDs for a left half-right half columnar progression. - #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - //#define RGBLIGHT_EFFECT_STATIC_GRADIENT - #define RGBLIGHT_SLEEP -#endif diff --git a/keyboards/kyria/keymaps/j-inc/keymap.c b/keyboards/kyria/keymaps/j-inc/keymap.c deleted file mode 100644 index d842e4c2b..000000000 --- a/keyboards/kyria/keymaps/j-inc/keymap.c +++ /dev/null @@ -1,371 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H -#include -bool is_alt_tab_active = false; -uint16_t alt_tab_timer = 0; - -char wpm_str[10]; - -enum layers { - _QWERTY, - _2WERTY, //pronounced "twerty," obviously - _LOWER, - _RAISE, - _ADJUST, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * Base Layer: QWERTY - * - * ,-------------------------------------------. ,-------------------------------------------. - * |RAIS/ESC| Q | W | E | R | T | | Y | U | I | O | P | BKSP | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * |Tab | A | S | D | F | G | | H | J | K | L | ; : | ' " | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | CTRL | Z | X | C | V | B |Enter |Ctrl | |Ctrl |(2u) | N | M | , < | . > | / ? | - _ | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | TG(1)| Alt | Win | Shift| Back | | Enter| Space| Win | Alt |TG(3) | - * | | | | Lower| space| | Lower| Raise| | | | - * `----------------------------------' `----------------------------------' - */ - [_QWERTY] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_LCTL, KC_RCTL, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, - TG(1), KC_LALT, KC_LGUI, KC_LSFT, KC_BSPC, LT(3, KC_ENT), LT(2, KC_SPC), KC_RGUI, KC_RALT, TG(2) - ), -/* - * This layer exists to change encoder functions. - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | | | | | | | | | | | | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_2WERTY] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -/* - * Lower Layer: numpad and arrow - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | | 7 | 8 | 9 | 0 | | PGUP | | UP | | | Del - | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | CAPS | | 4 | 5 | 6 | Tab | | PGDN | Left | Down | Right| | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | 1 | 2 | 3 | Ent | | | | | | | LBRC | RBRC | | |\ | += | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | Tab | Ent | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_LOWER] = LAYOUT( - _______, _______, KC_7, KC_8, KC_9, KC_0, KC_PGUP, _______, KC_UP, _______, _______, KC_DEL, - KC_CAPS, _______, KC_4, KC_5, KC_6, KC_TAB, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, - KC_LSFT, KC_0, KC_1, KC_2, KC_3, KC_ENT, KC_TRNS, KC_TRNS, MO(4), _______, KC_LBRC, KC_RBRC, _______, _______, KC_BSLS, KC_EQL, - KC_TRNS, KC_TAB, KC_ENT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, _______, _______, _______ - ), -/* - * Raise Layer: F keys and media - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | | | | | | | F9 | F10 | F11 | F12 | | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | Prev | Play | Next | VolUp| | F5 | F6 | F7 | F8 | | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | Mute | VolDn| | | | | | F1 | F2 | F3 | F4 | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_RAISE] = LAYOUT( - _______, _______, _______, _______, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, - _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS - ), -/* - * Adjust Layer: Function keys, RGB - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | VAI | SAI | HUI | SPI | MOD | | | | | F11 | F12 | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | VID | SAD | HUD | SPD | RMOD | | | | | | | | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_ADJUST] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - RGB_TOG, RGB_VAI, RGB_SAI, RGB_HUI, RGB_SPI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, - _______, RGB_VAD, RGB_SAD, RGB_HUD, RGB_SPD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -// /* -// * Layer template -// * -// * ,-------------------------------------------. ,-------------------------------------------. -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | | | | | -// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' -// * | | | | | | | | | | | | -// * | | | | | | | | | | | | -// * `----------------------------------' `----------------------------------' -// */ -// [_LAYERINDEX] = LAYOUT( -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -// ), -}; - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - -#ifdef OLED_DRIVER_ENABLE - -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - -static void render_status(void) { - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (get_highest_layer(layer_state)) { - case _QWERTY: - oled_write_P(PSTR("QWERTY"), false); - break; - case _2WERTY: - oled_write_P(PSTR("2WERTY"), false); - break; - case _LOWER: - oled_write_P(PSTR("Numpad"), false); - break; - case _RAISE: - oled_write_P(PSTR("F Keys"), false); - break; - case _ADJUST: - oled_write_P(PSTR("RGB "), false); - break; - default: - oled_write_P(PSTR("Undefined"), false); - } - - //Host Keyboard LED Status - led_t led_state = host_keyboard_led_state(); - oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); - oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); - oled_write_P(led_state.scroll_lock ? PSTR("SCRL") : PSTR(" "), false); -} - - -// WPM-responsive animation stuff here -#define IDLE_FRAMES 5 -#define IDLE_SPEED 40 // below this wpm value your animation will idle - -// #define PREP_FRAMES 1 // uncomment if >1 - -#define TAP_FRAMES 2 -#define TAP_SPEED 60 // above this wpm value typing animation to triggere - -#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms -// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing -#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 - -uint32_t anim_timer = 0; -uint32_t anim_sleep = 0; -uint8_t current_idle_frame = 0; -// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 -uint8_t current_tap_frame = 0; - -// Images credit j-inc(/James Incandenza) and pixelbenny. Credit to obosob for initial animation approach. -static void render_anim(void) { - static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { - { - 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 16, 8, 8, 4, 4, 4, 8, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, - 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,100,130, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, - 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 56, 4, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, - 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, - 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 - }, - { - 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 16, 8, 8, 4, 4, 4, 8, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, - 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,100,130, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, - 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 56, 4, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, - 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, - 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 - }, - { - 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 8, 4, 2, 2, 4, 24, 96,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, - 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,194, 1, 1, 2, 2, 4, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 96, 0,129,130,130,132, 8, 16, 32, 64,128, 0, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, - 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 25, 6, 0, 0, 0, 0, 0, 0, 0, 24, 24, 24, 27, 3, 0, 64,160, 34, 36, 20, 18, 18, 18, 11, 8, 8, 8, 8, 5, 5, 9, 9, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, - 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, - 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 - }, - { - 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, - 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, - 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, - 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, - 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 - }, - { - 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 4, 2, 2, 2, 4, 56, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, - 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28,226, 1, 1, 2, 2, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, - 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, - 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, - 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 - } - }; - static const char PROGMEM prep[][ANIM_SIZE] = { - { - 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, - 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2,129,128,128, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0, 0, 1,225, 26, 6, 9, 49, 53, 1,138,124, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, - 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 24, 6, 5,152,153,132,195,124, 65, 65, 64, 64, 32, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, - 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, - 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 - } - }; - static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { - { - 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0,248,248,248,248, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, - 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2,129,128,128, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0, 0, 1, 1, 2, 4, 8, 16, 32, 67,135, 7, 1, 0,184,188,190,159, 95, 95, 79, 76, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, - 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 24, 6, 5,152,153,132, 67,124, 65, 65, 64, 64, 32, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 61,124,252,252,252,252,252, 60, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, - 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 63, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, - 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 - }, - { - 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, - 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0, 0, 1,225, 26, 6, 9, 49, 53, 1,138,124, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, - 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, - 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3,122,122,121,121,121,121, 57, 49, 2, 2, 4, 4, 8, 8, 8,136,136,135,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, - 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,120,124,254,255, 63, 7, 0, 0, 0, 0,255,255,127,127, 63, 62, 28, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 - }, - }; - - //assumes 1 frame prep stage - void animation_phase(void) { - if(get_current_wpm() <=IDLE_SPEED){ - current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; - oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); - } - if(get_current_wpm() >IDLE_SPEED && get_current_wpm() 1 - oled_write_raw_P(prep[0], ANIM_SIZE); // remove if IDLE_FRAMES >1 - } - if(get_current_wpm() >=TAP_SPEED){ - current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; - oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE); - } - } - if(get_current_wpm() != 000) { - oled_on(); // not essential but turns on animation OLED with any alpha keypress - if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { - anim_timer = timer_read32(); - animation_phase(); - } - anim_sleep = timer_read32(); - } else { - if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { - oled_off(); - } else { - if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { - anim_timer = timer_read32(); - animation_phase(); - } - } - } -} - -// static void render_skull(void) { // Helen Tseong (http://shewolfe.co/), the original artist behind the skull, sadly only allowing use of the skull for my personal use. Her (excellent) works are copyright her, and I claim no ownership. Reach out to her for permission! -// static const char PROGMEM skull[] = { -// }; -// oled_write_raw_P(skull, 801); -// } - -void oled_task_user(void) { - if (is_keyboard_master()) { - //render_skull(); - //oled_set_cursor(7,6); - render_status(); - // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_anim(); - oled_set_cursor(0,6); - sprintf(wpm_str, " WPM: %03d", get_current_wpm()); - oled_write(wpm_str, false); - - } -} -#endif - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - switch(biton32(layer_state)){ - case 1: - if (clockwise) { - tap_code16(C(KC_TAB)); - } else { - tap_code16(S(C(KC_TAB))); - } - break; - default: - if (clockwise) { - if (!is_alt_tab_active) { - is_alt_tab_active = true; - register_code(KC_LALT); - } - alt_tab_timer = timer_read(); - tap_code16(KC_TAB); - } else { - tap_code16(S(KC_TAB)); - } - break; - } - return true; -} - -void matrix_scan_user(void) { - if (is_alt_tab_active) { - if (timer_elapsed(alt_tab_timer) > 1250) { - unregister_code(KC_LALT); - is_alt_tab_active = false; - } - } -} - -#endif diff --git a/keyboards/kyria/keymaps/j-inc/rules.mk b/keyboards/kyria/keymaps/j-inc/rules.mk deleted file mode 100644 index 87d07f667..000000000 --- a/keyboards/kyria/keymaps/j-inc/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -RGBLIGHT_ANIMATIONS = yes -WPM_ENABLE = yes -MOUSEKEY_ENABLE = no - -TAP_DANCE_ENABLE = no -STENO_ENABLE = no -BOOTMAGIC_ENABLE =no -TERMINAL_ENABLE = no -GRAVE_ESC_ENABLE = no -MAGIC_ENABLE = no -SPACE_CADET_ENABLE = no -KEY_LOCK_ENABLE = no -AUDIO_ENABLE = no -CONSOLE_ENABLE = no -VELOCIKEY_ENABLE = no diff --git a/keyboards/kyria/keymaps/jhelvy/config.h b/keyboards/kyria/keymaps/jhelvy/config.h deleted file mode 100644 index 6dbc0dc1d..000000000 --- a/keyboards/kyria/keymaps/jhelvy/config.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#define ENCODER_RESOLUTION 2 - -#define TAPPING_FORCE_HOLD -#define TAPPING_TERM 200 -#define AUTO_SHIFT_TIMEOUT 150 - -#define MOUSEKEY_DELAY 100 -#define MOUSEKEY_INTERVAL 16 -#define MOUSEKEY_MAX_SPEED 2 -#define MOUSEKEY_WHEEL_MAX_SPEED 42 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 15 diff --git a/keyboards/kyria/keymaps/jhelvy/keymap.c b/keyboards/kyria/keymaps/jhelvy/keymap.c deleted file mode 100644 index 371007eeb..000000000 --- a/keyboards/kyria/keymaps/jhelvy/keymap.c +++ /dev/null @@ -1,202 +0,0 @@ -#include QMK_KEYBOARD_H - -enum layers { - QWERTY = 0, - HOTKEYS, - TEXT, - SELECT, - NUMBERS, -}; - -enum custom_keycodes { - SIG_PROF = SAFE_RANGE, - SIG_JOHN, - R_PIPE, - R_ASSIGN, - R_COLS, - R_IN, - TEX, - E_GMAIL, - E_GWU, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[QWERTY] = LAYOUT(LALT(KC_A), 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_QUOT, KC_ENT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_LALT, KC_LCTL, KC_LGUI, MO(2), MO(4), KC_BSPC, KC_SPC, MO(1), KC_PGDN, TG(1)), - -[HOTKEYS] = LAYOUT(KC_F6, LGUI(LALT(KC_1)), LGUI(LALT(KC_2)), LCTL(KC_U), SGUI(KC_R), KC_F2, SGUI(KC_K), LCTL(KC_9), LCTL(KC_0), KC_F14, KC_F11, KC_F15, KC_F7, LGUI(LCTL(KC_A)), KC_F10, KC_LBRC, KC_RBRC, KC_F9, SIG_JOHN, LSFT(KC_TAB), KC_TAB, E_GMAIL, KC_F12, KC_F16, KC_F8, KC_ASTG, KC_NO, KC_LCBR, KC_RCBR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, SIG_PROF, KC_F3, KC_F4, E_GWU, KC_F13, KC_F17, KC_F5, KC_NO, KC_LGUI, KC_LGUI, KC_LCTL, KC_BSPC, KC_SPC, KC_TRNS, KC_NO, KC_TRNS), - -[TEXT] = LAYOUT(LGUI(KC_BSPC), LGUI(KC_Q), LGUI(KC_W), KC_ESC, LGUI(KC_R), LGUI(KC_T), LCTL(KC_Y), LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), KC_SCLN, R_PIPE, KC_BSPC, MO(3), LGUI(KC_S), LGUI(KC_C), LGUI(KC_V), LGUI(KC_X), KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_GRV, KC_ENT, KC_F18, LGUI(KC_A), LGUI(KC_D), KC_F1, LGUI(KC_Z), LGUI(KC_Y), KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC, LGUI(KC_F), SGUI(KC_G), LGUI(KC_G), KC_BSLS, R_ASSIGN, KC_LALT, KC_LCTL, KC_LGUI, KC_TRNS, KC_NO, KC_BSPC, KC_SPC, KC_LGUI, KC_PGUP, KC_NO), - -[SELECT] = LAYOUT(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, SGUI(KC_LEFT), LSFT(KC_UP), SGUI(KC_RGHT), KC_NO, R_COLS, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LSFT(KC_LEFT), LSFT(KC_DOWN), LSFT(KC_RGHT), KC_NO, R_IN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LALT(LSFT(KC_LEFT)), LALT(LSFT(KC_RIGHT)), KC_NO, TEX, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC, KC_SPC, KC_LGUI, KC_NO, KC_NO), - -[NUMBERS] = LAYOUT(KC_NO, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), KC_EQL, KC_7, KC_8, KC_9, KC_TILD, KC_MINS, KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PLUS, KC_4, KC_5, KC_6, KC_COLN, KC_ENT, KC_LSPO, KC_NO, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS, KC_1, KC_2, KC_3, KC_SLSH, KC_PIPE, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_BSPC, KC_SPC, KC_0, KC_DOT, KC_COMM) - -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case SIG_PROF: - if (record->event.pressed) { - SEND_STRING("Cheers,\nProfessor Helveston"); - } else { - } - break; - - case SIG_JOHN: - if (record->event.pressed) { - SEND_STRING("Cheers,\nJohn"); - } else { - } - break; - - case R_PIPE: - if (record->event.pressed) { - SEND_STRING(" %>% "); - } else { - } - break; - - case R_ASSIGN: - if (record->event.pressed) { - SEND_STRING(" <- "); - } else { - } - break; - - case R_COLS: - if (record->event.pressed) { - SEND_STRING(".leftcol[\n]\n.rightcol[\n]\n"); - } else { - } - break; - - case R_IN: - if (record->event.pressed) { - SEND_STRING(" %in% "); - } else { - } - break; - - case TEX: - if (record->event.pressed) { - SEND_STRING("\\text{}"); - } else { - } - break; - - case E_GMAIL: - if (record->event.pressed) { - SEND_STRING("john.helveston@gmail.com"); - } else { - } - break; - - case E_GWU: - if (record->event.pressed) { - SEND_STRING("jph@gwu.edu"); - } else { - } - break; - - } - - return true; -}; - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - -static void render_kyria_logo(void) { - static const char PROGMEM kyria_logo[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); -} - -static void render_qmk_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - - oled_write_P(qmk_logo, false); -} - -static void render_status(void) { - // QMK Logo and version information - render_qmk_logo(); - oled_write_P(PSTR(" Kyria rev1.0\n\n"), false); - - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (get_highest_layer(layer_state)) { - case QWERTY: - oled_write_P(PSTR("QWERTY\n"), false); - break; - case HOTKEYS: - oled_write_P(PSTR("HOTKEYS\n"), false); - break; - case TEXT: - oled_write_P(PSTR("TEXT\n"), false); - break; - case SELECT: - oled_write_P(PSTR("SELECT\n"), false); - break; - case NUMBERS: - oled_write_P(PSTR("NUMBERS\n"), false); - break; - default: - oled_write_P(PSTR("Undefined\n"), false); - } - -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_kyria_logo(); - } -} -#endif - -bool encoder_update_user(uint8_t index, bool clockwise) { - if (IS_LAYER_ON(HOTKEYS)) { - if (clockwise) { - tap_code(KC_VOLD); - } else { - tap_code(KC_VOLU); - } - } else if (IS_LAYER_ON(TEXT)) { - if (clockwise) { - tap_code(KC_MS_WH_LEFT); - } else { - tap_code(KC_MS_WH_RIGHT); - } - } else if (IS_LAYER_ON(NUMBERS)) { - if (clockwise) { - tap_code16(G(KC_MINS)); - } else { - register_code(KC_LGUI); - tap_code(KC_EQL); - unregister_code(KC_LGUI); - } - } else { - if (clockwise) { - tap_code(KC_MS_WH_UP); - } else { - tap_code(KC_MS_WH_DOWN); - } - } - return true; -} diff --git a/keyboards/kyria/keymaps/jhelvy/rules.mk b/keyboards/kyria/keymaps/jhelvy/rules.mk deleted file mode 100644 index ec4c65f70..000000000 --- a/keyboards/kyria/keymaps/jhelvy/rules.mk +++ /dev/null @@ -1,8 +0,0 @@ -AUTO_SHIFT_ENABLE = yes # Autoshift by holding down a key -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -LEADER_ENABLE = no # Enable the Leader Key feature -MOUSEKEY_ENABLE = yes -EXTRAKEY_ENABLE = yes -BACKLIGHT_ENABLE = no diff --git a/keyboards/kyria/keymaps/kejadlen/config.h b/keyboards/kyria/keymaps/kejadlen/config.h deleted file mode 100644 index 3c0951f11..000000000 --- a/keyboards/kyria/keymaps/kejadlen/config.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_SLEEP -#endif - -// EC11K encoders have a different resolution than other EC11 encoders. -// When using the default resolution of 4, if you notice your encoder skipping -// every other tick, lower the resolution to 2. -#define ENCODER_RESOLUTION 2 - -// The Leader key allows to flexibly assign macros to key sequences. -#define LEADER_PER_KEY_TIMING -#define LEADER_TIMEOUT 350 - -#define TAPPING_TERM 200 - -// Allows to use either side as the master. Look at the documentation for info: -// https://docs.qmk.fm/#/config_options?id=setting-handedness -#define EE_HANDS - -// Allows media codes to properly register in macros and rotary encoder code -#define TAP_CODE_DELAY 10 diff --git a/keyboards/kyria/keymaps/kejadlen/rules.mk b/keyboards/kyria/keymaps/kejadlen/rules.mk deleted file mode 100644 index 35ba17e4a..000000000 --- a/keyboards/kyria/keymaps/kejadlen/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -OLED_DRIVER_ENABLE = no # Enables the use of OLED displays -ENCODER_ENABLE = no # Enables the use of one or more encoders -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -LEADER_ENABLE = no # Enable the Leader Key feature -MOUSEKEY_ENABLE = no diff --git a/keyboards/kyria/keymaps/mattir/config.h b/keyboards/kyria/keymaps/mattir/config.h deleted file mode 100644 index 2c71428a9..000000000 --- a/keyboards/kyria/keymaps/mattir/config.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE -# define OLED_DISPLAY_128X64 -# define OLED_TIMEOUT 300000 -# define OLED_UPDATE_INTERVAL 30 -#endif - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_LIMIT_VAL 150 -# define RGBLIGHT_ANIMATIONS -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_SLEEP -#endif - -// If you are using an Elite C rev3 on the slave side, uncomment the lines below: -//#define SPLIT_USB_DETECT -//#define NO_USB_STARTUP_CHECK - -// Set the layer toggle to only need 2 clicks instead of 5 -#define TAPPING_TOGGLE 2 - -// EC11K encoders have a different resolution than other EC11 encoders. -#define ENCODER_RESOLUTION 2 - -// The Leader key allows to flexibly assign macros to key sequences. -#define LEADER_PER_KEY_TIMING -#define LEADER_TIMEOUT 350 - -#define TAPPING_TERM 200 - -// Allows to use either side as the master. Look at the documentation for info: -// https://docs.qmk.fm/#/config_options?id=setting-handedness -#define EE_HANDS - -// Allows media codes to properly register in macros and rotary encoder code -#define TAP_CODE_DELAY 10 diff --git a/keyboards/kyria/keymaps/mattir/keymap.c b/keyboards/kyria/keymaps/mattir/keymap.c deleted file mode 100644 index 0ee0f3d85..000000000 --- a/keyboards/kyria/keymaps/mattir/keymap.c +++ /dev/null @@ -1,292 +0,0 @@ -/* Copyright 2020 Matthew Gilbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -enum layers { - QWERTY = 0, - LOWER, - RAISE, - FUNCS, - RGBLED -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [QWERTY] = LAYOUT( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_LEAD, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, XXXXXXX, XXXXXXX, KC_MINS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, - KC_MUTE, KC_LCTL, KC_LGUI, TT(RAISE), SFT_T(KC_SPC), SFT_T(KC_SPC), TT(LOWER), KC_BSPC, KC_LALT, TG(RGBLED) - ), - [LOWER] = LAYOUT( - _______, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, - _______, KC_DLR, KC_PERC, KC_CIRC, KC_LPRN, KC_RPRN, KC_EQL, KC_PLUS, KC_MINS, KC_ASTR, KC_SLSH, _______, - TG(FUNCS), KC_AMPR, _______, _______, KC_LBRC, KC_RBRC, _______, XXXXXXX, XXXXXXX, _______, _______, _______, KC_COMM, KC_DOT, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [RAISE] = LAYOUT( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, - _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______, XXXXXXX, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, - _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______ - ), - [FUNCS] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PAST, _______, - _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PMNS, KC_P4, KC_P5, KC_P6, KC_PSLS, _______, - TG(FUNCS), KC_F11, KC_F12, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PEQL, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - [RGBLED] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, RGB_VAI, RGB_HUI, RGB_SAI, RGB_MOD, _______, _______, _______, _______, _______, _______, - _______, _______, RGB_VAD, RGB_HUD, RGB_SAD, RGB_RMOD, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, - RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, TG(RGBLED) - ), -}; - -bool is_cmd_tab_active = false; -uint16_t cmd_tab_timer = 0; - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - if (is_cmd_tab_active) { - if (timer_elapsed(cmd_tab_timer) > 1000) { - unregister_code(KC_LGUI); - is_cmd_tab_active = false; - } - } - - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_ONE_KEY(KC_A) { - tap_code16(SGUI(KC_L)); - } - SEQ_TWO_KEYS(KC_S, KC_S) { - tap_code16(SGUI(KC_5)); - } - } -} - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - -static void render_mattir_logo(void) { - static const char PROGMEM mattir_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x3c, 0xfc, 0xf8, 0xe0, - 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xe0, 0xc0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x83, 0x07, - 0x1f, 0x7e, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xfe, 0x3f, 0x1f, 0x7f, 0xff, - 0xfc, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0xf8, 0x1c, 0x0f, 0x07, 0x00, - 0x00, 0x00, 0x01, 0x07, 0x1f, 0x7e, 0xf8, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xfc, 0x7f, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0f, - 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xfe, 0xff, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x1f, 0x7f, 0xfc, 0xf0, 0xc0, 0x00, 0x00, 0x80, - 0xe0, 0xf8, 0xfe, 0x3f, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x3f, 0xff, 0xfe, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, - 0xfe, 0xff, 0x7f, 0xfc, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xfc, 0x7f, 0xff, 0xff, 0xe0, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xe0, 0xe0, 0xe0, - 0x00, 0x00, 0xe0, 0xfe, 0xfe, 0xfe, 0xe0, 0xe0, 0x00, 0xe0, 0xfe, 0xfe, 0xfe, 0xe0, 0x60, 0x00, - 0xe3, 0xe3, 0xe3, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xc0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x1f, 0x3f, 0x7f, 0x1f, - 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x07, 0xff, 0xff, 0xf8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, - 0xff, 0x07, 0x00, 0x01, 0x07, 0x1f, 0x7f, 0xf8, 0xfe, 0x3f, 0x07, 0x01, 0x00, 0x03, 0xff, 0xff, - 0xfc, 0x00, 0x00, 0x00, 0x1e, 0x7f, 0xff, 0xe1, 0xc0, 0xc0, 0xc0, 0xc0, 0xe1, 0xff, 0xff, 0xff, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, - 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0xfc, 0xff, 0x7f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xfe, 0xff, 0xff, 0x1f, 0x7f, 0xfe, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xfc, 0x7f, 0x1f, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, - 0xff, 0x3f, 0x00, 0x00, 0x00, 0x01, 0x03, 0x0f, 0x3f, 0xff, 0xfc, 0xf0, 0xc0, 0x80, 0x00, 0xc0, - 0xf0, 0xfc, 0xfe, 0x3f, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xf0, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x78, 0xff, 0xef, 0xcf, 0xce, 0xfc, 0x7c, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x38, 0x3f, 0x3f, 0x3f, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x3c, 0x3f, 0x3f, - 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x1f, 0x3f, 0x3f, 0x1f, - 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x3f, 0x3f, 0x3c, 0x38, - 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x39, 0x39, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x30, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - oled_write_raw_P(mattir_logo, sizeof(mattir_logo)); -} - -static void render_qmk_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 - }; - oled_write_P(qmk_logo, false); -} - -static void render_status(void) { - // QMK Logo and version information - render_qmk_logo(); - oled_write_P(PSTR("Matt's Kyria\n\n"), false); - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (get_highest_layer(layer_state)) { - case QWERTY: - oled_write_P(PSTR("Default\n"), false); - break; - case LOWER: - oled_write_P(PSTR("Lower\n"), false); - break; - case RAISE: - oled_write_P(PSTR("Raise\n"), false); - break; - case FUNCS: - oled_write_P(PSTR("F-keys\n"), false); - break; - case RGBLED: - oled_write_P(PSTR("Underglow\n"), false); - break; - default: - oled_write_P(PSTR("No idea dog\n"), false); - } -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_status(); // Renders the current keyboard layer - } else { - render_mattir_logo(); - } -} -#endif - -// Layer-specific encoder knob functions -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { // left knob - switch (get_highest_layer(layer_state)) { - case QWERTY: // Volume - if (clockwise) { - tap_code(KC_VOLD); - } else { - tap_code(KC_VOLU); - } - break; - case LOWER: // Desktop switching - if (clockwise) { - tap_code16(C(KC_RIGHT)); - } else { - tap_code16(C(KC_LEFT)); - } - break; - case RAISE: // Mousewheel L/R - if (clockwise) { - tap_code(KC_WH_L); - } else { - tap_code(KC_WH_R); - } - break; - case RGBLED: // Underglow color - if (clockwise) { - rgblight_increase_hue(); - } else { - rgblight_decrease_hue(); - } - break; - default: // No action - if (clockwise) { - tap_code(KC_NO); - } else { - tap_code(KC_NO); - } - break; - } - } else if (index == 1) { // right knob - switch (get_highest_layer(layer_state)) { - case QWERTY: // Undo / Redo - if (clockwise) { - tap_code16(LGUI(KC_Z)); - } else { - tap_code16(SGUI(KC_Z)); - } - break; - case LOWER: // App switching - if (clockwise) { - if (!is_cmd_tab_active) { - is_cmd_tab_active = true; - register_code(KC_LGUI); - } - cmd_tab_timer = timer_read(); - tap_code16(KC_TAB); - } else { - tap_code16(S(KC_TAB)); - } - break; - case RAISE: // Mouse wheel U/D - if (clockwise) { - tap_code(KC_WH_U); - } else { - tap_code(KC_WH_D); - } - break; - case RGBLED: // Underglow brightness - if (clockwise) { - rgblight_increase_val(); - } else { - rgblight_decrease_val(); - } - break; - default: // No action - if (clockwise) { - tap_code(KC_NO); - } else { - tap_code(KC_NO); - } - break; - } - } - return true; -} -#endif diff --git a/keyboards/kyria/keymaps/mattir/rules.mk b/keyboards/kyria/keymaps/mattir/rules.mk deleted file mode 100644 index 4f5e31be1..000000000 --- a/keyboards/kyria/keymaps/mattir/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -LEADER_ENABLE = yes # Enables the use of the leader key diff --git a/keyboards/kyria/keymaps/mattir2/rules.mk b/keyboards/kyria/keymaps/mattir2/rules.mk deleted file mode 100644 index cc5ae236f..000000000 --- a/keyboards/kyria/keymaps/mattir2/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -OLED_DRIVER_ENABLE = no # Enables the use of OLED displays -ENCODER_ENABLE = no # Enables the use of one or more encoders -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -LEADER_ENABLE = yes # Enables the use of the leader key diff --git a/keyboards/kyria/keymaps/ninjonas/config.h b/keyboards/kyria/keymaps/ninjonas/config.h deleted file mode 100644 index 5673e6c3d..000000000 --- a/keyboards/kyria/keymaps/ninjonas/config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright 2020 ninjonas - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define TAPPING_TERM 200 - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 - #define OLED_TIMEOUT 15000 -#endif - -#ifdef RGBLIGHT_ENABLE -# define RGBLIGHT_SLEEP -# define RGBLIGHT_LIMIT_VAL 200 -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_SPLIT -#endif - -// If you are using an Elite C rev3 on the slave side, uncomment the lines below: -#define SPLIT_USB_DETECT -#define SPLIT_USB_TIMEOUT 1000 diff --git a/keyboards/kyria/keymaps/ninjonas/oled.c b/keyboards/kyria/keymaps/ninjonas/oled.c deleted file mode 100644 index 65976205b..000000000 --- a/keyboards/kyria/keymaps/ninjonas/oled.c +++ /dev/null @@ -1,209 +0,0 @@ -/* Copyright 2020 ninjonas - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "ninjonas.h" - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } - -static void render_logo(void) { - static const char PROGMEM logo[] = { - // Converter: https://javl.github.io/image2cpp/ - // Image Dimensions: 128x64 - // Code Output Format: Plain Bytes - // Draw Mode: Vertical, 1 bit per pixel -0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x00, 0x00, 0xe0, -0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x80, 0xe0, 0xe0, 0xe0, 0xe0, 0x80, 0x00, 0x00, 0xe0, 0xe0, 0xe0, -0xe0, 0x00, 0x60, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0x80, 0x00, 0x00, -0xc0, 0xe0, 0xe0, 0xe0, 0x20, 0x60, 0xe0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, -0xe0, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x00, 0x00, 0x00, -0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0xe0, 0xe0, 0xfc, 0xfe, -0xfe, 0xfe, 0xee, 0xee, 0x0e, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, -0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, -0x00, 0x00, 0x79, 0xfd, 0xfd, 0xfd, 0xec, 0xee, 0x76, 0x7f, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, -0x07, 0x3f, 0xff, 0xfc, 0xf8, 0xff, 0x7f, 0x07, 0x0f, 0x7f, 0xff, 0xf8, 0xfc, 0xff, 0x3f, 0x07, -0x00, 0x00, 0x00, 0x03, 0x1f, 0xff, 0xfe, 0xf0, 0xff, 0x7f, 0x0f, 0x07, 0x3f, 0xff, 0xfc, 0xf8, -0xff, 0x7f, 0x0f, 0x01, 0x00, 0x00, 0x01, 0x0f, 0x3f, 0xff, 0xfe, 0xf8, 0xff, 0xff, 0x1f, 0x03, -0x00, 0x00, 0x1f, 0x7f, 0x7f, 0xff, 0xf6, 0xe6, 0xe6, 0xf7, 0xf7, 0x77, 0x37, 0x17, 0x00, 0x30, -0x79, 0xfd, 0xfd, 0xfd, 0xee, 0xee, 0x76, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, -0xff, 0xff, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0x7f, 0xff, 0xf1, 0xe0, 0xe0, 0xff, 0xff, 0x7f, 0x3f, -0x0e, 0x00, 0x0e, 0x3f, 0x7f, 0xff, 0xff, 0xe0, 0xe0, 0xe1, 0xff, 0x7f, 0x7f, 0x3f, 0x04, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, -0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x0e, 0x0e, 0x0f, 0x0f, 0x07, 0x03, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x0c, 0x3c, 0xfc, 0xfc, 0xfc, 0xc0, 0x00, 0xe0, 0xfc, 0xfc, 0x7c, 0x1c, 0x00, 0xf0, 0xf8, -0xf8, 0xfc, 0xdc, 0xdc, 0xdc, 0xfc, 0xfc, 0xf8, 0xf0, 0xe0, 0x00, 0x00, 0x30, 0xb8, 0xbc, 0xbc, -0xdc, 0xdc, 0xdc, 0xfc, 0xfc, 0xf8, 0xf0, 0x00, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0x1d, 0x1d, -0x00, 0xf0, 0xf8, 0xf8, 0xfc, 0x3c, 0x1c, 0x1c, 0xfc, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0xe0, 0xf0, -0xf8, 0xfc, 0x3c, 0x1c, 0x1c, 0x3c, 0xfc, 0xf8, 0xf8, 0xe0, 0x00, 0x00, 0x20, 0xb8, 0xbc, 0xbc, -0xbc, 0xdc, 0xdc, 0xfc, 0xfc, 0xfc, 0xf8, 0xe0, 0x00, 0x0c, 0x7c, 0xfc, 0xfc, 0xc0, 0x00, 0xe0, -0xfc, 0xfc, 0xfc, 0xfc, 0xf0, 0x80, 0x00, 0xf8, 0xfc, 0xfc, 0x3c, 0x04, 0x0c, 0x7c, 0xfc, 0xfc, -0xf0, 0x00, 0xc0, 0xfc, 0xfc, 0x7c, 0xfc, 0xf8, 0xc0, 0x00, 0xf0, 0xfc, 0xfc, 0x7c, 0x0c, 0x00, -0x00, 0x00, 0xc0, 0xc1, 0xc7, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x03, 0x00, 0x00, 0x00, 0x07, 0x0f, -0x1f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1e, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x06, 0x0f, 0x1f, 0x1f, 0x1f, -0x1d, 0x1d, 0x0e, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, -0x00, 0x07, 0x0f, 0x0f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x00, 0x03, 0x07, -0x0f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1e, 0x1f, 0x0f, 0x0f, 0x03, 0x00, 0x00, 0x0f, 0x1f, 0x1f, 0x1f, -0x1d, 0x1d, 0x0c, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x03, 0x1f, 0x1f, 0x1e, 0x1f, -0x0f, 0x01, 0x00, 0x07, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, -0x1f, 0x1e, 0x1f, 0x1f, 0x03, 0x00, 0x03, 0x1f, 0x1f, 0x1e, 0x1f, 0x0f, 0x01, 0x00, 0x00, 0x00, -0x00, 0x80, 0xc1, 0xf1, 0xf9, 0xf9, 0xf9, 0xb8, 0xb8, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, -0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, -0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, -0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, -0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, -0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, -0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x03, 0x7c, 0xfe, 0xff, 0xff, 0xc7, 0x83, 0x83, -0xc7, 0xff, 0xff, 0xff, 0x7c, 0x00, 0x00, 0x7c, 0xff, 0xff, 0xff, 0xc7, 0x83, 0x83, 0xc7, 0xff, -0xff, 0xfe, 0x7c, 0x00, 0xc0, 0xe6, 0xf7, 0xf7, 0xf7, 0xbb, 0xbb, 0xdb, 0xff, 0xff, 0xff, 0xfe, -0x00, 0x00, 0x03, 0x1f, 0xff, 0xff, 0xf0, 0xe0, 0xfe, 0xff, 0x1f, 0x3f, 0xff, 0xfe, 0xe0, 0xf0, -0xff, 0xff, 0x1f, 0x03, 0x00, 0x01, 0x0f, 0x7f, 0xff, 0xf8, 0xc0, 0xfc, 0xff, 0x3f, 0x1f, 0xff, -0xfe, 0xf0, 0xe0, 0xff, 0xff, 0x3f, 0x07, 0x00, 0x01, 0x07, 0x3f, 0xff, 0xff, 0xf8, 0xe0, 0xfc, -0xff, 0x7f, 0x0f, 0x03, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xdb, 0x9b, 0x9b, 0xdf, 0xdf, 0xdf, 0xde, -0x1c, 0x00, 0xc0, 0xe6, 0xf7, 0xf7, 0xf7, 0xbb, 0xbb, 0xdb, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, -0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, -0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, -0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, -0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, -0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, -0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x3f, 0x3f, 0x1f, 0x0f, -0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, -0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00 - }; - oled_write_raw_P(logo, sizeof(logo)); -} - -static void render_qmk_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - - oled_write_P(qmk_logo, false); -} - -void oled_white_space(void){ - oled_write_P(PSTR(" "), false); -} - -void oled_slash_separator(void){ - oled_write_P(PSTR(" / "), false); -} - -void render_layout_state(void) { - oled_write_P(PSTR("Layout: "), false); - switch (biton32(default_layer_state)) { - case _COLEMAK: - oled_write_P(PSTR("Colemak"), false); - break; - case _DVORAK: - oled_write_P(PSTR("Dvorak"), false); - break; - case _QWERTY: - oled_write_P(PSTR("Qwerty"), false); - break; - default: - oled_write_ln_P(PSTR("Undefined"), false); - } -} -#ifdef ENCODER_ENABLE -static void render_encoder_state(void) { - oled_write_P(PSTR("\nEnc: "), false); - bool lower = layer_state_is(_LOWER) & !layer_state_is(_ADJUST); - bool raise = layer_state_is(_RAISE) & !layer_state_is(_ADJUST); - bool adjust = layer_state_is(_ADJUST); - - if(lower){ - oled_write_P(PSTR("APPSW"), left_encoder_rotated); - oled_slash_separator(); - oled_write_P(PSTR("UPDN"), right_encoder_rotated); - } else if(raise){ - oled_write_P(PSTR("PGUD"), left_encoder_rotated); - oled_slash_separator(); - oled_write_P(PSTR("TABSW"), right_encoder_rotated); - } else if(adjust){ - oled_write_P(PSTR("RHUE"), left_encoder_rotated); - oled_slash_separator(); - oled_write_P(PSTR("RBRI"), right_encoder_rotated); - } else { - oled_write_P(PSTR("BRI"), left_encoder_rotated); - oled_slash_separator(); - oled_write_P(PSTR("VOL"), right_encoder_rotated); - } - - if (timer_elapsed(encoder_rotated_timer) > 200) { - left_encoder_rotated = false; - right_encoder_rotated = false; - } -} -#endif - -static void render_layer_state(void) { - oled_write_P(PSTR("\nLayer:"), false); - bool lower = layer_state_is(_LOWER) & !layer_state_is(_ADJUST); - bool raise = layer_state_is(_RAISE) & !layer_state_is(_ADJUST); - bool adjust = layer_state_is(_ADJUST); - bool numpad = layer_state_is(_NUMPAD); - - if(lower){ - oled_write_P(PSTR(" Lower "), true); - } else if(raise){ - oled_write_P(PSTR(" Raise "), true); - } else if(adjust){ - oled_write_P(PSTR(" Adjust "), true); - } else if(numpad) { - oled_write_P(PSTR(" Numpad "), true); - } else { - oled_write_P(PSTR(" Default"), false); - } -} - -void render_mod_state(uint8_t modifiers) { - oled_write_P(PSTR("\nMods: "), false); - oled_write_P(PSTR("SHF"), (modifiers & MOD_MASK_SHIFT)); - oled_white_space(); - oled_write_P(PSTR("CTL"), (modifiers & MOD_MASK_CTRL)); - oled_white_space(); - oled_write_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT)); - oled_white_space(); - oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); -} - -static void render_status(void) { - render_qmk_logo(); - render_layout_state(); - #ifdef ENCODER_ENABLE - render_encoder_state(); - #endif - render_layer_state(); - render_mod_state(get_mods()|get_oneshot_mods()); -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_status(); - } else { - render_logo(); - oled_scroll_left(); - } -} -#endif \ No newline at end of file diff --git a/keyboards/kyria/keymaps/ninjonas/rules.mk b/keyboards/kyria/keymaps/ninjonas/rules.mk deleted file mode 100644 index 94c06b80e..000000000 --- a/keyboards/kyria/keymaps/ninjonas/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -LTO_ENABLE = yes - -SRC += oled.c diff --git a/keyboards/kyria/keymaps/pierrec83/config.h b/keyboards/kyria/keymaps/pierrec83/config.h deleted file mode 100644 index eb222c0d7..000000000 --- a/keyboards/kyria/keymaps/pierrec83/config.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright 2020 Pierre Chevalier - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 -#endif - -#ifdef ENCODER_ENABLE - #define ENCODER_DIRECTION_FLIP - #define ENCODER_RESOLUTION 2 -#endif - -#define TAPPING_TERM 200 -#define PERMISSIVE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT -#define TAPPING_FORCE_HOLD -// Allows to use either side as the master. Look at the documentation for info: -// https://docs.qmk.fm/#/config_options?id=setting-handedness -#define EE_HANDS - -// Allows media codes to properly register in macros and rotary encoder code -#define TAP_CODE_DELAY 10 - -// If you are using an Elite C rev3 on the slave side, uncomment the lines below: -// #define SPLIT_USB_DETECT -// #define NO_USB_STARTUP_CHECK - -// Set the mouse settings to a comfortable speed/accuracy trade-off -// Assume the screen refresh rate is 60 Htz or higher -// The default is 50. This makes the mouse ~3 times faster and more accurate -#define MOUSEKEY_INTERVAL 16 -// The default is 20. Since we made the mouse about 3 times faster with the previous setting, -// give it more time to accelerate to max speed to retain precise control over short distances. -#define MOUSEKEY_TIME_TO_MAX 40 -// The default is 300. Let's try and make this as low as possible while keeping the cursor responsive -#define MOUSEKEY_DELAY 100 -// It makes sense to use the same delay for the mouseweel -#define MOUSEKEY_WHEEL_DELAY 100 -// The default is 100 -#define MOUSEKEY_WHEEL_INTERVAL 50 -// The default is 40 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 100 - diff --git a/keyboards/kyria/keymaps/pierrec83/rules.mk b/keyboards/kyria/keymaps/pierrec83/rules.mk deleted file mode 100644 index 78f0ac93f..000000000 --- a/keyboards/kyria/keymaps/pierrec83/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -OLED_DRIVER_ENABLE = no # Enables the use of OLED displays -ENCODER_ENABLE = yes # ENables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow - -SRC += encoders.c diff --git a/keyboards/kyria/keymaps/plattfot/config.h b/keyboards/kyria/keymaps/plattfot/config.h deleted file mode 100644 index 5ec5fc584..000000000 --- a/keyboards/kyria/keymaps/plattfot/config.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright 2019 Thomas Baart - * Copyright 2020-2021 Fredrik Salomonsson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 -#endif - -#define ENCODER_DIRECTION_FLIP -// Fixing the skipping with the EC11K encoder -#define ENCODER_RESOLUTION 2 - -#define EE_HANDS - -// The Leader key allows to flexibly assign macros to key sequences. -#define LEADER_PER_KEY_TIMING -#define LEADER_TIMEOUT 350 - -// Remove the delay for the OSL keys. Not using any other tap keys. -// Otherwise TAPPING_TERM_PER_KEY would be the way to go. -#define TAPPING_TERM 0 - diff --git a/keyboards/kyria/keymaps/plattfot/keymap.c b/keyboards/kyria/keymaps/plattfot/keymap.c deleted file mode 100644 index 78e30c156..000000000 --- a/keyboards/kyria/keymaps/plattfot/keymap.c +++ /dev/null @@ -1,480 +0,0 @@ -/* Copyright 2020-2021 Fredrik Salomonsson - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H -#include "version.h" - -enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // can always be here - // New keys - CLO_TAP, // Close the next key press -}; - -// Close tap feature based on a post from drashna -// https://www.reddit.com/r/olkb/comments/citkbx/double_key_press_modifier_qmkwould_work_like/ev9cue8/ -// Will insert the closing equivalent key and move the cursor inside. -// For example clo_tap and then ( will result in (|), where | is the -// cursor. For " it will be "|" as the close equivalent key is the -// same key. -enum close_tap_modes { - CLO_DISABLED = 0b000, - CLO_PRESSED = 0b001, // Close tap key is pressed - CLO_ACTIVE = 0b010, // Close tap next keypress - CLO_USED = 0b100, // Turn off when close tap key is released -}; - -#define CLO_RELEASE(flag) flag & ~CLO_PRESSED - -static enum close_tap_modes close_tap_it = CLO_DISABLED; - -enum layers { - _DEFAULT, - _LOWER, - _RAISE, - _NAV, - _ADJUST, -}; - -#define MO_ADJT MO(_ADJUST) -#define L_RAISE OSL(_RAISE) -#define L_LOWER OSL(_LOWER) -#define L_NAV MO(_NAV) -#define EU_TDOT RSA(KC_SLSH) -#define EU_CDOT RALT(KC_EQUAL) -#define EU_DEG RALT(KC_SCLN) - -// clang-format off -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * Base Layer: Default - * - * ,-------------------------------------------. ,-------------------------------------------. - * | Esc | Q | W | E | R | T | | Y | U | I | O | P | Del | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | Tab | A | S | D | F | G | | H | J | K | L | ; | ' | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | Lead | RAISE| | LOWER|BSpace| N | M | , | . | / | RShift | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | MPlay| GUI | LCtrl| Space| LALT | | RCtrl| Enter| NAV | RALT |Scroll| - * | | | | | | | | | | | Lock | - * `----------------------------------' `----------------------------------' - */ - [_DEFAULT] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LEAD, L_RAISE, L_LOWER, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_MPLY,KC_LGUI,KC_LCTL, KC_SPACE, KC_LALT, KC_RCTL, KC_ENT, L_NAV, KC_RALT, KC_SLCK - ), - -/* - * Lower Layer: Left symbols - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | ! | @ | # | $ | % | | F6 | F7 | F8 | F9 | F10 | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | | _ | \ | - | + | | F12 | | | | | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | ° | : | ( | ) | × | |ADJUST| | | |CLOTAP| | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_LOWER] = LAYOUT( - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, KC_PIPE, KC_UNDS, KC_BSLS, KC_MINS, KC_PLUS, KC_F12, _______, _______, _______, _______, _______, - _______, EU_DEG, KC_COLN, KC_LPRN, KC_RPRN, EU_CDOT, _______, MO_ADJT, _______, _______, CLO_TAP, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -/* - * Raise Layer: Right symbols + state - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | ^ | & | * | ~ | ? | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | | | | F11 | | = | { | } | [ | ] | ` | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | |CLOTAP| | | |ADJUST| | … | " | < | > | / |CapsLock| - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | Mute | | | | | | | | | |Insert| - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_RAISE] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_CIRC, KC_AMPR, KC_ASTR, KC_TILDE,KC_QUES, _______, - _______, _______, _______, _______, _______, KC_F11, KC_EQUAL,KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_GRV, - _______, _______, _______, _______, _______, CLO_TAP, _______, _______, MO_ADJT, _______, EU_TDOT, KC_DQUO, KC_LT, KC_GT, _______, KC_CAPS, - KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS - - ), -/* - * Navigation Layer: Number/Function keys, navigation - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | | | | | | | Left | Up | Down | Right| | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_NAV] = LAYOUT( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -/* - * Adjust Layer: RGB - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | | | | | | | | | | | | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | TOG | SAI | HUI | VAI | MOD | | | | | | | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_ADJUST] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, _______, _______, _______, - _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -// /* -// * Layer template -// * -// * ,-------------------------------------------. ,-------------------------------------------. -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | | | | | -// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' -// * | | | | | | | | | | | | -// * | | | | | | | | | | | | -// * `----------------------------------' `----------------------------------' -// */ -// [_LAYERINDEX] = LAYOUT( -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -// ), -}; -// clang-format on - -/* void keyboard_post_init_user(void) { */ -/* rgblight_setrgb(51, 135, 204); */ -/* } */ -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch (keycode) { - case CLO_TAP: - close_tap_it = close_tap_it & CLO_ACTIVE? - CLO_USED: - CLO_ACTIVE|CLO_PRESSED; - return false; - case KC_LEAD: - close_tap_it = CLO_DISABLED; - return true; - } - } else if (close_tap_it & CLO_ACTIVE && - keycode != CLO_TAP && - keycode != OSL(_RAISE) && - keycode != OSL(_LOWER) && - keycode != MO(_NAV)) { - - close_tap_it = close_tap_it & CLO_PRESSED? - close_tap_it | CLO_USED: - CLO_DISABLED; - switch(keycode) - { - case KC_LPRN: - tap_code16(KC_RPRN); - tap_code16(KC_LEFT); - break; - case KC_RPRN: - tap_code16(KC_LEFT); - tap_code16(KC_LPRN); - break; - case KC_LCBR: - tap_code16(KC_RCBR); - tap_code16(KC_LEFT); - break; - case KC_RCBR: - tap_code16(KC_LEFT); - tap_code16(KC_LCBR); - break; - case KC_LBRC: - tap_code16(KC_RBRC); - tap_code16(KC_LEFT); - break; - case KC_RBRC: - tap_code16(KC_LEFT); - tap_code16(KC_LBRC); - break; - case KC_LT: - tap_code16(KC_GT); - tap_code16(KC_LEFT); - break; - case KC_GT: - tap_code16(KC_LEFT); - tap_code16(KC_LT); - break; - default: - tap_code16(keycode); - tap_code16(KC_LEFT); - break; - } - } else { - switch (keycode) { - case CLO_TAP: - close_tap_it = close_tap_it & CLO_USED? - CLO_DISABLED: - CLO_RELEASE(close_tap_it); - } - } - - return true; -} - -//layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } - -// clang-format off -static void render_qmk_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - - oled_write_P(qmk_logo, false); -} -// clang-format on -static void render_static_info(void) { - render_qmk_logo(); - oled_write_P(PSTR("Kyria rev1.0\n"), false); - oled_write_P(PSTR("Keymap: plattfot v2\n"), false); -} - -static void render_status(void) { - // QMK Logo and version information - render_qmk_logo(); - oled_write_P(PSTR("Kyria rev1.0\n"), false); - oled_write_P(PSTR("v" QMK_VERSION "\n"), false); - - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (get_highest_layer(layer_state)) { - case _DEFAULT: - oled_write_P(PSTR("base\n"), false); - break; - case _LOWER: - oled_write_P(PSTR("<-sym/fun->\n"), false); - break; - case _RAISE: - oled_write_P(PSTR("<-fun/sym->\n"), false); - break; - case _NAV: - oled_write_P(PSTR("num/nav\n"), false); - break; - case _ADJUST: - oled_write_P(PSTR("adjust\n"), false); - break; - default: - oled_write_P(PSTR("undefined\n"), false); - } - - // Host Keyboard LED Status and Double tap - led_t led_state = host_keyboard_led_state(); - if (led_state.num_lock) { - oled_write_P(PSTR("NUMLCK "), false); - } else if (close_tap_it) { - oled_write_P(PSTR("Close "), false); - } else { - oled_write_P(PSTR(" "), false); - } - - if (led_state.caps_lock) { - oled_write_P(PSTR("CAPLCK "), false); - } else if (close_tap_it) { - oled_write_P(PSTR("Tap "), false); - } else { - oled_write_P(PSTR(" "), false); - } - - oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_static_info(); - } -} -#endif - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - switch (get_highest_layer(layer_state)) { - case _LOWER: - // Skip/Prev song - if (clockwise) { - tap_code(KC_MNXT); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } else { - tap_code(KC_MPRV); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } - break; - case _NAV: - // Brightness control - if (clockwise) { - tap_code(KC_BRIU); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } else { - tap_code(KC_BRID); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } - break; - default: - // Volume control - if (clockwise) { - tap_code(KC_VOLU); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } else { - tap_code(KC_VOLD); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } - break; - } - } else if (index == 1) { - switch (get_highest_layer(layer_state)) { - case _RAISE: - // Scroll through the workspaces - if (clockwise) { - tap_code16(G(KC_GT)); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } else { - tap_code16(G(KC_LT)); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } - break; - default: - // Scrolling - if (clockwise) { - tap_code(KC_PGDN); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } else { - tap_code(KC_PGUP); - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } - break; - } - } - return true; -} -#endif - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - LEADER_DICTIONARY() { - leading = false; - leader_end(); - // Sway navigation - SEQ_ONE_KEY(KC_Q) { // Jump to workspace 1 - SEND_STRING(SS_LGUI("1")); - } - SEQ_ONE_KEY(KC_W) { // Jump to workspace 2 - SEND_STRING(SS_LGUI("2")); - } - SEQ_ONE_KEY(KC_E) { // Jump to workspace 3 - SEND_STRING(SS_LGUI("3")); - } - SEQ_ONE_KEY(KC_R) { // Jump to workspace 4 - SEND_STRING(SS_LGUI("4")); - } - SEQ_ONE_KEY(KC_T) { // Jump to workspace 5 - SEND_STRING(SS_LGUI("5")); - } - - SEQ_ONE_KEY(KC_Y) { // Jump to workspace 6 - SEND_STRING(SS_LGUI("6")); - } - SEQ_ONE_KEY(KC_U) { // Jump to workspace 7 - SEND_STRING(SS_LGUI("7")); - } - SEQ_ONE_KEY(KC_I) { // Jump to workspace 8 - SEND_STRING(SS_LGUI("8")); - } - SEQ_ONE_KEY(KC_O) { // Jump to workspace 9 - SEND_STRING(SS_LGUI("9")); - } - SEQ_ONE_KEY(KC_P) { // Jump to workspace 0 - SEND_STRING(SS_LGUI("0")); - } - SEQ_ONE_KEY(KC_G) { // View scratch pad - SEND_STRING(SS_LGUI("-")); - } - - // Sway move window - SEQ_TWO_KEYS(KC_M, KC_Q) { // Move to workspace 1 - SEND_STRING(SS_LSFT(SS_LGUI("1"))); - } - SEQ_TWO_KEYS(KC_M, KC_W) { // Move to workspace 2 - SEND_STRING(SS_LSFT(SS_LGUI("2"))); - } - SEQ_TWO_KEYS(KC_M, KC_E) { // Move to workspace 3 - SEND_STRING(SS_LSFT(SS_LGUI("3"))); - } - SEQ_TWO_KEYS(KC_M, KC_R) { // Move to workspace 4 - SEND_STRING(SS_LSFT(SS_LGUI("4"))); - } - SEQ_TWO_KEYS(KC_M, KC_T) { // Move to workspace 5 - SEND_STRING(SS_LSFT(SS_LGUI("5"))); - } - - SEQ_TWO_KEYS(KC_M, KC_Y) { // Move to workspace 6 - SEND_STRING(SS_LSFT(SS_LGUI("6"))); - } - SEQ_TWO_KEYS(KC_M, KC_U) { // Move to workspace 7 - SEND_STRING(SS_LSFT(SS_LGUI("7"))); - } - SEQ_TWO_KEYS(KC_M, KC_I) { // Move to workspace 8 - SEND_STRING(SS_LSFT(SS_LGUI("8"))); - } - SEQ_TWO_KEYS(KC_M, KC_O) { // Move to workspace 9 - SEND_STRING(SS_LSFT(SS_LGUI("9"))); - } - SEQ_TWO_KEYS(KC_M, KC_P) { // Move to workspace 0 - SEND_STRING(SS_LSFT(SS_LGUI("0"))); - } - SEQ_TWO_KEYS(KC_M, KC_G) { // Move to scratch pad - SEND_STRING(SS_LSFT(SS_LGUI("-"))); - } - } -} diff --git a/keyboards/kyria/keymaps/plattfot/rules.mk b/keyboards/kyria/keymaps/plattfot/rules.mk deleted file mode 100644 index 412546d09..000000000 --- a/keyboards/kyria/keymaps/plattfot/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -LEADER_ENABLE = yes # Enable the Leader Key feature -MOUSEKEY_ENABLE = no # Disable mouse, need to save space. diff --git a/keyboards/kyria/keymaps/rmw/config.h b/keyboards/kyria/keymaps/rmw/config.h deleted file mode 100644 index 02e5087b3..000000000 --- a/keyboards/kyria/keymaps/rmw/config.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#define MACOSX - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 -#endif - -// If you are using an Elite C rev3 on the follower side, uncomment the lines below: -// #define SPLIT_USB_DETECT -// #define NO_USB_STARTUP_CHECK - - diff --git a/keyboards/kyria/keymaps/rmw/rules.mk b/keyboards/kyria/keymaps/rmw/rules.mk deleted file mode 100644 index d41ffaef6..000000000 --- a/keyboards/kyria/keymaps/rmw/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -OLED_DRIVER_ENABLE = no # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -TAP_DANCE_ENABLE=yes # Enables Tap Dance diff --git a/keyboards/kyria/keymaps/shinze/config.h b/keyboards/kyria/keymaps/shinze/config.h deleted file mode 100644 index f00bfa8e7..000000000 --- a/keyboards/kyria/keymaps/shinze/config.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 -#endif - -// If you are using an Elite C rev3 on the slave side, uncomment the lines below: -// #define SPLIT_USB_DETECT -// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/kyria/keymaps/shinze/keymap.c b/keyboards/kyria/keymaps/shinze/keymap.c deleted file mode 100644 index 29f6dc079..000000000 --- a/keyboards/kyria/keymaps/shinze/keymap.c +++ /dev/null @@ -1,248 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H -#include "keymap_bepo.h" - -enum layers { - _BEPO = 0, - _LOWER, - _RAISE, - _ADJUST -}; - -#define RESC LT(_RAISE, KC_ESC) -#define BP_EA BP_E_ACUTE -#define BP_AG BP_AGRV -#define BP_EG BP_E_GRAVE -#define BP_DC BP_DCRC -#define BP_AP BP_APOS -#define BP_CO BP_COMM -#define BP_DT BP_DOT -#define LS KC_LSFT -#define BP_DOL BP_DOLLAR - -/* Bottom Row */ -#define BR01 KC_LCTL -#define BR02 KC_LALT -#define BR03 MT(MOD_LGUI, KC_ENT) -#define BR04 LT(_LOWER, KC_SPC) -#define BR05 LT(_RAISE, KC_ESC) -#define BR06 LT(_LOWER, KC_ENT) -#define BR07 LT(_RAISE, KC_SPC) -#define BR08 KC_TAB -#define BR09 KC_BSPC -#define BR10 KC_RALT - -/* Under the screen row */ -#define U1 KC_LSFT - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* - * Base Layer: BÉPO - * - * ,-------------------------------------------. ,-------------------------------------------. - * |RAIS/ESC| B | É | P | O | È | | ^ | V | D | L | J | | Z | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | W | A | U | I | E | , | | C | T | S | R | N | M | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | LShift | À | Y | X | . | K | SPC |LShift| |LShift|LShift| ’ | Q | G | H | F | Ç | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | CTRL | Alt | Enter| Space| Esc | | Enter| Space| Tab | Bksp | AltGr| - * | | | CMD | Lower| Raise| | Lower| Raise| | | | - * `----------------------------------' `----------------------------------' - */ - [_BEPO] = LAYOUT( - RESC, BP_B, BP_EA, BP_P, BP_O, BP_EG, BP_DC, BP_V, BP_D, BP_L, BP_J, BP_Z, - BP_W, BP_A, BP_U, BP_I, BP_E, BP_CO, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, - LS, BP_AG, BP_Y, BP_X, BP_DT, BP_K, KC_SPC, U1, U1, U1, BP_AP, BP_Q, BP_G, BP_H, BP_F, BP_CCED, - BR01, BR02, BR03, BR04, BR05, BR06, BR07, BR08, BR09, BR10 - ), -/* - * Lower Layer: Numbers and symbols ? - * - * ,-------------------------------------------. ,-------------------------------------------. - * | $ | " | « | » | ( | ) | | @ | + | - | / | * | = | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | # | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ° | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | % | | | | | | | | | | | | | | | | ` | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_LOWER] = LAYOUT( - BP_DOL , BP_DQUO, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLASH, BP_ASTR, BP_EQL, - BP_HASH, BP_1, BP_2, BP_3, BP_4, BP_5, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEGR, - BP_PERC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BP_GRV, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -/* - * Raise Layer: Media - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | | | | | | | | | | | | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | Prev | Play | Next | VolUp| | Left | Down | Up | Right| | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | Mute | VolDn| | | | | | MLeft| Mdown| MUp |MRight| | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_RAISE] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, - _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -/* - * Adjust Layer: Function keys, RGB - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | TOG | SAI | HUI | VAI | MOD | | | | | F11 | F12 | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_ADJUST] = LAYOUT( - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, - _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -// /* -// * Layer template -// * -// * ,-------------------------------------------. ,-------------------------------------------. -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | | | | | -// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' -// * | | | | | | | | | | | | -// * | | | | | | | | | | | | -// * `----------------------------------' `----------------------------------' -// */ -// [_LAYERINDEX] = LAYOUT( -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -// ), -}; - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - -static void render_kyria_logo(void) { - static const char PROGMEM kyria_logo[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); -} - -static void render_qmk_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - - oled_write_P(qmk_logo, false); -} - -static void render_status(void) { - // QMK Logo and version information - render_qmk_logo(); - oled_write_P(PSTR("Kyria rev1.0\n\n"), false); - - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (get_highest_layer(layer_state)) { - case _BEPO: - oled_write_P(PSTR("BEPO\n"), false); - break; - case _LOWER: - oled_write_P(PSTR("NumSym\n"), false); - break; - case _RAISE: - oled_write_P(PSTR("Media\n"), false); - break; - case _ADJUST: - oled_write_P(PSTR("Adjust\n"), false); - break; - default: - oled_write_P(PSTR("Undefined\n"), false); - } - - // Host Keyboard LED Status - uint8_t led_usb_state = host_keyboard_leds(); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_kyria_logo(); - } -} -#endif - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - // Volume control - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - } - else if (index == 1) { - // Page up/Page down - if (clockwise) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - } - return true; -} -#endif diff --git a/keyboards/kyria/keymaps/shinze/rules.mk b/keyboards/kyria/keymaps/shinze/rules.mk deleted file mode 100644 index 604e15465..000000000 --- a/keyboards/kyria/keymaps/shinze/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/kyria/keymaps/tessachka/config.h b/keyboards/kyria/keymaps/tessachka/config.h deleted file mode 100644 index a5529128d..000000000 --- a/keyboards/kyria/keymaps/tessachka/config.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_SLEEP -#endif diff --git a/keyboards/kyria/keymaps/tessachka/keymap.c b/keyboards/kyria/keymaps/tessachka/keymap.c deleted file mode 100644 index 38307f964..000000000 --- a/keyboards/kyria/keymaps/tessachka/keymap.c +++ /dev/null @@ -1,241 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - - -enum layers { - QWERTY = 0, - LOWER, - RAISE, - ADJUST -}; - -enum custom_keycodes { - RGBRST = SAFE_RANGE, - KC_RACL -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * Base Layer: QWERTY - * - * ,-------------------------------------------. ,-------------------------------------------. - * | ESC | Q | W | E | R | T | | Y | U | I | O | P | BSPC | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | TAB/ADJ| A | S | D | F | G | | H | J | K | L | ; : | ENTER | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | LSHIFT | Z | X | C | V | B | | | | | | N | M | , < | . > | / ? | F16 | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | Space| | MYCM | Calc | F15 | | | - * | | | Ctrl | LAlt | Lower| | Raise| | | | | - * `----------------------------------' `----------------------------------' - */ - [QWERTY] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - LT(ADJUST,KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_F16, - XXXXXXX, XXXXXXX, KC_LCTL, KC_LALT, LT(LOWER,KC_SPC), LT(RAISE,KC_MYCM), KC_CALC, KC_F15, XXXXXXX, XXXXXXX - ), -/* - * Lower Layer: Numbers and symbols - * - * ,-------------------------------------------. ,-------------------------------------------. - * | ` | 1 ! | 2 @ | 3 # | 4 $ | 5 % | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | DEL | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | CAPS | - _ | = + | [ { | ] } | | | | | | | ' " | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | LSHIFT | TAB | | | | | | | | | | Home | PgDn | PgUp | End | \ | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | Space| | Space| | | | | - * | | | Ctrl | LAlt | Lower| | | | | | | - * `----------------------------------' `----------------------------------' - */ - [LOWER] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, - KC_CAPS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_QUOT, KC_NO, - KC_LSFT, KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSLS, KC_NO, - _______, _______, _______, _______, _______, KC_SPC, KC_NO, KC_NO, _______, _______ - ), -/* - * Raise Layer: Function Keys - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | |EEPRST| | | | | | | | | | F12 | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | LSHIFT | TAB | RESET| | | | | | | | | Play | | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | Space| | MYCM | Prev | Next | | | - * | | | Ctrl | LAlt | | | Raise| | | | | - * `----------------------------------' `----------------------------------' - */ - [RAISE] = LAYOUT( - KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_NO, KC_NO, EEP_RST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F12, - KC_LSFT, KC_TAB, RESET, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, KC_MPLY, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - _______, _______, _______, _______, KC_SPC , KC_MPRV, KC_MNXT, _______, _______, _______ - ), -/* - * Adjust Layer: Arrow keys, RGB - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | BTN2 | Up | BTN1 |RGBMOD|RGBTOG| | | | | | | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | Left | Down | Right|RGBSAI|RGBHUI| | | | | | | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | RGBRST | |RGBVAI|RGBVAD|RGBSAD|RGBHUD| | | | | | | | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | WBAK | BTN3 | WFWD | | MYCM | Calc | F15 | | | - * | | | | | | | Raise| | | | | - * `----------------------------------' `----------------------------------' - */ - [ADJUST] = LAYOUT( - KC_NO, KC_BTN2, KC_UP, KC_BTN1, RGB_MOD, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, RGB_SAI, RGB_HUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - RGBRST, KC_NO, RGB_VAI, RGB_VAD, RGB_SAD, RGB_HUD, _______, _______, _______, _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - _______, _______, KC_WBAK, KC_BTN3, KC_WFWD, _______, _______, _______, _______, _______ - ), -// /* -// * Layer template -// * -// * ,-------------------------------------------. ,-------------------------------------------. -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | | | | | -// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' -// * | | | | | | | | | | | | -// * | | | | | | | | | | | | -// * `----------------------------------' `----------------------------------' -// */ -// [LAYERINDEX] = LAYOUT( -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -// ), -}; - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, LOWER, RAISE, ADJUST); -} - -// bool process_record_user(uint16_t keycode, keyrecord_t *record) { -// switch (keycode) { -// case MyCustomKeycode: -// if (record->event.pressed) { -// // What to do if the button was pressed -// } else { -// // What to do if the button was released -// } -// break; -// } -// return true; -// } - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - -static void render_kyria_logo(void) { - static const char PROGMEM kyria_logo[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); -} - -static void render_tessachka_logo(void) { - static const char PROGMEM Tessachka_OLED_Logo_Inverted[] = - { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 192, 192, 192, 192, 192, 192, - 192, 192, 192, 64, 0, 0, 128, 128, 192, 192, 192, 192, 192, 192, 64, 0, 0, - 128, 192, 192, 192, 192, 192, 192, 192, 192, 192, 64, 0, 0, 128, 192, 192, 192, - 192, 192, 192, 192, 192, 192, 64, 0, 0, 0, 0, 0, 0, 192, 192, 0, 0, - 0, 0, 0, 0, 0, 128, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 0, - 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 0, 192, 128, 0, 0, - 0, 0, 128, 192, 192, 128, 0, 0, 0, 0, 0, 0, 0, 192, 192, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 1, 1, 1, 255, 255, 255, 127, 1, 1, 1, 0, 24, 126, 255, 255, 219, - 219, 153, 153, 153, 137, 128, 128, 0, 135, 143, 159, 153, 153, 153, 153, 153, 153, - 249, 240, 224, 0, 135, 143, 159, 153, 153, 153, 153, 153, 153, 249, 240, 224, 0, - 0, 192, 240, 252, 159, 135, 135, 159, 124, 240, 192, 0, 60, 255, 255, 231, 195, - 129, 0, 0, 0, 129, 195, 195, 195, 0, 255, 255, 255, 24, 24, 24, 24, 24, - 24, 255, 255, 255, 0, 255, 255, 255, 28, 62, 127, 247, 227, 193, 128, 0, 0, - 0, 192, 240, 252, 159, 135, 135, 159, 124, 240, 192, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 3, 3, 3, 3, 1, 0, 0, - 0, 1, 3, 3, 3, 3, 3, 3, 3, 3, 1, 0, 0, 0, 1, 3, 3, - 3, 3, 3, 3, 3, 3, 1, 0, 0, 3, 3, 3, 3, 3, 3, 1, 0, - 0, 1, 3, 3, 0, 0, 1, 3, 3, 3, 3, 3, 3, 3, 3, 1, 0, - 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 1, 3, - 0, 0, 0, 0, 1, 3, 3, 1, 0, 3, 3, 3, 3, 3, 3, 1, 0, - 0, 1, 3, 3, 0, 0, 0, 0, 0, 0 - }; - oled_write_raw_P(Tessachka_OLED_Logo_Inverted, sizeof(Tessachka_OLED_Logo_Inverted)); - oled_advance_page(false); - oled_advance_page(false); - oled_advance_page(false); -} - -static void render_status(void) { - // Logo and version information - render_tessachka_logo(); - oled_write_P(PSTR("Kyria rev1.0\n\n"), false); - - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (get_highest_layer(layer_state)) { - case QWERTY: - oled_write_P(PSTR("Default\n"), false); - break; - case LOWER: - oled_write_P(PSTR("Lower\n"), false); - break; - case RAISE: - oled_write_P(PSTR("Raise\n"), false); - break; - case ADJUST: - oled_write_P(PSTR("Adjust\n"), false); - break; - default: - oled_write_P(PSTR("Undefined\n"), false); - } - - // Host Keyboard LED Status - uint8_t led_usb_state = host_keyboard_leds(); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_kyria_logo(); - } -} -#endif diff --git a/keyboards/kyria/keymaps/tessachka/rules.mk b/keyboards/kyria/keymaps/tessachka/rules.mk deleted file mode 100644 index b7d691efd..000000000 --- a/keyboards/kyria/keymaps/tessachka/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MOUSEKEY_ENABLE = yes diff --git a/keyboards/kyria/keymaps/thomasbaart/config.h b/keyboards/kyria/keymaps/thomasbaart/config.h deleted file mode 100644 index 6128133ed..000000000 --- a/keyboards/kyria/keymaps/thomasbaart/config.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#ifdef RGBLIGHT_ENABLE - #define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_SLEEP -#endif - -// EC11K encoders have a different resolution than other EC11 encoders. -// When using the default resolution of 4, if you notice your encoder skipping -// every other tick, lower the resolution to 2. -#define ENCODER_RESOLUTION 2 - -// The Leader key allows to flexibly assign macros to key sequences. -#define LEADER_PER_KEY_TIMING -#define LEADER_TIMEOUT 350 - -#define TAPPING_TERM 200 - -// Allows to use either side as the master. Look at the documentation for info: -// https://docs.qmk.fm/#/config_options?id=setting-handedness -#define EE_HANDS - -// Allows media codes to properly register in macros and rotary encoder code -#define TAP_CODE_DELAY 10 diff --git a/keyboards/kyria/keymaps/thomasbaart/keymap.c b/keyboards/kyria/keymaps/thomasbaart/keymap.c deleted file mode 100644 index aed9d9762..000000000 --- a/keyboards/kyria/keymaps/thomasbaart/keymap.c +++ /dev/null @@ -1,359 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -uint16_t copy_paste_timer; - -enum layers { - QWERTY = 0, - LOWER, - RAISE, - NAV, - ADJUST -}; - -enum custom_keycodes { - KC_CCCV = SAFE_RANGE -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * Base Layer: QWERTY - * - * ,-------------------------------------------. ,-------------------------------------------. - * | ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | LSFT | A | S | D | F | G | | H | J | K | L | ; : | ' " | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | LCTL | Z | X | C | V | B | CCCV | | | Del |Leader| N | M | , < | . > | / ? | - _ | - * `----------------------+------+------+------+------+ | |------+------+------+------+------+----------------------' - * | GUI | Alt | | Space| Enter| | Bspc | Space| | Tab | AltGr| - * | | | Lower| Shift| Alt | | | Nav | Raise| | | - * `----------------------------------' `----------------------------------' - */ - [QWERTY] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, - KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CCCV, XXXXXXX, KC_DEL, KC_LEAD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, - KC_LGUI, KC_LALT, MO(LOWER), MT(MOD_LSFT, KC_SPC), MT(MOD_LALT, KC_ENT), KC_BSPC, LT(NAV, KC_SPC), MO(RAISE), KC_TAB, KC_RALT - ), -/* - * Lower Layer: Numpad, Media - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | | | VolUp| | | | / ? | 7 & | 8 * | 9 ( | - _ | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | Prev | Play | Next | | | * | 4 $ | 5 % | 6 ^ | , < | + | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | VolDn| Mute | | | | | | | 0 ) | 1 ! | 2 @ | 3 # | = + | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | Lower| | | | | Nav | Raise| | | - * `----------------------------------' `----------------------------------' - */ - [LOWER] = LAYOUT( - _______, _______, _______, KC_VOLU, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_MINS, _______, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_ASTR, KC_4, KC_5, KC_6, KC_COMM, KC_PLUS, - _______, _______, _______, KC_VOLD, KC_MUTE, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_EQL, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -/* - * Raise Layer: Symbols - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | ! | @ | { | } | | | | | _ | € | | | \ | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` | | + | - | / | * | % | ' " | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | | | & | = | , | . | / ? | - _ | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | Lower| | | | | Nav | Raise| | | - * `----------------------------------' `----------------------------------' - */ - [RAISE] = LAYOUT( - _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_UNDS, ALGR(KC_5),_______,_______,KC_BSLS, - _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, - _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -/* - * Navigation Layer - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | | | | | | | PgUp | Home | Up | End | | ScrlLk | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | | | | | | PgDn | Left | Down | Right| | CapsLk | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | Lower| | | | | Nav | Raise| | | - * `----------------------------------' `----------------------------------' - */ - [NAV] = LAYOUT( - _______, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, KC_SLCK, - _______, _______, _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_CAPS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -/* - * Adjust Layer - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | | | | | | | | F7 | F8 | F9 | F10 | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | SAI | HUI | VAI | | | | F4 | F5 | F6 | F11 | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | SAD | HUD | VAD | | | | | | | | F1 | F2 | F3 | F12 | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [ADJUST] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, - _______, _______, RGB_SAI, RGB_HUI, RGB_VAI, _______, _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, - _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -// /* -// * Layer template -// * -// * ,-------------------------------------------. ,-------------------------------------------. -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | | | | | -// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' -// * | | | | | | | | | | | | -// * | | | | | | | | | | | | -// * `----------------------------------' `----------------------------------' -// */ -// [_LAYERINDEX] = LAYOUT( -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -// ), -}; - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, LOWER, RAISE, ADJUST); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_CCCV: // One key copy/paste - if (record->event.pressed) { - copy_paste_timer = timer_read(); - } else { - if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy - tap_code16(LCTL(KC_C)); - } else { // Tap, paste - tap_code16(LCTL(KC_V)); - } - } - break; - } - return true; -} - - -bool is_alt_tab_active = false; -uint16_t alt_tab_timer = 0; - -LEADER_EXTERNS(); - -void matrix_scan_user(void) { - if (is_alt_tab_active) { - if (timer_elapsed(alt_tab_timer) > 1000) { - unregister_code(KC_LALT); - is_alt_tab_active = false; - } - } - - LEADER_DICTIONARY() { - leading = false; - leader_end(); - - SEQ_ONE_KEY(KC_C) { // Inline Code - SEND_STRING("`` " SS_TAP(X_LEFT) SS_TAP(X_LEFT)); - } - SEQ_ONE_KEY(KC_P) { // Invoke Password Manager - SEND_STRING(SS_LCTRL(SS_LALT("\\"))); - } - SEQ_ONE_KEY(KC_S) { // Windows screenshot - SEND_STRING(SS_LGUI("\nS")); - } - SEQ_TWO_KEYS(KC_F, KC_P) { // Fusion Projection prefix - SEND_STRING("[Projection] "); - } - SEQ_TWO_KEYS(KC_B, KC_B) { // Basecone invoice description - SEND_STRING("[Leveranciersnaam] [Factuurnummer]"); - } - SEQ_TWO_KEYS(KC_E, KC_S) { // Support email splitkb - SEND_STRING("support@splitkb.com"); - } - SEQ_TWO_KEYS(KC_E, KC_T) { // Email splitkb - SEND_STRING("thomas@splitkb.com"); - } - SEQ_TWO_KEYS(KC_E, KC_P) { // Email personal - SEND_STRING("mail@thomasbaart.nl"); - } - SEQ_TWO_KEYS(KC_S, KC_D) { // Splitkb documentation - SEND_STRING("https://docs.splitkb.com/"); - } - SEQ_TWO_KEYS(KC_S, KC_V) { // Splitkb VAT number - SEND_STRING("NL210593349B01"); - } - SEQ_TWO_KEYS(KC_B, KC_C) { // Discord bongocat - SEND_STRING(":bongocat:\n"); - } - SEQ_TWO_KEYS(KC_C, KC_B) { // Discord code block - SEND_STRING("```c" SS_LSFT("\n\n") "``` " SS_TAP(X_UP)); - } - SEQ_TWO_KEYS(KC_Y, KC_S) { // Greeting - SEND_STRING("Yours sincerely,\n\nThomas Baart"); - } - SEQ_THREE_KEYS(KC_M, KC_V, KC_G) { // Greeting - SEND_STRING("Met vriendelijke groet,\n\nThomas Baart"); - } - } -} - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - -static void render_kyria_logo(void) { - static const char PROGMEM kyria_logo[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, - 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); -} - -static void render_qmk_logo(void) { - static const char PROGMEM qmk_logo[] = { - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; - - oled_write_P(qmk_logo, false); -} - -static void render_status(void) { - // QMK Logo and version information - render_qmk_logo(); - oled_write_P(PSTR(" Kyria rev1.0\n\n"), false); - - // Host Keyboard Layer Status - oled_write_P(PSTR("Layer: "), false); - switch (get_highest_layer(layer_state)) { - case QWERTY: - oled_write_P(PSTR("Default\n"), false); - break; - case LOWER: - oled_write_P(PSTR("Lower\n"), false); - break; - case RAISE: - oled_write_P(PSTR("Raise\n"), false); - break; - case NAV: - oled_write_P(PSTR("Navigation\n"), false); - break; - case ADJUST: - oled_write_P(PSTR("Adjust\n"), false); - break; - default: - oled_write_P(PSTR("Undefined\n"), false); - } - - // Host Keyboard LED Status - uint8_t led_usb_state = host_keyboard_leds(); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); - oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); -} - -void oled_task_user(void) { - if (is_keyboard_master()) { - render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) - } else { - render_kyria_logo(); - } -} -#endif - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - switch (biton32(layer_state)) { - case QWERTY: - // History scrubbing. For Adobe products, hold shift while moving - // backward to go forward instead. - if (clockwise) { - tap_code16(C(KC_Z)); - } else { - tap_code16(C(KC_Y)); - } - break; - default: - // Switch between windows on Windows with alt tab. - if (clockwise) { - if (!is_alt_tab_active) { - is_alt_tab_active = true; - register_code(KC_LALT); - } - alt_tab_timer = timer_read(); - tap_code16(KC_TAB); - } else { - tap_code16(S(KC_TAB)); - } - break; - } - } else if (index == 1) { - switch (biton32(layer_state)) { - case QWERTY: - // Scrolling with PageUp and PgDn. - if (clockwise) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - break; - default: - // Volume control. - if (clockwise) { - tap_code(KC_VOLU); - } else { - tap_code(KC_VOLD); - } - break; - } - } - return true; -} -#endif diff --git a/keyboards/kyria/keymaps/thomasbaart/rules.mk b/keyboards/kyria/keymaps/thomasbaart/rules.mk deleted file mode 100644 index 9b8e29419..000000000 --- a/keyboards/kyria/keymaps/thomasbaart/rules.mk +++ /dev/null @@ -1,5 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -LEADER_ENABLE = yes # Enable the Leader Key feature -MOUSEKEY_ENABLE = no diff --git a/keyboards/kyria/keymaps/winternebs/config.h b/keyboards/kyria/keymaps/winternebs/config.h deleted file mode 100755 index db14011d1..000000000 --- a/keyboards/kyria/keymaps/winternebs/config.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -#define OLED_FONT_H "keyboards/kyria/keymaps/winternebs/glcdfont.c" -#define OLED_FONT_END 127 -#ifdef OLED_DRIVER_ENABLE - #define OLED_DISPLAY_128X64 -#endif - -#define FORCE_NKRO -#define ENCODER_RESOLUTION 4 - -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION -#define NO_ACTION_ONESHOT -#define TAPPING_FORCE_HOLD -#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/kyria/keymaps/winternebs/keymap.c b/keyboards/kyria/keymaps/winternebs/keymap.c deleted file mode 100755 index 5a2ea8333..000000000 --- a/keyboards/kyria/keymaps/winternebs/keymap.c +++ /dev/null @@ -1,726 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -#ifdef CONSOLE_ENABLE - #include -#endif -enum custom_keycodes { - QWERTY = SAFE_RANGE, - WORKMAN, - ADJUST, - SBKSP, - ENDW -}; - -enum layers { - _QWERTY = 0, - _WORKMAN, - _LOWER, - _RAISE, - _ADJUST -}; -#define RAISE LT(_RAISE, KC_ENT) -#define LOWER MO(_LOWER) -#define HOME_A KC_A -#define HOME_S KC_S -#define HOME_H CTL_T(KC_H) -#define HOME_T SFT_T(KC_T) -#define HOME_N SFT_T(KC_N) -#define HOME_E CTL_T(KC_E) -#define HOME_O KC_O -#define HOME_I KC_I -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * Base Layer: QWERTY - * - * ,-------------------------------------------. ,-------------------------------------------. - * | ESC | Q | W | E | R | T | | Y | U | I | O | P | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | CTRL | Z | X | C | V | B | | | | | | N | M | , | . | / | ENTER | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | GUI | ALT | LOWER| Space| | | SHIFT| Bksp | RAISE| | | - * `----------------------------------' `----------------------------------' - */ - [_QWERTY] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - KC_LGUI, KC_LALT, LOWER, KC_SPC, _______, KC_LSFT, KC_BSPC, RAISE, _______, _______ - ), - /* - * Workman Layer - * - * ,-------------------------------------------. ,-------------------------------------------. - * | ESC | Q | D | R | W | B | | J | F | U | P | ; | Bksp | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | TAB | A | S | H | T | G | | Y | N | E | O | I | ' | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | Z | X | M | C | V | SHIFT| Space| | | ENTER| K | L | , | . | / | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | GUI | ESC | LOWER| Space| SWAP | | SWAP | Bksp | RAISE| | | - * `----------------------------------' `----------------------------------' - */ - [_WORKMAN] = LAYOUT( - KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, - KC_TAB, HOME_A, HOME_S, HOME_H, HOME_T, KC_G, KC_Y, HOME_N, HOME_E, HOME_O, HOME_I, KC_QUOT, - XXXXXXX, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_LSFT, KC_SPC, SH_MON, KC_ENT, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, - KC_LGUI, KC_LALT, LOWER, KC_SPC, SH_MON, SH_MON, KC_BSPC, RAISE, XXXXXXX, _______ - ), -/* - * Lower Layer: NUM/symb - * - * ,-------------------------------------------. ,-------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | DEL | $ | + | ( | ) | @ | | | | - | = | _ | * | \ | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | ! | # | { | } | ~ | | | | | | & | [ | ] | % | ^ | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * |prints| | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_LOWER] = LAYOUT( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - KC_DEL, KC_DLR, KC_PLUS, KC_LPRN, KC_RPRN, KC_AT, KC_PIPE, KC_MINS, KC_EQL, KC_UNDS, KC_ASTR, KC_BSLS, - _______, KC_EXLM, KC_HASH, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_LBRC, KC_RBRC, KC_PERC, KC_CIRC, _______, - KC_PSCR, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______ - ), - /* - * Raise Layer: VIM Movement - * - * ,-------------------------------------------. ,-------------------------------------------. - * | | | PgDn | | Word | Back | | Down | | PgUp | | | | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | | Left | | | | | | End | | | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | | | | | | | | | Up | Right| | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_RAISE] = LAYOUT( - _______, _______, KC_PGDN, _______, C(KC_RGHT), C(KC_LEFT), KC_DOWN, _______, KC_PGUP, _______, _______, _______, - _______, _______, _______, KC_LEFT, _______, _______, _______, _______, ENDW, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, KC_RGHT, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - /* - * Layer template - * - * ,-------------------------------------------. ,-------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | - * |--------+------+------+------+------+------| |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | - * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| - * | | | | |QWERTY|WRKMAN| | | | | | | | | | | | - * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' - * | | | | | | | | | | | | - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - */ - [_ADJUST] = LAYOUT( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, QWERTY, WORKMAN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -// /* -// * Layer template -// * -// * ,-------------------------------------------. ,-------------------------------------------. -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | -// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| -// * | | | | | | | | | | | | | | | | | | -// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' -// * | | | | | | | | | | | | -// * | | | | | | | | | | | | -// * `----------------------------------' `----------------------------------' -// */ -// [_LAYERINDEX] = LAYOUT( -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -// ), -}; - - -layer_state_t layer_state_set_user(layer_state_t state) { - return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); -} - -#ifdef ENCODER_ENABLE -bool encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - // Volume control - if (clockwise) { - tap_code(KC_RGHT); - } else { - tap_code(KC_LEFT); - } - } - else if (index == 1) { - // Page up/Page down - if (clockwise) { - tap_code(KC_DOWN); - } else { - tap_code(KC_UP); - } - } - return true; -} -#endif -#ifdef OLED_DRIVER_ENABLE -bool left = false; -bool right = false; -bool lastl = false; -bool lastr = false; -#endif -bool bksp = false; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - #ifdef CONSOLE_ENABLE - uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u, total: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.key.col + 10 * record->event.key.row); - #endif - #ifdef OLED_DRIVER_ENABLE - if(record->event.pressed){ - uint8_t n = record->event.key.col + 10 * record->event.key.row; - if (n<40) { - left = true; - } - else { - right = true; - } - } - #endif - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case WORKMAN: - if (record->event.pressed) { - set_single_persistent_default_layer(_WORKMAN); - } - return false; - break; - case SBKSP: - if (record->event.pressed) { - register_code(KC_LSFT); - bksp = true; - } - else { - unregister_code(KC_LSFT); - if (bksp) { - tap_code(KC_BSPC); - } - } - return false; - break; - case ENDW: - if (record->event.pressed) { - register_code(KC_LCTL); - tap_code(KC_RGHT); - unregister_code(KC_LCTL); - tap_code(KC_LEFT); - } - } - bksp = false; - return true; - -} - -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; -} - - - -char wpm_str[10]; -// WPM-responsive animation stuff here -#define IDLE_FRAMES 2 -#define IDLE_SPEED 10 // below this wpm value your animation will idle - - -#define TAP_FRAMES 3 - -#define ANIM_FRAME_DURATION 400 // how long each frame lasts in ms -// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing -#define ANIM_SIZE 896 // number of bytes in array, minimize for adequate firmware size, max is 1024 - -uint32_t anim_timer = 0; -uint32_t anim_sleep = 0; -uint8_t current_idle_frame = 0; -// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 -uint8_t current_tap_frame = 0; -// Credit to obosob for initial animation approach. -static void render_anim(void) { - static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { - { -// 'bongo0', 128x56px -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, -0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, -0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, -0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, -0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, -0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, -0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, -0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, -0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, -0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, -0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, -0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, -0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, -0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, -0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, -0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, -0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, -0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, -0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { -// 'bongo1', 128x56px -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x40, -0x60, 0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 0x10, 0x10, 0x90, 0x90, 0x90, 0x90, 0x90, 0xa0, 0xa0, -0xa0, 0xa0, 0xa0, 0xc0, 0xc0, 0xc1, 0x80, 0x80, 0x81, 0x81, 0x02, 0x06, 0x84, 0x7c, 0x5f, 0x58, -0x4c, 0x46, 0x42, 0x42, 0x42, 0x43, 0x61, 0x23, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xa0, 0x20, 0x20, -0x30, 0x10, 0x10, 0x18, 0x08, 0x08, 0x0c, 0x04, 0x06, 0x02, 0x03, 0x01, 0x08, 0x18, 0x18, 0x28, -0x68, 0x44, 0x84, 0x84, 0x86, 0x02, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x09, 0x07, 0x01, 0x01, 0x03, -0x06, 0x06, 0x10, 0x3c, 0x4c, 0xc8, 0x88, 0x08, 0x08, 0x18, 0x10, 0x30, 0x60, 0xc0, 0x80, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, -0x01, 0x01, 0x81, 0xc1, 0x21, 0x31, 0x11, 0x0d, 0x05, 0x01, 0x03, 0x02, 0x06, 0x0e, 0xc6, 0xe4, -0x04, 0x04, 0x04, 0x06, 0x02, 0x03, 0x01, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, -0x81, 0x01, 0x01, 0x01, 0x00, 0x00, 0x07, 0x0c, 0x30, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x1e, 0x30, 0x40, 0x80, 0x00, 0x00, 0x00, 0x01, 0x07, -0x1c, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, -0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, -0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, -0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, -0x06, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x0c, 0x04, 0x0c, 0x3c, 0x15, 0xd3, 0x72, 0x10, 0x20, -0x20, 0x20, 0x21, 0x23, 0x26, 0x24, 0x2c, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, -0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, -0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, -0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, -0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, -0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, -0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, -0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, -0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }; - static const char PROGMEM prep[][ANIM_SIZE] = { - { -// 'bongo2', 128x56px -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, -0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, -0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, -0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, -0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x08, 0x0c, 0x04, 0x04, -0x04, 0x07, 0x0a, 0x92, 0xf9, 0xc9, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, -0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, -0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x46, 0x78, 0x20, 0x20, 0x20, 0x20, 0x40, -0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, -0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, -0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x64, 0xc4, 0x04, 0x04, -0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x03, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x20, -0x30, 0x19, 0x0e, 0x38, 0xcc, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, -0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x05, 0x07, 0x0e, -0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, -0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, -0x40, 0x40, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, -0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, -0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - - } - }; - static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { - { - // 'bongo3', 128x56px -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, -0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, -0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, -0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, -0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, -0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, -0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x46, 0x78, 0x20, 0x20, 0x20, 0x20, 0x40, -0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, -0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0xe0, 0xf8, 0xf8, 0xf0, -0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x01, 0x03, 0x1f, 0x0f, 0x07, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, -0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x20, -0x30, 0x19, 0x0e, 0x38, 0xcc, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, -0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f, -0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, -0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, -0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, -0x40, 0x40, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xf8, 0xf9, 0xe1, 0x81, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, -0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, -0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, -0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, -0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x08, 0x1c, 0x1f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { - // 'bongo4', 128x56px -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, -0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, -0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, -0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, -0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x08, 0x0c, 0x04, 0x04, -0x04, 0x07, 0x0a, 0x92, 0xf9, 0xc9, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, -0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, -0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, -0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, -0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x64, 0xc4, 0x04, 0x04, -0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x03, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, -0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, -0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x05, 0x07, 0x0e, -0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, -0x10, 0x10, 0x10, 0x10, 0x20, 0xa0, 0xa0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, -0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7c, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3e, 0x1e, 0x1e, 0x1c, 0x0c, 0x00, 0xf8, -0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, -0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, -0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, -0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x38, 0x38, 0x78, 0x7c, 0x7e, 0xff, 0xff, 0xff, 0xfc, -0xf1, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x06, 0x0e, -0x1e, 0x3e, 0x3e, 0x7e, 0x7e, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }, - { -// 'bongo5', 128x56px -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, -0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, -0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, -0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, -0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, -0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, -0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, -0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, -0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, -0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0xe0, 0xf8, 0xf8, 0xf0, -0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x01, 0x03, 0x1f, 0x0f, 0x07, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, -0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, -0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, -0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f, -0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, -0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, -0x10, 0x10, 0x10, 0x10, 0x20, 0xa0, 0xa0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, -0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xf8, 0xf9, 0xe1, 0x81, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, -0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x7c, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3e, 0x1e, 0x1e, 0x1c, 0x0c, 0x00, 0xf8, -0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, -0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, -0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, -0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x08, 0x1c, 0x1f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x38, 0x38, 0x78, 0x7c, 0x7e, 0xff, 0xff, 0xff, 0xfc, -0xf1, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x06, 0x0e, -0x1e, 0x3e, 0x3e, 0x7e, 0x7e, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }; - - //assumes 1 frame prep stage - void animation_phase(void) { - if(get_current_wpm() <= IDLE_SPEED){ - current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; - oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); - } - else { - // if is true 2 frames in a row make it false; - if(left && !lastl && right && !lastr) { - oled_write_raw_P(tap[2], ANIM_SIZE); - } - else if (left && !lastl) { - oled_write_raw_P(tap[0], ANIM_SIZE); - } - else if (right && !lastr) { - oled_write_raw_P(tap[1], ANIM_SIZE); - } - else { - oled_write_raw_P(prep[0], ANIM_SIZE); - left = false; - right = false; - } - lastl = left; - lastr = right; - left = false; - right = false; - } - } - if(get_current_wpm() != 000) { - oled_on(); // not essential but turns on animation OLED with any alpha keypress - if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { - anim_timer = timer_read32(); - animation_phase(); - } - anim_sleep = timer_read32(); - } else { - if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { - oled_off(); - } else { - if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { - anim_timer = timer_read32(); - animation_phase(); - } - } - } -} -bool wpm_keycode_user(uint16_t keycode) { - return true; -} -static void render_logo(void) { - oled_set_cursor(0,0); - oled_write_P(PSTR(" play asc "), false); - oled_set_cursor(3,3); - oled_write_P(PSTR(" play asc "), false); - oled_set_cursor(6,6); - oled_write_P(PSTR(" play asc "), false); -} -void oled_task_user(void) { - if (is_keyboard_master()) { - render_anim(); - oled_set_cursor(0,7); - sprintf(wpm_str, "APM: %03d ", get_current_wpm()); - oled_write(wpm_str, false); - switch (get_highest_layer(layer_state)) { - case _QWERTY: - oled_write_ln_P(PSTR("base"), false); - break; - case _LOWER: - oled_write_ln_P(PSTR("LOWER"), false); - break; - case _RAISE: - oled_write_ln_P(PSTR("RAISE"), false); - break; - case _ADJUST: - oled_write_ln_P(PSTR("ADJUST"), false); - break; - default: - oled_write_ln_P(PSTR("Undefined"), false); - } - } else { - render_logo(); - oled_scroll_left(); - - } -} -#endif diff --git a/keyboards/kyria/keymaps/winternebs/rules.mk b/keyboards/kyria/keymaps/winternebs/rules.mk deleted file mode 100755 index 5831e23cb..000000000 --- a/keyboards/kyria/keymaps/winternebs/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # Enables the use of one or more -NKRO_ENABLE = yes -WPM_ENABLE = yes -CONSOLE_ENABLE = no # Console for debug -AUDIO_ENABLE = no # Audio output -SPACE_CADET_ENABLE = no -EXTRAKEY_ENABLE = no -MOUSEKEY_ENABLE = no -BOOTMAGIC_ENABLE = no -SWAP_HANDS_ENABLE = yes -LTO_ENABLE = yes diff --git a/keyboards/kyria/kyria.c b/keyboards/kyria/kyria.c deleted file mode 100644 index 1692093fb..000000000 --- a/keyboards/kyria/kyria.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "kyria.h" - diff --git a/keyboards/kyria/kyria.h b/keyboards/kyria/kyria.h deleted file mode 100644 index c1db6307e..000000000 --- a/keyboards/kyria/kyria.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -#include "quantum.h" - -#if defined(KEYBOARD_kyria_rev1) -# include "rev1.h" -#endif - -/* 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. - */ diff --git a/keyboards/kyria/readme.md b/keyboards/kyria/readme.md deleted file mode 100644 index ed4b14508..000000000 --- a/keyboards/kyria/readme.md +++ /dev/null @@ -1,21 +0,0 @@ -# Kyria - -![Kyria](https://cdn.shopify.com/s/files/1/0227/9171/6941/products/PlateCase_f1870016-98b8-43a9-8aed-3eaf073b367b_900x.jpg?v=1568934600) - -An ergonomical 40% split keyboard - -Keyboard Maintainer: [splitkb.com](https://github.com/splitkb) -Hardware Supported: Pro Micro 5V/16MHz and compatible. -Hardware Availability: [splitkb.com](https://splitkb.com) and partners. - -Make example for this keyboard (after setting up your build environment): - - make kyria:default - -Example of flashing this keyboard: - - make kyria/rev1:default:flash - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). - -A build guide for the Kyria can be found at [docs.splitkb.com](https://docs.splitkb.com/hc/en-us/articles/360010552059-Kyria-Build-Guide-Introduction). diff --git a/keyboards/kyria/rev1/config.h b/keyboards/kyria/rev1/config.h deleted file mode 100644 index e832db105..000000000 --- a/keyboards/kyria/rev1/config.h +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 2019 Thomas Baart - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 -#define DEVICE_VER 0x0001 -#define MANUFACTURER splitkb -#define PRODUCT Kyria Keyboard - -/* key matrix size */ -/* Rows are doubled up */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 8 - -// wiring -#define MATRIX_ROW_PINS { B4, E6, D7, D4 } -#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 } -#define UNUSED_PINS - -#define ENCODERS_PAD_A { C6 } -#define ENCODERS_PAD_B { B5 } -#define ENCODERS_PAD_A_RIGHT { B5 } -#define ENCODERS_PAD_B_RIGHT { C6 } - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* - * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. - */ -#define SOFT_SERIAL_PIN D2 - -#define RGB_DI_PIN D3 -#define RGBLED_SPLIT { 10, 10 } -#define RGBLED_NUM 20 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/kyria/rev1/rev1.c b/keyboards/kyria/rev1/rev1.c deleted file mode 100644 index 622ac279b..000000000 --- a/keyboards/kyria/rev1/rev1.c +++ /dev/null @@ -1,17 +0,0 @@ -#include "rev1.h" - -#ifdef SWAP_HANDS_ENABLE -__attribute__ ((weak)) - -const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { - {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}}, - {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}, {7, 5}}, - {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}}, - {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}, {7, 7}}, - {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}}, - {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}}, - {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}}, - {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}} -}; - -#endif diff --git a/keyboards/kyria/rev1/rev1.h b/keyboards/kyria/rev1/rev1.h deleted file mode 100644 index 44060a153..000000000 --- a/keyboards/kyria/rev1/rev1.h +++ /dev/null @@ -1,82 +0,0 @@ -/* Copyright 2019 Thomas Baart - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -#include "kyria.h" - -/* This a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, R06, R07, R08, R09, R10, R11, \ - L12, L13, L14, L15, L16, L17, R18, R19, R20, R21, R22, R23, \ - L24, L25, L26, L27, L28, L29, L30, L31, R32, R33, R34, R35, R36, R37, R38, R39, \ - L40, L41, L42, L43, L44, R45, R46, R47, R48, R49 \ -) \ -{ \ - { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \ - { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \ - { L31, L30, L29, L28, L27, L26, L25, L24 }, \ - { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \ - { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \ - { R32, R33, R34, R35, R36, R37, R38, R39 }, \ - { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ -} - -#define LAYOUT_stack( \ - L00, L01, L02, L03, L04, L05, \ - L12, L13, L14, L15, L16, L17, \ - L24, L25, L26, L27, L28, L29, L30, L31, \ - L40, L41, L42, L43, L44, \ - \ - R06, R07, R08, R09, R10, R11, \ - R18, R19, R20, R21, R22, R23, \ - R32, R33, R34, R35, R36, R37, R38, R39, \ - R45, R46, R47, R48, R49 \ -) \ -{ \ - { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \ - { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \ - { L31, L30, L29, L28, L27, L26, L25, L24 }, \ - { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \ - { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \ - { R32, R33, R34, R35, R36, R37, R38, R39 }, \ - { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ -} - -#define LAYOUT_split_3x6_5( \ - L00, L01, L02, L03, L04, L05, R06, R07, R08, R09, R10, R11, \ - L12, L13, L14, L15, L16, L17, R18, R19, R20, R21, R22, R23, \ - L24, L25, L26, L27, L28, L29, R34, R35, R36, R37, R38, R39, \ - L40, L41, L42, L43, L44, R45, R46, R47, R48, R49 \ -) \ -{ \ - { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \ - { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \ - { KC_NO, KC_NO, L29, L28, L27, L26, L25, L24 }, \ - { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \ - { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \ - { KC_NO, KC_NO, R34, R35, R36, R37, R38, R39 }, \ - { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ -} diff --git a/keyboards/kyria/rev1/rules.mk b/keyboards/kyria/rev1/rules.mk deleted file mode 100644 index 8b1c9616c..000000000 --- a/keyboards/kyria/rev1/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays -ENCODER_ENABLE = yes # ENables the use of one or more encoders -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/kyria/rules.mk b/keyboards/kyria/rules.mk deleted file mode 100644 index 2c749186a..000000000 --- a/keyboards/kyria/rules.mk +++ /dev/null @@ -1,27 +0,0 @@ -# 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 on B7 by default -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -SPLIT_KEYBOARD = yes # Split common -LTO_ENABLE = yes - -DEFAULT_FOLDER = kyria/rev1 diff --git a/keyboards/labyrinth75/rules.mk b/keyboards/labyrinth75/rules.mk index f7bb5a298..eb14b49e9 100644 --- a/keyboards/labyrinth75/rules.mk +++ b/keyboards/labyrinth75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/laptreus/rules.mk b/keyboards/laptreus/rules.mk index 0f192113c..765c4cdc7 100644 --- a/keyboards/laptreus/rules.mk +++ b/keyboards/laptreus/rules.mk @@ -18,14 +18,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration 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 UNICODE_ENABLE = no # Unicode KEY_LOCK_ENABLE = no TAP_DANCE_ENABLE = no diff --git a/keyboards/latin17rgb/config.h b/keyboards/latin17rgb/config.h index 013899f60..6a7ea8e78 100644 --- a/keyboards/latin17rgb/config.h +++ b/keyboards/latin17rgb/config.h @@ -1,18 +1,18 @@ /* Copyright 2021 18438880 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #pragma once @@ -56,7 +56,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN @@ -100,5 +100,3 @@ #define RGBLIGHT_VAL_STEP 5 #define RGBLIGHT_SLEEP #endif - - diff --git a/keyboards/latin17rgb/latin17rgb.c b/keyboards/latin17rgb/latin17rgb.c index 8d9eaae8a..f7bbe125c 100644 --- a/keyboards/latin17rgb/latin17rgb.c +++ b/keyboards/latin17rgb/latin17rgb.c @@ -17,7 +17,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/latin17rgb/rules.mk b/keyboards/latin17rgb/rules.mk index dd7bab746..e0ad4a652 100644 --- a/keyboards/latin17rgb/rules.mk +++ b/keyboards/latin17rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/latin47ble/rules.mk b/keyboards/latin47ble/rules.mk index c9cdfc912..5a3f1069a 100644 --- a/keyboards/latin47ble/rules.mk +++ b/keyboards/latin47ble/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/latin60rgb/config.h b/keyboards/latin60rgb/config.h index bbe502054..97b481291 100644 --- a/keyboards/latin60rgb/config.h +++ b/keyboards/latin60rgb/config.h @@ -1,18 +1,18 @@ /* Copyright 2021 latincompass - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #pragma once /* USB Device descriptor parameter */ @@ -53,7 +53,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN @@ -77,4 +77,3 @@ # define DRIVER_1_LED_TOTAL 60 # define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL #endif - diff --git a/keyboards/latin60rgb/latin60rgb.c b/keyboards/latin60rgb/latin60rgb.c index cdd6fed44..fe5d2eea8 100644 --- a/keyboards/latin60rgb/latin60rgb.c +++ b/keyboards/latin60rgb/latin60rgb.c @@ -16,7 +16,7 @@ #include "latin60rgb.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { { 0, K_13, J_13, L_13 }, { 0, K_12, J_12, L_12 }, { 0, K_11, J_11, L_11 }, diff --git a/keyboards/latin60rgb/rules.mk b/keyboards/latin60rgb/rules.mk index 64df3bfe2..9902607e8 100644 --- a/keyboards/latin60rgb/rules.mk +++ b/keyboards/latin60rgb/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/latin64ble/rules.mk b/keyboards/latin64ble/rules.mk index 4da5e0938..b4d726a60 100644 --- a/keyboards/latin64ble/rules.mk +++ b/keyboards/latin64ble/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/latin6rgb/config.h b/keyboards/latin6rgb/config.h index 4052fdc99..174c23c30 100644 --- a/keyboards/latin6rgb/config.h +++ b/keyboards/latin6rgb/config.h @@ -1,18 +1,18 @@ /* Copyright 2021 18438880 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ #pragma once @@ -57,7 +57,7 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/latin6rgb/latin6rgb.c b/keyboards/latin6rgb/latin6rgb.c index 76b39c86b..9ea4721ec 100644 --- a/keyboards/latin6rgb/latin6rgb.c +++ b/keyboards/latin6rgb/latin6rgb.c @@ -17,7 +17,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/latin6rgb/rules.mk b/keyboards/latin6rgb/rules.mk index 4a162d97b..d251ef458 100644 --- a/keyboards/latin6rgb/rules.mk +++ b/keyboards/latin6rgb/rules.mk @@ -7,10 +7,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug +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 diff --git a/keyboards/latinpad/config.h b/keyboards/latinpad/config.h index ed2fcdf9a..6c887ab07 100644 --- a/keyboards/latinpad/config.h +++ b/keyboards/latinpad/config.h @@ -44,12 +44,6 @@ along with this program. If not, see .*/ /* 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 OLED_FONT_H "./lib/glcdfont.c" #define ENCODERS_PAD_A { B4, B5 } diff --git a/keyboards/latinpad/keymaps/default/keymap.c b/keyboards/latinpad/keymaps/default/keymap.c index fe0741423..eebbd6265 100644 --- a/keyboards/latinpad/keymaps/default/keymap.c +++ b/keyboards/latinpad/keymaps/default/keymap.c @@ -48,7 +48,7 @@ static void render_logo(void) { oled_write_P(qmk_logo, false); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { render_logo(); } #endif diff --git a/keyboards/latinpad/keymaps/via/keymap.c b/keyboards/latinpad/keymaps/via/keymap.c index c196cd485..04d9ad905 100644 --- a/keyboards/latinpad/keymaps/via/keymap.c +++ b/keyboards/latinpad/keymaps/via/keymap.c @@ -46,7 +46,7 @@ static void render_logo(void) { oled_write_P(qmk_logo, false); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { render_logo(); } #endif diff --git a/keyboards/latinpad/keymaps/via/rules.mk b/keyboards/latinpad/keymaps/via/rules.mk index 1e5b99807..36b7ba9cb 100644 --- a/keyboards/latinpad/keymaps/via/rules.mk +++ b/keyboards/latinpad/keymaps/via/rules.mk @@ -1 +1,2 @@ VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/latinpad/rules.mk b/keyboards/latinpad/rules.mk index 20ed06935..fb40abc39 100644 --- a/keyboards/latinpad/rules.mk +++ b/keyboards/latinpad/rules.mk @@ -13,7 +13,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -23,7 +23,8 @@ NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = no -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/latinpadble/keymaps/default/keymap.c b/keyboards/latinpadble/keymaps/default/keymap.c index 7a6e0eda6..ad6f7f31d 100644 --- a/keyboards/latinpadble/keymaps/default/keymap.c +++ b/keyboards/latinpadble/keymaps/default/keymap.c @@ -34,7 +34,7 @@ static void render_logo(void) { oled_write_P(qmk_logo, false); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { render_logo(); } #endif diff --git a/keyboards/latinpadble/keymaps/via/keymap.c b/keyboards/latinpadble/keymaps/via/keymap.c index 0a29b04ab..cfcea7388 100644 --- a/keyboards/latinpadble/keymaps/via/keymap.c +++ b/keyboards/latinpadble/keymaps/via/keymap.c @@ -63,7 +63,7 @@ static void render_logo(void) { oled_write_P(qmk_logo, false); } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { render_logo(); } #endif diff --git a/keyboards/latinpadble/rules.mk b/keyboards/latinpadble/rules.mk index e74c2da14..b36d9a88c 100644 --- a/keyboards/latinpadble/rules.mk +++ b/keyboards/latinpadble/rules.mk @@ -7,11 +7,10 @@ F_CPU = 8000000 # Bootloader selection BOOTLOADER = caterina - # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -26,5 +25,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output BLUETOOTH = AdafruitBLE -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes diff --git a/keyboards/lattice60/rules.mk b/keyboards/lattice60/rules.mk index abd97e24b..b04ffc44e 100644 --- a/keyboards/lattice60/rules.mk +++ b/keyboards/lattice60/rules.mk @@ -17,7 +17,7 @@ F_CPU = 12000000 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/launchpad/keymaps/brandonschlack/rules.mk b/keyboards/launchpad/keymaps/brandonschlack/rules.mk index ac92af928..f7d08e3cc 100644 --- a/keyboards/launchpad/keymaps/brandonschlack/rules.mk +++ b/keyboards/launchpad/keymaps/brandonschlack/rules.mk @@ -5,7 +5,7 @@ IS_MACROPAD = yes BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. CONSOLE_ENABLE = yes # Console for debug(+400) MOUSEKEY_ENABLE = yes # Use mouse keys for scrolling. diff --git a/keyboards/launchpad/keymaps/drashna/rules.mk b/keyboards/launchpad/keymaps/drashna/rules.mk index 3eb1694ad..ffda19113 100644 --- a/keyboards/launchpad/keymaps/drashna/rules.mk +++ b/keyboards/launchpad/keymaps/drashna/rules.mk @@ -2,6 +2,6 @@ BOOTLOADER = atmel-dfu RGBLIGHT_ENABLE = no AUDIO_ENABLE = no -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/launchpad/rules.mk b/keyboards/launchpad/rules.mk index 2b115b1e1..ff9dfa5de 100644 --- a/keyboards/launchpad/rules.mk +++ b/keyboards/launchpad/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/lazydesigners/bolt/rules.mk b/keyboards/lazydesigners/bolt/rules.mk index 38ce53e30..a13cc8c07 100644 --- a/keyboards/lazydesigners/bolt/rules.mk +++ b/keyboards/lazydesigners/bolt/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lazydesigners/dimple/rules.mk b/keyboards/lazydesigners/dimple/rules.mk index 5460d7473..5374edc54 100644 --- a/keyboards/lazydesigners/dimple/rules.mk +++ b/keyboards/lazydesigners/dimple/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control NKRO_ENABLE = yes # USB Nkey Rollover diff --git a/keyboards/lazydesigners/dimpleplus/rules.mk b/keyboards/lazydesigners/dimpleplus/rules.mk index 3fd7208db..8027996f5 100644 --- a/keyboards/lazydesigners/dimpleplus/rules.mk +++ b/keyboards/lazydesigners/dimpleplus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lazydesigners/the30/rules.mk b/keyboards/lazydesigners/the30/rules.mk index d8a79f094..93a26c200 100644 --- a/keyboards/lazydesigners/the30/rules.mk +++ b/keyboards/lazydesigners/the30/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/lazydesigners/the40/rules.mk b/keyboards/lazydesigners/the40/rules.mk index 27e32f935..08b3861f9 100644 --- a/keyboards/lazydesigners/the40/rules.mk +++ b/keyboards/lazydesigners/the40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lazydesigners/the50/rules.mk b/keyboards/lazydesigners/the50/rules.mk index 8194d084e..97e0e26db 100644 --- a/keyboards/lazydesigners/the50/rules.mk +++ b/keyboards/lazydesigners/the50/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lazydesigners/the60/rev1/rules.mk b/keyboards/lazydesigners/the60/rev1/rules.mk index 28161512c..e737dd8c0 100755 --- a/keyboards/lazydesigners/the60/rev1/rules.mk +++ b/keyboards/lazydesigners/the60/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lazydesigners/the60/rev2/rules.mk b/keyboards/lazydesigners/the60/rev2/rules.mk index 82eccdb40..64a842ca7 100755 --- a/keyboards/lazydesigners/the60/rev2/rules.mk +++ b/keyboards/lazydesigners/the60/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lck75/lck75.c b/keyboards/lck75/lck75.c index caca42678..52ccdcfd0 100644 --- a/keyboards/lck75/lck75.c +++ b/keyboards/lck75/lck75.c @@ -32,7 +32,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { #define TAP_SPEED 40 #define ANIM_FRAME_DURATION 200 #define ANIM_SIZE 512 -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } diff --git a/keyboards/lck75/rules.mk b/keyboards/lck75/rules.mk index ee196d53a..8d990e00e 100644 --- a/keyboards/lck75/rules.mk +++ b/keyboards/lck75/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,8 +24,9 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = yes -OLED_DRIVER_ENABLE = yes -ENCODER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +ENCODER_ENABLE = yes WPM_ENABLE = yes LTO_ENABLE = no AUTO_SHIFT_ENABLE = no diff --git a/keyboards/le_chiffre/config.h b/keyboards/le_chiffre/config.h index e14b4665f..af4d1e49c 100644 --- a/keyboards/le_chiffre/config.h +++ b/keyboards/le_chiffre/config.h @@ -69,7 +69,7 @@ #ifdef RGB_MATRIX_ENABLE #define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. #define RGB_MATRIX_HUE_STEP 8 diff --git a/keyboards/le_chiffre/keymaps/default/keymap.c b/keyboards/le_chiffre/keymaps/default/keymap.c index 5d4a4e0f9..3de991b55 100644 --- a/keyboards/le_chiffre/keymaps/default/keymap.c +++ b/keyboards/le_chiffre/keymaps/default/keymap.c @@ -90,7 +90,7 @@ combo_t key_combos[COMBO_COUNT] = { }; #endif -#ifdef OLED_DRIVER_ENABLE //Special thanks to Sickbabies for this great OLED widget! +#ifdef OLED_ENABLE //Special thanks to Sickbabies for this great OLED widget! oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_90; // rotates for proper orientation } diff --git a/keyboards/le_chiffre/keymaps/via/keymap.c b/keyboards/le_chiffre/keymaps/via/keymap.c index fcb546374..59cf17009 100644 --- a/keyboards/le_chiffre/keymaps/via/keymap.c +++ b/keyboards/le_chiffre/keymaps/via/keymap.c @@ -49,7 +49,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE //Special thanks to Sickbabies for this great OLED widget! +#ifdef OLED_ENABLE //Special thanks to Sickbabies for this great OLED widget! oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_90; // rotates for proper orientation } diff --git a/keyboards/le_chiffre/rules.mk b/keyboards/le_chiffre/rules.mk index 2d3a50ca1..eb18362b6 100644 --- a/keyboards/le_chiffre/rules.mk +++ b/keyboards/le_chiffre/rules.mk @@ -11,7 +11,7 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -19,7 +19,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow TAP_DANCE_ENABLE = no ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 LTO_ENABLE = yes diff --git a/keyboards/leafcutterlabs/bigknob/rules.mk b/keyboards/leafcutterlabs/bigknob/rules.mk index 6d6364cad..2820c3ed4 100644 --- a/keyboards/leafcutterlabs/bigknob/rules.mk +++ b/keyboards/leafcutterlabs/bigknob/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/leeku/finger65/keymaps/madhatter/keymap.c b/keyboards/leeku/finger65/keymaps/madhatter/keymap.c index f8d5a0f7b..a69fe6915 100644 --- a/keyboards/leeku/finger65/keymaps/madhatter/keymap.c +++ b/keyboards/leeku/finger65/keymaps/madhatter/keymap.c @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -// uint32_t layer_state_set_user(uint32_t state) { +// layer_state_t layer_state_set_user(layer_state_t state) { // switch(biton32(state)) { // case _FNMS: // led_off(); diff --git a/keyboards/leeku/finger65/rules.mk b/keyboards/leeku/finger65/rules.mk index 1ebd43b08..49dc92eb7 100644 --- a/keyboards/leeku/finger65/rules.mk +++ b/keyboards/leeku/finger65/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,4 +22,3 @@ COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover -MIDI_ENABLE = no # MIDI support diff --git a/keyboards/lets_split/keymaps/DE_programming/keymap.c b/keyboards/lets_split/keymaps/DE_programming/keymap.c index 32231f883..a72ba4f86 100644 --- a/keyboards/lets_split/keymaps/DE_programming/keymap.c +++ b/keyboards/lets_split/keymaps/DE_programming/keymap.c @@ -47,9 +47,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT( - DE_CIRC, DE_EXLM, DE_QST, DE_PARA, DE_EURO, DE_TILD, DE_DLR, DE_LPRN, DE_RPRN, DE_LESS, DE_MORE, KC_BSPC, + DE_CIRC, DE_EXLM, DE_QUES, DE_SECT, DE_EURO, DE_TILD, DE_DLR, DE_LPRN, DE_RPRN, DE_LABK, DE_RABK, KC_BSPC, KC_DEL, KC_VOLU, KC_MPRV, KC_MNXT, KC_MPLY, DE_AMPR, DE_AT, DE_LCBR, DE_RCBR, DE_LBRC, DE_RBRC, KC_ENT, - KC_LSFT, KC_VOLD, _______, _______, _______, DE_PIPE, DE_PERC, DE_SLSH, DE_BSLS, DE_QUOT, DE_DQOT, KC_RSFT, + KC_LSFT, KC_VOLD, _______, _______, _______, DE_PIPE, DE_PERC, DE_SLSH, DE_BSLS, DE_QUOT, DE_DQUO, KC_RSFT, KC_LCTL, _______, _______, _______, _______, _______, _______, _______, DE_EQL, DE_ASTR, _______, _______ ), @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = LAYOUT( DE_SLSH, KC_7, KC_8, KC_9, DE_ASTR, _______, _______, _______, DE_HASH, KC_LALT, DE_ACUT, KC_BSPC, - KC_DEL, KC_4, KC_5, KC_6, DE_MINS, KC_HOME, KC_END, DE_AE, DE_OE, DE_UE, DE_SS, KC_ENT, + KC_DEL, KC_4, KC_5, KC_6, DE_MINS, KC_HOME, KC_END, DE_ADIA, DE_ODIA, DE_UDIA, DE_SS, KC_ENT, KC_LSFT, KC_1, KC_2, KC_3, DE_PLUS, KC_PGUP, KC_PGDN, _______, _______, _______, _______, KC_LSFT, _______, DE_DOT, KC_0, DE_EQL, _______, _______, _______, _______, _______, _______, _______, _______ ), diff --git a/keyboards/lets_split/keymaps/DE_simple/keymap.c b/keyboards/lets_split/keymaps/DE_simple/keymap.c index 32383ec67..c49da49cf 100644 --- a/keyboards/lets_split/keymaps/DE_simple/keymap.c +++ b/keyboards/lets_split/keymaps/DE_simple/keymap.c @@ -51,8 +51,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT( \ - DE_CIRC, DE_EXLM, DE_DQOT, DE_PARA, DE_DLR, DE_PERC, DE_AMPR, DE_SLSH, DE_LPRN, DE_RPRN, DE_EQL, KC_BSPC, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_AT , DE_EURO, KC_LBRC, DE_QST, DE_QUOT, \ + DE_CIRC, DE_EXLM, DE_DQUO, DE_SECT, DE_DLR, DE_PERC, DE_AMPR, DE_SLSH, DE_LPRN, DE_RPRN, DE_EQL, KC_BSPC, \ + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, DE_AT , DE_EURO, KC_LBRC, DE_QUES, DE_QUOT, \ KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DE_PIPE , KC_SCLN, KC_QUOT, _______, KC_ENT, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), diff --git a/keyboards/lets_split/keymaps/OLED_sample/rules.mk b/keyboards/lets_split/keymaps/OLED_sample/rules.mk index 162c7aeb9..e1716e0c0 100644 --- a/keyboards/lets_split/keymaps/OLED_sample/rules.mk +++ b/keyboards/lets_split/keymaps/OLED_sample/rules.mk @@ -4,7 +4,7 @@ SRC += ssd1306.c # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk b/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk index 377a0ded1..6886a320a 100755 --- a/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk +++ b/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk @@ -9,13 +9,11 @@ TAP_DANCE_ENABLE = no # Use multi-tap features AUDIO_ENABLE = no # Audio stuff BLUETOOTH_ENABLE = no # No bluetooth COMMAND_ENABLE = no # Some bootmagic thing -BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite CONSOLE_ENABLE = no # Allows console output with a command SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. NKRO_ENABLE = no # Default is 6KRO which is plenty MIDI_ENABLE = no # Untested feature KEY_LOCK_ENABLE = no # Allows locking any key. Not used -API_SYSEX_ENABLE = no # Allows OS to send signals. -KEY_LOCK_ENABLE = no # Allows locking any key. Not used UNICODE_ENABLE = no # Used for unicode character emulation EXTRAKEY_ENABLE = no # OS signals like volume control diff --git a/keyboards/lets_split/keymaps/cpeters1982/keymap.c b/keyboards/lets_split/keymaps/cpeters1982/keymap.c index 8fa2bf6c0..c4c26d56b 100644 --- a/keyboards/lets_split/keymaps/cpeters1982/keymap.c +++ b/keyboards/lets_split/keymaps/cpeters1982/keymap.c @@ -179,7 +179,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #define rgblight_set_purple rgblight_sethsv (0x10E, 0xFF, 0xFF); #define rgblight_set_white rgblight_sethsv (0x00, 0x00, 0xFF); -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { #ifdef RGBLIGHT_ENABLE uint8_t default_layer = eeconfig_read_default_layer(); if (rgb_layer_change) { diff --git a/keyboards/lets_split/keymaps/heartrobotninja/rules.mk b/keyboards/lets_split/keymaps/heartrobotninja/rules.mk index 21aae31db..9c6a36613 100644 --- a/keyboards/lets_split/keymaps/heartrobotninja/rules.mk +++ b/keyboards/lets_split/keymaps/heartrobotninja/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/lets_split/keymaps/mjt/rules.mk b/keyboards/lets_split/keymaps/mjt/rules.mk index a43a9a1da..a609caa02 100644 --- a/keyboards/lets_split/keymaps/mjt/rules.mk +++ b/keyboards/lets_split/keymaps/mjt/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/lets_split/keymaps/piemod/rules.mk b/keyboards/lets_split/keymaps/piemod/rules.mk index e2bb583cd..79a0a1738 100644 --- a/keyboards/lets_split/keymaps/piemod/rules.mk +++ b/keyboards/lets_split/keymaps/piemod/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/lets_split/keymaps/pyrol/rules.mk b/keyboards/lets_split/keymaps/pyrol/rules.mk index 8d49979f9..05bab7d5b 100644 --- a/keyboards/lets_split/keymaps/pyrol/rules.mk +++ b/keyboards/lets_split/keymaps/pyrol/rules.mk @@ -1 +1 @@ - BOOTMAGIC_ENABLE = full + BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/lets_split/keymaps/via/config.h b/keyboards/lets_split/keymaps/via/config.h index df24c53cd..334be7519 100644 --- a/keyboards/lets_split/keymaps/via/config.h +++ b/keyboards/lets_split/keymaps/via/config.h @@ -38,3 +38,5 @@ along with this program. If not, see . #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 10 + +#define NO_MUSIC_MODE diff --git a/keyboards/lets_split/keymaps/xk/rules.mk b/keyboards/lets_split/keymaps/xk/rules.mk index 8aafefa64..a624479b5 100644 --- a/keyboards/lets_split/keymaps/xk/rules.mk +++ b/keyboards/lets_split/keymaps/xk/rules.mk @@ -12,5 +12,5 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index a7703ce44..2fc9db92c 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/lets_split/sockets/config.h b/keyboards/lets_split/sockets/config.h index 67fa4b4cc..70cbc18cd 100644 --- a/keyboards/lets_split/sockets/config.h +++ b/keyboards/lets_split/sockets/config.h @@ -49,11 +49,6 @@ along with this program. If not, see . /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - /* ws2812 RGB LED */ #define RGB_DI_PIN D4 diff --git a/keyboards/lets_split_eh/keymaps/mikethetiger/keymap.c b/keyboards/lets_split_eh/keymaps/mikethetiger/keymap.c index c5a2ed953..9e67b7dda 100644 --- a/keyboards/lets_split_eh/keymaps/mikethetiger/keymap.c +++ b/keyboards/lets_split_eh/keymaps/mikethetiger/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , - _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + _______, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), /* Lower @@ -115,6 +115,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/lets_split_eh/rules.mk b/keyboards/lets_split_eh/rules.mk index fe3face86..0ed502a28 100644 --- a/keyboards/lets_split_eh/rules.mk +++ b/keyboards/lets_split_eh/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no SPLIT_KEYBOARD = yes diff --git a/keyboards/lfkeyboards/lfk78/config.h b/keyboards/lfkeyboards/lfk78/config.h index 2b0b01d86..540c40539 100644 --- a/keyboards/lfkeyboards/lfk78/config.h +++ b/keyboards/lfkeyboards/lfk78/config.h @@ -160,26 +160,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/lfkeyboards/lfk78/keymaps/ca178858/rules.mk b/keyboards/lfkeyboards/lfk78/keymaps/ca178858/rules.mk index 98e3d5a78..c894100f2 100644 --- a/keyboards/lfkeyboards/lfk78/keymaps/ca178858/rules.mk +++ b/keyboards/lfkeyboards/lfk78/keymaps/ca178858/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/lfkeyboards/lfk78/rules.mk b/keyboards/lfkeyboards/lfk78/rules.mk index 6da6ea4b8..1abad5557 100644 --- a/keyboards/lfkeyboards/lfk78/rules.mk +++ b/keyboards/lfkeyboards/lfk78/rules.mk @@ -11,7 +11,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -19,7 +19,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_DRIVER = custom -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 diff --git a/keyboards/lfkeyboards/lfk87/keymaps/ca178858/rules.mk b/keyboards/lfkeyboards/lfk87/keymaps/ca178858/rules.mk index f28ec80ea..2ab907be6 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/ca178858/rules.mk +++ b/keyboards/lfkeyboards/lfk87/keymaps/ca178858/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk b/keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk index 59cfee01c..ad68bac1e 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk +++ b/keyboards/lfkeyboards/lfk87/keymaps/default/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lfkeyboards/lfk87/keymaps/gbchk/rules.mk b/keyboards/lfkeyboards/lfk87/keymaps/gbchk/rules.mk index f7b39455b..147f4f8f2 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/gbchk/rules.mk +++ b/keyboards/lfkeyboards/lfk87/keymaps/gbchk/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk b/keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk index da697e66f..659010689 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk +++ b/keyboards/lfkeyboards/lfk87/keymaps/iso/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lfkeyboards/lfk87/rules.mk b/keyboards/lfkeyboards/lfk87/rules.mk index dc6fa376a..7f5621b03 100644 --- a/keyboards/lfkeyboards/lfk87/rules.mk +++ b/keyboards/lfkeyboards/lfk87/rules.mk @@ -24,7 +24,7 @@ LAYOUTS = tkl_ansi tkl_iso # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -32,7 +32,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_DRIVER = custom -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/lfkeyboards/lfkpad/config.h b/keyboards/lfkeyboards/lfkpad/config.h index f3da6c8f7..e2181a9e6 100644 --- a/keyboards/lfkeyboards/lfkpad/config.h +++ b/keyboards/lfkeyboards/lfkpad/config.h @@ -177,26 +177,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/config.h b/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/config.h index a12154341..a9f61f849 100644 --- a/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/config.h +++ b/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/config.h @@ -23,8 +23,8 @@ #define QMK_KEYS_PER_SCAN 4 /* Force NKRO on boot up */ -#define FORCE_NKRO +#define FORCE_NKRO -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_DISABLE_TIMEOUT 900000 diff --git a/keyboards/lfkeyboards/lfkpad/rules.mk b/keyboards/lfkeyboards/lfkpad/rules.mk index 13951e4c6..09dea7037 100644 --- a/keyboards/lfkeyboards/lfkpad/rules.mk +++ b/keyboards/lfkeyboards/lfkpad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -26,7 +26,6 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lfkeyboards, not qmk base -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/lfkeyboards/mini1800/keymaps/ca178858/rules.mk b/keyboards/lfkeyboards/mini1800/keymaps/ca178858/rules.mk index 2c6035d58..b50ee2fd6 100644 --- a/keyboards/lfkeyboards/mini1800/keymaps/ca178858/rules.mk +++ b/keyboards/lfkeyboards/mini1800/keymaps/ca178858/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/lfkeyboards/mini1800/keymaps/default/rules.mk b/keyboards/lfkeyboards/mini1800/keymaps/default/rules.mk index 2619a2d19..6da1b62ec 100644 --- a/keyboards/lfkeyboards/mini1800/keymaps/default/rules.mk +++ b/keyboards/lfkeyboards/mini1800/keymaps/default/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lfkeyboards/smk65/rules.mk b/keyboards/lfkeyboards/smk65/rules.mk index 26bf8cd8a..a37d038ed 100644 --- a/keyboards/lfkeyboards/smk65/rules.mk +++ b/keyboards/lfkeyboards/smk65/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/lily58/keymaps/barabas/keymap.c b/keyboards/lily58/keymaps/barabas/keymap.c index ca23a59c2..00d6045d4 100644 --- a/keyboards/lily58/keymaps/barabas/keymap.c +++ b/keyboards/lily58/keymaps/barabas/keymap.c @@ -124,8 +124,8 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { } } -// SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk -#ifdef OLED_DRIVER_ENABLE +// SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) return OLED_ROTATION_180; // flips the display 180 degrees if offhand @@ -180,11 +180,11 @@ void oled_task_user(void) { oled_write(read_logo(), false); } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif } diff --git a/keyboards/lily58/keymaps/chuan/keymap.c b/keyboards/lily58/keymaps/chuan/keymap.c index da3416087..29e5aae19 100644 --- a/keyboards/lily58/keymaps/chuan/keymap.c +++ b/keyboards/lily58/keymaps/chuan/keymap.c @@ -130,7 +130,7 @@ void matrix_init_user(void) { #endif } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) @@ -169,7 +169,7 @@ void oled_task_user(void) { // oled_write_ln(encoder_debug, false); } } -#endif //OLED_DRIVER_ENABLE +#endif //OLED_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { diff --git a/keyboards/lily58/keymaps/curry/rules.mk b/keyboards/lily58/keymaps/curry/rules.mk index 2137a1507..1ff1fad96 100644 --- a/keyboards/lily58/keymaps/curry/rules.mk +++ b/keyboards/lily58/keymaps/curry/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no COMMAND_ENABLE = no @@ -10,7 +10,7 @@ COMMAND_ENABLE = no RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = no -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes BOOTLOADER = atmel-dfu SPLIT_TRANSPORT = mirror diff --git a/keyboards/lily58/keymaps/cykedev/keymap.c b/keyboards/lily58/keymaps/cykedev/keymap.c index e38872356..460afb229 100644 --- a/keyboards/lily58/keymaps/cykedev/keymap.c +++ b/keyboards/lily58/keymaps/cykedev/keymap.c @@ -105,7 +105,7 @@ bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { } } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) return OLED_ROTATION_180; @@ -117,5 +117,5 @@ const char *read_logo(void); void oled_task_user(void) { oled_write_ln(read_logo(), false); } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/keyboards/lily58/keymaps/cykedev/rules.mk b/keyboards/lily58/keymaps/cykedev/rules.mk index 442481369..30a34bd64 100644 --- a/keyboards/lily58/keymaps/cykedev/rules.mk +++ b/keyboards/lily58/keymaps/cykedev/rules.mk @@ -1,9 +1,9 @@ AUTO_SHIFT_ENABLE = no -OLED_DRIVER_ENABLE= yes +OLED_ENABLE= yes EXTRAKEY_ENABLE = yes -SRC += ./lib/logo_reader.c +SRC += ./lib/logo_reader.c # ./lib/keylogger.c \ # ./lib/mode_icon_reader.c \ # ./lib/timelogger.c \ diff --git a/keyboards/lily58/keymaps/datadavd/keymap.c b/keyboards/lily58/keymaps/datadavd/keymap.c index df963b365..15bcce10b 100644 --- a/keyboards/lily58/keymaps/datadavd/keymap.c +++ b/keyboards/lily58/keymaps/datadavd/keymap.c @@ -114,8 +114,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk -#ifdef OLED_DRIVER_ENABLE +//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) @@ -226,11 +226,11 @@ void oled_task_user(void) { render_lfc_logo(); } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #endif } return true; diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index 74a1895dd..1b5b7c862 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -101,8 +101,8 @@ layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } -//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk -#ifdef OLED_DRIVER_ENABLE +//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) @@ -135,11 +135,11 @@ void oled_task_user(void) { oled_write(read_logo(), false); } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/lily58/keymaps/default/rules.mk b/keyboards/lily58/keymaps/default/rules.mk index ea94a9708..c98eb9edf 100644 --- a/keyboards/lily58/keymaps/default/rules.mk +++ b/keyboards/lily58/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -13,9 +13,9 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing -OLED_DRIVER_ENABLE= yes # OLED display +OLED_ENABLE= yes # OLED display # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/lily58/keymaps/drasbeck/keymap.c b/keyboards/lily58/keymaps/drasbeck/keymap.c index e575736c0..6e22f0431 100644 --- a/keyboards/lily58/keymaps/drasbeck/keymap.c +++ b/keyboards/lily58/keymaps/drasbeck/keymap.c @@ -71,8 +71,8 @@ void matrix_init_user(void) { #endif } -//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk -#ifdef OLED_DRIVER_ENABLE +//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) @@ -105,11 +105,11 @@ void oled_task_user(void) { oled_write(read_logo(), false); } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/lily58/keymaps/drasbeck/rules.mk b/keyboards/lily58/keymaps/drasbeck/rules.mk index ff8b816e3..10228e367 100644 --- a/keyboards/lily58/keymaps/drasbeck/rules.mk +++ b/keyboards/lily58/keymaps/drasbeck/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -12,7 +12,8 @@ AUDIO_ENABLE = no # Audio output BLUETOOTH_ENABLE = no # Enable Bluetooth RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow SWAP_HANDS_ENABLE = no # Enable one-hand typing -OLED_DRIVER_ENABLE = yes # OLED display +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # OLED display ENCODER_ENABLE = yes # Enable encoder # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/lily58/keymaps/lily58l/keymap.c b/keyboards/lily58/keymaps/lily58l/keymap.c index cf1f38d74..3db5f4ac6 100644 --- a/keyboards/lily58/keymaps/lily58l/keymap.c +++ b/keyboards/lily58/keymaps/lily58l/keymap.c @@ -126,8 +126,8 @@ layer_state_t layer_state_set_user(layer_state_t state) { return state; } -//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk -#ifdef OLED_DRIVER_ENABLE +//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) { @@ -286,7 +286,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE // Rotary encoder related code diff --git a/keyboards/lily58/keymaps/mikefightsbears/keymap.c b/keyboards/lily58/keymaps/mikefightsbears/keymap.c index d6e24ef3c..303e7b7d5 100644 --- a/keyboards/lily58/keymaps/mikefightsbears/keymap.c +++ b/keyboards/lily58/keymaps/mikefightsbears/keymap.c @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | left | dn | rght | |-------. ,-------| | home | pgdn | end | | INS | * |------+------+------+------+------+------| | | |------+------+------+------+------+------| - * | | | | | | |-------| |-------| | mute | prev | next | play | + * | | | | | | |-------| |-------| | mute | prev | next | play | * `-----------------------------------------/ / \ \-----------------------------------------' * | | | | / / \ \ | | vol- | vol+ | * | | | |/ / \ \ | | | | @@ -81,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | left | dn | rght | |-------. ,-------| | home | pgdn | end | | INS | * |------+------+------+------+------+------| | | |------+------+------+------+------+------| - * | | | | | | |-------| |-------| | mute | prev | next | play | + * | | | | | | |-------| |-------| | mute | prev | next | play | * `-----------------------------------------/ / \ \-----------------------------------------' * | | | | / / \ \ | | vol- | vol+ | * | | | |/ / \ \ | | | | @@ -135,8 +135,8 @@ void matrix_init_user(void) { #endif } -//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk -#ifdef OLED_DRIVER_ENABLE +//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) @@ -169,11 +169,11 @@ void oled_task_user(void) { oled_write(read_logo(), false); } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/lily58/keymaps/mikefightsbears/rules.mk b/keyboards/lily58/keymaps/mikefightsbears/rules.mk index af0885683..f43c8e200 100644 --- a/keyboards/lily58/keymaps/mikefightsbears/rules.mk +++ b/keyboards/lily58/keymaps/mikefightsbears/rules.mk @@ -4,9 +4,9 @@ # EXTRAKEY_ENABLE = yes # Audio control and System control NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing -OLED_DRIVER_ENABLE= yes # OLED display +OLED_ENABLE= yes # OLED display # If you want to change the display of OLED, you need to change here SRC += ./lib/rgb_state_reader.c \ diff --git a/keyboards/lily58/keymaps/muuko/keymap.c b/keyboards/lily58/keymaps/muuko/keymap.c index b8afa0aa4..7ec273743 100644 --- a/keyboards/lily58/keymaps/muuko/keymap.c +++ b/keyboards/lily58/keymaps/muuko/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) return OLED_ROTATION_180; else return rotation; diff --git a/keyboards/lily58/keymaps/muuko/rules.mk b/keyboards/lily58/keymaps/muuko/rules.mk index 3f958dff3..7c38d43f8 100644 --- a/keyboards/lily58/keymaps/muuko/rules.mk +++ b/keyboards/lily58/keymaps/muuko/rules.mk @@ -1,4 +1,5 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 WPM_ENABLE = yes EXTRAKEY_ENABLE = yes COMBO_ENABLE = yes diff --git a/keyboards/lily58/keymaps/narze/keymap.c b/keyboards/lily58/keymaps/narze/keymap.c index c0c5680da..dfb51ae50 100644 --- a/keyboards/lily58/keymaps/narze/keymap.c +++ b/keyboards/lily58/keymaps/narze/keymap.c @@ -277,7 +277,7 @@ void matrix_init_user(void) { #endif } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) @@ -315,7 +315,7 @@ void oled_task_user(void) { } } -#endif //OLED_DRIVER_ENABLE +#endif //OLED_ENABLE #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) @@ -337,7 +337,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/lily58/keymaps/ninjonas/rules.mk b/keyboards/lily58/keymaps/ninjonas/rules.mk index 2cccbd077..b7c57d87b 100644 --- a/keyboards/lily58/keymaps/ninjonas/rules.mk +++ b/keyboards/lily58/keymaps/ninjonas/rules.mk @@ -1,2 +1,3 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes diff --git a/keyboards/lily58/keymaps/via/keymap.c b/keyboards/lily58/keymaps/via/keymap.c index bf46fb8e1..5cc5dc1e5 100644 --- a/keyboards/lily58/keymaps/via/keymap.c +++ b/keyboards/lily58/keymaps/via/keymap.c @@ -120,7 +120,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) @@ -215,12 +215,12 @@ void oled_task_user(void) { render_logo(); } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/lily58/keymaps/via/rules.mk b/keyboards/lily58/keymaps/via/rules.mk index 03f8d38f4..d3528d52a 100644 --- a/keyboards/lily58/keymaps/via/rules.mk +++ b/keyboards/lily58/keymaps/via/rules.mk @@ -1,4 +1,5 @@ VIA_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/lily58/keymaps/yshrsmz/keymap.c b/keyboards/lily58/keymaps/yshrsmz/keymap.c index 545d440b4..da840e585 100644 --- a/keyboards/lily58/keymaps/yshrsmz/keymap.c +++ b/keyboards/lily58/keymaps/yshrsmz/keymap.c @@ -137,8 +137,8 @@ void matrix_init_user(void) { #endif } -//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk -#ifdef OLED_DRIVER_ENABLE +//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) @@ -171,11 +171,11 @@ void oled_task_user(void) { oled_write(read_logo(), false); } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/lily58/keymaps/yshrsmz/rules.mk b/keyboards/lily58/keymaps/yshrsmz/rules.mk index 4d481eac1..2541d64e1 100644 --- a/keyboards/lily58/keymaps/yshrsmz/rules.mk +++ b/keyboards/lily58/keymaps/yshrsmz/rules.mk @@ -1,6 +1,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. AUTO_SHIFT_ENABLE = yes -OLED_DRIVER_ENABLE= yes # OLED display +OLED_ENABLE= yes # OLED display # If you want to change the display of OLED, you need to change here SRC += ./lib/rgb_state_reader.c \ diff --git a/keyboards/lily58/keymaps/yuchi/keymap.c b/keyboards/lily58/keymaps/yuchi/keymap.c index 37230696f..02279bb8a 100644 --- a/keyboards/lily58/keymaps/yuchi/keymap.c +++ b/keyboards/lily58/keymaps/yuchi/keymap.c @@ -119,8 +119,8 @@ void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { } } -//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk -#ifdef OLED_DRIVER_ENABLE +//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) @@ -153,11 +153,11 @@ void oled_task_user(void) { oled_write(read_logo(), false); } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/lily58/keymaps/yuchi/rules.mk b/keyboards/lily58/keymaps/yuchi/rules.mk index 45bf4cfc3..f714be7c6 100644 --- a/keyboards/lily58/keymaps/yuchi/rules.mk +++ b/keyboards/lily58/keymaps/yuchi/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -15,7 +15,7 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SWAP_HANDS_ENABLE = no # Enable one-hand typing -OLED_DRIVER_ENABLE= yes # OLED display +OLED_ENABLE= yes # OLED display # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index 34b512d59..302cb0cdc 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk @@ -15,21 +15,21 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -OLED_DRIVER_ENABLE = yes # OLED display +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # OLED display SPLIT_KEYBOARD = yes DEFAULT_FOLDER = lily58/rev1 diff --git a/keyboards/linworks/whale75/rules.mk b/keyboards/linworks/whale75/rules.mk index bcca4a73d..ec55342c0 100644 --- a/keyboards/linworks/whale75/rules.mk +++ b/keyboards/linworks/whale75/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/littlealby/mute/rules.mk b/keyboards/littlealby/mute/rules.mk index 0ea77b055..7a27e6e91 100644 --- a/keyboards/littlealby/mute/rules.mk +++ b/keyboards/littlealby/mute/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lizard_trick/tenkey_plusplus/config.h b/keyboards/lizard_trick/tenkey_plusplus/config.h index d962e67da..d1087851c 100644 --- a/keyboards/lizard_trick/tenkey_plusplus/config.h +++ b/keyboards/lizard_trick/tenkey_plusplus/config.h @@ -41,7 +41,7 @@ along with this program. If not, see . * */ -#define MATRIX_ROW_PINS { B7, D4, B5, B6, C6, C7, } +#define MATRIX_ROW_PINS { B7, D4, B5, B6, C6, C7 } #define MATRIX_COL_PINS { D5, D3, D2, F7 } #define UNUSED_PINS diff --git a/keyboards/lizard_trick/tenkey_plusplus/rules.mk b/keyboards/lizard_trick/tenkey_plusplus/rules.mk index fb12719ce..b3a90d9f2 100644 --- a/keyboards/lizard_trick/tenkey_plusplus/rules.mk +++ b/keyboards/lizard_trick/tenkey_plusplus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lm_keyboard/lm60n/rules.mk b/keyboards/lm_keyboard/lm60n/rules.mk index f49426d51..6c4393757 100644 --- a/keyboards/lm_keyboard/lm60n/rules.mk +++ b/keyboards/lm_keyboard/lm60n/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/longnald/corin/rules.mk b/keyboards/longnald/corin/rules.mk index 965087c1a..2c456410e 100644 --- a/keyboards/longnald/corin/rules.mk +++ b/keyboards/longnald/corin/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lucid/kbd8x_hs/rules.mk b/keyboards/lucid/kbd8x_hs/rules.mk index a6dd88ac1..73d1fb978 100644 --- a/keyboards/lucid/kbd8x_hs/rules.mk +++ b/keyboards/lucid/kbd8x_hs/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lucid/phantom_hs/rules.mk b/keyboards/lucid/phantom_hs/rules.mk index 945e7be2e..2123751f9 100644 --- a/keyboards/lucid/phantom_hs/rules.mk +++ b/keyboards/lucid/phantom_hs/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lucid/phantom_solder/rules.mk b/keyboards/lucid/phantom_solder/rules.mk index ddf921edb..1e7ed0c27 100644 --- a/keyboards/lucid/phantom_solder/rules.mk +++ b/keyboards/lucid/phantom_solder/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lucid/scarlet/rules.mk b/keyboards/lucid/scarlet/rules.mk index 9572d3371..5ac26c47c 100644 --- a/keyboards/lucid/scarlet/rules.mk +++ b/keyboards/lucid/scarlet/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/m10a/keymaps/gam3cat/keymap.c b/keyboards/m10a/keymaps/gam3cat/keymap.c index 2d79007fe..f962246ef 100644 --- a/keyboards/m10a/keymaps/gam3cat/keymap.c +++ b/keyboards/m10a/keymaps/gam3cat/keymap.c @@ -114,7 +114,7 @@ void matrix_scan_user(void) { } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case _L0: custom_backlight_level(0); diff --git a/keyboards/m10a/keymaps/gam3cat/rules.mk b/keyboards/m10a/keymaps/gam3cat/rules.mk index 374f52242..ce170ae85 100644 --- a/keyboards/m10a/keymaps/gam3cat/rules.mk +++ b/keyboards/m10a/keymaps/gam3cat/rules.mk @@ -4,7 +4,7 @@ # TAP_DANCE_ENABLE = no # Enable TapDance functionality RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+1500) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -18,6 +18,5 @@ UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 #VARIABLE_TRACE = no # Use this to debug changes to variable values -API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/m10a/rules.mk b/keyboards/m10a/rules.mk index 0f8368e63..196edf6aa 100644 --- a/keyboards/m10a/rules.mk +++ b/keyboards/m10a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,4 +22,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = yes # Unicode -API_SYSEX_ENABLE = yes diff --git a/keyboards/m3n3van/rules.mk b/keyboards/m3n3van/rules.mk index 831de6dc5..96823dca6 100644 --- a/keyboards/m3n3van/rules.mk +++ b/keyboards/m3n3van/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/m65/config.h b/keyboards/m65/config.h new file mode 100644 index 000000000..49db1720a --- /dev/null +++ b/keyboards/m65/config.h @@ -0,0 +1,33 @@ +/* +Copyright 2021 Alin M Elena + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0xBABA +#define MANUFACTURER Alin Elena +#define PRODUCT m65 + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 13 + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define LOCKING_SUPPORT_ENABLE +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/m65/info.json b/keyboards/m65/info.json new file mode 100644 index 000000000..fc8edd67d --- /dev/null +++ b/keyboards/m65/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "M65", + "keyboard_folder": "m65", + "url": "https://alin.elena.space/blog/keeblego/", + "maintainer": "alinelena", + "width": 13, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x13": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 4, "y": 0}, + {"x": 5, "y": 0}, + {"x": 6, "y": 0}, + {"x": 7, "y": 0}, + {"x": 8, "y": 0}, + {"x": 9, "y": 0}, + {"x": 10, "y": 0}, + {"x": 11, "y": 0}, + {"x": 12, "y": 0}, + + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 4, "y": 1}, + {"x": 5, "y": 1}, + {"x": 6, "y": 1}, + {"x": 7, "y": 1}, + {"x": 8, "y": 1}, + {"x": 9, "y": 1}, + {"x": 10, "y": 1}, + {"x": 11, "y": 1}, + {"x": 12, "y": 1}, + + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 4, "y": 2}, + {"x": 5, "y": 2}, + {"x": 6, "y": 2}, + {"x": 7, "y": 2}, + {"x": 8, "y": 2}, + {"x": 9, "y": 2}, + {"x": 10, "y": 2}, + {"x": 11, "y": 2}, + {"x": 12, "y": 2}, + + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3}, + {"x": 4, "y": 3}, + {"x": 5, "y": 3}, + {"x": 6, "y": 3}, + {"x": 7, "y": 3}, + {"x": 8, "y": 3}, + {"x": 9, "y": 3}, + {"x": 10, "y": 3}, + {"x": 11, "y": 3}, + {"x": 12, "y": 3}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + {"x": 2, "y": 4}, + {"x": 3, "y": 4}, + {"x": 4, "y": 4}, + {"x": 5, "y": 4}, + {"x": 6, "y": 4}, + {"x": 7, "y": 4}, + {"x": 8, "y": 4}, + {"x": 9, "y": 4}, + {"x": 10, "y": 4}, + {"x": 11, "y": 4} + {"x": 12, "y": 4} + ] + } + } +} diff --git a/keyboards/m65/keymaps/default/config.h b/keyboards/m65/keymaps/default/config.h new file mode 100644 index 000000000..aabd6a2be --- /dev/null +++ b/keyboards/m65/keymaps/default/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2021 Alin M Elena + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define TAPPING_TOGGLE 2 diff --git a/keyboards/m65/keymaps/default/keymap.c b/keyboards/m65/keymaps/default/keymap.c new file mode 100644 index 000000000..13093408b --- /dev/null +++ b/keyboards/m65/keymaps/default/keymap.c @@ -0,0 +1,113 @@ +/* +Copyright 2021 Alin M Elena + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public 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 { _QW = 0, _LWR, _RSE, _ADJ }; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = LAYOUT_ortho_5x13( + KC_ESC, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_BSPC , + KC_TAB, KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC , + KC_NUHS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , + KC_LSPO, KC_NUBS, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_UP , KC_SLSH , + KC_LCTL, KC_LGUI, TT(_LWR), KC_LALT, TT(_RSE), KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RSPC, KC_LEFT, KC_DOWN, KC_RGHT), + + [_LWR] = LAYOUT_ortho_5x13( + KC_GRV , KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, G(KC_P), KC_SLEP, KC_WAKE, KC_PSCR, KC_DEL , KC_EQL , + KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_BTN1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS , + KC_TRNS, KC_BTN4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R), + + [_RSE] = LAYOUT_ortho_5x13( + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R), + + [_ADJ] = LAYOUT_ortho_5x13( + KC_TRNS, KC_TRNS, A(KC_F2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, RESET , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; +// clang-format on + +// let us assume we start with both layers off +bool toggle_lwr = false; +bool toggle_rse = false; + +static inline void led_lwr(const bool on) { +#ifdef LED_NUM_LOCK_PIN + writePin(LED_NUM_LOCK_PIN, on); +#endif +} + +static inline void led_rse(const bool on) { +#ifdef LED_SCROLL_LOCK_PIN + writePin(LED_SCROLL_LOCK_PIN, on); +#endif +} + +static inline void led_caps(const bool on) { +#ifdef LED_CAPS_LOCK_PIN + writePin(LED_CAPS_LOCK_PIN, on); +#endif +} + +bool led_update_user(led_t led_state) { + // Disable the default LED update code, so that lock LEDs could be reused to show layer status. + return false; +} + +void matrix_scan_user(void) { + led_lwr(toggle_lwr); + led_rse(toggle_rse); + led_t led_state = host_keyboard_led_state(); + led_caps(!led_state.caps_lock); + if (layer_state_is(_ADJ)) { + led_lwr(true); + led_rse(true); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case (TT(_LWR)): + if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) { + // This runs before the TT() handler toggles the layer state, so the current layer state is the opposite of the final one after toggle. + toggle_lwr = !layer_state_is(_LWR); + } + return true; + break; + case (TT(_RSE)): + if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) { + toggle_rse = !layer_state_is(_RSE); + } + return true; + break; + default: + return true; + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LWR, _RSE, _ADJ); } diff --git a/keyboards/m65/keymaps/default/readme.md b/keyboards/m65/keymaps/default/readme.md new file mode 100644 index 000000000..ae7134223 --- /dev/null +++ b/keyboards/m65/keymaps/default/readme.md @@ -0,0 +1,13 @@ +![M65 Layout Image](https://i.imgur.com/Z2O8yhGh.png) + +# Default M65 Layout + +This is the default layout for M65. For the most part it's a straightforward and easy to follow layout inspired by ISO with a UK +turn. The only unusual key is the key in the upper left, which sends Escape normally, but Grave when in layer 1 aka LWR. Similarly +number row in layer 1 give the usual audio KC_GRV, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_AUDIO_VOL_DOWN, KC_MEDIA_PREV_TRACK, +KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, M_EXTDISP, KC_SYSTEM_SLEEP, KC_SYSTEM_WAKE, KC_PSCREEN, KC_DEL, KC_EQL in layer 2 aka +RSE one gets F1-F12 mouse emulation can be used in layer 1 and 2. + +flashing is done by LWR+RSE+r + +full layout below see in keymap.c diff --git a/keyboards/m65/keymaps/dk/config.h b/keyboards/m65/keymaps/dk/config.h new file mode 100644 index 000000000..aabd6a2be --- /dev/null +++ b/keyboards/m65/keymaps/dk/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2021 Alin M Elena + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define TAPPING_TOGGLE 2 diff --git a/keyboards/m65/keymaps/dk/keymap.c b/keyboards/m65/keymaps/dk/keymap.c new file mode 100644 index 000000000..4a26f4eed --- /dev/null +++ b/keyboards/m65/keymaps/dk/keymap.c @@ -0,0 +1,114 @@ +/* +Copyright 2021 Alin M Elena + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#include "keymap_danish.h" + +enum layer_names { _QW = 0, _LWR, _RSE, _ADJ }; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = LAYOUT_ortho_5x13( + KC_ESC, DK_1 , DK_2 , DK_3 , DK_4 , DK_5 , DK_6 , DK_7 , DK_8 , DK_9 , DK_0 , DK_PLUS, KC_BSPC , + KC_TAB, DK_Q , DK_W , DK_E , DK_R , DK_T , DK_Y , DK_U , DK_I , DK_O , DK_P , DK_ARNG, DK_DIAE , + DK_QUOT, DK_A , DK_S , DK_D , DK_F , DK_G , DK_H , DK_J , DK_K , DK_L , DK_AE , DK_OSTR, KC_ENT , + KC_LSPO, DK_LABK, DK_Z , DK_X , DK_C , DK_V , DK_B , DK_N , DK_M , DK_COMM, DK_DOT , KC_UP , DK_MINS , + KC_LCTL, KC_LGUI, TT(_LWR), KC_LALT, TT(_RSE), KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RSPC, KC_LEFT, KC_DOWN, KC_RGHT), + + [_LWR] = LAYOUT_ortho_5x13( + DK_HALF, KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, G(KC_P), KC_SLEP, KC_WAKE, KC_PSCR, KC_DEL , DK_ACUT , + KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_BTN1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS , + KC_TRNS, KC_BTN4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R), + + [_RSE] = LAYOUT_ortho_5x13( + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R), + + [_ADJ] = LAYOUT_ortho_5x13( + KC_TRNS, KC_TRNS, A(KC_F2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, RESET , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; +// clang-format on + +// let us assume we start with both layers off +bool toggle_lwr = false; +bool toggle_rse = false; + +static inline void led_lwr(const bool on) { +#ifdef LED_NUM_LOCK_PIN + writePin(LED_NUM_LOCK_PIN, on); +#endif +} + +static inline void led_rse(const bool on) { +#ifdef LED_SCROLL_LOCK_PIN + writePin(LED_SCROLL_LOCK_PIN, on); +#endif +} + +static inline void led_caps(const bool on) { +#ifdef LED_CAPS_LOCK_PIN + writePin(LED_CAPS_LOCK_PIN, on); +#endif +} + +bool led_update_user(led_t led_state) { + // Disable the default LED update code, so that lock LEDs could be reused to show layer status. + return false; +} + +void matrix_scan_user(void) { + led_lwr(toggle_lwr); + led_rse(toggle_rse); + led_t led_state = host_keyboard_led_state(); + led_caps(!led_state.caps_lock); + if (layer_state_is(_ADJ)) { + led_lwr(true); + led_rse(true); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case (TT(_LWR)): + if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) { + // This runs before the TT() handler toggles the layer state, so the current layer state is the opposite of the final one after toggle. + toggle_lwr = !layer_state_is(_LWR); + } + return true; + break; + case (TT(_RSE)): + if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) { + toggle_rse = !layer_state_is(_RSE); + } + return true; + break; + default: + return true; + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LWR, _RSE, _ADJ); } diff --git a/keyboards/m65/keymaps/dk/readme.md b/keyboards/m65/keymaps/dk/readme.md new file mode 100644 index 000000000..06fed3bda --- /dev/null +++ b/keyboards/m65/keymaps/dk/readme.md @@ -0,0 +1,13 @@ +![M65 Layout Image](https://i.imgur.com/RQqsM4gh.png) + +# Default M65 Layout + +This is the Danish keymap for M65. For the most part it's a straightforward and easy to follow layout inspired by ISO with a DK +turn. The only unusual key is the key in the upper left, which sends Escape normally, but Grave when in layer 1 aka LWR. Similarly +number row in layer 1 give the usual audio KC_GRV, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_AUDIO_VOL_DOWN, KC_MEDIA_PREV_TRACK, +KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, M_EXTDISP, KC_SYSTEM_SLEEP, KC_SYSTEM_WAKE, KC_PSCREEN, KC_DEL, DK_ACUT in layer 2 aka +RSE one gets F1-F12 mouse emulation can be used in layer 1 and 2. + +flashing is done by LWR+RSE+r + +full layout below see in keymap.c diff --git a/keyboards/m65/keymaps/uk/config.h b/keyboards/m65/keymaps/uk/config.h new file mode 100644 index 000000000..aabd6a2be --- /dev/null +++ b/keyboards/m65/keymaps/uk/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2021 Alin M Elena + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define TAPPING_TOGGLE 2 diff --git a/keyboards/m65/keymaps/uk/keymap.c b/keyboards/m65/keymaps/uk/keymap.c new file mode 100644 index 000000000..0f426f614 --- /dev/null +++ b/keyboards/m65/keymaps/uk/keymap.c @@ -0,0 +1,114 @@ +/* +Copyright 2021 Alin M Elena + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#include "keymap_uk.h" + +enum layer_names { _QW = 0, _LWR, _RSE, _ADJ }; + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QW] = LAYOUT_ortho_5x13( + KC_ESC, UK_1 , UK_2 , UK_3 , UK_4 , UK_5 , UK_6 , UK_7 , UK_8 , UK_9 , UK_0 , UK_MINS, KC_BSPC , + KC_TAB, UK_Q , UK_W , UK_E , UK_R , UK_T , UK_Y , UK_U , UK_I , UK_O , UK_P , UK_LBRC, UK_RBRC , + UK_HASH, UK_A , UK_S , UK_D , UK_F , UK_G , UK_H , UK_J , UK_K , UK_L , UK_SCLN, UK_QUOT, KC_ENT , + KC_LSPO, UK_BSLS, UK_Z , UK_X , UK_C , UK_V , UK_B , UK_N , UK_M , UK_COMM, UK_DOT , KC_UP , UK_SLSH , + KC_LCTL, KC_LGUI, TT(_LWR), KC_LALT, TT(_RSE), KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RSPC, KC_LEFT, KC_DOWN, KC_RGHT), + + [_LWR] = LAYOUT_ortho_5x13( + KC_GRV , KC_MUTE, KC_VOLU, KC_VOLD, KC_MPRV, KC_MPLY, KC_MNXT, G(KC_P), KC_SLEP, KC_WAKE, KC_PSCR, KC_DEL , UK_EQL , + KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_BTN1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS , + KC_TRNS, KC_BTN4, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R), + + [_RSE] = LAYOUT_ortho_5x13( + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_L, KC_WH_D, KC_WH_R), + + [_ADJ] = LAYOUT_ortho_5x13( + KC_TRNS, KC_TRNS, A(KC_F2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, RESET , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , + KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; +// clang-format on + +// let us assume we start with both layers off +bool toggle_lwr = false; +bool toggle_rse = false; + +static inline void led_lwr(const bool on) { +#ifdef LED_NUM_LOCK_PIN + writePin(LED_NUM_LOCK_PIN, on); +#endif +} + +static inline void led_rse(const bool on) { +#ifdef LED_SCROLL_LOCK_PIN + writePin(LED_SCROLL_LOCK_PIN, on); +#endif +} + +static inline void led_caps(const bool on) { +#ifdef LED_CAPS_LOCK_PIN + writePin(LED_CAPS_LOCK_PIN, on); +#endif +} + +bool led_update_user(led_t led_state) { + // Disable the default LED update code, so that lock LEDs could be reused to show layer status. + return false; +} + +void matrix_scan_user(void) { + led_lwr(toggle_lwr); + led_rse(toggle_rse); + led_t led_state = host_keyboard_led_state(); + led_caps(!led_state.caps_lock); + if (layer_state_is(_ADJ)) { + led_lwr(true); + led_rse(true); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t* record) { + switch (keycode) { + case (TT(_LWR)): + if (!record->event.pressed && record->tap.count == TAPPING_TOGGLE) { + // This runs before the TT() handler toggles the layer state, so the current layer state is the opposite of the final one after toggle. + toggle_lwr = !layer_state_is(_LWR); + } + return true; + break; + case (TT(_RSE)): + if (record->event.pressed && record->tap.count == TAPPING_TOGGLE) { + toggle_rse = !layer_state_is(_RSE); + } + return true; + break; + default: + return true; + } +} + +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LWR, _RSE, _ADJ); } diff --git a/keyboards/m65/keymaps/uk/readme.md b/keyboards/m65/keymaps/uk/readme.md new file mode 100644 index 000000000..bc29d2390 --- /dev/null +++ b/keyboards/m65/keymaps/uk/readme.md @@ -0,0 +1,13 @@ +# Default M65 Layout + +![M65 Layout Image](https://i.imgur.com/KZFnAU5h.png) + +This is the default layout for M65. For the most part it's a straightforward and easy to follow layout inspired by ISO with a UK +turn. The only unusual key is the key in the upper left, which sends Escape normally, but Grave when in layer 1 aka LWR. Similarly +number row in layer 1 give the usual audio KC_GRV, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_AUDIO_VOL_DOWN, KC_MEDIA_PREV_TRACK, +KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, M_EXTDISP, KC_SYSTEM_SLEEP, KC_SYSTEM_WAKE, KC_PSCREEN, KC_DEL, KC_EQL in layer 2 aka +RSE one gets F1-F12 mouse emulation can be used in layer 1 and 2. + +flashing is done by LWR+RSE+r + +full layout below see in keymap.c diff --git a/keyboards/m65/m65.c b/keyboards/m65/m65.c new file mode 100644 index 000000000..35e2b4122 --- /dev/null +++ b/keyboards/m65/m65.c @@ -0,0 +1,19 @@ +/* +Copyright 2021 Alin M Elena + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + + +#include "m65.h" diff --git a/keyboards/m65/m65.h b/keyboards/m65/m65.h new file mode 100644 index 000000000..50065c9f8 --- /dev/null +++ b/keyboards/m65/m65.h @@ -0,0 +1,34 @@ +/* +Copyright 2021 Alin M Elena + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x13( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412 } \ +} diff --git a/keyboards/m65/readme.md b/keyboards/m65/readme.md new file mode 100644 index 000000000..9493a3fff --- /dev/null +++ b/keyboards/m65/readme.md @@ -0,0 +1,22 @@ +# M65 + +![M65](https://i.imgur.com/gXuecush.jpg) + +A (13x5) ortholinear keyboard that can be hand wired or using a pcb. + +* Keyboard Maintainer: [Alin Elena](https://github.com/alinelena) ([@drFaustroll on GitLab](https://gitlab.com/drFaustroll)) +* Hardware Supported: custom pcb [see](https://gitlab.com/drFaustroll/m65) STM/APM32F103C8T6, aka Black Pill +* Hardware Availability: [custom how to](https://alin.elena.space/blog/keeblego/) + + +Make example for this keyboard (after setting up your build environment): + + make m65/rev1:default + +Flashing example for this keyboard: + + make m65/rev1:default:flash + +To enter flashing mode, press Lower+Raise+R. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/m65/rev1/chconf.h b/keyboards/m65/rev1/chconf.h new file mode 100644 index 000000000..8c43fb269 --- /dev/null +++ b/keyboards/m65/rev1/chconf.h @@ -0,0 +1,29 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/m65/rev1/chconf.h -r platforms/chibios/common/configs/chconf.h` + */ + +#pragma once + +#define CH_CFG_ST_TIMEDELTA 0 + +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +#include_next + diff --git a/keyboards/m65/rev1/config.h b/keyboards/m65/rev1/config.h new file mode 100644 index 000000000..090210f25 --- /dev/null +++ b/keyboards/m65/rev1/config.h @@ -0,0 +1,32 @@ +/* +Copyright 2021 Alin M Elena + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define DEVICE_VER 0x0001 +#define PRODUCT_ID 0x6060 + +#define LED_NUM_LOCK_PIN B12 +#define LED_SCROLL_LOCK_PIN B13 +#define LED_CAPS_LOCK_PIN C13 + +// 0 1 2 3 4 +#define MATRIX_ROW_PINS { B11, B0, B1, A2, A3 } +// 0 1 2 3 4 5 6 7 8 9 10 11 12 +#define MATRIX_COL_PINS {A10, A15, B3, B4, B5, B9, B8, B7, B6, C15, A0, A7, B10 } + +#define UNUSED_PINS diff --git a/keyboards/m65/rev1/mcuconf.h b/keyboards/m65/rev1/mcuconf.h new file mode 100644 index 000000000..20df276a5 --- /dev/null +++ b/keyboards/m65/rev1/mcuconf.h @@ -0,0 +1,27 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/m65/rev1/mcuconf.h -r platforms/chibios/STM32_F103_STM32DUINO/configs/mcuconf.h` + */ + +#pragma once + +#include_next + +#undef STM32_SPI_USE_SPI2 +#define STM32_SPI_USE_SPI2 FALSE diff --git a/keyboards/xd002/.noci b/keyboards/m65/rev1/readme.md similarity index 100% rename from keyboards/xd002/.noci rename to keyboards/m65/rev1/readme.md diff --git a/keyboards/m65/rev1/rules.mk b/keyboards/m65/rev1/rules.mk new file mode 100644 index 000000000..575048f2b --- /dev/null +++ b/keyboards/m65/rev1/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = STM32F103 + +# Bootloader selection +BOOTLOADER = stm32duino + +# 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 diff --git a/keyboards/majistic/rules.mk b/keyboards/majistic/rules.mk index 2440fc903..969058b6d 100644 --- a/keyboards/majistic/rules.mk +++ b/keyboards/majistic/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/makrosu/rules.mk b/keyboards/makrosu/rules.mk index d12ce5037..d2c6fc513 100644 --- a/keyboards/makrosu/rules.mk +++ b/keyboards/makrosu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/manta60/rules.mk b/keyboards/manta60/rules.mk index 71148e248..db012a155 100644 --- a/keyboards/manta60/rules.mk +++ b/keyboards/manta60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/manyboard/macro/config.h b/keyboards/manyboard/macro/config.h new file mode 100644 index 000000000..d7a950f2e --- /dev/null +++ b/keyboards/manyboard/macro/config.h @@ -0,0 +1,53 @@ +/* +Copyright 2020 William Ehman + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4D42 // MB +#define PRODUCT_ID 0x0015 // 15 keys +#define DEVICE_VER 0x0103 +#define MANUFACTURER Manyboard +#define PRODUCT MB_Macro + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3 } +#define MATRIX_COL_PINS { D4, D5, D6, D7 } +#define UNUSED_PINS + +/*Encoder Pins*/ +#define ENCODERS_PAD_A { C6 } +#define ENCODERS_PAD_B { C7 } + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* RGB Pins */ +#define RGB_DI_PIN B6 +#define RGBLED_NUM 2 +#define RGBLIGHT_LIMIT_VAL 10 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/manyboard/macro/info.json b/keyboards/manyboard/macro/info.json new file mode 100644 index 000000000..8155672a7 --- /dev/null +++ b/keyboards/manyboard/macro/info.json @@ -0,0 +1,29 @@ +{ + "keyboard_name": "manyboard_macro", + "url": "https://github.com/WillEhman/qmk_firmware/tree/dev_create_mb_macro", + "maintainer": "William Ehman", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [ + {"x": 0, "y": 0}, + {"x": 1, "y": 0}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0}, + {"x": 0, "y": 1}, + {"x": 1, "y": 1}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1}, + {"x": 0, "y": 2}, + {"x": 1, "y": 2}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2}, + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + {"x": 2, "y": 3}, + {"x": 3, "y": 3} + ] + } + } +} diff --git a/keyboards/manyboard/macro/keymaps/default/keymap.c b/keyboards/manyboard/macro/keymaps/default/keymap.c new file mode 100644 index 000000000..0b9d2ac92 --- /dev/null +++ b/keyboards/manyboard/macro/keymaps/default/keymap.c @@ -0,0 +1,75 @@ +/* Copyright 2020 William Ehman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x4( + KC_F1, KC_F2, KC_F3, KC_F4, + KC_F5, KC_F6, KC_F7, KC_F8, + KC_F9, KC_F10, KC_F11, KC_F12, + KC_F13, KC_F14, KC_F15, TO(1) + ), + [1] = 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, TO(2) + ), + [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, TO(0) + ), +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case 0: + sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); + rgblight_set(); + break; + case 1: + sethsv(HSV_GREEN, (LED_TYPE *)&led[0]); + rgblight_set(); + break; + case 2: + sethsv(HSV_BLUE, (LED_TYPE *)&led[0]); + rgblight_set(); + break; + } + return state; +} + +bool encoder_update_user(uint8_t index, bool clockwise) { + /* With an if statement we can check which encoder was turned. */ + if (index == 0) { /* First encoder */ + /* And with another if statement we can check the direction. */ + if (clockwise) { + /* This is where the actual magic happens: this bit of code taps on the + Page Down key. You can do anything QMK allows you to do here. + You'll want to replace these lines with the things you want your + encoders to do. */ + tap_code(KC_AUDIO_VOL_UP); + } else { + /* And likewise for the other direction, this time Vol Down is pressed. */ + tap_code(KC_AUDIO_VOL_DOWN); + } + } + return true; +} diff --git a/keyboards/manyboard/macro/keymaps/via/keymap.c b/keyboards/manyboard/macro/keymaps/via/keymap.c new file mode 100644 index 000000000..0b9d2ac92 --- /dev/null +++ b/keyboards/manyboard/macro/keymaps/via/keymap.c @@ -0,0 +1,75 @@ +/* Copyright 2020 William Ehman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x4( + KC_F1, KC_F2, KC_F3, KC_F4, + KC_F5, KC_F6, KC_F7, KC_F8, + KC_F9, KC_F10, KC_F11, KC_F12, + KC_F13, KC_F14, KC_F15, TO(1) + ), + [1] = 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, TO(2) + ), + [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, TO(0) + ), +}; +// clang-format on + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case 0: + sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); + rgblight_set(); + break; + case 1: + sethsv(HSV_GREEN, (LED_TYPE *)&led[0]); + rgblight_set(); + break; + case 2: + sethsv(HSV_BLUE, (LED_TYPE *)&led[0]); + rgblight_set(); + break; + } + return state; +} + +bool encoder_update_user(uint8_t index, bool clockwise) { + /* With an if statement we can check which encoder was turned. */ + if (index == 0) { /* First encoder */ + /* And with another if statement we can check the direction. */ + if (clockwise) { + /* This is where the actual magic happens: this bit of code taps on the + Page Down key. You can do anything QMK allows you to do here. + You'll want to replace these lines with the things you want your + encoders to do. */ + tap_code(KC_AUDIO_VOL_UP); + } else { + /* And likewise for the other direction, this time Vol Down is pressed. */ + tap_code(KC_AUDIO_VOL_DOWN); + } + } + return true; +} diff --git a/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/rules.mk b/keyboards/manyboard/macro/keymaps/via/rules.mk similarity index 100% rename from keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/rules.mk rename to keyboards/manyboard/macro/keymaps/via/rules.mk diff --git a/keyboards/manyboard/macro/macro.c b/keyboards/manyboard/macro/macro.c new file mode 100644 index 000000000..eb8a188f3 --- /dev/null +++ b/keyboards/manyboard/macro/macro.c @@ -0,0 +1,17 @@ +/* Copyright 2020 WillEhman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "macro.h" diff --git a/keyboards/manyboard/macro/macro.h b/keyboards/manyboard/macro/macro.h new file mode 100644 index 000000000..0dccdbebf --- /dev/null +++ b/keyboards/manyboard/macro/macro.h @@ -0,0 +1,31 @@ +/* Copyright 2020 WillEhman + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} diff --git a/keyboards/manyboard/macro/readme.md b/keyboards/manyboard/macro/readme.md new file mode 100644 index 000000000..ca400b30e --- /dev/null +++ b/keyboards/manyboard/macro/readme.md @@ -0,0 +1,15 @@ +# manyboard_macro + +* Keyboard Maintainer: [WillEhman](https://github.com/WillEhman) +* Hardware Supported: The Manyboard Family of keyboards +* Hardware Availability: TBA + +Make example for this keyboard (after setting up your build environment): + + make manyboard/macro:default + +Flashing example for this keyboard: + + make manyboard/macro:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/manyboard/macro/rules.mk b/keyboards/manyboard/macro/rules.mk new file mode 100644 index 000000000..4f3b2a3f5 --- /dev/null +++ b/keyboards/manyboard/macro/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 # Enable Bootmagic Lite +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 +ENCODER_ENABLE = yes # Encoder Input diff --git a/keyboards/marksard/leftover30/rules.mk b/keyboards/marksard/leftover30/rules.mk index dd52fe113..582aa54be 100644 --- a/keyboards/marksard/leftover30/rules.mk +++ b/keyboards/marksard/leftover30/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/marksard/rhymestone/common/oled_helper.c b/keyboards/marksard/rhymestone/common/oled_helper.c index 537650025..354c1fb89 100644 --- a/keyboards/marksard/rhymestone/common/oled_helper.c +++ b/keyboards/marksard/rhymestone/common/oled_helper.c @@ -1,4 +1,4 @@ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include QMK_KEYBOARD_H #include #include diff --git a/keyboards/marksard/rhymestone/common/oled_helper.h b/keyboards/marksard/rhymestone/common/oled_helper.h index 02f7b94fa..dc9a938f6 100644 --- a/keyboards/marksard/rhymestone/common/oled_helper.h +++ b/keyboards/marksard/rhymestone/common/oled_helper.h @@ -1,4 +1,4 @@ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_logo(void); void render_lock_status(void); diff --git a/keyboards/marksard/rhymestone/keymaps/default/keymap.c b/keyboards/marksard/rhymestone/keymaps/default/keymap.c index 2d695f76b..f25955c91 100644 --- a/keyboards/marksard/rhymestone/keymaps/default/keymap.c +++ b/keyboards/marksard/rhymestone/keymaps/default/keymap.c @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define L_ADJUST (1<<_ADJUST) #define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include #include diff --git a/keyboards/marksard/rhymestone/keymaps/default/rules.mk b/keyboards/marksard/rhymestone/keymaps/default/rules.mk index c86cab8cc..9ab36c285 100644 --- a/keyboards/marksard/rhymestone/keymaps/default/rules.mk +++ b/keyboards/marksard/rhymestone/keymaps/default/rules.mk @@ -2,7 +2,7 @@ MOUSEKEY_ENABLE = yes # Mouse keys TAP_DANCE_ENABLE = no RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no LTO_ENABLE = yes # If you want to change the display of OLED, you need to change here diff --git a/keyboards/marksard/rhymestone/keymaps/switch_tester/rules.mk b/keyboards/marksard/rhymestone/keymaps/switch_tester/rules.mk index f4ccdf54f..e5a4e9710 100644 --- a/keyboards/marksard/rhymestone/keymaps/switch_tester/rules.mk +++ b/keyboards/marksard/rhymestone/keymaps/switch_tester/rules.mk @@ -2,6 +2,6 @@ MOUSEKEY_ENABLE = no # Mouse keys TAP_DANCE_ENABLE = no RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no LTO_ENABLE = yes RGB_MATRIX_ENABLE = yes diff --git a/keyboards/marksard/rhymestone/rev1/config.h b/keyboards/marksard/rhymestone/rev1/config.h index 9a1bf0a1d..983392511 100644 --- a/keyboards/marksard/rhymestone/rev1/config.h +++ b/keyboards/marksard/rhymestone/rev1/config.h @@ -93,7 +93,7 @@ along with this program. If not, see . #define RGB_MATRIX_KEYPRESSES // reacts to keypresses // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects - #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended + #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 diff --git a/keyboards/marksard/rhymestone/rules.mk b/keyboards/marksard/rhymestone/rules.mk index adfaca217..8a9ec95ce 100644 --- a/keyboards/marksard/rhymestone/rules.mk +++ b/keyboards/marksard/rhymestone/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/massdrop/alt/alt.c b/keyboards/massdrop/alt/alt.c index 81dd66b3c..c3ed246a4 100644 --- a/keyboards/massdrop/alt/alt.c +++ b/keyboards/massdrop/alt/alt.c @@ -18,4 +18,4 @@ along with this program. If not, see . /* Temporary solution for matrix delay */ void matrix_output_select_delay(void) { matrix_io_delay(); } -void matrix_output_unselect_delay(void) { } +void matrix_output_unselect_delay(uint8_t line, bool key_pressed) {} diff --git a/keyboards/massdrop/alt/config_led.c b/keyboards/massdrop/alt/config_led.c index 136117703..85ae67878 100644 --- a/keyboards/massdrop/alt/config_led.c +++ b/keyboards/massdrop/alt/config_led.c @@ -50,9 +50,8 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_kb(void) -{ - md_rgb_matrix_indicators(); +void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + md_rgb_matrix_indicators_advanced(led_min, led_max); } #endif // USB_LED_INDICATOR_ENABLE diff --git a/keyboards/massdrop/alt/keymaps/pregame/config.h b/keyboards/massdrop/alt/keymaps/pregame/config.h index acd041ce1..32dee56d3 100644 --- a/keyboards/massdrop/alt/keymaps/pregame/config.h +++ b/keyboards/massdrop/alt/keymaps/pregame/config.h @@ -89,7 +89,7 @@ // #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation // #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGBLIGHT_ANIMATIONS // Run RGB animations @@ -103,7 +103,7 @@ // #define RGBLIGHT_EFFECT_RGB_TEST // Enable RGB test animation mode. // #define RGBLIGHT_EFFECT_SNAKE // Enable snake animation mode. // #define RGBLIGHT_EFFECT_STATIC_GRADIENT // Enable static gradient mode. - + // #define RGBLIGHT_EFFECT_BREATHE_CENTER // If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // The maximum brightness for the breathing mode. Valid values are 1 to 255 // #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 // How long to wait between light changes for the "Christmas" animation, in milliseconds diff --git a/keyboards/massdrop/alt/keymaps/pregame/rules.mk b/keyboards/massdrop/alt/keymaps/pregame/rules.mk index c6977c23c..184405662 100644 --- a/keyboards/massdrop/alt/keymaps/pregame/rules.mk +++ b/keyboards/massdrop/alt/keymaps/pregame/rules.mk @@ -1,7 +1,7 @@ # RGBLIGHT_ENABLE = no # Not for MD boards. This is here in case you forget. COMMAND_ENABLE = no # Commands for debug and configuration -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite # AUTO_SHIFT_ENABLE = yes # Auto Shift NKRO_ENABLE = yes # USB Nkey Rollover DYNAMIC_MACRO_ENABLE = no # Dynamic macro recording and play diff --git a/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h b/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h index 0f2740013..f2a7e5038 100644 --- a/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h +++ b/keyboards/massdrop/alt/keymaps/urbanvanilla/config.h @@ -24,4 +24,4 @@ along with this program. If not, see . #define RGB_MATRIX_LED_PROCESS_LIMIT 15 #define RGB_MATRIX_LED_FLUSH_LIMIT 10 -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended diff --git a/keyboards/massdrop/alt/rules.mk b/keyboards/massdrop/alt/rules.mk index 3921d57ab..c722ec7f3 100644 --- a/keyboards/massdrop/alt/rules.mk +++ b/keyboards/massdrop/alt/rules.mk @@ -8,7 +8,7 @@ MCU = cortex-m4 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -19,7 +19,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/massdrop/ctrl/config_led.c b/keyboards/massdrop/ctrl/config_led.c index 27ddb5c38..bd708c2cb 100644 --- a/keyboards/massdrop/ctrl/config_led.c +++ b/keyboards/massdrop/ctrl/config_led.c @@ -73,9 +73,8 @@ led_config_t g_led_config = { { #ifdef USB_LED_INDICATOR_ENABLE -void rgb_matrix_indicators_kb(void) -{ - md_rgb_matrix_indicators(); +void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + md_rgb_matrix_indicators_advanced(led_min, led_max); } #endif // USB_LED_INDICATOR_ENABLE diff --git a/keyboards/massdrop/ctrl/ctrl.c b/keyboards/massdrop/ctrl/ctrl.c index b50f1cb59..c688d330a 100644 --- a/keyboards/massdrop/ctrl/ctrl.c +++ b/keyboards/massdrop/ctrl/ctrl.c @@ -18,4 +18,4 @@ along with this program. If not, see . /* Temporary solution for matrix delay */ void matrix_output_select_delay(void) { matrix_io_delay(); } -void matrix_output_unselect_delay(void) { } +void matrix_output_unselect_delay(uint8_t line, bool key_pressed) {} diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config.h b/keyboards/massdrop/ctrl/keymaps/endgame/config.h index 0ef485591..ad738347a 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/config.h +++ b/keyboards/massdrop/ctrl/keymaps/endgame/config.h @@ -49,7 +49,7 @@ // #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation // #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // #define RGBLIGHT_ANIMATIONS // Run RGB animations diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/rules.mk b/keyboards/massdrop/ctrl/keymaps/endgame/rules.mk index 09bf488da..9502c242d 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/rules.mk +++ b/keyboards/massdrop/ctrl/keymaps/endgame/rules.mk @@ -1,7 +1,5 @@ # RGBLIGHT_ENABLE = no # Not for MD boards. This is here in case you forget. COMMAND_ENABLE = yes # Commands for debug and configuration -# BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration -# BOOTMAGIC_ENABLE = lite # AUTO_SHIFT_ENABLE = yes # Auto Shift NKRO_ENABLE = yes # USB Nkey Rollover DYNAMIC_MACRO_ENABLE = yes # Dynamic macro recording and play diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h index 6e16c3a5f..89c129c58 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -67,7 +67,7 @@ along with this program. If not, see . // #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation // #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // #define RGBLIGHT_ANIMATIONS // Run RGB animations diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk b/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk index 1eb11fded..e834404e2 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/rules.mk @@ -1,7 +1,5 @@ #RGBLIGHT_ENABLE = no #Not for MD boards.This is here in case you forget. COMMAND_ENABLE = no # Commands for debug and configuration -#BOOTMAGIC_ENABLE = full #Virtual DIP switch configuration -#BOOTMAGIC_ENABLE = lite #AUTO_SHIFT_ENABLE = yes #Auto Shift NKRO_ENABLE = yes # USB Nkey Rollover DYNAMIC_MACRO_ENABLE = no # Dynamic macro recording and play diff --git a/keyboards/massdrop/ctrl/rules.mk b/keyboards/massdrop/ctrl/rules.mk index ad79bbf91..6b57e7858 100644 --- a/keyboards/massdrop/ctrl/rules.mk +++ b/keyboards/massdrop/ctrl/rules.mk @@ -8,7 +8,7 @@ MCU = cortex-m4 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -19,7 +19,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/masterworks/classy_tkl/rev_a/rules.mk b/keyboards/masterworks/classy_tkl/rev_a/rules.mk index 68d6bc50c..1fd1fdb74 100644 --- a/keyboards/masterworks/classy_tkl/rev_a/rules.mk +++ b/keyboards/masterworks/classy_tkl/rev_a/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -21,6 +21,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output - -# Supported layouts -LAYOUTS = tkl_ansi_wkl tkl_iso_wkl diff --git a/keyboards/matrix/cain_re/rules.mk b/keyboards/matrix/cain_re/rules.mk index 9bbb324e7..6c4393757 100644 --- a/keyboards/matrix/cain_re/rules.mk +++ b/keyboards/matrix/cain_re/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/matrix/m12og/rev1/rules.mk b/keyboards/matrix/m12og/rev1/rules.mk index b146a35ac..e6c7122ee 100644 --- a/keyboards/matrix/m12og/rev1/rules.mk +++ b/keyboards/matrix/m12og/rev1/rules.mk @@ -8,7 +8,7 @@ BOARD = m12og_v1 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Bootmagic disabled because Matrix bootlaoder uses it's own reset mechanism +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/matrix/m12og/rev2/rules.mk b/keyboards/matrix/m12og/rev2/rules.mk index 58ec898a6..e16b14325 100644 --- a/keyboards/matrix/m12og/rev2/rules.mk +++ b/keyboards/matrix/m12og/rev2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/matrix/m20add/rgb_ring.c b/keyboards/matrix/m20add/rgb_ring.c index fa70dea7e..e759ee4e4 100644 --- a/keyboards/matrix/m20add/rgb_ring.c +++ b/keyboards/matrix/m20add/rgb_ring.c @@ -21,7 +21,7 @@ #include #include "quantum.h" #include "rgblight.h" -#include "issi/is31fl3731.h" +#include "drivers/led/issi/is31fl3731.h" #include "i2c_master.h" @@ -30,7 +30,7 @@ #endif // rgb ring leds setting -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/matrix/m20add/rules.mk b/keyboards/matrix/m20add/rules.mk index d5516964d..2f4e45760 100644 --- a/keyboards/matrix/m20add/rules.mk +++ b/keyboards/matrix/m20add/rules.mk @@ -13,7 +13,7 @@ BOARD = ST_NUCLEO64_F411RE # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,5 +25,5 @@ RGBLIGHT_ENABLE = yes CUSTOM_MATRIX = lite # project specific files -SRC += matrix.c tca6424.c rgb_ring.c issi/is31fl3731.c +SRC += matrix.c tca6424.c rgb_ring.c drivers/led/issi/is31fl3731.c QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/matrix/noah/noah.c b/keyboards/matrix/noah/noah.c index 1e2f4bb7d..6b624b9e0 100644 --- a/keyboards/matrix/noah/noah.c +++ b/keyboards/matrix/noah/noah.c @@ -66,7 +66,7 @@ __attribute__((weak)) void matrix_scan_user(void) { } #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/matrix/noah/rules.mk b/keyboards/matrix/noah/rules.mk index 25106a9b5..33f31b996 100644 --- a/keyboards/matrix/noah/rules.mk +++ b/keyboards/matrix/noah/rules.mk @@ -13,7 +13,7 @@ BOARD = ST_NUCLEO64_F411RE # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/maxipad/rules.mk b/keyboards/maxipad/rules.mk index 99fc1fa85..8c7b12c6d 100644 --- a/keyboards/maxipad/rules.mk +++ b/keyboards/maxipad/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -12,7 +12,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c index 11df63bb1..11ac65775 100644 --- a/keyboards/maxr1998/phoebe/keymaps/default/keymap.c +++ b/keyboards/maxr1998/phoebe/keymaps/default/keymap.c @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘ */ [_QWERTZ] = LAYOUT( - KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_QST, + KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_QUES, KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSPC, @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_ACUT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______, - _______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______, + _______, DE_LABK, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, _______, _______, _______ ), @@ -74,8 +74,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FN] = LAYOUT( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F10, KC_F11, KC_F12, - _______, _______, _______, _______, _______, _______, _______, DE_UE, KC_F9, DE_OE, _______, KC_DEL, - KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_SW,RGB_M_SN,_______, _______, + _______, _______, _______, _______, _______, _______, _______, DE_UDIA, KC_F9, DE_ODIA, _______, KC_DEL, + KC_LOCK, DE_ADIA, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_SW,RGB_M_SN,_______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END ), @@ -106,7 +106,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case DE_QST: + case DE_QUES: if (get_mods() & MODS_ALGR_MASK) { if (record->event.pressed) { register_code(DE_SS); @@ -119,9 +119,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_Z: if (get_mods() & MODS_ALGR_MASK) { if (record->event.pressed) { - register_code(DE_LESS); + register_code(DE_LABK); } else { - unregister_code(DE_LESS); + unregister_code(DE_LABK); } return false; } diff --git a/keyboards/maxr1998/phoebe/rules.mk b/keyboards/maxr1998/phoebe/rules.mk index f60274e51..79bce5624 100644 --- a/keyboards/maxr1998/phoebe/rules.mk +++ b/keyboards/maxr1998/phoebe/rules.mk @@ -15,7 +15,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -23,12 +23,10 @@ COMMAND_ENABLE = no # Commands for debug and configuration COMBO_ENABLE = no # Key combo feature NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. KEY_LOCK_ENABLE = yes LEADER_ENABLE = yes # Enable leader key -API_SYSEX_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/maxr1998/pulse4k/rules.mk b/keyboards/maxr1998/pulse4k/rules.mk index 71d9b5deb..783ce5ddc 100644 --- a/keyboards/maxr1998/pulse4k/rules.mk +++ b/keyboards/maxr1998/pulse4k/rules.mk @@ -15,7 +15,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys ENCODER_ENABLE = yes # Rotary encoders EXTRAKEY_ENABLE = yes # Audio control and System control @@ -24,10 +24,8 @@ COMMAND_ENABLE = no # Commands for debug and configuration COMBO_ENABLE = yes # Key combo feature NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/mb44/rules.mk b/keyboards/mb44/rules.mk index ba7e249c9..b6fcce5a7 100644 --- a/keyboards/mb44/rules.mk +++ b/keyboards/mb44/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mc_76k/rules.mk b/keyboards/mc_76k/rules.mk index b48754e9f..349d6c9a6 100644 --- a/keyboards/mc_76k/rules.mk +++ b/keyboards/mc_76k/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/mechkeys/mk60/config.h b/keyboards/mechkeys/mk60/config.h index f2d604397..9ce808066 100644 --- a/keyboards/mechkeys/mk60/config.h +++ b/keyboards/mechkeys/mk60/config.h @@ -191,26 +191,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/mechkeys/mk60/rules.mk b/keyboards/mechkeys/mk60/rules.mk index d7754ceb5..24143d65b 100644 --- a/keyboards/mechkeys/mk60/rules.mk +++ b/keyboards/mechkeys/mk60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/mechllama/g35/keymaps/default/keymap.c b/keyboards/mechllama/g35/keymaps/default/keymap.c index 4b7bf7651..814f6fdcd 100644 --- a/keyboards/mechllama/g35/keymaps/default/keymap.c +++ b/keyboards/mechllama/g35/keymaps/default/keymap.c @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -#if defined(OLED_DRIVER_ENABLE) +#if defined(OLED_ENABLE) const char* get_layer_name(uint8_t layer) { switch (layer) { case _BASE: diff --git a/keyboards/mechllama/g35/rules.mk b/keyboards/mechllama/g35/rules.mk index 20fbf160a..b844eb90c 100644 --- a/keyboards/mechllama/g35/rules.mk +++ b/keyboards/mechllama/g35/rules.mk @@ -12,7 +12,8 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu NKRO_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 RGBLIGHT_ENABLE = yes DEFAULT_FOLDER = mechllama/g35/v2 diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h index 1ba7d27df..d75cbd3f2 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h @@ -13,7 +13,7 @@ #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 220 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set \ No newline at end of file +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h index 38ffdd40a..c830edce2 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h @@ -1,7 +1,7 @@ #pragma once #define PRODUCT_ID 0xAEC2 -#define PRODUCT Adelais En Ciel Rev2 +#define PRODUCT Adelais En Ciel Rev2 #define MATRIX_ROW_PINS { B1, A0, C13, A1, A2} #define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A7 } @@ -31,7 +31,7 @@ #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set @@ -42,4 +42,4 @@ #define ENCODERS_PAD_B { A3 } #define ENCODER_RESOLUTION 4 -#define TAP_CODE_DELAY 10 \ No newline at end of file +#define TAP_CODE_DELAY 10 diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c index 5087174b9..fe946169a 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c @@ -17,7 +17,7 @@ #include "adelais.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, C2_1, C3_1, C4_1}, //D102-A0-0 {0, C5_1, C6_1, C7_1}, //D108-A1-1 diff --git a/keyboards/mechlovin/adelais/rules.mk b/keyboards/mechlovin/adelais/rules.mk index 73e90befb..93f28c829 100644 --- a/keyboards/mechlovin/adelais/rules.mk +++ b/keyboards/mechlovin/adelais/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -17,7 +17,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/mechlovin/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h index 4d5c853d0..9a653d759 100644 --- a/keyboards/mechlovin/delphine/rgb_led/config.h +++ b/keyboards/mechlovin/delphine/rgb_led/config.h @@ -24,7 +24,7 @@ // #define RGBLIGHT_EFFECT_RGB_TEST // #define RGBLIGHT_EFFECT_ALTERNATING #endif - + //rgb matrix setting// This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) // The address will vary depending on your wiring: @@ -41,7 +41,7 @@ #define RGB_MATRIX_KEYPRESSES // reacts to keypresses #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set diff --git a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c index 6f3e3ec73..29b6d1f78 100644 --- a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c +++ b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { // left CA {0, C5_2, C6_2, C7_2}, //D2-0 {0, C1_1, C3_2, C4_2}, //D20-1 diff --git a/keyboards/mechlovin/delphine/rules.mk b/keyboards/mechlovin/delphine/rules.mk index 217bb758b..544692ae0 100644 --- a/keyboards/mechlovin/delphine/rules.mk +++ b/keyboards/mechlovin/delphine/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/hannah60rgb/rev1/config.h b/keyboards/mechlovin/hannah60rgb/rev1/config.h index 20873e716..fd45ecca6 100644 --- a/keyboards/mechlovin/hannah60rgb/rev1/config.h +++ b/keyboards/mechlovin/hannah60rgb/rev1/config.h @@ -11,8 +11,8 @@ # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set -#endif \ No newline at end of file +#endif diff --git a/keyboards/mechlovin/hannah60rgb/rev1/rev1.c b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c index 5acea8c66..6b1b8604a 100644 --- a/keyboards/mechlovin/hannah60rgb/rev1/rev1.c +++ b/keyboards/mechlovin/hannah60rgb/rev1/rev1.c @@ -16,13 +16,6 @@ #include "hannah60rgb.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(); -}; - #ifdef RGB_MATRIX_ENABLE led_config_t g_led_config = { { //Key Matrix to LED Index diff --git a/keyboards/mechlovin/hannah60rgb/rev2/config.h b/keyboards/mechlovin/hannah60rgb/rev2/config.h index 2bcffbc85..5e57f985d 100644 --- a/keyboards/mechlovin/hannah60rgb/rev2/config.h +++ b/keyboards/mechlovin/hannah60rgb/rev2/config.h @@ -30,11 +30,11 @@ #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set #if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) # define RGB_MATRIX_DISABLE_KEYCODES -#endif \ No newline at end of file +#endif diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c index 05469a1bb..8b30538cc 100644 --- a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c +++ b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c @@ -17,7 +17,7 @@ #include "rev2.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/mechlovin/hannah60rgb/rules.mk b/keyboards/mechlovin/hannah60rgb/rules.mk index 3d11b3c9a..8932715ec 100644 --- a/keyboards/mechlovin/hannah60rgb/rules.mk +++ b/keyboards/mechlovin/hannah60rgb/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mechlovin/hannah65/hannah65.h b/keyboards/mechlovin/hannah65/hannah65.h index 576a78510..99da5a2a1 100644 --- a/keyboards/mechlovin/hannah65/hannah65.h +++ b/keyboards/mechlovin/hannah65/hannah65.h @@ -20,6 +20,4 @@ #if defined(KEYBOARD_mechlovin_hannah65_rev1) # include "rev1.h" -#elif defined(KEYBOARD_mechlovin_hannah65_mechlovin9) -# include "mechlovin9.h" #endif \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/mechlovin9/config.h b/keyboards/mechlovin/hannah65/mechlovin9/config.h deleted file mode 100644 index 68097bd62..000000000 --- a/keyboards/mechlovin/hannah65/mechlovin9/config.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#define PRODUCT_ID 0x6509 -#define DEVICE_VER 0x0001 -#define PRODUCTION Mechlovin9 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h b/keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h deleted file mode 100644 index 4aebaad0f..000000000 --- a/keyboards/mechlovin/hannah65/mechlovin9/mechlovin9.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright 2020 Team Mechlovin - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include "quantum.h" - -#define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K1D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K4B, K4C, K4D, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D, K4E }, \ -} diff --git a/keyboards/mechlovin/hannah65/mechlovin9/readme.md b/keyboards/mechlovin/hannah65/mechlovin9/readme.md deleted file mode 100644 index aa6bdc1ca..000000000 --- a/keyboards/mechlovin/hannah65/mechlovin9/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# mechlovin9 - -![mechlovin9](https://i.imgur.com/T5Lm6OYl.png) - -A 65% PCB, compatible with Kyuu. - -* Keyboard Maintainer: [Team Mechlovin](https://github.com/mechlovin) -* Hardware Supported: Kyuu Keyboard. -* Hardware Availability: [Reddit GB](https://www.reddit.com/r/mechmarket/comments/i61par/gb_mechlovin_9_a_kyuu_65_keyboard_compatible_pcb/) - -Make example for this keyboard (after setting up your build environment): - - make mechlovin/hannah65/mechlovin9:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/hannah65/rev1/config.h b/keyboards/mechlovin/hannah65/rev1/config.h deleted file mode 100644 index 8d90908c2..000000000 --- a/keyboards/mechlovin/hannah65/rev1/config.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -#define PRODUCT_ID 0x6500 -#define DEVICE_VER 0x0001 -#define PRODUCTION Hannah65 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/rev1/haus/config.h b/keyboards/mechlovin/hannah65/rev1/haus/config.h new file mode 100644 index 000000000..4d517ef47 --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/haus/config.h @@ -0,0 +1,22 @@ +/* +Copyright 2021 Mechlovin' Studio + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 PRODUCT_ID 0x6500 +#define DEVICE_VER 0x0001 +#define PRODUCTION Haus Rev. 1 \ No newline at end of file diff --git a/keyboards/mechlovin/hannah65/rev1/haus/readme.md b/keyboards/mechlovin/hannah65/rev1/haus/readme.md new file mode 100644 index 000000000..5f937bf20 --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/haus/readme.md @@ -0,0 +1,23 @@ +# Haus + +![Haus](https://i.imgur.com/sQ2QWAZh.jpg) + +A Haus PCB, Rev.1 + +* Keyboard Maintainer: [Hand Engineering](https://www.reddit.com/r/MechanicalKeyboards/comments/hzcavx/haus_by_hand_engineering/) +* Hardware Supported: Haus PCB rev.1, STM32F303. +* Hardware Availability: Haus Keyboard. + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/hannah65/rev1/haus:default + +Flashing example for this keyboard: + + make mechlovin/hannah65/rev1/haus:flash + + + +**Reset Key:** To put the Haus PCB into bootloader, push reset swith on the bottom of the PCB. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xd60/rev2/.noci b/keyboards/mechlovin/hannah65/rev1/haus/rules.mk similarity index 100% rename from keyboards/xd60/rev2/.noci rename to keyboards/mechlovin/hannah65/rev1/haus/rules.mk diff --git a/keyboards/mechlovin/hannah65/rev1/readme.md b/keyboards/mechlovin/hannah65/rev1/readme.md new file mode 100644 index 000000000..d8179f56f --- /dev/null +++ b/keyboards/mechlovin/hannah65/rev1/readme.md @@ -0,0 +1,19 @@ +# hannah65 rev1 + +![hannah65](https://i.imgur.com/qf0BYI2l.png) + +A 65% PCB, compatible with E6.5, Kyuu,... + +* Keyboard Maintainer: [Team Mechlovin](https://github.com/mechlovin) +* Hardware Supported: Hannah65, STM32F303 +* Hardware Availability: [Mechlovin Store](https://mechlovin.studio) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/hannah65/rev1:default + +Flashing example for this keyboard: + + make mechlovin/hannah65/rev1:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/hannah65/rev1/rules.mk b/keyboards/mechlovin/hannah65/rev1/rules.mk index e69de29bb..ae9bc176a 100644 --- a/keyboards/mechlovin/hannah65/rev1/rules.mk +++ b/keyboards/mechlovin/hannah65/rev1/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = mechlovin/hannah65/rev1/haus diff --git a/keyboards/mechlovin/hannah65/rules.mk b/keyboards/mechlovin/hannah65/rules.mk index 656722353..fabf13249 100644 --- a/keyboards/mechlovin/hannah65/rules.mk +++ b/keyboards/mechlovin/hannah65/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,4 +22,4 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -DEFAULT_FOLDER = mechlovin/hannah65/rev1 +DEFAULT_FOLDER = mechlovin/hannah65/rev1/haus diff --git a/keyboards/mechlovin/hannah910/config.h b/keyboards/mechlovin/hannah910/config.h index 56f3c97ae..b4edaae48 100644 --- a/keyboards/mechlovin/hannah910/config.h +++ b/keyboards/mechlovin/hannah910/config.h @@ -162,26 +162,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/mechlovin/hannah910/hannah910.c b/keyboards/mechlovin/hannah910/hannah910.c index 2c696ab56..3237636be 100644 --- a/keyboards/mechlovin/hannah910/hannah910.c +++ b/keyboards/mechlovin/hannah910/hannah910.c @@ -15,10 +15,6 @@ */ #include "hannah910.h" -void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; void led_init_ports(void) { setPinOutput(B2); setPinOutput(D0); @@ -35,7 +31,7 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } -uint32_t layer_state_set_user(uint32_t state) +layer_state_t layer_state_set_user(layer_state_t state) { // if on layer 1, turn on D2 LED, otherwise off. if (biton32(state) == 1) { diff --git a/keyboards/mechlovin/hannah910/rev1/rules.mk b/keyboards/mechlovin/hannah910/rev1/rules.mk index d000eafc6..90bd2b3a6 100644 --- a/keyboards/mechlovin/hannah910/rev1/rules.mk +++ b/keyboards/mechlovin/hannah910/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/mechlovin/hannah910/rev2/rules.mk b/keyboards/mechlovin/hannah910/rev2/rules.mk index f66b6105d..2e07f6af3 100644 --- a/keyboards/mechlovin/hannah910/rev2/rules.mk +++ b/keyboards/mechlovin/hannah910/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/hannah910/rev3/rules.mk b/keyboards/mechlovin/hannah910/rev3/rules.mk index a8100762d..d37beeba3 100644 --- a/keyboards/mechlovin/hannah910/rev3/rules.mk +++ b/keyboards/mechlovin/hannah910/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/hex6c/rules.mk b/keyboards/mechlovin/hex6c/rules.mk index 0af4a07f7..f132e401e 100644 --- a/keyboards/mechlovin/hex6c/rules.mk +++ b/keyboards/mechlovin/hex6c/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mechlovin/infinity87/rev2/rev2.c b/keyboards/mechlovin/infinity87/rev2/rev2.c index 5a92f8bec..dfaa27d03 100644 --- a/keyboards/mechlovin/infinity87/rev2/rev2.c +++ b/keyboards/mechlovin/infinity87/rev2/rev2.c @@ -16,10 +16,6 @@ #include "rev2.h" -void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; void led_init_ports(void) { setPinOutput(A5); setPinOutput(A6); diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/config.h b/keyboards/mechlovin/infinity87/rgb_rev1/config.h index 0c16c684c..76c6e0db7 100644 --- a/keyboards/mechlovin/infinity87/rgb_rev1/config.h +++ b/keyboards/mechlovin/infinity87/rgb_rev1/config.h @@ -35,7 +35,7 @@ // 0b0110001 AD <-> SCL // 0b0110010 AD <-> SDA #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_MULTISPLASH diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c b/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c index f13fee8ad..bd1fd8abf 100644 --- a/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c +++ b/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c @@ -17,7 +17,7 @@ #include "rgb_rev1.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS34_SW1, CS35_SW1, CS36_SW1}, //D92-K00-0 {0, CS37_SW1, CS38_SW1, CS39_SW1}, //D94-K01-1 {0, CS31_SW1, CS32_SW1, CS33_SW1}, //D96-K02-2 diff --git a/keyboards/mechlovin/infinity87/rules.mk b/keyboards/mechlovin/infinity87/rules.mk index e0858aff0..b33faea42 100644 --- a/keyboards/mechlovin/infinity87/rules.mk +++ b/keyboards/mechlovin/infinity87/rules.mk @@ -2,7 +2,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mechlovin/infinity88/rules.mk b/keyboards/mechlovin/infinity88/rules.mk index 85c01d52b..7cc6adb50 100644 --- a/keyboards/mechlovin/infinity88/rules.mk +++ b/keyboards/mechlovin/infinity88/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mechlovin/infinityce/infinityce.c b/keyboards/mechlovin/infinityce/infinityce.c index 5d75b480b..84eaf0b7e 100644 --- a/keyboards/mechlovin/infinityce/infinityce.c +++ b/keyboards/mechlovin/infinityce/infinityce.c @@ -16,13 +16,6 @@ #include "infinityce.h" -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); -}; - void led_init_ports(void) { // * Set our LED pins as output setPinOutput(B3); diff --git a/keyboards/mechlovin/infinityce/rules.mk b/keyboards/mechlovin/infinityce/rules.mk index 8a5bd6b42..41d22b66a 100644 --- a/keyboards/mechlovin/infinityce/rules.mk +++ b/keyboards/mechlovin/infinityce/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/mechlovin/kanu/kanu.c b/keyboards/mechlovin/kanu/kanu.c index d19b7f103..ceb874e12 100644 --- a/keyboards/mechlovin/kanu/kanu.c +++ b/keyboards/mechlovin/kanu/kanu.c @@ -16,10 +16,6 @@ #include "kanu.h" -void matrix_init_kb(void) { - matrix_init_user(); - led_init_ports(); -}; void led_init_ports(void) { setPinOutput(B2); setPinOutput(D0); diff --git a/keyboards/mechlovin/kanu/rules.mk b/keyboards/mechlovin/kanu/rules.mk index 2c7cbc4ae..3ef22068a 100644 --- a/keyboards/mechlovin/kanu/rules.mk +++ b/keyboards/mechlovin/kanu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/mechlovin9/config.h b/keyboards/mechlovin/mechlovin9/config.h new file mode 100644 index 000000000..669d79ac9 --- /dev/null +++ b/keyboards/mechlovin/mechlovin9/config.h @@ -0,0 +1,30 @@ + +/* +Copyright 2021 Mechlovin' Studio + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 0x4D4C +#define MANUFACTURER Mechlovin Studio + +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#define DIODE_DIRECTION COL2ROW +#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/mechlovin/hannah65/mechlovin9/info.json b/keyboards/mechlovin/mechlovin9/info.json similarity index 100% rename from keyboards/mechlovin/hannah65/mechlovin9/info.json rename to keyboards/mechlovin/mechlovin9/info.json diff --git a/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/keymap.c b/keyboards/mechlovin/mechlovin9/keymaps/default/keymap.c similarity index 100% rename from keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/keymap.c rename to keyboards/mechlovin/mechlovin9/keymaps/default/keymap.c diff --git a/keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/readme.md b/keyboards/mechlovin/mechlovin9/keymaps/default/readme.md similarity index 100% rename from keyboards/mechlovin/hannah65/mechlovin9/keymaps/default/readme.md rename to keyboards/mechlovin/mechlovin9/keymaps/default/readme.md diff --git a/keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/keymap.c b/keyboards/mechlovin/mechlovin9/keymaps/via/keymap.c similarity index 100% rename from keyboards/mechlovin/hannah65/mechlovin9/keymaps/via/keymap.c rename to keyboards/mechlovin/mechlovin9/keymaps/via/keymap.c diff --git a/keyboards/mechlovin/mechlovin9/keymaps/via/rules.mk b/keyboards/mechlovin/mechlovin9/keymaps/via/rules.mk new file mode 100644 index 000000000..036bd6d1c --- /dev/null +++ b/keyboards/mechlovin/mechlovin9/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mechlovin/mechlovin9/mechlovin9.c b/keyboards/mechlovin/mechlovin9/mechlovin9.c new file mode 100644 index 000000000..a5a8b6c0f --- /dev/null +++ b/keyboards/mechlovin/mechlovin9/mechlovin9.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Mechlovin' Studio + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "mechlovin9.h" diff --git a/keyboards/mechlovin/mechlovin9/mechlovin9.h b/keyboards/mechlovin/mechlovin9/mechlovin9.h new file mode 100644 index 000000000..c7d65e05f --- /dev/null +++ b/keyboards/mechlovin/mechlovin9/mechlovin9.h @@ -0,0 +1,33 @@ +/* Copyright 2021 Mechlovin' Studio + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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, K1D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/mechlovin/mechlovin9/readme.md b/keyboards/mechlovin/mechlovin9/readme.md new file mode 100644 index 000000000..55dead19c --- /dev/null +++ b/keyboards/mechlovin/mechlovin9/readme.md @@ -0,0 +1,17 @@ +# mechlovin9 + +![mechlovin9](https://i.imgur.com/T5Lm6OYl.png) + +A 65% PCB, compatible with Kyuu. + +* Keyboard Maintainer: [Team Mechlovin](https://github.com/mechlovin) +* Hardware Supported: Kyuu Keyboard. +* Hardware Availability: [Reddit GB](https://www.reddit.com/r/mechmarket/comments/i61par/gb_mechlovin_9_a_kyuu_65_keyboard_compatible_pcb/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/mechlovin9/rev1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +**Reset Key:** To put the mechlovin9 PCB into bootloader, hold ESC and plug cable. \ No newline at end of file diff --git a/keyboards/mechlovin/mechlovin9/rev1/config.h b/keyboards/mechlovin/mechlovin9/rev1/config.h new file mode 100644 index 000000000..2a9c335d7 --- /dev/null +++ b/keyboards/mechlovin/mechlovin9/rev1/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2021 Mechlovin' Studio + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License 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 PRODUCT_ID 0x6509 +#define DEVICE_VER 0x0001 +#define PRODUCT Mechlovin9 + +/* + * 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 { A4, A5, A3, A2, A1 } +#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A0, C15, B4, B5, B3, C13, C14, A13 } + +#define LED_CAPS_LOCK_PIN B9 + +#define BACKLIGHT_PIN B8 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 3 \ No newline at end of file diff --git a/keyboards/mechlovin/mechlovin9/rev1/readme.md b/keyboards/mechlovin/mechlovin9/rev1/readme.md new file mode 100644 index 000000000..55dead19c --- /dev/null +++ b/keyboards/mechlovin/mechlovin9/rev1/readme.md @@ -0,0 +1,17 @@ +# mechlovin9 + +![mechlovin9](https://i.imgur.com/T5Lm6OYl.png) + +A 65% PCB, compatible with Kyuu. + +* Keyboard Maintainer: [Team Mechlovin](https://github.com/mechlovin) +* Hardware Supported: Kyuu Keyboard. +* Hardware Availability: [Reddit GB](https://www.reddit.com/r/mechmarket/comments/i61par/gb_mechlovin_9_a_kyuu_65_keyboard_compatible_pcb/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/mechlovin9/rev1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +**Reset Key:** To put the mechlovin9 PCB into bootloader, hold ESC and plug cable. \ No newline at end of file diff --git a/keyboards/mechlovin/mechlovin9/rev1/rules.mk b/keyboards/mechlovin/mechlovin9/rev1/rules.mk new file mode 100644 index 000000000..38261a4f0 --- /dev/null +++ b/keyboards/mechlovin/mechlovin9/rev1/rules.mk @@ -0,0 +1,10 @@ +# MCU name +MCU = STM32F303 +BOARD = QMK_PROTON_C + +# Build Options +# change yes to no to disable +# +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover diff --git a/keyboards/mechlovin/mechlovin9/rev2/config.h b/keyboards/mechlovin/mechlovin9/rev2/config.h new file mode 100644 index 000000000..ed11fafa8 --- /dev/null +++ b/keyboards/mechlovin/mechlovin9/rev2/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2020 Team Mechlovin' + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#define PRODUCT_ID 0x6509 +#define DEVICE_VER 0x0002 +#define PRODUCT Mechlovin9 Rev2 + +/* + * 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 { A0, A1, A2, A3, A4 } +#define MATRIX_COL_PINS { B2, B1, B0, B3, B4, B5, D0, D1, D5, D6, D7, C0, C3, C2, C1 } + +#define LED_CAPS_LOCK_PIN A7 + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_BREATHING + +/* Bootmagic Lite key configuration */ + #define BOOTMAGIC_LITE_ROW 0 + #define BOOTMAGIC_LITE_COLUMN 13 diff --git a/keyboards/mechlovin/mechlovin9/rev2/readme.md b/keyboards/mechlovin/mechlovin9/rev2/readme.md new file mode 100644 index 000000000..55dead19c --- /dev/null +++ b/keyboards/mechlovin/mechlovin9/rev2/readme.md @@ -0,0 +1,17 @@ +# mechlovin9 + +![mechlovin9](https://i.imgur.com/T5Lm6OYl.png) + +A 65% PCB, compatible with Kyuu. + +* Keyboard Maintainer: [Team Mechlovin](https://github.com/mechlovin) +* Hardware Supported: Kyuu Keyboard. +* Hardware Availability: [Reddit GB](https://www.reddit.com/r/mechmarket/comments/i61par/gb_mechlovin_9_a_kyuu_65_keyboard_compatible_pcb/) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/mechlovin9/rev1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +**Reset Key:** To put the mechlovin9 PCB into bootloader, hold ESC and plug cable. \ No newline at end of file diff --git a/keyboards/mechlovin/mechlovin9/rev2/rules.mk b/keyboards/mechlovin/mechlovin9/rev2/rules.mk new file mode 100644 index 000000000..77a26616f --- /dev/null +++ b/keyboards/mechlovin/mechlovin9/rev2/rules.mk @@ -0,0 +1,9 @@ +# MCU name +MCU = atmega32a + +# Processor frequency +F_CPU = 16000000 + +# Bootloader selection +BOOTLOADER = bootloadHID + diff --git a/keyboards/mechlovin/mechlovin9/rules.mk b/keyboards/mechlovin/mechlovin9/rules.mk new file mode 100644 index 000000000..8b16113e8 --- /dev/null +++ b/keyboards/mechlovin/mechlovin9/rules.mk @@ -0,0 +1,18 @@ +# 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 = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +DEFAULT_FOLDER = mechlovin/mechlovin9/rev1 \ No newline at end of file diff --git a/keyboards/mechlovin/pisces/rules.mk b/keyboards/mechlovin/pisces/rules.mk index 25f6c2b8b..acbf5c7b1 100644 --- a/keyboards/mechlovin/pisces/rules.mk +++ b/keyboards/mechlovin/pisces/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/mechlovin/serratus/rules.mk b/keyboards/mechlovin/serratus/rules.mk index fed40192e..4d4f1fdae 100644 --- a/keyboards/mechlovin/serratus/rules.mk +++ b/keyboards/mechlovin/serratus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/th1800/rules.mk b/keyboards/mechlovin/th1800/rules.mk index 307616647..bbf233bd4 100644 --- a/keyboards/mechlovin/th1800/rules.mk +++ b/keyboards/mechlovin/th1800/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/tmkl/config.h b/keyboards/mechlovin/tmkl/config.h index e36470a9b..9a1d865e2 100644 --- a/keyboards/mechlovin/tmkl/config.h +++ b/keyboards/mechlovin/tmkl/config.h @@ -40,7 +40,7 @@ along with this program. If not, see . * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define MATRIX_ROW_PINS { A8, A4, A5, A3, A2, A1, } +#define MATRIX_ROW_PINS { A8, A4, A5, A3, A2, A1 } #define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, A6, A0, C15, B4, B5, B3, C13, C14 } #define DIODE_DIRECTION COL2ROW @@ -58,4 +58,4 @@ along with this program. If not, see . #define LED_CAPS_LOCK_PIN B9 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE \ No newline at end of file +#define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/mechlovin/tmkl/rules.mk b/keyboards/mechlovin/tmkl/rules.mk index 54a646d27..65048eb7e 100644 --- a/keyboards/mechlovin/tmkl/rules.mk +++ b/keyboards/mechlovin/tmkl/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mechmini/v1/rules.mk b/keyboards/mechmini/v1/rules.mk index c1582d9c6..553fe954c 100644 --- a/keyboards/mechmini/v1/rules.mk +++ b/keyboards/mechmini/v1/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = atmel-dfu # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c b/keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c index 1b2175003..90bb2ddd6 100644 --- a/keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c +++ b/keyboards/mechmini/v2/keymaps/2u_space_ortho/keymap.c @@ -4,11 +4,10 @@ #define _FN1 1 #define _FN2 2 -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_2u_space_ortho( - F(0), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), @@ -44,81 +43,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { } return MACRO_NONE; } - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } - -} - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/mechmini/v2/keymaps/625_space/keymap.c b/keyboards/mechmini/v2/keymaps/625_space/keymap.c index 0746b8aec..4344d6d2b 100755 --- a/keyboards/mechmini/v2/keymaps/625_space/keymap.c +++ b/keyboards/mechmini/v2/keymaps/625_space/keymap.c @@ -4,11 +4,10 @@ #define _FN1 1 #define _FN2 2 -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_625_space( - F(0), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_LSFT, KC_DOT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO(1), MO(2)), @@ -27,37 +26,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/mechmini/v2/keymaps/arkag/rules.mk b/keyboards/mechmini/v2/keymaps/arkag/rules.mk index c4ee1a7d7..cbc8b06e8 100644 --- a/keyboards/mechmini/v2/keymaps/arkag/rules.mk +++ b/keyboards/mechmini/v2/keymaps/arkag/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no STENO_ENABLE = no EXTRAKEY_ENABLE = yes diff --git a/keyboards/mechmini/v2/keymaps/lbibass_625_space/rules.mk b/keyboards/mechmini/v2/keymaps/lbibass_625_space/rules.mk index 49a55db51..9f13f14c2 100755 --- a/keyboards/mechmini/v2/keymaps/lbibass_625_space/rules.mk +++ b/keyboards/mechmini/v2/keymaps/lbibass_625_space/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/mechmini/v2/keymaps/lbibass_split_space/rules.mk b/keyboards/mechmini/v2/keymaps/lbibass_split_space/rules.mk index 9ea2eeee8..b07c796ff 100755 --- a/keyboards/mechmini/v2/keymaps/lbibass_split_space/rules.mk +++ b/keyboards/mechmini/v2/keymaps/lbibass_split_space/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/mechmini/v2/keymaps/ortho/keymap.c b/keyboards/mechmini/v2/keymaps/ortho/keymap.c index 3b8fbb168..31ccfa82a 100755 --- a/keyboards/mechmini/v2/keymaps/ortho/keymap.c +++ b/keyboards/mechmini/v2/keymaps/ortho/keymap.c @@ -4,11 +4,10 @@ #define _FN1 1 #define _FN2 2 -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_ortho( - F(0), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_CAPS, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), @@ -44,81 +43,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { } return MACRO_NONE; } - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } - -} - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c b/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c index a7e06c604..c0fb3695f 100644 --- a/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c +++ b/keyboards/mechmini/v2/keymaps/spacebarracecar/keymap.c @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { `-----------------------------------------------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_ortho( - DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______, + DE_TILD, DE_EXLM, DE_DQUO, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______, _______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE, _______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/mechmini/v2/keymaps/spacebarracecar/rules.mk b/keyboards/mechmini/v2/keymaps/spacebarracecar/rules.mk index cade68ac9..82f1f96f6 100644 --- a/keyboards/mechmini/v2/keymaps/spacebarracecar/rules.mk +++ b/keyboards/mechmini/v2/keymaps/spacebarracecar/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/mechmini/v2/keymaps/split_space/keymap.c b/keyboards/mechmini/v2/keymaps/split_space/keymap.c index e332c641a..635b4eacb 100755 --- a/keyboards/mechmini/v2/keymaps/split_space/keymap.c +++ b/keyboards/mechmini/v2/keymaps/split_space/keymap.c @@ -4,11 +4,10 @@ #define _FN1 1 #define _FN2 2 -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_split_space( - F(0), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, KC_DOT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RCTL, MO(1), MO(2)), @@ -26,37 +25,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; - -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/mechmini/v2/keymaps/wsturgiss/keymap.c b/keyboards/mechmini/v2/keymaps/wsturgiss/keymap.c index e90a8c6e6..218936a19 100644 --- a/keyboards/mechmini/v2/keymaps/wsturgiss/keymap.c +++ b/keyboards/mechmini/v2/keymaps/wsturgiss/keymap.c @@ -1,7 +1,7 @@ #include QMK_KEYBOARD_H #define base 0 -#define raise 1 +#define raise 1 #define lower 2 //Tap Dance Declarations @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [raise] = LAYOUT_2u_space_ortho( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_QUOT, _______, - _______, KC_HOME, KC_END, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, + _______, KC_HOME, KC_END, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, _______, KC_MNXT, EEP_RST), [lower] = LAYOUT_2u_space_ortho( @@ -86,7 +86,7 @@ void matrix_scan_user(void) { } //change colors and rgb modes on layer change -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case raise: rgblight_mode_noeeprom(1); diff --git a/keyboards/mechmini/v2/keymaps/wsturgiss/rules.mk b/keyboards/mechmini/v2/keymaps/wsturgiss/rules.mk index 1484e2dd0..49b4a2ab5 100755 --- a/keyboards/mechmini/v2/keymaps/wsturgiss/rules.mk +++ b/keyboards/mechmini/v2/keymaps/wsturgiss/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend diff --git a/keyboards/mechmini/v2/rules.mk b/keyboards/mechmini/v2/rules.mk index d585958de..ff282b33a 100755 --- a/keyboards/mechmini/v2/rules.mk +++ b/keyboards/mechmini/v2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechstudio/dawn/rules.mk b/keyboards/mechstudio/dawn/rules.mk index d9cc76829..e8783ce5e 100644 --- a/keyboards/mechstudio/dawn/rules.mk +++ b/keyboards/mechstudio/dawn/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechstudio/ud_40_ortho/rules.mk b/keyboards/mechstudio/ud_40_ortho/rules.mk index 4593fbf96..b5a6f1463 100644 --- a/keyboards/mechstudio/ud_40_ortho/rules.mk +++ b/keyboards/mechstudio/ud_40_ortho/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechwild/bde/lefty/rules.mk b/keyboards/mechwild/bde/lefty/rules.mk index f4aec9cf5..590058a1e 100644 --- a/keyboards/mechwild/bde/lefty/rules.mk +++ b/keyboards/mechwild/bde/lefty/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechwild/bde/righty/rules.mk b/keyboards/mechwild/bde/righty/rules.mk index f4aec9cf5..590058a1e 100644 --- a/keyboards/mechwild/bde/righty/rules.mk +++ b/keyboards/mechwild/bde/righty/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c b/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c index 51034d394..b09489876 100644 --- a/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c @@ -80,7 +80,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees } diff --git a/keyboards/mechwild/mercutio/keymaps/default/keymap.c b/keyboards/mechwild/mercutio/keymaps/default/keymap.c index 519e18251..a08150505 100644 --- a/keyboards/mechwild/mercutio/keymaps/default/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/default/keymap.c @@ -61,7 +61,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c b/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c index ea1cd1525..cb0a6173f 100755 --- a/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef ENCODER_ENABLE // Encoder Functionality uint8_t selected_layer = 0; bool encoder_update_user(uint8_t index, bool clockwise) { - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE oled_clear(); oled_render(); #endif @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } #endif -#ifdef OLED_DRIVER_ENABLE // OLED Functionality +#ifdef OLED_ENABLE // OLED Functionality oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c index ddde6d652..74811cbc3 100755 --- a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c @@ -109,7 +109,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { uint8_t selected_layer = 0; bool encoder_update_user(uint8_t index, bool clockwise) { - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE oled_clear(); oled_render(); #endif @@ -172,7 +172,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } #endif -#ifdef OLED_DRIVER_ENABLE // OLED Functionality +#ifdef OLED_ENABLE // OLED Functionality oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/mechwild/mercutio/keymaps/via/keymap.c b/keyboards/mechwild/mercutio/keymaps/via/keymap.c index 519e18251..a08150505 100755 --- a/keyboards/mechwild/mercutio/keymaps/via/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/via/keymap.c @@ -61,7 +61,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } diff --git a/keyboards/mechwild/mercutio/rules.mk b/keyboards/mechwild/mercutio/rules.mk index 7d02480ec..672d13c85 100644 --- a/keyboards/mechwild/mercutio/rules.mk +++ b/keyboards/mechwild/mercutio/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,4 +21,5 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes \ No newline at end of file +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/mechwild/murphpad/keymaps/default/keymap.c b/keyboards/mechwild/murphpad/keymaps/default/keymap.c index eace87cd6..a30bf6bfa 100644 --- a/keyboards/mechwild/murphpad/keymaps/default/keymap.c +++ b/keyboards/mechwild/murphpad/keymaps/default/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - + _______, _______, _______ ), @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - + _______, _______, _______ ) @@ -95,7 +95,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 270 degrees } diff --git a/keyboards/mechwild/murphpad/keymaps/via/keymap.c b/keyboards/mechwild/murphpad/keymaps/via/keymap.c index f7d381940..17e4699a9 100644 --- a/keyboards/mechwild/murphpad/keymaps/via/keymap.c +++ b/keyboards/mechwild/murphpad/keymaps/via/keymap.c @@ -32,18 +32,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MUTE, KC_P4, KC_P5, KC_P6, _______, MO(_FN1), KC_P1, KC_P2, KC_P3, KC_PENT, KC_BSPC, KC_P0, _______, KC_PDOT, _______, - + KC_F5, KC_F6, KC_F7 ), [_FN1] = LAYOUT( - _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SPI, RGB_HUI, _______, _______, RGB_RMOD, RGB_TOG, RGB_MOD, _______, _______, RGB_VAD, RGB_SPD, RGB_VAI, _______, _______, RGB_SAD, _______, RGB_SAI, _______, - + _______, _______, _______ ), @@ -54,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - + _______, _______, _______ ), @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - + _______, _______, _______ ) @@ -93,7 +93,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 270 degrees } diff --git a/keyboards/mechwild/murphpad/rules.mk b/keyboards/mechwild/murphpad/rules.mk index 93ee10d16..e8d3ea7aa 100644 --- a/keyboards/mechwild/murphpad/rules.mk +++ b/keyboards/mechwild/murphpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,4 +21,5 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes # Enable encoder -OLED_DRIVER_ENABLE = yes # Enable OLED Screen +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable OLED Screen diff --git a/keyboards/mechwild/obe/rules.mk b/keyboards/mechwild/obe/rules.mk index f26a5c67a..ed7e9e7c1 100644 --- a/keyboards/mechwild/obe/rules.mk +++ b/keyboards/mechwild/obe/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mehkee96/rules.mk b/keyboards/mehkee96/rules.mk index 91c9dc0df..e7e038a70 100644 --- a/keyboards/mehkee96/rules.mk +++ b/keyboards/mehkee96/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = bootloadHID # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/meira/featherble/config.h b/keyboards/meira/featherble/config.h index e8db87acb..b3ee95474 100644 --- a/keyboards/meira/featherble/config.h +++ b/keyboards/meira/featherble/config.h @@ -32,7 +32,8 @@ along with this program. If not, see . */ #define MATRIX_ROW_PINS { F7, F6, F5, F4 } // Column pins to demux in LSB order -#define MATRIX_COL_PINS { C7, B7, B6, C6 } +#define MATRIX_COL_PINS { C7, B7, B6, C6, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } +#define MATRIX_COL_PINS_SCANNED { C7, B7, B6, C6 } #define LED_EN_PIN D2 #define UNUSED_PINS @@ -144,24 +145,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/meira/matrix.c b/keyboards/meira/matrix.c index c1bfb5868..ae1ae5ce9 100644 --- a/keyboards/meira/matrix.c +++ b/keyboards/meira/matrix.c @@ -62,7 +62,7 @@ along with this program. If not, see . static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[4] = MATRIX_COL_PINS; +static const uint8_t col_pins[4] = MATRIX_COL_PINS_SCANNED; //static const uint8_t lrow_pins[MATRIX_ROWS] = LED_ROW_PINS; //static const uint8_t lcol_pins[4] = LED_COL_PINS; diff --git a/keyboards/meira/meira.h b/keyboards/meira/meira.h index cad590477..d96839440 100644 --- a/keyboards/meira/meira.h +++ b/keyboards/meira/meira.h @@ -25,7 +25,7 @@ void reset_keyboard_kb(void); // The following is an example using the Planck MIT layout // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define LAYOUT( \ +#define LAYOUT_ortho_4x12( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ @@ -38,7 +38,7 @@ void reset_keyboard_kb(void); { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ } -#define LAYOUT_ortho_4x12 LAYOUT +#define LAYOUT LAYOUT_ortho_4x12 #endif diff --git a/keyboards/meira/promicro/config.h b/keyboards/meira/promicro/config.h index bb88f9e08..53844745b 100644 --- a/keyboards/meira/promicro/config.h +++ b/keyboards/meira/promicro/config.h @@ -32,7 +32,9 @@ along with this program. If not, see . */ #define MATRIX_ROW_PINS { F7, F6, F5, F4 } // Column pins to demux in LSB order -#define MATRIX_COL_PINS { B1, B3, B2, B6 } +#define MATRIX_COL_PINS { B1, B3, B2, B6, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN, NO_PIN } +#define MATRIX_COL_PINS_SCANNED { B1, B3, B2, B6 } + #define LED_EN_PIN D2 #define UNUSED_PINS @@ -134,24 +136,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/meira/rules.mk b/keyboards/meira/rules.mk index a932b5b2a..0c7c33c0f 100644 --- a/keyboards/meira/rules.mk +++ b/keyboards/meira/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -23,12 +23,11 @@ COMMAND_ENABLE = no # Commands for debug and configuration 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -BACKLIGHT_CUSTOM_DRIVER = yes +BACKLIGHT_DRIVER = custom BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled diff --git a/keyboards/meishi/config.h b/keyboards/meishi/config.h index 6f04269c9..a32dd11ef 100644 --- a/keyboards/meishi/config.h +++ b/keyboards/meishi/config.h @@ -156,23 +156,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/meishi/rules.mk b/keyboards/meishi/rules.mk index f00690733..8dee3ba8b 100644 --- a/keyboards/meishi/rules.mk +++ b/keyboards/meishi/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/meishi2/config.h b/keyboards/meishi2/config.h index 872169cb7..3a31952aa 100644 --- a/keyboards/meishi2/config.h +++ b/keyboards/meishi2/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/meishi2/rules.mk b/keyboards/meishi2/rules.mk index b828d7c36..a684ff876 100644 --- a/keyboards/meishi2/rules.mk +++ b/keyboards/meishi2/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/melgeek/mj61/config.h b/keyboards/melgeek/mj61/config.h index 164c04fb5..6ba19dd75 100644 --- a/keyboards/melgeek/mj61/config.h +++ b/keyboards/melgeek/mj61/config.h @@ -37,7 +37,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/melgeek/mj61/rev1/rev1.c b/keyboards/melgeek/mj61/rev1/rev1.c index be58f57a9..e51c57548 100644 --- a/keyboards/melgeek/mj61/rev1/rev1.c +++ b/keyboards/melgeek/mj61/rev1/rev1.c @@ -17,7 +17,7 @@ #include "mj61.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB1 */ {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB2 */ {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mj61/rev1/rules.mk b/keyboards/melgeek/mj61/rev1/rules.mk index e7b3e77e4..f21cf4a4a 100644 --- a/keyboards/melgeek/mj61/rev1/rules.mk +++ b/keyboards/melgeek/mj61/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj61/rev2/rev2.c b/keyboards/melgeek/mj61/rev2/rev2.c index 236b00397..3f6b1bff7 100644 --- a/keyboards/melgeek/mj61/rev2/rev2.c +++ b/keyboards/melgeek/mj61/rev2/rev2.c @@ -19,7 +19,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB3 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB4 */ diff --git a/keyboards/melgeek/mj61/rev2/rules.mk b/keyboards/melgeek/mj61/rev2/rules.mk index e7b3e77e4..f21cf4a4a 100644 --- a/keyboards/melgeek/mj61/rev2/rules.mk +++ b/keyboards/melgeek/mj61/rev2/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj63/config.h b/keyboards/melgeek/mj63/config.h index 47ad2f96c..46d3b0fb7 100644 --- a/keyboards/melgeek/mj63/config.h +++ b/keyboards/melgeek/mj63/config.h @@ -37,7 +37,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/melgeek/mj63/rev1/rev1.c b/keyboards/melgeek/mj63/rev1/rev1.c index 34ff28d25..a6ee8859b 100644 --- a/keyboards/melgeek/mj63/rev1/rev1.c +++ b/keyboards/melgeek/mj63/rev1/rev1.c @@ -19,7 +19,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mj63/rev1/rules.mk b/keyboards/melgeek/mj63/rev1/rules.mk index e77935576..8ad931b0e 100644 --- a/keyboards/melgeek/mj63/rev1/rules.mk +++ b/keyboards/melgeek/mj63/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj63/rev2/rev2.c b/keyboards/melgeek/mj63/rev2/rev2.c index c2379dabe..8cacc689a 100644 --- a/keyboards/melgeek/mj63/rev2/rev2.c +++ b/keyboards/melgeek/mj63/rev2/rev2.c @@ -19,7 +19,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB3 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB4 */ diff --git a/keyboards/melgeek/mj63/rev2/rules.mk b/keyboards/melgeek/mj63/rev2/rules.mk index e77935576..8ad931b0e 100644 --- a/keyboards/melgeek/mj63/rev2/rules.mk +++ b/keyboards/melgeek/mj63/rev2/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj64/config.h b/keyboards/melgeek/mj64/config.h index 29cb95f17..920d34acd 100644 --- a/keyboards/melgeek/mj64/config.h +++ b/keyboards/melgeek/mj64/config.h @@ -37,7 +37,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/melgeek/mj64/rev1/rev1.c b/keyboards/melgeek/mj64/rev1/rev1.c index e01765b69..446ba779d 100644 --- a/keyboards/melgeek/mj64/rev1/rev1.c +++ b/keyboards/melgeek/mj64/rev1/rev1.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mj64/rev1/rules.mk b/keyboards/melgeek/mj64/rev1/rules.mk index 0efb7fb8f..02b475124 100644 --- a/keyboards/melgeek/mj64/rev1/rules.mk +++ b/keyboards/melgeek/mj64/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj64/rev2/rev2.c b/keyboards/melgeek/mj64/rev2/rev2.c index d5486b908..444e8f60a 100644 --- a/keyboards/melgeek/mj64/rev2/rev2.c +++ b/keyboards/melgeek/mj64/rev2/rev2.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mj64/rev2/rules.mk b/keyboards/melgeek/mj64/rev2/rules.mk index 0efb7fb8f..02b475124 100644 --- a/keyboards/melgeek/mj64/rev2/rules.mk +++ b/keyboards/melgeek/mj64/rev2/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj64/rev3/rev3.c b/keyboards/melgeek/mj64/rev3/rev3.c index 03ed9fe00..2a1283ec7 100644 --- a/keyboards/melgeek/mj64/rev3/rev3.c +++ b/keyboards/melgeek/mj64/rev3/rev3.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB3 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB4 */ diff --git a/keyboards/melgeek/mj64/rev3/rules.mk b/keyboards/melgeek/mj64/rev3/rules.mk index 0efb7fb8f..02b475124 100644 --- a/keyboards/melgeek/mj64/rev3/rules.mk +++ b/keyboards/melgeek/mj64/rev3/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj65/config.h b/keyboards/melgeek/mj65/config.h index 12a7c7ce1..399c243ac 100644 --- a/keyboards/melgeek/mj65/config.h +++ b/keyboards/melgeek/mj65/config.h @@ -37,7 +37,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/melgeek/mj65/rev3/rev3.c b/keyboards/melgeek/mj65/rev3/rev3.c index 43fae53a3..6335edd79 100644 --- a/keyboards/melgeek/mj65/rev3/rev3.c +++ b/keyboards/melgeek/mj65/rev3/rev3.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mj65/rev3/rules.mk b/keyboards/melgeek/mj65/rev3/rules.mk index 13a802355..043105a70 100644 --- a/keyboards/melgeek/mj65/rev3/rules.mk +++ b/keyboards/melgeek/mj65/rev3/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj6xy/rev3/rules.mk b/keyboards/melgeek/mj6xy/rev3/rules.mk index a58a76732..8fad60497 100755 --- a/keyboards/melgeek/mj6xy/rev3/rules.mk +++ b/keyboards/melgeek/mj6xy/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mojo68/config.h b/keyboards/melgeek/mojo68/config.h index ffd92a783..c4c1dbb0b 100755 --- a/keyboards/melgeek/mojo68/config.h +++ b/keyboards/melgeek/mojo68/config.h @@ -37,7 +37,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 @@ -49,4 +49,3 @@ #define DRIVER_ADDR_1 0b0110000 #define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 - diff --git a/keyboards/melgeek/mojo68/rev1/rev1.c b/keyboards/melgeek/mojo68/rev1/rev1.c index a2e8f7158..cc45417e8 100755 --- a/keyboards/melgeek/mojo68/rev1/rev1.c +++ b/keyboards/melgeek/mojo68/rev1/rev1.c @@ -18,17 +18,16 @@ #ifdef RGB_MATRIX_ENABLE - -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { - {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ - {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ - {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ - {0, CS9_SW4, CS8_SW4, CS7_SW4}, /* RGB4 */ - {0, CS9_SW5, CS8_SW5, CS7_SW5}, /* RGB5 */ - {0, CS9_SW6, CS8_SW6, CS7_SW6}, /* RGB6 */ - {0, CS9_SW7, CS8_SW7, CS7_SW7}, /* RGB7 */ - {0, CS9_SW8, CS8_SW8, CS7_SW8}, /* RGB8 */ - {0, CS9_SW9, CS8_SW9, CS7_SW9}, /* RGB9 */ +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ + {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ + {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ + {0, CS9_SW4, CS8_SW4, CS7_SW4}, /* RGB4 */ + {0, CS9_SW5, CS8_SW5, CS7_SW5}, /* RGB5 */ + {0, CS9_SW6, CS8_SW6, CS7_SW6}, /* RGB6 */ + {0, CS9_SW7, CS8_SW7, CS7_SW7}, /* RGB7 */ + {0, CS9_SW8, CS8_SW8, CS7_SW8}, /* RGB8 */ + {0, CS9_SW9, CS8_SW9, CS7_SW9}, /* RGB9 */ {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* RGB46 */ {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* RGB47 */ {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* RGB48 */ @@ -36,10 +35,10 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS24_SW5, CS23_SW5, CS22_SW5}, /* RGB50 */ {0, CS24_SW6, CS23_SW6, CS22_SW6}, /* RGB51 */ {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB10 */ - {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB11 */ + {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB11 */ {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB12 */ - {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB13 */ - {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* RGB14 */ + {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* RGB13 */ + {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* RGB14 */ {0, CS12_SW6, CS11_SW6, CS10_SW6}, /* RGB15 */ {0, CS12_SW7, CS11_SW7, CS10_SW7}, /* RGB16 */ {0, CS12_SW8, CS11_SW8, CS10_SW8}, /* RGB17 */ @@ -66,7 +65,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS27_SW8, CS26_SW8, CS25_SW8}, /* RGB62 */ {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB28 */ {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* RGB29 */ - {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB30 */ + {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB30 */ {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB31 */ {0, CS18_SW5, CS17_SW5, CS16_SW5}, /* RGB32 */ {0, CS18_SW6, CS17_SW6, CS16_SW6}, /* RGB33 */ @@ -101,14 +100,14 @@ led_config_t g_led_config = { }, { {0, 0}, {16, 0}, {32, 0}, {48, 0}, {64, 0}, {80, 0}, {96, 0}, {112, 0}, {128, 0}, {144, 0}, {160, 0}, {176, 0}, {192, 0}, {208, 0}, {224, 0}, {0, 16}, {16, 16}, {32, 16}, {48, 16}, {64, 16}, {80, 16}, {96, 16}, {112, 16}, {128, 16}, {144, 16}, {160, 16}, {176, 16}, {192, 16}, {208, 16}, {224, 16}, - {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, {208, 32}, - {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, + {0, 32}, {16, 32}, {32, 32}, {48, 32}, {64, 32}, {80, 32}, {96, 32}, {112, 32}, {128, 32}, {144, 32}, {160, 32}, {176, 32}, {192, 32}, {208, 32}, + {0, 48}, {16, 48}, {32, 48}, {48, 48}, {64, 48}, {80, 48}, {96, 48}, {112, 48}, {128, 48}, {144, 48}, {160, 48}, {176, 48}, {192, 48}, {208, 48}, {0, 64}, {16, 64}, {32, 64}, {48, 64}, {64, 64}, {80, 64}, {96, 64}, {112, 64}, {128, 64}, {144, 64}, }, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, } }; diff --git a/keyboards/melgeek/mojo68/rev1/rules.mk b/keyboards/melgeek/mojo68/rev1/rules.mk index ec17a50b5..b2e76b3ad 100755 --- a/keyboards/melgeek/mojo68/rev1/rules.mk +++ b/keyboards/melgeek/mojo68/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mojo75/config.h b/keyboards/melgeek/mojo75/config.h index c1a8083f1..d5bb4b454 100644 --- a/keyboards/melgeek/mojo75/config.h +++ b/keyboards/melgeek/mojo75/config.h @@ -37,7 +37,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/melgeek/mojo75/rev1/rev1.c b/keyboards/melgeek/mojo75/rev1/rev1.c index 670116fcd..07ae916da 100644 --- a/keyboards/melgeek/mojo75/rev1/rev1.c +++ b/keyboards/melgeek/mojo75/rev1/rev1.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB1 */ {0, CS6_SW2, CS5_SW2, CS4_SW2}, /* RGB2 */ {0, CS6_SW3, CS5_SW3, CS4_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mojo75/rev1/rules.mk b/keyboards/melgeek/mojo75/rev1/rules.mk index 9b3d6367f..c83a53529 100644 --- a/keyboards/melgeek/mojo75/rev1/rules.mk +++ b/keyboards/melgeek/mojo75/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/z70ultra/config.h b/keyboards/melgeek/z70ultra/config.h index d5a9d0a89..e4530e2ea 100644 --- a/keyboards/melgeek/z70ultra/config.h +++ b/keyboards/melgeek/z70ultra/config.h @@ -36,7 +36,7 @@ #define NO_ACTION_FUNCTION #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/melgeek/z70ultra/rev1/rules.mk b/keyboards/melgeek/z70ultra/rev1/rules.mk index a80e42906..174a842af 100644 --- a/keyboards/melgeek/z70ultra/rev1/rules.mk +++ b/keyboards/melgeek/z70ultra/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/z70ultra/z70ultra.c b/keyboards/melgeek/z70ultra/z70ultra.c index 740720681..552576cd7 100644 --- a/keyboards/melgeek/z70ultra/z70ultra.c +++ b/keyboards/melgeek/z70ultra/z70ultra.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS28_SW1, CS30_SW1, CS29_SW1}, /* RGB10 */ {0, CS28_SW2, CS30_SW2, CS29_SW2}, /* RGB11 */ {0, CS28_SW3, CS30_SW3, CS29_SW3}, /* RGB12 */ diff --git a/keyboards/melody96/keymaps/konstantin/rules.mk b/keyboards/melody96/keymaps/konstantin/rules.mk index 3ef19428a..e02c6c7b1 100644 --- a/keyboards/melody96/keymaps/konstantin/rules.mk +++ b/keyboards/melody96/keymaps/konstantin/rules.mk @@ -1,5 +1,5 @@ # Generic features -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/melody96/rules.mk b/keyboards/melody96/rules.mk index 46b60ab9e..485f8759c 100644 --- a/keyboards/melody96/rules.mk +++ b/keyboards/melody96/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/meme/config.h b/keyboards/meme/config.h index e1248036f..e157ade9a 100644 --- a/keyboards/meme/config.h +++ b/keyboards/meme/config.h @@ -157,24 +157,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/meme/rules.mk b/keyboards/meme/rules.mk index 344d83b33..a5b2c3877 100644 --- a/keyboards/meme/rules.mk +++ b/keyboards/meme/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/merge/iso_macro/rules.mk b/keyboards/merge/iso_macro/rules.mk index 43659757f..47261249d 100644 --- a/keyboards/merge/iso_macro/rules.mk +++ b/keyboards/merge/iso_macro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/merge/uc1/rules.mk b/keyboards/merge/uc1/rules.mk index d1ce4736b..f228fb13f 100644 --- a/keyboards/merge/uc1/rules.mk +++ b/keyboards/merge/uc1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/merge/um70/keymaps/default/keymap.c b/keyboards/merge/um70/keymaps/default/keymap.c index d16e737b4..0a775929d 100644 --- a/keyboards/merge/um70/keymaps/default/keymap.c +++ b/keyboards/merge/um70/keymaps/default/keymap.c @@ -89,7 +89,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void suspend_power_down_user(void) { oled_off(); } diff --git a/keyboards/merge/um70/keymaps/via/keymap.c b/keyboards/merge/um70/keymaps/via/keymap.c index 17cb2895c..aaf682ffd 100644 --- a/keyboards/merge/um70/keymaps/via/keymap.c +++ b/keyboards/merge/um70/keymaps/via/keymap.c @@ -88,7 +88,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void suspend_power_down_user(void) { oled_off(); } diff --git a/keyboards/merge/um70/keymaps/via/rules.mk b/keyboards/merge/um70/keymaps/via/rules.mk index 56de955c2..cc9055e91 100644 --- a/keyboards/merge/um70/keymaps/via/rules.mk +++ b/keyboards/merge/um70/keymaps/via/rules.mk @@ -1,3 +1,6 @@ VIA_ENABLE = yes WPM_ENABLE = yes -LTO_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no diff --git a/keyboards/merge/um70/rules.mk b/keyboards/merge/um70/rules.mk index 4e4abc1d8..a29fa7712 100644 --- a/keyboards/merge/um70/rules.mk +++ b/keyboards/merge/um70/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,4 +22,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes SPLIT_KEYBOARD = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/mesa/mesa_tkl/config.h b/keyboards/mesa/mesa_tkl/config.h index f4c26e2a0..23da260bc 100644 --- a/keyboards/mesa/mesa_tkl/config.h +++ b/keyboards/mesa/mesa_tkl/config.h @@ -42,7 +42,7 @@ along with this program. If not, see . */ #define MATRIX_ROW_PINS { D2, D1, D0, B0, C6, C7 } #define MATRIX_COL_PINS { D3, D5, D4, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0, B1, B2, B3 } -#define UNUSED_PINS { B7 E6 } +#define UNUSED_PINS { B7, E6 } /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mesa/mesa_tkl/rules.mk b/keyboards/mesa/mesa_tkl/rules.mk index 219b57ecf..1ed4217ae 100644 --- a/keyboards/mesa/mesa_tkl/rules.mk +++ b/keyboards/mesa/mesa_tkl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/meson/rules.mk b/keyboards/meson/rules.mk index c4bb45334..41cb672c0 100644 --- a/keyboards/meson/rules.mk +++ b/keyboards/meson/rules.mk @@ -15,7 +15,7 @@ BOOTLOADER = caterina # change yes to no to disable # SPLIT_KEYBOARD = yes -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -26,7 +26,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/metamechs/timberwolf/config.h b/keyboards/metamechs/timberwolf/config.h index c6e0a8fe3..0a1179d10 100644 --- a/keyboards/metamechs/timberwolf/config.h +++ b/keyboards/metamechs/timberwolf/config.h @@ -163,11 +163,3 @@ along with this program. If not, see . //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -/* - * MIDI options - */ - -/* Bootmagic Lite key configuration */ -#define BOOTMAGIC_LITE_ROW 0 -#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/metamechs/timberwolf/rules.mk b/keyboards/metamechs/timberwolf/rules.mk index d6da31774..d62275363 100644 --- a/keyboards/metamechs/timberwolf/rules.mk +++ b/keyboards/metamechs/timberwolf/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mexsistor/ludmila/rules.mk b/keyboards/mexsistor/ludmila/rules.mk index 606675061..c460ee132 100644 --- a/keyboards/mexsistor/ludmila/rules.mk +++ b/keyboards/mexsistor/ludmila/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = atmel-dfu # CUSTOM_MATRIX = lite SRC = matrix.c -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/miller/gm862/config.h b/keyboards/miller/gm862/config.h index 2b084efc2..e6e1b4c1d 100644 --- a/keyboards/miller/gm862/config.h +++ b/keyboards/miller/gm862/config.h @@ -36,10 +36,10 @@ #define DEBOUNCE 3 #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define DISABLE_RGB_MATRIX_BAND_SAT # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT # define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/keyboards/miller/gm862/gm862.c b/keyboards/miller/gm862/gm862.c index 5af66dd39..d67104838 100644 --- a/keyboards/miller/gm862/gm862.c +++ b/keyboards/miller/gm862/gm862.c @@ -1,7 +1,7 @@ #include "gm862.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, B_1, A_1, C_1}, {0, B_2, A_2, C_2}, {0, B_3, A_3, C_3}, diff --git a/keyboards/miller/gm862/rules.mk b/keyboards/miller/gm862/rules.mk index f35c9f40c..abad180c8 100644 --- a/keyboards/miller/gm862/rules.mk +++ b/keyboards/miller/gm862/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 RGB_MATRIX_ENABLE = yes # Use RGB matrix diff --git a/keyboards/millipad/rules.mk b/keyboards/millipad/rules.mk index 57daefea4..c8bc10767 100644 --- a/keyboards/millipad/rules.mk +++ b/keyboards/millipad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/miniaxe/config.h b/keyboards/miniaxe/config.h index 8119c4f8e..f9843d4b7 100644 --- a/keyboards/miniaxe/config.h +++ b/keyboards/miniaxe/config.h @@ -173,26 +173,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/miniaxe/rules.mk b/keyboards/miniaxe/rules.mk index 216d73438..3c50574f2 100644 --- a/keyboards/miniaxe/rules.mk +++ b/keyboards/miniaxe/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/minidox/keymaps/bepo/keymap.c b/keyboards/minidox/keymaps/bepo/keymap.c index 95b9ef30c..331a22314 100644 --- a/keyboards/minidox/keymaps/bepo/keymap.c +++ b/keyboards/minidox/keymaps/bepo/keymap.c @@ -30,8 +30,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------' `------' */ [_BEPO] = LAYOUT( - BP_B, BP_W, BP_P, BP_O, BP_APOS, BP_DCRC, BP_V , BP_D, BP_L, BP_J, - BP_A, BP_U, BP_I, BP_E, BP_COMMA, BP_C, BP_T, BP_S, BP_R, BP_N, + BP_B, BP_W, BP_P, BP_O, BP_QUOT, BP_DCIR, BP_V , BP_D, BP_L, BP_J, + BP_A, BP_U, BP_I, BP_E, BP_COMM, BP_C, BP_T, BP_S, BP_R, BP_N, LGUI_T(BP_Z), ALT_T(BP_Y), CTL_T(BP_X), SFT_T(BP_DOT), BP_K, BP_M, SFT_T(BP_Q), CTL_T(BP_G), ALT_T(BP_H), LGUI_T(BP_F), KC_DEL, TABLO, KC_SPC, KC_BSPC, ENTRA , KC_ESC ), @@ -52,8 +52,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------' `------' */ [_LOWER] = LAYOUT( - ALGR(BP_B), BP_E_ACUTE, ALGR(BP_P), ALGR(BP_O), BP_E_GRAVE, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_MS_WH_UP, - ALGR(BP_A), ALGR(BP_U), ALGR(BP_I), ALGR(BP_E), BP_DOLLAR, KC_PGDOWN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_DOWN, + ALGR(BP_B), BP_EACU, ALGR(BP_P), ALGR(BP_O), BP_EGRV, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_MS_WH_UP, + ALGR(BP_A), ALGR(BP_U), ALGR(BP_I), ALGR(BP_E), BP_DLR, KC_PGDOWN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_MS_WH_DOWN, BP_AGRV, KC_LALT, KC_LCTL, KC_LSFT, BP_CCED, _______, KC_LSFT, KC_LCTL, KC_LALT, _______, _______, _______, _______, _______, _______, _______ ), @@ -74,8 +74,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `------' `------' */ [_RAISE] = LAYOUT( - BP_DQOT, ALGR(BP_LGIL), ALGR(BP_RGIL), BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINUS, BP_SLASH, BP_ASTR, - S(BP_PERCENT), ALGR(BP_Y), ALGR(BP_X), ALGR(BP_LPRN), ALGR(BP_RPRN), ALGR(BP_K), BP_EQUAL, BP_PERCENT, ALGR(BP_A_GRAVE), S(BP_DOLLAR), + BP_DQUO, ALGR(BP_LDAQ), ALGR(BP_RDAQ), BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, + S(BP_PERC), ALGR(BP_Y), ALGR(BP_X), ALGR(BP_LPRN), ALGR(BP_RPRN), ALGR(BP_K), BP_EQL, BP_PERC, ALGR(BP_AGRV), S(BP_DLR), ALGR(BP_B), KC_LALT, KC_LCTL, KC_LSFT, ALGR(BP_COMM), _______, KC_LSFT, KC_LCTL, KC_LALT, ALGR(BP_P), _______, _______, ALGR(KC_SPC), _______, _______, _______ ), @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT( KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, - S(BP_DQOT), S(BP_LGIL), S(BP_RGIL), S(BP_LPRN), S(BP_RPRN), S(BP_AT), S(BP_PLUS), S(BP_MINUS), S(BP_SLASH), S(BP_ASTR), + S(BP_DQUO), S(BP_LDAQ), S(BP_RDAQ), S(BP_LPRN), S(BP_RPRN), S(BP_AT), S(BP_PLUS), S(BP_MINS), S(BP_SLSH), S(BP_ASTR), KC_F11, KC_LALT, KC_LCTL, KC_LSFT, _______, _______, KC_LSFT, KC_LCTL, KC_LALT, KC_F12 , _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/minidox/keymaps/tw1t611/keymap.c b/keyboards/minidox/keymaps/tw1t611/keymap.c index e94625516..f479b10f6 100644 --- a/keyboards/minidox/keymaps/tw1t611/keymap.c +++ b/keyboards/minidox/keymaps/tw1t611/keymap.c @@ -34,16 +34,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_RAISE] = LAYOUT( \ - DE_EXLM, DE_QST, DE_PARA, DE_DLR, DE_HASH, DE_PLUS, DE_7, DE_8, DE_9, DE_0, \ - DE_CIRC, DE_QUOT, DE_DQOT, DE_GRV, DE_AMPR, DE_ASTR, DE_4, DE_5, DE_6, DE_EQL, \ + DE_EXLM, DE_QUES, DE_SECT, DE_DLR, DE_HASH, DE_PLUS, DE_7, DE_8, DE_9, DE_0, \ + DE_CIRC, DE_QUOT, DE_DQUO, DE_GRV, DE_AMPR, DE_ASTR, DE_4, DE_5, DE_6, DE_EQL, \ DE_SLSH, DE_PIPE, DE_BSLS, DE_AT, DE_EURO, DE_PERC, DE_1, DE_2, DE_3, KC_TAB, \ _______, _______, _______, _______, _______, _______ \ ), [_LOWER] = LAYOUT( \ KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, DE_LBRC, DE_RBRC, KC_AUDIO_VOL_UP, KC_HOME, KC_PGDOWN, KC_PGUP, KC_END, DE_TILD, \ - KC_ESC, DE_LESS, DE_LPRN, DE_RPRN, DE_MORE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_ENT, \ - KC_BSPC, KC_DEL, DE_LCBR, DE_RCBR, KC_PSCR, _______, DE_AE, DE_OE, DE_UE, DE_SS, \ + KC_ESC, DE_LABK, DE_LPRN, DE_RPRN, DE_RABK, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_ENT, \ + KC_BSPC, KC_DEL, DE_LCBR, DE_RCBR, KC_PSCR, _______, DE_ADIA, DE_ODIA, DE_UDIA, DE_SS, \ _______, _______, _______, _______, MO(_ADJUST), _______ \ ), diff --git a/keyboards/minidox/rules.mk b/keyboards/minidox/rules.mk index 9948ef0c6..e53052751 100644 --- a/keyboards/minidox/rules.mk +++ b/keyboards/minidox/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/minim/rules.mk b/keyboards/minim/rules.mk index 32981133b..efca6bac6 100644 --- a/keyboards/minim/rules.mk +++ b/keyboards/minim/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/minimacro5/rules.mk b/keyboards/minimacro5/rules.mk index dd66c4fbd..c0ee3191d 100644 --- a/keyboards/minimacro5/rules.mk +++ b/keyboards/minimacro5/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mint60/config.h b/keyboards/mint60/config.h index db882a1d3..a21ffc648 100644 --- a/keyboards/mint60/config.h +++ b/keyboards/mint60/config.h @@ -172,23 +172,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/mint60/rules.mk b/keyboards/mint60/rules.mk index 33ddcbb1c..71e2b2495 100644 --- a/keyboards/mint60/rules.mk +++ b/keyboards/mint60/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = yes # Enable WS2812 RGB underlight. -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/mio/rules.mk b/keyboards/mio/rules.mk index 38ce53e30..a13cc8c07 100644 --- a/keyboards/mio/rules.mk +++ b/keyboards/mio/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/misonoworks/chocolatebar/chocolatebar.c b/keyboards/misonoworks/chocolatebar/chocolatebar.c index 7e13f9761..448d95588 100644 --- a/keyboards/misonoworks/chocolatebar/chocolatebar.c +++ b/keyboards/misonoworks/chocolatebar/chocolatebar.c @@ -17,7 +17,7 @@ along with this program. If not, see . #include "chocolatebar.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 180 degrees if offhand } diff --git a/keyboards/misonoworks/chocolatebar/rules.mk b/keyboards/misonoworks/chocolatebar/rules.mk index e7951f37b..d704b765c 100644 --- a/keyboards/misonoworks/chocolatebar/rules.mk +++ b/keyboards/misonoworks/chocolatebar/rules.mk @@ -21,4 +21,5 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = no -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/misonoworks/karina/rules.mk b/keyboards/misonoworks/karina/rules.mk index 40ef41ff9..3bb907a9d 100644 --- a/keyboards/misonoworks/karina/rules.mk +++ b/keyboards/misonoworks/karina/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/misterknife/knife66/rules.mk b/keyboards/misterknife/knife66/rules.mk index 2202d51ea..eaf6b2469 100644 --- a/keyboards/misterknife/knife66/rules.mk +++ b/keyboards/misterknife/knife66/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/misterknife/knife66_iso/rules.mk b/keyboards/misterknife/knife66_iso/rules.mk index 2202d51ea..eaf6b2469 100644 --- a/keyboards/misterknife/knife66_iso/rules.mk +++ b/keyboards/misterknife/knife66_iso/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mitosis/keymaps/datagrok/rules.mk b/keyboards/mitosis/keymaps/datagrok/rules.mk index b69efdf54..7ee0852d7 100644 --- a/keyboards/mitosis/keymaps/datagrok/rules.mk +++ b/keyboards/mitosis/keymaps/datagrok/rules.mk @@ -14,7 +14,7 @@ MITOSIS_DATAGROK_BOTTOMSPACE = no MITOSIS_DATAGROK_SLOWUART = no AUDIO_ENABLE = no # audio output -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/mitosis/keymaps/mjt/rules.mk b/keyboards/mitosis/keymaps/mjt/rules.mk index 025965767..9060940ea 100644 --- a/keyboards/mitosis/keymaps/mjt/rules.mk +++ b/keyboards/mitosis/keymaps/mjt/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -10,5 +10,3 @@ AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no - diff --git a/keyboards/mitosis/rules.mk b/keyboards/mitosis/rules.mk index 5ca62fc8b..1dae50712 100644 --- a/keyboards/mitosis/rules.mk +++ b/keyboards/mitosis/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,7 @@ CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = yes # MIDI controls +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = yes # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/miuni32/keymaps/adam-lee/rules.mk b/keyboards/miuni32/keymaps/adam-lee/rules.mk index 3a741d20a..1022078ba 100644 --- a/keyboards/miuni32/keymaps/adam-lee/rules.mk +++ b/keyboards/miuni32/keymaps/adam-lee/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/miuni32/keymaps/ht_156/rules.mk b/keyboards/miuni32/keymaps/ht_156/rules.mk index 3a741d20a..1022078ba 100644 --- a/keyboards/miuni32/keymaps/ht_156/rules.mk +++ b/keyboards/miuni32/keymaps/ht_156/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/miuni32/keymaps/kifinnsson/rules.mk b/keyboards/miuni32/keymaps/kifinnsson/rules.mk index 15d3cfff2..5bd824e1f 100644 --- a/keyboards/miuni32/keymaps/kifinnsson/rules.mk +++ b/keyboards/miuni32/keymaps/kifinnsson/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/miuni32/rules.mk b/keyboards/miuni32/rules.mk index 9f36d744a..fb361c4a6 100644 --- a/keyboards/miuni32/rules.mk +++ b/keyboards/miuni32/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ 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 = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/mixi/rules.mk b/keyboards/mixi/rules.mk index 99b1f1cbc..9cdce462a 100644 --- a/keyboards/mixi/rules.mk +++ b/keyboards/mixi/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mnk1800s/rules.mk b/keyboards/mnk1800s/rules.mk index 3067704c5..8efe09528 100755 --- a/keyboards/mnk1800s/rules.mk +++ b/keyboards/mnk1800s/rules.mk @@ -9,7 +9,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mode/eighty/m80h/rules.mk b/keyboards/mode/eighty/m80h/rules.mk index 583ff2377..afb413c3e 100644 --- a/keyboards/mode/eighty/m80h/rules.mk +++ b/keyboards/mode/eighty/m80h/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mode/eighty/m80s/rules.mk b/keyboards/mode/eighty/m80s/rules.mk index 583ff2377..afb413c3e 100644 --- a/keyboards/mode/eighty/m80s/rules.mk +++ b/keyboards/mode/eighty/m80s/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/model_v/rules.mk b/keyboards/model_v/rules.mk index 32981133b..efca6bac6 100644 --- a/keyboards/model_v/rules.mk +++ b/keyboards/model_v/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/molecule/rules.mk b/keyboards/molecule/rules.mk index 9130ab8ec..f1cf7c26d 100755 --- a/keyboards/molecule/rules.mk +++ b/keyboards/molecule/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/momoka_ergo/rules.mk b/keyboards/momoka_ergo/rules.mk index 402f5b199..5d23ac97d 100644 --- a/keyboards/momoka_ergo/rules.mk +++ b/keyboards/momoka_ergo/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/monarch/rules.mk b/keyboards/monarch/rules.mk index bd08c22ee..36723902b 100644 --- a/keyboards/monarch/rules.mk +++ b/keyboards/monarch/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/monstargear/xo87/rgb/config.h b/keyboards/monstargear/xo87/rgb/config.h index 83eee8349..5ed0ed445 100644 --- a/keyboards/monstargear/xo87/rgb/config.h +++ b/keyboards/monstargear/xo87/rgb/config.h @@ -36,7 +36,7 @@ #define DIODE_DIRECTION ROW2COL #define RGB_DI_PIN D7 #define DRIVER_LED_TOTAL 110 -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100 // limits maximum brightness of LEDs to 100 out of 255. #define RGBLIGHT_LIMIT_VAL 100 // limits maximum brightness of LEDs to 100 out of 255. diff --git a/keyboards/monstargear/xo87/rgb/rules.mk b/keyboards/monstargear/xo87/rgb/rules.mk index ec3bdd229..43f3c90eb 100644 --- a/keyboards/monstargear/xo87/rgb/rules.mk +++ b/keyboards/monstargear/xo87/rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = lufa-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/monstargear/xo87/solderable/rules.mk b/keyboards/monstargear/xo87/solderable/rules.mk index 9ed17fc75..89c66832d 100644 --- a/keyboards/monstargear/xo87/solderable/rules.mk +++ b/keyboards/monstargear/xo87/solderable/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = lufa-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/montex/rules.mk b/keyboards/montex/rules.mk index e2f9c8310..b91f40ae3 100644 --- a/keyboards/montex/rules.mk +++ b/keyboards/montex/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/montsinger/rebound/rev1/rules.mk b/keyboards/montsinger/rebound/rev1/rules.mk index 20d2a96f1..e57f62a57 100644 --- a/keyboards/montsinger/rebound/rev1/rules.mk +++ b/keyboards/montsinger/rebound/rev1/rules.mk @@ -11,7 +11,7 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,7 +22,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/montsinger/rebound/rev2/rules.mk b/keyboards/montsinger/rebound/rev2/rules.mk index 040b2de49..3bd114815 100644 --- a/keyboards/montsinger/rebound/rev2/rules.mk +++ b/keyboards/montsinger/rebound/rev2/rules.mk @@ -11,7 +11,7 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,7 +22,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 ENCODER_ENABLE = yes diff --git a/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c index ab2b52a72..887bffeb8 100644 --- a/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c +++ b/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c @@ -74,7 +74,7 @@ case _BASE: return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR(""), false); diff --git a/keyboards/montsinger/rebound/rev3/keymaps/rossman360/rules.mk b/keyboards/montsinger/rebound/rev3/keymaps/rossman360/rules.mk index ca475d2e1..59f78f834 100644 --- a/keyboards/montsinger/rebound/rev3/keymaps/rossman360/rules.mk +++ b/keyboards/montsinger/rebound/rev3/keymaps/rossman360/rules.mk @@ -1,4 +1,4 @@ MOUSEKEY_ENABLE = no # Mouse keys CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no diff --git a/keyboards/montsinger/rebound/rev3/rules.mk b/keyboards/montsinger/rebound/rev3/rules.mk index 040b2de49..3bd114815 100644 --- a/keyboards/montsinger/rebound/rev3/rules.mk +++ b/keyboards/montsinger/rebound/rev3/rules.mk @@ -11,7 +11,7 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,7 +22,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 ENCODER_ENABLE = yes diff --git a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c index b6f5dc7dd..1465372ec 100644 --- a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c +++ b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c @@ -83,7 +83,7 @@ case _DEL: return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR(""), false); diff --git a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/rules.mk b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/rules.mk index fa835793e..f1fb91cc3 100644 --- a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/rules.mk +++ b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/rules.mk @@ -1,4 +1,4 @@ MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no COMMAND_ENABLE = no -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no diff --git a/keyboards/montsinger/rebound/rev4/rules.mk b/keyboards/montsinger/rebound/rev4/rules.mk index a1c4c481c..9d9d7aec5 100644 --- a/keyboards/montsinger/rebound/rev4/rules.mk +++ b/keyboards/montsinger/rebound/rev4/rules.mk @@ -11,7 +11,7 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,7 +22,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 ENCODER_ENABLE = yes diff --git a/keyboards/montsinger/rewind/rules.mk b/keyboards/montsinger/rewind/rules.mk index 6a4557aab..e3c260839 100644 --- a/keyboards/montsinger/rewind/rules.mk +++ b/keyboards/montsinger/rewind/rules.mk @@ -11,7 +11,7 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = caterina -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -22,6 +22,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/moon/rules.mk b/keyboards/moon/rules.mk index 2878fed9f..d5dc29e23 100644 --- a/keyboards/moon/rules.mk +++ b/keyboards/moon/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h index 16a41c9cc..522cb0ab2 100644 --- a/keyboards/moonlander/config.h +++ b/keyboards/moonlander/config.h @@ -91,7 +91,7 @@ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 175 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define MUSIC_MAP diff --git a/keyboards/moonlander/keymaps/drashna/keymap.c b/keyboards/moonlander/keymaps/drashna/keymap.c index 57c69df48..f6af7e53a 100644 --- a/keyboards/moonlander/keymaps/drashna/keymap.c +++ b/keyboards/moonlander/keymaps/drashna/keymap.c @@ -39,68 +39,32 @@ enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE }; KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT \ ) -#define LAYOUT_moonlander_base_wrapper(...) LAYOUT_moonlander_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_moonlander_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_moonlander_base_wrapper( + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ ), - [_COLEMAK] = LAYOUT_moonlander_base_wrapper( + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ ), - [_DVORAK] = LAYOUT_moonlander_base_wrapper( + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), - [_WORKMAN] = LAYOUT_moonlander_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_moonlander_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_moonlander_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_moonlander_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_moonlander_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - -#ifdef _MODS - [_MODS] = LAYOUT_moonlander_wrapper( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, - _______, KC_MEH, KC_HYPR, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LALT, _______, _______, _______, _______, KC_RGUI - ), -#endif [_GAMEPAD] = LAYOUT_moonlander_wrapper( KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, HYPR(KC_Q), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, @@ -214,29 +178,17 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (userspace_config.rgb_layer_change) { switch (get_highest_layer(layer_state|default_layer_state)) { - case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_1: + rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_2: + rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_3: + rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _WORKMAN: - rgb_matrix_layer_helper(HSV_GOLDENROD, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _NORMAN: - rgb_matrix_layer_helper(HSV_CORAL, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _MALTRON: - rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _EUCALYN: - rgb_matrix_layer_helper(HSV_PINK, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _CARPLAX: - rgb_matrix_layer_helper(HSV_BLUE, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_4: + rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _GAMEPAD: rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); diff --git a/keyboards/moonlander/keymaps/drashna/rules.mk b/keyboards/moonlander/keymaps/drashna/rules.mk index 480e97446..0af16d6e1 100644 --- a/keyboards/moonlander/keymaps/drashna/rules.mk +++ b/keyboards/moonlander/keymaps/drashna/rules.mk @@ -1,4 +1,4 @@ TAP_DANCE_ENABLE = yes -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite UNICODE_ENABLE = yes UNICODEMAP_ENABLE = no diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c index d66b74d97..8688b9efa 100644 --- a/keyboards/moonlander/moonlander.c +++ b/keyboards/moonlander/moonlander.c @@ -203,7 +203,7 @@ layer_state_t layer_state_set_kb(layer_state_t state) { #ifdef RGB_MATRIX_ENABLE // clang-format off -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/moonlander/rules.mk b/keyboards/moonlander/rules.mk index 8e8dbf94f..cb9cd299e 100644 --- a/keyboards/moonlander/rules.mk +++ b/keyboards/moonlander/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mountainblocks/mb17/rules.mk b/keyboards/mountainblocks/mb17/rules.mk index 38f2485d9..1448508c2 100644 --- a/keyboards/mountainblocks/mb17/rules.mk +++ b/keyboards/mountainblocks/mb17/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/mschwingen/modelm/rules.mk b/keyboards/mschwingen/modelm/rules.mk index 6775dfa20..ef70f5449 100644 --- a/keyboards/mschwingen/modelm/rules.mk +++ b/keyboards/mschwingen/modelm/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = lufa-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h index cb8882457..8e04fe38c 100644 --- a/keyboards/mt40/config.h +++ b/keyboards/mt40/config.h @@ -166,24 +166,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #endif diff --git a/keyboards/mt40/rules.mk b/keyboards/mt40/rules.mk index 3f4847400..4248e1a9f 100644 --- a/keyboards/mt40/rules.mk +++ b/keyboards/mt40/rules.mk @@ -12,14 +12,13 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ # nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/mt64rgb/mt64rgb.c b/keyboards/mt64rgb/mt64rgb.c index 73f0e562e..a0b8e8da7 100644 --- a/keyboards/mt64rgb/mt64rgb.c +++ b/keyboards/mt64rgb/mt64rgb.c @@ -16,7 +16,7 @@ #include "mt64rgb.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/mt64rgb/rules.mk b/keyboards/mt64rgb/rules.mk index b77c0d52b..2c71f5151 100644 --- a/keyboards/mt64rgb/rules.mk +++ b/keyboards/mt64rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mt84/keymaps/default/config.h b/keyboards/mt84/keymaps/default/config.h new file mode 100644 index 000000000..dd687cad5 --- /dev/null +++ b/keyboards/mt84/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define LAYER_STATE_8BIT diff --git a/keyboards/mt84/mt84.c b/keyboards/mt84/mt84.c index d9f509e14..9b00aa635 100644 --- a/keyboards/mt84/mt84.c +++ b/keyboards/mt84/mt84.c @@ -1,22 +1,22 @@ - /* Copyright 2020 MT<704340378@qq.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 . - */ + /* Copyright 2020 MT<704340378@qq.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 "mt84.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -40,7 +40,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {1, D_12, E_12, F_12}, {1, G_12, H_12, I_12}, {1, J_12, K_12, L_12}, - + {0, A_1, B_1, C_1}, {0, D_1, E_1, F_1}, {0, G_1, H_1, I_1}, @@ -72,7 +72,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {1, A_7, B_7, C_7}, {1, D_7, E_7, F_7}, {1, G_7, H_7, I_7}, - + {0, A_3, B_3, C_3}, {0, D_3, E_3, F_3}, {0, G_3, H_3, I_3}, @@ -87,7 +87,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { {1, J_3, K_3, L_3}, {1, A_8, B_8, C_8}, {1, G_8, H_8, I_8}, - + {0, A_4, B_4, C_4}, {0, D_4, E_4, F_4}, {0, G_4, H_4, I_4}, @@ -130,7 +130,7 @@ led_config_t g_led_config = {{ { 9, 52 }, { 27, 52 }, { 43, 52 }, { 59, 52 }, { 75, 52 }, { 91, 52 }, { 107, 52 }, { 123, 52 }, { 139, 52 }, { 155, 52 }, { 171, 52 }, { 187, 52 }, { 212, 52 }, { 224, 52 }, { 2, 64 }, { 18, 64 }, { 33, 64 }, { 93, 64 }, { 150, 64 }, { 165, 64 }, { 180, 64 }, { 195, 64 }, { 210, 64 }, { 224, 64 } }, { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, diff --git a/keyboards/mt84/rules.mk b/keyboards/mt84/rules.mk index b27a7c344..07f7bc171 100644 --- a/keyboards/mt84/rules.mk +++ b/keyboards/mt84/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,6 +22,6 @@ RGB_MATRIX_DRIVER = IS31FL3737 RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes LAYOUTS = 75_ansi - diff --git a/keyboards/mt980/rules.mk b/keyboards/mt980/rules.mk index 02877c599..b0e607e7d 100644 --- a/keyboards/mt980/rules.mk +++ b/keyboards/mt980/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/murcielago/rev1/rules.mk b/keyboards/murcielago/rev1/rules.mk index 76f3014ad..bb77ecbf2 100644 --- a/keyboards/murcielago/rev1/rules.mk +++ b/keyboards/murcielago/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 SPLIT_KEYBOARD = yes # Enable split keyboard mode diff --git a/keyboards/mxss/mxss.c b/keyboards/mxss/mxss.c index 48ea46641..dd418b86f 100644 --- a/keyboards/mxss/mxss.c +++ b/keyboards/mxss/mxss.c @@ -18,7 +18,7 @@ #include QMK_KEYBOARD_H #include "tmk_core/common/eeprom.h" -#include "tmk_core/common/action_layer.h" +#include "action_layer.h" #include "rgblight.h" #include "via.h" #include "version.h" // for QMK_BUILDDATE used in EEPROM magic diff --git a/keyboards/mxss/rules.mk b/keyboards/mxss/rules.mk index 7dc98d473..b87324a7c 100644 --- a/keyboards/mxss/rules.mk +++ b/keyboards/mxss/rules.mk @@ -2,39 +2,31 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output SRC += mxss_frontled.c # Remove the common RGB light code and use my iteration instead +COMMON_VPATH += $(QUANTUM_DIR)/rgblight OPT_DEFS += -DRGBLIGHT_ENABLE -SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c SRC += rgblight.c -SRC += color.c -SRC += ws2812.c +SRC += $(QUANTUM_DIR)/color.c +WS2812_DRIVER_REQUIRED = yes CIE1931_CURVE = yes +RGB_KEYCODES_ENABLE = yes diff --git a/keyboards/mysticworks/wyvern/rules.mk b/keyboards/mysticworks/wyvern/rules.mk index 6bd8b8932..184f0908e 100644 --- a/keyboards/mysticworks/wyvern/rules.mk +++ b/keyboards/mysticworks/wyvern/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nack/rules.mk b/keyboards/nack/rules.mk index f8b7d4d39..1b0baf8a1 100644 --- a/keyboards/nack/rules.mk +++ b/keyboards/nack/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nafuda/rules.mk b/keyboards/nafuda/rules.mk index bdc863464..7f6c9381d 100644 --- a/keyboards/nafuda/rules.mk +++ b/keyboards/nafuda/rules.mk @@ -14,20 +14,19 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. TAP_DANCE_ENABLE = no -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/naked48/keymaps/salicylic/config.h b/keyboards/naked48/keymaps/salicylic/config.h index b6372db3b..71a43e208 100644 --- a/keyboards/naked48/keymaps/salicylic/config.h +++ b/keyboards/naked48/keymaps/salicylic/config.h @@ -31,7 +31,7 @@ # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 @@ -41,4 +41,3 @@ # define RGB_MATRIX_VAL_STEP 5 # define RGB_MATRIX_SPD_STEP 10 #endif - diff --git a/keyboards/naked48/keymaps/salicylic/keymap.c b/keyboards/naked48/keymaps/salicylic/keymap.c index 8b5e15c13..dddb6c043 100644 --- a/keyboards/naked48/keymaps/salicylic/keymap.c +++ b/keyboards/naked48/keymaps/salicylic/keymap.c @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| @@ -78,7 +78,7 @@ SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XX ) }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c b/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c index 5a99b8c0a..7566d4c00 100644 --- a/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c +++ b/keyboards/naked48/keymaps/salicylic_with_nafuda/keymap.c @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. |--------------------------| KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, TG(_MOUSE), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------------------------| @@ -101,7 +101,7 @@ SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XX ) }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c index cbe65fe66..1925067d2 100644 --- a/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c +++ b/keyboards/naked48/keymaps/salicylic_with_setta21/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,-----------------------------------------------------| |-----------------------------------------------------. |-----------------------------------------------| KC_ESC, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, MO(_LOWER),XXXXXXX,KC_LEFT,XXXXXXX,XXXXXXX, KC_ESC, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, JP_EQL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| @@ -80,7 +80,7 @@ SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XX ) }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/naked48/rules.mk b/keyboards/naked48/rules.mk index 293d01ea7..f7df043b3 100644 --- a/keyboards/naked48/rules.mk +++ b/keyboards/naked48/rules.mk @@ -15,19 +15,18 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite 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 NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -OLED_DRIVER_ENABLE = no +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +OLED_ENABLE = no # USE_I2C = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/naked60/keymaps/salicylic/keymap.c b/keyboards/naked60/keymaps/salicylic/keymap.c index 17172f77b..9be4bcb42 100644 --- a/keyboards/naked60/keymaps/salicylic/keymap.c +++ b/keyboards/naked60/keymaps/salicylic/keymap.c @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| @@ -102,7 +102,7 @@ SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XX ) }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c b/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c index 3a2cd9eb8..8fb0ce26f 100644 --- a/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c +++ b/keyboards/naked60/keymaps/salicylic_with_nafuda/keymap.c @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), @@ -101,7 +101,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH,LT(_ADJUST, KC_BSPC),KC_UP,TG(_BROWSER), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_LEFT, KC_DOWN,KC_RIGHT, + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, KC_LEFT, KC_DOWN,KC_RIGHT, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| @@ -119,7 +119,7 @@ LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XX //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |--------------------------| SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), @@ -138,7 +138,7 @@ SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XX ) }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c index a1f5a6e21..7f50e89f3 100644 --- a/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c +++ b/keyboards/naked60/keymaps/salicylic_with_setta21/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| JP_COLN, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_6, KC_7, KC_8, KC_9, JP_ASTR, JP_SLSH, KC_DOWN,KC_DOWN, KC_UP,KC_PSLS, KC_F2, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |-------+-------+-------+-------+-------+-------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, JP_EQL, + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_4, KC_5, KC_6, JP_MINS, JP_EQL, MO(_RAISE),XXXXXXX,KC_RIGHT,XXXXXXX,KC_PAST, JP_EQL, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+-------+-------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_0, KC_1, KC_2, KC_3, JP_PLUS, KC_ENT, KC_PENT, KC_PPLS,KC_PMNS, KC_DEL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |-----------------------------------------------| @@ -89,7 +89,7 @@ LCTL_T(KC_F11), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XX //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| |---------------+---------------+--------+-------| SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, XXXXXXX, JP_RPRN, SEND_SUM,SEND_AVE, KC_DEL, //|--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |------------------------------------------------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ //`------------------------------------------------------------------------------------------------------------' ), @@ -108,7 +108,7 @@ SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XX ) }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/naked60/rules.mk b/keyboards/naked60/rules.mk index fa1b630d4..0388b5520 100644 --- a/keyboards/naked60/rules.mk +++ b/keyboards/naked60/rules.mk @@ -15,19 +15,18 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -OLED_DRIVER_ENABLE = no +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +OLED_ENABLE = no USE_I2C = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/naked64/keymaps/salicylic/keymap.c b/keyboards/naked64/keymaps/salicylic/keymap.c index 06665092f..40e92393d 100644 --- a/keyboards/naked64/keymaps/salicylic/keymap.c +++ b/keyboards/naked64/keymaps/salicylic/keymap.c @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| _______, JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, XXXXXXX, \ //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, KC_ENT, \ + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, KC_ENT, \ // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, KC_UP, KC_RSFT, \ // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c b/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c index 28522c5e9..df80e0772 100644 --- a/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c +++ b/keyboards/naked64/keymaps/salicylic_with_setta21/keymap.c @@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------| _______, JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, XXXXXXX, XXXXXXX, KC_PSLS, KC_PAST, KC_PMNS, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, KC_ENT, XXXXXXX, KC_UP, XXXXXXX, + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, KC_ENT, XXXXXXX, KC_UP, XXXXXXX, // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------| | JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, KC_UP, KC_RSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PPLS, // |--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------| diff --git a/keyboards/naked64/rules.mk b/keyboards/naked64/rules.mk index 0d18a5650..da3ec7cba 100644 --- a/keyboards/naked64/rules.mk +++ b/keyboards/naked64/rules.mk @@ -14,20 +14,19 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. TAP_DANCE_ENABLE = no -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no USE_I2C = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/namecard2x4/keymaps/brainfuck/keymap.c b/keyboards/namecard2x4/keymaps/brainfuck/keymap.c index 287e011de..28640db0f 100644 --- a/keyboards/namecard2x4/keymaps/brainfuck/keymap.c +++ b/keyboards/namecard2x4/keymaps/brainfuck/keymap.c @@ -27,7 +27,7 @@ enum Layer const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [JP] = LAYOUT( - JP_LT,JP_GT,JP_PLUS,JP_MINS,\ + JP_LABK,JP_RABK,JP_PLUS,JP_MINS,\ LT(CONFIG,JP_DOT),JP_COMM,JP_LBRC,LT(CONFIG,JP_RBRC)\ ), [EN] = LAYOUT( diff --git a/keyboards/namecard2x4/rev1/config.h b/keyboards/namecard2x4/rev1/config.h index 73ad7cdb5..0ca114a75 100644 --- a/keyboards/namecard2x4/rev1/config.h +++ b/keyboards/namecard2x4/rev1/config.h @@ -163,23 +163,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/namecard2x4/rev2/config.h b/keyboards/namecard2x4/rev2/config.h index 5ed6f6b66..44b8a712a 100644 --- a/keyboards/namecard2x4/rev2/config.h +++ b/keyboards/namecard2x4/rev2/config.h @@ -163,23 +163,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/namecard2x4/rules.mk b/keyboards/namecard2x4/rules.mk index 18c3fbbb5..f969bbbb6 100644 --- a/keyboards/namecard2x4/rules.mk +++ b/keyboards/namecard2x4/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/navi10/rev0/rules.mk b/keyboards/navi10/rev0/rules.mk index 0e11c1849..967547396 100644 --- a/keyboards/navi10/rev0/rules.mk +++ b/keyboards/navi10/rev0/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/navi10/rev2/rules.mk b/keyboards/navi10/rev2/rules.mk index 0e11c1849..967547396 100644 --- a/keyboards/navi10/rev2/rules.mk +++ b/keyboards/navi10/rev2/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/navi10/rev3/rules.mk b/keyboards/navi10/rev3/rules.mk index f19b82716..61b2452ed 100644 --- a/keyboards/navi10/rev3/rules.mk +++ b/keyboards/navi10/rev3/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/ncc1701kb/rules.mk b/keyboards/ncc1701kb/rules.mk index 791d82b40..d7f65a7ec 100644 --- a/keyboards/ncc1701kb/rules.mk +++ b/keyboards/ncc1701kb/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,10 +25,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI controls BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode -API_SYSEX_ENABLE = yes TAP_DANCE_ENABLE = no ENCODER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/nebula12/rules.mk b/keyboards/nebula12/rules.mk index 3a423fb78..75dd7145d 100755 --- a/keyboards/nebula12/rules.mk +++ b/keyboards/nebula12/rules.mk @@ -14,7 +14,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -31,6 +31,6 @@ CIE1931_CURVE = yes # project specific files SRC += keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ - drivers/issi/is31fl3731.c \ + drivers/led/issi/is31fl3731.c \ quantum/color.c -QUANTUM_LIB_SRC += drivers/chibios/i2c_master.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/nebula68/rules.mk b/keyboards/nebula68/rules.mk index bcf1fd1a8..43ae287ec 100755 --- a/keyboards/nebula68/rules.mk +++ b/keyboards/nebula68/rules.mk @@ -14,7 +14,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -33,6 +33,6 @@ LAYOUTS = 68_ansi # project specific files SRC += keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ - drivers/issi/is31fl3733.c \ + drivers/led/issi/is31fl3733.c \ quantum/color.c -QUANTUM_LIB_SRC += drivers/chibios/i2c_master.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/neito/rules.mk b/keyboards/neito/rules.mk index b16bff328..7836b6de4 100644 --- a/keyboards/neito/rules.mk +++ b/keyboards/neito/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nek_type_a/rules.mk b/keyboards/nek_type_a/rules.mk index 5ee6b11bc..b137b4478 100644 --- a/keyboards/nek_type_a/rules.mk +++ b/keyboards/nek_type_a/rules.mk @@ -14,7 +14,7 @@ F_CPU = 8000000 # ATmega328P USBasp BOOTLOADER = caterina -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/nemui/rules.mk b/keyboards/nemui/rules.mk index bff178858..51f82165b 100644 --- a/keyboards/nemui/rules.mk +++ b/keyboards/nemui/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/neokeys/g67/hotswap/rules.mk b/keyboards/neokeys/g67/hotswap/rules.mk index 0b304a6aa..2f7c48195 100644 --- a/keyboards/neokeys/g67/hotswap/rules.mk +++ b/keyboards/neokeys/g67/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/neokeys/g67/soldered/rules.mk b/keyboards/neokeys/g67/soldered/rules.mk index 7ddf623a2..1cbbd4afb 100644 --- a/keyboards/neokeys/g67/soldered/rules.mk +++ b/keyboards/neokeys/g67/soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/neopad/rev1/rules.mk b/keyboards/neopad/rev1/rules.mk index 309e3d48c..11e22f36e 100755 --- a/keyboards/neopad/rev1/rules.mk +++ b/keyboards/neopad/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/neson_design/n6/n6.c b/keyboards/neson_design/n6/n6.c index 800aa0ae9..38b0fd4c8 100644 --- a/keyboards/neson_design/n6/n6.c +++ b/keyboards/neson_design/n6/n6.c @@ -19,7 +19,7 @@ #include "n6.h" #include "i2c_master.h" -#include "issi/is31fl3731.h" +#include "drivers/led/issi/is31fl3731.h" enum { SELF_TESTING, @@ -158,7 +158,7 @@ static void self_testing(void) } // light left and right - + if (rgb_state.index == 16) { if (rgb_state.duration) { rgb_state.duration--; @@ -187,49 +187,49 @@ static void self_testing(void) update_ticks(); } -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ -// left CA - {0, C1_1, C3_2, C4_2}, - {0, C1_2, C2_2, C4_3}, - {0, C1_3, C2_3, C3_3}, - {0, C1_4, C2_4, C3_4}, - {0, C1_5, C2_5, C3_5}, - {0, C1_6, C2_6, C3_6}, - {0, C1_7, C2_7, C3_7}, - {0, C1_8, C2_8, C3_8}, +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { + /* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + // left CA + {0, C1_1, C3_2, C4_2}, + {0, C1_2, C2_2, C4_3}, + {0, C1_3, C2_3, C3_3}, + {0, C1_4, C2_4, C3_4}, + {0, C1_5, C2_5, C3_5}, + {0, C1_6, C2_6, C3_6}, + {0, C1_7, C2_7, C3_7}, + {0, C1_8, C2_8, C3_8}, - {0, C9_1, C8_1, C7_1}, - {0, C9_2, C8_2, C7_2}, - {0, C9_3, C8_3, C7_3}, - {0, C9_4, C8_4, C7_4}, - {0, C9_5, C8_5, C7_5}, - {0, C9_6, C8_6, C7_6}, - {0, C9_7, C8_7, C6_6}, - {0, C9_8, C7_7, C6_7}, -// left CB - {0, C1_9, C3_10, C4_10}, - {0, C1_10, C2_10, C4_11}, - {0, C1_11, C2_11, C3_11}, - {0, C1_12, C2_12, C3_12}, - {0, C1_13, C2_13, C3_13}, - {0, C1_14, C2_14, C3_14}, - {0, C1_15, C2_15, C3_15}, - {0, C1_16, C2_16, C3_16}, + {0, C9_1, C8_1, C7_1}, + {0, C9_2, C8_2, C7_2}, + {0, C9_3, C8_3, C7_3}, + {0, C9_4, C8_4, C7_4}, + {0, C9_5, C8_5, C7_5}, + {0, C9_6, C8_6, C7_6}, + {0, C9_7, C8_7, C6_6}, + {0, C9_8, C7_7, C6_7}, + // left CB + {0, C1_9, C3_10, C4_10}, + {0, C1_10, C2_10, C4_11}, + {0, C1_11, C2_11, C3_11}, + {0, C1_12, C2_12, C3_12}, + {0, C1_13, C2_13, C3_13}, + {0, C1_14, C2_14, C3_14}, + {0, C1_15, C2_15, C3_15}, + {0, C1_16, C2_16, C3_16}, - {0, C9_9, C8_9, C7_9}, - {0, C9_10, C8_10, C7_10}, - {0, C9_11, C8_11, C7_11}, - {0, C9_12, C8_12, C7_12}, - {0, C9_13, C8_13, C7_13}, - {0, C9_14, C8_14, C7_14}, - {0, C9_15, C8_15, C6_14}, - {0, C9_16, C7_15, C6_15}, + {0, C9_9, C8_9, C7_9}, + {0, C9_10, C8_10, C7_10}, + {0, C9_11, C8_11, C7_11}, + {0, C9_12, C8_12, C7_12}, + {0, C9_13, C8_13, C7_13}, + {0, C9_14, C8_14, C7_14}, + {0, C9_15, C8_15, C6_14}, + {0, C9_16, C7_15, C6_15}, }; #endif __attribute__((weak)) @@ -240,7 +240,7 @@ void matrix_init_kb(void) // clear caps led setPinOutput(CAPS_PIN); writePinLow(CAPS_PIN); -#ifdef RGBLIGHT_ENABLE +#ifdef RGBLIGHT_ENABLE i2c_init(); IS31FL3731_init(DRIVER_ADDR_1); for (int index = 0; index < DRIVER_LED_TOTAL; index++) { @@ -252,7 +252,7 @@ void matrix_init_kb(void) matrix_init_user(); } -#ifdef RGBLIGHT_ENABLE +#ifdef RGBLIGHT_ENABLE void housekeeping_task_kb(void) { if (rgb_state.state == SELF_TESTING) { @@ -261,7 +261,7 @@ void housekeeping_task_kb(void) //gold 0xFF, 0xD9, 0x00 LED_TYPE led = { .r = 0xFF, - .g = 0xD9, + .g = 0xD9, .b = 0x00, }; if (rgb_state.alert) { @@ -303,7 +303,7 @@ bool led_update_kb(led_t led_state) if (res) { writePin(CAPS_PIN, led_state.caps_lock); -#ifdef RGBLIGHT_ENABLE +#ifdef RGBLIGHT_ENABLE if (rgb_state.state != SELF_TESTING) { if (led_state.caps_lock) { rgb_state.state = CAPS_ALERT; @@ -316,4 +316,4 @@ bool led_update_kb(led_t led_state) #endif } return res; -} \ No newline at end of file +} diff --git a/keyboards/neson_design/n6/rules.mk b/keyboards/neson_design/n6/rules.mk index a12a4034b..f551ee91d 100644 --- a/keyboards/neson_design/n6/rules.mk +++ b/keyboards/neson_design/n6/rules.mk @@ -19,5 +19,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -QUANTUM_LIB_SRC += i2c_master.c issi/is31fl3731.c +QUANTUM_LIB_SRC += i2c_master.c drivers/led/issi/is31fl3731.c LAYOUTS = 65_ansi_blocker diff --git a/keyboards/newgame40/rules.mk b/keyboards/newgame40/rules.mk index 148981354..ca508d7b5 100644 --- a/keyboards/newgame40/rules.mk +++ b/keyboards/newgame40/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/nibiria/stream15/rules.mk b/keyboards/nibiria/stream15/rules.mk index fde060ddb..1604d8774 100644 --- a/keyboards/nibiria/stream15/rules.mk +++ b/keyboards/nibiria/stream15/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightingale_studios/hailey/rules.mk b/keyboards/nightingale_studios/hailey/rules.mk index 614fcdedb..76bfaf9a4 100644 --- a/keyboards/nightingale_studios/hailey/rules.mk +++ b/keyboards/nightingale_studios/hailey/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/adellein/rules.mk b/keyboards/nightly_boards/adellein/rules.mk index f78597b91..6cf5b1a65 100644 --- a/keyboards/nightly_boards/adellein/rules.mk +++ b/keyboards/nightly_boards/adellein/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/alter/rev1/rules.mk b/keyboards/nightly_boards/alter/rev1/rules.mk index 740bd3b43..12710094c 100644 --- a/keyboards/nightly_boards/alter/rev1/rules.mk +++ b/keyboards/nightly_boards/alter/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output diff --git a/keyboards/nightly_boards/n2/rules.mk b/keyboards/nightly_boards/n2/rules.mk index 62427c917..9ccc0786e 100644 --- a/keyboards/nightly_boards/n2/rules.mk +++ b/keyboards/nightly_boards/n2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/n40_o/rules.mk b/keyboards/nightly_boards/n40_o/rules.mk index 0eeb14fdc..43aca81b7 100644 --- a/keyboards/nightly_boards/n40_o/rules.mk +++ b/keyboards/nightly_boards/n40_o/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/n60_s/rules.mk b/keyboards/nightly_boards/n60_s/rules.mk index 54867942b..02aee5efd 100644 --- a/keyboards/nightly_boards/n60_s/rules.mk +++ b/keyboards/nightly_boards/n60_s/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/n87/config.h b/keyboards/nightly_boards/n87/config.h index 0315119d8..7d81bf7fd 100644 --- a/keyboards/nightly_boards/n87/config.h +++ b/keyboards/nightly_boards/n87/config.h @@ -200,26 +200,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/nightly_boards/n87/rules.mk b/keyboards/nightly_boards/n87/rules.mk index b90ef02f3..18041a47f 100644 --- a/keyboards/nightly_boards/n87/rules.mk +++ b/keyboards/nightly_boards/n87/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/octopad/rules.mk b/keyboards/nightly_boards/octopad/rules.mk index 9ac5c6d72..c8ff31428 100644 --- a/keyboards/nightly_boards/octopad/rules.mk +++ b/keyboards/nightly_boards/octopad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/ph_arisu/rules.mk b/keyboards/nightly_boards/ph_arisu/rules.mk index bde08efba..f0e9a7a83 100644 --- a/keyboards/nightly_boards/ph_arisu/rules.mk +++ b/keyboards/nightly_boards/ph_arisu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightmare/config.h b/keyboards/nightmare/config.h index f001d6221..3282c8ae2 100644 --- a/keyboards/nightmare/config.h +++ b/keyboards/nightmare/config.h @@ -192,26 +192,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 1 diff --git a/keyboards/nightmare/rules.mk b/keyboards/nightmare/rules.mk index 2b32bbee9..e28da405c 100644 --- a/keyboards/nightmare/rules.mk +++ b/keyboards/nightmare/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/nimrod/rules.mk b/keyboards/nimrod/rules.mk index 05eec6a66..d3179f3d8 100644 --- a/keyboards/nimrod/rules.mk +++ b/keyboards/nimrod/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/niu_mini/keymaps/tucznak/rules.mk b/keyboards/niu_mini/keymaps/tucznak/rules.mk index bf5a36886..422c96962 100644 --- a/keyboards/niu_mini/keymaps/tucznak/rules.mk +++ b/keyboards/niu_mini/keymaps/tucznak/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/niu_mini/rules.mk b/keyboards/niu_mini/rules.mk index 1059ed2f7..7b324cf1f 100644 --- a/keyboards/niu_mini/rules.mk +++ b/keyboards/niu_mini/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/nix_studio/oxalys80/rules.mk b/keyboards/nix_studio/oxalys80/rules.mk index 714ba6d38..245bade8f 100644 --- a/keyboards/nix_studio/oxalys80/rules.mk +++ b/keyboards/nix_studio/oxalys80/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nk1/rules.mk b/keyboards/nk1/rules.mk index 8dd72e9a6..4ef40d157 100644 --- a/keyboards/nk1/rules.mk +++ b/keyboards/nk1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nk65/config.h b/keyboards/nk65/config.h index fa14e9ffb..a178307cc 100755 --- a/keyboards/nk65/config.h +++ b/keyboards/nk65/config.h @@ -148,6 +148,9 @@ along with this program. If not, see . * both 128kb and 256kb versions of F303. * Register 0x1FFFF7CC holds the size of the flash memory. */ +#ifndef FLASHSIZE_BASE +# define FLASHSIZE_BASE ((uint32_t)0x1FFFF7CCU) /*!< FLASH Size register base address */ +#endif #define EEPROM_START_ADDRESS #define FEE_MCU_FLASH_SIZE \ ({ \ diff --git a/keyboards/nk65/nk65.c b/keyboards/nk65/nk65.c index fae30ac75..4ed18c114 100755 --- a/keyboards/nk65/nk65.c +++ b/keyboards/nk65/nk65.c @@ -18,7 +18,7 @@ #endif #include "nk65.h" -#include "drivers/issi/is31fl3733.h" +#include "drivers/led/issi/is31fl3733.h" /* Indicator LEDS are part of the LED driver * Top LED is blue only. LED driver 2 RGB 7 Green channel diff --git a/keyboards/nk65/rules.mk b/keyboards/nk65/rules.mk index e3f02ee09..07332019f 100755 --- a/keyboards/nk65/rules.mk +++ b/keyboards/nk65/rules.mk @@ -14,7 +14,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -31,6 +31,6 @@ LAYOUTS = 65_ansi # project specific files SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ - drivers/issi/is31fl3733.c \ + drivers/led/issi/is31fl3733.c \ quantum/color.c \ - drivers/chibios/i2c_master.c + i2c_master.c diff --git a/keyboards/nk87/nk87.c b/keyboards/nk87/nk87.c index bcebbc651..c90ba02ea 100755 --- a/keyboards/nk87/nk87.c +++ b/keyboards/nk87/nk87.c @@ -18,7 +18,7 @@ #endif #include "nk87.h" -#include "drivers/issi/is31fl3733.h" +#include "drivers/led/issi/is31fl3733.h" /* Indicator LEDS are part of the LED driver * Top LED is blue only. LED driver 2 RGB 63 Blue channel diff --git a/keyboards/nk87/rules.mk b/keyboards/nk87/rules.mk index 71f8f3dd8..5be7839d7 100755 --- a/keyboards/nk87/rules.mk +++ b/keyboards/nk87/rules.mk @@ -13,7 +13,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -32,6 +32,6 @@ CIE1931_CURVE = yes # project specific files SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ - drivers/issi/is31fl3733.c \ + drivers/led/issi/is31fl3733.c \ quantum/color.c \ - drivers/chibios/i2c_master.c + i2c_master.c diff --git a/keyboards/nknl7en/keymaps/salicylic/keymap.c b/keyboards/nknl7en/keymaps/salicylic/keymap.c index aff4b6e36..e7de4e50f 100644 --- a/keyboards/nknl7en/keymaps/salicylic/keymap.c +++ b/keyboards/nknl7en/keymaps/salicylic/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| JP_DQUO, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, LALT(KC_PSCR), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______, + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/nknl7en/rules.mk b/keyboards/nknl7en/rules.mk index abffa14b3..9aaba6721 100644 --- a/keyboards/nknl7en/rules.mk +++ b/keyboards/nknl7en/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nknl7jp/keymaps/salicylic/keymap.c b/keyboards/nknl7jp/keymaps/salicylic/keymap.c index 2eaf18566..65f95f017 100644 --- a/keyboards/nknl7jp/keymaps/salicylic/keymap.c +++ b/keyboards/nknl7jp/keymaps/salicylic/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| JP_DQUO, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, LALT(KC_PSCR), //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| - JP_QUOT, JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______, + JP_QUOT, JP_HASH, JP_DQUO, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| JP_CIRC, JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, _______, _______, //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------| diff --git a/keyboards/nknl7jp/rules.mk b/keyboards/nknl7jp/rules.mk index abffa14b3..9aaba6721 100644 --- a/keyboards/nknl7jp/rules.mk +++ b/keyboards/nknl7jp/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nomu30/rev1/rules.mk b/keyboards/nomu30/rev1/rules.mk index 75a36e686..7f143c799 100644 --- a/keyboards/nomu30/rev1/rules.mk +++ b/keyboards/nomu30/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output diff --git a/keyboards/nomu30/rev2/rules.mk b/keyboards/nomu30/rev2/rules.mk index 6d5fa0b07..769316003 100644 --- a/keyboards/nomu30/rev2/rules.mk +++ b/keyboards/nomu30/rev2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output diff --git a/keyboards/nopunin10did/jabberwocky/config.h b/keyboards/nopunin10did/jabberwocky/config.h index b49a98ba8..84c3cec45 100644 --- a/keyboards/nopunin10did/jabberwocky/config.h +++ b/keyboards/nopunin10did/jabberwocky/config.h @@ -22,7 +22,6 @@ #define VENDOR_ID 0x4E50 // "NP" #define PRODUCT_ID 0x4A57 // "JW" #define DEVICE_VER 0x0001 -#define MANUFACTURER NoPunIn10Did #define PRODUCT Jabberwocky /* key matrix size */ diff --git a/keyboards/nopunin10did/jabberwocky/rules.mk b/keyboards/nopunin10did/jabberwocky/rules.mk index 89f2be85b..f31a1e693 100644 --- a/keyboards/nopunin10did/jabberwocky/rules.mk +++ b/keyboards/nopunin10did/jabberwocky/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nopunin10did/railroad/rev0/rules.mk b/keyboards/nopunin10did/railroad/rev0/rules.mk index 54bb17ad2..efca6bac6 100644 --- a/keyboards/nopunin10did/railroad/rev0/rules.mk +++ b/keyboards/nopunin10did/railroad/rev0/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/novelpad/config.h b/keyboards/novelpad/config.h index fdee941f1..0b8edcf19 100755 --- a/keyboards/novelpad/config.h +++ b/keyboards/novelpad/config.h @@ -192,26 +192,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/novelpad/rules.mk b/keyboards/novelpad/rules.mk index ea58b3da0..b36150574 100755 --- a/keyboards/novelpad/rules.mk +++ b/keyboards/novelpad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/noxary/220/config.h b/keyboards/noxary/220/config.h index 78da8ccbc..d935d2fe4 100644 --- a/keyboards/noxary/220/config.h +++ b/keyboards/noxary/220/config.h @@ -165,26 +165,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/noxary/220/rules.mk b/keyboards/noxary/220/rules.mk index ec619bce8..d6cc49724 100644 --- a/keyboards/noxary/220/rules.mk +++ b/keyboards/noxary/220/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/noxary/260/config.h b/keyboards/noxary/260/config.h index b447dec69..e6d5e78b4 100644 --- a/keyboards/noxary/260/config.h +++ b/keyboards/noxary/260/config.h @@ -198,26 +198,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/noxary/260/rules.mk b/keyboards/noxary/260/rules.mk index eaf2419bb..7053225db 100644 --- a/keyboards/noxary/260/rules.mk +++ b/keyboards/noxary/260/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/noxary/268/rules.mk b/keyboards/noxary/268/rules.mk index 38d215225..fcd8c566c 100644 --- a/keyboards/noxary/268/rules.mk +++ b/keyboards/noxary/268/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/noxary/268_2/config.h b/keyboards/noxary/268_2/config.h index 960977fa0..d7baf3b6a 100644 --- a/keyboards/noxary/268_2/config.h +++ b/keyboards/noxary/268_2/config.h @@ -166,26 +166,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/noxary/268_2/rules.mk b/keyboards/noxary/268_2/rules.mk index 0d8d93022..ecd9c7d00 100644 --- a/keyboards/noxary/268_2/rules.mk +++ b/keyboards/noxary/268_2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/noxary/268_2_rgb/rules.mk b/keyboards/noxary/268_2_rgb/rules.mk index 62796a399..9559523bb 100644 --- a/keyboards/noxary/268_2_rgb/rules.mk +++ b/keyboards/noxary/268_2_rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/noxary/280/config.h b/keyboards/noxary/280/config.h index 53a6e5733..b1b123a63 100644 --- a/keyboards/noxary/280/config.h +++ b/keyboards/noxary/280/config.h @@ -165,26 +165,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/noxary/280/rules.mk b/keyboards/noxary/280/rules.mk index ae01db836..6b61a0d43 100644 --- a/keyboards/noxary/280/rules.mk +++ b/keyboards/noxary/280/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/noxary/378/rules.mk b/keyboards/noxary/378/rules.mk index d27facb7c..585bafe2d 100644 --- a/keyboards/noxary/378/rules.mk +++ b/keyboards/noxary/378/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/noxary/vulcan/rules.mk b/keyboards/noxary/vulcan/rules.mk index 5f1b6954e..30245dee7 100644 --- a/keyboards/noxary/vulcan/rules.mk +++ b/keyboards/noxary/vulcan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/noxary/x268/config.h b/keyboards/noxary/x268/config.h index 00a696fb7..a6da7ef83 100644 --- a/keyboards/noxary/x268/config.h +++ b/keyboards/noxary/x268/config.h @@ -168,26 +168,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/noxary/x268/rules.mk b/keyboards/noxary/x268/rules.mk index 39f832e2d..5b465241a 100644 --- a/keyboards/noxary/x268/rules.mk +++ b/keyboards/noxary/x268/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/np12/rules.mk b/keyboards/np12/rules.mk index 8b8bacdcf..48a615a2e 100644 --- a/keyboards/np12/rules.mk +++ b/keyboards/np12/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c index c9988848d..0e0a152ec 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/oled/keymap.c @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } static void render_logo(void) { diff --git a/keyboards/nullbitsco/nibble/keymaps/oled/rules.mk b/keyboards/nullbitsco/nibble/keymaps/oled/rules.mk index 48a51b225..d34d066de 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled/rules.mk +++ b/keyboards/nullbitsco/nibble/keymaps/oled/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes \ No newline at end of file +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/animation_frames.h b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/animation_frames.h index bef80febe..ac1e8dee3 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/animation_frames.h +++ b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/animation_frames.h @@ -14,7 +14,7 @@ * along with this program. If not, see . */ #pragma once -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE // Enable OLED bitmpa compression selectively. #define USE_OLED_BITMAP_COMPRESSION @@ -401,4 +401,4 @@ static const char PROGMEM tap_frames[NUM_TAP_FRAMES][NUM_OLED_BYTES] = { }, }; #endif //USE_BITMAP_COMPRESSION -#endif //OLED_DRIVER_ENABLE \ No newline at end of file +#endif //OLED_ENABLE diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c index d9365f54b..5c4e31ab6 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/keymap.c @@ -86,7 +86,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #define IDLE_FRAME_DURATION 200 // Idle animation iteration rate in ms oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } @@ -173,7 +173,7 @@ void oled_task_user(void) { // Animate tap bool process_record_user(uint16_t keycode, keyrecord_t *record) { - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE // Check if non-mod if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLASH)) { if (record->event.pressed) { @@ -192,7 +192,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case PROG: if (record->event.pressed) { rgblight_disable_noeeprom(); - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE oled_off(); #endif bootloader_jump(); diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/rules.mk b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/rules.mk index c7ffad546..db6a98385 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/rules.mk +++ b/keyboards/nullbitsco/nibble/keymaps/oled_bongocat/rules.mk @@ -1,3 +1,4 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 WPM_ENABLE = yes -VIA_ENABLE = yes \ No newline at end of file +VIA_ENABLE = yes diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/config.h b/keyboards/nullbitsco/nibble/keymaps/oled_status/config.h index bdb970ff5..603bde686 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled_status/config.h +++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/config.h @@ -16,6 +16,6 @@ #pragma once // Referenced custom font -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # define OLED_FONT_H "keyboards/nullbitsco/nibble/keymaps/oled_status/glcdfont.c" #endif diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c b/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c index b276a042b..161eeedc3 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/keymap.c @@ -15,19 +15,17 @@ */ #include QMK_KEYBOARD_H -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include "oled_display.h" #endif -enum layer_names { - _MA, - _FN -}; +enum layer_names { _MA, _FN }; enum custom_keycodes { KC_CUST = SAFE_RANGE, }; +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MA] = LAYOUT_ansi( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, @@ -44,8 +42,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; +// clang-format on -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { oled_timer = timer_read32(); set_oled_mode(OLED_MODE_IDLE); @@ -53,7 +52,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { } void oled_task_user(void) { - if (timer_elapsed(oled_timer) >= 3000) { + if (timer_elapsed(oled_timer) >= 3000) { set_oled_mode(OLED_MODE_IDLE); } render_frame(); @@ -64,32 +63,31 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Send keystrokes to host keyboard, if connected (see readme) process_record_remote_kb(keycode, record); - switch(keycode) { + switch (keycode) { case RGB_TOG: if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE process_record_keymap_oled(keycode); #endif } - break; - case KC_CUST: //custom macro + break; + case KC_CUST: // custom macro if (record->event.pressed) { } - break; + break; } return true; } - bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { tap_code(KC_VOLU); -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE process_record_encoder_oled(KC_VOLU); #endif } else { tap_code(KC_VOLD); -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE process_record_encoder_oled(KC_VOLD); #endif } diff --git a/keyboards/nullbitsco/nibble/keymaps/oled_status/rules.mk b/keyboards/nullbitsco/nibble/keymaps/oled_status/rules.mk index 51c47cff8..0e39ada47 100644 --- a/keyboards/nullbitsco/nibble/keymaps/oled_status/rules.mk +++ b/keyboards/nullbitsco/nibble/keymaps/oled_status/rules.mk @@ -1,7 +1,8 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 WPM_ENABLE = yes VIA_ENABLE = yes -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) SRC += oled_display.c endif diff --git a/keyboards/nullbitsco/nibble/rules.mk b/keyboards/nullbitsco/nibble/rules.mk index ab27b7527..233e75568 100644 --- a/keyboards/nullbitsco/nibble/rules.mk +++ b/keyboards/nullbitsco/nibble/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -16,7 +16,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 ENCODER_ENABLE = yes # Use rotary encoder diff --git a/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c b/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c index 2081872ac..41356631a 100644 --- a/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c +++ b/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM nullbits_logo[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/keyboards/nullbitsco/scramble/keymaps/oled/rules.mk b/keyboards/nullbitsco/scramble/keymaps/oled/rules.mk index c58266213..d34d066de 100644 --- a/keyboards/nullbitsco/scramble/keymaps/oled/rules.mk +++ b/keyboards/nullbitsco/scramble/keymaps/oled/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/nullbitsco/scramble/rules.mk b/keyboards/nullbitsco/scramble/rules.mk index 6fc0c4598..05840d9c0 100644 --- a/keyboards/nullbitsco/scramble/rules.mk +++ b/keyboards/nullbitsco/scramble/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/numatreus/keymaps/hdbx/keymap.c b/keyboards/numatreus/keymaps/hdbx/keymap.c index 98fe4d67d..44b3fffe2 100644 --- a/keyboards/numatreus/keymaps/hdbx/keymap.c +++ b/keyboards/numatreus/keymaps/hdbx/keymap.c @@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, KC_HOME, KC_APP, KC_INS, KC_CALC, KC_PSCR, JP_CIRC, JP_AMPR, JP_ASTR, JP_YEN, JP_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, JP_GRV, JP_LCBR, JP_RCBR, KC_LT, KC_GT, KC_END, KC_MUTE, JP_LPRN, JP_RPRN, KC_QUES, - KC_LALT, KC_LGUI, JP_GRV, KC_DEL, _______, KC_LCTL, WN_CAPS, _______, KC_RCTL, JP_UNDS, JP_DQT, KC_RSFT + KC_LALT, KC_LGUI, JP_GRV, KC_DEL, _______, KC_LCTL, WN_CAPS, _______, KC_RCTL, JP_UNDS, JP_DQUO, KC_RSFT ), /* GAME ゲームやテンキー固定で使用するレイヤーです。AdjustレイヤーでGを押下して遷移。戻るときはtoBaseから。 diff --git a/keyboards/numatreus/rules.mk b/keyboards/numatreus/rules.mk index f1efe4cc5..adfe4d977 100644 --- a/keyboards/numatreus/rules.mk +++ b/keyboards/numatreus/rules.mk @@ -14,14 +14,13 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work #BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -#MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = yes # Unicode #BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID #TAP_DANCE_ENABLE = yes diff --git a/keyboards/ocean/sus/rules.mk b/keyboards/ocean/sus/rules.mk index 68a44eb8b..77b4a112f 100644 --- a/keyboards/ocean/sus/rules.mk +++ b/keyboards/ocean/sus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/oddball/adns/adns.c b/keyboards/oddball/adns/adns.c deleted file mode 100644 index 9338808ff..000000000 --- a/keyboards/oddball/adns/adns.c +++ /dev/null @@ -1,219 +0,0 @@ -/* Copyright 2020 Alexander Tulloh - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "spi_master.h" -#include "quantum.h" -#include "adns9800_srom_A6.h" -#include "adns.h" - -// registers -#define REG_Product_ID 0x00 -#define REG_Revision_ID 0x01 -#define REG_Motion 0x02 -#define REG_Delta_X_L 0x03 -#define REG_Delta_X_H 0x04 -#define REG_Delta_Y_L 0x05 -#define REG_Delta_Y_H 0x06 -#define REG_SQUAL 0x07 -#define REG_Pixel_Sum 0x08 -#define REG_Maximum_Pixel 0x09 -#define REG_Minimum_Pixel 0x0a -#define REG_Shutter_Lower 0x0b -#define REG_Shutter_Upper 0x0c -#define REG_Frame_Period_Lower 0x0d -#define REG_Frame_Period_Upper 0x0e -#define REG_Configuration_I 0x0f -#define REG_Configuration_II 0x10 -#define REG_Frame_Capture 0x12 -#define REG_SROM_Enable 0x13 -#define REG_Run_Downshift 0x14 -#define REG_Rest1_Rate 0x15 -#define REG_Rest1_Downshift 0x16 -#define REG_Rest2_Rate 0x17 -#define REG_Rest2_Downshift 0x18 -#define REG_Rest3_Rate 0x19 -#define REG_Frame_Period_Max_Bound_Lower 0x1a -#define REG_Frame_Period_Max_Bound_Upper 0x1b -#define REG_Frame_Period_Min_Bound_Lower 0x1c -#define REG_Frame_Period_Min_Bound_Upper 0x1d -#define REG_Shutter_Max_Bound_Lower 0x1e -#define REG_Shutter_Max_Bound_Upper 0x1f -#define REG_LASER_CTRL0 0x20 -#define REG_Observation 0x24 -#define REG_Data_Out_Lower 0x25 -#define REG_Data_Out_Upper 0x26 -#define REG_SROM_ID 0x2a -#define REG_Lift_Detection_Thr 0x2e -#define REG_Configuration_V 0x2f -#define REG_Configuration_IV 0x39 -#define REG_Power_Up_Reset 0x3a -#define REG_Shutdown 0x3b -#define REG_Inverse_Product_ID 0x3f -#define REG_Motion_Burst 0x50 -#define REG_SROM_Load_Burst 0x62 -#define REG_Pixel_Burst 0x64 - -#define ADNS_CLOCK_SPEED 2000000 -#define MIN_CPI 200 -#define MAX_CPI 8200 -#define CPI_STEP 200 -#define CLAMP_CPI(value) value < MIN_CPI ? MIN_CPI : value > MAX_CPI ? MAX_CPI : value -#define SPI_MODE 3 -#define SPI_DIVISOR (F_CPU / ADNS_CLOCK_SPEED) -#define US_BETWEEN_WRITES 120 -#define US_BETWEEN_READS 20 -#define US_BEFORE_MOTION 100 -#define MSB1 0x80 - -extern const uint16_t adns_firmware_length; -extern const uint8_t adns_firmware_data[]; - -void adns_spi_start(void){ - spi_start(SPI_SS_PIN, false, SPI_MODE, SPI_DIVISOR); -} - -void adns_write(uint8_t reg_addr, uint8_t data){ - - adns_spi_start(); - spi_write(reg_addr | MSB1); - spi_write(data); - spi_stop(); - wait_us(US_BETWEEN_WRITES); -} - -uint8_t adns_read(uint8_t reg_addr){ - - adns_spi_start(); - spi_write(reg_addr & 0x7f ); - uint8_t data = spi_read(); - spi_stop(); - wait_us(US_BETWEEN_READS); - - return data; -} - -void adns_init() { - - setPinOutput(SPI_SS_PIN); - - spi_init(); - - // reboot - adns_write(REG_Power_Up_Reset, 0x5a); - wait_ms(50); - - // read registers and discard - adns_read(REG_Motion); - adns_read(REG_Delta_X_L); - adns_read(REG_Delta_X_H); - adns_read(REG_Delta_Y_L); - adns_read(REG_Delta_Y_H); - - // upload firmware - - // 3k firmware mode - adns_write(REG_Configuration_IV, 0x02); - - // enable initialisation - adns_write(REG_SROM_Enable, 0x1d); - - // wait a frame - wait_ms(10); - - // start SROM download - adns_write(REG_SROM_Enable, 0x18); - - // write the SROM file - - adns_spi_start(); - - spi_write(REG_SROM_Load_Burst | 0x80); - wait_us(15); - - // send all bytes of the firmware - unsigned char c; - for(int i = 0; i < adns_firmware_length; i++){ - c = (unsigned char)pgm_read_byte(adns_firmware_data + i); - spi_write(c); - wait_us(15); - } - - spi_stop(); - - wait_ms(10); - - // enable laser - uint8_t laser_ctrl0 = adns_read(REG_LASER_CTRL0); - adns_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0); -} - -config_adns_t adns_get_config(void) { - uint8_t config_1 = adns_read(REG_Configuration_I); - return (config_adns_t){ (config_1 & 0xFF) * CPI_STEP }; -} - -void adns_set_config(config_adns_t config) { - uint8_t config_1 = (CLAMP_CPI(config.cpi) / CPI_STEP) & 0xFF; - adns_write(REG_Configuration_I, config_1); -} - -static int16_t convertDeltaToInt(uint8_t high, uint8_t low){ - - // join bytes into twos compliment - uint16_t twos_comp = (high << 8) | low; - - // convert twos comp to int - if (twos_comp & 0x8000) - return -1 * (~twos_comp + 1); - - return twos_comp; -} - -report_adns_t adns_get_report(void) { - - report_adns_t report = {0, 0}; - - adns_spi_start(); - - // start burst mode - spi_write(REG_Motion_Burst & 0x7f); - - wait_us(US_BEFORE_MOTION); - - uint8_t motion = spi_read(); - - if(motion & 0x80) { - - // clear observation register - spi_read(); - - // delta registers - uint8_t delta_x_l = spi_read(); - uint8_t delta_x_h = spi_read(); - uint8_t delta_y_l = spi_read(); - uint8_t delta_y_h = spi_read(); - - report.x = convertDeltaToInt(delta_x_h, delta_x_l); - report.y = convertDeltaToInt(delta_y_h, delta_y_l); - } - - // clear residual motion - spi_write(REG_Motion & 0x7f); - - spi_stop(); - - return report; -} diff --git a/keyboards/oddball/config.h b/keyboards/oddball/config.h index 203b61c54..050084d2d 100644 --- a/keyboards/oddball/config.h +++ b/keyboards/oddball/config.h @@ -55,26 +55,6 @@ #define CPI_2 4000 #define CPI_3 8000 -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/oddball/optical_sensor/optical_sensor.h b/keyboards/oddball/optical_sensor/optical_sensor.h index a152d02cf..00955209e 100644 --- a/keyboards/oddball/optical_sensor/optical_sensor.h +++ b/keyboards/oddball/optical_sensor/optical_sensor.h @@ -17,7 +17,7 @@ /* common interface for opitcal sensors */ #if defined ADNS_9800 - #include "../adns/adns.h" + #include "drivers/sensors/adns9800.h" #define config_optical_sensor_t config_adns_t #define report_optical_sensor_t report_adns_t #define optical_sensor_init adns_init diff --git a/keyboards/oddball/rules.mk b/keyboards/oddball/rules.mk index e9e540c3c..d9ab4b130 100644 --- a/keyboards/oddball/rules.mk +++ b/keyboards/oddball/rules.mk @@ -4,7 +4,7 @@ MCU = atmega32u4 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -15,7 +15,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 @@ -25,5 +24,5 @@ POINTING_DEVICE_ENABLE = yes DEFAULT_FOLDER = oddball/v1 SRC += spi_master.c -SRC += adns/adns.c +SRC += drivers/sensors/adns9800.c SRC += pmw/pmw.c diff --git a/keyboards/oddforge/vea/rules.mk b/keyboards/oddforge/vea/rules.mk index fce46039f..6a675855d 100644 --- a/keyboards/oddforge/vea/rules.mk +++ b/keyboards/oddforge/vea/rules.mk @@ -3,7 +3,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # Build Options -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/odelia/rules.mk b/keyboards/odelia/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/odelia/rules.mk +++ b/keyboards/odelia/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ogre/ergo_single/rules.mk b/keyboards/ogre/ergo_single/rules.mk index 16b3398cd..b2cdf8f90 100644 --- a/keyboards/ogre/ergo_single/rules.mk +++ b/keyboards/ogre/ergo_single/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 SPLIT_KEYBOARD = no diff --git a/keyboards/ogre/ergo_split/rules.mk b/keyboards/ogre/ergo_split/rules.mk index be4d9b1ca..98202855f 100644 --- a/keyboards/ogre/ergo_split/rules.mk +++ b/keyboards/ogre/ergo_split/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 SPLIT_KEYBOARD = yes diff --git a/keyboards/ogurec/rules.mk b/keyboards/ogurec/rules.mk index 26b1d0da8..9b2fcfebf 100644 --- a/keyboards/ogurec/rules.mk +++ b/keyboards/ogurec/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ok60/rules.mk b/keyboards/ok60/rules.mk index f2801c945..203b66f74 100644 --- a/keyboards/ok60/rules.mk +++ b/keyboards/ok60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # CONSOLE_ENABLE = yes # Console for debug @@ -23,8 +23,8 @@ KEYBOARD_LOCK_ENABLE = yes # Allow locking of keyboard via magic key NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable the RGB backlight -# MIDI_ENABLE = YES # MIDI controls +MIDI_ENABLE = no # MIDI support # UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID -LAYOUTS = 60_ansi 60_ansi_split_bksp_rshift 60_iso 60_hhkb +LAYOUTS = 60_ansi 60_iso 60_hhkb diff --git a/keyboards/omnikey_bh/rules.mk b/keyboards/omnikey_bh/rules.mk index 1843f1ba6..760d60150 100644 --- a/keyboards/omnikey_bh/rules.mk +++ b/keyboards/omnikey_bh/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/omnikeyish/rules.mk b/keyboards/omnikeyish/rules.mk index 6318daef7..a49fac251 100644 --- a/keyboards/omnikeyish/rules.mk +++ b/keyboards/omnikeyish/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/opendeck/32/rev1/config.h b/keyboards/opendeck/32/rev1/config.h index 9f8ed7427..8b25ab256 100644 --- a/keyboards/opendeck/32/rev1/config.h +++ b/keyboards/opendeck/32/rev1/config.h @@ -38,7 +38,7 @@ #define DRIVER_COUNT 1 #define DRIVER_1_LED_TOTAL (4 * 8 * 3) #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL) -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_SPIRAL #define RGB_MATRIX_DISABLE_KEYCODES diff --git a/keyboards/opendeck/32/rev1/rev1.c b/keyboards/opendeck/32/rev1/rev1.c index 297af907e..91f59a60b 100644 --- a/keyboards/opendeck/32/rev1/rev1.c +++ b/keyboards/opendeck/32/rev1/rev1.c @@ -17,7 +17,7 @@ #include "rev1.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/opendeck/32/rev1/rules.mk b/keyboards/opendeck/32/rev1/rules.mk index 9abea17f2..3c8f37637 100644 --- a/keyboards/opendeck/32/rev1/rules.mk +++ b/keyboards/opendeck/32/rev1/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/opus/rules.mk b/keyboards/opus/rules.mk index ad6298c9f..0f0d6069d 100644 --- a/keyboards/opus/rules.mk +++ b/keyboards/opus/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/orange75/rules.mk b/keyboards/orange75/rules.mk index 08a8fc02e..f90236e18 100644 --- a/keyboards/orange75/rules.mk +++ b/keyboards/orange75/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/org60/rules.mk b/keyboards/org60/rules.mk index f115d70ba..3ffe42f61 100644 --- a/keyboards/org60/rules.mk +++ b/keyboards/org60/rules.mk @@ -15,11 +15,10 @@ BOOTLOADER = atmel-dfu AUDIO_ENABLE = no # Audio output on port C6 BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no # Console for debug EXTRAKEY_ENABLE = yes # Audio control and System control -MIDI_ENABLE = no # MIDI controls MOUSEKEY_ENABLE = yes # Mouse keys NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/ortho5by12/rules.mk b/keyboards/ortho5by12/rules.mk index 21f96ab34..602219654 100644 --- a/keyboards/ortho5by12/rules.mk +++ b/keyboards/ortho5by12/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/orthocode/rules.mk b/keyboards/orthocode/rules.mk index 2a8d321a5..f099d6f09 100644 --- a/keyboards/orthocode/rules.mk +++ b/keyboards/orthocode/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index 643a5b6b0..b7d83a5f2 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -19,59 +19,34 @@ LALT_T(KC_TAB), K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, RALT_T(K1B), \ KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF \ ) -#define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), - [_QWERTY] = LAYOUT_orthodox_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), - [_COLEMAK] = LAYOUT_orthodox_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), - [_DVORAK] = LAYOUT_orthodox_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), - - [_WORKMAN] = LAYOUT_orthodox_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_orthodox_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_orthodox_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_orthodox_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_orthodox_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), [_LOWER] = LAYOUT_wrapper(\ KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, diff --git a/keyboards/orthodox/keymaps/drashna/rules.mk b/keyboards/orthodox/keymaps/drashna/rules.mk index 0d28c44a7..6f72712d8 100644 --- a/keyboards/orthodox/keymaps/drashna/rules.mk +++ b/keyboards/orthodox/keymaps/drashna/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -10,7 +10,6 @@ NKRO_ENABLE = yes SPACE_CADET_ENABLE = no INDICATOR_LIGHTS = yes -RGBLIGHT_TWINKLE = no RGBLIGHT_STARTUP_ANIMATION = yes diff --git a/keyboards/orthodox/keymaps/rfvizarra/keymap.c b/keyboards/orthodox/keymaps/rfvizarra/keymap.c index 4de7e3950..d8c836dc1 100644 --- a/keyboards/orthodox/keymaps/rfvizarra/keymap.c +++ b/keyboards/orthodox/keymaps/rfvizarra/keymap.c @@ -102,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); state = update_tri_layer_state(state, _LOWER, _NAV, _NAV2); return state; diff --git a/keyboards/orthodox/rev3/config.h b/keyboards/orthodox/rev3/config.h index 3f7a17b6b..ae5128164 100644 --- a/keyboards/orthodox/rev3/config.h +++ b/keyboards/orthodox/rev3/config.h @@ -38,12 +38,12 @@ along with this program. If not, see . // wiring of each half //REV.3 PRO MICRO -#define MATRIX_ROW_PINS { D2, B4, B5, } +#define MATRIX_ROW_PINS { D2, B4, B5 } #define MATRIX_COL_PINS { D7, F4, F5, B6, B2, B3, B1, F7, F6 } /*/ //REV.3 TEENSY -#define MATRIX_ROW_PINS { B0, C6, C7, } +#define MATRIX_ROW_PINS { B0, C6, C7 } #define MATRIX_COL_PINS { D2, F5, F6, D6, D7, B4, B5, B6, F7 } /*/ diff --git a/keyboards/orthodox/rev3_teensy/config.h b/keyboards/orthodox/rev3_teensy/config.h index 37c8a7e73..a35c276d9 100644 --- a/keyboards/orthodox/rev3_teensy/config.h +++ b/keyboards/orthodox/rev3_teensy/config.h @@ -38,7 +38,7 @@ along with this program. If not, see . // wiring of each half //REV.3 TEENSY -#define MATRIX_ROW_PINS { B0, C6, C7, } +#define MATRIX_ROW_PINS { B0, C6, C7 } #define MATRIX_COL_PINS { D2, F5, F6, D6, D7, B4, B5, B6, F7 } /* COL2ROW or ROW2COL */ diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk index 384938ed0..f23197e5b 100644 --- a/keyboards/orthodox/rules.mk +++ b/keyboards/orthodox/rules.mk @@ -5,14 +5,13 @@ MCU = atmega32u4 # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/otaku_split/rev0/config.h b/keyboards/otaku_split/rev0/config.h index de1eb634e..00e003e3b 100644 --- a/keyboards/otaku_split/rev0/config.h +++ b/keyboards/otaku_split/rev0/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/otaku_split/rev0/rules.mk b/keyboards/otaku_split/rev0/rules.mk index 9cd4fea57..9b391f669 100644 --- a/keyboards/otaku_split/rev0/rules.mk +++ b/keyboards/otaku_split/rev0/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/otaku_split/rev1/config.h b/keyboards/otaku_split/rev1/config.h index c9b7ed4c4..ce9a78db7 100644 --- a/keyboards/otaku_split/rev1/config.h +++ b/keyboards/otaku_split/rev1/config.h @@ -198,26 +198,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/otaku_split/rev1/rules.mk b/keyboards/otaku_split/rev1/rules.mk index 9cd4fea57..9b391f669 100644 --- a/keyboards/otaku_split/rev1/rules.mk +++ b/keyboards/otaku_split/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/owlab/voice65/hotswap/config.h b/keyboards/owlab/voice65/hotswap/config.h index 4b6e8d8b8..18187249f 100644 --- a/keyboards/owlab/voice65/hotswap/config.h +++ b/keyboards/owlab/voice65/hotswap/config.h @@ -70,17 +70,17 @@ along with this program. If not, see . # define USE_I2CV2 # define RGB_MATRIX_DISABLE_KEYCODES # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES -# define RGB_MATRIX_LED_PROCESS_LIMIT 4 -# define RGB_MATRIX_LED_FLUSH_LIMIT 26 -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -# define RGB_MATRIX_STARTUP_VAL 128 -# define DRIVER_ADDR_1 0b0110000 -# define DRIVER_ADDR_2 0b0110000 -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 67 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define RGB_MATRIX_LED_PROCESS_LIMIT 4 +# define RGB_MATRIX_LED_FLUSH_LIMIT 26 +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +# define RGB_MATRIX_STARTUP_VAL 128 +# define DRIVER_ADDR_1 0b0110000 +# define DRIVER_ADDR_2 0b0110000 +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 67 +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL #endif /* Encoder */ diff --git a/keyboards/owlab/voice65/soldered/config.h b/keyboards/owlab/voice65/soldered/config.h index bb7ec6102..78cbb4d42 100644 --- a/keyboards/owlab/voice65/soldered/config.h +++ b/keyboards/owlab/voice65/soldered/config.h @@ -69,17 +69,17 @@ along with this program. If not, see . # define USE_I2CV2 # define RGB_MATRIX_DISABLE_KEYCODES # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES -# define RGB_MATRIX_LED_PROCESS_LIMIT 4 -# define RGB_MATRIX_LED_FLUSH_LIMIT 26 -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -# define RGB_MATRIX_STARTUP_VAL 128 -# define DRIVER_ADDR_1 0b0110000 -# define DRIVER_ADDR_2 0b0110000 -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 71 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define RGB_MATRIX_LED_PROCESS_LIMIT 4 +# define RGB_MATRIX_LED_FLUSH_LIMIT 26 +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +# define RGB_MATRIX_STARTUP_VAL 128 +# define DRIVER_ADDR_1 0b0110000 +# define DRIVER_ADDR_2 0b0110000 +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 71 +# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL #endif /* Encoder */ diff --git a/keyboards/pabile/p18/rules.mk b/keyboards/pabile/p18/rules.mk index 9f59811cc..e46c16a8d 100644 --- a/keyboards/pabile/p18/rules.mk +++ b/keyboards/pabile/p18/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode diff --git a/keyboards/pabile/p20/ver1/rules.mk b/keyboards/pabile/p20/ver1/rules.mk index d8e01b847..662832426 100644 --- a/keyboards/pabile/p20/ver1/rules.mk +++ b/keyboards/pabile/p20/ver1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pabile/p20/ver2/rules.mk b/keyboards/pabile/p20/ver2/rules.mk index da59201fc..ac3204160 100644 --- a/keyboards/pabile/p20/ver2/rules.mk +++ b/keyboards/pabile/p20/ver2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pabile/p40/rules.mk b/keyboards/pabile/p40/rules.mk index 016fe0172..07098307c 100644 --- a/keyboards/pabile/p40/rules.mk +++ b/keyboards/pabile/p40/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI controls BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode diff --git a/keyboards/pabile/p40_ortho/rules.mk b/keyboards/pabile/p40_ortho/rules.mk index ba0ad23c8..2c3246b0d 100644 --- a/keyboards/pabile/p40_ortho/rules.mk +++ b/keyboards/pabile/p40_ortho/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pabile/p42/rules.mk b/keyboards/pabile/p42/rules.mk index ba0ad23c8..2c3246b0d 100644 --- a/keyboards/pabile/p42/rules.mk +++ b/keyboards/pabile/p42/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/paladin64/rules.mk b/keyboards/paladin64/rules.mk index a4fb2cf3a..6651a7918 100755 --- a/keyboards/paladin64/rules.mk +++ b/keyboards/paladin64/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/palette1202/config.h b/keyboards/palette1202/config.h index 411e5f916..e0be3bd6c 100644 --- a/keyboards/palette1202/config.h +++ b/keyboards/palette1202/config.h @@ -48,7 +48,7 @@ along with this program. If not, see . #define DEBOUNCE 5 /* Register custom font file */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #define OLED_FONT_H "lib/glcdfont.c" #endif diff --git a/keyboards/palette1202/keymaps/default/keymap.c b/keyboards/palette1202/keymaps/default/keymap.c index b55b39a40..fb28dedbe 100644 --- a/keyboards/palette1202/keymaps/default/keymap.c +++ b/keyboards/palette1202/keymaps/default/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ #include QMK_KEYBOARD_H -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include #include "lib/oled_helper.h" #endif @@ -273,7 +273,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } // OLED Display -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { // get layer Number uint8_t currentDefault = get_highest_layer(default_layer_state); @@ -327,4 +327,4 @@ void oled_task_user(void) { render_row(3, " "); } } -#endif // #ifdef OLED_DRIVER_ENABLE +#endif // #ifdef OLED_ENABLE diff --git a/keyboards/palette1202/keymaps/key-check/keymap.c b/keyboards/palette1202/keymaps/key-check/keymap.c index 207cf1c2b..6291b5f8a 100644 --- a/keyboards/palette1202/keymaps/key-check/keymap.c +++ b/keyboards/palette1202/keymaps/key-check/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ #include QMK_KEYBOARD_H -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include #include "lib/oled_helper.h" #endif @@ -141,11 +141,11 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } // OLED Display -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { render_row(0, "TEST"); render_row(1, "test"); render_row(2, "TEST"); render_row(3, "test"); } -#endif // #ifdef OLED_DRIVER_ENABLE +#endif // #ifdef OLED_ENABLE diff --git a/keyboards/palette1202/lib/oled_helper.c b/keyboards/palette1202/lib/oled_helper.c index d4a0b2eb5..5fb3cc753 100644 --- a/keyboards/palette1202/lib/oled_helper.c +++ b/keyboards/palette1202/lib/oled_helper.c @@ -1,4 +1,4 @@ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include QMK_KEYBOARD_H #include #include diff --git a/keyboards/palette1202/lib/oled_helper.h b/keyboards/palette1202/lib/oled_helper.h index 0d1dde461..c844264c3 100644 --- a/keyboards/palette1202/lib/oled_helper.h +++ b/keyboards/palette1202/lib/oled_helper.h @@ -1,7 +1,7 @@ #pragma once -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_row(int row, const char* status); -#endif /* #ifdef OLED_DRIVER_ENABLE */ - +#endif /* #ifdef OLED_ENABLE */ + diff --git a/keyboards/palette1202/palette1202.c b/keyboards/palette1202/palette1202.c index 74ce08319..be7fd6443 100644 --- a/keyboards/palette1202/palette1202.c +++ b/keyboards/palette1202/palette1202.c @@ -16,9 +16,8 @@ #include "palette1202.h" // initialize OLED if OLED is enabled -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } #endif - \ No newline at end of file diff --git a/keyboards/palette1202/rules.mk b/keyboards/palette1202/rules.mk index 70a2f80a5..ddf248a07 100644 --- a/keyboards/palette1202/rules.mk +++ b/keyboards/palette1202/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,11 +25,11 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 ENCODER_ENABLE = yes # Enable support for rotary encoders -OLED_DRIVER_ENABLE = yes # Enable support for OLED display +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable support for OLED display # Additional code SRC += lib/oled_helper.c # Adding OLED diff --git a/keyboards/panc40/rules.mk b/keyboards/panc40/rules.mk index 3819d1404..925c7bfdc 100644 --- a/keyboards/panc40/rules.mk +++ b/keyboards/panc40/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/panc60/rules.mk b/keyboards/panc60/rules.mk index 1c4d83205..589008cbc 100644 --- a/keyboards/panc60/rules.mk +++ b/keyboards/panc60/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/pandora/keymaps/default/keymap.c b/keyboards/pandora/keymaps/default/keymap.c index eea641d19..1878f078c 100644 --- a/keyboards/pandora/keymaps/default/keymap.c +++ b/keyboards/pandora/keymaps/default/keymap.c @@ -30,7 +30,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } // Encoder click function -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { /* First encoder */ case 0: @@ -39,4 +39,5 @@ void dip_switch_update_user(uint8_t index, bool active) { } break; } + return true; } diff --git a/keyboards/pandora/keymaps/via/keymap.c b/keyboards/pandora/keymaps/via/keymap.c index ae97463f6..eb2007447 100644 --- a/keyboards/pandora/keymaps/via/keymap.c +++ b/keyboards/pandora/keymaps/via/keymap.c @@ -45,7 +45,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } // Encoder click function -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { /* First encoder */ case 0: @@ -54,4 +54,5 @@ void dip_switch_update_user(uint8_t index, bool active) { } break; } + return true; } diff --git a/keyboards/pandora/rules.mk b/keyboards/pandora/rules.mk index 3d5f2f0bd..f61d5b895 100644 --- a/keyboards/pandora/rules.mk +++ b/keyboards/pandora/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,4 +22,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output DIP_SWITCH_ENABLE = yes ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = no # Future release +OLED_ENABLE = no # Future release diff --git a/keyboards/pdxkbc/config.h b/keyboards/pdxkbc/config.h index 414c1024a..2748b6309 100644 --- a/keyboards/pdxkbc/config.h +++ b/keyboards/pdxkbc/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/pdxkbc/rules.mk b/keyboards/pdxkbc/rules.mk index f1d011ad6..6e747adc4 100644 --- a/keyboards/pdxkbc/rules.mk +++ b/keyboards/pdxkbc/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/pearl/keymaps/cijanzen/rules.mk b/keyboards/pearl/keymaps/cijanzen/rules.mk index 90be4603a..887173920 100644 --- a/keyboards/pearl/keymaps/cijanzen/rules.mk +++ b/keyboards/pearl/keymaps/cijanzen/rules.mk @@ -1,5 +1,5 @@ # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/pearl/rules.mk b/keyboards/pearl/rules.mk index 981f6b514..fe033da5e 100644 --- a/keyboards/pearl/rules.mk +++ b/keyboards/pearl/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/pearlboards/pandora/keymaps/default/keymap.c b/keyboards/pearlboards/pandora/keymaps/default/keymap.c index 1fd9fcfb4..879ea04a1 100644 --- a/keyboards/pearlboards/pandora/keymaps/default/keymap.c +++ b/keyboards/pearlboards/pandora/keymaps/default/keymap.c @@ -71,7 +71,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } // Encoder click function -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { /* First encoder */ case 0: @@ -80,4 +80,5 @@ void dip_switch_update_user(uint8_t index, bool active) { } break; } + return true; } diff --git a/keyboards/pearlboards/pandora/keymaps/via/keymap.c b/keyboards/pearlboards/pandora/keymaps/via/keymap.c index 01f9ef8f4..55bbff967 100644 --- a/keyboards/pearlboards/pandora/keymaps/via/keymap.c +++ b/keyboards/pearlboards/pandora/keymaps/via/keymap.c @@ -85,7 +85,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } // Encoder click function -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { /* First encoder */ case 0: @@ -94,4 +94,5 @@ void dip_switch_update_user(uint8_t index, bool active) { } break; } + return true; } diff --git a/keyboards/pearlboards/pandora/rules.mk b/keyboards/pearlboards/pandora/rules.mk index d33287b24..f76831d43 100644 --- a/keyboards/pearlboards/pandora/rules.mk +++ b/keyboards/pearlboards/pandora/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,5 +22,5 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output DIP_SWITCH_ENABLE = yes ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = no # Future release +OLED_ENABLE = no # Future release LTO_ENABLE = yes diff --git a/keyboards/peej/lumberjack/rules.mk b/keyboards/peej/lumberjack/rules.mk index 410124b84..6e50d7ac0 100644 --- a/keyboards/peej/lumberjack/rules.mk +++ b/keyboards/peej/lumberjack/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/peiorisboards/ixora/readme.md b/keyboards/peiorisboards/ixora/readme.md deleted file mode 100644 index 1a011ba9a..000000000 --- a/keyboards/peiorisboards/ixora/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -Ixora -========= - -[Ixora](https://i.imgur.com/GqDk3XY.png) - - -Ixora is an ARM-powered 6-key macropad with a USB connector, hotswap sockets, and indicator LEDs. - -Keyboard Maintainer: [Peioris](https://github.com/coarse) -Hardware Supported: Ixora PCB -Hardware Availability: [Peioris](https://github.com/coarse) - -Make example for this keyboard (after setting up your build environment): - - make peiorisboards/ixora:default:dfu-util - -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. - -#### Developer's Note - -STM32F042xx chips does not allow jumping to bootloader without BOOT0 being set to high, therefore it is impossible to enter the bootloader from sending a `RESET` keycode nor using bootmagic or bootmagic lite. -The only way to enter bootloader is to hold the BOOT0 button while the keyboard is powering up or after a power reset (done by pressing the reset switch or sending a `RESET` keycode). diff --git a/keyboards/peiorisboards/ixora/rules.mk b/keyboards/peiorisboards/ixora/rules.mk deleted file mode 100644 index 0bbdadfe6..000000000 --- a/keyboards/peiorisboards/ixora/rules.mk +++ /dev/null @@ -1,21 +0,0 @@ -# MCU name -MCU = STM32F042 - -# Bootloader selection -BOOTLOADER = stm32-dfu - -# Build Options -# comment out to disable the options. -# -BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover -NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in - - -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/peranekofactory/tone/rev1/rules.mk b/keyboards/peranekofactory/tone/rev1/rules.mk index 8b8bacdcf..48a615a2e 100644 --- a/keyboards/peranekofactory/tone/rev1/rules.mk +++ b/keyboards/peranekofactory/tone/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/peranekofactory/tone/rev2/rules.mk b/keyboards/peranekofactory/tone/rev2/rules.mk index 8b8bacdcf..48a615a2e 100644 --- a/keyboards/peranekofactory/tone/rev2/rules.mk +++ b/keyboards/peranekofactory/tone/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/percent/booster/rules.mk b/keyboards/percent/booster/rules.mk index fca9ff3cf..b08679411 100644 --- a/keyboards/percent/booster/rules.mk +++ b/keyboards/percent/booster/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/percent/canoe/rules.mk b/keyboards/percent/canoe/rules.mk index 628a5b88e..e96b97435 100644 --- a/keyboards/percent/canoe/rules.mk +++ b/keyboards/percent/canoe/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/percent/canoe_gen2/config.h b/keyboards/percent/canoe_gen2/config.h index bac5ebb3f..6409371d4 100644 --- a/keyboards/percent/canoe_gen2/config.h +++ b/keyboards/percent/canoe_gen2/config.h @@ -64,4 +64,4 @@ along with this program. If not, see . #define RGB_MATRIX_STARTUP_SAT 255 #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS #define RGB_MATRIX_STARTUP_SPD 127 -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED diff --git a/keyboards/percent/canoe_gen2/keymaps/via/rules.mk b/keyboards/percent/canoe_gen2/keymaps/via/rules.mk index 1e5b99807..36b7ba9cb 100644 --- a/keyboards/percent/canoe_gen2/keymaps/via/rules.mk +++ b/keyboards/percent/canoe_gen2/keymaps/via/rules.mk @@ -1 +1,2 @@ VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/percent/canoe_gen2/rules.mk b/keyboards/percent/canoe_gen2/rules.mk index 6221fbcad..bd7ae80c0 100644 --- a/keyboards/percent/canoe_gen2/rules.mk +++ b/keyboards/percent/canoe_gen2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/percent/skog/rules.mk b/keyboards/percent/skog/rules.mk index fbfa30d0f..186e251b1 100644 --- a/keyboards/percent/skog/rules.mk +++ b/keyboards/percent/skog/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/percent/skog_lite/rules.mk b/keyboards/percent/skog_lite/rules.mk index 119fb7263..cfe784393 100644 --- a/keyboards/percent/skog_lite/rules.mk +++ b/keyboards/percent/skog_lite/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/phantom/rules.mk b/keyboards/phantom/rules.mk index 53d53e46c..3a587965d 100644 --- a/keyboards/phantom/rules.mk +++ b/keyboards/phantom/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/phase_studio/titan65/hotswap/config.h b/keyboards/phase_studio/titan65/hotswap/config.h index 9a9e74bf1..2b8320814 100644 --- a/keyboards/phase_studio/titan65/hotswap/config.h +++ b/keyboards/phase_studio/titan65/hotswap/config.h @@ -47,5 +47,5 @@ #define RGB_DI_PIN E6 #define DRIVER_LED_TOTAL 67 #define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 diff --git a/keyboards/phase_studio/titan65/hotswap/rules.mk b/keyboards/phase_studio/titan65/hotswap/rules.mk index 02f2c7d01..6e96cabed 100644 --- a/keyboards/phase_studio/titan65/hotswap/rules.mk +++ b/keyboards/phase_studio/titan65/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/phase_studio/titan65/soldered/rules.mk b/keyboards/phase_studio/titan65/soldered/rules.mk index 6bfb47d73..c7ccfe8ff 100644 --- a/keyboards/phase_studio/titan65/soldered/rules.mk +++ b/keyboards/phase_studio/titan65/soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/phoenix/rules.mk b/keyboards/phoenix/rules.mk index 7fa379f1a..530efb080 100644 --- a/keyboards/phoenix/rules.mk +++ b/keyboards/phoenix/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pico/rules.mk b/keyboards/pico/rules.mk index 0d41e8494..9f4f1a528 100644 --- a/keyboards/pico/rules.mk +++ b/keyboards/pico/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/picolab/frusta_fundamental/rules.mk b/keyboards/picolab/frusta_fundamental/rules.mk index d4bb32b6f..2d58f66a1 100644 --- a/keyboards/picolab/frusta_fundamental/rules.mk +++ b/keyboards/picolab/frusta_fundamental/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pimentoso/paddino02/rev1/rules.mk b/keyboards/pimentoso/paddino02/rev1/rules.mk index c000c9ee1..a9e3e7633 100644 --- a/keyboards/pimentoso/paddino02/rev1/rules.mk +++ b/keyboards/pimentoso/paddino02/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pimentoso/paddino02/rev2/left/rules.mk b/keyboards/pimentoso/paddino02/rev2/left/rules.mk index c000c9ee1..a9e3e7633 100755 --- a/keyboards/pimentoso/paddino02/rev2/left/rules.mk +++ b/keyboards/pimentoso/paddino02/rev2/left/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pimentoso/paddino02/rev2/right/rules.mk b/keyboards/pimentoso/paddino02/rev2/right/rules.mk index c000c9ee1..a9e3e7633 100755 --- a/keyboards/pimentoso/paddino02/rev2/right/rules.mk +++ b/keyboards/pimentoso/paddino02/rev2/right/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pinky/rules.mk b/keyboards/pinky/rules.mk index b1110356a..029ba16f0 100644 --- a/keyboards/pinky/rules.mk +++ b/keyboards/pinky/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pisces/rules.mk b/keyboards/pisces/rules.mk index 567b20b1c..271025ab0 100644 --- a/keyboards/pisces/rules.mk +++ b/keyboards/pisces/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pistachio/rev1/rules.mk b/keyboards/pistachio/rev1/rules.mk index 178866419..6d1839f39 100644 --- a/keyboards/pistachio/rev1/rules.mk +++ b/keyboards/pistachio/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pistachio/rev2/rules.mk b/keyboards/pistachio/rev2/rules.mk index 178866419..6d1839f39 100644 --- a/keyboards/pistachio/rev2/rules.mk +++ b/keyboards/pistachio/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pistachio_mp/rules.mk b/keyboards/pistachio_mp/rules.mk index 5c24e15fb..409fb7792 100644 --- a/keyboards/pistachio_mp/rules.mk +++ b/keyboards/pistachio_mp/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pistachio_pro/config.h b/keyboards/pistachio_pro/config.h index 6c95e0f80..c3cb58496 100644 --- a/keyboards/pistachio_pro/config.h +++ b/keyboards/pistachio_pro/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define MATRIX_COLS 18 #define MATRIX_ROW_PINS { D4, C6, D7, B3, B4, B5 } -#define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B6, D6, D5,} +#define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B6, D6 } #define UNUSED_PINS /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/pistachio_pro/rules.mk b/keyboards/pistachio_pro/rules.mk index 48e745a63..b27df64bd 100644 --- a/keyboards/pistachio_pro/rules.mk +++ b/keyboards/pistachio_pro/rules.mk @@ -20,9 +20,10 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes CUSTOM_MATRIX = lite SRC += matrix.c -SRC += ./lib/bme280.c \ No newline at end of file +SRC += ./lib/bme280.c diff --git a/keyboards/pizzakeyboards/pizza65/rules.mk b/keyboards/pizzakeyboards/pizza65/rules.mk index 6972c8176..01cc0911f 100644 --- a/keyboards/pizzakeyboards/pizza65/rules.mk +++ b/keyboards/pizzakeyboards/pizza65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pkb65/rules.mk b/keyboards/pkb65/rules.mk index 91f48bd44..efca6bac6 100644 --- a/keyboards/pkb65/rules.mk +++ b/keyboards/pkb65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h index 5a0d9697b..4d1f1e92f 100644 --- a/keyboards/planck/ez/config.h +++ b/keyboards/planck/ez/config.h @@ -109,26 +109,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - // #define WS2812_LED_N 2 // #define RGBLED_NUM WS2812_LED_N // #define WS2812_TIM_N 2 @@ -148,7 +128,7 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_LED_PROCESS_LIMIT 5 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c index 6b381ed4a..27cb2a1d1 100644 --- a/keyboards/planck/ez/ez.c +++ b/keyboards/planck/ez/ez.c @@ -21,7 +21,7 @@ keyboard_config_t keyboard_config; #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h index 0915ddbea..19cc26eea 100644 --- a/keyboards/planck/ez/ez.h +++ b/keyboards/planck/ez/ez.h @@ -41,17 +41,21 @@ } #define LAYOUT_ortho_4x12( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b \ -) \ -LAYOUT_planck_1x2uC( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ -) + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k3a, k3b, k36 }, \ + { k06, k07, k08, k09, k0a, k0b }, \ + { k16, k17, k18, k19, k1a, k1b }, \ + { k26, k27, k28, k29, k2a, k2b }, \ + { k37, k38, k39, k33, k34, k35 } \ +} #define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 diff --git a/keyboards/planck/ez/rules.mk b/keyboards/planck/ez/rules.mk index 8d221767e..df5c983c3 100644 --- a/keyboards/planck/ez/rules.mk +++ b/keyboards/planck/ez/rules.mk @@ -9,19 +9,17 @@ BOOTLOADER = stm32-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite 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 NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/ab/rules.mk b/keyboards/planck/keymaps/ab/rules.mk index c4dc26dc2..4c79e946e 100644 --- a/keyboards/planck/keymaps/ab/rules.mk +++ b/keyboards/planck/keymaps/ab/rules.mk @@ -42,7 +42,7 @@ # change to "no" to disable the options, or define them in the makefile.mk in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/abishalom/keymap.c b/keyboards/planck/keymaps/abishalom/keymap.c index bd53cfb7a..c88dced41 100644 --- a/keyboards/planck/keymaps/abishalom/keymap.c +++ b/keyboards/planck/keymaps/abishalom/keymap.c @@ -221,7 +221,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -254,7 +254,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -283,6 +283,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/adamtabrams/rules.mk b/keyboards/planck/keymaps/adamtabrams/rules.mk index 31da4ef08..bbf6cc119 100644 --- a/keyboards/planck/keymaps/adamtabrams/rules.mk +++ b/keyboards/planck/keymaps/adamtabrams/rules.mk @@ -6,7 +6,7 @@ EXTRAKEY_ENABLE = yes NKRO_ENABLE = yes RGBLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = no AUDIO_ENABLE = no ENCODER_ENABLE = no diff --git a/keyboards/planck/keymaps/alexey/rules.mk b/keyboards/planck/keymaps/alexey/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/alexey/rules.mk +++ b/keyboards/planck/keymaps/alexey/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/altgr/rules.mk b/keyboards/planck/keymaps/altgr/rules.mk index a72276629..ea9abc2a8 100644 --- a/keyboards/planck/keymaps/altgr/rules.mk +++ b/keyboards/planck/keymaps/altgr/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically -BOOTMAGIC_ENABLE = no # virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # mouse keys(+4700) EXTRAKEY_ENABLE = no # audio control and System control(+450) CONSOLE_ENABLE = no # console for debug(+400) diff --git a/keyboards/planck/keymaps/am/keymap.c b/keyboards/planck/keymaps/am/keymap.c index c1fa3925f..d521484a1 100644 --- a/keyboards/planck/keymaps/am/keymap.c +++ b/keyboards/planck/keymaps/am/keymap.c @@ -171,7 +171,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/planck/keymaps/andylikescandy/keymap.c b/keyboards/planck/keymaps/andylikescandy/keymap.c index 295616f01..e873130f4 100644 --- a/keyboards/planck/keymaps/andylikescandy/keymap.c +++ b/keyboards/planck/keymaps/andylikescandy/keymap.c @@ -133,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TILD, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC , KC_DEL , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE , _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, KC_ENT , - _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), /* Raise @@ -151,7 +151,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC , KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT , - _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END + _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), /* Plover layer (http://opensteno.org) @@ -216,7 +216,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/planck/keymaps/angerthosenear/rules.mk b/keyboards/planck/keymaps/angerthosenear/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/angerthosenear/rules.mk +++ b/keyboards/planck/keymaps/angerthosenear/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/atreus/keymap.c b/keyboards/planck/keymaps/atreus/keymap.c index c9a721a1f..f89b6fecd 100644 --- a/keyboards/planck/keymaps/atreus/keymap.c +++ b/keyboards/planck/keymaps/atreus/keymap.c @@ -144,7 +144,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -177,7 +177,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -206,6 +206,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/austin/rules.mk b/keyboards/planck/keymaps/austin/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/austin/rules.mk +++ b/keyboards/planck/keymaps/austin/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/basic/rules.mk b/keyboards/planck/keymaps/basic/rules.mk index a31025bc3..e3a405f49 100644 --- a/keyboards/planck/keymaps/basic/rules.mk +++ b/keyboards/planck/keymaps/basic/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index 18b71bfc4..22bd50b29 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { DE_SS, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_Q , // LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) , MO(1), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) , - KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT , + KC_LSFT, DE_F, DE_V, DE_UDIA, DE_ADIA, DE_ODIA, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT , KC_LCTL, KC_LGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL ), @@ -49,9 +49,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [1] = LAYOUT_planck_grid( - DE_RING, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_ACUT , - _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ , - _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ , + DE_DEG, DE_AT, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LABK, DE_RABK, DE_EQL, DE_AMPR, DE_ACUT , + _______, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QUES, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, _______ , + _______, DE_HASH, DE_TILD, DE_PIPE, DE_DLR, DE_EURO, DE_PLUS, DE_PERC, DE_DQUO, DE_QUOT, DE_SCLN, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -108,8 +108,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [4] = LAYOUT_planck_grid( XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX , - KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT , - _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ , + KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SUP3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT , + _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SUP2, KC_F1, KC_F2, KC_F3, KC_F10, _______ , _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ ), @@ -128,8 +128,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [5] = LAYOUT_planck_grid( XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX , - _______, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ , - _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ , + _______, DE_SUP3, KC_F4, KC_F5, KC_F6, KC_F11, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, _______ , + _______, DE_SUP2, KC_F1, KC_F2, KC_F3, KC_F10, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, _______ , _______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______ ) }; diff --git a/keyboards/planck/keymaps/bone2planck/rules.mk b/keyboards/planck/keymaps/bone2planck/rules.mk index fc0bbe9e7..628f1fb0a 100644 --- a/keyboards/planck/keymaps/bone2planck/rules.mk +++ b/keyboards/planck/keymaps/bone2planck/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/buffet/rules.mk b/keyboards/planck/keymaps/buffet/rules.mk index 7774d7665..7a98333c0 100644 --- a/keyboards/planck/keymaps/buffet/rules.mk +++ b/keyboards/planck/keymaps/buffet/rules.mk @@ -1,5 +1,5 @@ AUDIO_ENABLE = no -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite COMMAND_ENABLE = no MOUSEKEY_ENABLE = no diff --git a/keyboards/planck/keymaps/buhearns/rules.mk b/keyboards/planck/keymaps/buhearns/rules.mk index 5c11b51a2..13e6567c9 100644 --- a/keyboards/planck/keymaps/buhearns/rules.mk +++ b/keyboards/planck/keymaps/buhearns/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/cbbrowne/rules.mk b/keyboards/planck/keymaps/cbbrowne/rules.mk index 45d683739..13c2530dd 100644 --- a/keyboards/planck/keymaps/cbbrowne/rules.mk +++ b/keyboards/planck/keymaps/cbbrowne/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -14,7 +14,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Enable SYSEX API (+5390) # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/charlesrocket/keymap.c b/keyboards/planck/keymaps/charlesrocket/keymap.c index 47cb8865d..cec3f0186 100644 --- a/keyboards/planck/keymaps/charlesrocket/keymap.c +++ b/keyboards/planck/keymaps/charlesrocket/keymap.c @@ -12,8 +12,8 @@ #define KC_PC_CUT LCTL(KC_X) #define KC_PC_COPY LCTL(KC_C) #define KC_PC_PASTE LCTL(KC_V) -#define ES_LESS_MAC KC_GRAVE -#define ES_GRTR_MAC LSFT(KC_GRAVE) +#define ES_LABK_MAC KC_GRAVE +#define ES_RABK_MAC LSFT(KC_GRAVE) #define ES_BSLS_MAC ALGR(KC_6) #define NO_PIPE_ALT KC_GRAVE #define NO_BSLS_ALT KC_EQUAL @@ -139,7 +139,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { diff --git a/keyboards/planck/keymaps/charlie/rules.mk b/keyboards/planck/keymaps/charlie/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/charlie/rules.mk +++ b/keyboards/planck/keymaps/charlie/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/circuit/rules.mk b/keyboards/planck/keymaps/circuit/rules.mk index b527d8297..14247d1a5 100644 --- a/keyboards/planck/keymaps/circuit/rules.mk +++ b/keyboards/planck/keymaps/circuit/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the makefile.mk in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/copface/rules.mk b/keyboards/planck/keymaps/copface/rules.mk index aacc6c65a..e259574a4 100644 --- a/keyboards/planck/keymaps/copface/rules.mk +++ b/keyboards/planck/keymaps/copface/rules.mk @@ -1,6 +1,6 @@ SRC += muse.c -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no COMMAND_ENABLE = no diff --git a/keyboards/planck/keymaps/corvec/rules.mk b/keyboards/planck/keymaps/corvec/rules.mk index c17a31a23..4398ea545 100644 --- a/keyboards/planck/keymaps/corvec/rules.mk +++ b/keyboards/planck/keymaps/corvec/rules.mk @@ -1,5 +1,4 @@ AUTO_SHIFT_ENABLE = yes TAP_DANCE_ENABLE = yes -API_SYSEX_ENABLE = no CONSOLE_ENABLE = no EXTRAKEY_ENABLE = no diff --git a/keyboards/planck/keymaps/csc027/rules.mk b/keyboards/planck/keymaps/csc027/rules.mk index cf92d5674..d6b6894bf 100644 --- a/keyboards/planck/keymaps/csc027/rules.mk +++ b/keyboards/planck/keymaps/csc027/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = no CONSOLE_ENABLE = no EXTRAKEY_ENABLE = no diff --git a/keyboards/planck/keymaps/daniel/rules.mk b/keyboards/planck/keymaps/daniel/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/daniel/rules.mk +++ b/keyboards/planck/keymaps/daniel/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/danielhklein/rules.mk b/keyboards/planck/keymaps/danielhklein/rules.mk index 4660d443d..6b58d814d 100644 --- a/keyboards/planck/keymaps/danielhklein/rules.mk +++ b/keyboards/planck/keymaps/danielhklein/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/david/rules.mk b/keyboards/planck/keymaps/david/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/david/rules.mk +++ b/keyboards/planck/keymaps/david/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/dc/rules.mk b/keyboards/planck/keymaps/dc/rules.mk index 07da5f194..384f8e088 100644 --- a/keyboards/planck/keymaps/dc/rules.mk +++ b/keyboards/planck/keymaps/dc/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c b/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c index aec7bcdd7..c25df20a5 100644 --- a/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c +++ b/keyboards/planck/keymaps/dear_vehicle_owner/keymap.c @@ -263,7 +263,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -296,7 +296,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -325,6 +325,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index 304d320b6..9a6e1189b 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -256,7 +256,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -289,7 +289,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -318,6 +318,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/deft/keymap.c b/keyboards/planck/keymaps/deft/keymap.c index 25a0a9f44..d7d40f146 100644 --- a/keyboards/planck/keymaps/deft/keymap.c +++ b/keyboards/planck/keymaps/deft/keymap.c @@ -133,6 +133,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/planck/keymaps/dlaroe/rules.mk b/keyboards/planck/keymaps/dlaroe/rules.mk index 7ff90237a..7e80f0131 100644 --- a/keyboards/planck/keymaps/dlaroe/rules.mk +++ b/keyboards/planck/keymaps/dlaroe/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/dr_notsokind/rules.mk b/keyboards/planck/keymaps/dr_notsokind/rules.mk index 91156b6b4..311ee8ec1 100644 --- a/keyboards/planck/keymaps/dr_notsokind/rules.mk +++ b/keyboards/planck/keymaps/dr_notsokind/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the makefile.mk in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/dsanchezseco/keymap.c b/keyboards/planck/keymaps/dsanchezseco/keymap.c index 9da2dce16..901709429 100644 --- a/keyboards/planck/keymaps/dsanchezseco/keymap.c +++ b/keyboards/planck/keymaps/dsanchezseco/keymap.c @@ -50,6 +50,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // eeconfig_init(); //} -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/planck/keymaps/dvorak2space/rules.mk b/keyboards/planck/keymaps/dvorak2space/rules.mk index 59f9f1dff..df48d1a71 100644 --- a/keyboards/planck/keymaps/dvorak2space/rules.mk +++ b/keyboards/planck/keymaps/dvorak2space/rules.mk @@ -1,5 +1,5 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -11,7 +11,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no TAP_DANCE_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/planck/keymaps/dzobert/rules.mk b/keyboards/planck/keymaps/dzobert/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/dzobert/rules.mk +++ b/keyboards/planck/keymaps/dzobert/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/eshesh2/keymap.c b/keyboards/planck/keymaps/eshesh2/keymap.c index 59768e15a..c13af1d3f 100644 --- a/keyboards/planck/keymaps/eshesh2/keymap.c +++ b/keyboards/planck/keymaps/eshesh2/keymap.c @@ -187,7 +187,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { diff --git a/keyboards/planck/keymaps/espynn/rules.mk b/keyboards/planck/keymaps/espynn/rules.mk index c4dc26dc2..4c79e946e 100644 --- a/keyboards/planck/keymaps/espynn/rules.mk +++ b/keyboards/planck/keymaps/espynn/rules.mk @@ -42,7 +42,7 @@ # change to "no" to disable the options, or define them in the makefile.mk in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/experimental/rules.mk b/keyboards/planck/keymaps/experimental/rules.mk index e5db05543..0ede1a0c2 100644 --- a/keyboards/planck/keymaps/experimental/rules.mk +++ b/keyboards/planck/keymaps/experimental/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/fabian/keymap.c b/keyboards/planck/keymaps/fabian/keymap.c index 08ea09d8b..9969d4337 100644 --- a/keyboards/planck/keymaps/fabian/keymap.c +++ b/keyboards/planck/keymaps/fabian/keymap.c @@ -185,7 +185,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -265,7 +265,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -291,7 +291,7 @@ bool encoder_update(bool clockwise) { } } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { diff --git a/keyboards/planck/keymaps/gabriel/rules.mk b/keyboards/planck/keymaps/gabriel/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/gabriel/rules.mk +++ b/keyboards/planck/keymaps/gabriel/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/gitdrik/keymap.c b/keyboards/planck/keymaps/gitdrik/keymap.c index 9cc5f7517..58db07828 100644 --- a/keyboards/planck/keymaps/gitdrik/keymap.c +++ b/keyboards/planck/keymaps/gitdrik/keymap.c @@ -137,7 +137,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RIGHT)) { if (clockwise) { @@ -170,7 +170,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -199,6 +199,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/grant24/keymap.c b/keyboards/planck/keymaps/grant24/keymap.c index 7ed9a794e..a82403d19 100644 --- a/keyboards/planck/keymaps/grant24/keymap.c +++ b/keyboards/planck/keymaps/grant24/keymap.c @@ -279,7 +279,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -312,7 +312,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -341,6 +341,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/gunp/rules.mk b/keyboards/planck/keymaps/gunp/rules.mk index fa936c03d..40d3ef325 100644 --- a/keyboards/planck/keymaps/gunp/rules.mk +++ b/keyboards/planck/keymaps/gunp/rules.mk @@ -1,5 +1,5 @@ # Build Options -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/planck/keymaps/hiea/rules.mk b/keyboards/planck/keymaps/hiea/rules.mk index a72276629..ea9abc2a8 100644 --- a/keyboards/planck/keymaps/hiea/rules.mk +++ b/keyboards/planck/keymaps/hiea/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically -BOOTMAGIC_ENABLE = no # virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # mouse keys(+4700) EXTRAKEY_ENABLE = no # audio control and System control(+450) CONSOLE_ENABLE = no # console for debug(+400) diff --git a/keyboards/planck/keymaps/hieax/rules.mk b/keyboards/planck/keymaps/hieax/rules.mk index a72276629..ea9abc2a8 100644 --- a/keyboards/planck/keymaps/hieax/rules.mk +++ b/keyboards/planck/keymaps/hieax/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically -BOOTMAGIC_ENABLE = no # virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # mouse keys(+4700) EXTRAKEY_ENABLE = no # audio control and System control(+450) CONSOLE_ENABLE = no # console for debug(+400) diff --git a/keyboards/planck/keymaps/hvp/keymap.c b/keyboards/planck/keymaps/hvp/keymap.c index 1af3771ae..95d3646df 100644 --- a/keyboards/planck/keymaps/hvp/keymap.c +++ b/keyboards/planck/keymaps/hvp/keymap.c @@ -89,7 +89,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -122,7 +122,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -151,6 +151,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/impossible/rules.mk b/keyboards/planck/keymaps/impossible/rules.mk index 1e877943d..10de3bfc0 100644 --- a/keyboards/planck/keymaps/impossible/rules.mk +++ b/keyboards/planck/keymaps/impossible/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/ishtob/rules.mk b/keyboards/planck/keymaps/ishtob/rules.mk index c8ba0c919..da1cca0e8 100644 --- a/keyboards/planck/keymaps/ishtob/rules.mk +++ b/keyboards/planck/keymaps/ishtob/rules.mk @@ -2,7 +2,7 @@ # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/planck/keymaps/jacob/rules.mk b/keyboards/planck/keymaps/jacob/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/jacob/rules.mk +++ b/keyboards/planck/keymaps/jacob/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/jasperla/keymap.c b/keyboards/planck/keymaps/jasperla/keymap.c index b9eb72b07..f51af78b5 100644 --- a/keyboards/planck/keymaps/jasperla/keymap.c +++ b/keyboards/planck/keymaps/jasperla/keymap.c @@ -131,6 +131,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/planck/keymaps/jdelkins/keymap.c b/keyboards/planck/keymaps/jdelkins/keymap.c index 9ae05afa3..af438f704 100644 --- a/keyboards/planck/keymaps/jdelkins/keymap.c +++ b/keyboards/planck/keymaps/jdelkins/keymap.c @@ -338,7 +338,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -void encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -368,9 +368,10 @@ void encoder_update(bool clockwise) { #endif } } + return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -399,6 +400,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void keyboard_post_init_keymap(void) { diff --git a/keyboards/planck/keymaps/jeebak/rules.mk b/keyboards/planck/keymaps/jeebak/rules.mk index 1e877943d..10de3bfc0 100644 --- a/keyboards/planck/keymaps/jeebak/rules.mk +++ b/keyboards/planck/keymaps/jeebak/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/jetpacktuxedo/keymap.c b/keyboards/planck/keymaps/jetpacktuxedo/keymap.c index 3e195671a..2e7d8e876 100644 --- a/keyboards/planck/keymaps/jetpacktuxedo/keymap.c +++ b/keyboards/planck/keymaps/jetpacktuxedo/keymap.c @@ -137,7 +137,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -190,7 +190,7 @@ uint16_t muse_tempo = 20; extern float clicky_rand; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (is_clicky_on()) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -241,7 +241,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -273,6 +273,7 @@ void dip_update(uint8_t index, bool active) { clicky_off(); } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/jhenahan/rules.mk b/keyboards/planck/keymaps/jhenahan/rules.mk index f8d1f0d8f..23ce0b2fb 100644 --- a/keyboards/planck/keymaps/jhenahan/rules.mk +++ b/keyboards/planck/keymaps/jhenahan/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/joe/rules.mk b/keyboards/planck/keymaps/joe/rules.mk index 1e877943d..10de3bfc0 100644 --- a/keyboards/planck/keymaps/joe/rules.mk +++ b/keyboards/planck/keymaps/joe/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/johannes/rules.mk b/keyboards/planck/keymaps/johannes/rules.mk index a31025bc3..e3a405f49 100644 --- a/keyboards/planck/keymaps/johannes/rules.mk +++ b/keyboards/planck/keymaps/johannes/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/kanbara/rules.mk b/keyboards/planck/keymaps/kanbara/rules.mk index 4e1e30097..1286dbfa8 100644 --- a/keyboards/planck/keymaps/kanbara/rules.mk +++ b/keyboards/planck/keymaps/kanbara/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/planck/keymaps/kyle/rules.mk b/keyboards/planck/keymaps/kyle/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/kyle/rules.mk +++ b/keyboards/planck/keymaps/kyle/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/lae3/rules.mk b/keyboards/planck/keymaps/lae3/rules.mk index 4d91a120c..2e02b0dd7 100644 --- a/keyboards/planck/keymaps/lae3/rules.mk +++ b/keyboards/planck/keymaps/lae3/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/leo/rules.mk b/keyboards/planck/keymaps/leo/rules.mk index 1e877943d..10de3bfc0 100644 --- a/keyboards/planck/keymaps/leo/rules.mk +++ b/keyboards/planck/keymaps/leo/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/lja83/keymap.c b/keyboards/planck/keymaps/lja83/keymap.c index d42c5b645..82862a77e 100644 --- a/keyboards/planck/keymaps/lja83/keymap.c +++ b/keyboards/planck/keymaps/lja83/keymap.c @@ -266,7 +266,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update_user(uint16_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -299,7 +299,7 @@ bool encoder_update_user(uint16_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -328,6 +328,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/lucas/keymap.c b/keyboards/planck/keymaps/lucas/keymap.c index 26ca6a550..01a2af7b1 100644 --- a/keyboards/planck/keymaps/lucas/keymap.c +++ b/keyboards/planck/keymaps/lucas/keymap.c @@ -42,8 +42,8 @@ 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, DE_DOT, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DQOT, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), DE_MORE, DE_QST, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DQUO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(1), DE_RABK, DE_QUES, KC_TRNS, 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_planck_grid( /* Raise @@ -57,8 +57,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |LCTL |LGUI | Tab |LALT |Lower| Space | |Mute |Vol- |Vol+ | P/P | * `-----------------------------------------------------------------------' */ - KC_NO, S(DE_AE), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UE), S(DE_OE), KC_NO, TG(5), - KC_DEL, DE_AE, KC_NO, DE_SS, KC_NO, KC_NO, KC_NO, KC_NO, DE_UE, DE_OE, KC_NO, RALT(KC_F12), + KC_NO, S(DE_ADIA), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, S(DE_UDIA), S(DE_ODIA), KC_NO, TG(5), + KC_DEL, DE_ADIA, KC_NO, DE_SS, KC_NO, KC_NO, KC_NO, KC_NO, DE_UDIA, DE_ODIA, KC_NO, RALT(KC_F12), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MSTP, KC_MPRV, KC_MNXT, RALT(KC_F11), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY ), @@ -144,9 +144,9 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case 1: // M(1) if (record->event.pressed) { unregister_code(KC_LSFT); - register_code(DE_LESS); + register_code(DE_LABK); } else { - unregister_code(DE_LESS); + unregister_code(DE_LABK); } break; } diff --git a/keyboards/planck/keymaps/lucas/rules.mk b/keyboards/planck/keymaps/lucas/rules.mk index 1e877943d..10de3bfc0 100644 --- a/keyboards/planck/keymaps/lucas/rules.mk +++ b/keyboards/planck/keymaps/lucas/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/lukas/rules.mk b/keyboards/planck/keymaps/lukas/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/lukas/rules.mk +++ b/keyboards/planck/keymaps/lukas/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/luke/rules.mk b/keyboards/planck/keymaps/luke/rules.mk index e04815e2c..49547d19a 100644 --- a/keyboards/planck/keymaps/luke/rules.mk +++ b/keyboards/planck/keymaps/luke/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/max/rules.mk b/keyboards/planck/keymaps/max/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/max/rules.mk +++ b/keyboards/planck/keymaps/max/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/mgalisa/keymap.c b/keyboards/planck/keymaps/mgalisa/keymap.c index e3ecc8d7c..09e829564 100644 --- a/keyboards/planck/keymaps/mgalisa/keymap.c +++ b/keyboards/planck/keymaps/mgalisa/keymap.c @@ -207,7 +207,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -317,7 +317,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -350,7 +350,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { diff --git a/keyboards/planck/keymaps/mikethetiger/keymap.c b/keyboards/planck/keymaps/mikethetiger/keymap.c index e319fd49e..2fe932150 100644 --- a/keyboards/planck/keymaps/mikethetiger/keymap.c +++ b/keyboards/planck/keymaps/mikethetiger/keymap.c @@ -176,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -256,7 +256,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -293,7 +293,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -318,6 +318,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/mjuma/keymap.c b/keyboards/planck/keymaps/mjuma/keymap.c index 2204fb288..8aaa05864 100644 --- a/keyboards/planck/keymaps/mjuma/keymap.c +++ b/keyboards/planck/keymaps/mjuma/keymap.c @@ -190,7 +190,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 1: if (active) { @@ -199,6 +199,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/mollat/rules.mk b/keyboards/planck/keymaps/mollat/rules.mk index 249f422a5..b9760d72e 100644 --- a/keyboards/planck/keymaps/mollat/rules.mk +++ b/keyboards/planck/keymaps/mollat/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/motform/keymap.c b/keyboards/planck/keymaps/motform/keymap.c index 6414b5db7..0dd046a93 100644 --- a/keyboards/planck/keymaps/motform/keymap.c +++ b/keyboards/planck/keymaps/motform/keymap.c @@ -51,8 +51,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_COLEMAK] = LAYOUT_planck_grid ( - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, SE_OSLH, SE_AA, - KC_ECTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, SE_AE, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, SE_ODIA, SE_ARNG, + KC_ECTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, SE_ADIA, KC_SFTENT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_SFTENT, KC_ESC, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_BSPC, RAISE, KC_RGUI, KC_RALT, KC_HYPR, KC_MEH ), @@ -70,9 +70,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = LAYOUT_planck_grid ( - _______, SE_PIPE_MAC, SE_APOS, SE_AT_MAC_V, SE_AMPR, _______, KC_DOWN, KC_NO, KC_RGHT, SE_GRV, SE_GRV, SE_TILD, - _______, KC_EXLM, SE_QUO2, KC_HASH, SE_QUES, KC_PERC, KC_LEFT, SE_SLSH, SE_BSLS_MAC, SE_EQL, KC_PPLS, KC_PAST, - _______, KC_NO, KC_NO, SE_LBRC, SE_RBRC, KC_NO, KC_UP, SE_LCBR_MAC, SE_RCBR_MAC, KC_NO, KC_NO, _______, + _______, SE_LCBR, SE_QUOT, SE_AT_MAC_V, SE_AMPR, _______, KC_DOWN, KC_NO, KC_RGHT, SE_GRV, SE_GRV, SE_TILD, + _______, KC_EXLM, SE_DQUO, KC_HASH, SE_QUES, KC_PERC, KC_LEFT, SE_SLSH, S(SE_LCBR), SE_EQL, KC_PPLS, KC_PAST, + _______, KC_NO, KC_NO, SE_LBRC, SE_RBRC, KC_NO, KC_UP, S(SE_LBRC), S(SE_RBRC), KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), @@ -89,9 +89,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = LAYOUT_planck_grid ( - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - SE_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_DLR_MAC_V, - _______, KC_NO, KC_NO, SE_LESS_MAC, SE_GRTR_MAC, KC_NO, KC_NO, SE_LPRN, SE_RPRN, KC_PGUP, KC_PGDN, KC_NO, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + SE_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, SE_DLR_MAC_V, + _______, KC_NO, KC_NO, SE_SECT, SE_HALF, KC_NO, KC_NO, SE_LPRN, SE_RPRN, KC_PGUP, KC_PGDN, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), @@ -116,6 +116,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/planck/keymaps/msiu/keymap.c b/keyboards/planck/keymaps/msiu/keymap.c index bc067973c..559767f1f 100644 --- a/keyboards/planck/keymaps/msiu/keymap.c +++ b/keyboards/planck/keymaps/msiu/keymap.c @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -128,7 +128,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -155,7 +155,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -180,6 +180,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/muzfuz/keymap.c b/keyboards/planck/keymaps/muzfuz/keymap.c index ec2de450a..5e21660d0 100644 --- a/keyboards/planck/keymaps/muzfuz/keymap.c +++ b/keyboards/planck/keymaps/muzfuz/keymap.c @@ -118,7 +118,7 @@ float plover_song[][2] = SONG(PLOVER_SOUND); float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -177,8 +177,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) -{ +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) @@ -230,8 +229,7 @@ bool encoder_update(bool clockwise) return true; } -void dip_update(uint8_t index, bool active) -{ +bool encoder_update_user(uint8_t index, bool clockwise) { switch (index) { case 0: @@ -263,6 +261,7 @@ void dip_update(uint8_t index, bool active) #endif } } + return true; } void matrix_scan_user(void) diff --git a/keyboards/planck/keymaps/mwpeterson/keymap.c b/keyboards/planck/keymaps/mwpeterson/keymap.c index 961b8394b..dbe2f246f 100644 --- a/keyboards/planck/keymaps/mwpeterson/keymap.c +++ b/keyboards/planck/keymaps/mwpeterson/keymap.c @@ -258,7 +258,7 @@ void matrix_init_user(void) { set_unicode_input_mode(UC_LNX); }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, LOWER_LAYER, RAISE_LAYER, ADJUST_LAYER); } diff --git a/keyboards/planck/keymaps/narze/rules.mk b/keyboards/planck/keymaps/narze/rules.mk index 9b56dc18f..e066906f9 100644 --- a/keyboards/planck/keymaps/narze/rules.mk +++ b/keyboards/planck/keymaps/narze/rules.mk @@ -1,6 +1,6 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration diff --git a/keyboards/planck/keymaps/navi/keymap.c b/keyboards/planck/keymaps/navi/keymap.c index db5345127..8141607f6 100644 --- a/keyboards/planck/keymaps/navi/keymap.c +++ b/keyboards/planck/keymaps/navi/keymap.c @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -170,7 +170,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { diff --git a/keyboards/planck/keymaps/neo2planck/keymap.c b/keyboards/planck/keymaps/neo2planck/keymap.c index d09103c1e..9684dd19d 100644 --- a/keyboards/planck/keymaps/neo2planck/keymap.c +++ b/keyboards/planck/keymaps/neo2planck/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_planck_grid( KC_ESC, DE_X, DE_V, DE_L, DE_C, DE_W, DE_K, DE_H, DE_G, DE_F, DE_Q, KC_BSPC , KC_ENT, DE_U, DE_I, DE_A, DE_E, DE_O, DE_S, DE_N, DE_R, DE_T, DE_D, DE_Y , - KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_LSFT , + KC_LSFT, DE_UDIA, DE_ODIA, DE_ADIA, DE_P, DE_Z, DE_B, DE_M, DE_COMM, DE_DOT, DE_J, KC_LSFT , KC_LCTL , KC_RGUI, KC_LALT, MO(2), MO(1), KC_SPC, KC_SPC, MO(1), MO(2), KC_RALT, KC_BTN2, KC_RCTL ), @@ -45,9 +45,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { `-----------------------------------------------------------------------------------' */ [1] = LAYOUT_planck_grid( - _______, _______, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, DE_SS , - KC_TAB, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT , - _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_ACUT, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, _______ , + _______, _______, DE_UNDS, DE_LBRC, DE_RBRC, DE_CIRC, DE_EXLM, DE_LABK, DE_RABK, DE_EQL, DE_AMPR, DE_SS , + KC_TAB, DE_BSLS, DE_SLSH, DE_LCBR, DE_RCBR, DE_ASTR, DE_QUES, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT , + _______, DE_HASH, DE_DLR, DE_PIPE, DE_TILD, DE_ACUT, DE_PLUS, DE_PERC, DE_DQUO, DE_QUOT, DE_SCLN, _______ , _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ ), @@ -83,8 +83,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [3] = LAYOUT_planck_grid( XXXXXXX, XXXXXXX, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F12, XXXXXXX , - KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT , - _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ , + KC_TAB, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, DE_SUP3, KC_F4, KC_F5, KC_F6, KC_F11, KC_ENT , + _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, DE_SUP2, KC_F1, KC_F2, KC_F3, KC_F10, _______ , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/planck/keymaps/neo2planck/rules.mk b/keyboards/planck/keymaps/neo2planck/rules.mk index 6846e9c16..bf8317156 100644 --- a/keyboards/planck/keymaps/neo2planck/rules.mk +++ b/keyboards/planck/keymaps/neo2planck/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/nick/keymap.c b/keyboards/planck/keymaps/nick/keymap.c index b717ccdc8..d75a91edb 100644 --- a/keyboards/planck/keymaps/nick/keymap.c +++ b/keyboards/planck/keymaps/nick/keymap.c @@ -105,11 +105,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise && !IS_LAYER_ON(_RAISE)) { tap_code(KC_MS_WH_DOWN); } else if (!clockwise && !IS_LAYER_ON(_RAISE)) { diff --git a/keyboards/planck/keymaps/nico/rules.mk b/keyboards/planck/keymaps/nico/rules.mk index 1e877943d..10de3bfc0 100644 --- a/keyboards/planck/keymaps/nico/rules.mk +++ b/keyboards/planck/keymaps/nico/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/not-quite-neo/rules.mk b/keyboards/planck/keymaps/not-quite-neo/rules.mk index 5ba0cefb4..b30c3a21e 100644 --- a/keyboards/planck/keymaps/not-quite-neo/rules.mk +++ b/keyboards/planck/keymaps/not-quite-neo/rules.mk @@ -6,7 +6,7 @@ # the appropriate keymap folder that will get included automatically # TAP_DANCE_ENABLE = no # Enable TapDance functionality -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/orthodeluxe/rules.mk b/keyboards/planck/keymaps/orthodeluxe/rules.mk index 36e0481b6..e657235e8 100644 --- a/keyboards/planck/keymaps/orthodeluxe/rules.mk +++ b/keyboards/planck/keymaps/orthodeluxe/rules.mk @@ -2,4 +2,4 @@ AUDIO_ENABLE = yes BACKLIGHT_ENABLE = no KEY_LOCK_ENABLE = yes MOUSEKEY_ENABLE = no -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/planck/keymaps/pascamel/keymap.c b/keyboards/planck/keymaps/pascamel/keymap.c index 852643218..13553dc39 100644 --- a/keyboards/planck/keymaps/pascamel/keymap.c +++ b/keyboards/planck/keymaps/pascamel/keymap.c @@ -118,7 +118,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -157,7 +157,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -184,7 +184,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -209,6 +209,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/pevecyan/keymap.c b/keyboards/planck/keymaps/pevecyan/keymap.c index 2391efebb..553dd84a5 100644 --- a/keyboards/planck/keymaps/pevecyan/keymap.c +++ b/keyboards/planck/keymaps/pevecyan/keymap.c @@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ALTGR] = LAYOUT_planck_grid(k +[_ALTGR] = LAYOUT_planck_grid( _______, SI_BSLS, SI_PIPE, SI_EURO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, SI_LBRC, SI_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, SI_AT, SI_LCBR, SI_RCBR, _______, SI_LABK, SI_RABK, _______, _______, @@ -168,7 +168,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -178,7 +178,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -205,7 +205,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -230,6 +230,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/pickle_jr/keymap.c b/keyboards/planck/keymaps/pickle_jr/keymap.c index 317ebcf39..31853819c 100644 --- a/keyboards/planck/keymaps/pickle_jr/keymap.c +++ b/keyboards/planck/keymaps/pickle_jr/keymap.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _LOWER 1 @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TABCALC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, QUOCALC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SCOLNAV, KC_ENT , KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - LBRACK , KC_LCTL, KC_PSCR, KC_LGUI, KC_BSPC, LOWER, RAISE, KC_SPC, KC_RALT, VIMSAVE, KC_RCTL, RBRACK + LBRACK , KC_LCTL, KC_PSCR, KC_LGUI, KC_BSPC, LOWER, RAISE, KC_SPC, KC_RALT, VIMSAVE, KC_RCTL, RBRACK ), /* Lower @@ -181,7 +181,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }; diff --git a/keyboards/planck/keymaps/pickle_jr/rules.mk b/keyboards/planck/keymaps/pickle_jr/rules.mk index 43e0b843f..6933bd755 100644 --- a/keyboards/planck/keymaps/pickle_jr/rules.mk +++ b/keyboards/planck/keymaps/pickle_jr/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/piemod/rules.mk b/keyboards/planck/keymaps/piemod/rules.mk index 0eabfdfc1..3126ba9dc 100644 --- a/keyboards/planck/keymaps/piemod/rules.mk +++ b/keyboards/planck/keymaps/piemod/rules.mk @@ -5,7 +5,7 @@ EXTRAKEY_ENABLE = yes AUDIO_ENABLE = yes ifeq ($(MCU),at90usb1286) -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite CONSOLE_ENABLE = no COMMAND_ENABLE = no BLUETOOTH_ENABLE = no diff --git a/keyboards/planck/keymaps/premek/rules.mk b/keyboards/planck/keymaps/premek/rules.mk index 1e877943d..10de3bfc0 100644 --- a/keyboards/planck/keymaps/premek/rules.mk +++ b/keyboards/planck/keymaps/premek/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/priyadi/rules.mk b/keyboards/planck/keymaps/priyadi/rules.mk index 1ce96968b..694d38b3f 100644 --- a/keyboards/planck/keymaps/priyadi/rules.mk +++ b/keyboards/planck/keymaps/priyadi/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -13,7 +13,6 @@ UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes # Unicode map BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no ifeq ($(strip $(KEYBOARD)), planck/rev4) BACKLIGHT_ENABLE = yes diff --git a/keyboards/planck/keymaps/ptillemans/keymap.c b/keyboards/planck/keymaps/ptillemans/keymap.c index c163f7372..e671fd59c 100644 --- a/keyboards/planck/keymaps/ptillemans/keymap.c +++ b/keyboards/planck/keymaps/ptillemans/keymap.c @@ -232,7 +232,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -269,7 +269,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -294,6 +294,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/pvc/rules.mk b/keyboards/planck/keymaps/pvc/rules.mk index 3fb98eca8..bbe6711f0 100644 --- a/keyboards/planck/keymaps/pvc/rules.mk +++ b/keyboards/planck/keymaps/pvc/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/planck/keymaps/raffle/keymap.c b/keyboards/planck/keymaps/raffle/keymap.c index 350a9166c..52727f35b 100644 --- a/keyboards/planck/keymaps/raffle/keymap.c +++ b/keyboards/planck/keymaps/raffle/keymap.c @@ -164,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -223,7 +223,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -250,7 +250,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -275,6 +275,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/rai-suta/rules.mk b/keyboards/planck/keymaps/rai-suta/rules.mk index 88915dcd3..9341788b1 100644 --- a/keyboards/planck/keymaps/rai-suta/rules.mk +++ b/keyboards/planck/keymaps/rai-suta/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/planck/keymaps/rjhilgefort/keymap.c b/keyboards/planck/keymaps/rjhilgefort/keymap.c index d832e7051..08e9809e9 100644 --- a/keyboards/planck/keymaps/rjhilgefort/keymap.c +++ b/keyboards/planck/keymaps/rjhilgefort/keymap.c @@ -154,7 +154,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -187,7 +187,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -216,6 +216,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/rodhaene/rules.mk b/keyboards/planck/keymaps/rodhaene/rules.mk index 7db994581..4b9265909 100644 --- a/keyboards/planck/keymaps/rodhaene/rules.mk +++ b/keyboards/planck/keymaps/rodhaene/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -14,7 +14,6 @@ AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file diff --git a/keyboards/planck/keymaps/rootiest/rules.mk b/keyboards/planck/keymaps/rootiest/rules.mk index 4b93f7db5..b669d8bb7 100644 --- a/keyboards/planck/keymaps/rootiest/rules.mk +++ b/keyboards/planck/keymaps/rootiest/rules.mk @@ -1,6 +1,7 @@ SRC += muse.c ENCODER_ENABLE = yes # Enables basic encoder support -OLED_DRIVER_ENABLE = yes # Enables support for OLED displays +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables support for OLED displays # UNICODE_ENABLE = yes # Allow inputting basic unicode characters UNICODEMAP_ENABLE = yes # Enable use of Unicode mapping array # UCIS_ENABLE = yes # Another method for generating Unicode characters via maps diff --git a/keyboards/planck/keymaps/sdothum/rules.mk b/keyboards/planck/keymaps/sdothum/rules.mk index a72276629..ea9abc2a8 100644 --- a/keyboards/planck/keymaps/sdothum/rules.mk +++ b/keyboards/planck/keymaps/sdothum/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically -BOOTMAGIC_ENABLE = no # virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # mouse keys(+4700) EXTRAKEY_ENABLE = no # audio control and System control(+450) CONSOLE_ENABLE = no # console for debug(+400) diff --git a/keyboards/planck/keymaps/sgoodwin/rules.mk b/keyboards/planck/keymaps/sgoodwin/rules.mk index cdcb4a887..10de3bfc0 100644 --- a/keyboards/planck/keymaps/sgoodwin/rules.mk +++ b/keyboards/planck/keymaps/sgoodwin/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -14,7 +14,6 @@ AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Disable extra stuff for ergodoxen # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file diff --git a/keyboards/planck/keymaps/sigul/keymap.c b/keyboards/planck/keymaps/sigul/keymap.c index bdbf21b11..622e9f29c 100644 --- a/keyboards/planck/keymaps/sigul/keymap.c +++ b/keyboards/planck/keymaps/sigul/keymap.c @@ -49,9 +49,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LOWER] = LAYOUT_ortho_4x12( - IT_TILDE, IT_EXLM, IT_AT, IT_SHRP, IT_DLR, IT_PERC, IT_CRC, IT_AMPR, IT_ASTR, IT_LPRN, IT_RPRN, KC_DEL, - KC_ENT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(IT_MINS), IT_EQL, S(IT_EACC), IT_OACC, IT_AACC, - _______, KC_F6, KC_F7, KC_F8, KC_F9, _______, NUMPAD, S(IT_UACC), IT_PLMN, IT_LCBR, IT_RCBR, IT_PIPE, + IT_TILD, IT_EXLM, IT_AT, IT_HASH, IT_DLR, IT_PERC, IT_CIRC, IT_AMPR, IT_ASTR, IT_LPRN, IT_RPRN, KC_DEL, + KC_ENT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, S(IT_MINS), IT_EQL, S(IT_EGRV), IT_OGRV, IT_AGRV, + _______, KC_F6, KC_F7, KC_F8, KC_F9, _______, NUMPAD, S(IT_UGRV), IT_PLMN, IT_LCBR, IT_RCBR, IT_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY ), @@ -67,8 +67,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_ortho_4x12( - IT_GRAVE, IT_1, IT_2, IT_3, IT_4, IT_5, IT_6, IT_7, IT_8, IT_9, IT_0, _______, - _______, _______, SECRET0, SECRET1, _______, _______, _______, IT_MINS, IT_PLUS, IT_EACC, IT_IACC, IT_UACC, + IT_GRV, IT_1, IT_2, IT_3, IT_4, IT_5, IT_6, IT_7, IT_8, IT_9, IT_0, _______, + _______, _______, SECRET0, SECRET1, _______, _______, _______, IT_MINS, IT_PLUS, IT_EGRV, IT_IGRV, IT_UGRV, KC_CAPS, _______, SECRET2, SECRET3, SECRET4, _______, NUMPAD, SECRET5, _______, IT_LBRC, IT_RBRC, IT_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), @@ -162,7 +162,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { diff --git a/keyboards/planck/keymaps/skug/keymap.c b/keyboards/planck/keymaps/skug/keymap.c index a2162d911..6367d3c34 100644 --- a/keyboards/planck/keymaps/skug/keymap.c +++ b/keyboards/planck/keymaps/skug/keymap.c @@ -39,7 +39,7 @@ enum planck_keycodes { #define ESC_LOW LT(_LOWER, KC_ESC) #define BSP_RAI LT(_RAISE, KC_BSPC) -#define LFT_CTR CTL_T(SE_APOS) +#define LFT_CTR CTL_T(SE_QUOT) #define RGT_CTR CTL_T(KC_TILD) #define UTILITY MO(_UTILITY) @@ -57,8 +57,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_DEFAULT] = LAYOUT_planck_grid( - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , SE_AA , - UTILITY, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , SE_OSLH, SE_AE , + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , SE_ARNG, + UTILITY, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , SE_ODIA, SE_ADIA, KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SE_MINS, KC_RSPC, LFT_CTR, KC_LALT, KC_LGUI, SE_AT , ESC_LOW, KC_ENT , KC_SPC , BSP_RAI, _______, KC_ALGR, SE_ASTR, RGT_CTR ), @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_planck_grid( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PLUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, SE_GRTR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, SE_RABK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -93,9 +93,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_planck_grid( - SE_HALF, LSFT(KC_1), SE_QUO2, LSFT(KC_3), SE_BULT, LSFT(KC_5), SE_AMPR, SE_SLSH, SE_LPRN, SE_RPRN, SE_EQL , SE_QUES, + SE_HALF, LSFT(KC_1), SE_DQUO, LSFT(KC_3), SE_CURR, LSFT(KC_5), SE_AMPR, SE_SLSH, SE_LPRN, SE_RPRN, SE_EQL , SE_QUES, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, SE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, SE_LABK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -153,7 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float s9[][2] = SONG(SONIC_RING); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -264,7 +264,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -291,7 +291,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -316,6 +316,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/smittey/keymap.c b/keyboards/planck/keymaps/smittey/keymap.c index 7efe5fd4d..537b60c10 100644 --- a/keyboards/planck/keymaps/smittey/keymap.c +++ b/keyboards/planck/keymaps/smittey/keymap.c @@ -224,7 +224,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -297,7 +297,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -322,7 +322,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -347,6 +347,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/snowkuma/keymap.c b/keyboards/planck/keymaps/snowkuma/keymap.c index eee8e1170..fef6246b4 100644 --- a/keyboards/planck/keymaps/snowkuma/keymap.c +++ b/keyboards/planck/keymaps/snowkuma/keymap.c @@ -84,7 +84,7 @@ void safe_reset(qk_tap_dance_state_t *state, void *user_data) { register_code(KC_SLSH); } } -} +} void tilde_reset(qk_tap_dance_state_t *state, void *user_data) { @@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_COLEMAK] = LAYOUT_planck_grid( Q_CTL, W_ALT, F_GUI, KC_P, KC_G, _______, _______, KC_J, KC_L, U_GUI, Y_ALT, SCL_CTL, KC_A, KC_R, KC_S, T_SFT, KC_D, _______, _______, KC_H, N_SFT, KC_E, KC_I, KC_O, - KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_QUOT, + KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_QUOT, _______, _______, _______, ESC_NUM, BSP_REG, MIN_ARR, TAB_SFT, SPC_SYM, ENT_THU, _______, _______, _______ ), @@ -173,7 +173,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Number Layer * ,-----------------------------------------------------------------------------------------------------------. - * | : | F | E | D | G | | | * | 7 | 8 | 9 | 0 | + * | : | F | E | D | G | | | * | 7 | 8 | 9 | 0 | * | | | | | | | | | | | | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | # | C | B | A | + | | | . | 4 | 5 | 6 | / | @@ -289,7 +289,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _SYMBOL, _THUMB, _FUNCTION); state = update_tri_layer_state(state, _SYMBOL, _REGEX, _MOUSE); return state; @@ -317,7 +317,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case VIM: + case VIM: if (record->event.pressed) { SEND_STRING(SS_LGUI(" ")); SEND_STRING("macvim.app" SS_TAP(X_ENTER)); diff --git a/keyboards/planck/keymaps/snowkuma/rules.mk b/keyboards/planck/keymaps/snowkuma/rules.mk index 4a172d286..e7706a252 100644 --- a/keyboards/planck/keymaps/snowkuma/rules.mk +++ b/keyboards/planck/keymaps/snowkuma/rules.mk @@ -3,7 +3,7 @@ SRC += muse.c AUDIO_ENABLE = yes BACKLIGHT_ENABLE = no BLUETOOTH_ENABLE = no -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMBO_ENABLE = no COMMAND_ENABLE = no CONSOLE_ENABLE = no diff --git a/keyboards/planck/keymaps/spacebarracecar/keymap.c b/keyboards/planck/keymaps/spacebarracecar/keymap.c index 71f44c996..5efced81a 100644 --- a/keyboards/planck/keymaps/spacebarracecar/keymap.c +++ b/keyboards/planck/keymaps/spacebarracecar/keymap.c @@ -44,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { `-----------------------------------------------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_ortho_4x12( - DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______, + DE_TILD, DE_EXLM, DE_DQUO, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______, _______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE, _______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/planck/keymaps/spacebarracecar/rules.mk b/keyboards/planck/keymaps/spacebarracecar/rules.mk index bc817a140..b65fadcd3 100644 --- a/keyboards/planck/keymaps/spacebarracecar/rules.mk +++ b/keyboards/planck/keymaps/spacebarracecar/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/synth_sample/keymap.c b/keyboards/planck/keymaps/synth_sample/keymap.c index 64bfde9aa..0a57b7ce9 100644 --- a/keyboards/planck/keymaps/synth_sample/keymap.c +++ b/keyboards/planck/keymaps/synth_sample/keymap.c @@ -173,7 +173,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -247,7 +247,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { #ifdef MOUSEKEY_ENABLE register_code(KC_MS_WH_DOWN); diff --git a/keyboards/planck/keymaps/synth_wavetable/keymap.c b/keyboards/planck/keymaps/synth_wavetable/keymap.c index 1fcc97742..d413d6389 100644 --- a/keyboards/planck/keymaps/synth_wavetable/keymap.c +++ b/keyboards/planck/keymaps/synth_wavetable/keymap.c @@ -173,7 +173,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -308,7 +308,7 @@ uint16_t dac_value_generate(void) { return value; } -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { dac_morph = (dac_morph + 1) % AUDIO_DAC_WAVETABLE_CUSTOM_LENGTH; } else { diff --git a/keyboards/planck/keymaps/tak3over/rules.mk b/keyboards/planck/keymaps/tak3over/rules.mk index 1e877943d..10de3bfc0 100644 --- a/keyboards/planck/keymaps/tak3over/rules.mk +++ b/keyboards/planck/keymaps/tak3over/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/thermal_printer/rules.mk b/keyboards/planck/keymaps/thermal_printer/rules.mk index 3c0e340d1..395962437 100644 --- a/keyboards/planck/keymaps/thermal_printer/rules.mk +++ b/keyboards/planck/keymaps/thermal_printer/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/tom/keymap.c b/keyboards/planck/keymaps/tom/keymap.c index ea625d165..66beaf33b 100644 --- a/keyboards/planck/keymaps/tom/keymap.c +++ b/keyboards/planck/keymaps/tom/keymap.c @@ -116,7 +116,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -139,7 +139,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -172,7 +172,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -197,6 +197,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/tong92/rules.mk b/keyboards/planck/keymaps/tong92/rules.mk index 88ad1e982..f836e54d5 100644 --- a/keyboards/planck/keymaps/tong92/rules.mk +++ b/keyboards/planck/keymaps/tong92/rules.mk @@ -41,7 +41,7 @@ # change to "no" to disable the options, or define them in the makefile.mk in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/tylerwince/keymap.c b/keyboards/planck/keymaps/tylerwince/keymap.c index c9ba7da89..5cbc47b2f 100644 --- a/keyboards/planck/keymaps/tylerwince/keymap.c +++ b/keyboards/planck/keymaps/tylerwince/keymap.c @@ -215,7 +215,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -273,7 +273,7 @@ bool music_mask_user(uint16_t keycode) { return true; } } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { palClearPad(GPIOB, 8); palClearPad(GPIOB, 9); uint8_t layer = biton32(state); diff --git a/keyboards/planck/keymaps/unagi/keymap.c b/keyboards/planck/keymaps/unagi/keymap.c index 5f4d3b886..1fc181479 100644 --- a/keyboards/planck/keymaps/unagi/keymap.c +++ b/keyboards/planck/keymaps/unagi/keymap.c @@ -187,7 +187,7 @@ qk_tap_dance_action_t tap_dance_actions[] = { float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); #endif -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } @@ -267,7 +267,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -294,7 +294,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -319,6 +319,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/planck/keymaps/vifon/rules.mk b/keyboards/planck/keymaps/vifon/rules.mk index 3f9b4544e..fb322bfc3 100644 --- a/keyboards/planck/keymaps/vifon/rules.mk +++ b/keyboards/planck/keymaps/vifon/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -16,7 +16,6 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # https://www.reddit.com/r/olkb/comments/5swhij/_/ddie6zq/ KEY_LOCK_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/planck/keymaps/vxid/keymap.c b/keyboards/planck/keymaps/vxid/keymap.c index 51d1daa70..0494056ea 100644 --- a/keyboards/planck/keymaps/vxid/keymap.c +++ b/keyboards/planck/keymaps/vxid/keymap.c @@ -44,6 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/planck/keymaps/winternebs/keymap.c b/keyboards/planck/keymaps/winternebs/keymap.c index 259603faf..4bb97b27a 100755 --- a/keyboards/planck/keymaps/winternebs/keymap.c +++ b/keyboards/planck/keymaps/winternebs/keymap.c @@ -64,10 +64,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_WORKMAN] = LAYOUT_planck_grid( - KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, - KC_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, - KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , - KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_BSPC, ADJUST, _______, KC_LEFT, KC_DOWN, KC_RGHT + KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, KC_LGUI, _______, KC_LALT, LOWER, KC_SPC, KC_BSPC, ADJUST, _______, KC_LEFT, KC_DOWN, KC_RGHT ), /* Lower @@ -149,7 +149,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -159,4 +159,5 @@ void dip_update(uint8_t index, bool active) { } break; } + return true; } diff --git a/keyboards/planck/keymaps/yale/rules.mk b/keyboards/planck/keymaps/yale/rules.mk index 5dda6ad67..d86b02fd1 100644 --- a/keyboards/planck/keymaps/yale/rules.mk +++ b/keyboards/planck/keymaps/yale/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/zach/rules.mk b/keyboards/planck/keymaps/zach/rules.mk index b3dfb88d7..3247aece2 100644 --- a/keyboards/planck/keymaps/zach/rules.mk +++ b/keyboards/planck/keymaps/zach/rules.mk @@ -6,7 +6,7 @@ # the appropriate keymap folder that will get included automatically # TAP_DANCE_ENABLE = yes # Enable TapDance functionality -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/zrichard/rules.mk b/keyboards/planck/keymaps/zrichard/rules.mk index 0475875a3..ef2e12035 100755 --- a/keyboards/planck/keymaps/zrichard/rules.mk +++ b/keyboards/planck/keymaps/zrichard/rules.mk @@ -9,7 +9,7 @@ $(warning Please disable some options in the Makefile to resolve) # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/light/light.c b/keyboards/planck/light/light.c index 896ec4458..3a53e3998 100644 --- a/keyboards/planck/light/light.c +++ b/keyboards/planck/light/light.c @@ -16,7 +16,7 @@ #include "light.h" -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/planck/light/rules.mk b/keyboards/planck/light/rules.mk index fc6243c3f..10e9f0b29 100644 --- a/keyboards/planck/light/rules.mk +++ b/keyboards/planck/light/rules.mk @@ -15,21 +15,20 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = yes # MIDI controls +MIDI_ENABLE = yes # MIDI support AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3731 -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/planck.h b/keyboards/planck/planck.h index ef037f369..31e3ec915 100644 --- a/keyboards/planck/planck.h +++ b/keyboards/planck/planck.h @@ -3,8 +3,6 @@ #include "quantum.h" -#define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise) - #if defined(KEYBOARD_planck_ez) #include "ez.h" #elif defined(KEYBOARD_planck_light) diff --git a/keyboards/planck/rev1/rules.mk b/keyboards/planck/rev1/rules.mk index 98ae26cbe..30fcd1284 100644 --- a/keyboards/planck/rev1/rules.mk +++ b/keyboards/planck/rev1/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/rev2/rules.mk b/keyboards/planck/rev2/rules.mk index 98ae26cbe..30fcd1284 100644 --- a/keyboards/planck/rev2/rules.mk +++ b/keyboards/planck/rev2/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk index 98ae26cbe..30fcd1284 100644 --- a/keyboards/planck/rev3/rules.mk +++ b/keyboards/planck/rev3/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk index 8454ea0e7..2f988ebbe 100644 --- a/keyboards/planck/rev4/rules.mk +++ b/keyboards/planck/rev4/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/rev5/rules.mk b/keyboards/planck/rev5/rules.mk index 495857254..5c3284d7a 100644 --- a/keyboards/planck/rev5/rules.mk +++ b/keyboards/planck/rev5/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = qmk-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index 4bc8a509f..bae075de1 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -106,26 +106,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* * WS2812 Underglow Matrix options @@ -140,8 +120,6 @@ #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 #define WS2812_DMA_CHANNEL 2 -#ifndef RGB_DISABLE_WHEN_USB_SUSPENDED -# define RGB_DISABLE_WHEN_USB_SUSPENDED true -#endif +#define RGB_DISABLE_WHEN_USB_SUSPENDED #endif diff --git a/keyboards/planck/rev6/rev6.c b/keyboards/planck/rev6/rev6.c index 4f2ff8681..da6da1100 100644 --- a/keyboards/planck/rev6/rev6.c +++ b/keyboards/planck/rev6/rev6.c @@ -40,31 +40,4 @@ led_config_t g_led_config = { { // 0 // 7 8 1 2 -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} -#endif - -void matrix_init_kb(void) { - matrix_init_user(); -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -#ifdef DIP_SWITCH_ENABLE -__attribute__((weak)) -void dip_update(uint8_t index, bool active) {} - -__attribute__((weak)) -void dip_switch_update_user(uint8_t index, bool active) { - dip_update(index, active); -} #endif diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index 7760353e3..e1de4a10b 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk @@ -9,20 +9,18 @@ BOOTLOADER = stm32-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite 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 NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. WS2812_DRIVER = pwm -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/thk/info.json b/keyboards/planck/thk/info.json index cffc9fd36..558597b4d 100644 --- a/keyboards/planck/thk/info.json +++ b/keyboards/planck/thk/info.json @@ -1,53 +1,13 @@ { - "manufacturer": "OLKB", "keyboard_name": "Planck THK", "maintainer": "Erovia", - "height": 4, - "width": 12, - "bootloader": "USBasp", - "debounce": 5, - "diode_direction": "COL2ROW", - "features": { - "audio": false, - "backlight": false, - "bluetooth": false, - "bootmagic_lite": true, - "command": false, - "console": false, - "dip_switch": true, - "encoder": true, - "extrakey": true, - "mousekey": true, - "nkro": false, - "rgblight": false, - "sleep_led": false - }, - "matrix_pins": { - "cols": ["D7", "C2", "C3", "C4", "C5", "C6", "C7", "A3", "A2", "A1", "A0", "B0"], - "rows": ["A7", "A6", "A5", "A4"] - }, - "processor": "atmega32a", - "qmk_lufa_bootloader": { - "esc_input": "D5", - "esc_output": "F1", - "led": "E6", - "speaker": "C6" - }, "url": "https://olkb.com/planck", - "usb": { - "device_ver": "0x0000", - "pid": "0x25A7", - "vid": "0x03A8" - }, - "community_layouts": ["ortho_4x12", "planck_mit"], "layout_aliases": { "LAYOUT_planck_grid": "LAYOUT_ortho_4x12", "LAYOUT_planck_mit": "LAYOUT_planck_1x2uC" }, "layouts": { "LAYOUT_ortho_4x12": { - "c_macro": true, - "filename": "keyboards/planck/thk/thk.h", "key_count": 48, "layout": [ { "label": "k00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, @@ -101,8 +61,6 @@ ] }, "LAYOUT_planck_1x2uC": { - "c_macro": true, - "filename": "keyboards/planck/thk/thk.h", "key_count": 47, "layout": [ { "label": "k00", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 }, diff --git a/keyboards/planck/thk/keymaps/thk/keymap.c b/keyboards/planck/thk/keymaps/thk/keymap.c index 948393b53..ae2420250 100644 --- a/keyboards/planck/thk/keymaps/thk/keymap.c +++ b/keyboards/planck/thk/keymaps/thk/keymap.c @@ -213,7 +213,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { if (active) { @@ -237,4 +237,5 @@ void dip_switch_update_user(uint8_t index, bool active) { SEND_STRING("This is a Planck THK"); break; } + return true; } diff --git a/keyboards/planck/thk/rules.mk b/keyboards/planck/thk/rules.mk index 8d584afa3..ab2e344b1 100644 --- a/keyboards/planck/thk/rules.mk +++ b/keyboards/planck/thk/rules.mk @@ -24,7 +24,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/playkbtw/ca66/rules.mk b/keyboards/playkbtw/ca66/rules.mk index c3371db0f..485f8759c 100644 --- a/keyboards/playkbtw/ca66/rules.mk +++ b/keyboards/playkbtw/ca66/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/playkbtw/helen80/rules.mk b/keyboards/playkbtw/helen80/rules.mk index eef98a9fe..86f776177 100644 --- a/keyboards/playkbtw/helen80/rules.mk +++ b/keyboards/playkbtw/helen80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/playkbtw/pk60/rules.mk b/keyboards/playkbtw/pk60/rules.mk index 948e212e6..c302a5a49 100644 --- a/keyboards/playkbtw/pk60/rules.mk +++ b/keyboards/playkbtw/pk60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/plexus75/rules.mk b/keyboards/plexus75/rules.mk index 169778dfc..8658bd421 100644 --- a/keyboards/plexus75/rules.mk +++ b/keyboards/plexus75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ploopyco/adns5050.c b/keyboards/ploopyco/adns5050.c deleted file mode 100644 index e12e56f20..000000000 --- a/keyboards/ploopyco/adns5050.c +++ /dev/null @@ -1,197 +0,0 @@ -/* Copyright 2021 Colin Lam (Ploopy Corporation) - * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) - * Copyright 2019 Sunjun Kim - * Copyright 2019 Hiroyuki Okada - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - - -#include "adns5050.h" -#include "quantum.h" -#include "wait.h" - -#ifdef CONSOLE_ENABLE -# include "print.h" -#endif - -#ifndef OPTIC_ROTATED -# define OPTIC_ROTATED false -#endif - -// Definitions for the ADNS serial line. -// These really ought to be defined in your config.h, but defaults are -// here if you're really lazy. -#ifndef ADNS_SCLK_PIN -# define ADNS_SCLK_PIN B7 -#endif - -#ifndef ADNS_SDIO_PIN -# define ADNS_SDIO_PIN C6 -#endif - -#ifndef ADNS_CS_PIN -# define ADNS_CS_PIN B4 -#endif - -#ifdef CONSOLE_ENABLE -void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } -#endif - -// Initialize the ADNS serial pins. -void adns_init(void) { - setPinOutput(ADNS_SCLK_PIN); - setPinOutput(ADNS_SDIO_PIN); - setPinOutput(ADNS_CS_PIN); -} - -// Perform a synchronization with the ADNS. -// Just as with the serial protocol, this is used by the slave to send a -// synchronization signal to the master. -void adns_sync(void) { - writePinLow(ADNS_CS_PIN); - wait_us(1); - writePinHigh(ADNS_CS_PIN); -} - -void adns_cs_select(void) { - writePinLow(ADNS_CS_PIN); -} - -void adns_cs_deselect(void) { - writePinHigh(ADNS_CS_PIN); -} - -uint8_t adns_serial_read(void) { - setPinInput(ADNS_SDIO_PIN); - uint8_t byte = 0; - - for (uint8_t i = 0; i < 8; ++i) { - writePinLow(ADNS_SCLK_PIN); - wait_us(1); - - byte = (byte << 1) | readPin(ADNS_SDIO_PIN); - - writePinHigh(ADNS_SCLK_PIN); - wait_us(1); - } - - return byte; -} - -void adns_serial_write(uint8_t data) { - setPinOutput(ADNS_SDIO_PIN); - - for (int8_t b = 7; b >= 0; b--) { - writePinLow(ADNS_SCLK_PIN); - - if (data & (1 << b)) - writePinHigh(ADNS_SDIO_PIN); - else - writePinLow(ADNS_SDIO_PIN); - - wait_us(2); - - writePinHigh(ADNS_SCLK_PIN); - } - - // tSWR. See page 15 of the ADNS spec sheet. - // Technically, this is only necessary if the next operation is an SDIO - // read. This is not guaranteed to be the case, but we're being lazy. - wait_us(4); - - // Note that tSWW is never necessary. All write operations require at - // least 32us, which exceeds tSWW, so there's never a need to wait for it. -} - -// Read a byte of data from a register on the ADNS. -// Don't forget to use the register map (as defined in the header file). -uint8_t adns_read_reg(uint8_t reg_addr) { - adns_cs_select(); - - adns_serial_write(reg_addr); - - // We don't need a minimum tSRAD here. That's because a 4ms wait time is - // already included in adns_serial_write(), so we're good. - // See page 10 and 15 of the ADNS spec sheet. - //wait_us(4); - - uint8_t byte = adns_serial_read(); - - // tSRW & tSRR. See page 15 of the ADNS spec sheet. - // Technically, this is only necessary if the next operation is an SDIO - // read or write. This is not guaranteed to be the case. - // Honestly, this wait could probably be removed. - wait_us(1); - - adns_cs_deselect(); - - return byte; -} - -void adns_write_reg(uint8_t reg_addr, uint8_t data) { - adns_cs_select(); - adns_serial_write( 0b10000000 | reg_addr ); - adns_serial_write(data); - adns_cs_deselect(); -} - -report_adns_t adns_read_burst(void) { - adns_cs_select(); - - report_adns_t data; - data.dx = 0; - data.dy = 0; - - adns_serial_write(REG_MOTION_BURST); - - // We don't need a minimum tSRAD here. That's because a 4ms wait time is - // already included in adns_serial_write(), so we're good. - // See page 10 and 15 of the ADNS spec sheet. - //wait_us(4); - - uint8_t x = adns_serial_read(); - uint8_t y = adns_serial_read(); - - // Burst mode returns a bunch of other shit that we don't really need. - // Setting CS to high ends burst mode early. - adns_cs_deselect(); - - data.dx = convert_twoscomp(x); - data.dy = convert_twoscomp(y); - - return data; -} - -// Convert a two's complement byte from an unsigned data type into a signed -// data type. -int8_t convert_twoscomp(uint8_t data) { - if ((data & 0x80) == 0x80) - return -128 + (data & 0x7F); - else - return data; -} - -// Don't forget to use the definitions for CPI in the header file. -void adns_set_cpi(uint8_t cpi) { - adns_write_reg(REG_MOUSE_CONTROL2, cpi); -} - -bool adns_check_signature(void) { - uint8_t pid = adns_read_reg(REG_PRODUCT_ID); - uint8_t rid = adns_read_reg(REG_REVISION_ID); - uint8_t pid2 = adns_read_reg(REG_PRODUCT_ID2); - - return (pid == 0x12 && rid == 0x01 && pid2 == 0x26); -} diff --git a/keyboards/ploopyco/mouse/config.h b/keyboards/ploopyco/mouse/config.h index db1c7d002..4f2103e31 100644 --- a/keyboards/ploopyco/mouse/config.h +++ b/keyboards/ploopyco/mouse/config.h @@ -81,3 +81,6 @@ #define RGBLIGHT_EFFECT_RAINBOW_SWIRL // #define DEBUG_LED_PIN F7 + +/* PMW3360 Settings */ +#define PMW3360_CS_PIN B0 diff --git a/keyboards/ploopyco/mouse/keymaps/drashna/config.h b/keyboards/ploopyco/mouse/keymaps/drashna/config.h index 5bc704fec..5a220c801 100644 --- a/keyboards/ploopyco/mouse/keymaps/drashna/config.h +++ b/keyboards/ploopyco/mouse/keymaps/drashna/config.h @@ -20,5 +20,10 @@ #undef RGBLIGHT_LIMIT_VAL #define RGBLIGHT_LIMIT_VAL 255 -#define RGBLIGHT_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_TWINKLE #define RGBLIGHT_SLEEP diff --git a/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c b/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c index 68b846f7b..a9b1c46fc 100644 --- a/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c +++ b/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c @@ -29,6 +29,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void eeconkfig_init_user(void) { rgblight_enable(); +#ifdef RGBLIGHT_EFFECT_TWINKLE rgblight_mode(RGBLIGHT_MODE_TWINKLE+5); +#else + rgblight_mode(RGBLIGHT_MODE_BREATHING+5); +#endif rgblight_sethsv(HSV_MAGENTA); } diff --git a/keyboards/ploopyco/mouse/mouse.h b/keyboards/ploopyco/mouse/mouse.h index 5d49d2f2d..d11aa5e9a 100644 --- a/keyboards/ploopyco/mouse/mouse.h +++ b/keyboards/ploopyco/mouse/mouse.h @@ -20,7 +20,7 @@ #include "quantum.h" #include "spi_master.h" -#include "pmw3360.h" +#include "drivers/sensors/pmw3360.h" #include "analog.h" #include "opt_encoder.h" #include "pointing_device.h" diff --git a/keyboards/ploopyco/mouse/rules.mk b/keyboards/ploopyco/mouse/rules.mk index f998672f1..7c3ba0895 100644 --- a/keyboards/ploopyco/mouse/rules.mk +++ b/keyboards/ploopyco/mouse/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration @@ -27,4 +27,4 @@ POINTING_DEVICE_ENABLE = yes MOUSEKEY_ENABLE = yes # Mouse keys QUANTUM_LIB_SRC += analog.c spi_master.c -SRC += pmw3360.c opt_encoder.c +SRC += drivers/sensors/pmw3360.c opt_encoder.c diff --git a/keyboards/ploopyco/pmw3360.c b/keyboards/ploopyco/pmw3360.c deleted file mode 100644 index 5f9f72a9e..000000000 --- a/keyboards/ploopyco/pmw3360.c +++ /dev/null @@ -1,218 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) - * Copyright 2019 Sunjun Kim - * Copyright 2020 Ploopy Corporation - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "wait.h" -#include "debug.h" -#include "print.h" -#include "pmw3360.h" -#include "pmw3360_firmware.h" - -bool _inBurst = false; - -#ifndef PMW_CPI -# define PMW_CPI 1600 -#endif -#ifndef SPI_DIVISOR -# define SPI_DIVISOR 2 -#endif -#ifndef ROTATIONAL_TRANSFORM_ANGLE -# define ROTATIONAL_TRANSFORM_ANGLE 0x00 -#endif - -void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } - - -bool spi_start_adv(void) { - bool status = spi_start(SPI_SS_PIN, false, 3, SPI_DIVISOR); - wait_us(1); - return status; -} - -void spi_stop_adv(void) { - wait_us(1); - spi_stop(); -} - -spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data) { - if (reg_addr != REG_Motion_Burst) { - _inBurst = false; - } - - spi_start_adv(); - // send address of the register, with MSBit = 1 to indicate it's a write - spi_status_t status = spi_write(reg_addr | 0x80); - status = spi_write(data); - - // tSCLK-NCS for write operation - wait_us(20); - - // tSWW/tSWR (=120us) minus tSCLK-NCS. Could be shortened, but is looks like a safe lower bound - wait_us(100); - spi_stop(); - return status; -} - -uint8_t spi_read_adv(uint8_t reg_addr) { - spi_start_adv(); - // send adress of the register, with MSBit = 0 to indicate it's a read - spi_write(reg_addr & 0x7f); - - uint8_t data = spi_read(); - - // tSCLK-NCS for read operation is 120ns - wait_us(1); - - // tSRW/tSRR (=20us) minus tSCLK-NCS - wait_us(19); - - spi_stop(); - return data; -} - -void pmw_set_cpi(uint16_t cpi) { - int cpival = constrain((cpi / 100) - 1, 0, 0x77); // limits to 0--119 - - spi_start_adv(); - spi_write_adv(REG_Config1, cpival); - spi_stop(); -} - -bool pmw_spi_init(void) { - spi_init(); - _inBurst = false; - - spi_stop(); - spi_start_adv(); - spi_stop(); - - spi_write_adv(REG_Shutdown, 0xb6); // Shutdown first - wait_ms(300); - - spi_start_adv(); - wait_us(40); - spi_stop_adv(); - wait_us(40); - - spi_write_adv(REG_Power_Up_Reset, 0x5a); - wait_ms(50); - - spi_read_adv(REG_Motion); - spi_read_adv(REG_Delta_X_L); - spi_read_adv(REG_Delta_X_H); - spi_read_adv(REG_Delta_Y_L); - spi_read_adv(REG_Delta_Y_H); - - pmw_upload_firmware(); - - spi_stop_adv(); - - wait_ms(10); - pmw_set_cpi(PMW_CPI); - - wait_ms(1); - - return pmw_check_signature(); -} - -void pmw_upload_firmware(void) { - spi_write_adv(REG_Config2, 0x00); - - spi_write_adv(REG_Angle_Tune, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30)); - - spi_write_adv(REG_SROM_Enable, 0x1d); - - wait_ms(10); - - spi_write_adv(REG_SROM_Enable, 0x18); - - spi_start_adv(); - spi_write(REG_SROM_Load_Burst | 0x80); - wait_us(15); - - unsigned char c; - for (int i = 0; i < firmware_length; i++) { - c = (unsigned char)pgm_read_byte(firmware_data + i); - spi_write(c); - wait_us(15); - } - wait_us(200); - - spi_read_adv(REG_SROM_ID); - - spi_write_adv(REG_Config2, 0x00); - - spi_stop(); - wait_ms(10); -} - -bool pmw_check_signature(void) { - uint8_t pid = spi_read_adv(REG_Product_ID); - uint8_t iv_pid = spi_read_adv(REG_Inverse_Product_ID); - uint8_t SROM_ver = spi_read_adv(REG_SROM_ID); - return (pid == 0x42 && iv_pid == 0xBD && SROM_ver == 0x04); // signature for SROM 0x04 -} - -report_pmw_t pmw_read_burst(void) { - if (!_inBurst) { - dprintf("burst on"); - spi_write_adv(REG_Motion_Burst, 0x00); - _inBurst = true; - } - - spi_start_adv(); - spi_write(REG_Motion_Burst); - wait_us(35); // waits for tSRAD - - report_pmw_t data; - data.motion = 0; - data.dx = 0; - data.mdx = 0; - data.dy = 0; - data.mdx = 0; - - data.motion = spi_read(); - spi_write(0x00); // skip Observation - data.dx = spi_read(); - data.mdx = spi_read(); - data.dy = spi_read(); - data.mdy = spi_read(); - - spi_stop(); - - print_byte(data.motion); - print_byte(data.dx); - print_byte(data.mdx); - print_byte(data.dy); - print_byte(data.mdy); - dprintf("\n"); - - data.isMotion = (data.motion & 0x80) != 0; - data.isOnSurface = (data.motion & 0x08) == 0; - data.dx |= (data.mdx << 8); - data.dx = data.dx * -1; - data.dy |= (data.mdy << 8); - data.dy = data.dy * -1; - - spi_stop(); - - if (data.motion & 0b111) { // panic recovery, sometimes burst mode works weird. - _inBurst = false; - } - - return data; -} diff --git a/keyboards/ploopyco/pmw3360.h b/keyboards/ploopyco/pmw3360.h deleted file mode 100644 index c1d5e3bad..000000000 --- a/keyboards/ploopyco/pmw3360.h +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) - * Copyright 2019 Sunjun Kim - * Copyright 2020 Ploopy Corporation - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 "spi_master.h" - -// Registers -#define REG_Product_ID 0x00 -#define REG_Revision_ID 0x01 -#define REG_Motion 0x02 -#define REG_Delta_X_L 0x03 -#define REG_Delta_X_H 0x04 -#define REG_Delta_Y_L 0x05 -#define REG_Delta_Y_H 0x06 -#define REG_SQUAL 0x07 -#define REG_Raw_Data_Sum 0x08 -#define REG_Maximum_Raw_data 0x09 -#define REG_Minimum_Raw_data 0x0A -#define REG_Shutter_Lower 0x0B -#define REG_Shutter_Upper 0x0C -#define REG_Control 0x0D -#define REG_Config1 0x0F -#define REG_Config2 0x10 -#define REG_Angle_Tune 0x11 -#define REG_Frame_Capture 0x12 -#define REG_SROM_Enable 0x13 -#define REG_Run_Downshift 0x14 -#define REG_Rest1_Rate_Lower 0x15 -#define REG_Rest1_Rate_Upper 0x16 -#define REG_Rest1_Downshift 0x17 -#define REG_Rest2_Rate_Lower 0x18 -#define REG_Rest2_Rate_Upper 0x19 -#define REG_Rest2_Downshift 0x1A -#define REG_Rest3_Rate_Lower 0x1B -#define REG_Rest3_Rate_Upper 0x1C -#define REG_Observation 0x24 -#define REG_Data_Out_Lower 0x25 -#define REG_Data_Out_Upper 0x26 -#define REG_Raw_Data_Dump 0x29 -#define REG_SROM_ID 0x2A -#define REG_Min_SQ_Run 0x2B -#define REG_Raw_Data_Threshold 0x2C -#define REG_Config5 0x2F -#define REG_Power_Up_Reset 0x3A -#define REG_Shutdown 0x3B -#define REG_Inverse_Product_ID 0x3F -#define REG_LiftCutoff_Tune3 0x41 -#define REG_Angle_Snap 0x42 -#define REG_LiftCutoff_Tune1 0x4A -#define REG_Motion_Burst 0x50 -#define REG_LiftCutoff_Tune_Timeout 0x58 -#define REG_LiftCutoff_Tune_Min_Length 0x5A -#define REG_SROM_Load_Burst 0x62 -#define REG_Lift_Config 0x63 -#define REG_Raw_Data_Burst 0x64 -#define REG_LiftCutoff_Tune2 0x65 - -#ifdef CONSOLE_ENABLE -void print_byte(uint8_t byte); -#endif - -typedef struct { - int8_t motion; - bool isMotion; // True if a motion is detected. - bool isOnSurface; // True when a chip is on a surface - int16_t dx; // displacement on x directions. Unit: Count. (CPI * Count = Inch value) - int8_t mdx; - int16_t dy; // displacement on y directions. - int8_t mdy; -} report_pmw_t; - - - -bool spi_start_adv(void); -void spi_stop_adv(void); -spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data); -uint8_t spi_read_adv(uint8_t reg_addr); -bool pmw_spi_init(void); -void pmw_set_cpi(uint16_t cpi); -void pmw_upload_firmware(void); -bool pmw_check_signature(void); -report_pmw_t pmw_read_burst(void); - - -#define degToRad(angleInDegrees) ((angleInDegrees)*M_PI / 180.0) -#define radToDeg(angleInRadians) ((angleInRadians)*180.0 / M_PI) -#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt))) diff --git a/keyboards/ploopyco/pmw3360_firmware.h b/keyboards/ploopyco/pmw3360_firmware.h deleted file mode 100644 index cca5a6a4d..000000000 --- a/keyboards/ploopyco/pmw3360_firmware.h +++ /dev/null @@ -1,300 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) - * Copyright 2019 Sunjun Kim - * Copyright 2020 Ploopy Corporation - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -// clang-format off -// Firmware Blob foor PMW3360 -const uint16_t firmware_length = 4094; -// clang-format off -const uint8_t firmware_data[] PROGMEM = { // SROM 0x04 -0x01, 0x04, 0x8e, 0x96, 0x6e, 0x77, 0x3e, 0xfe, 0x7e, 0x5f, 0x1d, 0xb8, 0xf2, 0x66, 0x4e, -0xff, 0x5d, 0x19, 0xb0, 0xc2, 0x04, 0x69, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0xb0, -0xc3, 0xe5, 0x29, 0xb1, 0xe0, 0x23, 0xa5, 0xa9, 0xb1, 0xc1, 0x00, 0x82, 0x67, 0x4c, 0x1a, -0x97, 0x8d, 0x79, 0x51, 0x20, 0xc7, 0x06, 0x8e, 0x7c, 0x7c, 0x7a, 0x76, 0x4f, 0xfd, 0x59, -0x30, 0xe2, 0x46, 0x0e, 0x9e, 0xbe, 0xdf, 0x1d, 0x99, 0x91, 0xa0, 0xa5, 0xa1, 0xa9, 0xd0, -0x22, 0xc6, 0xef, 0x5c, 0x1b, 0x95, 0x89, 0x90, 0xa2, 0xa7, 0xcc, 0xfb, 0x55, 0x28, 0xb3, -0xe4, 0x4a, 0xf7, 0x6c, 0x3b, 0xf4, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0x9d, 0xb8, 0xd3, 0x05, -0x88, 0x92, 0xa6, 0xce, 0x1e, 0xbe, 0xdf, 0x1d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x5c, 0x07, -0x11, 0x5d, 0x98, 0x0b, 0x9d, 0x94, 0x97, 0xee, 0x4e, 0x45, 0x33, 0x6b, 0x44, 0xc7, 0x29, -0x56, 0x27, 0x30, 0xc6, 0xa7, 0xd5, 0xf2, 0x56, 0xdf, 0xb4, 0x38, 0x62, 0xcb, 0xa0, 0xb6, -0xe3, 0x0f, 0x84, 0x06, 0x24, 0x05, 0x65, 0x6f, 0x76, 0x89, 0xb5, 0x77, 0x41, 0x27, 0x82, -0x66, 0x65, 0x82, 0xcc, 0xd5, 0xe6, 0x20, 0xd5, 0x27, 0x17, 0xc5, 0xf8, 0x03, 0x23, 0x7c, -0x5f, 0x64, 0xa5, 0x1d, 0xc1, 0xd6, 0x36, 0xcb, 0x4c, 0xd4, 0xdb, 0x66, 0xd7, 0x8b, 0xb1, -0x99, 0x7e, 0x6f, 0x4c, 0x36, 0x40, 0x06, 0xd6, 0xeb, 0xd7, 0xa2, 0xe4, 0xf4, 0x95, 0x51, -0x5a, 0x54, 0x96, 0xd5, 0x53, 0x44, 0xd7, 0x8c, 0xe0, 0xb9, 0x40, 0x68, 0xd2, 0x18, 0xe9, -0xdd, 0x9a, 0x23, 0x92, 0x48, 0xee, 0x7f, 0x43, 0xaf, 0xea, 0x77, 0x38, 0x84, 0x8c, 0x0a, -0x72, 0xaf, 0x69, 0xf8, 0xdd, 0xf1, 0x24, 0x83, 0xa3, 0xf8, 0x4a, 0xbf, 0xf5, 0x94, 0x13, -0xdb, 0xbb, 0xd8, 0xb4, 0xb3, 0xa0, 0xfb, 0x45, 0x50, 0x60, 0x30, 0x59, 0x12, 0x31, 0x71, -0xa2, 0xd3, 0x13, 0xe7, 0xfa, 0xe7, 0xce, 0x0f, 0x63, 0x15, 0x0b, 0x6b, 0x94, 0xbb, 0x37, -0x83, 0x26, 0x05, 0x9d, 0xfb, 0x46, 0x92, 0xfc, 0x0a, 0x15, 0xd1, 0x0d, 0x73, 0x92, 0xd6, -0x8c, 0x1b, 0x8c, 0xb8, 0x55, 0x8a, 0xce, 0xbd, 0xfe, 0x8e, 0xfc, 0xed, 0x09, 0x12, 0x83, -0x91, 0x82, 0x51, 0x31, 0x23, 0xfb, 0xb4, 0x0c, 0x76, 0xad, 0x7c, 0xd9, 0xb4, 0x4b, 0xb2, -0x67, 0x14, 0x09, 0x9c, 0x7f, 0x0c, 0x18, 0xba, 0x3b, 0xd6, 0x8e, 0x14, 0x2a, 0xe4, 0x1b, -0x52, 0x9f, 0x2b, 0x7d, 0xe1, 0xfb, 0x6a, 0x33, 0x02, 0xfa, 0xac, 0x5a, 0xf2, 0x3e, 0x88, -0x7e, 0xae, 0xd1, 0xf3, 0x78, 0xe8, 0x05, 0xd1, 0xe3, 0xdc, 0x21, 0xf6, 0xe1, 0x9a, 0xbd, -0x17, 0x0e, 0xd9, 0x46, 0x9b, 0x88, 0x03, 0xea, 0xf6, 0x66, 0xbe, 0x0e, 0x1b, 0x50, 0x49, -0x96, 0x40, 0x97, 0xf1, 0xf1, 0xe4, 0x80, 0xa6, 0x6e, 0xe8, 0x77, 0x34, 0xbf, 0x29, 0x40, -0x44, 0xc2, 0xff, 0x4e, 0x98, 0xd3, 0x9c, 0xa3, 0x32, 0x2b, 0x76, 0x51, 0x04, 0x09, 0xe7, -0xa9, 0xd1, 0xa6, 0x32, 0xb1, 0x23, 0x53, 0xe2, 0x47, 0xab, 0xd6, 0xf5, 0x69, 0x5c, 0x3e, -0x5f, 0xfa, 0xae, 0x45, 0x20, 0xe5, 0xd2, 0x44, 0xff, 0x39, 0x32, 0x6d, 0xfd, 0x27, 0x57, -0x5c, 0xfd, 0xf0, 0xde, 0xc1, 0xb5, 0x99, 0xe5, 0xf5, 0x1c, 0x77, 0x01, 0x75, 0xc5, 0x6d, -0x58, 0x92, 0xf2, 0xb2, 0x47, 0x00, 0x01, 0x26, 0x96, 0x7a, 0x30, 0xff, 0xb7, 0xf0, 0xef, -0x77, 0xc1, 0x8a, 0x5d, 0xdc, 0xc0, 0xd1, 0x29, 0x30, 0x1e, 0x77, 0x38, 0x7a, 0x94, 0xf1, -0xb8, 0x7a, 0x7e, 0xef, 0xa4, 0xd1, 0xac, 0x31, 0x4a, 0xf2, 0x5d, 0x64, 0x3d, 0xb2, 0xe2, -0xf0, 0x08, 0x99, 0xfc, 0x70, 0xee, 0x24, 0xa7, 0x7e, 0xee, 0x1e, 0x20, 0x69, 0x7d, 0x44, -0xbf, 0x87, 0x42, 0xdf, 0x88, 0x3b, 0x0c, 0xda, 0x42, 0xc9, 0x04, 0xf9, 0x45, 0x50, 0xfc, -0x83, 0x8f, 0x11, 0x6a, 0x72, 0xbc, 0x99, 0x95, 0xf0, 0xac, 0x3d, 0xa7, 0x3b, 0xcd, 0x1c, -0xe2, 0x88, 0x79, 0x37, 0x11, 0x5f, 0x39, 0x89, 0x95, 0x0a, 0x16, 0x84, 0x7a, 0xf6, 0x8a, -0xa4, 0x28, 0xe4, 0xed, 0x83, 0x80, 0x3b, 0xb1, 0x23, 0xa5, 0x03, 0x10, 0xf4, 0x66, 0xea, -0xbb, 0x0c, 0x0f, 0xc5, 0xec, 0x6c, 0x69, 0xc5, 0xd3, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0x99, -0x88, 0x76, 0x08, 0xa0, 0xa8, 0x95, 0x7c, 0xd8, 0x38, 0x6d, 0xcd, 0x59, 0x02, 0x51, 0x4b, -0xf1, 0xb5, 0x2b, 0x50, 0xe3, 0xb6, 0xbd, 0xd0, 0x72, 0xcf, 0x9e, 0xfd, 0x6e, 0xbb, 0x44, -0xc8, 0x24, 0x8a, 0x77, 0x18, 0x8a, 0x13, 0x06, 0xef, 0x97, 0x7d, 0xfa, 0x81, 0xf0, 0x31, -0xe6, 0xfa, 0x77, 0xed, 0x31, 0x06, 0x31, 0x5b, 0x54, 0x8a, 0x9f, 0x30, 0x68, 0xdb, 0xe2, -0x40, 0xf8, 0x4e, 0x73, 0xfa, 0xab, 0x74, 0x8b, 0x10, 0x58, 0x13, 0xdc, 0xd2, 0xe6, 0x78, -0xd1, 0x32, 0x2e, 0x8a, 0x9f, 0x2c, 0x58, 0x06, 0x48, 0x27, 0xc5, 0xa9, 0x5e, 0x81, 0x47, -0x89, 0x46, 0x21, 0x91, 0x03, 0x70, 0xa4, 0x3e, 0x88, 0x9c, 0xda, 0x33, 0x0a, 0xce, 0xbc, -0x8b, 0x8e, 0xcf, 0x9f, 0xd3, 0x71, 0x80, 0x43, 0xcf, 0x6b, 0xa9, 0x51, 0x83, 0x76, 0x30, -0x82, 0xc5, 0x6a, 0x85, 0x39, 0x11, 0x50, 0x1a, 0x82, 0xdc, 0x1e, 0x1c, 0xd5, 0x7d, 0xa9, -0x71, 0x99, 0x33, 0x47, 0x19, 0x97, 0xb3, 0x5a, 0xb1, 0xdf, 0xed, 0xa4, 0xf2, 0xe6, 0x26, -0x84, 0xa2, 0x28, 0x9a, 0x9e, 0xdf, 0xa6, 0x6a, 0xf4, 0xd6, 0xfc, 0x2e, 0x5b, 0x9d, 0x1a, -0x2a, 0x27, 0x68, 0xfb, 0xc1, 0x83, 0x21, 0x4b, 0x90, 0xe0, 0x36, 0xdd, 0x5b, 0x31, 0x42, -0x55, 0xa0, 0x13, 0xf7, 0xd0, 0x89, 0x53, 0x71, 0x99, 0x57, 0x09, 0x29, 0xc5, 0xf3, 0x21, -0xf8, 0x37, 0x2f, 0x40, 0xf3, 0xd4, 0xaf, 0x16, 0x08, 0x36, 0x02, 0xfc, 0x77, 0xc5, 0x8b, -0x04, 0x90, 0x56, 0xb9, 0xc9, 0x67, 0x9a, 0x99, 0xe8, 0x00, 0xd3, 0x86, 0xff, 0x97, 0x2d, -0x08, 0xe9, 0xb7, 0xb3, 0x91, 0xbc, 0xdf, 0x45, 0xc6, 0xed, 0x0f, 0x8c, 0x4c, 0x1e, 0xe6, -0x5b, 0x6e, 0x38, 0x30, 0xe4, 0xaa, 0xe3, 0x95, 0xde, 0xb9, 0xe4, 0x9a, 0xf5, 0xb2, 0x55, -0x9a, 0x87, 0x9b, 0xf6, 0x6a, 0xb2, 0xf2, 0x77, 0x9a, 0x31, 0xf4, 0x7a, 0x31, 0xd1, 0x1d, -0x04, 0xc0, 0x7c, 0x32, 0xa2, 0x9e, 0x9a, 0xf5, 0x62, 0xf8, 0x27, 0x8d, 0xbf, 0x51, 0xff, -0xd3, 0xdf, 0x64, 0x37, 0x3f, 0x2a, 0x6f, 0x76, 0x3a, 0x7d, 0x77, 0x06, 0x9e, 0x77, 0x7f, -0x5e, 0xeb, 0x32, 0x51, 0xf9, 0x16, 0x66, 0x9a, 0x09, 0xf3, 0xb0, 0x08, 0xa4, 0x70, 0x96, -0x46, 0x30, 0xff, 0xda, 0x4f, 0xe9, 0x1b, 0xed, 0x8d, 0xf8, 0x74, 0x1f, 0x31, 0x92, 0xb3, -0x73, 0x17, 0x36, 0xdb, 0x91, 0x30, 0xd6, 0x88, 0x55, 0x6b, 0x34, 0x77, 0x87, 0x7a, 0xe7, -0xee, 0x06, 0xc6, 0x1c, 0x8c, 0x19, 0x0c, 0x48, 0x46, 0x23, 0x5e, 0x9c, 0x07, 0x5c, 0xbf, -0xb4, 0x7e, 0xd6, 0x4f, 0x74, 0x9c, 0xe2, 0xc5, 0x50, 0x8b, 0xc5, 0x8b, 0x15, 0x90, 0x60, -0x62, 0x57, 0x29, 0xd0, 0x13, 0x43, 0xa1, 0x80, 0x88, 0x91, 0x00, 0x44, 0xc7, 0x4d, 0x19, -0x86, 0xcc, 0x2f, 0x2a, 0x75, 0x5a, 0xfc, 0xeb, 0x97, 0x2a, 0x70, 0xe3, 0x78, 0xd8, 0x91, -0xb0, 0x4f, 0x99, 0x07, 0xa3, 0x95, 0xea, 0x24, 0x21, 0xd5, 0xde, 0x51, 0x20, 0x93, 0x27, -0x0a, 0x30, 0x73, 0xa8, 0xff, 0x8a, 0x97, 0xe9, 0xa7, 0x6a, 0x8e, 0x0d, 0xe8, 0xf0, 0xdf, -0xec, 0xea, 0xb4, 0x6c, 0x1d, 0x39, 0x2a, 0x62, 0x2d, 0x3d, 0x5a, 0x8b, 0x65, 0xf8, 0x90, -0x05, 0x2e, 0x7e, 0x91, 0x2c, 0x78, 0xef, 0x8e, 0x7a, 0xc1, 0x2f, 0xac, 0x78, 0xee, 0xaf, -0x28, 0x45, 0x06, 0x4c, 0x26, 0xaf, 0x3b, 0xa2, 0xdb, 0xa3, 0x93, 0x06, 0xb5, 0x3c, 0xa5, -0xd8, 0xee, 0x8f, 0xaf, 0x25, 0xcc, 0x3f, 0x85, 0x68, 0x48, 0xa9, 0x62, 0xcc, 0x97, 0x8f, -0x7f, 0x2a, 0xea, 0xe0, 0x15, 0x0a, 0xad, 0x62, 0x07, 0xbd, 0x45, 0xf8, 0x41, 0xd8, 0x36, -0xcb, 0x4c, 0xdb, 0x6e, 0xe6, 0x3a, 0xe7, 0xda, 0x15, 0xe9, 0x29, 0x1e, 0x12, 0x10, 0xa0, -0x14, 0x2c, 0x0e, 0x3d, 0xf4, 0xbf, 0x39, 0x41, 0x92, 0x75, 0x0b, 0x25, 0x7b, 0xa3, 0xce, -0x39, 0x9c, 0x15, 0x64, 0xc8, 0xfa, 0x3d, 0xef, 0x73, 0x27, 0xfe, 0x26, 0x2e, 0xce, 0xda, -0x6e, 0xfd, 0x71, 0x8e, 0xdd, 0xfe, 0x76, 0xee, 0xdc, 0x12, 0x5c, 0x02, 0xc5, 0x3a, 0x4e, -0x4e, 0x4f, 0xbf, 0xca, 0x40, 0x15, 0xc7, 0x6e, 0x8d, 0x41, 0xf1, 0x10, 0xe0, 0x4f, 0x7e, -0x97, 0x7f, 0x1c, 0xae, 0x47, 0x8e, 0x6b, 0xb1, 0x25, 0x31, 0xb0, 0x73, 0xc7, 0x1b, 0x97, -0x79, 0xf9, 0x80, 0xd3, 0x66, 0x22, 0x30, 0x07, 0x74, 0x1e, 0xe4, 0xd0, 0x80, 0x21, 0xd6, -0xee, 0x6b, 0x6c, 0x4f, 0xbf, 0xf5, 0xb7, 0xd9, 0x09, 0x87, 0x2f, 0xa9, 0x14, 0xbe, 0x27, -0xd9, 0x72, 0x50, 0x01, 0xd4, 0x13, 0x73, 0xa6, 0xa7, 0x51, 0x02, 0x75, 0x25, 0xe1, 0xb3, -0x45, 0x34, 0x7d, 0xa8, 0x8e, 0xeb, 0xf3, 0x16, 0x49, 0xcb, 0x4f, 0x8c, 0xa1, 0xb9, 0x36, -0x85, 0x39, 0x75, 0x5d, 0x08, 0x00, 0xae, 0xeb, 0xf6, 0xea, 0xd7, 0x13, 0x3a, 0x21, 0x5a, -0x5f, 0x30, 0x84, 0x52, 0x26, 0x95, 0xc9, 0x14, 0xf2, 0x57, 0x55, 0x6b, 0xb1, 0x10, 0xc2, -0xe1, 0xbd, 0x3b, 0x51, 0xc0, 0xb7, 0x55, 0x4c, 0x71, 0x12, 0x26, 0xc7, 0x0d, 0xf9, 0x51, -0xa4, 0x38, 0x02, 0x05, 0x7f, 0xb8, 0xf1, 0x72, 0x4b, 0xbf, 0x71, 0x89, 0x14, 0xf3, 0x77, -0x38, 0xd9, 0x71, 0x24, 0xf3, 0x00, 0x11, 0xa1, 0xd8, 0xd4, 0x69, 0x27, 0x08, 0x37, 0x35, -0xc9, 0x11, 0x9d, 0x90, 0x1c, 0x0e, 0xe7, 0x1c, 0xff, 0x2d, 0x1e, 0xe8, 0x92, 0xe1, 0x18, -0x10, 0x95, 0x7c, 0xe0, 0x80, 0xf4, 0x96, 0x43, 0x21, 0xf9, 0x75, 0x21, 0x64, 0x38, 0xdd, -0x9f, 0x1e, 0x95, 0x16, 0xda, 0x56, 0x1d, 0x4f, 0x9a, 0x53, 0xb2, 0xe2, 0xe4, 0x18, 0xcb, -0x6b, 0x1a, 0x65, 0xeb, 0x56, 0xc6, 0x3b, 0xe5, 0xfe, 0xd8, 0x26, 0x3f, 0x3a, 0x84, 0x59, -0x72, 0x66, 0xa2, 0xf3, 0x75, 0xff, 0xfb, 0x60, 0xb3, 0x22, 0xad, 0x3f, 0x2d, 0x6b, 0xf9, -0xeb, 0xea, 0x05, 0x7c, 0xd8, 0x8f, 0x6d, 0x2c, 0x98, 0x9e, 0x2b, 0x93, 0xf1, 0x5e, 0x46, -0xf0, 0x87, 0x49, 0x29, 0x73, 0x68, 0xd7, 0x7f, 0xf9, 0xf0, 0xe5, 0x7d, 0xdb, 0x1d, 0x75, -0x19, 0xf3, 0xc4, 0x58, 0x9b, 0x17, 0x88, 0xa8, 0x92, 0xe0, 0xbe, 0xbd, 0x8b, 0x1d, 0x8d, -0x9f, 0x56, 0x76, 0xad, 0xaf, 0x29, 0xe2, 0xd9, 0xd5, 0x52, 0xf6, 0xb5, 0x56, 0x35, 0x57, -0x3a, 0xc8, 0xe1, 0x56, 0x43, 0x19, 0x94, 0xd3, 0x04, 0x9b, 0x6d, 0x35, 0xd8, 0x0b, 0x5f, -0x4d, 0x19, 0x8e, 0xec, 0xfa, 0x64, 0x91, 0x0a, 0x72, 0x20, 0x2b, 0xbc, 0x1a, 0x4a, 0xfe, -0x8b, 0xfd, 0xbb, 0xed, 0x1b, 0x23, 0xea, 0xad, 0x72, 0x82, 0xa1, 0x29, 0x99, 0x71, 0xbd, -0xf0, 0x95, 0xc1, 0x03, 0xdd, 0x7b, 0xc2, 0xb2, 0x3c, 0x28, 0x54, 0xd3, 0x68, 0xa4, 0x72, -0xc8, 0x66, 0x96, 0xe0, 0xd1, 0xd8, 0x7f, 0xf8, 0xd1, 0x26, 0x2b, 0xf7, 0xad, 0xba, 0x55, -0xca, 0x15, 0xb9, 0x32, 0xc3, 0xe5, 0x88, 0x97, 0x8e, 0x5c, 0xfb, 0x92, 0x25, 0x8b, 0xbf, -0xa2, 0x45, 0x55, 0x7a, 0xa7, 0x6f, 0x8b, 0x57, 0x5b, 0xcf, 0x0e, 0xcb, 0x1d, 0xfb, 0x20, -0x82, 0x77, 0xa8, 0x8c, 0xcc, 0x16, 0xce, 0x1d, 0xfa, 0xde, 0xcc, 0x0b, 0x62, 0xfe, 0xcc, -0xe1, 0xb7, 0xf0, 0xc3, 0x81, 0x64, 0x73, 0x40, 0xa0, 0xc2, 0x4d, 0x89, 0x11, 0x75, 0x33, -0x55, 0x33, 0x8d, 0xe8, 0x4a, 0xfd, 0xea, 0x6e, 0x30, 0x0b, 0xd7, 0x31, 0x2c, 0xde, 0x47, -0xe3, 0xbf, 0xf8, 0x55, 0x42, 0xe2, 0x7f, 0x59, 0xe5, 0x17, 0xef, 0x99, 0x34, 0x69, 0x91, -0xb1, 0x23, 0x8e, 0x20, 0x87, 0x2d, 0xa8, 0xfe, 0xd5, 0x8a, 0xf3, 0x84, 0x3a, 0xf0, 0x37, -0xe4, 0x09, 0x00, 0x54, 0xee, 0x67, 0x49, 0x93, 0xe4, 0x81, 0x70, 0xe3, 0x90, 0x4d, 0xef, -0xfe, 0x41, 0xb7, 0x99, 0x7b, 0xc1, 0x83, 0xba, 0x62, 0x12, 0x6f, 0x7d, 0xde, 0x6b, 0xaf, -0xda, 0x16, 0xf9, 0x55, 0x51, 0xee, 0xa6, 0x0c, 0x2b, 0x02, 0xa3, 0xfd, 0x8d, 0xfb, 0x30, -0x17, 0xe4, 0x6f, 0xdf, 0x36, 0x71, 0xc4, 0xca, 0x87, 0x25, 0x48, 0xb0, 0x47, 0xec, 0xea, -0xb4, 0xbf, 0xa5, 0x4d, 0x9b, 0x9f, 0x02, 0x93, 0xc4, 0xe3, 0xe4, 0xe8, 0x42, 0x2d, 0x68, -0x81, 0x15, 0x0a, 0xeb, 0x84, 0x5b, 0xd6, 0xa8, 0x74, 0xfb, 0x7d, 0x1d, 0xcb, 0x2c, 0xda, -0x46, 0x2a, 0x76, 0x62, 0xce, 0xbc, 0x5c, 0x9e, 0x8b, 0xe7, 0xcf, 0xbe, 0x78, 0xf5, 0x7c, -0xeb, 0xb3, 0x3a, 0x9c, 0xaa, 0x6f, 0xcc, 0x72, 0xd1, 0x59, 0xf2, 0x11, 0x23, 0xd6, 0x3f, -0x48, 0xd1, 0xb7, 0xce, 0xb0, 0xbf, 0xcb, 0xea, 0x80, 0xde, 0x57, 0xd4, 0x5e, 0x97, 0x2f, -0x75, 0xd1, 0x50, 0x8e, 0x80, 0x2c, 0x66, 0x79, 0xbf, 0x72, 0x4b, 0xbd, 0x8a, 0x81, 0x6c, -0xd3, 0xe1, 0x01, 0xdc, 0xd2, 0x15, 0x26, 0xc5, 0x36, 0xda, 0x2c, 0x1a, 0xc0, 0x27, 0x94, -0xed, 0xb7, 0x9b, 0x85, 0x0b, 0x5e, 0x80, 0x97, 0xc5, 0xec, 0x4f, 0xec, 0x88, 0x5d, 0x50, -0x07, 0x35, 0x47, 0xdc, 0x0b, 0x3b, 0x3d, 0xdd, 0x60, 0xaf, 0xa8, 0x5d, 0x81, 0x38, 0x24, -0x25, 0x5d, 0x5c, 0x15, 0xd1, 0xde, 0xb3, 0xab, 0xec, 0x05, 0x69, 0xef, 0x83, 0xed, 0x57, -0x54, 0xb8, 0x64, 0x64, 0x11, 0x16, 0x32, 0x69, 0xda, 0x9f, 0x2d, 0x7f, 0x36, 0xbb, 0x44, -0x5a, 0x34, 0xe8, 0x7f, 0xbf, 0x03, 0xeb, 0x00, 0x7f, 0x59, 0x68, 0x22, 0x79, 0xcf, 0x73, -0x6c, 0x2c, 0x29, 0xa7, 0xa1, 0x5f, 0x38, 0xa1, 0x1d, 0xf0, 0x20, 0x53, 0xe0, 0x1a, 0x63, -0x14, 0x58, 0x71, 0x10, 0xaa, 0x08, 0x0c, 0x3e, 0x16, 0x1a, 0x60, 0x22, 0x82, 0x7f, 0xba, -0xa4, 0x43, 0xa0, 0xd0, 0xac, 0x1b, 0xd5, 0x6b, 0x64, 0xb5, 0x14, 0x93, 0x31, 0x9e, 0x53, -0x50, 0xd0, 0x57, 0x66, 0xee, 0x5a, 0x4f, 0xfb, 0x03, 0x2a, 0x69, 0x58, 0x76, 0xf1, 0x83, -0xf7, 0x4e, 0xba, 0x8c, 0x42, 0x06, 0x60, 0x5d, 0x6d, 0xce, 0x60, 0x88, 0xae, 0xa4, 0xc3, -0xf1, 0x03, 0xa5, 0x4b, 0x98, 0xa1, 0xff, 0x67, 0xe1, 0xac, 0xa2, 0xb8, 0x62, 0xd7, 0x6f, -0xa0, 0x31, 0xb4, 0xd2, 0x77, 0xaf, 0x21, 0x10, 0x06, 0xc6, 0x9a, 0xff, 0x1d, 0x09, 0x17, -0x0e, 0x5f, 0xf1, 0xaa, 0x54, 0x34, 0x4b, 0x45, 0x8a, 0x87, 0x63, 0xa6, 0xdc, 0xf9, 0x24, -0x30, 0x67, 0xc6, 0xb2, 0xd6, 0x61, 0x33, 0x69, 0xee, 0x50, 0x61, 0x57, 0x28, 0xe7, 0x7e, -0xee, 0xec, 0x3a, 0x5a, 0x73, 0x4e, 0xa8, 0x8d, 0xe4, 0x18, 0xea, 0xec, 0x41, 0x64, 0xc8, -0xe2, 0xe8, 0x66, 0xb6, 0x2d, 0xb6, 0xfb, 0x6a, 0x6c, 0x16, 0xb3, 0xdd, 0x46, 0x43, 0xb9, -0x73, 0x00, 0x6a, 0x71, 0xed, 0x4e, 0x9d, 0x25, 0x1a, 0xc3, 0x3c, 0x4a, 0x95, 0x15, 0x99, -0x35, 0x81, 0x14, 0x02, 0xd6, 0x98, 0x9b, 0xec, 0xd8, 0x23, 0x3b, 0x84, 0x29, 0xaf, 0x0c, -0x99, 0x83, 0xa6, 0x9a, 0x34, 0x4f, 0xfa, 0xe8, 0xd0, 0x3c, 0x4b, 0xd0, 0xfb, 0xb6, 0x68, -0xb8, 0x9e, 0x8f, 0xcd, 0xf7, 0x60, 0x2d, 0x7a, 0x22, 0xe5, 0x7d, 0xab, 0x65, 0x1b, 0x95, -0xa7, 0xa8, 0x7f, 0xb6, 0x77, 0x47, 0x7b, 0x5f, 0x8b, 0x12, 0x72, 0xd0, 0xd4, 0x91, 0xef, -0xde, 0x19, 0x50, 0x3c, 0xa7, 0x8b, 0xc4, 0xa9, 0xb3, 0x23, 0xcb, 0x76, 0xe6, 0x81, 0xf0, -0xc1, 0x04, 0x8f, 0xa3, 0xb8, 0x54, 0x5b, 0x97, 0xac, 0x19, 0xff, 0x3f, 0x55, 0x27, 0x2f, -0xe0, 0x1d, 0x42, 0x9b, 0x57, 0xfc, 0x4b, 0x4e, 0x0f, 0xce, 0x98, 0xa9, 0x43, 0x57, 0x03, -0xbd, 0xe7, 0xc8, 0x94, 0xdf, 0x6e, 0x36, 0x73, 0x32, 0xb4, 0xef, 0x2e, 0x85, 0x7a, 0x6e, -0xfc, 0x6c, 0x18, 0x82, 0x75, 0x35, 0x90, 0x07, 0xf3, 0xe4, 0x9f, 0x3e, 0xdc, 0x68, 0xf3, -0xb5, 0xf3, 0x19, 0x80, 0x92, 0x06, 0x99, 0xa2, 0xe8, 0x6f, 0xff, 0x2e, 0x7f, 0xae, 0x42, -0xa4, 0x5f, 0xfb, 0xd4, 0x0e, 0x81, 0x2b, 0xc3, 0x04, 0xff, 0x2b, 0xb3, 0x74, 0x4e, 0x36, -0x5b, 0x9c, 0x15, 0x00, 0xc6, 0x47, 0x2b, 0xe8, 0x8b, 0x3d, 0xf1, 0x9c, 0x03, 0x9a, 0x58, -0x7f, 0x9b, 0x9c, 0xbf, 0x85, 0x49, 0x79, 0x35, 0x2e, 0x56, 0x7b, 0x41, 0x14, 0x39, 0x47, -0x83, 0x26, 0xaa, 0x07, 0x89, 0x98, 0x11, 0x1b, 0x86, 0xe7, 0x73, 0x7a, 0xd8, 0x7d, 0x78, -0x61, 0x53, 0xe9, 0x79, 0xf5, 0x36, 0x8d, 0x44, 0x92, 0x84, 0xf9, 0x13, 0x50, 0x58, 0x3b, -0xa4, 0x6a, 0x36, 0x65, 0x49, 0x8e, 0x3c, 0x0e, 0xf1, 0x6f, 0xd2, 0x84, 0xc4, 0x7e, 0x8e, -0x3f, 0x39, 0xae, 0x7c, 0x84, 0xf1, 0x63, 0x37, 0x8e, 0x3c, 0xcc, 0x3e, 0x44, 0x81, 0x45, -0xf1, 0x4b, 0xb9, 0xed, 0x6b, 0x36, 0x5d, 0xbb, 0x20, 0x60, 0x1a, 0x0f, 0xa3, 0xaa, 0x55, -0x77, 0x3a, 0xa9, 0xae, 0x37, 0x4d, 0xba, 0xb8, 0x86, 0x6b, 0xbc, 0x08, 0x50, 0xf6, 0xcc, -0xa4, 0xbd, 0x1d, 0x40, 0x72, 0xa5, 0x86, 0xfa, 0xe2, 0x10, 0xae, 0x3d, 0x58, 0x4b, 0x97, -0xf3, 0x43, 0x74, 0xa9, 0x9e, 0xeb, 0x21, 0xb7, 0x01, 0xa4, 0x86, 0x93, 0x97, 0xee, 0x2f, -0x4f, 0x3b, 0x86, 0xa1, 0x41, 0x6f, 0x41, 0x26, 0x90, 0x78, 0x5c, 0x7f, 0x30, 0x38, 0x4b, -0x3f, 0xaa, 0xec, 0xed, 0x5c, 0x6f, 0x0e, 0xad, 0x43, 0x87, 0xfd, 0x93, 0x35, 0xe6, 0x01, -0xef, 0x41, 0x26, 0x90, 0x99, 0x9e, 0xfb, 0x19, 0x5b, 0xad, 0xd2, 0x91, 0x8a, 0xe0, 0x46, -0xaf, 0x65, 0xfa, 0x4f, 0x84, 0xc1, 0xa1, 0x2d, 0xcf, 0x45, 0x8b, 0xd3, 0x85, 0x50, 0x55, -0x7c, 0xf9, 0x67, 0x88, 0xd4, 0x4e, 0xe9, 0xd7, 0x6b, 0x61, 0x54, 0xa1, 0xa4, 0xa6, 0xa2, -0xc2, 0xbf, 0x30, 0x9c, 0x40, 0x9f, 0x5f, 0xd7, 0x69, 0x2b, 0x24, 0x82, 0x5e, 0xd9, 0xd6, -0xa7, 0x12, 0x54, 0x1a, 0xf7, 0x55, 0x9f, 0x76, 0x50, 0xa9, 0x95, 0x84, 0xe6, 0x6b, 0x6d, -0xb5, 0x96, 0x54, 0xd6, 0xcd, 0xb3, 0xa1, 0x9b, 0x46, 0xa7, 0x94, 0x4d, 0xc4, 0x94, 0xb4, -0x98, 0xe3, 0xe1, 0xe2, 0x34, 0xd5, 0x33, 0x16, 0x07, 0x54, 0xcd, 0xb7, 0x77, 0x53, 0xdb, -0x4f, 0x4d, 0x46, 0x9d, 0xe9, 0xd4, 0x9c, 0x8a, 0x36, 0xb6, 0xb8, 0x38, 0x26, 0x6c, 0x0e, -0xff, 0x9c, 0x1b, 0x43, 0x8b, 0x80, 0xcc, 0xb9, 0x3d, 0xda, 0xc7, 0xf1, 0x8a, 0xf2, 0x6d, -0xb8, 0xd7, 0x74, 0x2f, 0x7e, 0x1e, 0xb7, 0xd3, 0x4a, 0xb4, 0xac, 0xfc, 0x79, 0x48, 0x6c, -0xbc, 0x96, 0xb6, 0x94, 0x46, 0x57, 0x2d, 0xb0, 0xa3, 0xfc, 0x1e, 0xb9, 0x52, 0x60, 0x85, -0x2d, 0x41, 0xd0, 0x43, 0x01, 0x1e, 0x1c, 0xd5, 0x7d, 0xfc, 0xf3, 0x96, 0x0d, 0xc7, 0xcb, -0x2a, 0x29, 0x9a, 0x93, 0xdd, 0x88, 0x2d, 0x37, 0x5d, 0xaa, 0xfb, 0x49, 0x68, 0xa0, 0x9c, -0x50, 0x86, 0x7f, 0x68, 0x56, 0x57, 0xf9, 0x79, 0x18, 0x39, 0xd4, 0xe0, 0x01, 0x84, 0x33, -0x61, 0xca, 0xa5, 0xd2, 0xd6, 0xe4, 0xc9, 0x8a, 0x4a, 0x23, 0x44, 0x4e, 0xbc, 0xf0, 0xdc, -0x24, 0xa1, 0xa0, 0xc4, 0xe2, 0x07, 0x3c, 0x10, 0xc4, 0xb5, 0x25, 0x4b, 0x65, 0x63, 0xf4, -0x80, 0xe7, 0xcf, 0x61, 0xb1, 0x71, 0x82, 0x21, 0x87, 0x2c, 0xf5, 0x91, 0x00, 0x32, 0x0c, -0xec, 0xa9, 0xb5, 0x9a, 0x74, 0x85, 0xe3, 0x36, 0x8f, 0x76, 0x4f, 0x9c, 0x6d, 0xce, 0xbc, -0xad, 0x0a, 0x4b, 0xed, 0x76, 0x04, 0xcb, 0xc3, 0xb9, 0x33, 0x9e, 0x01, 0x93, 0x96, 0x69, -0x7d, 0xc5, 0xa2, 0x45, 0x79, 0x9b, 0x04, 0x5c, 0x84, 0x09, 0xed, 0x88, 0x43, 0xc7, 0xab, -0x93, 0x14, 0x26, 0xa1, 0x40, 0xb5, 0xce, 0x4e, 0xbf, 0x2a, 0x42, 0x85, 0x3e, 0x2c, 0x3b, -0x54, 0xe8, 0x12, 0x1f, 0x0e, 0x97, 0x59, 0xb2, 0x27, 0x89, 0xfa, 0xf2, 0xdf, 0x8e, 0x68, -0x59, 0xdc, 0x06, 0xbc, 0xb6, 0x85, 0x0d, 0x06, 0x22, 0xec, 0xb1, 0xcb, 0xe5, 0x04, 0xe6, -0x3d, 0xb3, 0xb0, 0x41, 0x73, 0x08, 0x3f, 0x3c, 0x58, 0x86, 0x63, 0xeb, 0x50, 0xee, 0x1d, -0x2c, 0x37, 0x74, 0xa9, 0xd3, 0x18, 0xa3, 0x47, 0x6e, 0x93, 0x54, 0xad, 0x0a, 0x5d, 0xb8, -0x2a, 0x55, 0x5d, 0x78, 0xf6, 0xee, 0xbe, 0x8e, 0x3c, 0x76, 0x69, 0xb9, 0x40, 0xc2, 0x34, -0xec, 0x2a, 0xb9, 0xed, 0x7e, 0x20, 0xe4, 0x8d, 0x00, 0x38, 0xc7, 0xe6, 0x8f, 0x44, 0xa8, -0x86, 0xce, 0xeb, 0x2a, 0xe9, 0x90, 0xf1, 0x4c, 0xdf, 0x32, 0xfb, 0x73, 0x1b, 0x6d, 0x92, -0x1e, 0x95, 0xfe, 0xb4, 0xdb, 0x65, 0xdf, 0x4d, 0x23, 0x54, 0x89, 0x48, 0xbf, 0x4a, 0x2e, -0x70, 0xd6, 0xd7, 0x62, 0xb4, 0x33, 0x29, 0xb1, 0x3a, 0x33, 0x4c, 0x23, 0x6d, 0xa6, 0x76, -0xa5, 0x21, 0x63, 0x48, 0xe6, 0x90, 0x5d, 0xed, 0x90, 0x95, 0x0b, 0x7a, 0x84, 0xbe, 0xb8, -0x0d, 0x5e, 0x63, 0x0c, 0x62, 0x26, 0x4c, 0x14, 0x5a, 0xb3, 0xac, 0x23, 0xa4, 0x74, 0xa7, -0x6f, 0x33, 0x30, 0x05, 0x60, 0x01, 0x42, 0xa0, 0x28, 0xb7, 0xee, 0x19, 0x38, 0xf1, 0x64, -0x80, 0x82, 0x43, 0xe1, 0x41, 0x27, 0x1f, 0x1f, 0x90, 0x54, 0x7a, 0xd5, 0x23, 0x2e, 0xd1, -0x3d, 0xcb, 0x28, 0xba, 0x58, 0x7f, 0xdc, 0x7c, 0x91, 0x24, 0xe9, 0x28, 0x51, 0x83, 0x6e, -0xc5, 0x56, 0x21, 0x42, 0xed, 0xa0, 0x56, 0x22, 0xa1, 0x40, 0x80, 0x6b, 0xa8, 0xf7, 0x94, -0xca, 0x13, 0x6b, 0x0c, 0x39, 0xd9, 0xfd, 0xe9, 0xf3, 0x6f, 0xa6, 0x9e, 0xfc, 0x70, 0x8a, -0xb3, 0xbc, 0x59, 0x3c, 0x1e, 0x1d, 0x6c, 0xf9, 0x7c, 0xaf, 0xf9, 0x88, 0x71, 0x95, 0xeb, -0x57, 0x00, 0xbd, 0x9f, 0x8c, 0x4f, 0xe1, 0x24, 0x83, 0xc5, 0x22, 0xea, 0xfd, 0xd3, 0x0c, -0xe2, 0x17, 0x18, 0x7c, 0x6a, 0x4c, 0xde, 0x77, 0xb4, 0x53, 0x9b, 0x4c, 0x81, 0xcd, 0x23, -0x60, 0xaa, 0x0e, 0x25, 0x73, 0x9c, 0x02, 0x79, 0x32, 0x30, 0xdf, 0x74, 0xdf, 0x75, 0x19, -0xf4, 0xa5, 0x14, 0x5c, 0xf7, 0x7a, 0xa8, 0xa5, 0x91, 0x84, 0x7c, 0x60, 0x03, 0x06, 0x3b, -0xcd, 0x50, 0xb6, 0x27, 0x9c, 0xfe, 0xb1, 0xdd, 0xcc, 0xd3, 0xb0, 0x59, 0x24, 0xb2, 0xca, -0xe2, 0x1c, 0x81, 0x22, 0x9d, 0x07, 0x8f, 0x8e, 0xb9, 0xbe, 0x4e, 0xfa, 0xfc, 0x39, 0x65, -0xba, 0xbf, 0x9d, 0x12, 0x37, 0x5e, 0x97, 0x7e, 0xf3, 0x89, 0xf5, 0x5d, 0xf5, 0xe3, 0x09, -0x8c, 0x62, 0xb5, 0x20, 0x9d, 0x0c, 0x53, 0x8a, 0x68, 0x1b, 0xd2, 0x8f, 0x75, 0x17, 0x5d, -0xd4, 0xe5, 0xda, 0x75, 0x62, 0x19, 0x14, 0x6a, 0x26, 0x2d, 0xeb, 0xf8, 0xaf, 0x37, 0xf0, -0x6c, 0xa4, 0x55, 0xb1, 0xbc, 0xe2, 0x33, 0xc0, 0x9a, 0xca, 0xb0, 0x11, 0x49, 0x4f, 0x68, -0x9b, 0x3b, 0x6b, 0x3c, 0xcc, 0x13, 0xf6, 0xc7, 0x85, 0x61, 0x68, 0x42, 0xae, 0xbb, 0xdd, -0xcd, 0x45, 0x16, 0x29, 0x1d, 0xea, 0xdb, 0xc8, 0x03, 0x94, 0x3c, 0xee, 0x4f, 0x82, 0x11, -0xc3, 0xec, 0x28, 0xbd, 0x97, 0x05, 0x99, 0xde, 0xd7, 0xbb, 0x5e, 0x22, 0x1f, 0xd4, 0xeb, -0x64, 0xd9, 0x92, 0xd9, 0x85, 0xb7, 0x6a, 0x05, 0x6a, 0xe4, 0x24, 0x41, 0xf1, 0xcd, 0xf0, -0xd8, 0x3f, 0xf8, 0x9e, 0x0e, 0xcd, 0x0b, 0x7a, 0x70, 0x6b, 0x5a, 0x75, 0x0a, 0x6a, 0x33, -0x88, 0xec, 0x17, 0x75, 0x08, 0x70, 0x10, 0x2f, 0x24, 0xcf, 0xc4, 0xe9, 0x42, 0x00, 0x61, -0x94, 0xca, 0x1f, 0x3a, 0x76, 0x06, 0xfa, 0xd2, 0x48, 0x81, 0xf0, 0x77, 0x60, 0x03, 0x45, -0xd9, 0x61, 0xf4, 0xa4, 0x6f, 0x3d, 0xd9, 0x30, 0xc3, 0x04, 0x6b, 0x54, 0x2a, 0xb7, 0xec, -0x3b, 0xf4, 0x4b, 0xf5, 0x68, 0x52, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xa5, -0xa9, 0xb1, 0xe0, 0x23, 0xc4, 0x0a, 0x77, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xa5, 0xa9, 0xb1, -0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0xeb, 0x54, 0x0b, -0x75, 0x68, 0x52, 0x07, 0x8c, 0x9a, 0x97, 0x8d, 0x79, 0x70, 0x62, 0x46, 0xef, 0x5c, 0x1b, -0x95, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x67, 0x4c, 0x1a, 0xb6, -0xcf, 0xfd, 0x78, 0x53, 0x24, 0xab, 0xb5, 0xc9, 0xf1, 0x60, 0x23, 0xa5, 0xc8, 0x12, 0x87, -0x6d, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xc7, 0x0c, 0x9a, 0x97, 0xac, -0xda, 0x36, 0xee, 0x5e, 0x3e, 0xdf, 0x1d, 0xb8, 0xf2, 0x66, 0x2f, 0xbd, 0xf8, 0x72, 0x47, -0xed, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x8c, 0x7b, 0x55, 0x09, 0x90, 0xa2, 0xc6, 0xef, -0x3d, 0xf8, 0x53, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0xec, 0x5a, 0x36, 0xee, 0x5e, 0x3e, 0xdf, -0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x59, 0x30, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x53, 0x05, 0x69, -0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0xb0, 0xe2, 0x27, 0xcc, 0xfb, 0x74, -0x4b, 0x14, 0x8b, 0x94, 0x8b, 0x75, 0x68, 0x33, 0xc5, 0x08, 0x92, 0x87, 0x8c, 0x9a, 0xb6, -0xcf, 0x1c, 0xba, 0xd7, 0x0d, 0x98, 0xb2, 0xe6, 0x2f, 0xdc, 0x1b, 0x95, 0x89, 0x71, 0x60, -0x23, 0xc4, 0x0a, 0x96, 0x8f, 0x9c, 0xba, 0xf6, 0x6e, 0x3f, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, -0x26, 0xaf, 0xbd, 0xf8, 0x72, 0x66, 0x2f, 0xdc, 0x1b, 0xb4, 0xcb, 0x14, 0x8b, 0x94, 0xaa, -0xb7, 0xcd, 0xf9, 0x51, 0x01, 0x80, 0x82, 0x86, 0x6f, 0x3d, 0xd9, 0x30, 0xe2, 0x27, 0xcc, -0xfb, 0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x70, 0x43, 0x04, 0x6b, 0x35, 0xc9, 0xf1, -0x60, 0x23, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xe6, 0x2f, 0xbd, -0xf8, 0x72, 0x66, 0x4e, 0x1e, 0xbe, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x1d, 0x99, 0x91, 0xa0, -0xa3, 0xc4, 0x0a, 0x77, 0x4d, 0x18, 0x93, 0xa4, 0xab, 0xd4, 0x0b, 0x75, 0x49, 0x10, 0xa2, -0xc6, 0xef, 0x3d, 0xf8, 0x53, 0x24, 0xab, 0xb5, 0xe8, 0x33, 0xe4, 0x4a, 0x16, 0xae, 0xde, -0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xb3, 0xc5, 0x08, 0x73, 0x45, 0xe9, 0x31, 0xc1, 0xe1, 0x21, -0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x86, 0x6f, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, 0x93, 0xa4, 0xca, -0x16, 0xae, 0xde, 0x1f, 0x9d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x72, 0x47, 0x0c, -0x9a, 0xb6, 0xcf, 0xfd, 0x59, 0x11, 0xa0, 0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, -0x6d, 0x39, 0xf0, 0x43, 0x04, 0x8a, 0x96, 0xae, 0xde, 0x3e, 0xdf, 0x1d, 0x99, 0x91, 0xa0, -0xc2, 0x06, 0x6f, 0x3d, 0xf8, 0x72, 0x47, 0x0c, 0x9a, 0x97, 0x8d, 0x98, 0x93, 0x85, 0x88, -0x73, 0x45, 0xe9, 0x31, 0xe0, 0x23, 0xa5, 0xa9, 0xd0, 0x03, 0x84, 0x8a, 0x96, 0xae, 0xde, -0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xd2, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0x81, 0x80, 0x82, -0x67, 0x2d, 0xd8, 0x13, 0xa4, 0xab, 0xd4, 0x0b, 0x94, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, -0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0xe9, 0x50, 0x22, 0xc6, 0xef, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, -0x93, 0x85, 0x88, 0x73, 0x64, 0x4a, 0xf7, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0x0a, 0x96, -0xae, 0xde, 0x3e, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x78, 0x72, -0x66, 0x2f, 0xbd, 0xd9, 0x30, 0xc3, 0xe5, 0x48, 0x12, 0x87, 0x8c, 0x7b, 0x55, 0x28, 0xd2, -0x07, 0x8c, 0x9a, 0x97, 0xac, 0xda, 0x17, 0x8d, 0x79, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x54, -0x0b, 0x94, 0x8b, 0x94, 0xaa, 0xd6, 0x2e, 0xbf, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, 0x26, 0xaf, -0xdc, 0x1b, 0xb4, 0xea, 0x37, 0xec, 0x3b, 0xf4, 0x6a, 0x37, 0xcd, 0x18, 0x93, 0x85, 0x69, -0x31, 0xc1, 0xe1, 0x40, 0xe3, 0x25, 0xc8, 0x12, 0x87, 0x8c, 0x9a, 0xb6, 0xcf, 0xfd, 0x59, -0x11, 0xa0, 0xc2, 0x06, 0x8e, 0x7f, 0x5d, 0x38, 0xf2, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x37, -0xec, 0x5a, 0x36, 0xee, 0x3f, 0xfc, 0x7a, 0x76, 0x4f, 0x1c, 0x9b, 0x95, 0x89, 0x71, 0x41, -0x00, 0x63, 0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x0f, 0x9c, 0xba, 0xd7, 0x0d, 0x98, 0x93, 0x85, -0x69, 0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x9e, 0xbe, 0xdf, 0x3c, 0xfa, 0x57, 0x2c, 0xda, -0x36, 0xee, 0x3f, 0xfc, 0x5b, 0x15, 0x89, 0x71, 0x41, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, -0x38, 0xf2, 0x47, 0xed, 0x58, 0x13, 0xa4, 0xca, 0xf7, 0x4d, 0xf9, 0x51, 0x01, 0x80, 0x63, -0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0x91, 0xa0, 0xa3, 0xa5, 0xa9, 0xb1, -0xe0, 0x42, 0x06, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0x0a, 0x96, 0x8f, 0x7d, -0x78, 0x72, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0xbc, 0xfa, 0x57, 0x0d, -0x79, 0x51, 0x01, 0x61, 0x21, 0xa1, 0xc0, 0xe3, 0x25, 0xa9, 0xb1, 0xc1, 0xe1, 0x40, 0x02, -0x67, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0x93, 0xa4, 0xab, 0xd4, 0x2a, 0xd6, 0x0f, 0x9c, 0x9b, -0xb4, 0xcb, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x35, 0xc9, 0xf1, -0x60, 0x42, 0x06, 0x8e, 0x7f, 0x7c, 0x7a, 0x76, 0x6e, 0x3f, 0xfc, 0x7a, 0x76, 0x6e, 0x5e, -0x3e, 0xfe, 0x7e, 0x5f, 0x3c, 0xdb, 0x15, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xc0, 0xe3, 0x44, -0xeb, 0x54, 0x2a, 0xb7, 0xcd, 0xf9, 0x70, 0x62, 0x27, 0xad, 0xd8, 0x32, 0xc7, 0x0c, 0x7b, -0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xec, 0x3b, 0xd5, 0x28, 0xd2, 0x07, 0x6d, 0x39, 0xd1, 0x20, -0xc2, 0xe7, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0xb2, 0xc7, 0x0c, 0x59, 0x28, 0xf3, 0x9b }; - -// clang-format off diff --git a/keyboards/ploopyco/trackball/config.h b/keyboards/ploopyco/trackball/config.h index 43f3f5b3c..ccbb89d5f 100644 --- a/keyboards/ploopyco/trackball/config.h +++ b/keyboards/ploopyco/trackball/config.h @@ -57,3 +57,6 @@ // If board has a debug LED, you can enable it by defining this // #define DEBUG_LED_PIN F7 + +/* PMW3360 Settings */ +#define PMW3360_CS_PIN B0 diff --git a/keyboards/ploopyco/trackball/rules.mk b/keyboards/ploopyco/trackball/rules.mk index e1eb998fe..223b9ea28 100644 --- a/keyboards/ploopyco/trackball/rules.mk +++ b/keyboards/ploopyco/trackball/rules.mk @@ -7,7 +7,7 @@ F_CPU = 8000000 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration @@ -24,6 +24,6 @@ POINTING_DEVICE_ENABLE = yes MOUSEKEY_ENABLE = yes # Mouse keys QUANTUM_LIB_SRC += analog.c spi_master.c -SRC += pmw3360.c opt_encoder.c +SRC += drivers/sensors/pmw3360.c opt_encoder.c DEFAULT_FOLDER = ploopyco/trackball/rev1_005 diff --git a/keyboards/ploopyco/trackball/trackball.h b/keyboards/ploopyco/trackball/trackball.h index fd2bf465a..70f5d83b1 100644 --- a/keyboards/ploopyco/trackball/trackball.h +++ b/keyboards/ploopyco/trackball/trackball.h @@ -20,7 +20,7 @@ #include "quantum.h" #include "spi_master.h" -#include "pmw3360.h" +#include "drivers/sensors/pmw3360.h" #include "analog.h" #include "opt_encoder.h" #include "pointing_device.h" diff --git a/keyboards/ploopyco/trackball_mini/rules.mk b/keyboards/ploopyco/trackball_mini/rules.mk index 58fad239f..8a8afcf35 100644 --- a/keyboards/ploopyco/trackball_mini/rules.mk +++ b/keyboards/ploopyco/trackball_mini/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration @@ -27,6 +27,6 @@ POINTING_DEVICE_ENABLE = yes MOUSEKEY_ENABLE = no # Mouse keys QUANTUM_LIB_SRC += analog.c -SRC += adns5050.c opt_encoder.c +SRC += drivers/sensors/adns5050.c opt_encoder.c DEFAULT_FOLDER = ploopyco/trackball_mini/rev1_001 diff --git a/keyboards/ploopyco/trackball_mini/trackball_mini.h b/keyboards/ploopyco/trackball_mini/trackball_mini.h index a12d12a0c..7bcb02a94 100644 --- a/keyboards/ploopyco/trackball_mini/trackball_mini.h +++ b/keyboards/ploopyco/trackball_mini/trackball_mini.h @@ -20,7 +20,7 @@ #pragma once #include "quantum.h" -#include "adns5050.h" +#include "drivers/sensors/adns5050.h" #include "analog.h" #include "opt_encoder.h" #include "pointing_device.h" diff --git a/keyboards/ploopyco/trackball_nano/rev1_001/config.h b/keyboards/ploopyco/trackball_nano/rev1_001/config.h index 63780ef04..6d265d723 100644 --- a/keyboards/ploopyco/trackball_nano/rev1_001/config.h +++ b/keyboards/ploopyco/trackball_nano/rev1_001/config.h @@ -29,7 +29,7 @@ * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) * */ -#define DIRECT_PINS {} +#define DIRECT_PINS {{NO_PIN}} // These pins are not broken out, and cannot be used normally. // They are set as output and pulled high, by default diff --git a/keyboards/ploopyco/trackball_nano/rules.mk b/keyboards/ploopyco/trackball_nano/rules.mk index 0286194b9..bb33bc8b4 100644 --- a/keyboards/ploopyco/trackball_nano/rules.mk +++ b/keyboards/ploopyco/trackball_nano/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration @@ -27,6 +27,6 @@ POINTING_DEVICE_ENABLE = yes MOUSEKEY_ENABLE = no # Mouse keys QUANTUM_LIB_SRC += analog.c -SRC += adns5050.c opt_encoder.c +SRC += drivers/sensors/adns5050.c opt_encoder.c DEFAULT_FOLDER = ploopyco/trackball_nano/rev1_001 diff --git a/keyboards/ploopyco/trackball_nano/trackball_nano.h b/keyboards/ploopyco/trackball_nano/trackball_nano.h index 5692383b1..6c8ecace7 100644 --- a/keyboards/ploopyco/trackball_nano/trackball_nano.h +++ b/keyboards/ploopyco/trackball_nano/trackball_nano.h @@ -20,7 +20,7 @@ #pragma once #include "quantum.h" -#include "adns5050.h" +#include "drivers/sensors/adns5050.h" #include "analog.h" #include "opt_encoder.h" #include "pointing_device.h" diff --git a/keyboards/plume/plume65/rules.mk b/keyboards/plume/plume65/rules.mk index dded09bb8..8bb3680ff 100644 --- a/keyboards/plume/plume65/rules.mk +++ b/keyboards/plume/plume65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/plx/rules.mk b/keyboards/plx/rules.mk index 60a579e02..da9a3804b 100644 --- a/keyboards/plx/rules.mk +++ b/keyboards/plx/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pohjolaworks/louhi/rules.mk b/keyboards/pohjolaworks/louhi/rules.mk index 8b8bacdcf..48a615a2e 100644 --- a/keyboards/pohjolaworks/louhi/rules.mk +++ b/keyboards/pohjolaworks/louhi/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/poker87c/rules.mk b/keyboards/poker87c/rules.mk index 6f3a6021e..e8b066aeb 100644 --- a/keyboards/poker87c/rules.mk +++ b/keyboards/poker87c/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/poker87d/rules.mk b/keyboards/poker87d/rules.mk index e11be918d..704121140 100644 --- a/keyboards/poker87d/rules.mk +++ b/keyboards/poker87d/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/polilla/rev1/rules.mk b/keyboards/polilla/rev1/rules.mk index e6ef1737e..dd7ce8850 100644 --- a/keyboards/polilla/rev1/rules.mk +++ b/keyboards/polilla/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/polycarbdiet/s20/rules.mk b/keyboards/polycarbdiet/s20/rules.mk index 152430af9..8d9b7338c 100644 --- a/keyboards/polycarbdiet/s20/rules.mk +++ b/keyboards/polycarbdiet/s20/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pom_keyboards/tnln95/rules.mk b/keyboards/pom_keyboards/tnln95/rules.mk index 8d25f09ac..da0a42379 100644 --- a/keyboards/pom_keyboards/tnln95/rules.mk +++ b/keyboards/pom_keyboards/tnln95/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/portal_66/rules.mk b/keyboards/portal_66/rules.mk index f8a290cad..ea1826e24 100644 --- a/keyboards/portal_66/rules.mk +++ b/keyboards/portal_66/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pos78/rules.mk b/keyboards/pos78/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/pos78/rules.mk +++ b/keyboards/pos78/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/preonic/keymaps/0xdec/rules.mk b/keyboards/preonic/keymaps/0xdec/rules.mk index 0c8a6dc41..a68b26c24 100644 --- a/keyboards/preonic/keymaps/0xdec/rules.mk +++ b/keyboards/preonic/keymaps/0xdec/rules.mk @@ -1,6 +1,6 @@ # Build Options -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/preonic/keymaps/AlexDaigre/keymap.c b/keyboards/preonic/keymaps/AlexDaigre/keymap.c index 3ea61a26e..ef4707f64 100644 --- a/keyboards/preonic/keymaps/AlexDaigre/keymap.c +++ b/keyboards/preonic/keymaps/AlexDaigre/keymap.c @@ -276,7 +276,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -292,6 +292,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/arkag/rules.mk b/keyboards/preonic/keymaps/arkag/rules.mk index 8b04cf2aa..671da6f94 100644 --- a/keyboards/preonic/keymaps/arkag/rules.mk +++ b/keyboards/preonic/keymaps/arkag/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no STENO_ENABLE = no EXTRAKEY_ENABLE = yes diff --git a/keyboards/preonic/keymaps/bucktooth/rules.mk b/keyboards/preonic/keymaps/bucktooth/rules.mk index 8f226afd9..fc2652965 100644 --- a/keyboards/preonic/keymaps/bucktooth/rules.mk +++ b/keyboards/preonic/keymaps/bucktooth/rules.mk @@ -1,6 +1,6 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/preonic/keymaps/cranium/keymap.c b/keyboards/preonic/keymaps/cranium/keymap.c index 63897d1e6..2c1337d84 100644 --- a/keyboards/preonic/keymaps/cranium/keymap.c +++ b/keyboards/preonic/keymaps/cranium/keymap.c @@ -175,7 +175,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -191,6 +191,7 @@ void dip_update(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index b70aa31c1..3a82f7151 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -263,7 +263,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -279,6 +279,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/dlaroe/rules.mk b/keyboards/preonic/keymaps/dlaroe/rules.mk index 2b7cff4db..38fb7375c 100644 --- a/keyboards/preonic/keymaps/dlaroe/rules.mk +++ b/keyboards/preonic/keymaps/dlaroe/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/preonic/keymaps/drasbeck/keymap.c b/keyboards/preonic/keymaps/drasbeck/keymap.c index 909e86a97..ae4804ce3 100644 --- a/keyboards/preonic/keymaps/drasbeck/keymap.c +++ b/keyboards/preonic/keymaps/drasbeck/keymap.c @@ -190,7 +190,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -206,6 +206,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/dudeofawesome/rules.mk b/keyboards/preonic/keymaps/dudeofawesome/rules.mk index 4434d3de7..607192459 100644 --- a/keyboards/preonic/keymaps/dudeofawesome/rules.mk +++ b/keyboards/preonic/keymaps/dudeofawesome/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/preonic/keymaps/egstad/keymap.c b/keyboards/preonic/keymaps/egstad/keymap.c index 07eda6614..f730d911c 100644 --- a/keyboards/preonic/keymaps/egstad/keymap.c +++ b/keyboards/preonic/keymaps/egstad/keymap.c @@ -73,13 +73,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------------------. * | ` ESC | 1 ! | 2 @ | 3 # | 4 $ | 5 % | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | -_ =+ | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | TB/RS | Q | W | E | R | T | Y | U | I | O | P | [{ }] | + * | TB/RS | Q | W | E | R | T | Y | U | I | O | P | [{ }] | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | BS/LW | A | S | D | F | G | H | J | K | L | ; | ' | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | SFT | Z | X | C | V | B | N | M | , | . | / | SF/RN | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | LEADR | | CTL | ALT | CMD | BSP | SP/LW | RN/RS | ← | ↑ | ↓ | → | + * | LEADR | | CTL | ALT | CMD | BSP | SP/LW | RN/RS | ← | ↑ | ↓ | → | * `----------------------------------------------------------------------------------------------- */ @@ -107,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | | | | | | | | [ { | ] } | ( | ) | \ | | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | | | | | | | >|| | | << | Vol-U | Vol-D | >> | + * | | | | | | | >|| | | << | Vol-U | Vol-D | >> | * `-----------------------------------------------------------------------------------------------' */ @@ -146,7 +146,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_CAPS, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PSLS, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_COMM, _______ \ ), - + @@ -178,8 +178,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -// this function -uint32_t layer_state_set_user(uint32_t state) { +// this function +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, L_LOWER, L_RAISE, L_ADJUST); } @@ -201,8 +201,8 @@ uint32_t layer_state_set_user(uint32_t state) { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------------------' */ -/* -[L_BLANK] = LAYOUT_preonic_grid( +/* +[L_BLANK] = LAYOUT_preonic_grid( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/preonic/keymaps/elisiano/keymap.c b/keyboards/preonic/keymaps/elisiano/keymap.c index 8d3898922..d885d1f02 100644 --- a/keyboards/preonic/keymaps/elisiano/keymap.c +++ b/keyboards/preonic/keymaps/elisiano/keymap.c @@ -257,7 +257,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -273,6 +273,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/fsck/keymap.c b/keyboards/preonic/keymaps/fsck/keymap.c index 8e2747f44..dea152360 100644 --- a/keyboards/preonic/keymaps/fsck/keymap.c +++ b/keyboards/preonic/keymaps/fsck/keymap.c @@ -202,7 +202,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -221,6 +221,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/preonic/keymaps/jacwib/rules.mk b/keyboards/preonic/keymaps/jacwib/rules.mk index 8f226afd9..fc2652965 100644 --- a/keyboards/preonic/keymaps/jacwib/rules.mk +++ b/keyboards/preonic/keymaps/jacwib/rules.mk @@ -1,6 +1,6 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/preonic/keymaps/keelhauler/keymap.c b/keyboards/preonic/keymaps/keelhauler/keymap.c index c7e076692..dc0cffe09 100644 --- a/keyboards/preonic/keymaps/keelhauler/keymap.c +++ b/keyboards/preonic/keymaps/keelhauler/keymap.c @@ -264,7 +264,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -280,6 +280,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/kinesis/rules.mk b/keyboards/preonic/keymaps/kinesis/rules.mk index 94d02c8b7..2f8516a96 100644 --- a/keyboards/preonic/keymaps/kinesis/rules.mk +++ b/keyboards/preonic/keymaps/kinesis/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/preonic/keymaps/kjwon15/keymap.c b/keyboards/preonic/keymaps/kjwon15/keymap.c index 6f1d5f30a..2f25cdfa8 100644 --- a/keyboards/preonic/keymaps/kjwon15/keymap.c +++ b/keyboards/preonic/keymaps/kjwon15/keymap.c @@ -327,7 +327,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -343,6 +343,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/preonic/keymaps/laurentlaurent/keymap.c b/keyboards/preonic/keymaps/laurentlaurent/keymap.c index b1a73035b..62943a420 100644 --- a/keyboards/preonic/keymaps/laurentlaurent/keymap.c +++ b/keyboards/preonic/keymaps/laurentlaurent/keymap.c @@ -554,7 +554,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -570,6 +570,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/preonic/keymaps/mguterl/keymap.c b/keyboards/preonic/keymaps/mguterl/keymap.c index 4e8738be2..87a9cd32b 100644 --- a/keyboards/preonic/keymaps/mguterl/keymap.c +++ b/keyboards/preonic/keymaps/mguterl/keymap.c @@ -273,7 +273,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -289,6 +289,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/mikethetiger/keymap.c b/keyboards/preonic/keymaps/mikethetiger/keymap.c index e4b1f2e82..36e09e550 100644 --- a/keyboards/preonic/keymaps/mikethetiger/keymap.c +++ b/keyboards/preonic/keymaps/mikethetiger/keymap.c @@ -242,7 +242,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -261,6 +261,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/preonic/keymaps/muzfuz/keymap.c b/keyboards/preonic/keymaps/muzfuz/keymap.c index a72894677..c0c7ae07e 100644 --- a/keyboards/preonic/keymaps/muzfuz/keymap.c +++ b/keyboards/preonic/keymaps/muzfuz/keymap.c @@ -197,7 +197,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -bool encoder_update(bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { @@ -224,7 +224,7 @@ bool encoder_update(bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -243,6 +243,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/preonic/keymaps/mverteuil/keymap.c b/keyboards/preonic/keymaps/mverteuil/keymap.c index 60677701c..ef0185169 100644 --- a/keyboards/preonic/keymaps/mverteuil/keymap.c +++ b/keyboards/preonic/keymaps/mverteuil/keymap.c @@ -459,7 +459,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -475,6 +475,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c index 290ea1638..4b2805854 100644 --- a/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c +++ b/keyboards/preonic/keymaps/mverteuil_2x2u/keymap.c @@ -395,7 +395,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -411,4 +411,5 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/pezhore/keymap.c b/keyboards/preonic/keymaps/pezhore/keymap.c index 71d9306dc..c41fb4500 100644 --- a/keyboards/preonic/keymaps/pezhore/keymap.c +++ b/keyboards/preonic/keymaps/pezhore/keymap.c @@ -257,7 +257,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -273,6 +273,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/pitty/keymap.c b/keyboards/preonic/keymaps/pitty/keymap.c index 10957d8ac..25c648eea 100644 --- a/keyboards/preonic/keymaps/pitty/keymap.c +++ b/keyboards/preonic/keymaps/pitty/keymap.c @@ -50,9 +50,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_preonic_grid( \ - HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, \ + HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_ODIA, HU_UDIA, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_ODAC, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EACU, HU_AACU, \ MT(MOD_LSFT, KC_NUBS), HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, \ KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_RALT, RAISE, KC_INS, KC_DEL \ ), @@ -72,9 +72,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_GAME] = LAYOUT_preonic_grid( \ - HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, \ + HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_ODIA, HU_UDIA, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_ODAC, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EACU, HU_AACU, \ KC_LSFT, HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, \ KC_LCTL, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_RALT, LOWER, KC_INS, KC_DEL \ ), diff --git a/keyboards/preonic/keymaps/senseored/keymap.c b/keyboards/preonic/keymaps/senseored/keymap.c index c78528d8c..e15250783 100644 --- a/keyboards/preonic/keymaps/senseored/keymap.c +++ b/keyboards/preonic/keymaps/senseored/keymap.c @@ -345,7 +345,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -361,10 +361,11 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { // if(rgblight_get_mode() == 1) { switch (biton32(state)) { case _QWERTY: diff --git a/keyboards/preonic/keymaps/seph/rules.mk b/keyboards/preonic/keymaps/seph/rules.mk index dd26cd906..0869baa8d 100644 --- a/keyboards/preonic/keymaps/seph/rules.mk +++ b/keyboards/preonic/keymaps/seph/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/preonic/keymaps/that_canadian/rules.mk b/keyboards/preonic/keymaps/that_canadian/rules.mk index 773e5c45d..1c0fc5805 100644 --- a/keyboards/preonic/keymaps/that_canadian/rules.mk +++ b/keyboards/preonic/keymaps/that_canadian/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/preonic/keymaps/via/keymap.c b/keyboards/preonic/keymaps/via/keymap.c index 5df57fd3d..fe6244104 100644 --- a/keyboards/preonic/keymaps/via/keymap.c +++ b/keyboards/preonic/keymaps/via/keymap.c @@ -147,7 +147,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -163,6 +163,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/keyboards/preonic/keymaps/xulkal/keymap.c b/keyboards/preonic/keymaps/xulkal/keymap.c index f127ea469..425c2bb3c 100644 --- a/keyboards/preonic/keymaps/xulkal/keymap.c +++ b/keyboards/preonic/keymaps/xulkal/keymap.c @@ -101,7 +101,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -120,6 +120,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true } void matrix_scan_user(void) { diff --git a/keyboards/preonic/keymaps/zach/rules.mk b/keyboards/preonic/keymaps/zach/rules.mk index 77efcf383..8d2f75eea 100644 --- a/keyboards/preonic/keymaps/zach/rules.mk +++ b/keyboards/preonic/keymaps/zach/rules.mk @@ -6,7 +6,7 @@ # the appropriate keymap folder that will get included automatically # TAP_DANCE_ENABLE = yes # Enable TapDance functionality -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk index dea2bbbca..5f9cd5200 100644 --- a/keyboards/preonic/rev1/rules.mk +++ b/keyboards/preonic/rev1/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk index 1b72a622a..00db8cc39 100644 --- a/keyboards/preonic/rev2/rules.mk +++ b/keyboards/preonic/rev2/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = qmk-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index 0e8312445..420e7e541 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -93,26 +93,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* * WS2812 Underglow Matrix options */ diff --git a/keyboards/preonic/rev3/rev3.c b/keyboards/preonic/rev3/rev3.c index ec8a56108..7ccff7061 100644 --- a/keyboards/preonic/rev3/rev3.c +++ b/keyboards/preonic/rev3/rev3.c @@ -43,23 +43,6 @@ led_config_t g_led_config = { { // 7 8 1 2 #endif -void matrix_init_kb(void) { - matrix_init_user(); -} - -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -#ifdef DIP_SWITCH_ENABLE - __attribute__((weak)) -void dip_update(uint8_t index, bool active) {} - - __attribute__((weak)) -void dip_switch_update_user(uint8_t index, bool active) { - dip_update(index, active); -} -#endif #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) diff --git a/keyboards/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk index 034ace02a..04760b4d2 100644 --- a/keyboards/preonic/rev3/rules.mk +++ b/keyboards/preonic/rev3/rules.mk @@ -9,20 +9,18 @@ BOOTLOADER = stm32-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite 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 NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = yes # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. WS2812_DRIVER = pwm -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/primekb/meridian/rules.mk b/keyboards/primekb/meridian/rules.mk index 74a9feb66..3ab016a5e 100644 --- a/keyboards/primekb/meridian/rules.mk +++ b/keyboards/primekb/meridian/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/primekb/prime_e/keymaps/via/keymap.c b/keyboards/primekb/prime_e/keymaps/via/keymap.c index 46a310f3d..960d1dc39 100644 --- a/keyboards/primekb/prime_e/keymaps/via/keymap.c +++ b/keyboards/primekb/prime_e/keymaps/via/keymap.c @@ -111,7 +111,7 @@ void led_set_user(uint8_t usb_led) { } //function for layer indicator LED -uint32_t layer_state_set_user(uint32_t state) +layer_state_t layer_state_set_user(layer_state_t state) { if (biton32(state) == 1) { writePinHigh(B3); diff --git a/keyboards/primekb/prime_e/rules.mk b/keyboards/primekb/prime_e/rules.mk index f5ea0075c..9b3759263 100644 --- a/keyboards/primekb/prime_e/rules.mk +++ b/keyboards/primekb/prime_e/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/primekb/prime_l/rules.mk b/keyboards/primekb/prime_l/rules.mk index 7a3f60d57..7ae142c83 100644 --- a/keyboards/primekb/prime_l/rules.mk +++ b/keyboards/primekb/prime_l/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/primekb/prime_m/rules.mk b/keyboards/primekb/prime_m/rules.mk index a2e427b67..f2d849b07 100644 --- a/keyboards/primekb/prime_m/rules.mk +++ b/keyboards/primekb/prime_m/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,9 +25,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = ortho_5x6 numpad_5x6 +LAYOUTS = numpad_5x6 diff --git a/keyboards/primekb/prime_o/keymaps/reasonsandreasons/rules.mk b/keyboards/primekb/prime_o/keymaps/reasonsandreasons/rules.mk index b6c57629e..645e8d523 100644 --- a/keyboards/primekb/prime_o/keymaps/reasonsandreasons/rules.mk +++ b/keyboards/primekb/prime_o/keymaps/reasonsandreasons/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c b/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c index 9014fbc5b..dbcc8c31a 100644 --- a/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c +++ b/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, DE_TILD, DE_EXLM, DE_DQOT, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______, + _______, _______, _______, _______, DE_TILD, DE_EXLM, DE_DQUO, DE_HASH, DE_DLR, DE_PERC, CU_CIRC, DE_AMPR, DE_ASTR, DE_LPRN, DE_RPRN, _______, _______, _______, _______, _______, _______, DE_AT, CTRLX, CTRLC, CTRLV, XXXXXXX, XXXXXXX, DE_UNDS, DE_PLUS, DE_LCBR, DE_RCBR, DE_PIPE, _______, _______, _______, _______, _______, DE_EURO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DE_MINS, CU_EQL, CU_LBRC, CU_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ diff --git a/keyboards/primekb/prime_o/keymaps/spacebarracecar/rules.mk b/keyboards/primekb/prime_o/keymaps/spacebarracecar/rules.mk index f50334d5e..5fbd49277 100644 --- a/keyboards/primekb/prime_o/keymaps/spacebarracecar/rules.mk +++ b/keyboards/primekb/prime_o/keymaps/spacebarracecar/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/primekb/prime_o/rules.mk b/keyboards/primekb/prime_o/rules.mk index 7143eb4c0..e8dde0f85 100644 --- a/keyboards/primekb/prime_o/rules.mk +++ b/keyboards/primekb/prime_o/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/primekb/prime_r/rules.mk b/keyboards/primekb/prime_r/rules.mk index 101e16752..bec9b6dcd 100644 --- a/keyboards/primekb/prime_r/rules.mk +++ b/keyboards/primekb/prime_r/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/program_yoink/rules.mk b/keyboards/program_yoink/rules.mk index 51bb37c86..8c25b10c1 100644 --- a/keyboards/program_yoink/rules.mk +++ b/keyboards/program_yoink/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/projectcain/vault45/rules.mk b/keyboards/projectcain/vault45/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/projectcain/vault45/rules.mk +++ b/keyboards/projectcain/vault45/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/projectkb/alice/rev1/rules.mk b/keyboards/projectkb/alice/rev1/rules.mk index 21714aab0..f050f03de 100644 --- a/keyboards/projectkb/alice/rev1/rules.mk +++ b/keyboards/projectkb/alice/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -18,7 +18,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 WS2812_DRIVER = spi diff --git a/keyboards/projectkb/alice/rev2/rules.mk b/keyboards/projectkb/alice/rev2/rules.mk index 21714aab0..f050f03de 100644 --- a/keyboards/projectkb/alice/rev2/rules.mk +++ b/keyboards/projectkb/alice/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -18,7 +18,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 WS2812_DRIVER = spi diff --git a/keyboards/projectkb/signature87/rules.mk b/keyboards/projectkb/signature87/rules.mk index fe264da9d..8fdbfde71 100644 --- a/keyboards/projectkb/signature87/rules.mk +++ b/keyboards/projectkb/signature87/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/prototypist/j01/rules.mk b/keyboards/prototypist/j01/rules.mk index 3de5d7ea3..ec348d0f6 100644 --- a/keyboards/prototypist/j01/rules.mk +++ b/keyboards/prototypist/j01/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pteron36/rules.mk b/keyboards/pteron36/rules.mk index 36cbd2b30..585c9828d 100644 --- a/keyboards/pteron36/rules.mk +++ b/keyboards/pteron36/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,7 +21,7 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = no # OLED display; work in progress to add support. will be update in future. +OLED_ENABLE = no # OLED display; work in progress to add support. will be update in future. SPLIT_KEYBOARD = yes LAYOUTS = split_3x5_3 diff --git a/keyboards/puck/rules.mk b/keyboards/puck/rules.mk index 90519649e..2c7de6f60 100644 --- a/keyboards/puck/rules.mk +++ b/keyboards/puck/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = halfkay # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/punk75/rules.mk b/keyboards/punk75/rules.mk index b9084ba5e..dd29f64bc 100644 --- a/keyboards/punk75/rules.mk +++ b/keyboards/punk75/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pursuit40/rules.mk b/keyboards/pursuit40/rules.mk index f49426d51..6c4393757 100644 --- a/keyboards/pursuit40/rules.mk +++ b/keyboards/pursuit40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/q4z/rules.mk b/keyboards/q4z/rules.mk index 5e84c7512..3225d24f1 100644 --- a/keyboards/q4z/rules.mk +++ b/keyboards/q4z/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/qaz/rules.mk b/keyboards/qaz/rules.mk index 760e96e1c..18cc2d52a 100644 --- a/keyboards/qaz/rules.mk +++ b/keyboards/qaz/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/quad_h/lb75/rules.mk b/keyboards/quad_h/lb75/rules.mk index 059b04aa3..17b9d61e1 100644 --- a/keyboards/quad_h/lb75/rules.mk +++ b/keyboards/quad_h/lb75/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/quantrik/kyuu/config.h b/keyboards/quantrik/kyuu/config.h index 720ef0e1d..924395ebc 100644 --- a/keyboards/quantrik/kyuu/config.h +++ b/keyboards/quantrik/kyuu/config.h @@ -188,26 +188,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/quantrik/kyuu/rules.mk b/keyboards/quantrik/kyuu/rules.mk index 79eeb7d24..e7b73f7f9 100644 --- a/keyboards/quantrik/kyuu/rules.mk +++ b/keyboards/quantrik/kyuu/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/quark/rules.mk b/keyboards/quark/rules.mk index 2fd5d44f9..27729edf2 100644 --- a/keyboards/quark/rules.mk +++ b/keyboards/quark/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/qvex/lynepad/rules.mk b/keyboards/qvex/lynepad/rules.mk index 7b05cfb9b..d1a33ed5d 100644 --- a/keyboards/qvex/lynepad/rules.mk +++ b/keyboards/qvex/lynepad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/qwertyydox/config.h b/keyboards/qwertyydox/config.h index 386a1fae9..cc77cf9c1 100644 --- a/keyboards/qwertyydox/config.h +++ b/keyboards/qwertyydox/config.h @@ -200,26 +200,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/qwertyydox/rules.mk b/keyboards/qwertyydox/rules.mk index 3e66c233a..50329f9cf 100644 --- a/keyboards/qwertyydox/rules.mk +++ b/keyboards/qwertyydox/rules.mk @@ -2,14 +2,13 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/rabbit/rabbit68/config.h b/keyboards/rabbit/rabbit68/config.h index 33c14eda4..449f19514 100644 --- a/keyboards/rabbit/rabbit68/config.h +++ b/keyboards/rabbit/rabbit68/config.h @@ -188,26 +188,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/rabbit/rabbit68/rules.mk b/keyboards/rabbit/rabbit68/rules.mk index 462c01585..8597359c9 100644 --- a/keyboards/rabbit/rabbit68/rules.mk +++ b/keyboards/rabbit/rabbit68/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/rabbit_capture_plan/rules.mk b/keyboards/rabbit_capture_plan/rules.mk index df27d2eb1..f5b167709 100644 --- a/keyboards/rabbit_capture_plan/rules.mk +++ b/keyboards/rabbit_capture_plan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output SPLIT_KEYBOARD = yes -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no diff --git a/keyboards/rainkeeb/rules.mk b/keyboards/rainkeeb/rules.mk index 0c7dd09c2..64a8cc3a1 100644 --- a/keyboards/rainkeeb/rules.mk +++ b/keyboards/rainkeeb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -19,7 +19,8 @@ AUDIO_ENABLE = no RGBLIGHT_ENABLE = no # OLED enable -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Encoder enable ENCODER_ENABLE = yes diff --git a/keyboards/ramonimbao/aelith/rules.mk b/keyboards/ramonimbao/aelith/rules.mk index 530426307..342210d20 100644 --- a/keyboards/ramonimbao/aelith/rules.mk +++ b/keyboards/ramonimbao/aelith/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/chevron/rules.mk b/keyboards/ramonimbao/chevron/rules.mk index d9ae79985..9873bc51c 100644 --- a/keyboards/ramonimbao/chevron/rules.mk +++ b/keyboards/ramonimbao/chevron/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c b/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c index 1b9b60c0a..ac3c11e69 100644 --- a/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c +++ b/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE uint32_t anim_timer = 0; uint32_t anim_sleep = 0; uint8_t current_frame = 0; diff --git a/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c b/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c index 1458b19c2..3409fbc16 100644 --- a/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c +++ b/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE uint32_t anim_timer = 0; uint32_t anim_sleep = 0; uint8_t current_frame = 0; diff --git a/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c b/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c index ecc35c19a..5c97a3fb8 100644 --- a/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c +++ b/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c @@ -76,7 +76,7 @@ void matrix_scan_user(void) { } } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE uint32_t anim_timer = 0; uint32_t anim_sleep = 0; uint8_t current_frame = 0; diff --git a/keyboards/ramonimbao/herringbone/pro/rules.mk b/keyboards/ramonimbao/herringbone/pro/rules.mk index 00c2b41f9..b55b2c246 100644 --- a/keyboards/ramonimbao/herringbone/pro/rules.mk +++ b/keyboards/ramonimbao/herringbone/pro/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,8 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 WPM_ENABLE = yes LTO_ENABLE = yes diff --git a/keyboards/ramonimbao/herringbone/v1/config.h b/keyboards/ramonimbao/herringbone/v1/config.h index 2d55f0916..2db97cf56 100644 --- a/keyboards/ramonimbao/herringbone/v1/config.h +++ b/keyboards/ramonimbao/herringbone/v1/config.h @@ -193,26 +193,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ramonimbao/herringbone/v1/rules.mk b/keyboards/ramonimbao/herringbone/v1/rules.mk index 35161556f..2774d56c7 100644 --- a/keyboards/ramonimbao/herringbone/v1/rules.mk +++ b/keyboards/ramonimbao/herringbone/v1/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/mona/v1/rules.mk b/keyboards/ramonimbao/mona/v1/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/ramonimbao/mona/v1/rules.mk +++ b/keyboards/ramonimbao/mona/v1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/mona/v1_1/rules.mk b/keyboards/ramonimbao/mona/v1_1/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/ramonimbao/mona/v1_1/rules.mk +++ b/keyboards/ramonimbao/mona/v1_1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/squishy65/rules.mk b/keyboards/ramonimbao/squishy65/rules.mk index 1350d285e..984491667 100644 --- a/keyboards/ramonimbao/squishy65/rules.mk +++ b/keyboards/ramonimbao/squishy65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ramonimbao/squishyfrl/rules.mk b/keyboards/ramonimbao/squishyfrl/rules.mk index 955c819c7..6c209e978 100644 --- a/keyboards/ramonimbao/squishyfrl/rules.mk +++ b/keyboards/ramonimbao/squishyfrl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/squishytkl/rules.mk b/keyboards/ramonimbao/squishytkl/rules.mk index df02200ec..a03238d1f 100644 --- a/keyboards/ramonimbao/squishytkl/rules.mk +++ b/keyboards/ramonimbao/squishytkl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/wete/keymaps/jis/keymap.c b/keyboards/ramonimbao/wete/keymaps/jis/keymap.c index 14dfb1ca6..8d6593221 100644 --- a/keyboards/ramonimbao/wete/keymaps/jis/keymap.c +++ b/keyboards/ramonimbao/wete/keymaps/jis/keymap.c @@ -22,7 +22,7 @@ along with this program. If not, see . const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_jis_rhnp( KC_INSERT, KC_PSCREEN, KC_PAUSE, KC_SLCK, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, JP_ZHTG, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, KC_HOME, + KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, JP_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPC, KC_HOME, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_ENTER, KC_END, KC_KP_4, KC_KP_5, KC_KP_6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, KC_PGUP, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JP_COMM, JP_DOT, JP_SLSH, JP_BSLS, KC_RSFT, KC_PGDN, diff --git a/keyboards/ramonimbao/wete/keymaps/via/rules.mk b/keyboards/ramonimbao/wete/keymaps/via/rules.mk index ee1e4ceeb..5abd4f5bd 100644 --- a/keyboards/ramonimbao/wete/keymaps/via/rules.mk +++ b/keyboards/ramonimbao/wete/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/keyboards/ramonimbao/wete/rules.mk b/keyboards/ramonimbao/wete/rules.mk index 7eb46b9ba..9d8b0cd38 100644 --- a/keyboards/ramonimbao/wete/rules.mk +++ b/keyboards/ramonimbao/wete/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/rart/rart45/rules.mk b/keyboards/rart/rart45/rules.mk index e9a5cac27..8742e3017 100644 --- a/keyboards/rart/rart45/rules.mk +++ b/keyboards/rart/rart45/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rart/rart4x4/rules.mk b/keyboards/rart/rart4x4/rules.mk index 773b58600..83b9b56ff 100644 --- a/keyboards/rart/rart4x4/rules.mk +++ b/keyboards/rart/rart4x4/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rart/rart67/rules.mk b/keyboards/rart/rart67/rules.mk index a61e71724..efa7a821e 100644 --- a/keyboards/rart/rart67/rules.mk +++ b/keyboards/rart/rart67/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/rart/rart75/rules.mk b/keyboards/rart/rart75/rules.mk index 94adcd5a4..786fe09ec 100644 --- a/keyboards/rart/rart75/rules.mk +++ b/keyboards/rart/rart75/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output diff --git a/keyboards/rart/rart75m/rart75m.c b/keyboards/rart/rart75m/rart75m.c index c874e01ff..73e37d2d1 100644 --- a/keyboards/rart/rart75m/rart75m.c +++ b/keyboards/rart/rart75m/rart75m.c @@ -30,7 +30,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE __attribute__((weak)) void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("R A R T 7 5 M\nLayer: "), false); @@ -54,4 +54,4 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/rart/rart75m/rules.mk b/keyboards/rart/rart75m/rules.mk index c6b786b35..2a6f81099 100644 --- a/keyboards/rart/rart75m/rules.mk +++ b/keyboards/rart/rart75m/rules.mk @@ -21,5 +21,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = yes -OLED_DRIVER_ENABLE = yes -ENCODER_ENABLE = yes \ No newline at end of file +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +ENCODER_ENABLE = yes diff --git a/keyboards/rart/rartand/keymaps/default/keymap.c b/keyboards/rart/rartand/keymaps/default/keymap.c index 1b3c7c6af..2dd9378b0 100644 --- a/keyboards/rart/rartand/keymaps/default/keymap.c +++ b/keyboards/rart/rartand/keymaps/default/keymap.c @@ -16,11 +16,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT_all( KC_ESC, KC_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_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_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_BSLS, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, MO(2), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, MO(2), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_all( @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("* R A R T A N D *\n Powered by QMK\nLayer: "), false); diff --git a/keyboards/rart/rartand/keymaps/via/keymap.c b/keyboards/rart/rartand/keymaps/via/keymap.c index 1b3c7c6af..2dd9378b0 100644 --- a/keyboards/rart/rartand/keymaps/via/keymap.c +++ b/keyboards/rart/rartand/keymaps/via/keymap.c @@ -16,11 +16,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_all( + [0] = LAYOUT_all( KC_ESC, KC_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_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_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_UP, KC_BSLS, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, MO(2), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, MO(2), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_all( @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("* R A R T A N D *\n Powered by QMK\nLayer: "), false); diff --git a/keyboards/rart/rartand/rules.mk b/keyboards/rart/rartand/rules.mk index 0d494fa6b..47e285ceb 100644 --- a/keyboards/rart/rartand/rules.mk +++ b/keyboards/rart/rartand/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -20,4 +20,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/rart/rartland/rartland.c b/keyboards/rart/rartland/rartland.c index fc35361f8..089ba9295 100644 --- a/keyboards/rart/rartland/rartland.c +++ b/keyboards/rart/rartland/rartland.c @@ -30,7 +30,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE __attribute__((weak)) void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("R A R T L A N D\nLayer: "), false); diff --git a/keyboards/rart/rartland/rules.mk b/keyboards/rart/rartland/rules.mk index fa3dd5338..3e5261ec4 100644 --- a/keyboards/rart/rartland/rules.mk +++ b/keyboards/rart/rartland/rules.mk @@ -10,8 +10,8 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +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 @@ -24,7 +24,8 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/rart/rartlice/keymaps/default/keymap.c b/keyboards/rart/rartlice/keymaps/default/keymap.c index 0117eeafb..2ba4abff3 100644 --- a/keyboards/rart/rartlice/keymaps/default/keymap.c +++ b/keyboards/rart/rartlice/keymaps/default/keymap.c @@ -31,10 +31,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - + }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("R A R T L I C E\nLayer: "), false); diff --git a/keyboards/rart/rartlice/keymaps/via/keymap.c b/keyboards/rart/rartlice/keymaps/via/keymap.c index 0156c2fa4..22e52c403 100644 --- a/keyboards/rart/rartlice/keymaps/via/keymap.c +++ b/keyboards/rart/rartlice/keymaps/via/keymap.c @@ -45,10 +45,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - + }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("* R A R T L I C E *\n Powered by QMK\nLayer: "), false); diff --git a/keyboards/rart/rartlice/rules.mk b/keyboards/rart/rartlice/rules.mk index 7ec4cef2c..1cc247f16 100644 --- a/keyboards/rart/rartlice/rules.mk +++ b/keyboards/rart/rartlice/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -21,7 +21,8 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output WS2812_DRIVER = spi -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/rart/rartlite/rules.mk b/keyboards/rart/rartlite/rules.mk index e6a4d762d..96d348c06 100644 --- a/keyboards/rart/rartlite/rules.mk +++ b/keyboards/rart/rartlite/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rart/rartpad/rules.mk b/keyboards/rart/rartpad/rules.mk index c05f7eb06..a9465c0f0 100644 --- a/keyboards/rart/rartpad/rules.mk +++ b/keyboards/rart/rartpad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rect44/rules.mk b/keyboards/rect44/rules.mk index 806a19af3..88ed45787 100644 --- a/keyboards/rect44/rules.mk +++ b/keyboards/rect44/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/redox/keymaps/german/keymap.c b/keyboards/redox/keymaps/german/keymap.c index f94cd164a..06928b230 100644 --- a/keyboards/redox/keymaps/german/keymap.c +++ b/keyboards/redox/keymaps/german/keymap.c @@ -40,9 +40,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_NAGR ,DE_1 ,DE_2 ,DE_3 ,DE_4 ,DE_5 , DE_6 ,DE_7 ,DE_8 ,DE_9 ,DE_0 ,KC_NAMI , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,DE_Q ,DE_W ,DE_E ,DE_R ,DE_T ,SYM_L , SYM_L ,DE_Z ,DE_U ,DE_I ,DE_O ,DE_P ,DE_UE , + KC_TAB ,DE_Q ,DE_W ,DE_E ,DE_R ,DE_T ,SYM_L , SYM_L ,DE_Z ,DE_U ,DE_I ,DE_O ,DE_P ,DE_UDIA , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_ESC ,DE_A ,DE_S ,DE_D ,DE_F ,DE_G ,DE_ACUT , DE_PLUS ,DE_H ,DE_J ,DE_K ,DE_L ,DE_OE ,DE_AE , + KC_ESC ,DE_A ,DE_S ,DE_D ,DE_F ,DE_G ,DE_ACUT , DE_PLUS ,DE_H ,DE_J ,DE_K ,DE_L ,DE_ODIA ,DE_ADIA , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ KC_LSFT ,DE_Y ,DE_X ,DE_C ,DE_V ,DE_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,DE_N ,DE_M ,DE_COMM ,DE_DOT ,DE_MINS ,KC_RSFT , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ diff --git a/keyboards/redox/keymaps/italian/keymap.c b/keyboards/redox/keymaps/italian/keymap.c index 1eb34ff10..5059a810b 100644 --- a/keyboards/redox/keymaps/italian/keymap.c +++ b/keyboards/redox/keymaps/italian/keymap.c @@ -34,8 +34,8 @@ enum custom_keycodes { #define KC_ADPU LT(_ADJUST, KC_PGUP) // Italian specific shortcuts -#define ALT_IACC RALT_T(IT_IACC) -#define GUI_LESS LGUI_T(IT_LESS) +#define ALT_IACC RALT_T(IT_IGRV) +#define GUI_LESS LGUI_T(IT_LABK) #define IT_SHSL RSFT_T(KC_SLSH) #define IT_GRV RALT(KC_MINS) @@ -47,11 +47,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,IT_EACC , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,IT_EGRV , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,IT_LBRC , IT_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,IT_OACC ,IT_AACC , + KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,IT_LBRC , IT_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,IT_OGRV ,IT_AGRV , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,IT_UACC ,IT_SHSL , + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,IT_UGRV ,IT_SHSL , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ GUI_LESS,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , ALT_IACC, KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ @@ -63,9 +63,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______ ,IT_EXLM ,IT_AT ,IT_LCBR ,IT_RCBR ,IT_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,IT_SHRP ,IT_DLR ,IT_LBRC ,IT_RBRC ,IT_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , + _______ ,IT_HASH ,IT_DLR ,IT_LBRC ,IT_RBRC ,IT_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,IT_PERC ,IT_CRC ,IT_LPRN ,IT_RPRN ,IT_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , + _______ ,IT_PERC ,IT_CIRC ,IT_LPRN ,IT_RPRN ,IT_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ diff --git a/keyboards/redox/keymaps/tw1t611/keymap.c b/keyboards/redox/keymaps/tw1t611/keymap.c index 1309831b2..3ea10a752 100644 --- a/keyboards/redox/keymaps/tw1t611/keymap.c +++ b/keyboards/redox/keymaps/tw1t611/keymap.c @@ -11,11 +11,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______ ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,_______ , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,_______ , _______ ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_AE , + KC_ESC ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,_______ , _______ ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_ADIA , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_BSPC , KC_DEL ,KC_H ,KC_J ,KC_K ,KC_L ,DE_EQL ,DE_OE , + KC_TAB ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_BSPC , KC_DEL ,KC_H ,KC_J ,KC_K ,KC_L ,DE_EQL ,DE_ODIA , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - DE_UNDS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LCTL ,KC_BSPC , KC_DEL ,KC_RCTL ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,DE_SS ,DE_UE , + DE_UNDS ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LCTL ,KC_BSPC , KC_DEL ,KC_RCTL ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,DE_SS ,DE_UDIA , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ _______ ,_______ ,_______ ,_______ , KC_LALT , KC_SPC ,KC_LSFT , MO(MOD) ,KC_ENT , KC_LGUI , _______ ,_______ ,_______ ,_______ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ @@ -24,11 +24,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_F12 ,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 , KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_F11, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - DE_CIRC ,DE_QUOT ,DE_DQOT ,DE_LCBR ,DE_RCBR ,DE_GRV ,RGB_MOD , RESET ,DE_PERC ,DE_PLUS ,DE_MINS ,DE_ASTR ,DE_SLSH ,DE_BSLS , + DE_CIRC ,DE_QUOT ,DE_DQUO ,DE_LCBR ,DE_RCBR ,DE_GRV ,RGB_MOD , RESET ,DE_PERC ,DE_PLUS ,DE_MINS ,DE_ASTR ,DE_SLSH ,DE_BSLS , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - DE_TILD ,DE_EXLM ,DE_DLR ,DE_LPRN ,DE_RPRN ,DE_AMPR ,RGB_TOG , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,DE_QST ,DE_PIPE , + DE_TILD ,DE_EXLM ,DE_DLR ,DE_LPRN ,DE_RPRN ,DE_AMPR ,RGB_TOG , _______ ,KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT ,DE_QUES ,DE_PIPE , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,DE_AT ,DE_EURO ,DE_LBRC ,DE_RBRC ,_______ ,RGB_M_P ,_______ , _______ ,_______ ,DE_HASH ,DE_LESS ,DE_SCLN ,DE_COLN ,DE_MORE ,DE_PARA , + _______ ,DE_AT ,DE_EURO ,DE_LBRC ,DE_RBRC ,_______ ,RGB_M_P ,_______ , _______ ,_______ ,DE_HASH ,DE_LABK ,DE_SCLN ,DE_COLN ,DE_RABK ,DE_SECT , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ diff --git a/keyboards/redox/rules.mk b/keyboards/redox/rules.mk index 20bd73632..01c723f3e 100644 --- a/keyboards/redox/rules.mk +++ b/keyboards/redox/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/redox_w/keymaps/italian/keymap.c b/keyboards/redox_w/keymaps/italian/keymap.c index 6e23a32d4..e67742c6a 100644 --- a/keyboards/redox_w/keymaps/italian/keymap.c +++ b/keyboards/redox_w/keymaps/italian/keymap.c @@ -34,8 +34,8 @@ enum custom_keycodes { #define KC_ADPU LT(_ADJUST, KC_PGUP) // Italian specific shortcuts -#define ALT_IACC RALT_T(IT_IACC) -#define GUI_LESS LGUI_T(IT_LESS) +#define ALT_IACC RALT_T(IT_IGRV) +#define GUI_LESS LGUI_T(IT_LABK) #define IT_SHSL RSFT_T(KC_SLSH) #define IT_GRV RALT(KC_MINS) @@ -47,11 +47,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_NAGR ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NAMI , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,IT_EACC , + KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,SYM_L , SYM_L ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,IT_EGRV , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,IT_LBRC , IT_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,IT_OACC ,IT_AACC , + KC_ESC ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,IT_LBRC , IT_RBRC ,KC_H ,KC_J ,KC_K ,KC_L ,IT_OGRV ,IT_AGRV , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,IT_UACC ,IT_SHSL , + KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_ADPU ,KC_PGDN , KC_HOME ,KC_ADEN ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,IT_UGRV ,IT_SHSL , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ GUI_LESS,KC_PPLS ,KC_PMNS ,KC_ALAS , KC_CTPL , KC_BSPC ,KC_DEL , KC_ENT ,KC_SPC , ALT_IACC, KC_LEFT ,KC_DOWN ,KC_UP ,KC_RGHT //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ @@ -63,9 +63,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______ ,IT_EXLM ,IT_AT ,IT_LCBR ,IT_RCBR ,IT_PIPE ,_______ , _______ ,XXXXXXX ,KC_KP_7 ,KC_KP_8 ,KC_KP_9 ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,IT_SHRP ,IT_DLR ,IT_LBRC ,IT_RBRC ,IT_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , + _______ ,IT_HASH ,IT_DLR ,IT_LBRC ,IT_RBRC ,IT_GRV ,_______ , _______ ,XXXXXXX ,KC_KP_4 ,KC_KP_5 ,KC_KP_6 ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,IT_PERC ,IT_CRC ,IT_LPRN ,IT_RPRN ,IT_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , + _______ ,IT_PERC ,IT_CIRC ,IT_LPRN ,IT_RPRN ,IT_TILD ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,KC_KP_1 ,KC_KP_2 ,KC_KP_3 ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , KC_KP_0 , KC_KP_0 ,KC_PDOT ,XXXXXXX ,XXXXXXX //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ diff --git a/keyboards/redox_w/redox_w.c b/keyboards/redox_w/redox_w.c index a94e731b3..5b8634453 100644 --- a/keyboards/redox_w/redox_w.c +++ b/keyboards/redox_w/redox_w.c @@ -15,7 +15,7 @@ void matrix_init_kb(void) { led_init(); } -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{13, 0}, {12, 0}, {11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, diff --git a/keyboards/redox_w/rules.mk b/keyboards/redox_w/rules.mk index b7084b4a1..59af1ede0 100644 --- a/keyboards/redox_w/rules.mk +++ b/keyboards/redox_w/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,7 @@ CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls +MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = YES # Unicode # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/redscarf_i/rules.mk b/keyboards/redscarf_i/rules.mk index 852aec83b..c93ca4340 100644 --- a/keyboards/redscarf_i/rules.mk +++ b/keyboards/redscarf_i/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -23,7 +23,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/redscarf_iiplus/verb/config.h b/keyboards/redscarf_iiplus/verb/config.h index 5659b53f9..6f63f7316 100755 --- a/keyboards/redscarf_iiplus/verb/config.h +++ b/keyboards/redscarf_iiplus/verb/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/redscarf_iiplus/verb/rules.mk b/keyboards/redscarf_iiplus/verb/rules.mk index 7b8012db7..f35f8b1a4 100755 --- a/keyboards/redscarf_iiplus/verb/rules.mk +++ b/keyboards/redscarf_iiplus/verb/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/redscarf_iiplus/verc/config.h b/keyboards/redscarf_iiplus/verc/config.h index 5659b53f9..6f63f7316 100755 --- a/keyboards/redscarf_iiplus/verc/config.h +++ b/keyboards/redscarf_iiplus/verc/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/redscarf_iiplus/verc/rules.mk b/keyboards/redscarf_iiplus/verc/rules.mk index 45c719756..8310f5bf0 100755 --- a/keyboards/redscarf_iiplus/verc/rules.mk +++ b/keyboards/redscarf_iiplus/verc/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/redscarf_iiplus/verd/config.h b/keyboards/redscarf_iiplus/verd/config.h index abc3ae378..ca1ac9c26 100644 --- a/keyboards/redscarf_iiplus/verd/config.h +++ b/keyboards/redscarf_iiplus/verd/config.h @@ -198,26 +198,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/redscarf_iiplus/verd/rules.mk b/keyboards/redscarf_iiplus/verd/rules.mk index 648af8126..f9305e049 100644 --- a/keyboards/redscarf_iiplus/verd/rules.mk +++ b/keyboards/redscarf_iiplus/verd/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/retro_75/config.h b/keyboards/retro_75/config.h index 9af7af44b..78c10c3c3 100644 --- a/keyboards/retro_75/config.h +++ b/keyboards/retro_75/config.h @@ -192,26 +192,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/retro_75/rules.mk b/keyboards/retro_75/rules.mk index fcea7632e..d39ea46b4 100644 --- a/keyboards/retro_75/rules.mk +++ b/keyboards/retro_75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -18,6 +18,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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/reversestudio/decadepad/rules.mk b/keyboards/reversestudio/decadepad/rules.mk index 6011be9e8..999986783 100644 --- a/keyboards/reversestudio/decadepad/rules.mk +++ b/keyboards/reversestudio/decadepad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode diff --git a/keyboards/reviung33/rules.mk b/keyboards/reviung33/rules.mk index 4581b001d..110630701 100644 --- a/keyboards/reviung33/rules.mk +++ b/keyboards/reviung33/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/reviung34/config.h b/keyboards/reviung34/config.h index 9a73c83e7..871e89c10 100755 --- a/keyboards/reviung34/config.h +++ b/keyboards/reviung34/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/reviung34/rules.mk b/keyboards/reviung34/rules.mk index 085fb294f..3395f04fe 100755 --- a/keyboards/reviung34/rules.mk +++ b/keyboards/reviung34/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/reviung39/config.h b/keyboards/reviung39/config.h index 376345b74..17cbf6734 100644 --- a/keyboards/reviung39/config.h +++ b/keyboards/reviung39/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/reviung39/keymaps/default_s/keymap.c b/keyboards/reviung39/keymaps/default_s/keymap.c index 9f0d0debc..42e269431 100644 --- a/keyboards/reviung39/keymaps/default_s/keymap.c +++ b/keyboards/reviung39/keymaps/default_s/keymap.c @@ -33,21 +33,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSFT_T(KC_ENT), LOWER, KC_SPC, RAISE ), - + [_LOWER] = LAYOUT_reviung39( _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_GRV, KC_TILD, _______, KC_ESC, KC_LGUI, KC_LALT, KC_CAPS, KC_DQUO, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_PSCR, RSFT_T(KC_SPC), _______, KC_ENT, _______ ), - + [_RAISE] = LAYOUT_reviung39( _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_ESC, KC_RGUI, KC_RALT, KC_CAPS, KC_QUOT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_BSPC, _______ ), - + [_ADJUST] = LAYOUT_reviung39( RGB_VAI, RGB_SAI, RGB_HUI, RGB_MOD, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_SAD, RGB_HUD, RGB_RMOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, @@ -56,6 +56,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/reviung39/rules.mk b/keyboards/reviung39/rules.mk index 085fb294f..3395f04fe 100644 --- a/keyboards/reviung39/rules.mk +++ b/keyboards/reviung39/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/reviung41/config.h b/keyboards/reviung41/config.h index f3977d9f3..afcf99108 100644 --- a/keyboards/reviung41/config.h +++ b/keyboards/reviung41/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/reviung41/rules.mk b/keyboards/reviung41/rules.mk index b68c5963b..d196d80cf 100644 --- a/keyboards/reviung41/rules.mk +++ b/keyboards/reviung41/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/reviung5/rules.mk b/keyboards/reviung5/rules.mk index f54303802..373b18ea2 100644 --- a/keyboards/reviung5/rules.mk +++ b/keyboards/reviung5/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/reviung61/rules.mk b/keyboards/reviung61/rules.mk index fc546a76d..52e82fba8 100644 --- a/keyboards/reviung61/rules.mk +++ b/keyboards/reviung61/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rgbkb/common/common_oled.c b/keyboards/rgbkb/common/common_oled.c new file mode 100644 index 000000000..b6ea6b20a --- /dev/null +++ b/keyboards/rgbkb/common/common_oled.c @@ -0,0 +1,101 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include "common_oled.h" +#include "oled_driver.h" +#include "rgb_matrix.h" + +// for memcpy +#include +#include + +typedef struct { + bool selecting; + uint8_t selection; +} kb_menu_status_t; + +static kb_menu_status_t rgb_menu = { false, 4 }; +static bool rgb_menu_changed = false; + +void render_logo(void) { + static const char PROGMEM font_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + oled_write_P(font_logo, false); +} + +void render_icon(void) { + static const char PROGMEM font_icon[] = { + 0x9b,0x9c,0x9d,0x9e,0x9f, + 0xbb,0xbc,0xbd,0xbe,0xbf, + 0xdb,0xdc,0xdd,0xde,0xdf,0 + }; + oled_write_P(font_icon, false); +} + +#define RGB_FUNCTION_COUNT 6 +typedef void (*rgb_matrix_f)(void); +const rgb_matrix_f rgb_matrix_functions[RGB_FUNCTION_COUNT][2] = { + { rgb_matrix_increase_hue, rgb_matrix_decrease_hue }, + { rgb_matrix_increase_sat, rgb_matrix_decrease_sat }, + { rgb_matrix_increase_val, rgb_matrix_decrease_val }, + { rgb_matrix_increase_speed, rgb_matrix_decrease_speed }, + { rgb_matrix_step, rgb_matrix_step_reverse }, + { rgb_matrix_toggle, rgb_matrix_toggle } +}; + +void render_rgb_menu(void) { + static char buffer[63] = {0}; + snprintf(buffer, sizeof(buffer), "Hue %3dSatrn %3dValue %3dSpeed %3dMode %3dEnbld %3d", + rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, rgb_matrix_config.speed, rgb_matrix_config.mode, rgb_matrix_config.enable); + + if (rgb_menu.selecting) { + buffer[5 + rgb_menu.selection * 10] = '*'; + } + else { + buffer[5 + rgb_menu.selection * 10] = '>'; + } + oled_write(buffer, false); +} + +void rgb_menu_selection(void) { + if (!is_keyboard_master()) return; + rgb_menu.selecting = !rgb_menu.selecting; + rgb_menu_changed = true; +} + +void rgb_menu_action(bool clockwise) { + if (!is_keyboard_master()) return; + if (rgb_menu.selecting) { + if (!clockwise) { + rgb_menu.selection = (rgb_menu.selection - 1); + if (rgb_menu.selection >= RGB_FUNCTION_COUNT) + rgb_menu.selection = RGB_FUNCTION_COUNT - 1; + } + else { + rgb_menu.selection = (rgb_menu.selection + 1) % RGB_FUNCTION_COUNT; + } + } + else { + (*rgb_matrix_functions[rgb_menu.selection][clockwise])(); + } + rgb_menu_changed = true; +} + +void rgb_menu_update(int8_t transaction_id) { + if (!is_keyboard_master()) return; + if (!rgb_menu_changed) return; + rgb_menu_changed = false; + transaction_rpc_send(transaction_id, sizeof(kb_menu_status_t), &rgb_menu); +} + +void rgb_menu_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + memcpy(&rgb_menu, initiator2target_buffer, sizeof(kb_menu_status_t)); +} \ No newline at end of file diff --git a/keyboards/rgbkb/common/common_oled.h b/keyboards/rgbkb/common/common_oled.h new file mode 100644 index 000000000..a99988b2a --- /dev/null +++ b/keyboards/rgbkb/common/common_oled.h @@ -0,0 +1,21 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include +#include + +void render_logo(void); +void render_icon(void); +void render_rgb_menu(void); +void rgb_menu_selection(void); +void rgb_menu_action(bool clockwise); +void rgb_menu_update(int8_t transaction_id); +void rgb_menu_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer); \ No newline at end of file diff --git a/keyboards/rgbkb/common/glcdfont.c b/keyboards/rgbkb/common/glcdfont.c new file mode 100644 index 000000000..320925a8f --- /dev/null +++ b/keyboards/rgbkb/common/glcdfont.c @@ -0,0 +1,240 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include "progmem.h" + +// Helidox 8x6 font with RGBKB SOL Logo +// Online editor: http://teripom.x0.com/ + +static const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x0C, 0x90, + 0xB0, 0xE0, 0x72, 0x31, 0x9B, 0xDE, + 0xCE, 0xEC, 0xEE, 0xE9, 0xE9, 0xEC, + 0xCF, 0xDA, 0x99, 0x3E, 0x62, 0xE4, + 0xC4, 0x70, 0x10, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, + 0xC0, 0xC0, 0x80, 0x80, 0x02, 0x85, + 0x85, 0x87, 0x85, 0x89, 0x89, 0x92, + 0xEA, 0xC6, 0xC4, 0x48, 0x50, 0x60, + 0x40, 0x40, 0x40, 0x40, 0xC0, 0xE0, + 0x50, 0x28, 0x10, 0x10, 0x60, 0xC0, + 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, + 0x80, 0x80, 0x80, 0xE0, 0xF8, 0xFC, + 0xF8, 0xF0, 0x00, 0x00, 0x00, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0x00, 0x00, 0xF0, 0xF4, 0xEC, 0xDE, + 0xDE, 0xBE, 0x3E, 0x3E, 0x3F, 0x3F, + 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x3F, + 0x3F, 0x3E, 0x3E, 0xBE, 0xDE, 0xDE, + 0xEC, 0xF4, 0xF0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x7F, 0x80, 0x80, + 0x80, 0x70, 0x0F, 0x00, 0x00, 0x80, + 0x7F, 0x00, 0x00, 0x7F, 0x80, 0x80, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x7F, + 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x80, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x21, 0x33, 0x3B, 0x7B, + 0xFF, 0x00, 0x7C, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, + 0xFF, 0xFF, 0xFF, 0xFF, 0x7C, 0x01, + 0xFF, 0xDE, 0x8C, 0x04, 0x0C, 0x08, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x7F, 0x80, + 0x80, 0xBE, 0xBE, 0x80, 0x80, 0x80, + 0xC1, 0xFF, 0x80, 0x04, 0x32, 0x5E, + 0x1C, 0x3D, 0x26, 0x10, 0xC1, 0xFF, + 0x3E, 0x00, 0x00, 0x08, 0x36, 0xC1, + 0x08, 0x08, 0x14, 0x77, 0x94, 0x94, + 0x94, 0xF7, 0x94, 0xF7, 0x9C, 0x9C, + 0xFF, 0xFF, 0x1E, 0x00, 0x00, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x00, 0x00, 0x01, 0x0F, 0x3F, 0xFF, + 0xFF, 0xFF, 0xFC, 0xE0, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0xE0, 0xFC, 0xFF, 0xFF, 0xFF, + 0x3F, 0x0F, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x06, 0x02, 0x06, + 0x4D, 0x4F, 0x8C, 0xF9, 0x73, 0x37, + 0x27, 0x2F, 0x2F, 0xAF, 0xEF, 0x6F, + 0x77, 0x17, 0x33, 0x79, 0xCC, 0x1F, + 0x31, 0x20, 0x21, 0x02, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x40, 0xE0, + 0xA0, 0xA0, 0xD0, 0x90, 0x48, 0x48, + 0x25, 0x2B, 0x11, 0x09, 0x05, 0x03, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, + 0x01, 0x03, 0x02, 0x04, 0x03, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x0F, 0x1F, + 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, + 0xFE, 0xFC, 0x00, 0xFC, 0xFE, 0x7F, + 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; diff --git a/keyboards/rgbkb/common/touch_encoder.c b/keyboards/rgbkb/common/touch_encoder.c new file mode 100644 index 000000000..6293739ec --- /dev/null +++ b/keyboards/rgbkb/common/touch_encoder.c @@ -0,0 +1,310 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. Ryan Caltabiano + * ---------------------------------------------------------------------------- + */ + +#include "i2c_master.h" +#include "keyboard.h" +#include "touch_encoder.h" +#include "print.h" +#include "wait.h" +#include "timer.h" + +// for memcpy +#include +#include + +#define I2C_ADDRESS 0x1C +#define CALIBRATION_BIT 0x80 +#define OVERFLOW_BIT 0x40 +#define SLIDER_BIT 0x02 + +#ifndef TOUCH_UPDATE_INTERVAL +# define TOUCH_UPDATE_INTERVAL 33 +#endif + +enum { // QT2120 registers + QT_CHIP_ID = 0, + QT_FIRMWARE_VERSION, + QT_DETECTION_STATUS, + QT_KEY_STATUS, + QT_SLIDER_POSITION = 5, + QT_CALIBRATE, + QT_RESET, + QT_LP, + QT_TTD, + QT_ATD, + QT_DI, + QT_TRD, + QT_DHT, + QT_SLIDER_OPTION, + QT_CHARDE_TIME, + QT_KEY0_DTHR, + QT_KEY1_DTHR, + QT_KEY2_DTHR, + QT_KEY3_DTHR, + QT_KEY4_DTHR, + QT_KEY5_DTHR, + QT_KEY6_DTHR, + QT_KEY7_DTHR, + QT_KEY8_DTHR, + QT_KEY9_DTHR, + QT_KEY10_DTHR, + QT_KEY11_DTHR, + QT_KEY0_CTRL, + QT_KEY1_CTRL, + QT_KEY2_CTRL, + QT_KEY3_CTRL, + QT_KEY4_CTRL, + QT_KEY5_CTRL, + QT_KEY6_CTRL, + QT_KEY7_CTRL, + QT_KEY8_CTRL, + QT_KEY9_CTRL, + QT_KEY10_CTRL, + QT_KEY11_CTRL, + QT_KEY0_PULSE_SCALE, + QT_KEY1_PULSE_SCALE, + QT_KEY2_PULSE_SCALE, + QT_KEY3_PULSE_SCALE, + QT_KEY4_PULSE_SCALE, + QT_KEY5_PULSE_SCALE, + QT_KEY6_PULSE_SCALE, + QT_KEY7_PULSE_SCALE, + QT_KEY8_PULSE_SCALE, + QT_KEY9_PULSE_SCALE, + QT_KEY10_PULSE_SCALE, + QT_KEY11_PULSE_SCALE, + QT_KEY0_SIGNAL, + QT_KEY1_SIGNAL = 54, + QT_KEY2_SIGNAL = 56, + QT_KEY3_SIGNAL = 58, + QT_KEY4_SIGNAL = 60, + QT_KEY5_SIGNAL = 62, + QT_KEY6_SIGNAL = 64, + QT_KEY7_SIGNAL = 66, + QT_KEY8_SIGNAL = 68, + QT_KEY9_SIGNAL = 70, + QT_KEY10_SIGNAL = 72, + QT_KEY11_SIGNAL = 74, + QT_KEY0_REFERENCE = 76, + QT_KEY1_REFERENCE = 78, + QT_KEY2_REFERENCE = 80, + QT_KEY3_REFERENCE = 82, + QT_KEY4_REFERENCE = 84, + QT_KEY5_REFERENCE = 86, + QT_KEY6_REFERENCE = 88, + QT_KEY7_REFERENCE = 90, + QT_KEY8_REFERENCE = 92, + QT_KEY9_REFERENCE = 94, + QT_KEY10_REFERENCE = 96, + QT_KEY11_REFERENCE = 98, +}; + +bool touch_initialized = false; +bool touch_disabled = false; +uint8_t touch_handness = 0; +// touch_raw & touch_processed store the Detection Status, Key Status (x2), and Slider Position values +uint8_t touch_raw[4] = { 0 }; +uint8_t touch_processed[4] = { 0 }; + +uint16_t touch_timer = 0; +uint16_t touch_update_timer = 0; + +// For split transport only +typedef struct { + uint8_t position; + uint8_t taps; +} slave_touch_status_t; + +bool touch_slave_init = false; +slave_touch_status_t touch_slave_state = { 0, 0 }; + +static bool write_register8(uint8_t address, uint8_t data) { + i2c_status_t status = i2c_writeReg((I2C_ADDRESS << 1), address, &data, sizeof(data), I2C_TIMEOUT); + if (status != I2C_STATUS_SUCCESS) { + xprintf("write_register8 %d failed %d\n", address, status); + } + return status == I2C_STATUS_SUCCESS; +} + +static bool read_register(uint8_t address, uint8_t* data, uint16_t length) { + i2c_status_t status = i2c_readReg((I2C_ADDRESS << 1), address, data, length, I2C_TIMEOUT); + if (status != I2C_STATUS_SUCCESS) { + xprintf("read_register %d failed %d\n", address, status); + return false; + } + return true; +} + +void touch_encoder_init(void) { + i2c_init(); + + touch_handness = is_keyboard_left() ? 0 : 1; + + // Set QT to slider mode + touch_initialized = write_register8(QT_SLIDER_OPTION, 0x80); + touch_initialized &= write_register8(QT_TTD, 4); // Toward Drift - 20 @ 3.2s + touch_initialized &= write_register8(QT_ATD, 1); // Away Drift - 5 @ 0.8s + touch_initialized &= write_register8(QT_DI, 4); // Detection Integrator - 4 + touch_initialized &= write_register8(QT_TRD, 0); // Touch Recall - 48 + touch_encoder_calibrate(); +} + +__attribute__((weak)) bool touch_encoder_tapped_kb(uint8_t index, uint8_t section) { return touch_encoder_tapped_user(index, section); } +__attribute__((weak)) bool touch_encoder_update_kb(uint8_t index, bool clockwise) { return touch_encoder_update_user(index, clockwise); } + +__attribute__((weak)) bool touch_encoder_tapped_user(uint8_t index, uint8_t section) { return true; } +__attribute__((weak)) bool touch_encoder_update_user(uint8_t index, bool clockwise) { return true; } + +static void touch_encoder_update_tapped(void) { + // Started touching, being counter for TOUCH_TERM + if (touch_processed[0] & SLIDER_BIT) { + touch_timer = timer_read() + TOUCH_TERM; + return; + } + + // Touch held too long, bail + if (timer_expired(timer_read(), touch_timer)) return; + + uint8_t section = touch_processed[3] / (UINT8_MAX / TOUCH_SEGMENTS + 1); + xprintf("tap %d %d\n", touch_handness, section); + if (is_keyboard_master()) { + if (!touch_disabled) { + touch_encoder_tapped_kb(touch_handness, section); + } + } + else { + touch_slave_state.taps ^= (1 << section); + } +} + +static void touch_encoder_update_position_common(uint8_t* position, uint8_t raw, uint8_t index) { + int8_t delta = (*position - raw) / TOUCH_RESOLUTION; + bool clockwise = raw > *position; + if (delta == 0) return; + + // Don't store raw directly, as we want to ensure any remainder is kept and used next time this is called + *position -= delta * TOUCH_RESOLUTION; + xprintf("pos %d %d\n", index, raw); + //uint8_t u_delta = delta < 0 ? -delta : delta; + if (!touch_disabled) { + //for (uint8_t i = 0; i < u_delta; i++) + touch_encoder_update_kb(index, clockwise); + } +} + +static void touch_encoder_update_position(void) { + // If the user touchs and moves enough, expire touch_timer faster and do encoder position logic instead + if (!timer_expired(timer_read(), touch_timer)) { + if ((uint8_t)(touch_raw[3] - touch_processed[3]) <= TOUCH_DEADZONE) return; + touch_timer = timer_read(); + } + + if (is_keyboard_master()) { + touch_encoder_update_position_common(&touch_processed[3], touch_raw[3], touch_handness); + } + else { + touch_slave_state.position = touch_raw[3]; + } +} + +void touch_encoder_update_slave(slave_touch_status_t slave_state) { + if (!touch_slave_init) { + touch_slave_state = slave_state; + touch_slave_init = true; + return; + } + + if (touch_slave_state.position != slave_state.position) { + // Did a new slide event start? + uint8_t mask = (1 << 7); + if ((touch_slave_state.taps & mask) != (slave_state.taps & mask)) { + touch_slave_state.position = slave_state.position; + } + touch_encoder_update_position_common(&touch_slave_state.position, slave_state.position, !touch_handness); + } + + if (touch_slave_state.taps != slave_state.taps) { + if (!touch_disabled) { + for (uint8_t section = 0; section < TOUCH_SEGMENTS; section++) { + uint8_t mask = (1 << section); + if ((touch_slave_state.taps & mask) != (slave_state.taps & mask)) { + xprintf("tap %d %d\n", !touch_handness, section); + touch_encoder_tapped_kb(!touch_handness, section); + } + } + } + touch_slave_state.taps = slave_state.taps; + } +} + +void touch_encoder_update(int8_t transaction_id) { + if (!touch_initialized) return; +#if TOUCH_UPDATE_INTERVAL > 0 + if (!timer_expired(timer_read(), touch_update_timer)) return; + touch_update_timer = timer_read() + TOUCH_UPDATE_INTERVAL; +#endif + + read_register(QT_DETECTION_STATUS, &touch_raw[0], sizeof(touch_raw)); + touch_processed[1] = touch_raw[1]; + touch_processed[2] = touch_raw[2]; + + if (touch_raw[0] != touch_processed[0]) { + uint8_t delta = touch_raw[0] ^ touch_processed[0]; + touch_processed[0] = touch_raw[0]; + // When calibrating, normal sensor behavior is supended + if (delta & CALIBRATION_BIT) { + xprintf("calibration %d\n", touch_processed[0] >> 7 & 1); + } + if (delta & OVERFLOW_BIT) { + xprintf("overflow %d\n", touch_processed[0] >> 6 & 1); + } + if (delta & SLIDER_BIT) { + touch_processed[3] = touch_raw[3]; + if (!is_keyboard_master()) { + touch_slave_state.position = touch_raw[3]; + touch_slave_state.taps ^= (1 << 7); + } + touch_encoder_update_tapped(); + } + } + + if ((touch_raw[0] & SLIDER_BIT) && touch_processed[3] != touch_raw[3]) { + touch_encoder_update_position(); + } + + if (is_keyboard_master()) { + slave_touch_status_t slave_state; + if (transaction_rpc_exec(transaction_id, sizeof(bool), &touch_disabled, sizeof(slave_touch_status_t), &slave_state)) { + if (memcmp(&touch_slave_state, &slave_state, sizeof(slave_touch_status_t))) + touch_encoder_update_slave(slave_state); + } + } +} + +void touch_encoder_calibrate(void) { + if (!touch_initialized) return; + write_register8(QT_CALIBRATE, 0x01); +} + +bool touch_encoder_calibrating(void) { + return touch_raw[0] & CALIBRATION_BIT; +} + +void touch_encoder_toggle(void) { + touch_disabled = !touch_disabled; +} + +bool touch_encoder_toggled(void) { + return touch_disabled; +} + +void touch_encoder_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + touch_disabled = *(bool*)initiator2target_buffer; + memcpy(target2initiator_buffer, &touch_slave_state, sizeof(slave_touch_status_t)); +} diff --git a/keyboards/rgbkb/common/touch_encoder.h b/keyboards/rgbkb/common/touch_encoder.h new file mode 100644 index 000000000..022f61906 --- /dev/null +++ b/keyboards/rgbkb/common/touch_encoder.h @@ -0,0 +1,54 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. Ryan Caltabiano + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include +#include + +#ifndef TOUCH_TERM +# define TOUCH_TERM 350 +#endif + +#ifndef TOUCH_SEGMENTS +# define TOUCH_SEGMENTS 3 +#elif TOUCH_SEGMENTS < 1 || TOUCH_SEGMENTS > 5 +# error TOUCH_SEGMENTS must be between 1 and 5. +#endif + +#ifndef TOUCH_DEADZONE +# define TOUCH_DEADZONE 50 +#endif + +#ifndef TOUCH_RESOLUTION +# define TOUCH_RESOLUTION 25 +#endif + +void touch_encoder_init(void); +void touch_encoder_update(int8_t transaction_id); + +void touch_encoder_calibrate(void); +bool touch_encoder_calibrating(void); + +void touch_encoder_toggle(void); +bool touch_encoder_toggled(void); + +// Called when touch encoder is tapped, weak function overridable by the kb +bool touch_encoder_tapped_kb(uint8_t index, uint8_t section); + +// Called when touch encoder is slid, weak function overridable by the kb +bool touch_encoder_update_kb(uint8_t index, bool clockwise); + +// Called when touch encoder is tapped, weak function overridable by the user +bool touch_encoder_tapped_user(uint8_t index, uint8_t section); + +// Called when touch encoder is slid, weak function overridable by the user +bool touch_encoder_update_user(uint8_t index, bool clockwise); + +void touch_encoder_slave_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer); diff --git a/keyboards/rgbkb/mun/.noci b/keyboards/rgbkb/mun/.noci new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/rgbkb/mun/config.h b/keyboards/rgbkb/mun/config.h new file mode 100644 index 000000000..5d1a2ce20 --- /dev/null +++ b/keyboards/rgbkb/mun/config.h @@ -0,0 +1,106 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x3535 +#define PRODUCT_ID 0x3505 +#define MANUFACTURER RGBKB +#define PRODUCT Mün + +#define USB_POLLING_INTERVAL_MS 1 + +/* Matrix Configuration - Rows are doubled up */ +#define MATRIX_ROWS 14 +// B1, A2 reserved for encoder / touch encoder support +#define MATRIX_ROW_PINS { A1, A3, B3, A13, B15, B1, A2 } +#define MATRIX_COLS 7 +#define MATRIX_COL_PINS { A0, B11, B0, B10, B12, B2, A8 } +#define MATRIX_IO_DELAY 5 + +#define BUSY_WAIT +#define BUSY_WAIT_INSTRUCTIONS 35 // Increase if two rows are pressed at the same time. +#define GPIO_INPUT_PIN_DELAY 10 + +/* Touchbar adjustments */ +#define TOUCH_DEADZONE 50 // width of a "button", wider inputs will be interpreted as a swipe +#define TOUCH_TERM 350 // time of a "button" touch, longer inputs will be a swipe +#define TOUCH_RESOLUTION 25 // sensitivity of swipes, lower=faster + +/* Encoder Configuration */ +#define ENCODERS_PAD_A { B8, B9 } +#define ENCODERS_PAD_B { A14, A15 } +#define TOUCH_SEGMENTS 3 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* CRC Configuration */ +#define CRC8_OPTIMIZE_SPEED +#define CRC8_USE_TABLE + +/* Split Keyboard Configuration */ +#define EE_HANDS +#define SPLIT_USB_DETECT +// also handles the SERIAL_USART_TX_PIN define +#define SOFT_SERIAL_PIN A9 +#define SERIAL_USART_TX_PAL_MODE 7 +#define SERIAL_USART_TIMEOUT 5 +#define SERIAL_USART_DRIVER SD1 +//#define SERIAL_USART_FULL_DUPLEX - Waiting on reunification pr +#if SERIAL_USART_FULL_DUPLEX + #define SERIAL_USART_RX_PIN A10 + #define SERIAL_USART_RX_PAL_MODE 7 + // Mun connects TX to TX and RX to RX as we were planning on i2c split, so we need pin swap for full duplex + #define SERIAL_USART_PIN_SWAP + #define SERIAL_USART_SPEED (2 * 1024 * 1024) +#else + #define SERIAL_USART_SPEED (1 * 1024 * 1024) +#endif + +/* Split Transport Features */ +#define SPLIT_TRANSPORT_MIRROR +#define SPLIT_LAYER_STATE_ENABLE +#define SPLIT_LED_STATE_ENABLE +#define SPLIT_TRANSACTION_IDS_KB TOUCH_ENCODER_SYNC, RGB_MENU_SYNC + +/* RGB LED Configuration */ +#define RGB_DI_PIN B5 +#define RGBLED_NUM 98 +#define RGBLED_SPLIT { 49, 49 } +#define RGBLIGHT_ANIMATIONS + +#define DRIVER_LED_TOTAL RGBLED_NUM +#define RGB_MATRIX_SPLIT RGBLED_SPLIT +#define RGB_MATRIX_CENTER { 128, 34 } +#define RGB_MATRIX_LED_FLUSH_LIMIT 33 +#define RGB_MATRIX_LED_PROCESS_LIMIT 10 +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +#if RGB_UNLIMITED_POWER + #define RGBLIGHT_LIMIT_VAL 255 +#else + #define RGBLIGHT_LIMIT_VAL 127 +#endif +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS RGBLIGHT_LIMIT_VAL + +#define WS2812_PWM_DRIVER PWMD3 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 2 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM3 +#define WS2812_DMA_CHANNEL 3 + +#define TOUCH_UPDATE_INTERVAL 33 +#define OLED_UPDATE_INTERVAL 33 +#define TAP_CODE_DELAY 5 diff --git a/keyboards/rgbkb/mun/halconf.h b/keyboards/rgbkb/mun/halconf.h new file mode 100644 index 000000000..f5b97499d --- /dev/null +++ b/keyboards/rgbkb/mun/halconf.h @@ -0,0 +1,18 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#define HAL_USE_I2C TRUE + +#define HAL_USE_PWM TRUE + +#define HAL_USE_SERIAL TRUE + +#include_next diff --git a/keyboards/rgbkb/mun/keymaps/default/config.h b/keyboards/rgbkb/mun/keymaps/default/config.h new file mode 100644 index 000000000..9719d1743 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/default/config.h @@ -0,0 +1,23 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +// No need for the single versions when multi performance isn't a problem =D +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH + +// 20m timeout (20m * 60s * 1000mil) +// #define RGB_DISABLE_TIMEOUT 1200000 +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +#define STM32_ONBOARD_EEPROM_SIZE 2048 diff --git a/keyboards/rgbkb/mun/keymaps/default/keymap.c b/keyboards/rgbkb/mun/keymaps/default/keymap.c new file mode 100644 index 000000000..b120c3a37 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/default/keymap.c @@ -0,0 +1,252 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include QMK_KEYBOARD_H +#include "common_oled.h" + +enum keymap_layers { + _QWERTY, + _COLEMAK, + _GAME, + _FN, + _ADJUST, + _VIA1, + _VIA2, + _VIA3 +}; + +enum keymap_keycodes { + // Disables touch processing + TCH_TOG = SAFE_RANGE, + MENU_BTN, + MENU_UP, + MENU_DN +}; + +// Default Layers +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_COLEMAK) +#define GAME DF(_GAME) + +// Momentary Layers +#define FN MO(_FN) +#define ADJUST MO(_ADJUST) + +#define FN_CAPS LT(_FN, KC_CAPS) +#define FN_ESC LT(_FN, KC_ESC) + +/* This keyboard is enabled with an RGB Menu Control system. +This functionality is enabled, but still requires a little configuration based on your exact setup. +The RGB Menu will appear on the Right Half's OLED and can be controlled by the MENU keycodes: +MENU_BTN - Triggers a button action for the menu +MENU_UP - Triggers an increase action for the menu +MENU_DN - Triggers a decrease action for the menu + +To finish configuration for your board, you will want to change the default keycodes for an encoder on the right half. +Encoder press keycode should be set to MENU_BTN, Clockwise should be MENU_UP, and Counter Clockwise should be MENU_DN. +Depending on where you add an encoder to the right half will determin in the default keymap where you should put those keycodes. +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* QWERTY + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | `~/ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bckspc | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | FN/Caps| A | S | D | F | G | ( | | ) | H | J | K | L | : | ' | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shft/Ent| + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Ctrl | Win | Alt | RGBTOG | Adjust | Space | Bksp | | Enter | Space | Left | Down | Up | Right | Ctrl | + * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | VolUp | VolDn | VolUp | VolDn | | PgUp | PgDn | PgUp | PgDn | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | VolDn | VolUp | Next | Play | Prev | Touch Encoder Touch Encoder | RgbHuI | RgbHuD | RgbMdD | RgbTog | RgbMdI | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, 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_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJUST, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_RCTL, + + KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, KC_PGDN, KC_PGUP, KC_PGDN, KC_PGUP, + KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV, RGB_HUI, RGB_HUD, RGB_RMOD,RGB_TOG, RGB_MOD + ), + + [_COLEMAK] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, + _______, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_GAME] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_F1, KC_F5, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F2, KC_F6, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, + _______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F3, KC_F7, KC_H, KC_J, KC_K, KC_L, KC_SCLN, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F4, KC_F8, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, KC_PGUP, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_PGDN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, TCH_TOG, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, + _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, GAME, + _______, RGB_RMOD,_______, RGB_MOD, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_NLCK, QWERTY, COLEMAK, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) + { + case MENU_BTN: + if (record->event.pressed) { + rgb_menu_selection(); + } + return false; + case MENU_UP: + if (record->event.pressed) { + rgb_menu_action(true); + } + return false; + case MENU_DN: + if (record->event.pressed) { + rgb_menu_action(false); + } + return false; + case TCH_TOG: + if (record->event.pressed) { + touch_encoder_toggle(); + } + return false; // Skip all further processing of this key + default: + return true; + } +} + +static void render_layer(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer"), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("QWRTY"), false); + break; + case _COLEMAK: + oled_write_ln_P(PSTR("Colemk"), false); + break; + case _GAME: + oled_write_ln_P(PSTR("Game "), false); + break; + case _FN: + oled_write_ln_P(PSTR("FN "), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("Adjst"), false); + break; + default: + oled_write_ln_P(PSTR("Undef"), false); + } +} + +static void render_leds(void) +{ + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUMLK") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPLK") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false); +} + +static void render_touch(void) +{ + // Host Touch LED Status + oled_write_P(!touch_encoder_toggled() ? PSTR("TOUCH") : PSTR(" "), false); + oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_left()) { + render_icon(); + oled_write_P(PSTR(" "), false); + render_layer(); + oled_write_P(PSTR(" "), false); + render_leds(); + oled_write_P(PSTR(" "), false); + render_touch(); + } + else { + render_icon(); + oled_write_P(PSTR(" "), false); + render_rgb_menu(); + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} diff --git a/keyboards/rgbkb/mun/keymaps/via/config.h b/keyboards/rgbkb/mun/keymaps/via/config.h new file mode 100644 index 000000000..967b309f6 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/via/config.h @@ -0,0 +1,30 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +// No need for the single versions when multi performance isn't a problem =D +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH + +// 20m timeout (20m * 60s * 1000mil) +// #define RGB_DISABLE_TIMEOUT 1200000 +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 +// 224B per layer right now +#define DYNAMIC_KEYMAP_LAYER_COUNT 8 +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 2047 + +#define VIA_QMK_RGBLIGHT_ENABLE + +#define STM32_ONBOARD_EEPROM_SIZE 2048 diff --git a/keyboards/rgbkb/mun/keymaps/via/keymap.c b/keyboards/rgbkb/mun/keymaps/via/keymap.c new file mode 100644 index 000000000..b120c3a37 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/via/keymap.c @@ -0,0 +1,252 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include QMK_KEYBOARD_H +#include "common_oled.h" + +enum keymap_layers { + _QWERTY, + _COLEMAK, + _GAME, + _FN, + _ADJUST, + _VIA1, + _VIA2, + _VIA3 +}; + +enum keymap_keycodes { + // Disables touch processing + TCH_TOG = SAFE_RANGE, + MENU_BTN, + MENU_UP, + MENU_DN +}; + +// Default Layers +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_COLEMAK) +#define GAME DF(_GAME) + +// Momentary Layers +#define FN MO(_FN) +#define ADJUST MO(_ADJUST) + +#define FN_CAPS LT(_FN, KC_CAPS) +#define FN_ESC LT(_FN, KC_ESC) + +/* This keyboard is enabled with an RGB Menu Control system. +This functionality is enabled, but still requires a little configuration based on your exact setup. +The RGB Menu will appear on the Right Half's OLED and can be controlled by the MENU keycodes: +MENU_BTN - Triggers a button action for the menu +MENU_UP - Triggers an increase action for the menu +MENU_DN - Triggers a decrease action for the menu + +To finish configuration for your board, you will want to change the default keycodes for an encoder on the right half. +Encoder press keycode should be set to MENU_BTN, Clockwise should be MENU_UP, and Counter Clockwise should be MENU_DN. +Depending on where you add an encoder to the right half will determin in the default keymap where you should put those keycodes. +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* QWERTY + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | `~/ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bckspc | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | FN/Caps| A | S | D | F | G | ( | | ) | H | J | K | L | : | ' | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Shift | Z | X | C | V | B | { | | } | N | M | , | . | / |Shft/Ent| + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Ctrl | Win | Alt | RGBTOG | Adjust | Space | Bksp | | Enter | Space | Left | Down | Up | Right | Ctrl | + * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | VolUp | VolDn | VolUp | VolDn | | PgUp | PgDn | PgUp | PgDn | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | VolDn | VolUp | Next | Play | Prev | Touch Encoder Touch Encoder | RgbHuI | RgbHuD | RgbMdD | RgbTog | RgbMdI | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, 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_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, + KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJUST, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_RCTL, + + KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, KC_PGDN, KC_PGUP, KC_PGDN, KC_PGUP, + KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV, RGB_HUI, RGB_HUD, RGB_RMOD,RGB_TOG, RGB_MOD + ), + + [_COLEMAK] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_F, KC_P, KC_G, _______, _______, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, + _______, KC_A, KC_R, KC_S, KC_T, KC_D, _______, _______, KC_H, KC_N, KC_E, KC_I, KC_O, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_GAME] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_F1, KC_F5, _______, _______, _______, _______, _______, _______, + _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F2, KC_F6, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, + _______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F3, KC_F7, KC_H, KC_J, KC_K, KC_L, KC_SCLN, _______, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F4, KC_F8, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, _______, KC_HOME, KC_UP, KC_END, KC_PSCR, KC_PGUP, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_PGDN, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, TCH_TOG, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, _______, _______, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, + _______, RGB_SPD, _______, RGB_SPI, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, GAME, + _______, RGB_RMOD,_______, RGB_MOD, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_NLCK, QWERTY, COLEMAK, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_VIA3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) + { + case MENU_BTN: + if (record->event.pressed) { + rgb_menu_selection(); + } + return false; + case MENU_UP: + if (record->event.pressed) { + rgb_menu_action(true); + } + return false; + case MENU_DN: + if (record->event.pressed) { + rgb_menu_action(false); + } + return false; + case TCH_TOG: + if (record->event.pressed) { + touch_encoder_toggle(); + } + return false; // Skip all further processing of this key + default: + return true; + } +} + +static void render_layer(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer"), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("QWRTY"), false); + break; + case _COLEMAK: + oled_write_ln_P(PSTR("Colemk"), false); + break; + case _GAME: + oled_write_ln_P(PSTR("Game "), false); + break; + case _FN: + oled_write_ln_P(PSTR("FN "), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("Adjst"), false); + break; + default: + oled_write_ln_P(PSTR("Undef"), false); + } +} + +static void render_leds(void) +{ + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUMLK") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPLK") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false); +} + +static void render_touch(void) +{ + // Host Touch LED Status + oled_write_P(!touch_encoder_toggled() ? PSTR("TOUCH") : PSTR(" "), false); + oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_left()) { + render_icon(); + oled_write_P(PSTR(" "), false); + render_layer(); + oled_write_P(PSTR(" "), false); + render_leds(); + oled_write_P(PSTR(" "), false); + render_touch(); + } + else { + render_icon(); + oled_write_P(PSTR(" "), false); + render_rgb_menu(); + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} diff --git a/keyboards/rgbkb/mun/keymaps/via/rules.mk b/keyboards/rgbkb/mun/keymaps/via/rules.mk new file mode 100644 index 000000000..40bded399 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE=yes \ No newline at end of file diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/config.h b/keyboards/rgbkb/mun/keymaps/xulkal2/config.h new file mode 100644 index 000000000..f36e5760f --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/xulkal2/config.h @@ -0,0 +1,42 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +// Xulkal custom stuff +#undef TAPPING_FORCE_HOLD + +#undef TAPPING_TERM +#define TAPPING_TERM 175 + +#define SPACE_CADET_MODIFIER_CARRYOVER +#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_LBRC +#define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC +#define LCPO_KEYS KC_LCTL, KC_TRNS, KC_MINS +#define RCPC_KEYS KC_RCTL, KC_TRNS, KC_EQL + +// No need for the single versions when multi performance isn't a problem =D +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_SOLID_SPLASH + +// 20m timeout (20m * 60s * 1000mil) +// #define RGB_DISABLE_TIMEOUT 1200000 +#define RGB_DISABLE_WHEN_USB_SUSPENDED +#define OLED_SCROLL_TIMEOUT 20000 +#define ONESHOT_TAP_TOGGLE 2 + +#define RGB_MATRIX_HUE_STEP 8 +#define RGB_MATRIX_SAT_STEP 8 +#define RGB_MATRIX_VAL_STEP 8 +#define RGB_MATRIX_SPD_STEP 8 + +#define ENCODER_RESOLUTION 2 diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c new file mode 100644 index 000000000..2de5888f1 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c @@ -0,0 +1,246 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include QMK_KEYBOARD_H +#include "common_oled.h" + +enum keymap_layers { + _QWERTY, + _FUNCTION, + _ADJUST +}; + +enum keymap_keycodes { + // Disables touch processing + TCH_TOG = SAFE_RANGE, + MENU_BTN, + MENU_UP, + MENU_DN, + RGB_RST +}; + +// Default Layers +#define QWERTY DF(_QWERTY) + +// Momentary Layers +#define FN OSL(_FUNCTION) +#define ADJ OSL(_ADJUST) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* QWERTY + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | `~/ESC | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | Bckspc | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | \ | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Caps | A | S | D | F | G | Play | | MN BTN | H | J | K | L | : | Enter | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Shft[ | Z | X | C | V | B | { | | } | N | M | , | . | / | Shft] | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | Ctrl- | Win | Alt | Del | Space | | ADJ | | FN | | Space | '" | Alt | App | Ctrl= | + * '--------+--------+--------+--------|--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | VolUp | VolDn | VolUp | VolDn | | PgUp | PgDn | PgUp | PgDn | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | VolDn | VolUp | Next | Play | Prev | Touch Encoder Touch Encoder | RgbHuI | RgbHuD | RgbMdD | RgbTog | RgbMdI | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_QWERTY] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_MPLY, MENU_BTN,KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LCPO, KC_LGUI, KC_LALT, KC_DEL, KC_SPC, KC_NO, ADJ, FN, KC_NO, KC_SPC, KC_QUOTE,KC_RALT, KC_APP, KC_RCPC, + + KC_VOLU, KC_VOLD, KC_VOLU, KC_VOLD, MENU_DN, MENU_UP, MENU_DN, MENU_UP, + KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, KC_MPRV, RGB_HUI, RGB_HUD, RGB_RMOD,RGB_TOG, RGB_MOD + ), + + /* Function + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | F12 | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | SPDI | SAI | VAI | HUI | RGBMD | | | | | | PrtScr | ScrLck | PseBrk | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | SPDD | SAD | VAD | HUD | RGBRMD | | | | | | Ins | Home | PgUp | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | RGBRST | | | | RGBTOG | | | | | | Del | End | PgDn | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | Play | Prev | Next | VolUp | VolDn | + * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | | | | | | | | | | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | | | | | | Touch Encoder Touch Encoder | | | | | | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_FUNCTION] = LAYOUT( + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, RGB_SPI, RGB_SAI, RGB_VAI, RGB_HUI, RGB_MOD, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, RGB_SPD, RGB_SAD, RGB_VAD, RGB_HUD, RGB_RMOD,_______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, + _______, RGB_RST, _______, _______, _______, RGB_TOG, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLU, KC_VOLD, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Adjust + * .--------------------------------------------------------------. .--------------------------------------------------------------. + * | | | | | | | | | | | NumLck | / | * | - | Del | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | Home | Up | End | Reset | T_TOG | | | | | 7 | 8 | 9 | + | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | Left | Down | Right | | | | | | | 4 | 5 | 6 | + | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | | | | | EepRst | | | | | 1 | 2 | 3 | Enter | | + * |--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | 0 | . | Enter | | + * '--------+--------+--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------+--------+--------' + * Encoder 1 Encoder 2 Encoder 3 Encoder 4 + * .-----------------------------------. .-----------------------------------. + * | | | | | | | | | | + * |--------+--------+--------+--------+--------. .--------+--------+--------+--------+--------| + * | | | | | | Touch Encoder Touch Encoder | | | | | | + * '--------+--------+--------+--------+--------' '--------+--------+--------+--------+--------' + */ + [_ADJUST] = LAYOUT( + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_DEL, + _______, KC_HOME, KC_UP, KC_END, RESET, TCH_TOG, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, + _______, _______, _______, _______, _______, EEP_RST, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_PDOT, KC_PENT, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; +// clang-format on + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) + { + case MENU_BTN: + if (record->event.pressed) { + rgb_menu_selection(); + } + return false; + case MENU_UP: + if (record->event.pressed) { + rgb_menu_action(true); + } + return false; + case MENU_DN: + if (record->event.pressed) { + rgb_menu_action(false); + } + return false; + case RGB_RST: + if (record->event.pressed) { + eeconfig_update_rgb_matrix_default(); + } + return false; + case TCH_TOG: + if (record->event.pressed) { + touch_encoder_toggle(); + } + return false; // Skip all further processing of this key + default: + return true; + } +} + +static void render_layer(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer"), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("BASE "), false); + break; + case _FUNCTION: + oled_write_ln_P(PSTR("FUNC "), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("ADJS "), false); + break; + } +} + +static void render_leds(void) +{ + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUMLK") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPLK") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false); +} + +static void render_touch(void) +{ + // Host Touch LED Status + oled_write_P(!touch_encoder_toggled() ? PSTR("TOUCH") : PSTR(" "), false); + oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false); +} + +/*static uint32_t scan_counter = 0; +static uint32_t scan_value = 0; +static uint16_t scan_timer = 1000; + +void do_counters(void) { + scan_counter++; + uint16_t now = sync_timer_read(); + if (timer_expired(now, scan_timer)) + { + scan_timer += 1000; + scan_value = (scan_value + scan_counter) / 2; + scan_counter = 0; + } +} + +void matrix_scan_user(void) { + do_counters(); +} + +void matrix_slave_scan_user(void) { + do_counters(); +} + +void render_debug_scan(void) { + static char buffer[6] = {0}; + snprintf(buffer, sizeof(buffer), "%5d", scan_value); + oled_write_ln_P(buffer, false); +}*/ + +void oled_task_user(void) { + if (is_keyboard_left()) { + render_layer(); + oled_write_P(PSTR(" "), false); + render_leds(); + oled_write_P(PSTR(" "), false); + render_touch(); + //oled_write_P(PSTR(" "), false); + //render_debug_scan(); + oled_set_cursor(0, 12); + render_icon(); + } + else { + render_rgb_menu(); + //oled_write_P(PSTR(" "), false); + //render_debug_scan(); + oled_set_cursor(0, 12); + render_icon(); + } +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} \ No newline at end of file diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk b/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk new file mode 100644 index 000000000..b62630516 --- /dev/null +++ b/keyboards/rgbkb/mun/keymaps/xulkal2/rules.mk @@ -0,0 +1,4 @@ +MOUSEKEY_ENABLE = yes # using for mouse wheel up and down, more granular than page up/down + +OPT_DEFS += -DRGB_UNLIMITED_POWER +DEBOUNCE_TYPE = sym_eager_pk \ No newline at end of file diff --git a/keyboards/rgbkb/mun/matrix.c b/keyboards/rgbkb/mun/matrix.c new file mode 100644 index 000000000..b859847f1 --- /dev/null +++ b/keyboards/rgbkb/mun/matrix.c @@ -0,0 +1,62 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. KarlK90 + * ---------------------------------------------------------------------------- + */ + +#include "matrix.h" +#include "atomic_util.h" +#include "gpio.h" + +static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; + +void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + /* Drive row pin low. */ + ATOMIC_BLOCK_FORCEON { writePinLow(row_pins[current_row]); } + matrix_output_select_delay(); + + /* Read all columns in one go, aka port scanning. */ + uint16_t porta = palReadPort(GPIOA); + uint16_t portb = palReadPort(GPIOB); + + /* Order of pins on the mun is: A0, B11, B0, B10, B12, B2, A8 + Pin is active low, therefore we have to invert the result. */ + matrix_row_t cols = ~(((porta & (0x1 << 0)) >> 0) // A0 (0) + | ((portb & (0x1 << 11)) >> 10) // B11 (1) + | ((portb & (0x1 << 0)) << 2) // B0 (2) + | ((portb & (0x1 << 10)) >> 7) // B10 (3) + | ((portb & (0x1 << 12)) >> 8) // B12 (4) + | ((portb & (0x1 << 2)) << 3) // B2 (5) + | ((porta & (0x1 << 8)) >> 2)); // A8 (6) + + /* Reverse the order of columns for left hand as the board is flipped. */ + // if (isLeftHand) { + // #if defined(__arm__) + // /* rbit assembly reverses bit order of 32bit registers. */ + // uint32_t temp = cols; + // __asm__("rbit %0, %1" : "=r"(temp) : "r"(temp)); + // cols = temp >> 24; + // #else + // /* RISC-V bit manipulation extension not present. Use bit-hack. + // https://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith32Bits */ + // cols = (matrix_row_t)(((cols * 0x0802LU & 0x22110LU) | (cols * 0x8020LU & 0x88440LU)) * 0x10101LU >> 16); + // #endif + // } + + current_matrix[current_row] = cols; + + /* Drive row pin high again. */ + ATOMIC_BLOCK_FORCEON { writePinHigh(row_pins[current_row]); } + matrix_output_unselect_delay(current_row, row_pins[current_row] != 0); +} + +#if defined(BUSY_WAIT) +void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { + for (int32_t i = 0; i < BUSY_WAIT_INSTRUCTIONS; i++) { + __asm__ volatile("nop" ::: "memory"); + } +} +#endif diff --git a/keyboards/rgbkb/mun/mcuconf.h b/keyboards/rgbkb/mun/mcuconf.h new file mode 100644 index 000000000..dd6e38509 --- /dev/null +++ b/keyboards/rgbkb/mun/mcuconf.h @@ -0,0 +1,21 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include_next + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE diff --git a/keyboards/rgbkb/mun/mun.c b/keyboards/rgbkb/mun/mun.c new file mode 100644 index 000000000..f64de3342 --- /dev/null +++ b/keyboards/rgbkb/mun/mun.c @@ -0,0 +1,25 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include "mun.h" +#include "touch_encoder.h" +#include "common_oled.h" +#include + +void keyboard_post_init_kb(void) { + touch_encoder_init(); + transaction_register_rpc(TOUCH_ENCODER_SYNC, touch_encoder_slave_sync); + transaction_register_rpc(RGB_MENU_SYNC, rgb_menu_slave_sync); + keyboard_post_init_user(); +} + +void housekeeping_task_kb(void) { + touch_encoder_update(TOUCH_ENCODER_SYNC); + rgb_menu_update(RGB_MENU_SYNC); +} diff --git a/keyboards/rgbkb/mun/mun.h b/keyboards/rgbkb/mun/mun.h new file mode 100644 index 000000000..beb132f0e --- /dev/null +++ b/keyboards/rgbkb/mun/mun.h @@ -0,0 +1,16 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#if defined(KEYBOARD_rgbkb_mun_rev1) +# include "rev1.h" +#endif + +#include "quantum.h" \ No newline at end of file diff --git a/keyboards/rgbkb/mun/readme.md b/keyboards/rgbkb/mun/readme.md new file mode 100644 index 000000000..6a1861153 --- /dev/null +++ b/keyboards/rgbkb/mun/readme.md @@ -0,0 +1,15 @@ +# Mün + +![Mün](https://i.redd.it/zw534js2o5861.jpg) + +Mün is powered by STM32 with full QMK support. Each key has super-bright RGB backlighting and MX Kailh hotswap sockets. No soldering is required to get a fully functioning keyboard. There are an additional 14 rear-facing RGB LEDs on each side. Each half can be configured to run as master or slave with the two USB-C ports. They also support up to two rotary encoders and one OLED panel per half. + +Keyboard Maintainer: [Legonut](https://github.com/Legonut) +Hardware Supported: Mün PCB R1.0, R1.1, R1.2 +Hardware Availability: [RGBKB](https://www.rgbkb.net) + +Make example for this keyboard (after setting up your build environment): + + make rgbkb/mun:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/rgbkb/mun/rev1/config.h b/keyboards/rgbkb/mun/rev1/config.h new file mode 100644 index 000000000..7ff0b5490 --- /dev/null +++ b/keyboards/rgbkb/mun/rev1/config.h @@ -0,0 +1,12 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#define DEVICE_VER 0x0001 diff --git a/keyboards/rgbkb/mun/rev1/info.json b/keyboards/rgbkb/mun/rev1/info.json new file mode 100644 index 000000000..c644b9bdc --- /dev/null +++ b/keyboards/rgbkb/mun/rev1/info.json @@ -0,0 +1,101 @@ +{ + "keyboard_name": "Mun", + "url": "https://www.rgbkb.net/products/mun", + "maintainer": "Legonut", + "width": 13.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"L00", "x":0, "y":0}, + {"label":"L01", "x":1, "y":0}, + {"label":"L02", "x":2, "y":0}, + {"label":"L03", "x":3, "y":0}, + {"label":"L04", "x":4, "y":0}, + {"label":"L05", "x":5, "y":0}, + {"label":"L06", "x":6, "y":0}, + {"label":"R00", "x":7.5, "y":0}, + {"label":"R01", "x":8.5, "y":0}, + {"label":"R02", "x":9.5, "y":0}, + {"label":"R03", "x":10.5, "y":0}, + {"label":"R04", "x":11.5, "y":0}, + {"label":"R05", "x":12.5, "y":0}, + {"label":"R06", "x":13.5, "y":0}, + {"label":"L10", "x":0, "y":1}, + {"label":"L11", "x":1, "y":1}, + {"label":"L12", "x":2, "y":1}, + {"label":"L13", "x":3, "y":1}, + {"label":"L14", "x":4, "y":1}, + {"label":"L15", "x":5, "y":1}, + {"label":"L16", "x":6, "y":1}, + {"label":"R10", "x":7.5, "y":1}, + {"label":"R11", "x":8.5, "y":1}, + {"label":"R12", "x":9.5, "y":1}, + {"label":"R13", "x":10.5, "y":1}, + {"label":"R14", "x":11.5, "y":1}, + {"label":"R15", "x":12.5, "y":1}, + {"label":"R16", "x":13.5, "y":1}, + {"label":"L20", "x":0, "y":2}, + {"label":"L21", "x":1, "y":2}, + {"label":"L22", "x":2, "y":2}, + {"label":"L23", "x":3, "y":2}, + {"label":"L24", "x":4, "y":2}, + {"label":"L25", "x":5, "y":2}, + {"label":"L26", "x":6, "y":2}, + {"label":"R20", "x":7.5, "y":2}, + {"label":"R21", "x":8.5, "y":2}, + {"label":"R22", "x":9.5, "y":2}, + {"label":"R23", "x":10.5, "y":2}, + {"label":"R24", "x":11.5, "y":2}, + {"label":"R25", "x":12.5, "y":2}, + {"label":"R26", "x":13.5, "y":2}, + {"label":"L30", "x":0, "y":3}, + {"label":"L31", "x":1, "y":3}, + {"label":"L32", "x":2, "y":3}, + {"label":"L33", "x":3, "y":3}, + {"label":"L34", "x":4, "y":3}, + {"label":"L35", "x":5, "y":3}, + {"label":"L36", "x":6, "y":3}, + {"label":"R30", "x":7.5, "y":3}, + {"label":"R21", "x":8.5, "y":3}, + {"label":"R32", "x":9.5, "y":3}, + {"label":"R33", "x":10.5, "y":3}, + {"label":"R34", "x":11.5, "y":3}, + {"label":"R35", "x":12.5, "y":3}, + {"label":"R36", "x":13.5, "y":3}, + {"label":"L40", "x":0, "y":4}, + {"label":"L41", "x":1, "y":4}, + {"label":"L42", "x":2, "y":4}, + {"label":"L43", "x":3, "y":4}, + {"label":"L44", "x":4, "y":4}, + {"label":"L45", "x":5, "y":4}, + {"label":"L46", "x":6, "y":4}, + {"label":"R40", "x":7.5, "y":4}, + {"label":"R41", "x":8.5, "y":4}, + {"label":"R42", "x":9.5, "y":4}, + {"label":"R43", "x":10.5, "y":4}, + {"label":"R44", "x":11.5, "y":4}, + {"label":"R45", "x":12.5, "y":4}, + {"label":"R46", "x":13.5, "y":4}, + {"label":"E00", "x":0, "y":5.5}, + {"label":"E01", "x":1, "y":5.5}, + {"label":"E10", "x":2, "y":5.5}, + {"label":"E11", "x":3, "y":5.5}, + {"label":"E20", "x":10.5, "y":5.5}, + {"label":"E21", "x":11.5, "y":5.5}, + {"label":"E30", "x":12.5, "y":5.5}, + {"label":"E31", "x":13.5, "y":5.5}, + {"label":"T00", "x":0, "y":6.5}, + {"label":"T01", "x":1, "y":6.5}, + {"label":"T02", "x":2, "y":6.5}, + {"label":"T03", "x":3, "y":6.5}, + {"label":"T04", "x":4, "y":6.5}, + {"label":"T10", "x":9.5, "y":6.5}, + {"label":"T11", "x":10.5, "y":6.5}, + {"label":"T12", "x":11.5, "y":6.5}, + {"label":"T13", "x":12.5, "y":6.5}, + {"label":"T14", "x":13.5, "y":6.5} + ] + } + } +} diff --git a/keyboards/rgbkb/mun/rev1/readme.md b/keyboards/rgbkb/mun/rev1/readme.md new file mode 100644 index 000000000..6a1861153 --- /dev/null +++ b/keyboards/rgbkb/mun/rev1/readme.md @@ -0,0 +1,15 @@ +# Mün + +![Mün](https://i.redd.it/zw534js2o5861.jpg) + +Mün is powered by STM32 with full QMK support. Each key has super-bright RGB backlighting and MX Kailh hotswap sockets. No soldering is required to get a fully functioning keyboard. There are an additional 14 rear-facing RGB LEDs on each side. Each half can be configured to run as master or slave with the two USB-C ports. They also support up to two rotary encoders and one OLED panel per half. + +Keyboard Maintainer: [Legonut](https://github.com/Legonut) +Hardware Supported: Mün PCB R1.0, R1.1, R1.2 +Hardware Availability: [RGBKB](https://www.rgbkb.net) + +Make example for this keyboard (after setting up your build environment): + + make rgbkb/mun:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/rgbkb/mun/rev1/rev1.c b/keyboards/rgbkb/mun/rev1/rev1.c new file mode 100644 index 000000000..28ad843b5 --- /dev/null +++ b/keyboards/rgbkb/mun/rev1/rev1.c @@ -0,0 +1,122 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#include "rev1.h" + +#define NUMBER_OF_TOUCH_ENCODERS 2 +#define TOUCH_ENCODER_OPTIONS TOUCH_SEGMENTS + 2 + +#define NUMBER_OF_ENCODERS 4 +#define ENCODER_OPTIONS 2 + +typedef struct PACKED { + uint8_t r; + uint8_t c; +} encodermap_t; + +// this maps encoders and then touch encoders to their respective electrical matrix entry +// mapping is row (y) then column (x) when looking at the electrical layout +const encodermap_t encoder_map[NUMBER_OF_ENCODERS][ENCODER_OPTIONS] = +{ + { { 5, 0 }, { 5, 1 } }, // Encoder 1 matrix entries + { { 5, 2 }, { 5, 3 } }, // Encoder 2 matrix entries + { { 12, 0 }, { 12, 1 } }, // Encoder 3 matrix entries + { { 12, 2 }, { 12, 3 } }, // Encoder 4 matrix entries +}; + +const encodermap_t touch_encoder_map[NUMBER_OF_TOUCH_ENCODERS][TOUCH_ENCODER_OPTIONS] = +{ + { { 6, 0 }, { 6, 1 }, { 6, 2 }, { 6, 3 }, { 6, 4 } }, // Touch Encoder 1 matrix entries + { { 13, 0 }, { 13, 1 }, { 13, 2 }, { 13, 3 }, { 13, 4 } } // Touch Encoder 2 matrix entries +}; + +static void process_encoder_matrix(encodermap_t pos) { + action_exec((keyevent_t){ + .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = true, .time = (timer_read() | 1) /* time should not be 0 */ + }); +#if TAP_CODE_DELAY > 0 + wait_ms(TAP_CODE_DELAY); +#endif + action_exec((keyevent_t){ + .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = false, .time = (timer_read() | 1) /* time should not be 0 */ + }); +} + +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) + return false; + + // Mapping clockwise (typically increase) to zero, and counter clockwise (decrease) to 1 + process_encoder_matrix(encoder_map[index][clockwise ? 0 : 1]); + return false; +} + +bool touch_encoder_update_kb(uint8_t index, bool clockwise) { + if (!touch_encoder_update_user(index, clockwise)) + return false; + + // Mapping clockwise (typically increase) to zero, and counter clockwise (decrease) to 1 + process_encoder_matrix(touch_encoder_map[index][clockwise ? 0 : 1]); + return false; +} + +bool touch_encoder_tapped_kb(uint8_t index, uint8_t section) { + if (!touch_encoder_tapped_user(index, section)) + return false; + + process_encoder_matrix(touch_encoder_map[index][section + 2]); + return false; +} + +#ifdef RGB_MATRIX_ENABLE +// clang-format off +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6 }, + { 13, 12, 11, 10, 9, 8, 7 }, + { 14, 15, 16, 17, 18, 19, 20 }, + { 27, 26, 25, 24, 23, 22, 21 }, + { 28, 29, 30, 31, 32, 33, 34 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { 49, 50, 51, 52, 53, 54, 55 }, + { 62, 61, 60, 59, 58, 57, 56 }, + { 63, 64, 65, 66, 67, 68, 69 }, + { 76, 75, 74, 73, 72, 71, 70 }, + { 77, 78, 79, 80, 81, 82, 83 }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } +}, { + { 16, 16},{ 34, 16},{ 49, 16},{ 64, 16},{ 79, 16},{ 94, 16},{ 109, 16}, + { 109, 31},{ 94, 31},{ 79, 31},{ 64, 31},{ 49, 31},{ 34, 31},{ 16, 31}, + { 16, 46},{ 34, 46},{ 49, 46},{ 64, 46},{ 79, 46},{ 94, 46},{ 109, 46}, + { 109, 61},{ 94, 61},{ 79, 61},{ 64, 61},{ 49, 61},{ 34, 61},{ 16, 61}, + { 16, 76},{ 34, 76},{ 49, 76},{ 64, 76},{ 83, 72},{ 98, 72},{ 113, 72}, + { 97, 5},{ 91, 5},{ 86, 5},{ 80, 5},{ 75, 5},{ 69, 5},{ 63, 5},{ 58, 5},{ 52, 5},{ 46, 5},{ 41, 5},{ 35, 5},{ 30, 5},{ 24, 5}, + { 240, 16},{ 222, 16},{ 207, 16},{ 192, 16},{ 177, 16},{ 162, 16},{ 147, 16}, + { 147, 31},{ 162, 31},{ 177, 31},{ 192, 31},{ 207, 31},{ 222, 31},{ 240, 31}, + { 240, 46},{ 222, 46},{ 207, 46},{ 192, 46},{ 177, 46},{ 162, 46},{ 147, 46}, + { 147, 61},{ 162, 61},{ 177, 61},{ 192, 61},{ 207, 61},{ 222, 61},{ 240, 61}, + { 240, 76},{ 222, 76},{ 207, 76},{ 192, 76},{ 180, 72},{ 165, 72},{ 150, 72}, + { 159, 5},{ 164, 5},{ 170, 5},{ 176, 5},{ 181, 5},{ 187, 5},{ 192, 5},{ 198, 5},{ 204, 5},{ 209, 5},{ 215, 5},{ 221, 5},{ 226, 5},{ 232, 5}, +}, { + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +} }; +// clang-format on +#endif diff --git a/keyboards/rgbkb/mun/rev1/rev1.h b/keyboards/rgbkb/mun/rev1/rev1.h new file mode 100644 index 000000000..8e7b65f45 --- /dev/null +++ b/keyboards/rgbkb/mun/rev1/rev1.h @@ -0,0 +1,43 @@ +/* + * ---------------------------------------------------------------------------- + * "THE BEER-WARE LICENSE" (Revision 42): + * wrote this file. As long as you retain this + * notice you can do whatever you want with this stuff. If we meet some day, and + * you think this stuff is worth it, you can buy me a beer in return. David Rauseo + * ---------------------------------------------------------------------------- + */ + +#pragma once + +#include "mun.h" +#include "touch_encoder.h" + +// clang-format off +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46, \ + E00, E01, E10, E11, E20, E21, E30, E31, \ + T00, T01, T02, T03, T04, T10, T11, T12, T13, T14 \ +) \ +{ \ + /* Left Half */ \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { E00, E01, E10, E11, KC_NO, KC_NO, KC_NO }, \ + { T00, T01, T02, T03, T04, KC_NO, KC_NO }, \ + /* Right Half */ \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 }, \ + { E20, E21, E30, E31, KC_NO, KC_NO, KC_NO }, \ + { T10, T11, T12, T13, T14, KC_NO, KC_NO } \ +} +// clang-format on diff --git a/keyboards/rgbkb/mun/rev1/rules.mk b/keyboards/rgbkb/mun/rev1/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/rgbkb/mun/rules.mk b/keyboards/rgbkb/mun/rules.mk new file mode 100644 index 000000000..ce8029968 --- /dev/null +++ b/keyboards/rgbkb/mun/rules.mk @@ -0,0 +1,46 @@ +# MCU name +MCU = STM32F303 + +# Touch encoder needs +SRC += ../common/touch_encoder.c +SRC += ../common/common_oled.c +QUANTUM_LIB_SRC += i2c_master.c + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +AUDIO_ENABLE = no # Audio output +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +WS2812_DRIVER = pwm +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable the OLED Driver + +ENCODER_ENABLE = yes + +SPLIT_KEYBOARD = yes +SERIAL_DRIVER = usart +LTO_ENABLE = yes +OPT = 3 + +OPT_DEFS += -DOLED_FONT_H=\"../common/glcdfont.c\" +OPT_DEFS += -Ikeyboards/rgbkb/common + +# matrix optimisations +SRC += matrix.c + +DEFAULT_FOLDER = rgbkb/mun/rev1 diff --git a/keyboards/rgbkb/pan/keymaps/default/keymap.c b/keyboards/rgbkb/pan/keymaps/default/keymap.c index f19d36256..dac385aa4 100644 --- a/keyboards/rgbkb/pan/keymaps/default/keymap.c +++ b/keyboards/rgbkb/pan/keymaps/default/keymap.c @@ -70,7 +70,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("RGBKB Pan\n"), false); diff --git a/keyboards/rgbkb/pan/rules.mk b/keyboards/rgbkb/pan/rules.mk index fa3ce9460..301b17d7f 100644 --- a/keyboards/rgbkb/pan/rules.mk +++ b/keyboards/rgbkb/pan/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -16,7 +16,8 @@ RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 WS2812_DRIVER = bitbang ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # RGB layout selection RGB_ENCODERS = yes # For RGB encoders, solder on both WS2811 chips diff --git a/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c index 2ae07984d..aa465a696 100644 --- a/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c @@ -196,7 +196,7 @@ void matrix_init_user(void) { // OLED Driver Logic -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!is_keyboard_master()) diff --git a/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk b/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk index 47dd9a7e2..f9832323b 100644 --- a/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/brianweyer/rules.mk @@ -4,7 +4,7 @@ LED_MIRRORED = no # Mirror LEDs across halves (enable DIP 1 on slave, and DIP 2 and 3 on master) # Misc -OLED_DRIVER_ENABLE = yes # Enable the OLED Driver +OLED_ENABLE = yes # Enable the OLED Driver diff --git a/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c b/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c index 96e19bf86..2ef78f122 100644 --- a/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/danielhklein/keymap.c @@ -261,7 +261,7 @@ void matrix_init_user(void) { // OLED Driver Logic -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (!has_usb()) diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index 0883cb775..6fc2cb777 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -298,7 +298,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } // OLED Driver Logic -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) return OLED_ROTATION_270; diff --git a/keyboards/rgbkb/sol/keymaps/default/readme.md b/keyboards/rgbkb/sol/keymaps/default/readme.md index ce5bce19e..3f3e1afc5 100644 --- a/keyboards/rgbkb/sol/keymaps/default/readme.md +++ b/keyboards/rgbkb/sol/keymaps/default/readme.md @@ -92,7 +92,7 @@ RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited t UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE = no # Enable one-hand typing -OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000) +OLED_ENABLE = no # Enable the OLED Driver (+5000) IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) diff --git a/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk b/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk index c386b39d3..4da351f25 100644 --- a/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/xulkal/rules.mk @@ -9,7 +9,7 @@ FULLHAND_ENABLE = no # Enables the additional 24 Full Hand LEDs SF_ENABLE = no # Enables the additional 38 Starfighter LEDs # Misc -OLED_DRIVER_ENABLE = yes # Enable the OLED Driver +OLED_ENABLE = yes # Enable the OLED Driver # Not using the encoder for rev1 ifeq ($(strip $(KEYBOARD)), rgbkb/sol/rev1) diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c index ed98a951c..73f7220a6 100644 --- a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c @@ -279,7 +279,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif // OLED Driver Logic -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { if (is_keyboard_master()) return OLED_ROTATION_270; diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk b/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk index 903d4619b..bb9d58e94 100644 --- a/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk +++ b/keyboards/rgbkb/sol/keymaps/xyverz/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control @@ -24,7 +24,8 @@ OLED_ENABLE = no # OLED_ENABLE IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) DEFAULT_FOLDER = rgbkb/sol/rev1 ENCODER_ENABLE = no -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Do not edit past here @@ -51,4 +52,4 @@ endif ifeq ($(strip $(LED_MIRRORED)), yes) OPT_DEFS += -DLED_MIRRORED -endif \ No newline at end of file +endif diff --git a/keyboards/rgbkb/sol/rev1/rules.mk b/keyboards/rgbkb/sol/rev1/rules.mk index 235e85254..5c5850f90 100644 --- a/keyboards/rgbkb/sol/rev1/rules.mk +++ b/keyboards/rgbkb/sol/rev1/rules.mk @@ -1,7 +1,7 @@ # RGBKB Sol Rev1 Defaults # Keycode Options -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control UNICODE_ENABLE = no # Unicode keycodes @@ -25,5 +25,5 @@ RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness for RGBLIGHT IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) # Misc -OLED_DRIVER_ENABLE = no # Enable the OLED Driver +OLED_ENABLE = no # Enable the OLED Driver SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/keyboards/rgbkb/sol/rev2/config.h b/keyboards/rgbkb/sol/rev2/config.h index 6613b447b..f0c71db34 100644 --- a/keyboards/rgbkb/sol/rev2/config.h +++ b/keyboards/rgbkb/sol/rev2/config.h @@ -28,23 +28,33 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN B7 -#define BACKLIGHT_LEDS 124 - -#ifdef FULLHAND_ENABLE - #define FULLHAND_LEDS 24 -#elif SF_ENABLE - #define FULLHAND_LEDS 38 -#else - #define FULLHAND_LEDS 0 -#endif - // Underglow / DIY Tent Glow are parallel to the top row leds, no separate define - +// Full Hand case adds 24 LEDs, Star Fighter case adds 38 LEDs +// For mirrored LED control (each MCU controls half the LEDs), total LED counts are divided in half #ifdef LED_MIRRORED - #define RGBLED_NUM ((BACKLIGHT_LEDS + FULLHAND_LEDS) / 2) + #ifdef FULLHAND_ENABLE + #define FULLHAND_LEDS 24 + #define RGBLED_NUM 74 + #elif SF_ENABLE + #define FULLHAND_LEDS 38 + #define RGBLED_NUM 81 + #else + #define FULLHAND_LEDS 0 + #define RGBLED_NUM 62 + #endif #else - #define RGBLED_NUM (BACKLIGHT_LEDS + FULLHAND_LEDS) + #ifdef FULLHAND_ENABLE + #define FULLHAND_LEDS 24 + #define RGBLED_NUM 148 + #elif SF_ENABLE + #define FULLHAND_LEDS 38 + #define RGBLED_NUM 162 + #else + #define FULLHAND_LEDS 0 + #define RGBLED_NUM 124 + #endif #endif + #define DRIVER_LED_TOTAL RGBLED_NUM #define RGB_MATRIX_CENTER { 112, 37 } @@ -54,7 +64,7 @@ along with this program. If not, see . #define ENCODERS_PAD_A { D2 } #define ENCODERS_PAD_B { D6 } #else -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #error Extra encoders cannot be enabled at the same time as the OLED Driver as they use the same pins. #endif #define ENCODERS_PAD_A { D2, D1, B0 } diff --git a/keyboards/rgbkb/sol/rev2/post_rules.mk b/keyboards/rgbkb/sol/rev2/post_rules.mk index ab03325c9..feaa2ac1f 100644 --- a/keyboards/rgbkb/sol/rev2/post_rules.mk +++ b/keyboards/rgbkb/sol/rev2/post_rules.mk @@ -28,7 +28,7 @@ ifeq ($(strip $(EXTRA_ENCODERS_ENABLE)), yes) OPT_DEFS += -DEXTRA_ENCODERS_ENABLE endif -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) ifeq ($(strip $(ENCODER_ENABLE)), yes) ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) ifneq ($(strip $(RGB_OLED_MENU)), no) diff --git a/keyboards/rgbkb/sol/rev2/rules.mk b/keyboards/rgbkb/sol/rev2/rules.mk index 29e211014..e5d2a9dcc 100644 --- a/keyboards/rgbkb/sol/rev2/rules.mk +++ b/keyboards/rgbkb/sol/rev2/rules.mk @@ -1,7 +1,7 @@ # RGBKB Sol Rev2 Defaults # Keycode Options -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration( +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control UNICODE_ENABLE = no # Unicode keycodes @@ -27,8 +27,8 @@ SF_ENABLE = no # Enables the additional 38 Starfighter LEDs IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) # Misc -OLED_DRIVER_ENABLE = no # Enable the OLED Driver -EXTRA_ENCODERS_ENABLE = no # Enables 3 encoders per side (up from 1, not compatible with OLED_DRIVER_ENABLE) +OLED_ENABLE = no # Enable the OLED Driver +EXTRA_ENCODERS_ENABLE = no # Enables 3 encoders per side (up from 1, not compatible with OLED_ENABLE) SWAP_HANDS_ENABLE = no # Enable one-hand typing LTO_ENABLE = yes # Enable Link Time Optimizations greatly reducing firmware size by disabling the old Macros and Functions features diff --git a/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c index f31da8bf5..5bc5e00d8 100644 --- a/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c +++ b/keyboards/rgbkb/zen/rev2/keymaps/default/keymap.c @@ -103,7 +103,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } -#if OLED_DRIVER_ENABLE +#if OLED_ENABLE const char* layer_name_user(uint32_t layer) { switch (layer) { case _QWERTY: diff --git a/keyboards/rgbkb/zen/rev2/rev2.c b/keyboards/rgbkb/zen/rev2/rev2.c index 28a5a9f20..7bc007246 100644 --- a/keyboards/rgbkb/zen/rev2/rev2.c +++ b/keyboards/rgbkb/zen/rev2/rev2.c @@ -1,6 +1,6 @@ #include "rev2.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include "split_util.h" #include "oled_driver.h" diff --git a/keyboards/rgbkb/zen/rev2/rules.mk b/keyboards/rgbkb/zen/rev2/rules.mk index e9d19a69a..9bb8b8cd0 100644 --- a/keyboards/rgbkb/zen/rev2/rules.mk +++ b/keyboards/rgbkb/zen/rev2/rules.mk @@ -1,9 +1,9 @@ ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no # Setup so that OLED can be turned on/off easily -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) # Custom local font file OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" endif diff --git a/keyboards/rgbkb/zen/rules.mk b/keyboards/rgbkb/zen/rules.mk index dd1399580..4da70baa4 100644 --- a/keyboards/rgbkb/zen/rules.mk +++ b/keyboards/rgbkb/zen/rules.mk @@ -30,13 +30,12 @@ endif # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -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 diff --git a/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk index c223cb9eb..ccceffe6a 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/5x6pad/rules.mk @@ -17,7 +17,7 @@ RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited t UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = yes # Enable rotary encoder -OLED_DRIVER_ENABLE = no # Enable the OLED Driver +OLED_ENABLE = no # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) LTO_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. diff --git a/keyboards/rgbkb/zygomorph/keymaps/default/readme.md b/keyboards/rgbkb/zygomorph/keymaps/default/readme.md index e1d30b36b..4f7b64510 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/default/readme.md +++ b/keyboards/rgbkb/zygomorph/keymaps/default/readme.md @@ -98,7 +98,8 @@ RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited t UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = yes # Enable rotary encoder (+90) -OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000) +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable the OLED Driver (+5000) IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) diff --git a/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk index c223cb9eb..ccceffe6a 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/default/rules.mk @@ -17,7 +17,7 @@ RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited t UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = yes # Enable rotary encoder -OLED_DRIVER_ENABLE = no # Enable the OLED Driver +OLED_ENABLE = no # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) LTO_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. diff --git a/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c b/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c index 972fa4b05..ffc222324 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c +++ b/keyboards/rgbkb/zygomorph/keymaps/default_oled/keymap.c @@ -169,7 +169,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // SSD1306 OLED driver logic -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM rgbkb_logo[] = { diff --git a/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk index f2c194f0d..ce80fc0d5 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/default_oled/rules.mk @@ -17,7 +17,8 @@ RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited t UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = yes # Enable rotary encoder -OLED_DRIVER_ENABLE = yes # Enable the OLED Driver +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) LTO_ENABLE = yes # Enable optimizations to reduce firmware size. Also disables action macros and functions. diff --git a/keyboards/rgbkb/zygomorph/keymaps/kageurufu/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/rules.mk index 61c7a07d6..d484c4736 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/kageurufu/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/kageurufu/rules.mk @@ -17,7 +17,7 @@ RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited t UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = yes # Enable rotary encoder -OLED_DRIVER_ENABLE = no # Enable the OLED Driver +OLED_ENABLE = no # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) # Do not edit past here diff --git a/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk b/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk index d7d50e137..0041d6042 100644 --- a/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk +++ b/keyboards/rgbkb/zygomorph/keymaps/xulkal/rules.mk @@ -19,7 +19,7 @@ RGBLIGHT_FULL_POWER = yes # Allow maximum RGB brightness. Otherwise, limited t UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE = no # Enable one-hand typing ENCODER_ENABLE = no # Enable rotary encoder -OLED_DRIVER_ENABLE = no # Enable the OLED Driver +OLED_ENABLE = no # Enable the OLED Driver IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) LTO_ENABLE = no # Enable optimizations to reduce firmware size. Also disables action macros and functions. diff --git a/keyboards/rgbkb/zygomorph/rules.mk b/keyboards/rgbkb/zygomorph/rules.mk index 8a9bdf3ec..8da0394ce 100644 --- a/keyboards/rgbkb/zygomorph/rules.mk +++ b/keyboards/rgbkb/zygomorph/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ristretto/ristretto.c b/keyboards/ristretto/ristretto.c index 1ea43bcee..a39c366b0 100644 --- a/keyboards/ristretto/ristretto.c +++ b/keyboards/ristretto/ristretto.c @@ -1,17 +1,17 @@ /* Copyright 2021 Brandon Lewis - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #include "ristretto.h" @@ -35,7 +35,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } diff --git a/keyboards/ristretto/rules.mk b/keyboards/ristretto/rules.mk index 7bc093c1d..0be0b414a 100644 --- a/keyboards/ristretto/rules.mk +++ b/keyboards/ristretto/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,5 +21,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 WAIT_FOR_USB = yes diff --git a/keyboards/rocketboard_16/keymaps/default/keymap.c b/keyboards/rocketboard_16/keymaps/default/keymap.c index ea078cbaf..0c3ee96d4 100644 --- a/keyboards/rocketboard_16/keymaps/default/keymap.c +++ b/keyboards/rocketboard_16/keymaps/default/keymap.c @@ -54,7 +54,7 @@ bool encoder_update_user(uint8_t index, bool clockwise){ return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM qmk_logo[] = { diff --git a/keyboards/rocketboard_16/keymaps/via/keymap.c b/keyboards/rocketboard_16/keymaps/via/keymap.c index ea078cbaf..0c3ee96d4 100644 --- a/keyboards/rocketboard_16/keymaps/via/keymap.c +++ b/keyboards/rocketboard_16/keymaps/via/keymap.c @@ -54,7 +54,7 @@ bool encoder_update_user(uint8_t index, bool clockwise){ return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM qmk_logo[] = { diff --git a/keyboards/rocketboard_16/rules.mk b/keyboards/rocketboard_16/rules.mk index eedbc33d9..b1450c779 100644 --- a/keyboards/rocketboard_16/rules.mk +++ b/keyboards/rocketboard_16/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -20,7 +20,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB backlit keys BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes # Enter lower-power sleep mode when on the ChibiOS idle thread diff --git a/keyboards/rominronin/katana60/rev1/rules.mk b/keyboards/rominronin/katana60/rev1/rules.mk index 7b69908b1..f68b5b1df 100644 --- a/keyboards/rominronin/katana60/rev1/rules.mk +++ b/keyboards/rominronin/katana60/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/rominronin/katana60/rev2/rules.mk b/keyboards/rominronin/katana60/rev2/rules.mk index 000f55911..b8a6e331c 100644 --- a/keyboards/rominronin/katana60/rev2/rules.mk +++ b/keyboards/rominronin/katana60/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/roseslite/rules.mk b/keyboards/roseslite/rules.mk index 32981133b..efca6bac6 100644 --- a/keyboards/roseslite/rules.mk +++ b/keyboards/roseslite/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rotr/rules.mk b/keyboards/rotr/rules.mk index 6f93f044e..3fcc6565f 100644 --- a/keyboards/rotr/rules.mk +++ b/keyboards/rotr/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes # Enables Rotary Encoder support diff --git a/keyboards/rpiguy9907/southpaw66/rules.mk b/keyboards/rpiguy9907/southpaw66/rules.mk index 9ea17f062..683ea4c53 100644 --- a/keyboards/rpiguy9907/southpaw66/rules.mk +++ b/keyboards/rpiguy9907/southpaw66/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/rubi/rules.mk b/keyboards/rubi/rules.mk index 59ba4ffa1..3f464563d 100644 --- a/keyboards/rubi/rules.mk +++ b/keyboards/rubi/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -20,7 +20,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes SRC += lib/oled.c \ diff --git a/keyboards/runner3680/5x8/keymaps/JIS/keymap.c b/keyboards/runner3680/5x8/keymaps/JIS/keymap.c index 1b39cf08e..75ff75565 100644 --- a/keyboards/runner3680/5x8/keymaps/JIS/keymap.c +++ b/keyboards/runner3680/5x8/keymaps/JIS/keymap.c @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------------------------------------------' `-------------------------------------------------------' */ [_QWERTY] = LAYOUT( - RGBRST , RGB_TOG, JP_ZHTG, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, JP_YEN, + RGBRST , RGB_TOG, JP_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, JP_CIRC, JP_YEN, RGB_MOD, RGB_SAI, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_BSPC, RGB_SAI, RGB_SAD, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, JP_COLN, JP_RBRC, KC_ENT, RGB_VAI, RGB_VAD, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JP_BSLS, KC_UP, KC_RSFT, diff --git a/keyboards/runner3680/rules.mk b/keyboards/runner3680/rules.mk index f071b7a16..02db5fc83 100644 --- a/keyboards/runner3680/rules.mk +++ b/keyboards/runner3680/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ryloo_studio/m0110/rules.mk b/keyboards/ryloo_studio/m0110/rules.mk index ec85ce10e..717bdbb7f 100755 --- a/keyboards/ryloo_studio/m0110/rules.mk +++ b/keyboards/ryloo_studio/m0110/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sam/s80/rules.mk b/keyboards/sam/s80/rules.mk index e2f9c8310..b91f40ae3 100644 --- a/keyboards/sam/s80/rules.mk +++ b/keyboards/sam/s80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sam/sg81m/rules.mk b/keyboards/sam/sg81m/rules.mk index b7b60cb1f..bad8cf894 100644 --- a/keyboards/sam/sg81m/rules.mk +++ b/keyboards/sam/sg81m/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sanctified/dystopia/rules.mk b/keyboards/sanctified/dystopia/rules.mk index 8701c5416..0fef92377 100644 --- a/keyboards/sanctified/dystopia/rules.mk +++ b/keyboards/sanctified/dystopia/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/satt/vision/keymaps/satt/keymap.c b/keyboards/satt/vision/keymaps/satt/keymap.c index 5735d3415..952965340 100644 --- a/keyboards/satt/vision/keymaps/satt/keymap.c +++ b/keyboards/satt/vision/keymaps/satt/keymap.c @@ -81,7 +81,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_PSEUDO_US] = LAYOUT( _______, _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, _______, _______, _______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JIS2US, _______, - _______, KC_Z, KC_X, KC_C, KC_V, KC_B, JP_ZHTG, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JIS2US, + _______, KC_Z, KC_X, KC_C, KC_V, KC_B, JP_ZKHK, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, JIS2US, _______, _______, P_LOWER, _______, P_RAISE, _______, _______, _______ ), diff --git a/keyboards/satt/vision/keymaps/satt/keymap_jis2us.h b/keyboards/satt/vision/keymaps/satt/keymap_jis2us.h index 916a403eb..0b811fd03 100644 --- a/keyboards/satt/vision/keymaps/satt/keymap_jis2us.h +++ b/keyboards/satt/vision/keymaps/satt/keymap_jis2us.h @@ -40,10 +40,10 @@ const uint16_t PROGMEM keymap_jis2us[][2] = { [KC_BSLS] = { JP_YEN, JP_PIPE }, /* ] and } -> \ and | */ [KC_NUHS] = { JP_YEN, JP_PIPE }, /* ] and } -> \ and | */ [KC_SCLN] = { JP_SCLN, JP_COLN }, /* ; and + -> ; and : */ - [KC_QUOT] = { JP_QUOT, JP_DQT }, /* : and * -> ' and " */ + [KC_QUOT] = { JP_QUOT, JP_DQUO }, /* : and * -> ' and " */ [KC_GRV] = { JP_GRV, JP_TILD }, /* Han/Zen -> ` and ~ */ - [KC_COMM] = { JP_COMM, JP_LT }, /* , and < -> , and < */ - [KC_DOT] = { JP_DOT, JP_GT }, /* . and > -> . and > */ + [KC_COMM] = { JP_COMM, JP_LABK }, /* , and < -> , and < */ + [KC_DOT] = { JP_DOT, JP_RABK }, /* . and > -> . and > */ [KC_SLSH] = { JP_SLSH, JP_QUES }, /* / and ? -> / and ? */ }; // clang-format on diff --git a/keyboards/satt/vision/rules.mk b/keyboards/satt/vision/rules.mk index 5e8194558..266dcf008 100644 --- a/keyboards/satt/vision/rules.mk +++ b/keyboards/satt/vision/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sawnsprojects/satxri6key/config.h b/keyboards/sawnsprojects/satxri6key/config.h index 833fd584e..129f2536b 100644 --- a/keyboards/sawnsprojects/satxri6key/config.h +++ b/keyboards/sawnsprojects/satxri6key/config.h @@ -71,7 +71,7 @@ #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Sets the default mode, if none has been set \ No newline at end of file +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Sets the default mode, if none has been set diff --git a/keyboards/sawnsprojects/satxri6key/keymaps/via/keymap.c b/keyboards/sawnsprojects/satxri6key/keymaps/via/keymap.c index 91ab35276..e09ef997f 100644 --- a/keyboards/sawnsprojects/satxri6key/keymaps/via/keymap.c +++ b/keyboards/sawnsprojects/satxri6key/keymaps/via/keymap.c @@ -19,23 +19,23 @@ char wpm_str[4]; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - + KC_ESC, KC_GRV, TO(1), KC_Z, KC_X, KC_C ), [1] = LAYOUT( - + KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS ), [2] = LAYOUT( - + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [3] = LAYOUT( - + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - + }; @@ -43,10 +43,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // based on https://github.com/qmk/qmk_firmware/blob/master/keyboards/kyria/keymaps/j-inc/keymap.c // In your rules.mk make sure you have: -// OLED_DRIVER_ENABLE = yes +// OLED_ENABLE = yes // WPM_ENABLE = yes -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE // WPM-responsive animation stuff here # define IDLE_FRAMES 5 # define IDLE_SPEED 20 // below this wpm value your animation will idle @@ -161,4 +161,4 @@ void oled_task_user(void) { oled_set_cursor(0, 1); oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/sawnsprojects/satxri6key/keymaps/via/rules.mk b/keyboards/sawnsprojects/satxri6key/keymaps/via/rules.mk index 9fd9843bf..3428d6af7 100644 --- a/keyboards/sawnsprojects/satxri6key/keymaps/via/rules.mk +++ b/keyboards/sawnsprojects/satxri6key/keymaps/via/rules.mk @@ -1,5 +1,5 @@ VIA_ENABLE = yes -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no WPM_ENABLE = no RGBLIGHT_ENABLE = yes -LTO_ENABLE = no \ No newline at end of file +LTO_ENABLE = no diff --git a/keyboards/sawnsprojects/satxri6key/rules.mk b/keyboards/sawnsprojects/satxri6key/rules.mk index 814b360d2..704ce90be 100644 --- a/keyboards/sawnsprojects/satxri6key/rules.mk +++ b/keyboards/sawnsprojects/satxri6key/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/scarletbandana/rules.mk b/keyboards/scarletbandana/rules.mk index 2410b2c42..a5d9a48a1 100644 --- a/keyboards/scarletbandana/rules.mk +++ b/keyboards/scarletbandana/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -23,7 +23,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output diff --git a/keyboards/scatter42/rules.mk b/keyboards/scatter42/rules.mk index 29f4021bb..2ee15c83b 100644 --- a/keyboards/scatter42/rules.mk +++ b/keyboards/scatter42/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sck/gtm/rules.mk b/keyboards/sck/gtm/rules.mk index a6320386f..e383faf07 100644 --- a/keyboards/sck/gtm/rules.mk +++ b/keyboards/sck/gtm/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sck/m0116b/config.h b/keyboards/sck/m0116b/config.h index 3246ab74f..63b74b902 100644 --- a/keyboards/sck/m0116b/config.h +++ b/keyboards/sck/m0116b/config.h @@ -192,26 +192,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 #define BOOTMAGIC_LITE_COLUMN 6 diff --git a/keyboards/sck/m0116b/rules.mk b/keyboards/sck/m0116b/rules.mk index 0507ad0b1..00a0c32a3 100644 --- a/keyboards/sck/m0116b/rules.mk +++ b/keyboards/sck/m0116b/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/sck/neiso/config.h b/keyboards/sck/neiso/config.h index 71f50d198..ccf4da9f1 100644 --- a/keyboards/sck/neiso/config.h +++ b/keyboards/sck/neiso/config.h @@ -141,26 +141,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/sck/neiso/rules.mk b/keyboards/sck/neiso/rules.mk index 8b5cc72ff..25956d09f 100644 --- a/keyboards/sck/neiso/rules.mk +++ b/keyboards/sck/neiso/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/sck/osa/config.h b/keyboards/sck/osa/config.h index 131ae98f8..87651f1f8 100644 --- a/keyboards/sck/osa/config.h +++ b/keyboards/sck/osa/config.h @@ -198,26 +198,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ //#define BOOTMAGIC_LITE_ROW 0 //#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/sck/osa/rules.mk b/keyboards/sck/osa/rules.mk index e291c08bf..d73d9bffc 100644 --- a/keyboards/sck/osa/rules.mk +++ b/keyboards/sck/osa/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/scythe/config.h b/keyboards/scythe/config.h index d59b9e7f3..a235f8d31 100644 --- a/keyboards/scythe/config.h +++ b/keyboards/scythe/config.h @@ -167,26 +167,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/scythe/rules.mk b/keyboards/scythe/rules.mk index 8efc79ef2..3304c103d 100644 --- a/keyboards/scythe/rules.mk +++ b/keyboards/scythe/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/seigaiha/rules.mk b/keyboards/seigaiha/rules.mk index f19a8ec12..8ff99a00d 100644 --- a/keyboards/seigaiha/rules.mk +++ b/keyboards/seigaiha/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sekigon/grs_70ec/matrix.c b/keyboards/sekigon/grs_70ec/matrix.c index 7e90d99af..98b234793 100644 --- a/keyboards/sekigon/grs_70ec/matrix.c +++ b/keyboards/sekigon/grs_70ec/matrix.c @@ -71,11 +71,13 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { return updated; } -void matrix_post_scan(void) { +bool matrix_post_scan(void) { + bool changed = false; if (is_keyboard_master()) { static uint8_t error_count; - if (!transport_master(matrix + thatHand)) { + matrix_row_t slave_matrix[ROWS_PER_HAND] = {0}; + if (!transport_master(matrix + thatHand, slave_matrix)) { error_count++; if (error_count > ERROR_DISCONNECT_COUNT) { @@ -83,25 +85,35 @@ void matrix_post_scan(void) { dprintf("Error: disconnect split half\n"); for (int i = 0; i < ROWS_PER_HAND; ++i) { matrix[thatHand + i] = 0; + slave_matrix[i] = 0; } + + changed = true; } } else { error_count = 0; + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + if (matrix[thatHand + i] != slave_matrix[i]) { + matrix[thatHand + i] = slave_matrix[i]; + changed = true; + } + } } matrix_scan_quantum(); } else { - transport_slave(matrix + thisHand); + transport_slave(matrix + thatHand, matrix + thisHand); matrix_slave_scan_user(); } + return changed; } uint8_t matrix_scan(void) { - bool changed = matrix_scan_custom(raw_matrix); + bool changed = matrix_scan_custom(raw_matrix) || matrix_post_scan(); debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); - matrix_post_scan(); return changed; } diff --git a/keyboards/sekigon/grs_70ec/rules.mk b/keyboards/sekigon/grs_70ec/rules.mk index 410cd9247..2c5fa6557 100644 --- a/keyboards/sekigon/grs_70ec/rules.mk +++ b/keyboards/sekigon/grs_70ec/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sendyyeah/75pixels/info.json b/keyboards/sendyyeah/75pixels/info.json index 20d158cf7..d952cac13 100644 --- a/keyboards/sendyyeah/75pixels/info.json +++ b/keyboards/sendyyeah/75pixels/info.json @@ -7,7 +7,7 @@ "layouts": { "LAYOUT_ortho_5x15": { "layout": [ - {"label": "Esc", "X": 0, "y": 0}, + {"label": "Esc", "x": 0, "y": 0}, {"label": "1", "x": 1, "y": 0}, {"label": "2", "x": 2, "y": 0}, {"label": "3", "x": 3, "y": 0}, @@ -22,21 +22,21 @@ {"label": "NumLock", "x": 12, "y": 0}, {"label": "/", "x": 13, "y": 0}, {"label": "*", "x": 14, "y": 0}, - {"label": "Tab", "X": 0, "y": 1}, - {"label": "Q", "X": 1, "y": 1}, - {"label": "W", "X": 2, "y": 1}, - {"label": "E", "X": 3, "y": 1}, - {"label": "R", "X": 4, "y": 1}, - {"label": "T", "X": 5, "y": 1}, - {"label": "Y", "X": 6, "y": 1}, - {"label": "U", "X": 7, "y": 1}, - {"label": "I", "X": 8, "y": 1}, - {"label": "O", "X": 9, "y": 1}, - {"label": "P", "X": 10, "y": 1}, - {"label": "|\n\\", "X": 11, "y": 1}, - {"label": "7\nHome", "X": 12, "y": 1}, - {"label": "8\nUp", "X": 13, "y": 1}, - {"label": "9\nPgUp", "X": 14, "y": 1}, + {"label": "Tab", "x": 0, "y": 1}, + {"label": "Q", "x": 1, "y": 1}, + {"label": "W", "x": 2, "y": 1}, + {"label": "E", "x": 3, "y": 1}, + {"label": "R", "x": 4, "y": 1}, + {"label": "T", "x": 5, "y": 1}, + {"label": "Y", "x": 6, "y": 1}, + {"label": "U", "x": 7, "y": 1}, + {"label": "I", "x": 8, "y": 1}, + {"label": "O", "x": 9, "y": 1}, + {"label": "P", "x": 10, "y": 1}, + {"label": "|\n\\", "x": 11, "y": 1}, + {"label": "7\nHome", "x": 12, "y": 1}, + {"label": "8\nUp", "x": 13, "y": 1}, + {"label": "9\nPgUp", "x": 14, "y": 1}, {"label": "Caps", "x": 0, "y": 2}, {"label": "A", "x": 1, "y": 2}, {"label": "S", "x": 2, "y": 2}, @@ -67,21 +67,21 @@ {"label": "1\nEnd", "x": 12, "y": 3}, {"label": "2\nDown", "x": 13, "y": 3}, {"label": "3\nPgDn", "x": 14, "y": 3}, - {"label": "Ctrl", "X": 0, "y": 4}, - {"label": "Win", "X": 1, "y": 4}, - {"label": "Alt", "X": 2, "y": 4}, - {"label": "Fn", "X": 3, "y": 4}, - {"label": "Lower", "X": 4, "y": 4}, - {"label": "Space", "X": 5, "y": 4}, - {"label": "Space", "X": 6, "y": 4}, - {"label": "Raise", "X": 7, "y": 4}, - {"label": "Alt", "X": 8, "y": 4}, - {"label": "Win", "X": 9, "y": 4}, - {"label": "Menu", "X": 10, "y": 4}, - {"label": "Ctrl", "X": 11, "y": 4}, - {"label": "0\nIns", "X": 12, "y": 4}, - {"label": ".\nDel", "X": 13, "y": 4}, - {"label": "Enter", "X": 14, "y": 4} + {"label": "Ctrl", "x": 0, "y": 4}, + {"label": "Win", "x": 1, "y": 4}, + {"label": "Alt", "x": 2, "y": 4}, + {"label": "Fn", "x": 3, "y": 4}, + {"label": "Lower", "x": 4, "y": 4}, + {"label": "Space", "x": 5, "y": 4}, + {"label": "Space", "x": 6, "y": 4}, + {"label": "Raise", "x": 7, "y": 4}, + {"label": "Alt", "x": 8, "y": 4}, + {"label": "Win", "x": 9, "y": 4}, + {"label": "Menu", "x": 10, "y": 4}, + {"label": "Ctrl", "x": 11, "y": 4}, + {"label": "0\nIns", "x": 12, "y": 4}, + {"label": ".\nDel", "x": 13, "y": 4}, + {"label": "Enter", "x": 14, "y": 4} ] } } diff --git a/keyboards/sendyyeah/75pixels/rules.mk b/keyboards/sendyyeah/75pixels/rules.mk index 50b4125b3..c42deb2f2 100644 --- a/keyboards/sendyyeah/75pixels/rules.mk +++ b/keyboards/sendyyeah/75pixels/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sendyyeah/bevi/rules.mk b/keyboards/sendyyeah/bevi/rules.mk index 4de348c25..f16839681 100644 --- a/keyboards/sendyyeah/bevi/rules.mk +++ b/keyboards/sendyyeah/bevi/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sendyyeah/pix/keymaps/default/keymap.c b/keyboards/sendyyeah/pix/keymaps/default/keymap.c index 720616101..ee98aedd8 100644 --- a/keyboards/sendyyeah/pix/keymaps/default/keymap.c +++ b/keyboards/sendyyeah/pix/keymaps/default/keymap.c @@ -69,7 +69,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; diff --git a/keyboards/sendyyeah/pix/keymaps/via/keymap.c b/keyboards/sendyyeah/pix/keymaps/via/keymap.c index 720616101..ee98aedd8 100644 --- a/keyboards/sendyyeah/pix/keymaps/via/keymap.c +++ b/keyboards/sendyyeah/pix/keymaps/via/keymap.c @@ -69,7 +69,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; diff --git a/keyboards/sendyyeah/pix/rules.mk b/keyboards/sendyyeah/pix/rules.mk index 956a61880..578bc2938 100644 --- a/keyboards/sendyyeah/pix/rules.mk +++ b/keyboards/sendyyeah/pix/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,4 +21,5 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/senselessclay/had60/rules.mk b/keyboards/senselessclay/had60/rules.mk index af835e970..e9c568333 100644 --- a/keyboards/senselessclay/had60/rules.mk +++ b/keyboards/senselessclay/had60/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sentraq/number_pad/rules.mk b/keyboards/sentraq/number_pad/rules.mk index 576ae3cf6..ac57f9939 100644 --- a/keyboards/sentraq/number_pad/rules.mk +++ b/keyboards/sentraq/number_pad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/sentraq/s60_x/default/rules.mk b/keyboards/sentraq/s60_x/default/rules.mk index 3b0123941..7dd95d8d6 100644 --- a/keyboards/sentraq/s60_x/default/rules.mk +++ b/keyboards/sentraq/s60_x/default/rules.mk @@ -14,13 +14,12 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # 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 -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/rules.mk b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/rules.mk index 95d084dff..0954c54c9 100644 --- a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/rules.mk +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/sentraq/s60_x/keymaps/bluebear/rules.mk b/keyboards/sentraq/s60_x/keymaps/bluebear/rules.mk index b7c9a0479..ca4fd4b9e 100644 --- a/keyboards/sentraq/s60_x/keymaps/bluebear/rules.mk +++ b/keyboards/sentraq/s60_x/keymaps/bluebear/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c b/keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c index 944ba7555..3d4969aa1 100644 --- a/keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c @@ -67,135 +67,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SFX] = LAYOUT( ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, BL_TOGG,BL_STEP,BL_DEC, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, F(0), F(1), ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, F(2), F(3), F(4), F(5), F(6), F(7), ______, ______, ______, ______, ______, ______, \ + ______, RGB_TOG,RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______ \ ) }; - -enum function_id { - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(RGBLED_TOGGLE), - [1] = ACTION_FUNCTION(RGBLED_STEP_MODE), - [2] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [3] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [4] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [5] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [6] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [7] = ACTION_FUNCTION(RGBLED_DECREASE_VAL) -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGBLED_TOGGLE: - if (record->event.pressed) { - #ifdef RGB_ENABLE - rgblight_toggle(); - #endif - } - break; - case RGBLED_INCREASE_HUE: - if (record->event.pressed) { - #ifdef RGB_ENABLE - rgblight_increase_hue(); - #endif - } - break; - case RGBLED_DECREASE_HUE: - if (record->event.pressed) { - #ifdef RGB_ENABLE - rgblight_decrease_hue(); - #endif - } - break; - case RGBLED_INCREASE_SAT: - if (record->event.pressed) { - #ifdef RGB_ENABLE - rgblight_increase_sat(); - #endif - } - break; - case RGBLED_DECREASE_SAT: - if (record->event.pressed) { - #ifdef RGB_ENABLE - rgblight_decrease_sat(); - #endif - } - break; - case RGBLED_INCREASE_VAL: - if (record->event.pressed) { - #ifdef RGB_ENABLE - rgblight_increase_val(); - #endif - } - break; - case RGBLED_DECREASE_VAL: - if (record->event.pressed) { - #ifdef RGB_ENABLE - rgblight_decrease_val(); - #endif - } - break; - case RGBLED_STEP_MODE: - if (record->event.pressed) { - #ifdef RGB_ENABLE - rgblight_step(); - #endif - } - break; - } -} - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } - -} diff --git a/keyboards/sentraq/s60_x/rgb/rules.mk b/keyboards/sentraq/s60_x/rgb/rules.mk index f765aa8bb..e6314c851 100644 --- a/keyboards/sentraq/s60_x/rgb/rules.mk +++ b/keyboards/sentraq/s60_x/rgb/rules.mk @@ -14,13 +14,12 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # 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 -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/sentraq/s65_plus/rules.mk b/keyboards/sentraq/s65_plus/rules.mk index c1fb6cfd2..3888bb7ed 100644 --- a/keyboards/sentraq/s65_plus/rules.mk +++ b/keyboards/sentraq/s65_plus/rules.mk @@ -14,12 +14,11 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/sentraq/s65_x/rules.mk b/keyboards/sentraq/s65_x/rules.mk index a9cbd2518..5fe828a7f 100644 --- a/keyboards/sentraq/s65_x/rules.mk +++ b/keyboards/sentraq/s65_x/rules.mk @@ -14,12 +14,11 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/sergiopoverony/creator_pro/config.h b/keyboards/sergiopoverony/creator_pro/config.h new file mode 100644 index 000000000..3bf7efc77 --- /dev/null +++ b/keyboards/sergiopoverony/creator_pro/config.h @@ -0,0 +1,49 @@ +/* Copyright 2020-2021 SergioPoverony + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +/* vid pid */ +#define VENDOR_ID 0x8B1E +#define PRODUCT_ID 0x0C00 +#define DEVICE_VER 0x0001 +#define MANUFACTURER SergioPoverony +#define PRODUCT Creator Pro + + +/* key matrix size pins */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 9 +#define DIRECT_PINS { \ + { D1, D4, C6, D7, \ + E6, \ + B2, B3, B1, F7 } \ +} + + +/*led layout indication pins*/ +#define RED_LED D0 +#define BLUE_LED B5 +#define GREEN_LED B6 + +/* encoder pins*/ +#define ENCODERS_PAD_A { D2 } +#define ENCODERS_PAD_B { D3 } +#define ENCODER_RESOLUTION 1 + +#define UNUSED_PINS + diff --git a/keyboards/sergiopoverony/creator_pro/creator_pro.c b/keyboards/sergiopoverony/creator_pro/creator_pro.c new file mode 100644 index 000000000..55c0497df --- /dev/null +++ b/keyboards/sergiopoverony/creator_pro/creator_pro.c @@ -0,0 +1,33 @@ +/* Copyright 2020-2021 SergioPoverony + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "creator_pro.h" + +void matrix_init_kb(void) { + matrix_init_user(); +/* led pins */ + setPinOutput(RED_LED); + setPinOutput(BLUE_LED); + setPinOutput(GREEN_LED); +} +void turn_off_leds(void) { + writePinLow(RED_LED); + writePinLow(BLUE_LED); + writePinLow(GREEN_LED); +} +void turn_on_led(pin_t pin) { + writePinHigh(pin); +} diff --git a/keyboards/sergiopoverony/creator_pro/creator_pro.h b/keyboards/sergiopoverony/creator_pro/creator_pro.h new file mode 100644 index 000000000..566e94a77 --- /dev/null +++ b/keyboards/sergiopoverony/creator_pro/creator_pro.h @@ -0,0 +1,33 @@ +/* Copyright 2020-2021 SergioPoverony + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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( \ +K01, K02, K03, K04, \ + K05, \ +K06, K07, K08, K09 \ +) { { \ +K01, K02, K03, K04, \ + K05, \ +K06, K07, K08, K09 \ +} } + +/*led work*/ +void turn_off_leds(void); +void turn_on_led(pin_t pin); + diff --git a/keyboards/sergiopoverony/creator_pro/info.json b/keyboards/sergiopoverony/creator_pro/info.json new file mode 100644 index 000000000..1e6bceec5 --- /dev/null +++ b/keyboards/sergiopoverony/creator_pro/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "Creator Pro", + "url": "https://github.com/sergiopoverony", + "maintainer": "SergioPoverony", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":4.5, "y":0.5}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1} + ] + } + } +} diff --git a/keyboards/sergiopoverony/creator_pro/keymaps/default/keymap.c b/keyboards/sergiopoverony/creator_pro/keymaps/default/keymap.c new file mode 100644 index 000000000..d29621929 --- /dev/null +++ b/keyboards/sergiopoverony/creator_pro/keymaps/default/keymap.c @@ -0,0 +1,123 @@ +/* Copyright 2020-2021 SergioPoverony + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 num */ +enum layer_number { + _HOME = 0, + _RED, + _BLUE, + _GREEN +}; + +/* Encoder function with layers function */ +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (get_highest_layer(layer_state)) { + + case _HOME: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + + case _RED: + if (clockwise) { + tap_code(KC_MS_WH_UP); + } else { + tap_code(KC_MS_WH_DOWN); + } + break; + + case _BLUE: + if (clockwise) { + tap_code(KC_PGUP); + } else { + tap_code(KC_PGDN); + } + break; + + case _GREEN: + default: + if (clockwise) { + tap_code16(KC_LEFT); + } else { + tap_code16(KC_RIGHT); + } + break; + } + } + return true; +} + + +/* Layout */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_HOME] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, + TO(_RED), + KC_5, KC_6, KC_7, KC_8 + ), + + [_RED] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, + TO(_BLUE), + KC_A, KC_S, KC_D, KC_F + ), + + [_BLUE] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, + TO(_GREEN), + KC_5, KC_6, KC_7, KC_8 + ), + + [_GREEN] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, + TO(_HOME), + KC_5, KC_6, KC_7, KC_8 + ), +}; + + +/* Select led layout */ +layer_state_t layer_state_set_user(layer_state_t state) +{ + turn_off_leds(); + + switch (get_highest_layer(state)) + { + case _HOME: + turn_on_led(RED_LED); + turn_on_led(BLUE_LED); + break; + + case _RED: + turn_on_led(RED_LED); + break; + + case _BLUE: + turn_on_led(BLUE_LED); + break; + + case _GREEN: + turn_on_led(GREEN_LED); + break; + } + return state; +}; diff --git a/keyboards/sergiopoverony/creator_pro/keymaps/default/readme.md b/keyboards/sergiopoverony/creator_pro/keymaps/default/readme.md new file mode 100644 index 000000000..f899eb3c1 --- /dev/null +++ b/keyboards/sergiopoverony/creator_pro/keymaps/default/readme.md @@ -0,0 +1,5 @@ +![Creator Pro Layout](https://i.imgur.com/0PmpLcM.png) + +# Default Creator Pro Layout + +This is the default layout that comes flashed on every Creator Pro. The right most key (Encoder) is the rotary and the key is binded to layer switching. \ No newline at end of file diff --git a/keyboards/sergiopoverony/creator_pro/keymaps/via/keymap.c b/keyboards/sergiopoverony/creator_pro/keymaps/via/keymap.c new file mode 100644 index 000000000..756677246 --- /dev/null +++ b/keyboards/sergiopoverony/creator_pro/keymaps/via/keymap.c @@ -0,0 +1,123 @@ +/* Copyright 2020-2021 SergioPoverony + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 num */ +enum layer_number { + _HOME = 0, + _RED, + _BLUE, + _GREEN +}; + +/* Encoder function with layers function */ +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (get_highest_layer(layer_state)) { + + case _HOME: + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + + case _RED: + if (clockwise) { + tap_code(KC_MS_WH_UP); + } else { + tap_code(KC_MS_WH_DOWN); + } + break; + + case _BLUE: + if (clockwise) { + tap_code(KC_PGUP); + } else { + tap_code(KC_PGDN); + } + break; + + case _GREEN: + default: + if (clockwise) { + tap_code16(KC_LEFT); + } else { + tap_code16(KC_RIGHT); + } + break; + } + } + return true; +} + + +/* Layout */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_HOME] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, + TO(_RED), + KC_5, KC_6, KC_7, KC_8 + ), + + [_RED] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, + TO(_BLUE), + KC_A, KC_S, KC_D, KC_F + ), + + [_BLUE] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, + TO(_GREEN), + KC_5, KC_6, KC_7, KC_8 + ), + + [_GREEN] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, + TO(_HOME), + KC_5, KC_6, KC_7, KC_8 + ), +}; + + +/* Select led layout */ +layer_state_t layer_state_set_user(layer_state_t state) +{ + turn_off_leds(); + + switch (get_highest_layer(state)) + { + case _HOME: + turn_on_led(RED_LED); + turn_on_led(BLUE_LED); + break; + + case _RED: + turn_on_led(RED_LED); + break; + + case _BLUE: + turn_on_led(BLUE_LED); + break; + + case _GREEN: + turn_on_led(GREEN_LED); + break; + } + return state; +}; diff --git a/keyboards/xd87/keymaps/via/rules.mk b/keyboards/sergiopoverony/creator_pro/keymaps/via/rules.mk similarity index 100% rename from keyboards/xd87/keymaps/via/rules.mk rename to keyboards/sergiopoverony/creator_pro/keymaps/via/rules.mk diff --git a/keyboards/sergiopoverony/creator_pro/readme.md b/keyboards/sergiopoverony/creator_pro/readme.md new file mode 100644 index 000000000..601c069d9 --- /dev/null +++ b/keyboards/sergiopoverony/creator_pro/readme.md @@ -0,0 +1,27 @@ +# Creator Pro + +![Creator Pro Layout](https://i.imgur.com/G3Yf20D.jpg) + +This Keypad has 1 rows x 9 columns of keys. It has the top/default layer that +has a few 1-8 keys as well as one dedicated encoder key for change layer. The + second layer has QWERASDF keys. Encoder have 4 function on any layer is + Volume Control, Mouse Wheel, PageUp/PageDn, Left/Righ buttons. +The keypad also includes three RGB LEDs that show active layer. +For enter the bootloader to flash new firmware need press hw reset button hole on the bottom + +Keyboard Maintainer: [SergioPoverony](https://github.com/sergiopoverony) + +Hardware: + * For enter the bootloader to flash new firmware need press hw reset button hole on the bottom + * Key switch holes cut fabrication in blank PCB + * Uses Gateron Brown switches with gray keycaps XDA profile + * Chassis is PCB with supports + * PCB fabrication + * Uses a Pro Micro wint MicroUSB connector + * Includes a reset switch accessible by a hole on the bottom + +Make example for this keyboard (after setting up your build environment): + + make sergiopoverony/creator_pro:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/sergiopoverony/creator_pro/rules.mk b/keyboards/sergiopoverony/creator_pro/rules.mk new file mode 100644 index 000000000..2a7e58296 --- /dev/null +++ b/keyboards/sergiopoverony/creator_pro/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes diff --git a/keyboards/setta21/keymaps/salicylic/config.h b/keyboards/setta21/keymaps/salicylic/config.h index 44b34aa2f..06e23ba7a 100644 --- a/keyboards/setta21/keymaps/salicylic/config.h +++ b/keyboards/setta21/keymaps/salicylic/config.h @@ -27,7 +27,7 @@ # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) // # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 @@ -37,4 +37,3 @@ # define RGB_MATRIX_VAL_STEP 5 # define RGB_MATRIX_SPD_STEP 10 #endif - diff --git a/keyboards/setta21/keymaps/salicylic/keymap.c b/keyboards/setta21/keymaps/salicylic/keymap.c index d1db2ff9a..568afd133 100644 --- a/keyboards/setta21/keymaps/salicylic/keymap.c +++ b/keyboards/setta21/keymaps/salicylic/keymap.c @@ -9,7 +9,7 @@ extern rgblight_config_t rgblight_config; extern uint8_t is_master; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static uint32_t oled_timer = 0; #endif @@ -40,11 +40,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|--------+--------+--------+--------| KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, //|--------+--------+--------+--------| - KC_P7, KC_P8, KC_P9, + KC_P7, KC_P8, KC_P9, //|--------+--------+--------+--------| KC_P4, KC_P5, KC_P6, KC_PPLS, //|--------+--------+--------+--------| - KC_P1, KC_P2, KC_P3, + KC_P1, KC_P2, KC_P3, //|--------+--------+--------+--------| LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT //`-----------------------------------' @@ -56,13 +56,13 @@ LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT //|--------+--------+--------+--------| XXXXXXX, _______, _______, _______, //|--------+--------+--------+--------| - XXXXXXX, KC_UP, XXXXXXX, + XXXXXXX, KC_UP, XXXXXXX, //|--------+--------+--------+--------| KC_LEFT, KC_DOWN,KC_RIGHT, _______, //|--------+--------+--------+--------| - XXXXXXX, KC_DOWN, XXXXXXX, + XXXXXXX, KC_DOWN, XXXXXXX, //|--------+--------+--------+--------| - MO(_ARROW), MO(_MACRO), _______ + MO(_ARROW), MO(_MACRO), _______ //`-----------------------------------' ), @@ -72,13 +72,13 @@ LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT //|--------+--------+--------+--------| SEND_MIN,SEND_MAX,SEND_CIF,SEND_AVE, //|--------+--------+--------+--------| - KC_F7, KC_F8, KC_F9, + KC_F7, KC_F8, KC_F9, //|--------+--------+--------+--------| KC_F4, KC_F5, KC_F6,SEND_SUM, //|--------+--------+--------+--------| - KC_F11, KC_F12, KC_F3, + KC_F11, KC_F12, KC_F3, //|--------+--------+--------+--------| - _______, _______, JP_RPRN + _______, _______, JP_RPRN //`-----------------------------------' ), @@ -88,13 +88,13 @@ LT(_ARROW, KC_P0),LT(_MACRO, KC_PDOT),KC_PENT //|--------+--------+--------+--------| XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, //|--------+--------+--------+--------| - RGB_SAD, RGB_SAI, XXXXXXX, + RGB_SAD, RGB_SAI, XXXXXXX, //|--------+--------+--------+--------| RGB_HUD, RGB_HUI, XXXXXXX, RGB_TOG, //|--------+--------+--------+--------| - RGB_VAD, RGB_VAI, XXXXXXX, + RGB_VAD, RGB_VAI, XXXXXXX, //|--------+--------+--------+--------| - _______, _______, RGB_MOD + _______, _______, RGB_MOD //`-----------------------------------' ) }; @@ -109,7 +109,7 @@ int RGB_current_mode; bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool result = false; if (record->event.pressed) { - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE oled_timer = timer_read32(); #endif } @@ -163,7 +163,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return result; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; } diff --git a/keyboards/setta21/keymaps/salicylic/rules.mk b/keyboards/setta21/keymaps/salicylic/rules.mk index 2d1919296..69864a316 100644 --- a/keyboards/setta21/keymaps/salicylic/rules.mk +++ b/keyboards/setta21/keymaps/salicylic/rules.mk @@ -1,3 +1,4 @@ RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/setta21/rules.mk b/keyboards/setta21/rules.mk index b99696bc2..6085e5cf1 100644 --- a/keyboards/setta21/rules.mk +++ b/keyboards/setta21/rules.mk @@ -14,20 +14,19 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. TAP_DANCE_ENABLE = no -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no USE_I2C = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/shambles/rules.mk b/keyboards/shambles/rules.mk index e6af5d3ab..97fd0ba99 100644 --- a/keyboards/shambles/rules.mk +++ b/keyboards/shambles/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/shiro/config.h b/keyboards/shiro/config.h index 91633eaa4..9fbdd4477 100644 --- a/keyboards/shiro/config.h +++ b/keyboards/shiro/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/shiro/rules.mk b/keyboards/shiro/rules.mk index b828d7c36..a684ff876 100644 --- a/keyboards/shiro/rules.mk +++ b/keyboards/shiro/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/shk9/rules.mk b/keyboards/shk9/rules.mk index 8d356cbd1..30245dee7 100644 --- a/keyboards/shk9/rules.mk +++ b/keyboards/shk9/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -20,5 +20,3 @@ 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 = ortho_3x3 \ No newline at end of file diff --git a/keyboards/sidderskb/majbritt/rev1/rules.mk b/keyboards/sidderskb/majbritt/rev1/rules.mk index 812c71064..6b80c55ef 100644 --- a/keyboards/sidderskb/majbritt/rev1/rules.mk +++ b/keyboards/sidderskb/majbritt/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/sidderskb/majbritt/rev2/rules.mk b/keyboards/sidderskb/majbritt/rev2/rules.mk index d98e302b3..6aa324e1a 100644 --- a/keyboards/sidderskb/majbritt/rev2/rules.mk +++ b/keyboards/sidderskb/majbritt/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/signum/3_0/elitec/rules.mk b/keyboards/signum/3_0/elitec/rules.mk index 6d7266c1a..585f67b12 100644 --- a/keyboards/signum/3_0/elitec/rules.mk +++ b/keyboards/signum/3_0/elitec/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/silverbullet44/config.h b/keyboards/silverbullet44/config.h index cd78ef341..2bd9c834b 100644 --- a/keyboards/silverbullet44/config.h +++ b/keyboards/silverbullet44/config.h @@ -237,26 +237,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/silverbullet44/rules.mk b/keyboards/silverbullet44/rules.mk index cdcbc76fa..357a16c33 100644 --- a/keyboards/silverbullet44/rules.mk +++ b/keyboards/silverbullet44/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -27,7 +27,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by d RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow RGB_MATRIX_ENABLE = no RGB_MATRIX_DRIVER = WS2812 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port B6 diff --git a/keyboards/singa/rules.mk b/keyboards/singa/rules.mk index 3d51be113..b5853beab 100644 --- a/keyboards/singa/rules.mk +++ b/keyboards/singa/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/sirius/uni660/rev1/rules.mk b/keyboards/sirius/uni660/rev1/rules.mk index af1189024..65730e67a 100644 --- a/keyboards/sirius/uni660/rev1/rules.mk +++ b/keyboards/sirius/uni660/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sirius/uni660/rev2/rules.mk b/keyboards/sirius/uni660/rev2/rules.mk index 1f897b21f..26126b144 100644 --- a/keyboards/sirius/uni660/rev2/rules.mk +++ b/keyboards/sirius/uni660/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sirius/unigo66/rules.mk b/keyboards/sirius/unigo66/rules.mk index 7aa7afd1b..59e8fc6d1 100644 --- a/keyboards/sirius/unigo66/rules.mk +++ b/keyboards/sirius/unigo66/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sixkeyboard/rules.mk b/keyboards/sixkeyboard/rules.mk index 0e0239af0..60c2a4cc8 100644 --- a/keyboards/sixkeyboard/rules.mk +++ b/keyboards/sixkeyboard/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/skeletn87/hotswap/rules.mk b/keyboards/skeletn87/hotswap/rules.mk index 62a261230..c24bffd93 100644 --- a/keyboards/skeletn87/hotswap/rules.mk +++ b/keyboards/skeletn87/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/skeletn87/soldered/rules.mk b/keyboards/skeletn87/soldered/rules.mk index df779ca81..a87f3324e 100644 --- a/keyboards/skeletn87/soldered/rules.mk +++ b/keyboards/skeletn87/soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/skergo/rules.mk b/keyboards/skergo/rules.mk index 307616647..bbf233bd4 100644 --- a/keyboards/skergo/rules.mk +++ b/keyboards/skergo/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/slz40/rules.mk b/keyboards/slz40/rules.mk index 5c0d8f307..c98974aba 100644 --- a/keyboards/slz40/rules.mk +++ b/keyboards/slz40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/smallice/rules.mk b/keyboards/smallice/rules.mk index ef4ccf32f..171d1e484 100644 --- a/keyboards/smallice/rules.mk +++ b/keyboards/smallice/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/smk60/rules.mk b/keyboards/smk60/rules.mk index eee57dbba..2d390bac9 100644 --- a/keyboards/smk60/rules.mk +++ b/keyboards/smk60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/snampad/config.h b/keyboards/snampad/config.h index 563796eec..270a36cb0 100644 --- a/keyboards/snampad/config.h +++ b/keyboards/snampad/config.h @@ -188,26 +188,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/snampad/rules.mk b/keyboards/snampad/rules.mk index e99f18fe5..4972b9e60 100644 --- a/keyboards/snampad/rules.mk +++ b/keyboards/snampad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/sneakbox/aliceclone/rules.mk b/keyboards/sneakbox/aliceclone/rules.mk index 24bce999b..24eec0249 100644 --- a/keyboards/sneakbox/aliceclone/rules.mk +++ b/keyboards/sneakbox/aliceclone/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sneakbox/disarray/ortho/rules.mk b/keyboards/sneakbox/disarray/ortho/rules.mk index fb12719ce..b3a90d9f2 100644 --- a/keyboards/sneakbox/disarray/ortho/rules.mk +++ b/keyboards/sneakbox/disarray/ortho/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sneakbox/disarray/staggered/rules.mk b/keyboards/sneakbox/disarray/staggered/rules.mk index fb12719ce..b3a90d9f2 100644 --- a/keyboards/sneakbox/disarray/staggered/rules.mk +++ b/keyboards/sneakbox/disarray/staggered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sofle/keymaps/default/keymap.c b/keyboards/sofle/keymaps/default/keymap.c index 2360a45d4..a64d274b5 100644 --- a/keyboards/sofle/keymaps/default/keymap.c +++ b/keyboards/sofle/keymaps/default/keymap.c @@ -135,7 +135,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM qmk_logo[] = { diff --git a/keyboards/sofle/keymaps/default/rules.mk b/keyboards/sofle/keymaps/default/rules.mk index 6da1df16f..e87a55ede 100644 --- a/keyboards/sofle/keymaps/default/rules.mk +++ b/keyboards/sofle/keymaps/default/rules.mk @@ -1,5 +1,6 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/sofle/keymaps/devdev/config.h b/keyboards/sofle/keymaps/devdev/config.h index 7d597d991..32d071735 100644 --- a/keyboards/sofle/keymaps/devdev/config.h +++ b/keyboards/sofle/keymaps/devdev/config.h @@ -1,18 +1,18 @@ /* Copyright 2021 Dane Evans - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ #pragma once @@ -29,7 +29,7 @@ #define CUSTOM_FONT -#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding +#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding #define TAPPING_FORCE_HOLD @@ -56,7 +56,7 @@ #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM - + //#define RGBLIGHT_ANIMATIONS //#define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD @@ -68,11 +68,11 @@ //#define RGBLIGHT_EFFECT_RGB_TEST //#define RGBLIGHT_EFFECT_ALTERNATING //#define RGBLIGHT_EFFECT_TWINKLE - + #define RGBLED_NUM 70 //#define RGBLED_SPLIT - #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet - + #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet + //#define RGBLED_NUM 30 #define RGBLIGHT_LIMIT_VAL 120 #define RGBLIGHT_HUE_STEP 10 @@ -84,11 +84,11 @@ # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT @@ -127,4 +127,4 @@ // # define DISABLE_RGB_MATRIX_MULTISPLASH // # define DISABLE_RGB_MATRIX_SOLID_SPLASH // # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif \ No newline at end of file +#endif diff --git a/keyboards/sofle/keymaps/devdev/keymap.c b/keyboards/sofle/keymaps/devdev/keymap.c index 681e7dd6a..a0945b28f 100644 --- a/keyboards/sofle/keymaps/devdev/keymap.c +++ b/keyboards/sofle/keymaps/devdev/keymap.c @@ -393,7 +393,7 @@ void keyboard_post_init_user(void) { } #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM qmk_logo[] = { diff --git a/keyboards/sofle/keymaps/devdev/rules.mk b/keyboards/sofle/keymaps/devdev/rules.mk index 3dffb0368..92a293196 100644 --- a/keyboards/sofle/keymaps/devdev/rules.mk +++ b/keyboards/sofle/keymaps/devdev/rules.mk @@ -4,4 +4,5 @@ CONSOLE_ENABLE = yes RGBLIGHT_ENABLE = yes ENCODER_ENABLE = yes LTO_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/sofle/keymaps/helltm/keymap.c b/keyboards/sofle/keymaps/helltm/keymap.c index d3bdd5fa8..3e1bcc82e 100644 --- a/keyboards/sofle/keymaps/helltm/keymap.c +++ b/keyboards/sofle/keymaps/helltm/keymap.c @@ -1,18 +1,18 @@ - /* Copyright 2021 HellSingCoder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ +/* Copyright 2021 HellSingCoder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 @@ -25,6 +25,7 @@ enum sofle_layers { _ADJUST, }; +// clang-format off enum custom_keycodes { KC_QWERTY = SAFE_RANGE, KC_GAMING, @@ -40,23 +41,22 @@ enum custom_keycodes { KC_LAYER }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* - * QWERTY - * ,-----------------------------------------. ,-----------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | ` | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Caps | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | - * |------+------+------+------+------+------| play | | mute |------+------+------+------+------+------| - * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / | \ | - * `-----------------------------------------/ / \ \-----------------------------------------' - * | LGUI | LAlt | LAYER| LCTR | /Enter / \Space \ | [ | ] | - | = | - * | | | | |/ / \ \ | | | | | - * `----------------------------------' '------''---------------------------' - */ + /* + * QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Caps | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| play | | mute |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / | \ | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LAYER| LCTR | /Enter / \Space \ | [ | ] | - | = | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ [_QWERTY] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC_DEL, @@ -155,54 +155,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; +// clang-format on -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE /* 32 * 32 logo */ static void render_logo(void) { - static const char PROGMEM hell_logo[] = { - 0x00, 0x80, 0xc0, 0xc0, 0x60, 0x60, 0x30, 0x30, 0x18, 0x1c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xe0, 0x78, 0x1e, 0x06, 0x00, 0x0c, 0x1c, 0x18, 0x30, 0x30, 0x60, 0x60, 0xc0, 0xc0, 0x80, 0x00, - 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x70, 0x60, 0x00, 0xc0, 0xf0, 0x3c, 0x0f, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x60, 0x70, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x07, 0x03, 0x01, - 0x00, 0xf8, 0xf8, 0x80, 0x80, 0x80, 0xf8, 0xf8, 0x00, 0x80, 0xc0, 0xc0, 0x40, 0xc0, 0xc0, 0x80, - 0x00, 0xf8, 0xf8, 0x00, 0xf8, 0xf8, 0x00, 0x08, 0x38, 0x08, 0x00, 0x38, 0x08, 0x30, 0x08, 0x38, - 0x00, 0x1f, 0x1f, 0x01, 0x01, 0x01, 0x1f, 0x1f, 0x00, 0x0f, 0x1f, 0x1a, 0x12, 0x1a, 0x1b, 0x0b, - 0x00, 0x1f, 0x1f, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; + static const char PROGMEM hell_logo[] = {0x00, 0x80, 0xc0, 0xc0, 0x60, 0x60, 0x30, 0x30, 0x18, 0x1c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x78, 0x1e, 0x06, 0x00, 0x0c, 0x1c, 0x18, 0x30, 0x30, 0x60, 0x60, 0xc0, 0xc0, 0x80, 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x70, 0x60, 0x00, 0xc0, 0xf0, 0x3c, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x60, 0x70, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x07, 0x03, 0x01, 0x00, 0xf8, 0xf8, 0x80, 0x80, 0x80, 0xf8, 0xf8, 0x00, 0x80, 0xc0, 0xc0, 0x40, 0xc0, 0xc0, 0x80, 0x00, 0xf8, 0xf8, 0x00, 0xf8, 0xf8, 0x00, 0x08, 0x38, 0x08, 0x00, 0x38, 0x08, 0x30, 0x08, 0x38, 0x00, 0x1f, 0x1f, 0x01, 0x01, 0x01, 0x1f, 0x1f, 0x00, 0x0f, 0x1f, 0x1a, 0x12, 0x1a, 0x1b, 0x0b, 0x00, 0x1f, 0x1f, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; oled_write_raw_P(hell_logo, sizeof(hell_logo)); } /* 32 * 14 os logos */ -static const char PROGMEM windows_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0xbc, 0xbe, 0xbe, 0x00, - 0xbe, 0xbe, 0xbf, 0xbf, 0xbf, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x0f, 0x0f, 0x00, - 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; +static const char PROGMEM windows_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0xbc, 0xbe, 0xbe, 0x00, 0xbe, 0xbe, 0xbf, 0xbf, 0xbf, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x0f, 0x0f, 0x00, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -static const char PROGMEM mac_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0xf8, - 0xf0, 0xf6, 0xfb, 0xfb, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f, - 0x0f, 0x0f, 0x1f, 0x1f, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; +static const char PROGMEM mac_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0xf8, 0xf0, 0xf6, 0xfb, 0xfb, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f, 0x0f, 0x0f, 0x1f, 0x1f, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; /* Smart Backspace Delete */ -bool shift_held = false; +bool shift_held = false; static uint16_t held_shift = 0; /* KEYBOARD PET START */ /* settings */ -#define MIN_WALK_SPEED 10 -#define MIN_RUN_SPEED 40 +# define MIN_WALK_SPEED 10 +# define MIN_RUN_SPEED 40 /* advanced settings */ -#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms -#define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024 +# define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms +# define ANIM_SIZE 96 // number of bytes in array. If you change sprites, minimize for adequate firmware size. max is 1024 /* timers */ uint32_t anim_timer = 0; @@ -212,167 +194,101 @@ uint32_t anim_sleep = 0; uint8_t current_frame = 0; /* status variables */ -int current_wpm = 0; +int current_wpm = 0; led_t led_usb_state; bool isSneaking = false; -bool isJumping = false; +bool isJumping = false; bool showedJump = true; /* logic */ static void render_luna(int LUNA_X, int LUNA_Y) { - /* Sit */ - static const char PROGMEM sit[2][ANIM_SIZE] = { - /* 'sit1', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, - 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, - 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }, + static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, - /* 'sit2', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, - 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, - 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - } - }; + /* 'sit2', 32x22px */ + {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; /* Walk */ - static const char PROGMEM walk[2][ANIM_SIZE] = { - /* 'walk1', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, - 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, - 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }, + static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, - /* 'walk2', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, - 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, - 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, - 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - } - }; + /* 'walk2', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; /* Run */ - static const char PROGMEM run[2][ANIM_SIZE] = { - /* 'run1', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, - 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, - }, + static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, + }, - /* 'run2', 32x22px */ - { - 0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, - 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - } - }; + /* 'run2', 32x22px */ + { + 0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; /* Bark */ - static const char PROGMEM bark[2][ANIM_SIZE] = { - /* 'bark1', 32x22px */ - { - 0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, - 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, - 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }, + static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */ + { + 0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }, - /* 'bark2', 32x22px */ - { - 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, - 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, - 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - } - }; + /* 'bark2', 32x22px */ + { + 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; /* Sneak */ - static const char PROGMEM sneak[2][ANIM_SIZE] = { - /* 'sneak1', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, - 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, - 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, - }, + static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, + }, - /* 'sneak2', 32x22px */ - { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, - 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, - 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - } - }; + /* 'sneak2', 32x22px */ + { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + }}; /* animation */ void animate_luna(void) { - /* jump */ if (isJumping || !showedJump) { - /* clear */ - oled_set_cursor(LUNA_X,LUNA_Y +2); + oled_set_cursor(LUNA_X, LUNA_Y + 2); oled_write(" ", false); - oled_set_cursor(LUNA_X,LUNA_Y -1); + oled_set_cursor(LUNA_X, LUNA_Y - 1); showedJump = true; } else { - /* clear */ - oled_set_cursor(LUNA_X,LUNA_Y -1); + oled_set_cursor(LUNA_X, LUNA_Y - 1); oled_write(" ", false); - oled_set_cursor(LUNA_X,LUNA_Y); + oled_set_cursor(LUNA_X, LUNA_Y); } /* switch frame */ current_frame = (current_frame + 1) % 2; /* current status */ - if(led_usb_state.caps_lock) { + if (led_usb_state.caps_lock) { oled_write_raw_P(bark[abs(1 - current_frame)], ANIM_SIZE); - } else if(isSneaking) { + } else if (isSneaking) { oled_write_raw_P(sneak[abs(1 - current_frame)], ANIM_SIZE); - } else if(current_wpm <= MIN_WALK_SPEED) { + } else if (current_wpm <= MIN_WALK_SPEED) { oled_write_raw_P(sit[abs(1 - current_frame)], ANIM_SIZE); - } else if(current_wpm <= MIN_RUN_SPEED) { + } else if (current_wpm <= MIN_RUN_SPEED) { oled_write_raw_P(walk[abs(1 - current_frame)], ANIM_SIZE); } else { @@ -381,7 +297,7 @@ static void render_luna(int LUNA_X, int LUNA_Y) { } /* animation timer */ - if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + if (timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { anim_timer = timer_read32(); animate_luna(); } @@ -390,10 +306,9 @@ static void render_luna(int LUNA_X, int LUNA_Y) { if (current_wpm > 0) { oled_on(); anim_sleep = timer_read32(); - } else if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + } else if (timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { oled_off(); } - } /* KEYBOARD PET END */ @@ -403,28 +318,28 @@ static void print_logo_narrow(void) { /* wpm counter */ uint8_t n = get_current_wpm(); - char wpm_str[4]; - oled_set_cursor(0,14); + char wpm_str[4]; + oled_set_cursor(0, 14); wpm_str[3] = '\0'; wpm_str[2] = '0' + n % 10; - wpm_str[1] = '0' + ( n /= 10) % 10; + wpm_str[1] = '0' + (n /= 10) % 10; wpm_str[0] = '0' + n / 10; oled_write(wpm_str, false); - oled_set_cursor(0,15); + oled_set_cursor(0, 15); oled_write(" wpm", false); } static void print_status_narrow(void) { /* Print current mode */ - oled_set_cursor(0,0); + oled_set_cursor(0, 0); if (keymap_config.swap_lctl_lgui) { oled_write_raw_P(mac_logo, sizeof(mac_logo)); } else { oled_write_raw_P(windows_logo, sizeof(windows_logo)); } - oled_set_cursor(0,3); + oled_set_cursor(0, 3); switch (get_highest_layer(default_layer_state)) { case _QWERTY: @@ -437,12 +352,12 @@ static void print_status_narrow(void) { oled_write("UNDEF", false); } - oled_set_cursor(0,5); + oled_set_cursor(0, 5); /* Print current layer */ oled_write("LAYER", false); - oled_set_cursor(0,6); + oled_set_cursor(0, 6); switch (get_highest_layer(layer_state)) { case _QWERTY: @@ -465,25 +380,22 @@ static void print_status_narrow(void) { } /* caps lock */ - oled_set_cursor(0,8); + oled_set_cursor(0, 8); oled_write("CPSLK", led_usb_state.caps_lock); /* KEYBOARD PET RENDER START */ - render_luna(0,13); + render_luna(0, 13); /* KEYBOARD PET RENDER END */ } -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_270; -} +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } void oled_task_user(void) { - /* KEYBOARD PET VARIABLES START */ - current_wpm = get_current_wpm(); + current_wpm = get_current_wpm(); led_usb_state = host_keyboard_led_state(); /* KEYBOARD PET VARIABLES END */ @@ -554,7 +466,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; case KC_NXTWD: - if (record->event.pressed) { + if (record->event.pressed) { if (keymap_config.swap_lctl_lgui) { register_mods(mod_config(MOD_LALT)); register_code(KC_RIGHT); @@ -575,7 +487,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_LSTRT: if (record->event.pressed) { if (keymap_config.swap_lctl_lgui) { - /* CMD-arrow on Mac, but we have CTL and GUI swapped */ + /* CMD-arrow on Mac, but we have CTL and GUI swapped */ register_mods(mod_config(MOD_LCTL)); register_code(KC_LEFT); } else { @@ -655,7 +567,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; - /* Smart Backspace Delete */ + /* Smart Backspace Delete */ case KC_RSFT: case KC_LSFT: @@ -679,7 +591,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; - /* LAYER */ + /* LAYER */ case KC_LAYER: if (record->event.pressed) { @@ -687,7 +599,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { if (get_highest_layer(default_layer_state) == _QWERTY) { set_single_persistent_default_layer(_GAMING); - } else if(get_highest_layer(default_layer_state) == _GAMING) { + } else if (get_highest_layer(default_layer_state) == _GAMING) { set_single_persistent_default_layer(_QWERTY); } } @@ -701,7 +613,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; - /* KEYBOARD PET STATUS START */ + /* KEYBOARD PET STATUS START */ case KC_LCTL: case KC_RCTL: @@ -713,30 +625,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case KC_SPC: if (record->event.pressed) { - isJumping = true; + isJumping = true; showedJump = false; } else { isJumping = false; } break; - /* KEYBOARD PET STATUS END */ + /* KEYBOARD PET STATUS END */ } return true; } #ifdef ENCODER_ENABLE -void encoder_update_user(uint8_t index, bool clockwise) { +bool encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { if (clockwise) { - if(shift_held) { + if (shift_held) { tap_code(KC_MNXT); } else { tap_code(KC_RIGHT); } } else { - if(shift_held) { + if (shift_held) { tap_code(KC_MPRV); } else { tap_code(KC_LEFT); @@ -744,19 +656,20 @@ void encoder_update_user(uint8_t index, bool clockwise) { } } else if (index == 1) { if (clockwise) { - if(shift_held) { + if (shift_held) { tap_code(KC_VOLU); } else { tap_code(KC_DOWN); } } else { - if(shift_held) { + if (shift_held) { tap_code(KC_VOLD); } else { tap_code(KC_UP); } } } + return true; } #endif diff --git a/keyboards/sofle/keymaps/helltm/rules.mk b/keyboards/sofle/keymaps/helltm/rules.mk index 9601ec40b..b905bd94f 100644 --- a/keyboards/sofle/keymaps/helltm/rules.mk +++ b/keyboards/sofle/keymaps/helltm/rules.mk @@ -1,4 +1,5 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/sofle/keymaps/killmaster/config.h b/keyboards/sofle/keymaps/killmaster/config.h new file mode 100644 index 000000000..2e6abe84e --- /dev/null +++ b/keyboards/sofle/keymaps/killmaster/config.h @@ -0,0 +1,64 @@ +/* Copyright 2021 Carlos Martins + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +/* The way how "handedness" is decided (which half is which), +see https://docs.qmk.fm/#/feature_split_keyboard?id=setting-handedness +for more options. +*/ + +#define RGB_DI_PIN D3 + +#ifdef RGB_MATRIX_ENABLE + +#define RGBLED_NUM 72 +#define DRIVER_LED_TOTAL RGBLED_NUM +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +#define RGB_MATRIX_HUE_STEP 8 +#define RGB_MATRIX_SAT_STEP 8 +#define RGB_MATRIX_VAL_STEP 8 +#define RGB_MATRIX_SPD_STEP 10 +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_SPLIT {36,36} +#define SPLIT_TRANSPORT_MIRROR + +#endif + +#ifdef RGBLIGHT_ENABLE +#define RGBLIGHT_SPLIT +#define RGBLED_NUM 70 +#define RGB_SPLIT {36,36} +#define RGBLIGHT_LIMIT_VAL 120 +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING + //#define RGBLIGHT_EFFECT_RAINBOW_MOOD + //#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +#define MEDIA_KEY_DELAY 2 + +#define USB_POLLING_INTERVAL_MS 1 +#define QMK_KEYS_PER_SCAN 12 diff --git a/keyboards/sofle/keymaps/killmaster/keymap.c b/keyboards/sofle/keymaps/killmaster/keymap.c new file mode 100644 index 000000000..34c07f3c4 --- /dev/null +++ b/keyboards/sofle/keymaps/killmaster/keymap.c @@ -0,0 +1,403 @@ +/* Copyright 2021 Carlos Martins + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +enum sofle_layers { + /* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */ + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + KC_QWERTY = SAFE_RANGE, + KC_LOWER, + KC_RAISE, + KC_ADJUST, + KC_PRVWD, + KC_NXTWD, + KC_LSTRT, + KC_LEND, + KC_DLINE +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ` | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Space / \Enter \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + +[_QWERTY] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MUTE, KC_MPLY,KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_LGUI,KC_LALT,KC_LCTRL, KC_LOWER, KC_SPC, KC_ENT, KC_RAISE, KC_RCTRL, KC_RALT, KC_RGUI +), +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * | Shift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[_LOWER] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, + _______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* RAISE + * ,----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc | Ins | Pscr | Menu | |RGBTog| | | PWrd | Up | NWrd | DLine| Bspc | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | LAt | LCtl |LShift| | Caps |-------. ,-------| | Left | Down | Rigth| Del | Bspc | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * |Shift | Undo | Cut | Copy | Paste| |-------| |-------| | LStr | | LEnd | | Shift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ +[_RAISE] = LAYOUT( + _______, _______ , _______ , _______ , RGB_RMOD , RGB_MOD, _______, _______ , _______, _______ , _______ ,_______, + _______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, RGB_TOG, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD,KC_DLINE, KC_BSPC, + _______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_CAPS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, + _______,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_LSTRT, XXXXXXX, KC_LEND, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | RESET| |QWERTY|COLEMAK| | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | |MACWIN| | | |-------. ,-------| | VOLDO| MUTE | VOLUP| | | + * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | PREV | PLAY | NEXT | | | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | LGUI | LAlt | LCTR |LOWER | /Enter / \Space \ |RAISE | RCTR | RAlt | RGUI | + * | | | | |/ / \ \ | | | | | + * `----------------------------------' '------''---------------------------' + */ + [_ADJUST] = LAYOUT( + XXXXXXX , XXXXXXX, XXXXXXX , XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + RESET , XXXXXXX, KC_QWERTY, XXXXXXX , CG_TOGG,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX , XXXXXXX,CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX, + XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef OLED_ENABLE + +static void render_logo(void) { + static const char PROGMEM bananas_logo[] = { + // 'killmaster_bananas', 128x32px + 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xe0, 0x02, 0x0e, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, + 0x00, 0x00, 0x80, 0xc0, 0x40, 0x00, 0x00, 0x00, 0x40, 0x40, 0xd8, 0xc8, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x08, 0xf8, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xf8, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0xc0, 0x40, 0x00, 0x00, 0x40, 0x40, 0xf0, + 0x40, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, + 0x40, 0xc0, 0x80, 0x40, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x0f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xf0, + 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, + 0x02, 0x07, 0x0d, 0x10, 0x20, 0x20, 0x00, 0x00, 0x20, 0x20, 0x3f, 0x3f, 0x20, 0x20, 0x00, 0x00, + 0x00, 0x00, 0x1f, 0x3f, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x3f, 0x20, 0x20, 0x20, + 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x1c, 0x36, 0x22, 0x22, 0x22, + 0x1f, 0x20, 0x00, 0x00, 0x10, 0x23, 0x22, 0x22, 0x26, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x1f, + 0x30, 0x20, 0x20, 0x20, 0x00, 0x00, 0x0f, 0x1f, 0x32, 0x22, 0x22, 0x32, 0x23, 0x00, 0x00, 0x00, + 0x20, 0x3f, 0x21, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, + 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3e, 0x3e, 0x1c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(bananas_logo, sizeof(bananas_logo)); +} + +static void print_status_narrow(void) { + // Print current mode + oled_write_P(PSTR("Sofle"), false); + oled_write_P(PSTR("\n\n\n"), false); + switch (get_highest_layer(default_layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("QWERT"), false); + break; + default: + oled_write_P(PSTR("Undef"), false); + } + oled_write_P(PSTR("\n\n"), false); + // Print current layer + oled_write_ln_P(PSTR("Layer"), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Base\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise"), false); + break; + case _LOWER: + oled_write_P(PSTR("Lower"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adj\n"), false); + break; + default: + oled_write_ln_P(PSTR("Undef"), false); + } + oled_write_P(PSTR("\n\n"), false); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (is_keyboard_master()) { + return OLED_ROTATION_270; + } + else { + return OLED_ROTATION_180; + } + return rotation; +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + print_status_narrow(); + } else { + render_logo(); + } +} + + + +#endif // OLED_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case KC_LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case KC_RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case KC_ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + case KC_PRVWD: + if (record->event.pressed) { + if (keymap_config.swap_lctl_lgui) { + register_mods(mod_config(MOD_LALT)); + register_code(KC_LEFT); + } else { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_LEFT); + } + } else { + if (keymap_config.swap_lctl_lgui) { + unregister_mods(mod_config(MOD_LALT)); + unregister_code(KC_LEFT); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_LEFT); + } + } + break; + case KC_NXTWD: + if (record->event.pressed) { + if (keymap_config.swap_lctl_lgui) { + register_mods(mod_config(MOD_LALT)); + register_code(KC_RIGHT); + } else { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_RIGHT); + } + } else { + if (keymap_config.swap_lctl_lgui) { + unregister_mods(mod_config(MOD_LALT)); + unregister_code(KC_RIGHT); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_RIGHT); + } + } + break; + case KC_LSTRT: + if (record->event.pressed) { + if (keymap_config.swap_lctl_lgui) { + //CMD-arrow on Mac, but we have CTL and GUI swapped + register_mods(mod_config(MOD_LCTL)); + register_code(KC_LEFT); + } else { + register_code(KC_HOME); + } + } else { + if (keymap_config.swap_lctl_lgui) { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_LEFT); + } else { + unregister_code(KC_HOME); + } + } + break; + case KC_LEND: + if (record->event.pressed) { + if (keymap_config.swap_lctl_lgui) { + //CMD-arrow on Mac, but we have CTL and GUI swapped + register_mods(mod_config(MOD_LCTL)); + register_code(KC_RIGHT); + } else { + register_code(KC_END); + } + } else { + if (keymap_config.swap_lctl_lgui) { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_RIGHT); + } else { + unregister_code(KC_END); + } + } + break; + case KC_DLINE: + if (record->event.pressed) { + register_mods(mod_config(MOD_LCTL)); + register_code(KC_BSPC); + } else { + unregister_mods(mod_config(MOD_LCTL)); + unregister_code(KC_BSPC); + } + break; + } + return true; +} + +#ifdef ENCODER_ENABLE + +bool encoder_update_user(uint8_t index, bool clockwise) { + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + bool is_ctrl = (temp_mod | temp_osm) & MOD_MASK_CTRL; + bool is_shift = (temp_mod | temp_osm) & MOD_MASK_SHIFT; + + if (is_shift) { + if (index == 0) { /* First encoder */ + if (clockwise) { + rgb_matrix_increase_hue(); + } else { + rgb_matrix_decrease_hue(); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + rgb_matrix_decrease_sat(); + } else { + rgb_matrix_increase_sat(); + } + } + } else if (is_ctrl) { + if (index == 0) { /* First encoder */ + if (clockwise) { + rgb_matrix_increase_val(); + } else { + rgb_matrix_decrease_val(); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + rgb_matrix_increase_speed(); + } else { + rgb_matrix_decrease_speed(); + } + } + } else { + if (index == 1) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGUP); + // tap_code(KC_MS_WH_UP); + } else { + tap_code(KC_PGDOWN); + // tap_code(KC_MS_WH_DOWN); + } + } else if (index == 0) { /* Second encoder */ + uint16_t mapped_code = 0; + if (clockwise) { + mapped_code = KC_VOLD; + } else { + mapped_code = KC_VOLU; + } + tap_code_delay(mapped_code, MEDIA_KEY_DELAY); + } + } + return true; +} + +#endif diff --git a/keyboards/sofle/keymaps/killmaster/readme.md b/keyboards/sofle/keymaps/killmaster/readme.md new file mode 100644 index 000000000..6d6dea228 --- /dev/null +++ b/keyboards/sofle/keymaps/killmaster/readme.md @@ -0,0 +1,19 @@ +![SofleKeyboard default keymap](https://github.com/josefadamcik/SofleKeyboard/raw/master/Images/soflekeyboard.png) +![SofleKeyboard adjust layer](https://github.com/josefadamcik/SofleKeyboard/raw/master/Images/soflekeyboard_layout_adjust.png) + + +# Default keymap for Sofle Keyboard + +Layout in [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/gists/76efb423a46cbbea75465cb468eef7ff) and [adjust layer](http://www.keyboard-layout-editor.com/#/gists/4bcf66f922cfd54da20ba04905d56bd4) + + +Features: + +- Symmetric modifiers (CMD/Super, Alt/Opt, Ctrl, Shift) +- Various modes, can be switched (using Adjust layer and the selected one is stored in EEPROM. +- Modes for Qwerty and Colemak support +- Modes for Mac vs Linux/Win support -> different order of modifiers and different action shortcuts on the "UPPER" layer (the red one in the image). Designed to simplify transtions when switching between operating systems often. +- The OLED on master half shows selected mode and caps lock state and is rotated. +- Left encoder controls volume up/down/mute. Right encoder PGUP/PGDOWN. + + diff --git a/keyboards/sofle/keymaps/killmaster/rules.mk b/keyboards/sofle/keymaps/killmaster/rules.mk new file mode 100644 index 000000000..38d611450 --- /dev/null +++ b/keyboards/sofle/keymaps/killmaster/rules.mk @@ -0,0 +1,4 @@ +EXTRAKEY_ENABLE = yes +LTO_ENABLE = yes +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/sofle/keymaps/rgb_default/config.h b/keyboards/sofle/keymaps/rgb_default/config.h index 7d597d991..32d071735 100644 --- a/keyboards/sofle/keymaps/rgb_default/config.h +++ b/keyboards/sofle/keymaps/rgb_default/config.h @@ -1,18 +1,18 @@ /* Copyright 2021 Dane Evans - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . -*/ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ #pragma once @@ -29,7 +29,7 @@ #define CUSTOM_FONT -#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding +#define CUSTOM_LAYER_READ //if you remove this it causes issues - needs better guarding #define TAPPING_FORCE_HOLD @@ -56,7 +56,7 @@ #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM - + //#define RGBLIGHT_ANIMATIONS //#define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD @@ -68,11 +68,11 @@ //#define RGBLIGHT_EFFECT_RGB_TEST //#define RGBLIGHT_EFFECT_ALTERNATING //#define RGBLIGHT_EFFECT_TWINKLE - + #define RGBLED_NUM 70 //#define RGBLED_SPLIT - #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet - + #define RGBLED_SPLIT { 35, 35 } // haven't figured out how to use this yet + //#define RGBLED_NUM 30 #define RGBLIGHT_LIMIT_VAL 120 #define RGBLIGHT_HUE_STEP 10 @@ -84,11 +84,11 @@ # define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT @@ -127,4 +127,4 @@ // # define DISABLE_RGB_MATRIX_MULTISPLASH // # define DISABLE_RGB_MATRIX_SOLID_SPLASH // # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#endif \ No newline at end of file +#endif diff --git a/keyboards/sofle/keymaps/rgb_default/keymap.c b/keyboards/sofle/keymaps/rgb_default/keymap.c index bd0993c99..13edbc520 100644 --- a/keyboards/sofle/keymaps/rgb_default/keymap.c +++ b/keyboards/sofle/keymaps/rgb_default/keymap.c @@ -393,7 +393,7 @@ void keyboard_post_init_user(void) { } #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM qmk_logo[] = { diff --git a/keyboards/sofle/keymaps/rgb_default/rules.mk b/keyboards/sofle/keymaps/rgb_default/rules.mk index 3dffb0368..92a293196 100644 --- a/keyboards/sofle/keymaps/rgb_default/rules.mk +++ b/keyboards/sofle/keymaps/rgb_default/rules.mk @@ -4,4 +4,5 @@ CONSOLE_ENABLE = yes RGBLIGHT_ENABLE = yes ENCODER_ENABLE = yes LTO_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/sofle/keymaps/via/oled.c b/keyboards/sofle/keymaps/via/oled.c index 06839da17..8a230f000 100644 --- a/keyboards/sofle/keymaps/via/oled.c +++ b/keyboards/sofle/keymaps/via/oled.c @@ -1,23 +1,23 @@ /* Copyright 2020 Josef Adamcik * Modification for VIA support and RGB underglow by Jens Bonk-Wiltfang - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ //Sets up what the OLED screens display. -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM qmk_logo[] = { @@ -81,4 +81,4 @@ void oled_task_user(void) { } } -#endif \ No newline at end of file +#endif diff --git a/keyboards/sofle/keymaps/via/rules.mk b/keyboards/sofle/keymaps/via/rules.mk index f482499d4..db254512a 100644 --- a/keyboards/sofle/keymaps/via/rules.mk +++ b/keyboards/sofle/keymaps/via/rules.mk @@ -1,7 +1,8 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes CONSOLE_ENABLE = no EXTRAKEY_ENABLE = yes VIA_ENABLE = yes LTO_ENABLE = yes -RGBLIGHT_ENABLE = yes \ No newline at end of file +RGBLIGHT_ENABLE = yes diff --git a/keyboards/sofle/rev1/readme.md b/keyboards/sofle/rev1/readme.md new file mode 100644 index 000000000..629d568e6 --- /dev/null +++ b/keyboards/sofle/rev1/readme.md @@ -0,0 +1,27 @@ +# Sofle Keyboard + +![SofleKeyboard version 1](https://raw.githubusercontent.com/josefadamcik/SofleKeyboard/master/Images/IMG_20200126_114622.jpg) + +Sofle is 6×4+5 keys column-staggered split keyboard. Based on Lily58, Corne and Helix keyboards. + +More details about the keyboard on my blog: [Let me introduce you SofleKeyboard - a split keyboard based on Lily58 and Crkbd](https://josef-adamcik.cz/electronics/let-me-introduce-you-sofle-keyboard-split-keyboard-based-on-lily58.html) + +The current (temporary) build guide and a build log is available here: [SofleKeyboard build log/guide](https://josef-adamcik.cz/electronics/soflekeyboard-build-log-and-build-guide.html) + +* Keyboard Maintainer: [Josef Adamcik](https://josef-adamcik.cz) [Twitter:@josefadamcik](https://twitter.com/josefadamcik) +* Hardware Supported: SofleKeyboard PCB, ProMicro +* Hardware Availability: [PCB & Case Data](https://github.com/josefadamcik/SofleKeyboard) + +Make example for this keyboard (after setting up your build environment): + + make sofle:default + +Flashing example for this keyboard: + + make sofle:default:flash + +Press reset button on he keyboard when asked. + +Disconnect the first half, connect the second one and repeat the process. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/sofle/rev1/rev1.c b/keyboards/sofle/rev1/rev1.c index bbb014c4d..88a28e6a4 100644 --- a/keyboards/sofle/rev1/rev1.c +++ b/keyboards/sofle/rev1/rev1.c @@ -1 +1,87 @@ +/* Copyright 2021 Carlos Martins + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include "sofle.h" + +#ifdef RGB_MATRIX_ENABLE + // Physical Layout + // Columns + // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 + // ROWS + // 12 13 22 23 32 33 33 32 23 22 13 12 0 + // 02 03 04 04 03 02 + // 11 14 21 24 31 34 34 31 24 21 14 11 1 + // 01 01 + // 10 15 20 25 30 35 35 30 25 20 15 10 2 + // + // 09 16 19 26 29 36 36 29 26 19 16 09 3 + // + // 08 17 18 27 28 28 27 18 17 08 4 + // 07 06 05 05 06 07 + +led_config_t g_led_config = { + { + { 11, 12, 21, 22, 31, 32 }, + { 10, 13, 20, 23, 30, 33 }, + { 9, 14, 19, 24, 29, 34}, + { 8, 15, 18, 25, 28, 35}, + { 7, 16, 17, 26, 27, NO_LED }, + { 47, 48, 57, 58, 67, 68}, + { 46, 49, 56, 59, 66, 69}, + { 45, 50, 55, 60, 65, 70}, + { 44, 51, 54, 61, 64, 71}, + { 43, 52, 53, 62, 63, NO_LED } + }, + { + // Left side underglow + {96, 40}, {16, 20}, {48, 10}, {80, 18}, {88, 60}, {56, 57}, {24,60}, + // Left side Matrix + {32, 57}, { 0, 48}, { 0, 36}, { 0, 24}, { 0, 12}, + {16, 12}, {16, 24}, {16, 36}, {16, 48}, {48, 55}, + {64, 57}, {32, 45}, {32, 33}, {32, 21}, {32, 9}, + {48, 7}, {48, 19}, {48, 31}, {48, 43}, {80, 59}, + {96, 64}, {64, 45}, {64, 33}, {64, 21}, {64, 9}, + {80, 10}, {80, 22}, {80, 34}, {80, 47}, + + + // Right side underglow + {128, 40}, {208, 20}, {176, 10}, {144, 18}, {136, 60}, {168, 57}, {200,60}, + // Right side Matrix + {192, 57}, {224, 48}, {224, 36}, {224, 24}, {224, 12}, + {208, 12}, {208, 24}, {208, 36}, {208, 48}, {176, 55}, + {160, 57}, {192, 45}, {192, 33}, {192, 21}, {192, 9}, + {176, 7}, {176, 19}, {176, 31}, {176, 43}, {144, 59}, + {128, 64}, {160, 45}, {160, 33}, {160, 21}, {160, 9}, + {144, 10}, {144, 22}, {144, 34}, {144, 47}, + }, + { + LED_FLAG_NONE, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_NONE, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, LED_FLAG_UNDERGLOW, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, + LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT, LED_FLAG_KEYLIGHT + } +}; +#endif diff --git a/keyboards/sofle/rev1/rules.mk b/keyboards/sofle/rev1/rules.mk index 2ba231d86..46ec39ee4 100644 --- a/keyboards/sofle/rev1/rules.mk +++ b/keyboards/sofle/rev1/rules.mk @@ -1,2 +1,3 @@ ENCODER_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/soup10/rules.mk b/keyboards/soup10/rules.mk index df0fd4dcb..a09cafb6f 100644 --- a/keyboards/soup10/rules.mk +++ b/keyboards/soup10/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/southpole/rules.mk b/keyboards/southpole/rules.mk index 25a0059d9..dec3684ce 100644 --- a/keyboards/southpole/rules.mk +++ b/keyboards/southpole/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sowbug/68keys/config.h b/keyboards/sowbug/68keys/config.h index 92d839728..21e304335 100644 --- a/keyboards/sowbug/68keys/config.h +++ b/keyboards/sowbug/68keys/config.h @@ -48,7 +48,7 @@ // // #define BACKLIGHT_PIN rgb_matrix #define RGB_MATRIX_KEYPRESSES -#define DRIVER_LED_TOTAL 68 -#define RGBLED_NUM DRIVER_LED_TOTAL +#define RGBLED_NUM 68 +#define DRIVER_LED_TOTAL RGBLED_NUM #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 diff --git a/keyboards/sowbug/68keys/rules.mk b/keyboards/sowbug/68keys/rules.mk index 7dc7c6f6d..f0d7f2044 100644 --- a/keyboards/sowbug/68keys/rules.mk +++ b/keyboards/sowbug/68keys/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sowbug/ansi_tkl/config.h b/keyboards/sowbug/ansi_tkl/config.h index e2ed0edd8..8e7724540 100644 --- a/keyboards/sowbug/ansi_tkl/config.h +++ b/keyboards/sowbug/ansi_tkl/config.h @@ -44,8 +44,8 @@ #define RGB_DI_PIN B9 #define RGB_MATRIX_KEYPRESSES -#define DRIVER_LED_TOTAL (87) -#define RGBLED_NUM (DRIVER_LED_TOTAL) +#define RGBLED_NUM 87 +#define DRIVER_LED_TOTAL RGBLED_NUM #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 diff --git a/keyboards/sowbug/ansi_tkl/rules.mk b/keyboards/sowbug/ansi_tkl/rules.mk index 7dc7c6f6d..f0d7f2044 100644 --- a/keyboards/sowbug/ansi_tkl/rules.mk +++ b/keyboards/sowbug/ansi_tkl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/soy20/rules.mk b/keyboards/soy20/rules.mk index 06f81dad8..4b8b6bf0b 100644 --- a/keyboards/soy20/rules.mk +++ b/keyboards/soy20/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/space_space/rev1/rules.mk b/keyboards/space_space/rev1/rules.mk index 831de6dc5..96823dca6 100644 --- a/keyboards/space_space/rev1/rules.mk +++ b/keyboards/space_space/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/space_space/rev2/rules.mk b/keyboards/space_space/rev2/rules.mk index 72a5deaf1..e302272b3 100644 --- a/keyboards/space_space/rev2/rules.mk +++ b/keyboards/space_space/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/spaceman/2_milk/keymaps/mikethetiger/rules.mk b/keyboards/spaceman/2_milk/keymaps/mikethetiger/rules.mk index b5f038ef2..04ae9270f 100644 --- a/keyboards/spaceman/2_milk/keymaps/mikethetiger/rules.mk +++ b/keyboards/spaceman/2_milk/keymaps/mikethetiger/rules.mk @@ -1,7 +1,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/spaceman/2_milk/rules.mk b/keyboards/spaceman/2_milk/rules.mk index b93e8d3a4..865303ede 100644 --- a/keyboards/spaceman/2_milk/rules.mk +++ b/keyboards/spaceman/2_milk/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/spaceman/pancake/rev1/feather/rules.mk b/keyboards/spaceman/pancake/rev1/feather/rules.mk index fb77e328e..993388ffb 100644 --- a/keyboards/spaceman/pancake/rev1/feather/rules.mk +++ b/keyboards/spaceman/pancake/rev1/feather/rules.mk @@ -18,7 +18,7 @@ BOOTLOADER = caterina # comment out to disable the options. # BLUETOOTH = AdafruitBLE -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/spaceman/pancake/rev1/promicro/rules.mk b/keyboards/spaceman/pancake/rev1/promicro/rules.mk index 7287f3a0d..5669ee955 100644 --- a/keyboards/spaceman/pancake/rev1/promicro/rules.mk +++ b/keyboards/spaceman/pancake/rev1/promicro/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/spaceman/pancake/rev2/rev2.c b/keyboards/spaceman/pancake/rev2/rev2.c index c1786cb01..cd13099a9 100644 --- a/keyboards/spaceman/pancake/rev2/rev2.c +++ b/keyboards/spaceman/pancake/rev2/rev2.c @@ -16,7 +16,7 @@ #include "rev2.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } @@ -26,7 +26,7 @@ __attribute__((weak)) void oled_task_user(void) { 0x22, 0x22, 0x00, 0x3c, 0x0a, 0x3c, 0x00, 0x3e, 0x08, 0x36, 0x00, 0x3e, 0x2a, 0x22, 0x00, 0x00, 0x00, 0x30, 0xc8, 0x84, 0x84, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x19, 0x1d, 0x1d, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x84, 0x84, 0xc8, 0x30, 0x00, - 0x00, 0x63, 0x94, 0x08, 0x08, 0x11, 0x71, 0x17, 0x13, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x62, + 0x00, 0x63, 0x94, 0x08, 0x08, 0x11, 0x71, 0x17, 0x13, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x62, 0xe2, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x11, 0x11, 0x11, 0x31, 0x08, 0x08, 0x94, 0x63, 0x00, 0x00, 0x00, 0x03, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x06, 0x02, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00 }; diff --git a/keyboards/spaceman/pancake/rev2/rules.mk b/keyboards/spaceman/pancake/rev2/rules.mk index 5b5ccc369..4a5236853 100644 --- a/keyboards/spaceman/pancake/rev2/rules.mk +++ b/keyboards/spaceman/pancake/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -20,6 +20,7 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LAYOUTS = ortho_4x12 diff --git a/keyboards/spaceman/yun65/rules.mk b/keyboards/spaceman/yun65/rules.mk index 04b00e562..283d3cb0a 100644 --- a/keyboards/spaceman/yun65/rules.mk +++ b/keyboards/spaceman/yun65/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/spacetime/config.h b/keyboards/spacetime/config.h index cda5185de..1219eca2d 100644 --- a/keyboards/spacetime/config.h +++ b/keyboards/spacetime/config.h @@ -188,26 +188,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/spacetime/keymaps/kyleterry/keymap.c b/keyboards/spacetime/keymaps/kyleterry/keymap.c index 32fbab5e0..d4d31dc1f 100644 --- a/keyboards/spacetime/keymaps/kyleterry/keymap.c +++ b/keyboards/spacetime/keymaps/kyleterry/keymap.c @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/keyboards/spacetime/rev1/rules.mk b/keyboards/spacetime/rev1/rules.mk index b595964f7..517f469b6 100644 --- a/keyboards/spacetime/rev1/rules.mk +++ b/keyboards/spacetime/rev1/rules.mk @@ -1 +1 @@ -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no diff --git a/keyboards/spacetime/rev2/rules.mk b/keyboards/spacetime/rev2/rules.mk index c58266213..d34d066de 100644 --- a/keyboards/spacetime/rev2/rules.mk +++ b/keyboards/spacetime/rev2/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/spacetime/rules.mk b/keyboards/spacetime/rules.mk index bc48e121c..560a2859e 100644 --- a/keyboards/spacetime/rules.mk +++ b/keyboards/spacetime/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,11 +25,10 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no # Enable generic behavior for split boards SPLIT_KEYBOARD = yes diff --git a/keyboards/sparrow62/rules.mk b/keyboards/sparrow62/rules.mk index 9f762382b..24626b7c3 100644 --- a/keyboards/sparrow62/rules.mk +++ b/keyboards/sparrow62/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/specskeys/rules.mk b/keyboards/specskeys/rules.mk index b7ef81c3f..8fe88b7b7 100644 --- a/keyboards/specskeys/rules.mk +++ b/keyboards/specskeys/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/spiderisland/split78/rules.mk b/keyboards/spiderisland/split78/rules.mk index 664f5237d..943428f32 100644 --- a/keyboards/spiderisland/split78/rules.mk +++ b/keyboards/spiderisland/split78/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/splitish/rules.mk b/keyboards/splitish/rules.mk index 7764619a6..df89d22c0 100644 --- a/keyboards/splitish/rules.mk +++ b/keyboards/splitish/rules.mk @@ -11,7 +11,7 @@ MCU = atmega32u4 # ATmega328P USBasp BOOTLOADER = caterina -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/splitkb/kyria/.noci b/keyboards/splitkb/kyria/.noci new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/kyria/config.h b/keyboards/splitkb/kyria/config.h similarity index 100% rename from keyboards/kyria/config.h rename to keyboards/splitkb/kyria/config.h diff --git a/keyboards/kyria/info.json b/keyboards/splitkb/kyria/info.json similarity index 100% rename from keyboards/kyria/info.json rename to keyboards/splitkb/kyria/info.json diff --git a/keyboards/splitkb/kyria/keymaps/asapjockey/config.h b/keyboards/splitkb/kyria/keymaps/asapjockey/config.h new file mode 100644 index 000000000..acb070359 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/asapjockey/config.h @@ -0,0 +1,47 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP +#endif + +// EC11K encoders have a different resolution than other EC11 encoders. +// When using the default resolution of 4, if you notice your encoder skipping +// every other tick, lower the resolution to 2. +#define ENCODER_RESOLUTION 2 + +// The Leader key allows to flexibly assign macros to key sequences. +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 350 + +#define TAPPING_TERM 200 + +// Allows to use either side as the master. Look at the documentation for info: +// https://docs.qmk.fm/#/config_options?id=setting-handedness +#define EE_HANDS + +// Allows media codes to properly register in macros and rotary encoder code +#define TAP_CODE_DELAY 10 diff --git a/keyboards/splitkb/kyria/keymaps/asapjockey/keymap.c b/keyboards/splitkb/kyria/keymaps/asapjockey/keymap.c new file mode 100644 index 000000000..8ba098eed --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/asapjockey/keymap.c @@ -0,0 +1,313 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layers { + QWERTY, + LOWER, + RAISE, + NAV, + ADJUST +}; + +enum custom_keycodes { + KC_LBR = SAFE_RANGE, + KC_RBR +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | TAB | Q | W | E | R | T | | Y | U | I | O | P | RCTL | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | LCTL | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LSFT | Z | X | C | V | B | Del | Raise| |Adjust| Esc | N | M | , < | . > | / ? | LSFT | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | LALT | | Bspc | Lower| | Enter| Space| [ { | ] } | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RCTL, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DEL, MO(RAISE), MO(ADJUST), KC_ESC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, + XXXXXXX, KC_LALT, XXXXXXX, KC_BSPC, MO(LOWER), KC_ENT, KC_SPC, KC_LBR, KC_RBR, XXXXXXX + ), +/* + * Lower Layer: Numbers, functions, symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 ! | 2 @ | 3 # | 4 $ | 5 % | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | F5 | | | | | | F6 | F7 | F8 | F9 | F10 | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | ( | ) | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [LOWER] = LAYOUT( + _______, 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, _______ + ), +/* + * Raise Layer: Functions, Numbers + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | F7 | F8 | F9 | | | | 7 & | 8 * | 9 ( | - _ | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | F4 | F5 | F6 | | | | 4 * | 5 % | 6 ^ | = + | RCTL | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | F1 | F2 | F3 | | | | | | | | 1 ! | 2 @ | 3 # | \ | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | 0 ) | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [RAISE] = LAYOUT( + _______, _______, KC_F7, KC_F8, KC_F9, _______, _______, KC_7, KC_8, KC_9, _______, _______, + _______, _______, KC_F4, KC_F5, KC_F6, _______, _______, KC_4, KC_5, KC_6, _______, KC_RCTL, + _______, _______, KC_F1, KC_F2, KC_F3, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______ + ), +/* + * Navigation Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | Up | | | RGBTOG | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | | Left | Down | Right| | RGBOFF | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | | RGBON | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | Reset|Debug | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, RGB_HUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, RESET, DEBUG, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_LBR: { + if (record->event.pressed) { + if ((get_mods() & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { + register_code(KC_9); + } else { + register_code(KC_LBRC); + } + } else { // Release the key + if ((get_mods() & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { + unregister_code(KC_9); + } else { + unregister_code(KC_LBRC); + } + } + return false; + break; + } + case KC_RBR: { + if (record->event.pressed) { + if ((get_mods() & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { + register_code(KC_0); + } else { + register_code(KC_RBRC); + } + } else { // Release the key + if ((get_mods() & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) { + unregister_code(KC_0); + } else { + unregister_code(KC_RBRC); + } + } + return false; + break; + } + } + return true; +} + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_F) { // Shift + Ctrl + F + tap_code16(S(C(KC_F))); + } + } +} + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR(" Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case NAV: + oled_write_P(PSTR("Navigation\n"), false); + break; + case ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case QWERTY: + if (clockwise) { // Ctrl + I + tap_code16(C(KC_I)); + } else { // Shift + F3 + tap_code16(S(KC_F3)); + } + break; + case LOWER: + // History scrubbing. For Adobe products, hold shift while moving + // backward to go forward instead. + if (clockwise) { + tap_code16(C(KC_Y)); + } else { + tap_code16(C(KC_Z)); + } + break; + case RAISE: + if (clockwise) { // Subscript: CTRL + = + tap_code16(C(KC_EQL)); + } + break; + default: + // Nothing + break; + } + } else if (index == 1) { + switch (get_highest_layer(layer_state)) { + case QWERTY: + // Scroll by letter horizontally + if (clockwise) { + tap_code16(KC_RGHT); + } else { + tap_code16(KC_LEFT); + } + case LOWER: + // Nothing + break; + case RAISE: + // Find previous/Find next + if (clockwise) { + tap_code(KC_F3); + } else { + tap_code16(S(KC_F3)); + } + default: + // Nothing + break; + } + } + return true; +} +#endif diff --git a/keyboards/splitkb/kyria/keymaps/asapjockey/rules.mk b/keyboards/splitkb/kyria/keymaps/asapjockey/rules.mk new file mode 100644 index 000000000..65b44a298 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/asapjockey/rules.mk @@ -0,0 +1,6 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +LEADER_ENABLE = yes # Enable the Leader Key feature +MOUSEKEY_ENABLE = no diff --git a/keyboards/splitkb/kyria/keymaps/benji/config.h b/keyboards/splitkb/kyria/keymaps/benji/config.h new file mode 100644 index 000000000..8b29f9e13 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/benji/config.h @@ -0,0 +1,34 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 + #define OLED_FONT_H "keyboards/splitkb/kyria/keymaps/benji/glcdfont.c" +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 150 +#endif + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/kyria/keymaps/benji/glcdfont.c b/keyboards/splitkb/kyria/keymaps/benji/glcdfont.c similarity index 100% rename from keyboards/kyria/keymaps/benji/glcdfont.c rename to keyboards/splitkb/kyria/keymaps/benji/glcdfont.c diff --git a/keyboards/splitkb/kyria/keymaps/benji/keymap.c b/keyboards/splitkb/kyria/keymaps/benji/keymap.c new file mode 100644 index 000000000..a670b7761 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/benji/keymap.c @@ -0,0 +1,247 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * |RAIS/ESC| Q | W | E | R | T | | Y | U | I | O | P | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * |Ctrl/BS | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B |LShift|LShift| |LShift|LShift| N | M | , < | . > | / ? | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | GUI | Del | Enter| Space| Esc | | Enter| Space| Tab | Bksp | AltGr| + * | | | Alt | Lower| Raise| | Lower| Raise| | | | + * `----------------------------------' `----------------------------------' + */ + [_QWERTY] = LAYOUT( + LT(_RAISE, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LSFT, KC_LSFT, KC_LSFT, KC_LSFT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + KC_LGUI, KC_DEL, MT(MOD_LALT, KC_ENT), LT(_LOWER, KC_SPC), KC_LGUI, LT(_LOWER, KC_ENT), LT(_RAISE, KC_SPC), KC_TAB, KC_BSPC, KC_RALT + ), + /* + * Lower Layer: Symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | ! | @ | { | } | | | | | | | | | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` | | + | - | / | * | % | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | | | & | = | , | . | / ? | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | ; | = | | = | ; | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, KC_BSLS, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + _______, _______, _______, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, _______, _______, _______ + ), + /* + * Raise Layer: Number keys, media, navigation + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Prev | Play | Next | VolUp| | Left | Down | Up | Right| | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | Mute | VolDn| | | | | | MLeft| Mdown| MUp |MRight| | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | |Mbtn1 |Mbtn2 |Mbtn3 | | | Mbtn4|Mbtn5 | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, KC_BTN1, KC_BTN2, KC_BTN3, _______, KC_BTN4, KC_BTN5, _______, _______, _______ + ), + /* + * Adjust Layer: Function keys, RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | TOG | SAI | HUI | VAI | MOD | | | | | F11 | F12 | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + // /* + // * Layer template + // * + // * ,-------------------------------------------. ,-------------------------------------------. + // * | | | | | | | | | | | | | | + // * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + // * | | | | | | | | | | | | | | + // * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + // * | | | | | | | | | | | | | | | | | | + // * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + // * | | | | | | | | | | | | + // * | | | | | | | | | | | | + // * `----------------------------------' `----------------------------------' + // */ + // [_LAYERINDEX] = LAYOUT( + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + // ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,48,24,108,244,130,194,193,25,125,119,97,1,193,226,178,52,44,24,48,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,64,64,192,64,64,64,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,136,24,48,56,28,221,193,156,62,127,127,127,62,156,193,221,156,14,6,4,140,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,128,64,64,64,64,64,64,64,128,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,48,76,230,243,253,254,252,190,255,223,255,255,159,158,254,249,243,230,76,48,192,0,0,0,0,0,0,0,0,0,1,6,12,26,22,38,35,65,64,67,119,95,76,65,33,32,23,27,12,6,1,0,0,0,0,0,0,0,0,0,0,192,48,12,6,3,1,0,192,224,240,248,252,254,255,224,128,0,1,3,6,12,48,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,96,130,7,15,7,3,2,6,13,255,255,255,7,2,2,3,7,7,7,131,96,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31,96,128,0,0,0,127,255,255,255,255,255,255,255,255,227,99,62,0,0,128,96,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,6,4,8,9,19,17,17,19,17,19,18,10,8,4,6,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,6,4,8,8,17,17,17,17,17,17,17,8,8,4,6,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,96,48,152,72,228,52,34,10,74,74,58,178,50,116,228,200,24,176,96,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,96,48,152,200,228,228,242,242,242,242,242,242,242,228,228,200,152,48,96,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,1,0,0,192,240,248,248,248,248,184,152,140,204,249,231,255,191,159,223,6,1,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,1,0,63,127,249,240,240,241,251,159,191,159,251,241,240,240,249,127,63,0,1,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,12,24,49,39,79,79,143,143,143,143,149,149,149,67,65,33,49,24,12,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,12,24,48,32,64,71,159,135,159,135,159,135,159,135,159,71,64,32,48,24,12,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + + + +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,232,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, +// 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +// 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +static void render_status(void) { + // QMK Logo and version information + //render_kyria_logo(); + render_qmk_logo(); + oled_write_P(PSTR("Kyria rev B3nJ.P0tt3r\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Chandra\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("Jace\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Karn\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Teferi\n"), false); + break; + default: + oled_write_P(PSTR("Ashiok\n"), false); + } + + // Host Keyboard LED Status + led_t led_usb_state = host_keyboard_led_state(); + oled_write_P(led_usb_state.num_lock? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case _RAISE: + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + case _LOWER: + // Page up/Page down + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + break; + case _QWERTY: + // Page up/Page down + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + break; + default: + break; + + } + } + return true; +} +#endif diff --git a/keyboards/splitkb/kyria/keymaps/benji/readme.md b/keyboards/splitkb/kyria/keymaps/benji/readme.md new file mode 100644 index 000000000..57ea5e817 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/benji/readme.md @@ -0,0 +1,246 @@ +# Kyria's Default Keymap + +[insert pretty KLE visualization once the keymap is vetted] + +The default keymap contains 5 layers which allows it to include all keys found on a ISO layout TKL keyboard plus media keys. +Hardware features of the Kyria such as OLEDs, rotary encoders and underglow are also supported. + +The five different layers are the following: +1. Base layer (QWERTY, Colemak-DH or Dvorak) +2. Navigation layer +3. Symbols/Numbers layer +4. Function layer +5. Adjust layer + +## Base layer(s) +``` +Base Layer: - + +,-------------------------------------------. ,-------------------------------------------. +| Tab | - | - | - | - | - | | - | - | - | - | - | Bksp | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +|Ctrl/Esc| - | - | - | - | - | | - | - | - | - | - |Ctrl/ - | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| LShift | - | - | - | - | - | [ { |CapsLk| |F-Keys| ] } | - | - | - | - | - | RShift | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + |Adjust| LGUI | LAlt/| Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + | | | Enter| | | | | | | | | + `----------------------------------' `----------------------------------' +``` +Three different well-known keyboard layouts are provided to fill in the placeholder `-` keys: QWERTY, Colemak-DH, and Dvorak. The default layer can be changed at runtime, more info on that in the section on the [adjust layer](#adjust-layer). + +For the rest of this write-up, the base layer will be assumed to be QWERTY and will be used as a reference to describe physical keys, e.g. “B key” vs, the much more verbose, “lower inner index key”. + +``` +Base Layer: QWERTY + +,-------------------------------------------. ,-------------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +|Ctrl/Esc| A | S | D | F | G | | H | J | K | L | ; : |Ctrl/' "| +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| LShift | Z | X | C | V | B | [ { |CapsLk| |F-keys| ] } | N | M | , < | . > | / ? | RShift | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + |Adjust| LGUI | LAlt/| Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + | | | Enter| | | | | | | | | + `----------------------------------' `----------------------------------' +``` + +Aside from variations in the alpha cluster, the rest of the base keys remain the same and are designed to feel familiar. + +![Step-by-step animation of the transformation of an ortholinear TKL to a Kyria](https://i.imgur.com/uVDCOek.gif) + +
+After making transformations to the classic ANSI US QWERTY TKL 60% to arrive to the layout of the Kyria, as illustrated in the animation above, the result looks like this: + +``` +,-------------------------------------------. ,-------------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +| Cap Lk | A | S | D | F | G | | H | J | K | L | ; : | ' " | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| LShift | Z | X | C | V | B | | | | | | N | M | , < | . > | / ? | RShift | +`--------+-------------+--------------------+------+------| |------+------+--------------------+------+---------------' + | LCtrl| LGUI | LAlt | Space| | | | Space| AltGr| RGUI | Menu | + | | | | | | | | | | | | + `----------------------------------' '----------------------------------' +``` + +First thing to notice is the presence of blank keys. To fill in the blank keys above the Space keys, we can take inspiration from other split keyboards featuring an extra inner index column on each half. A common mapping for those kind of keys are the bracket keys that got removed in the fourth step of the animated transformation. The thumb keys besides Spaces is prime real estate for dedicated layer-switching keys. It doesn't matter on which side is assigned the sym-layer-switch key but it helps to keep the nav-layer-switch on the left in order to keep the arrow keys on the right side like on a classic keyboard, so we'll put nav on the left and sym on the right. We'll address the remaining blank thumb keys later. + +The base layer is starting to form but there remains some flaws. One glaring issue is the position of Control. Control is a very commonly used function but the key on which it sits right now is way too tucked in under the hand to be able to press it comfortably with either the thumb or the pinky from resting position. In fact, installing a rotary encoder there is a common move among Kyria users and I guarantee you that activating Control by holding down a rotary encoder does not spark joy. Instead, let's employ a popular trick that involves remapping the current Caps Lock key, which is positioned at a comfortable position on the keyboard, to Control. + +We can go further though; a variant of this trick makes the Control key produce Escape when tapped. This is called a “modtap”. There is no use to tapping Control by itself without chording it with another key and there is no use to holding down the Esc key so why not combine the two into a single key? + +All of this leaves us with three blank keys. + +``` +,-------------------------------------------. ,-------------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +|Ctrl/Esc| A | S | D | F | G | | H | J | K | L | ; : | ' " | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| LShift | Z | X | C | V | B | [ { | | | | ] } | N | M | , < | . > | / ? | RShift | +`--------+-------------+--------------------+------+------| |------+------+--------------------+------+---------------' + | | LGUI | LAlt | Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + | | | | | | | | | | | | + `----------------------------------' '----------------------------------' +``` + +These keys are not easily reachable while touch typing (that is, not reachable without picking up your hand) and should thus be associated with functions that you are not likely to be typed within a stream of text. The idea is that if you have to pick up your hand to hit a key, you want it to be at a time when you are likely to be pausing your interaction with the machine, rather than in the midst of a flurry of typing. They're thus well suited for accessing the adjust layer and the function layer. We can also toss in Caps Lock even though it is an editing-type function that gets used within a stream of text because shouting in ALL-CAPS should be a deliberate action. + +``` +,-------------------------------------------. ,-------------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +|Ctrl/Esc| A | S | D | F | G | | H | J | K | L | ; : | ' " | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| LShift | Z | X | C | V | B | [ { |CapsLk| |F-keys| ] } | N | M | , < | . > | / ? | RShift | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + |Adjust| LGUI | LAlt | Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' +``` + +The next glaring issue is the absence of an Enter key on the current base layer this far. Enter is a very frequently used key so it deserves to be placed at a good spot in the keymap. The best way to insert it in the keymap with minimal changes to the current layout is to use modtaps. A tempting solution is to turn the RShift key into a RShift/Enter modtap but that can result in chat messages sent too frustratingly early when you're not used to it. Using GUI is also sub-optimal because tapping the GUI modifier actually has a use as opposed to taps of the Control or the Shift key. Pressing and releasing the GUI key by itself opens the App menu in many desktop environments. The natural choice is thus LAlt/Enter. That way, Enter is 1u away from resting thumb position and is unlikely to get accidentally activated because Alt is very rarely used in the midst of prose. + +Finally, we're one Quality-Of-Life update away from the actual base layer. Ctrl/' " not only preserves symmetry in the keymap with Ctrl/Esc but also helps balance the load between your pinkies and invites you to use both hands instead of contortions. Perhaps more importantly, it also frees you from the necessity of picking up your hand, breaking touch typing position and pressing a pinky key with your ring finger in order to execute Ctrl+A or Ctrl+Z. That becomes even more important on a board with such an aggressive pinky columnar stagger like the Kyria. + + +``` +,-------------------------------------------. ,-------------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +|Ctrl/Esc| A | S | D | F | G | | H | J | K | L | ; : |Ctrl/' "| +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| LShift | Z | X | C | V | B | [ { |CapsLk| |F-keys| ] } | N | M | , < | . > | / ? | RShift | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + |Adjust| LGUI | LAlt/| Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + | | | Enter| | | | | | | | | + `----------------------------------' `----------------------------------' +``` + +
+ +## Navigation layer + +``` +Nav Layer: Media, navigation + +,-------------------------------------------. ,-------------------------------------------. +| | | | | | | | PgUp | Home | ↑ | End | VolUp| Delete | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +| | GUI | Alt | Ctrl | Shift| | | PgDn | ← | ↓ | → | VolDn| Insert | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| | | | | | | |ScLck | | | | Pause|M Prev|M Play|M Next|VolMut| PrtSc | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + | | | | | | | | | | | | + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' +``` + +This is where you'll find all the keys that are generally between the main block of a classic keyboard and the numpad in addition to media controls and modifiers on easy access on the home row for fast and comfortable chording with navigation keys. + +Useful mnemonics: +- “GACS” to remember the order of the modifiers on the left-hand home row +- Scroll Lock is on the same key as Caps Lock because they're both locks +- Delete is on the same key as Backspace because they both erase characters +- Home is the leftmost position on the current line so it is above . Same logic applies for End. +- Media Previous = ⏮, Media Next = ⏭ +- Page Up, Page Down and Volume Up, Volume Down are positioned like the main Up and Down keys. + +## Sym layer +``` +Sym Layer: Numbers, symbols + +,-------------------------------------------. ,-------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | = | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + | +|--------+------+------+------+------+------+-------------. ,------+-------------+------+------+------+------+--------| +| | | \ | : | ; | - | \ | | [ { | | | | ] } | # ~ | _ | , | . | / | ? | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + | | | | | | | | | | | | + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' +``` +The top row is the unshifted num row, the home row of the layer is the shifted num row and the bottom row contains ISO keys (\ | and # ~, which are respectively `KC_NUBS` and `KC_NUHS`), the hyphen `-` and the underscore `_` on the best lower row spot because of how frequent they are and redundant symbols that are already present on the base layer but are reproduced here to avoid juggling back and forth between base, shift, and sym when typing a string of symbols. + +The layout of the first two rows needs no introduction, you're already used to them but it's worth looking into the structure of the bottom row. + +The two halves are mirrored in a sense. On the right, you can find , . / at their usual spots with the addition of Shift+/=? to the right of the / key to remove the need to press simultaneously Sym and a Shift key to access `?`. + +Now, if you look at the left side, you'll notice that the mirror of , is ;, the mirror of . is : and the mirror of / is \\. The same logic used for Shift+/=? also applies to Shift+\\=|. + +As for the ISO keys, they are positioned more or less like they would on a classic keyboard: `KC_NUBS` on the left and `KC_NUHS` on the right. + +## Function layer +``` +Function Layer: Function keys + +,-------------------------------------------. ,-------------------------------------------. +| | F9 | F10 | F11 | F12 | | | | | | | | | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +| | F5 | F6 | F7 | F8 | | | | Shift| Ctrl | Alt | GUI | | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| | F1 | F2 | F3 | F4 | | | | | | | | | | | | | +`--------+------+------+--------------------+------+------| |------+------+------+------+------+----------------------' + | | | | | | | | | | | | + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' +``` +In a similar fashion to the nav layer, pressing down `FKEYS` with the right thumb enables a numpad of function keys on the opposite hand and modifiers on the right-hand home row. Once again, mirror symmetry is leveraged in this keymap for the order of the right-hand modifiers. + +Since there are more than 10 function keys, the cluster of F-keys does not follow the usual 3×3+1 numpad arrangement. + + +## Adjust layer +``` +Adjust Layer: Default layer settings, RGB + +,-------------------------------------------. ,-------------------------------------------. +| | | |QWERTY| | | | | | | | | | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +| | | |Dvorak| | | | TOG | SAI | HUI | VAI | MOD | | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| | | |Colmak| | | | | | | | | SAD | HUD | VAD | RMOD | | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + | | | | | | | | | | | | + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' +``` + +Default layer settings on the left and various RGB underglow controls on the right. + +The default layer settings are lined up on the middle finger column because the home middle finger key is D on QWERTY (like the “D” in “Dvorak”) and the lower middle finger key is C on QWERTY (like the “C” in “Colemak”). I can hear you say that “QWERTY” doesn't start with “E” but Dvorak and Colemak were already aligned in a column so the QWERTY may as well join the formation. + +NOTE: The default layer settings set by those keys are *NOT* stored in EEPROM and thus do not persist through boots. If you wish to change the default layer in a non-volatile manner, either change the order of the layers in the firmware, for example like so if you want to set Dvorak as the new default: +```c +enum layers { + _DVORAK = 0, + _QWERTY, + _COLEMAK_DH, + _NAV, + _SYM, + _FUNCTION, + _ADJUST +}; +``` +or re-define the `QWERTY`, `COLEMAK` and `DVORAK` keys to point to custom keycodes starting on `SAFE_RANGE` and calling the `set_single_persistent_default_layer` function inside of `process_record_user`. + +## Hardware Features + +### Rotary Encoder +The left rotary encoder is programmed to control the volume whereas the right encoder sends PgUp or PgDn on every turn. + +### OLEDs +The OLEDs display the current layer at the top of the active layers stack, the Kyria logo and lock status (caps lock, num lock, scroll lock). + +### Underglow +The underglow LEDs should be red. + +## Going further... + +This default keymap can be used as is, unchanged, as a daily driver for your Kyria but you're invited to treat your keymap like a bonsai. At the beginning, it's just like the default keymap but from time to time, you can tweak it a little. Cut a little key here, let another combo grow there. Slowly but surely it will be a unique keymap like no other, that will fit you like a glove. + +Check out the #keymap-ideas channel on the official SplitKB Discord server for inspiration. diff --git a/keyboards/splitkb/kyria/keymaps/benji/rules.mk b/keyboards/splitkb/kyria/keymaps/benji/rules.mk new file mode 100644 index 000000000..35f8ec90c --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/benji/rules.mk @@ -0,0 +1,4 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/splitkb/kyria/keymaps/cjuniet/config.h b/keyboards/splitkb/kyria/keymaps/cjuniet/config.h new file mode 100644 index 000000000..8b63c1f58 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/cjuniet/config.h @@ -0,0 +1,37 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 + #define OLED_FONT_H "users/cjuniet/glcdfont.c" +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP +#endif + +#define EE_HANDS + +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 250 + +#define TAPPING_TOGGLE 2 diff --git a/keyboards/kyria/keymaps/cjuniet/default.json b/keyboards/splitkb/kyria/keymaps/cjuniet/default.json similarity index 100% rename from keyboards/kyria/keymaps/cjuniet/default.json rename to keyboards/splitkb/kyria/keymaps/cjuniet/default.json diff --git a/keyboards/kyria/keymaps/cjuniet/keymap.c b/keyboards/splitkb/kyria/keymaps/cjuniet/keymap.c similarity index 100% rename from keyboards/kyria/keymaps/cjuniet/keymap.c rename to keyboards/splitkb/kyria/keymaps/cjuniet/keymap.c diff --git a/keyboards/splitkb/kyria/keymaps/cjuniet/rules.mk b/keyboards/splitkb/kyria/keymaps/cjuniet/rules.mk new file mode 100644 index 000000000..71feb286d --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/cjuniet/rules.mk @@ -0,0 +1,7 @@ +ENCODER_ENABLE = no +EXTRAKEY_ENABLE = yes +LEADER_ENABLE = yes +MOUSEKEY_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +RGBLIGHT_ENABLE = no diff --git a/keyboards/splitkb/kyria/keymaps/corodiak/config.h b/keyboards/splitkb/kyria/keymaps/corodiak/config.h new file mode 100644 index 000000000..3f031b69f --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/corodiak/config.h @@ -0,0 +1,45 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +// The Leader key allows to flexibly assign macros to key sequences. +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 350 + +#define TAPPING_TERM 200 + +// Turn off on slave +#define WAIT_FOR_USB + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +#define SPLIT_USB_DETECT +#define NO_USB_STARTUP_CHECK + +// Allows to use either side as the master. Look at the documentation for info: +// https://docs.qmk.fm/#/config_options?id=setting-handedness +#define EE_HANDS diff --git a/keyboards/kyria/keymaps/corodiak/keymap.c b/keyboards/splitkb/kyria/keymaps/corodiak/keymap.c similarity index 100% rename from keyboards/kyria/keymaps/corodiak/keymap.c rename to keyboards/splitkb/kyria/keymaps/corodiak/keymap.c diff --git a/keyboards/splitkb/kyria/keymaps/corodiak/rules.mk b/keyboards/splitkb/kyria/keymaps/corodiak/rules.mk new file mode 100644 index 000000000..59e2da986 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/corodiak/rules.mk @@ -0,0 +1,5 @@ +# OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +# ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +LEADER_ENABLE = yes # Enables the Leader shortcut funtionality diff --git a/keyboards/splitkb/kyria/keymaps/cwebster2/config.h b/keyboards/splitkb/kyria/keymaps/cwebster2/config.h new file mode 100644 index 000000000..09ca20b44 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/cwebster2/config.h @@ -0,0 +1,55 @@ +/* Copyright 2020 Casey Webster + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + //#define RGBLIGHT_ANIMATIONS + //#define RGBLIGHT_EFFECT_ALTERNATING + #define RGBLIGHT_EFFECT_BREATHING + //#define RGBLIGHT_EFFECT_CHRISTMAS + //#define RGBLIGHT_EFFECT_KNIGHT + //#define RGBLIGHT_EFFECT_RAINBOW_MOOD + //#define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_SNAKE + //#define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_TWINKLE + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP + #define RGBLIGHT_LIMIT_VAL 128 + #define RGBLIGHT_EFFECT_BREATHE_MAX 128 + #define RGBLIGHT_LAYERS + #define RGBLIGHT_MAX_LAYERS 16 + //#define RGBLIGHT_STARTUP_ANIMATION +#endif + +#ifdef COMBO_ENABLE + #define COMBO_COUNT 2 +#endif + +#define QMK_KEYS_PER_SCAN 4 + +#define EE_HANDS + +//#define DEBUG_MATRIX_SCAN_RATE +//#define SPLIT_MODS_ENABLE diff --git a/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c b/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c new file mode 100644 index 000000000..03759d2fb --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c @@ -0,0 +1,401 @@ +/* Copyright 2020 Casey Webster + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "raw_hid.h" +#define RAW_EPSIZE 8 +#include + +#include "cwebster2.h" + +#ifdef WPM_ENABLE +char wpm_str[10]; +uint16_t wpm_graph_timer = 0; +#endif + +#ifdef COMBO_ENABLE +enum combos { + ZX_COPY, + CV_PASTE +}; + +const uint16_t PROGMEM copy_combo[] = { KC_Z, KC_X, COMBO_END }; +const uint16_t PROGMEM paste_combo[] = { KC_C, KC_V, COMBO_END }; + +combo_t key_combos[COMBO_COUNT] = { + [ZX_COPY] = COMBO(copy_combo, LCTL_T(KC_C)), + [CV_PASTE] = COMBO(paste_combo, LCTL_T(KC_V)) +}; +#endif + +#define LAYOUT_kyria_base( \ + L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, \ + L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, \ + L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, \ + L33, L34, L35, R35, R34, R33 \ + ) \ + LAYOUT_kyria_wrapper ( \ + KC_GRV, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, KC_BSLS, \ + KC_CTLBS, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, KC_QUOT, \ + KC_EQL, L21, L22, L23, L24, L25, KC_LCCL, KC_LGUI, KC_ALTCL, KC_LSFT, R25, R24, R23, R22, R21, KC_MINS, \ + SCMD_T(KC_LBRC), C_S_T(KC_MINS), L33, L34, L35, R35, R34, R33, TO(_GAME), KC_PSCR \ + ) +#define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + */ + [_QWERTY] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______QWERTY_L1______, _______QWERTY_R1______, + _______QWERTY_L2______, _______QWERTY_R2______, + _______QWERTY_L3______, _______QWERTY_R3______, + _______THUMBS_L_______, _______THUMBS_R_______ + /* `---------------------' `---------------------' */ + ), + [_COLEMAK] = LAYOUT_kyria_wrapper( + /* ,-----------------------. ,-----------------------. */ + KC_GRV, _______COLEMAK_L1_____, _______COLEMAK_R1_____, KC_BSLS, + KC_CTLBS, _______COLEMAK_L2_____, _______COLEMAK_R2_____, KC_SCLN, + KC_EQL, _______COLEMAK_L3_____, KC_LCCL, KC_LGUI, KC_ALTCL, KC_LSFT, _______COLEMAK_R3_____, KC_MINS, + SCMD_T(KC_LBRC), C_S_T(KC_MINS), _______THUMBS_L_______, _______THUMBS_R_______, TO(_QWERTY), KC_PSCR + /* `---------------------' `---------------------' */ + ), + // GAME layout -- qwerty without homerow mods + [_GAME] = LAYOUT_kyria_wrapper( + /* ,-------------------------------------------. ,-------------------------------------------. */ + KC_GRV, _______QWERTY_L1______, _______QWERTY_R1______, KC_BSLS, + KC_CTLBS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, _______QWERTY_L3______, KC_LCCL, KC_LALT, KC_ALTCL, KC_LSFT, _______QWERTY_R3______, KC_MINS, + KC_EQL, KC_0, _______NAKED_L___T____, _______THUMBS_R_______, TO(_COLEMAK), KC_F12 + /* `----------------------------------' `----------------------------------' */ + ), + [_FN] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______FN_______L1____, _______INACTIVE_R1____, + _______FN_______L2____, _______INACTIVE_R2____, + _______FN_______L3____, _______NAV______R2____, + _______FN________T____, _______INACTIVE__T____ + /* `---------------------' `---------------------' */ + ), + [_SYMBOLS] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______SYM______L1____, _______INACTIVE_R1____, + _______SYM______L2____, _______INACTIVE_R2____, + _______SYM______L3____, _______INACTIVE_R3____, + _______SYM_______T____, _______INACTIVE__T____ + /* `---------------------' `---------------------' */ + ), + [_NUM] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______NUM______L1____, _______INACTIVE_R1____, + _______NUM______L2____, _______INACTIVE_R2____, + _______NUM______L3____, _______INACTIVE_R3____, + _______NUM_______T____, _______INACTIVE__T____ + /* `---------------------' `---------------------' */ + ), + [_NAV] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______INACTIVE_L1____, _______NAV______R1____, + _______INACTIVE_L2____, _______NAV______R2____, + _______INACTIVE_L3____, _______NAV______R3____, + _______INACTIVE__T____, _______NAV_______T____ + /* `---------------------' `---------------------' */ + ), + [_MOUSE] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______INACTIVE_L1____, _______MOUSE____R1____, + _______INACTIVE_L2____, _______MOUSE____R2____, + _______INACTIVE_L3____, _______MOUSE____R3____, + _______INACTIVE__T____, _______MOUSE_____T____ + /* `---------------------' `---------------------' */ + ), + [_MEDIA] = LAYOUT_kyria_base_wrapper( + /* ,-----------------------. ,-----------------------. */ + _______INACTIVE_L1____, _______MEDIA____R1____, + _______INACTIVE_L2____, _______MEDIA____R2____, + _______INACTIVE_L3____, _______MEDIA____R3____, + _______INACTIVE__T____, _______MEDIA_____T____ + /* `---------------------' `---------------------' */ + ), +}; + +#ifdef RAW_ENABLE +static void send_layer_via_hid(int layer) { + uint8_t data[RAW_EPSIZE]; + data[0] = 1; + data[1] = layer; + raw_hid_send(data, sizeof(data)); + return; +} +#endif + + +#ifdef RGBLIGHT_LAYERS +const rgblight_segment_t PROGMEM my_qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_AZURE} ); +const rgblight_segment_t PROGMEM my_colemak_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_BLUE} ); +const rgblight_segment_t PROGMEM my_game_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_RED} ); +const rgblight_segment_t PROGMEM my_fn_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_PINK} ); +const rgblight_segment_t PROGMEM my_symbols_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_GREEN} ); +const rgblight_segment_t PROGMEM my_num_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_CORAL} ); +const rgblight_segment_t PROGMEM my_nav_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_GOLDENROD} ); +const rgblight_segment_t PROGMEM my_mouse_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_TURQUOISE} ); +const rgblight_segment_t PROGMEM my_media_layer[] = RGBLIGHT_LAYER_SEGMENTS( {0, 20, HSV_MAGENTA} ); + +const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 3, HSV_RED}, + {7, 1, HSV_RED}, + {10, 3, HSV_RED}, + {17, 1, HSV_RED} +); + +const rgblight_segment_t PROGMEM my_shift_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {3, 1, HSV_RED}, + {13, 1, HSV_RED} +); + +const rgblight_segment_t PROGMEM my_ctrl_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {4, 1, HSV_ORANGE}, + {14, 1, HSV_ORANGE} +); + +const rgblight_segment_t PROGMEM my_alt_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {5, 1, HSV_GOLD}, + {15, 1, HSV_GOLD} +); + +const rgblight_segment_t PROGMEM my_gui_layer[] = RGBLIGHT_LAYER_SEGMENTS( + {9, 1, HSV_SPRINGGREEN}, + {19, 1, HSV_SPRINGGREEN} +); + +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( + my_colemak_layer, + my_qwerty_layer, + my_game_layer, + my_fn_layer, + my_symbols_layer, + my_num_layer, + my_nav_layer, + my_mouse_layer, + my_media_layer, + my_capslock_layer, + my_shift_layer, + my_ctrl_layer, + my_alt_layer, + my_gui_layer +); + +void matrix_scan_keymap(void) { + uint8_t mods = mod_config(get_mods()); + rgblight_set_layer_state(10, mods & MOD_MASK_SHIFT); + rgblight_set_layer_state(11, mods & MOD_MASK_CTRL); + rgblight_set_layer_state(12, mods & MOD_MASK_ALT); + rgblight_set_layer_state(13, mods & MOD_MASK_GUI); +} +#endif + +void keyboard_post_init_user(void) { + rgblight_sethsv_noeeprom(HSV_BLUE); + keyboard_post_init_rgb(); +#ifdef RGBLIGHT_LAYERS + rgblight_layers = my_rgb_layers; +#else + rgblight_sethsv_noeeprom(HSV_BLUE); +#endif + /*debug_enable=true;*/ + /*debug_matrix=true;*/ +} + +//todo https://github.com/qmk/qmk_firmware/blob/debdc6379c7a72815df1f53e3406479381d243af/keyboards/crkbd/keymaps/soundmonster/keymap.c RGBRST + +layer_state_t layer_state_set_user(layer_state_t state) { +#ifdef RGBLIGHT_LAYERS + for (int i = _QWERTY; i < __LAST; i++) { + rgblight_set_layer_state(i, layer_state_cmp(state, i)); + } +# ifdef RAW_ENABLE + send_layer_via_hid(state); +# endif +#endif + return state; +} + +#ifdef RGBLIGHT_LAYERS +bool led_update_user(led_t led_state) { + rgblight_set_layer_state(9, led_state.caps_lock); + return true; +} +#endif + +#ifdef OLED_ENABLE +void suspend_power_down_user() { + oled_clear(); + oled_off(); +} + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +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}; + + static const char PROGMEM logo[] = { + // canvas is 128x64. need 16 padding + // 80x32 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x60, 0xe0, 0xf0, 0xfe, 0xfe, 0xf0, 0x60, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x7c, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0x7c, 0xf8, 0xe0, 0x60, 0x20, 0x10, 0x10, 0x0c, 0x0f, 0x09, 0x08, 0x00, 0x09, 0x9b, 0x5c, 0x50, 0x10, 0x20, 0x40, 0xe0, 0xf8, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x78, 0x38, 0x38, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x17, 0x15, 0x3d, 0xef, 0xaf, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x10, 0x00, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x40, 0xa0, 0xbf, 0xff, 0x3f, 0x3f, 0x3f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(logo, sizeof(logo)); + + oled_advance_page(false); + oled_advance_page(false); + oled_advance_page(false); + oled_advance_page(false); + oled_write_P(qmk_logo, false); + +#ifdef COMBO_ENABLE + oled_write_P(PSTR("Combos enabled: "), false); + if (is_combo_enabled()) { + oled_write_P(PSTR("Yes\n"), false); + } else { + oled_write_P(PSTR("No\n"), false); + } +#endif + +#ifdef SPLIT_MODS_ENABLE + uint8_t mods = get_mods() | get_weak_mods(); + oled_write_P((mods & MOD_MASK_GUI) ? PSTR("GUI ") : PSTR(" "), false); + oled_write_P((mods & MOD_MASK_ALT) ? PSTR("ALT ") : PSTR(" "), false); + oled_write_P((mods & MOD_MASK_CTRL) ? PSTR("CTRL ") : PSTR(" "), false); + oled_write_P((mods & MOD_MASK_SHIFT) ? PSTR("SHFT ") : PSTR(" "), false); + oled_write_P(PSTR("\n"), false); + +#endif + +#ifdef WPM_ENABLE + // Write WPM + uint8_t n = get_current_wpm(); + wpm_str[3] = '\0'; + wpm_str[2] = '0' + n % 10; + wpm_str[1] = '0' + (n /= 10) % 10; + wpm_str[0] = '0' + n / 10 ; + //oled_write_P(PSTR("\n"), false); + oled_write_P(PSTR(" WPM: "), false); + oled_write(wpm_str, false); +#endif +} + + +static void render_status(void) { + static bool isColemak = false; + // QMK Logo and version information + oled_write_P(PSTR("Kyria rev1.3\n\n"), false); + + oled_write_P(isColemak ? PSTR("COLEMAK ") : PSTR("QWERTY "), false); + + // Host Keyboard Layer Status + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + isColemak = false; + break; + case _SYMBOLS: + oled_write_P(PSTR("Shifted Sym\n"), false); + break; + case _NUM: + oled_write_P(PSTR("Numbers\n"), false); + break; + case _NAV: + oled_write_P(PSTR("Navigation\n"), false); + break; + case _FN: + oled_write_P(PSTR("Fn\n"), false); + break; + case _GAME: + oled_write_P(PSTR("Game\n"), false); + isColemak = false; + break; + case _COLEMAK: + oled_write_P(PSTR("Colemak-DHm\n"), false); + isColemak = true; + break; + case _MEDIA: + oled_write_P(PSTR("Media keys\n"), false); + break; + case _MOUSE: + oled_write_P(PSTR("Mouse keys\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + uint8_t mods = get_mods() | get_weak_mods(); + oled_write_P(PSTR("\n"), false); + oled_write_P((mods & MOD_MASK_GUI) ? PSTR("GUI ") : PSTR(" "), false); + oled_write_P((mods & MOD_MASK_ALT) ? PSTR("ALT ") : PSTR(" "), false); + oled_write_P((mods & MOD_MASK_CTRL) ? PSTR("CTRL ") : PSTR(" "), false); + oled_write_P((mods & MOD_MASK_SHIFT) ? PSTR("SHFT ") : PSTR(" "), false); + oled_write_P(PSTR("\n"), false); + +#define I3MASK MOD_BIT(KC_LGUI) +#define I3SMASK (MOD_BIT(KC_LGUI) | MOD_BIT(KC_LSFT)) +#define KMASK (MOD_BIT(KC_LCTL) | MOD_BIT(KC_LSFT)) + + oled_write_P((mods == I3MASK) ? PSTR("I3 ") : (mods == I3SMASK) ? PSTR("I3-SFT ") : PSTR(" "), false); + oled_write_P((mods == KMASK) ? PSTR("KITTY ") : PSTR(" "), false); + oled_write_P(PSTR("\n"), false); + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_logo(); + } +} +#endif + + +#ifdef RAW_ENABLE +void raw_hid_receive(uint8_t *data, uint8_t length) { + // messages from host + // add ability to set color + raw_hid_send(data, length); +} +#endif diff --git a/keyboards/splitkb/kyria/keymaps/cwebster2/rules.mk b/keyboards/splitkb/kyria/keymaps/cwebster2/rules.mk new file mode 100644 index 000000000..c126cda31 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/cwebster2/rules.mk @@ -0,0 +1,6 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RAW_ENABLE = yes +WPM_ENABLE = yes +COMBO_ENABLE = no diff --git a/keyboards/splitkb/kyria/keymaps/default/config.h b/keyboards/splitkb/kyria/keymaps/default/config.h new file mode 100644 index 000000000..be87e7ac9 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/default/config.h @@ -0,0 +1,32 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_ANIMATIONS +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 150 +#endif + +// Lets you roll mod-tap keys +#define IGNORE_MOD_TAP_INTERRUPT + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/splitkb/kyria/keymaps/default/keymap.c b/keyboards/splitkb/kyria/keymaps/default/keymap.c new file mode 100644 index 000000000..66c012d0c --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/default/keymap.c @@ -0,0 +1,217 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY = 0, + _DVORAK, + _COLEMAK_DH, + _NAV, + _SYM, + _FUNCTION, + _ADJUST, +}; + + +// Aliases for readability +#define QWERTY DF(_QWERTY) +#define COLEMAK DF(_COLEMAK_DH) +#define DVORAK DF(_DVORAK) + +#define SYM MO(_SYM) +#define NAV MO(_NAV) +#define FKEYS MO(_FUNCTION) +#define ADJUST MO(_ADJUST) + +#define CTL_ESC MT(MOD_LCTL, KC_ESC) +#define CTL_QUOT MT(MOD_RCTL, KC_QUOTE) +#define CTL_MINS MT(MOD_RCTL, KC_MINUS) +#define ALT_ENT MT(MOD_LALT, KC_ENT) + +// Note: LAlt/Enter (ALT_ENT) is not the same thing as the keyboard shortcut Alt+Enter. +// The notation `mod/tap` denotes a key that activates the modifier `mod` when held down, and +// produces the key `tap` when tapped (i.e. pressed and released). + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * |Ctrl/Esc| A | S | D | F | G | | H | J | K | L | ; : |Ctrl/' "| + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | [ { |CapsLk| |F-keys| ] } | N | M | , < | . > | / ? | RShift | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * |Adjust| LGUI | LAlt/| Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + * | | | Enter| | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y, KC_U , KC_I , KC_O , KC_P , KC_BSPC, + CTL_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H, KC_J , KC_K , KC_L ,KC_SCLN,CTL_QUOT, + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_LBRC,KC_CAPS, FKEYS , KC_RBRC, KC_N, KC_M ,KC_COMM, KC_DOT ,KC_SLSH, KC_RSFT, + ADJUST , KC_LGUI, ALT_ENT, KC_SPC , NAV , SYM , KC_SPC ,KC_RALT, KC_RGUI, KC_APP + ), + +/* + * Base Layer: Dvorak + * + * ,-------------------------------------------. ,-------------------------------------------. + * | Tab | ' " | , < | . > | P | Y | | F | G | C | R | L | Bksp | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * |Ctrl/Esc| A | O | E | U | I | | D | H | T | N | S |Ctrl/- _| + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | ; : | Q | J | K | X | [ { |CapsLk| |F-keys| ] } | B | M | W | V | Z | RShift | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * |Adjust| LGUI | LAlt/| Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + * | | | Enter| | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_DVORAK] = LAYOUT( + KC_TAB ,KC_QUOTE,KC_COMM, KC_DOT, KC_P , KC_Y , KC_F, KC_G , KC_C , KC_R , KC_L , KC_BSPC, + CTL_ESC , KC_A , KC_O , KC_E , KC_U , KC_I , KC_D, KC_H , KC_T , KC_N , KC_S , CTL_MINS, + KC_LSFT ,KC_SCLN, KC_Q , KC_J , KC_K , KC_X , KC_LBRC,KC_CAPS, FKEYS , KC_RBRC, KC_B, KC_M , KC_W , KC_V , KC_Z , KC_RSFT, + ADJUST, KC_LGUI, ALT_ENT, KC_SPC , NAV , SYM , KC_SPC ,KC_RALT, KC_RGUI, KC_APP + ), + +/* + * Base Layer: Colemak DH + * + * ,-------------------------------------------. ,-------------------------------------------. + * | Tab | Q | W | F | P | B | | J | L | U | Y | ; : | Bksp | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * |Ctrl/Esc| A | R | S | T | G | | M | N | E | I | O |Ctrl/' "| + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | Z | X | C | D | V | [ { |CapsLk| |F-keys| ] } | K | H | , < | . > | / ? | RShift | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * |Adjust| LGUI | LAlt/| Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + * | | | Enter| | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_COLEMAK_DH] = LAYOUT( + KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_B , KC_J, KC_L , KC_U , KC_Y ,KC_SCLN, KC_BSPC, + CTL_ESC , KC_A , KC_R , KC_S , KC_T , KC_G , KC_M, KC_N , KC_E , KC_I , KC_O , CTL_QUOT, + KC_LSFT , KC_Z , KC_X , KC_C , KC_D , KC_V , KC_LBRC,KC_CAPS, FKEYS , KC_RBRC, KC_K, KC_H ,KC_COMM, KC_DOT ,KC_SLSH, KC_RSFT, + ADJUST, KC_LGUI, ALT_ENT, KC_SPC , NAV , SYM , KC_SPC ,KC_RALT, KC_RGUI, KC_APP + ), + +/* + * Nav Layer: Media, navigation + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | PgUp | Home | ↑ | End | VolUp| Delete | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | GUI | Alt | Ctrl | Shift| | | PgDn | ← | ↓ | → | VolDn| Insert | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | |ScLck | | | | Pause|M Prev|M Play|M Next|VolMut| PrtSc | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_NAV] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_VOLU, KC_DEL, + _______, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_VOLD, KC_INS, + _______, _______, _______, _______, _______, _______, _______, KC_SLCK, _______, _______,KC_PAUSE, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + * Sym Layer: Numbers and symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | \ | : | ; | - | [ | { | | | | } | ] | _ | , | . | / | ? | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_SYM] = LAYOUT( + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL , + KC_TILD , KC_EXLM, KC_AT , KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, + KC_PIPE , KC_BSLS, KC_COLN, KC_SCLN, KC_MINS, KC_LBRC, KC_LCBR, _______, _______, KC_RCBR, KC_RBRC, KC_UNDS, KC_COMM, KC_DOT, KC_SLSH, KC_QUES, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + * Function Layer: Function keys + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F9 | F10 | F11 | F12 | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | F5 | F6 | F7 | F8 | | | | Shift| Ctrl | Alt | GUI | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_FUNCTION] = LAYOUT( + _______, KC_F9 , KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, + _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , _______, _______, KC_RSFT, KC_RCTL, KC_LALT, KC_RGUI, _______, + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + * Adjust Layer: Default layer settings, RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | |QWERTY| | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | |Dvorak| | | | TOG | SAI | HUI | VAI | MOD | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | |Colmak| | | | | | | | | SAD | HUD | VAD | RMOD | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, QWERTY , _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, DVORAK , _______, _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, + _______, _______, _______, COLEMAK, _______, _______,_______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD, _______, + _______, _______, _______,_______, _______, _______, _______, _______, _______, _______ + ), + +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; diff --git a/keyboards/splitkb/kyria/keymaps/default/readme.md b/keyboards/splitkb/kyria/keymaps/default/readme.md new file mode 100644 index 000000000..7401609f3 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/default/readme.md @@ -0,0 +1,249 @@ +# Kyria's Default Keymap + +![KLE render of the default Kyria keymap with QWERTY as the base layer. Layers are shown in sublegends.](https://i.ibb.co/RQZx2dY/default-kyria2.jpg) + + +The default keymap contains 5 layers which allows it to include all keys found on an ANSI layout TKL keyboard plus media keys. +Hardware features of the Kyria such as OLEDs, rotary encoders and underglow are also supported. + +The five different layers are the following: +1. Base layer (QWERTY, Colemak-DH or Dvorak) +2. Navigation layer +3. Symbols/Numbers layer +4. Function layer +5. Adjust layer + +## Base layer(s) +``` +Base Layer: - + +,-------------------------------------------. ,-------------------------------------------. +| Tab | - | - | - | - | - | | - | - | - | - | - | Bksp | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +|Ctrl/Esc| - | - | - | - | - | | - | - | - | - | - |Ctrl/ - | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| LShift | - | - | - | - | - | [ { |CapsLk| |F-Keys| ] } | - | - | - | - | - | RShift | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + |Adjust| LGUI | LAlt/| Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + | | | Enter| | | | | | | | | + `----------------------------------' `----------------------------------' +``` +Three different well-known keyboard layouts are provided to fill in the placeholder `-` keys: QWERTY, Colemak-DH, and Dvorak. The default layer can be changed at runtime, more info on that in the section on the [adjust layer](#adjust-layer). + +For the rest of this write-up, the base layer will be assumed to be QWERTY and will be used as a reference to describe physical keys, e.g. “B key” vs, the much more verbose, “lower inner index key”. + +``` +Base Layer: QWERTY + +,-------------------------------------------. ,-------------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +|Ctrl/Esc| A | S | D | F | G | | H | J | K | L | ; : |Ctrl/' "| +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| LShift | Z | X | C | V | B | [ { |CapsLk| |F-keys| ] } | N | M | , < | . > | / ? | RShift | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + |Adjust| LGUI | LAlt/| Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + | | | Enter| | | | | | | | | + `----------------------------------' `----------------------------------' +``` + +Aside from variations in the alpha cluster, the rest of the base keys remain the same and are designed to feel familiar. + +![Step-by-step animation of the transformation of an ortholinear TKL to a Kyria](https://i.imgur.com/uVDCOek.gif) + +
+After making transformations to the classic ANSI US QWERTY TKL 60% to arrive to the layout of the Kyria, as illustrated in the animation above, the result looks like this: + +``` +,-------------------------------------------. ,-------------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +| Cap Lk | A | S | D | F | G | | H | J | K | L | ; : | ' " | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| LShift | Z | X | C | V | B | | | | | | N | M | , < | . > | / ? | RShift | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + | LCtrl| LGUI | LAlt | Space| | | | Space| AltGr| RGUI | Menu | + | | | | | | | | | | | | + `----------------------------------' '----------------------------------' +``` + +First thing to notice is the presence of blank keys. To fill in the blank keys above the Space keys, we can take inspiration from other split keyboards featuring an extra inner index column on each half. A common mapping for those kind of keys are the bracket keys that got removed in the fourth step of the animated transformation. The thumb keys besides Spaces is prime real estate for dedicated layer-switching keys. It doesn't matter on which side is assigned the sym-layer-switch key but it helps to keep the nav-layer-switch on the left in order to keep the arrow keys on the right side like on a classic keyboard, so we'll put nav on the left and sym on the right. We'll address the remaining blank thumb keys later. + +The base layer is starting to form but there remains some flaws. One glaring issue is the position of Control. Control is a very commonly used function but the key on which it sits right now is way too tucked in under the hand to be able to press it comfortably with either the thumb or the pinky from resting position. In fact, installing a rotary encoder there is a common move among Kyria users and I guarantee you that activating Control by holding down a rotary encoder does not spark joy. Instead, let's employ a popular trick that involves remapping the current Caps Lock key, which is positioned at a comfortable position on the keyboard, to Control. + +We can go further though; a variant of this trick makes the Control key produce Escape when tapped. This is called a “modtap”. There is no use to tapping Control by itself without chording it with another key and there is no use to holding down the Esc key so why not combine the two into a single key? + +All of this leaves us with three blank keys. + +``` +,-------------------------------------------. ,-------------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +|Ctrl/Esc| A | S | D | F | G | | H | J | K | L | ; : | ' " | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| LShift | Z | X | C | V | B | [ { | | | | ] } | N | M | , < | . > | / ? | RShift | +`--------+-------------+--------------------+------+------| |------+------+--------------------+------+---------------' + | | LGUI | LAlt | Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + | | | | | | | | | | | | + `----------------------------------' '----------------------------------' +``` + +These keys are not easily reachable while touch typing (that is, not reachable without picking up your hand) and should thus be associated with functions that you are not likely to be typed within a stream of text. The idea is that if you have to pick up your hand to hit a key, you want it to be at a time when you are likely to be pausing your interaction with the machine, rather than in the midst of a flurry of typing. They're thus well suited for accessing the adjust layer and the function layer. We can also toss in Caps Lock even though it is an editing-type function that gets used within a stream of text because shouting in ALL-CAPS should be a deliberate action. + +``` +,-------------------------------------------. ,-------------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +|Ctrl/Esc| A | S | D | F | G | | H | J | K | L | ; : | ' " | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| LShift | Z | X | C | V | B | [ { |CapsLk| |F-keys| ] } | N | M | , < | . > | / ? | RShift | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + |Adjust| LGUI | LAlt | Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' +``` + +The next glaring issue is the absence of an Enter key on the current base layer this far. Enter is a very frequently used key so it deserves to be placed at a good spot in the keymap. The best way to insert it in the keymap with minimal changes to the current layout is to use modtaps. A tempting solution is to turn the RShift key into a RShift/Enter modtap but that can result in chat messages sent too frustratingly early when you're not used to it. Using GUI is also sub-optimal because tapping the GUI modifier actually has a use as opposed to taps of the Control or the Shift key. Pressing and releasing the GUI key by itself opens the App menu in many desktop environments. The natural choice is thus LAlt/Enter. That way, Enter is 1u away from resting thumb position and is unlikely to get accidentally activated because Alt is very rarely used in the midst of prose. + +Finally, we're one Quality-Of-Life update away from the actual base layer. Ctrl/' " not only preserves symmetry in the keymap with Ctrl/Esc but also helps balance the load between your pinkies and invites you to use both hands instead of contortions. Perhaps more importantly, it also frees you from the necessity of picking up your hand, breaking touch typing position and pressing a pinky key with your ring finger in order to execute Ctrl+A or Ctrl+Z. That becomes even more important on a board with such an aggressive pinky columnar stagger like the Kyria. + + +``` +,-------------------------------------------. ,-------------------------------------------. +| Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +|Ctrl/Esc| A | S | D | F | G | | H | J | K | L | ; : |Ctrl/' "| +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| LShift | Z | X | C | V | B | [ { |CapsLk| |F-keys| ] } | N | M | , < | . > | / ? | RShift | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + |Adjust| LGUI | LAlt/| Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + | | | Enter| | | | | | | | | + `----------------------------------' `----------------------------------' +``` + +
+ +## Navigation layer + +``` +Nav Layer: Media, navigation + +,-------------------------------------------. ,-------------------------------------------. +| | | | | | | | PgUp | Home | ↑ | End | VolUp| Delete | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +| | GUI | Alt | Ctrl | Shift| | | PgDn | ← | ↓ | → | VolDn| Insert | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| | | | | | | |ScLck | | | | Pause|M Prev|M Play|M Next|VolMut| PrtSc | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + | | | | | | | | | | | | + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' +``` + +This is where you'll find all the keys that are generally between the main block of a classic keyboard and the numpad in addition to media controls and modifiers on easy access on the home row for fast and comfortable chording with navigation keys. + +Useful mnemonics: +- “GACS” to remember the order of the modifiers on the left-hand home row +- Scroll Lock is on the same key as Caps Lock because they're both locks +- Delete is on the same key as Backspace because they both erase characters +- Home is the leftmost position on the current line so it is above . Same logic applies for End. +- Media Previous = ⏮, Media Next = ⏭ +- Page Up, Page Down and Volume Up, Volume Down are positioned like the main Up and Down keys. + +## Sym layer +``` +Sym Layer: Numbers, symbols + +,-------------------------------------------. ,-------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | = | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +| ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| | | \ | : | ; | - | [ | { | | | | } | ] | _ | , | . | / | ? | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + | | | | | | | | | | | | + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' +``` +The top row is the unshifted num row, the home row of the layer is the shifted num row and the bottom row contains the hyphen `-` and the underscore `_` on the best lower row spot because of how frequent they are as well as redundant symbols that are already present on the base layer but are reproduced here to avoid juggling back and forth between base, shift, and sym when typing a string of symbols. + +The layout of the first two rows needs no introduction, you're already used to them but it's worth looking into the structure of the bottom row. + +The two halves are mirrored in a sense. On the right, you can find , . / at their usual spots with the addition of Shift+/=? to the right of the / key to remove the need to press simultaneously Sym and a Shift key to access `?`. + +Now, if you look at the left side, you'll notice that the mirror of , is ;, the mirror of . is : and the mirror of / is \\. The same logic used for Shift+/=? also applies to Shift+\\=|. + +In case you wish to combine Shift with a symbol key anyways, you can hold down Shift on the base layer with your pinky, activate Sym with your right thumb and while still holding down the Shift key, tap your desired symbol key. Same thing if you need Ctrl+Digit. + +## Function layer +``` +Function Layer: Function keys + +,-------------------------------------------. ,-------------------------------------------. +| | F9 | F10 | F11 | F12 | | | | | | | | | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +| | F5 | F6 | F7 | F8 | | | | Shift| Ctrl | Alt | GUI | | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| | F1 | F2 | F3 | F4 | | | | | | | | | | | | | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + | | | | | | | | | | | | + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' +``` +In a similar fashion to the nav layer, pressing down `FKEYS` with the right thumb enables a numpad of function keys on the opposite hand and modifiers on the right-hand home row. Once again, mirror symmetry is leveraged in this keymap for the order of the right-hand modifiers. + +The Alt modifier, despite being situated on the right half of the keyboard is *not* `KC_RALT`, it is `KC_LALT`. `KC_RALT` is actually the AltGr key which generally acts very differently to the left Alt key. Keyboard shortcuts involving AltGr+F# are rare and infrequent as opposed to the much more common Alt+F# shortcuts. Consequently, `KC_LALT` was chosen for the function layer. + +Since there are more than 10 function keys, the cluster of F-keys does not follow the usual 3×3+1 numpad arrangement. + + +## Adjust layer +``` +Adjust Layer: Default layer settings, RGB + +,-------------------------------------------. ,-------------------------------------------. +| | | |QWERTY| | | | | | | | | | +|--------+------+------+------+------+------| |------+------+------+------+------+--------| +| | | |Dvorak| | | | TOG | SAI | HUI | VAI | MOD | | +|--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +| | | |Colmak| | | | | | | | | SAD | HUD | VAD | RMOD | | +`----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + | | | | | | | | | | | | + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' +``` + +Default layer settings on the left and various RGB underglow controls on the right. + +The default layer settings are lined up on the middle finger column because the home middle finger key is D on QWERTY (like the “D” in “Dvorak”) and the lower middle finger key is C on QWERTY (like the “C” in “Colemak”). I can hear you say that “QWERTY” doesn't start with “E” but Dvorak and Colemak were already aligned in a column so the QWERTY may as well join the formation. + +NOTE: The default layer settings set by those keys are *NOT* stored in EEPROM and thus do not persist through boots. If you wish to change the default layer in a non-volatile manner, either change the order of the layers in the firmware, for example like so if you want to set Dvorak as the new default: +```c +enum layers { + _DVORAK = 0, + _QWERTY, + _COLEMAK_DH, + _NAV, + _SYM, + _FUNCTION, + _ADJUST +}; +``` +or re-define the `QWERTY`, `COLEMAK` and `DVORAK` keys to point to custom keycodes starting on `SAFE_RANGE` and calling the `set_single_persistent_default_layer` function inside of `process_record_user`. + +## Hardware Features + +### Rotary Encoder +The left rotary encoder is programmed to control the volume whereas the right encoder sends PgUp or PgDn on every turn. + +### OLEDs +The OLEDs display the current layer at the top of the active layers stack, the Kyria logo and lock status (caps lock, num lock, scroll lock). + +### Underglow +The underglow LEDs should be red. + +## Going further… + +This default keymap can be used as is, unchanged, as a daily driver for your Kyria but you're invited to treat your keymap like a bonsai. At the beginning, it's just like the default keymap but from time to time, you can tweak it a little. Cut a little key here, let another combo grow there. Slowly but surely it will be a unique keymap that will fit you like a glove. + +Check out the #keymap-ideas channel on the official SplitKB Discord server for inspiration. diff --git a/keyboards/splitkb/kyria/keymaps/default/rules.mk b/keyboards/splitkb/kyria/keymaps/default/rules.mk new file mode 100644 index 000000000..35f8ec90c --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/default/rules.mk @@ -0,0 +1,4 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/splitkb/kyria/keymaps/drashna/config.h b/keyboards/splitkb/kyria/keymaps/drashna/config.h new file mode 100644 index 000000000..8239e28cd --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/drashna/config.h @@ -0,0 +1,43 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . + */ + +#pragma once + +#define EE_HANDS + +#ifdef OLED_ENABLE +# define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_SLEEP +# define RGBLIGHT_LIMIT_VAL 200 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_SPLIT +// # define RGBLIGHT_LAYERS +#endif + +#define KEYLOGGER_LENGTH 10 + +#define QMK_ESC_INPUT D4 +#define QMK_ESC_OUTPUT B2 + +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 7 +#define BOOTMAGIC_LITE_ROW_RIGHT 4 +#define BOOTMAGIC_LITE_COLUMN_RIGHT 7 diff --git a/keyboards/splitkb/kyria/keymaps/drashna/keymap.c b/keyboards/splitkb/kyria/keymaps/drashna/keymap.c new file mode 100644 index 000000000..2dc934644 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/drashna/keymap.c @@ -0,0 +1,165 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "drashna.h" + +/* + * The `LAYOUT_kyria_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ + +// clang-format off +#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_kyria_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_wrapper( \ + KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ + LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, TG_GAME, MEH(KC_MINS), TG_DBLO, KC_CAPS, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ + KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ + ) +/* Re-pass though to allow templates to be used */ +#define LAYOUT_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_GAMEPAD] = LAYOUT_wrapper( + KC_ESC, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, + KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, _______, _______, _______, LALT(KC_PSCR), _______, _______, _______, _______, _______, _______, + _______, MAGIC_TOGGLE_NKRO, KC_V, KC_SPC, KC_H, _______, _______, _______, _______, _______ + ), + + [_DIABLO] = LAYOUT_wrapper( + KC_ESC, KC_S, KC_I, KC_F, KC_M, KC_T, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_J, KC_L, TG_DBLO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_DIABLO_CLEAR, KC_J, KC_NO, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [_LOWER] = LAYOUT_wrapper( + KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, + _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, + _______, _________________LOWER_L3__________________, _______, _______, _______, _______, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_RAISE] = LAYOUT_wrapper( + KC_F12, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_F11, + _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_ADJUST] = LAYOUT_wrapper( + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, + _______, _________________ADJUST_L3_________________, HPT_TOG, HPT_FBK, MG_NKRO, UC_MOD, _________________ADJUST_R3_________________, TG_MODS, + _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, _______ + ), +// [_LAYERINDEX] = LAYOUT_wrapper( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_DEFAULT_LAYER_1] = { { KC_DOWN, KC_UP }, { KC_VOLD, KC_VOLU } }, + [_DEFAULT_LAYER_2] = { { _______, _______ }, { _______, _______ } }, + [_DEFAULT_LAYER_3] = { { _______, _______ }, { _______, _______ } }, + [_DEFAULT_LAYER_4] = { { _______, _______ }, { _______, _______ } }, + [_GAMEPAD] = { { _______, _______ }, { _______, _______ } }, + [_DIABLO] = { { _______, _______ }, { _______, _______ } }, + [_MOUSE] = { { _______, _______ }, { KC_WH_D, KC_WH_U } }, + [_MEDIA] = { { _______, _______ }, { _______, _______ } }, + [_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } }, + [_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } }, + [_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } }, +}; +#endif +// clang-format on + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return OLED_ROTATION_180; } +#endif + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { + // Page up/Page down + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } + return true; +} +#endif + +#ifdef RGBLIGHT_LAYERS +const rgblight_segment_t PROGMEM shift_layers[] = RGBLIGHT_LAYER_SEGMENTS({8, 1, 120, 255, 255}, {18, 1, 120, 255, 255}); +const rgblight_segment_t PROGMEM control_layers[] = RGBLIGHT_LAYER_SEGMENTS({6, 1, 0, 255, 255}, {16, 1, 0, 255, 255}); +const rgblight_segment_t PROGMEM alt_layers[] = RGBLIGHT_LAYER_SEGMENTS({2, 1, 240, 255, 255}, {17, 1, 250, 255, 255}); +const rgblight_segment_t PROGMEM gui_layers[] = RGBLIGHT_LAYER_SEGMENTS({7, 1, 51, 255, 255}, {12, 1, 51, 255, 255}); + +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(shift_layers, control_layers, alt_layers, gui_layers); + +void keyboard_post_init_keymap(void) { rgblight_layers = my_rgb_layers; } + +void matrix_scan_keymap(void) { + uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); + rgblight_set_layer_state(0, mods & MOD_MASK_SHIFT); + rgblight_set_layer_state(1, mods & MOD_MASK_CTRL); + rgblight_set_layer_state(2, mods & MOD_MASK_ALT); + rgblight_set_layer_state(3, mods & MOD_MASK_GUI); +} +#endif diff --git a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk new file mode 100644 index 000000000..ba273d7d3 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk @@ -0,0 +1,18 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_STARTUP_ANIMATION = no + +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +UNICODE_ENABLE = no # Unicode +KEY_LOCK_ENABLE = no + + +BOOTLOADER = atmel-dfu +# TAP_DANCE_ENABLE = yes diff --git a/keyboards/splitkb/kyria/keymaps/ghidalgo93/config.h b/keyboards/splitkb/kyria/keymaps/ghidalgo93/config.h new file mode 100644 index 000000000..89ec73f0a --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/ghidalgo93/config.h @@ -0,0 +1,41 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +// encoder resolution from default 4 to 2 +#define ENCODER_RESOLUTION 2 + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK + +//allows for either side as the master. +#define EE_HANDS + + + diff --git a/keyboards/splitkb/kyria/keymaps/ghidalgo93/keymap.c b/keyboards/splitkb/kyria/keymaps/ghidalgo93/keymap.c new file mode 100644 index 000000000..67881b03e --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/ghidalgo93/keymap.c @@ -0,0 +1,246 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + + +enum layers { + _QWERTY = 0, + _LOWER, + _RAISE, + _NAV, + _ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | | | N | M | , < | . > | / ? | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | GUI | | Tab | Enter| | Bksp | Space| Alt | Home | End | + * | | | LCTL | Lower| | | | Raise| | | | + * `----------------------------------' `----------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + KC_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_MINS, + _______, KC_LGUI , KC_LCTL, LT(_LOWER, KC_TAB), LT(_NAV, KC_ENT), KC_BSPC, LT(_RAISE, KC_SPC), KC_RALT, KC_HOME, KC_END + ), +/* + * Lower Layer: Number keys, media + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | 7 | 8 | 9 | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Prev | Play | Next | VolUp| | | 4 | 5 | 6 | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | Mute | VolDn| | | | | | 0 | 1 | 2 | 3 | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, KC_7 , KC_8 , KC_9 , _______, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, _______, KC_4 , KC_5 , KC_6 , _______, _______, + _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_0 , KC_1 , KC_2 , KC_3 , _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Raise Layer: Symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | @ | ! | { | } | | | ` | ~ | & | * | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | # | $ | ( | ) | | | _ | - | = | | | ' " | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | % | ^ | [ | ] | | | | | | | | + | \ | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = LAYOUT( + _______, KC_AT , KC_EXLM, KC_LCBR, KC_RCBR, _______, KC_GRV , KC_TILD, KC_AMPR, KC_ASTR, _______, _______, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, _______, KC_UNDS, KC_MINS, KC_EQL , KC_PIPE, KC_QUOT, _______, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_BSLS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Navigation Layer +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | home |pg dn |pg up | end | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | left | down | up | right| | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ + [_NAV] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Adjust Layer: Function keys, RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | | | | F11 | F12 | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR("Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case _NAV: + oled_write_P(PSTR("Nav\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } + else if (index == 1) { + // Page up/Page down + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } + return true; +} +#endif diff --git a/keyboards/splitkb/kyria/keymaps/ghidalgo93/rules.mk b/keyboards/splitkb/kyria/keymaps/ghidalgo93/rules.mk new file mode 100644 index 000000000..d5d64865b --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/ghidalgo93/rules.mk @@ -0,0 +1,5 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUTO_SHIFT_ENABLE = yes # Enable auto shift diff --git a/keyboards/kyria/keymaps/gotham/README.md b/keyboards/splitkb/kyria/keymaps/gotham/README.md similarity index 100% rename from keyboards/kyria/keymaps/gotham/README.md rename to keyboards/splitkb/kyria/keymaps/gotham/README.md diff --git a/keyboards/splitkb/kyria/keymaps/gotham/config.h b/keyboards/splitkb/kyria/keymaps/gotham/config.h new file mode 100644 index 000000000..1b0ba183d --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/gotham/config.h @@ -0,0 +1,48 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define EE_HANDS +#define IGNORE_MOD_TAP_INTERRUPT + +// Fix for Elite C rev3 +#define SPLIT_USB_DETECT +// Speed up slave half startup +#define SPLIT_USB_TIMEOUT 1000 + +#ifdef OLED_ENABLE +# define OLED_DISPLAY_128X64 +# define OLED_TIMEOUT 10000 +#endif + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_KNIGHT +#endif + +#ifdef ENCODER_ENABLE +# define ENCODER_DIRECTION_FLIP +# define ENCODER_RESOLUTION 2 +#endif + +#ifdef THUMBSTICK_ENABLE +# define THUMBSTICK_FLIP_X +# define THUMBSTICK_PIN_X F0 +# define THUMBSTICK_PIN_Y F1 +#endif diff --git a/keyboards/kyria/keymaps/gotham/encoder_utils.c b/keyboards/splitkb/kyria/keymaps/gotham/encoder_utils.c similarity index 100% rename from keyboards/kyria/keymaps/gotham/encoder_utils.c rename to keyboards/splitkb/kyria/keymaps/gotham/encoder_utils.c diff --git a/keyboards/kyria/keymaps/gotham/encoder_utils.h b/keyboards/splitkb/kyria/keymaps/gotham/encoder_utils.h similarity index 100% rename from keyboards/kyria/keymaps/gotham/encoder_utils.h rename to keyboards/splitkb/kyria/keymaps/gotham/encoder_utils.h diff --git a/keyboards/kyria/keymaps/gotham/keycodes.h b/keyboards/splitkb/kyria/keymaps/gotham/keycodes.h similarity index 100% rename from keyboards/kyria/keymaps/gotham/keycodes.h rename to keyboards/splitkb/kyria/keymaps/gotham/keycodes.h diff --git a/keyboards/splitkb/kyria/keymaps/gotham/keymap.c b/keyboards/splitkb/kyria/keymaps/gotham/keymap.c new file mode 100644 index 000000000..498e1c112 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/gotham/keymap.c @@ -0,0 +1,127 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + +#include "keycodes.h" + +#ifdef ENCODER_ENABLE +# include "encoder_utils.h" +#endif + +#ifdef OLED_ENABLE +# include "oled_utils.h" +#endif + +#ifdef THUMBSTICK_ENABLE +# include "thumbstick.h" +#endif + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY +*/ + [_QWERTY] = LAYOUT( + ESC_RAISE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BSLS_RAISE, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, SFT_QUOT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_NO, TMB_MODE, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, CTL_MINS, + ENC_MODE_L, KC_LALT, LT(_LOWER, KC_SPC), LT(_RAISE, KC_TAB), KC_LSFT, KC_EQL, LT(_RAISE, KC_ENT), LT(_LOWER, KC_BSPC), KC_DEL, ENC_MODE_R + ), +/* + * Lower Layer: Symbols, Navigation + */ + [_LOWER] = LAYOUT( + _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, KC_PIPE, + _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_GRV, KC_PGUP, KC_LEFT, KC_UP, KC_RGHT, _______, KC_QUOT, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_DOWN, KC_END, _______, KC_MINS, + _______, _______, _______, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, _______, _______, _______ + ), +/* + * Raise Layer: Number keys, media, more symbols + */ + [_RAISE] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_MINS, KC_PLUS, KC_ASTR, KC_SLSH, KC_PERC, _______, + _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_AMPR, KC_PIPE, KC_COMM, KC_DOT, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Adjust Layer: Function keys, RGB + */ + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; +// clang-format on + +void matrix_init_user(void) { +#ifdef ENCODER_ENABLE + encoder_utils_init(); +#endif +} + +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { +#ifdef ENCODER_ENABLE + case ENC_MODE_L: + if (record->event.pressed) { + cycle_encoder_mode(true, false); + } + break; + case ENC_MODE_R: + if (record->event.pressed) { + cycle_encoder_mode(false, false); + } + break; +#endif +#ifdef THUMBSTICK_ENABLE + case TMB_MODE: + if (record->event.pressed) { + thumbstick_mode_cycle(false); + } +#endif + } + return true; +} + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +void oled_task_user(void) { render_status(); } +#endif + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + encoder_action(get_encoder_mode(true), clockwise); +# ifdef OLED_ENABLE + oled_on(); +# endif + } else if (index == 1) { + encoder_action(get_encoder_mode(false), clockwise); +# ifdef OLED_ENABLE + oled_on(); +# endif + } + return true; +} +#endif diff --git a/keyboards/kyria/keymaps/gotham/oled_utils.c b/keyboards/splitkb/kyria/keymaps/gotham/oled_utils.c similarity index 100% rename from keyboards/kyria/keymaps/gotham/oled_utils.c rename to keyboards/splitkb/kyria/keymaps/gotham/oled_utils.c diff --git a/keyboards/kyria/keymaps/gotham/oled_utils.h b/keyboards/splitkb/kyria/keymaps/gotham/oled_utils.h similarity index 100% rename from keyboards/kyria/keymaps/gotham/oled_utils.h rename to keyboards/splitkb/kyria/keymaps/gotham/oled_utils.h diff --git a/keyboards/splitkb/kyria/keymaps/gotham/rules.mk b/keyboards/splitkb/kyria/keymaps/gotham/rules.mk new file mode 100644 index 000000000..81b7123ba --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/gotham/rules.mk @@ -0,0 +1,22 @@ +CONSOLE_ENABLE = yes # Console for debug +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MOUSEKEY_ENABLE = no # Mouse keys +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +THUMBSTICK_ENABLE = yes # Enables analog thumbstick code + +ifeq ($(strip $(ENCODER_ENABLE)), yes) + SRC += encoder_utils.c +endif + +ifeq ($(strip $(OLED_ENABLE)), yes) + SRC += oled_utils.c +endif + +ifeq ($(strip $(THUMBSTICK_ENABLE)), yes) + POINTING_DEVICE_ENABLE = yes + OPT_DEFS += -DTHUMBSTICK_ENABLE + SRC += analog.c + SRC += thumbstick.c +endif diff --git a/keyboards/kyria/keymaps/gotham/thumbstick.c b/keyboards/splitkb/kyria/keymaps/gotham/thumbstick.c similarity index 100% rename from keyboards/kyria/keymaps/gotham/thumbstick.c rename to keyboards/splitkb/kyria/keymaps/gotham/thumbstick.c diff --git a/keyboards/kyria/keymaps/gotham/thumbstick.h b/keyboards/splitkb/kyria/keymaps/gotham/thumbstick.h similarity index 100% rename from keyboards/kyria/keymaps/gotham/thumbstick.h rename to keyboards/splitkb/kyria/keymaps/gotham/thumbstick.h diff --git a/keyboards/splitkb/kyria/keymaps/j-inc/config.h b/keyboards/splitkb/kyria/keymaps/j-inc/config.h new file mode 100644 index 000000000..dc7d9610d --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/j-inc/config.h @@ -0,0 +1,45 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 + #define OLED_TIMEOUT 300000 +#endif + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +#define SPLIT_USB_DETECT +#define NO_USB_STARTUP_CHECK +#define SPLIT_USB_TIMEOUT 1000 + +#define MASTER_RIGHT +#define ENCODER_DIRECTION_FLIP + + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION +#define NO_ACTION_ONESHOT +#define OLED_FONT_END 127 + + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_LED_MAP {0,1,2,9,8,7,4,3,5,6,19,18,17,10,11,12,15,16,14,13} // Orients Kyria LEDs to a circle around both halves. + //#define RBGLIGHT_LED_MAP {9,8,6,7,5,3,2,4,1,0,10,12,13,11,14,16,17,15,18,19} // Orients Kyria LEDs for a left half-right half columnar progression. + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + //#define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_SLEEP +#endif diff --git a/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c b/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c new file mode 100644 index 000000000..6121dd0f8 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c @@ -0,0 +1,376 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include +bool is_alt_tab_active = false; +uint16_t alt_tab_timer = 0; + +char wpm_str[10]; + +enum layers { + _QWERTY, + _2WERTY, //pronounced "twerty," obviously + _LOWER, + _RAISE, + _ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * |RAIS/ESC| Q | W | E | R | T | | Y | U | I | O | P | BKSP | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * |Tab | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | CTRL | Z | X | C | V | B |Enter |Ctrl | |Ctrl |(2u) | N | M | , < | . > | / ? | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | TG(1)| Alt | Win | Shift| Back | | Enter| Space| Win | Alt |TG(3) | + * | | | | Lower| space| | Lower| Raise| | | | + * `----------------------------------' `----------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_LCTL, KC_RCTL, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + TG(1), KC_LALT, KC_LGUI, KC_LSFT, KC_BSPC, LT(3, KC_ENT), LT(2, KC_SPC), KC_RGUI, KC_RALT, TG(2) + ), +/* + * This layer exists to change encoder functions. + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_2WERTY] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Lower Layer: numpad and arrow + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | 7 | 8 | 9 | 0 | | PGUP | | UP | | | Del + | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | CAPS | | 4 | 5 | 6 | Tab | | PGDN | Left | Down | Right| | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | 1 | 2 | 3 | Ent | | | | | | | LBRC | RBRC | | |\ | += | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | Tab | Ent | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + _______, _______, KC_7, KC_8, KC_9, KC_0, KC_PGUP, _______, KC_UP, _______, _______, KC_DEL, + KC_CAPS, _______, KC_4, KC_5, KC_6, KC_TAB, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + KC_LSFT, KC_0, KC_1, KC_2, KC_3, KC_ENT, KC_TRNS, KC_TRNS, MO(4), _______, KC_LBRC, KC_RBRC, _______, _______, KC_BSLS, KC_EQL, + KC_TRNS, KC_TAB, KC_ENT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, _______, _______, _______ + ), +/* + * Raise Layer: F keys and media + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | F9 | F10 | F11 | F12 | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Prev | Play | Next | VolUp| | F5 | F6 | F7 | F8 | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | Mute | VolDn| | | | | | F1 | F2 | F3 | F4 | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_F5, KC_F6, KC_F7, KC_F8, _______, _______, + _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TRNS + ), +/* + * Adjust Layer: Function keys, RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | VAI | SAI | HUI | SPI | MOD | | | | | F11 | F12 | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | VID | SAD | HUD | SPD | RMOD | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + RGB_TOG, RGB_VAI, RGB_SAI, RGB_HUI, RGB_SPI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, + _______, RGB_VAD, RGB_SAD, RGB_HUD, RGB_SPD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_TRNS, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef OLED_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_status(void) { + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_P(PSTR("QWERTY"), false); + break; + case _2WERTY: + oled_write_P(PSTR("2WERTY"), false); + break; + case _LOWER: + oled_write_P(PSTR("Numpad"), false); + break; + case _RAISE: + oled_write_P(PSTR("F Keys"), false); + break; + case _ADJUST: + oled_write_P(PSTR("RGB "), false); + break; + default: + oled_write_P(PSTR("Undefined"), false); + } + + //Host Keyboard LED Status + led_t led_state = host_keyboard_led_state(); + oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); + oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); + oled_write_P(led_state.scroll_lock ? PSTR("SCRL") : PSTR(" "), false); +} + + +// WPM-responsive animation stuff here +#define IDLE_FRAMES 5 +#define IDLE_SPEED 40 // below this wpm value your animation will idle + +// #define PREP_FRAMES 1 // uncomment if >1 + +#define TAP_FRAMES 2 +#define TAP_SPEED 60 // above this wpm value typing animation to triggere + +#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 636 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 +uint8_t current_tap_frame = 0; + +// Images credit j-inc(/James Incandenza) and pixelbenny. Credit to obosob for initial animation approach. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 16, 8, 8, 4, 4, 4, 8, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,100,130, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 56, 4, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + }, + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 16, 8, 8, 4, 4, 4, 8, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,100,130, 2, 2, 2, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 56, 4, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + }, + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 8, 4, 2, 2, 4, 24, 96,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,194, 1, 1, 2, 2, 4, 4, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96, 96, 0,129,130,130,132, 8, 16, 32, 64,128, 0, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 25, 6, 0, 0, 0, 0, 0, 0, 0, 24, 24, 24, 27, 3, 0, 64,160, 34, 36, 20, 18, 18, 18, 11, 8, 8, 8, 8, 5, 5, 9, 9, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + }, + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + }, + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 4, 2, 2, 2, 4, 56, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28,226, 1, 1, 2, 2, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0,192,193,193,194, 4, 8, 16, 32, 64,128, 0, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 13, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 4, 4, 8, 8, 8, 8, 8, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2,129,128,128, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0, 0, 1,225, 26, 6, 9, 49, 53, 1,138,124, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 24, 6, 5,152,153,132,195,124, 65, 65, 64, 64, 32, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0,248,248,248,248, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2,129,128,128, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0, 0, 1, 1, 2, 4, 8, 16, 32, 67,135, 7, 1, 0,184,188,190,159, 95, 95, 79, 76, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 24, 6, 5,152,153,132, 67,124, 65, 65, 64, 64, 32, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 8, 8, 16, 16, 16, 16, 16, 17, 15, 1, 61,124,252,252,252,252,252, 60, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 63, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + }, + { + 0, 0,126,126, 24, 60,102, 66, 0, 12, 28,112,112, 28, 12, 0,116,116, 20, 20,124,104, 0,124,124, 0,112,120, 44, 36,124,124,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0,128, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 4, 2, 1, 1, 2, 12, 48, 64,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128, + 0, 0, 0, 0,192, 96, 48, 24, 12,132,198, 98, 35, 51, 17,145,113,241,113,145, 17, 51, 35, 98,198,132, 12, 24, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,225, 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 0, 48, 48, 0, 0, 1,225, 26, 6, 9, 49, 53, 1,138,124, 0, 0,128,128,128,128, 64, 64, 64, 64, 32, 32, 32, 32, 16, 16, 16, 16, 8, 8, 8, 8, 8,196, 4,196, 4,196, 2,194, 2,194, 1, 1, 1, 1, 0, 0, 0, + 0, 0,252, 15, 1, 0,248, 14, 31,109,140,148,148,164,166,249,224,255,224,249,166,164,148,148,140,109, 31, 14,248, 0, 1, 15,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,112, 12, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 64,160, 33, 34, 18, 17, 17, 17, 9, 8, 8, 8, 8, 4, 4, 4, 4, 4, 4, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,170,170,255,255,195,191,127, 3,127,191,195,255,255,170,170, 0, 0, 0, 0, + 0, 0, 31,120,192, 0, 15, 56,124,219,152, 20, 20, 18, 50,207, 3,255, 3,207, 50, 18, 20, 20,152,219,124, 56, 15, 0,192,120, 31, 16, 16, 16, 16, 8, 8, 8, 8, 8, 4, 4, 4, 4, 4, 2, 3,122,122,121,121,121,121, 57, 49, 2, 2, 4, 4, 8, 8, 8,136,136,135,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2,130,135, 31, 7,159, 7, 28, 7,159, 7,159, 7, 2,130, 0, 0, 0, 0, + 32, 16, 16, 16, 17, 11, 14, 12, 24, 16, 49, 35, 98,102, 68, 68, 71, 71, 71, 68, 68,102, 98, 35, 49, 16, 24, 12, 6, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,120,124,254,255, 63, 7, 0, 0, 0, 0,255,255,127,127, 63, 62, 28, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 8, 8, 23, 0, 15, 1, 2, 1, 15, 0, 15, 2, 5, 8 + }, + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + if(get_current_wpm() <=IDLE_SPEED){ + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + if(get_current_wpm() >IDLE_SPEED && get_current_wpm() 1 + oled_write_raw_P(prep[0], ANIM_SIZE); // remove if IDLE_FRAMES >1 + } + if(get_current_wpm() >=TAP_SPEED){ + current_tap_frame = (current_tap_frame + 1) % TAP_FRAMES; + oled_write_raw_P(tap[abs((TAP_FRAMES-1)-current_tap_frame)], ANIM_SIZE); + } + } + if(get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } else { + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} + +// static void render_skull(void) { // Helen Tseong (http://shewolfe.co/), the original artist behind the skull, sadly only allowing use of the skull for my personal use. Her (excellent) works are copyright her, and I claim no ownership. Reach out to her for permission! +// static const char PROGMEM skull[] = { +// }; +// oled_write_raw_P(skull, 801); +// } + +void oled_task_user(void) { + if (is_keyboard_master()) { + //render_skull(); + //oled_set_cursor(7,6); + render_status(); + // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_anim(); + oled_set_cursor(0,6); + uint8_t n = get_current_wpm(); + wpm_str[3] = '\0'; + wpm_str[2] = '0' + n % 10; + wpm_str[1] = '0' + (n /= 10) % 10; + wpm_str[0] = '0' + n / 10 ; + oled_write_P(PSTR(" WPM: "), false); + oled_write(wpm_str, false); + + } +} +#endif + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + switch(biton32(layer_state)){ + case 1: + if (clockwise) { + tap_code16(C(KC_TAB)); + } else { + tap_code16(S(C(KC_TAB))); + } + break; + default: + if (clockwise) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + tap_code16(KC_TAB); + } else { + tap_code16(S(KC_TAB)); + } + break; + } + return true; +} + +void matrix_scan_user(void) { + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1250) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } + } +} + +#endif diff --git a/keyboards/splitkb/kyria/keymaps/j-inc/rules.mk b/keyboards/splitkb/kyria/keymaps/j-inc/rules.mk new file mode 100644 index 000000000..000c99502 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/j-inc/rules.mk @@ -0,0 +1,19 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGBLIGHT_ANIMATIONS = yes +WPM_ENABLE = yes +MOUSEKEY_ENABLE = no + +TAP_DANCE_ENABLE = no +STENO_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +TERMINAL_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no +SPACE_CADET_ENABLE = no +KEY_LOCK_ENABLE = no +AUDIO_ENABLE = no +CONSOLE_ENABLE = no +VELOCIKEY_ENABLE = no diff --git a/keyboards/splitkb/kyria/keymaps/jhelvy/config.h b/keyboards/splitkb/kyria/keymaps/jhelvy/config.h new file mode 100644 index 000000000..86f3d5b5c --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/jhelvy/config.h @@ -0,0 +1,33 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#define ENCODER_RESOLUTION 2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 +#define AUTO_SHIFT_TIMEOUT 150 + +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_MAX_SPEED 2 +#define MOUSEKEY_WHEEL_MAX_SPEED 42 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 15 diff --git a/keyboards/splitkb/kyria/keymaps/jhelvy/keymap.c b/keyboards/splitkb/kyria/keymaps/jhelvy/keymap.c new file mode 100644 index 000000000..a9c8db28d --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/jhelvy/keymap.c @@ -0,0 +1,202 @@ +#include QMK_KEYBOARD_H + +enum layers { + QWERTY = 0, + HOTKEYS, + TEXT, + SELECT, + NUMBERS, +}; + +enum custom_keycodes { + SIG_PROF = SAFE_RANGE, + SIG_JOHN, + R_PIPE, + R_ASSIGN, + R_COLS, + R_IN, + TEX, + E_GMAIL, + E_GWU, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[QWERTY] = LAYOUT(LALT(KC_A), 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_QUOT, KC_ENT, KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_NO, KC_NO, KC_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_LALT, KC_LCTL, KC_LGUI, MO(2), MO(4), KC_BSPC, KC_SPC, MO(1), KC_PGDN, TG(1)), + +[HOTKEYS] = LAYOUT(KC_F6, LGUI(LALT(KC_1)), LGUI(LALT(KC_2)), LCTL(KC_U), SGUI(KC_R), KC_F2, SGUI(KC_K), LCTL(KC_9), LCTL(KC_0), KC_F14, KC_F11, KC_F15, KC_F7, LGUI(LCTL(KC_A)), KC_F10, KC_LBRC, KC_RBRC, KC_F9, SIG_JOHN, LSFT(KC_TAB), KC_TAB, E_GMAIL, KC_F12, KC_F16, KC_F8, KC_ASTG, KC_NO, KC_LCBR, KC_RCBR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, SIG_PROF, KC_F3, KC_F4, E_GWU, KC_F13, KC_F17, KC_F5, KC_NO, KC_LGUI, KC_LGUI, KC_LCTL, KC_BSPC, KC_SPC, KC_TRNS, KC_NO, KC_TRNS), + +[TEXT] = LAYOUT(LGUI(KC_BSPC), LGUI(KC_Q), LGUI(KC_W), KC_ESC, LGUI(KC_R), LGUI(KC_T), LCTL(KC_Y), LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), KC_SCLN, R_PIPE, KC_BSPC, MO(3), LGUI(KC_S), LGUI(KC_C), LGUI(KC_V), LGUI(KC_X), KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_GRV, KC_ENT, KC_F18, LGUI(KC_A), LGUI(KC_D), KC_F1, LGUI(KC_Z), LGUI(KC_Y), KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC, LGUI(KC_F), SGUI(KC_G), LGUI(KC_G), KC_BSLS, R_ASSIGN, KC_LALT, KC_LCTL, KC_LGUI, KC_TRNS, KC_NO, KC_BSPC, KC_SPC, KC_LGUI, KC_PGUP, KC_NO), + +[SELECT] = LAYOUT(KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, SGUI(KC_LEFT), LSFT(KC_UP), SGUI(KC_RGHT), KC_NO, R_COLS, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LSFT(KC_LEFT), LSFT(KC_DOWN), LSFT(KC_RGHT), KC_NO, R_IN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LALT(LSFT(KC_LEFT)), LALT(LSFT(KC_RIGHT)), KC_NO, TEX, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BSPC, KC_SPC, KC_LGUI, KC_NO, KC_NO), + +[NUMBERS] = LAYOUT(KC_NO, LGUI(KC_1), LGUI(KC_2), LGUI(KC_3), LGUI(KC_4), LGUI(KC_5), KC_EQL, KC_7, KC_8, KC_9, KC_TILD, KC_MINS, KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PLUS, KC_4, KC_5, KC_6, KC_COLN, KC_ENT, KC_LSPO, KC_NO, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_NO, KC_NO, KC_NO, KC_NO, KC_MINS, KC_1, KC_2, KC_3, KC_SLSH, KC_PIPE, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_BSPC, KC_SPC, KC_0, KC_DOT, KC_COMM) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SIG_PROF: + if (record->event.pressed) { + SEND_STRING("Cheers,\nProfessor Helveston"); + } else { + } + break; + + case SIG_JOHN: + if (record->event.pressed) { + SEND_STRING("Cheers,\nJohn"); + } else { + } + break; + + case R_PIPE: + if (record->event.pressed) { + SEND_STRING(" %>% "); + } else { + } + break; + + case R_ASSIGN: + if (record->event.pressed) { + SEND_STRING(" <- "); + } else { + } + break; + + case R_COLS: + if (record->event.pressed) { + SEND_STRING(".leftcol[\n]\n.rightcol[\n]\n"); + } else { + } + break; + + case R_IN: + if (record->event.pressed) { + SEND_STRING(" %in% "); + } else { + } + break; + + case TEX: + if (record->event.pressed) { + SEND_STRING("\\text{}"); + } else { + } + break; + + case E_GMAIL: + if (record->event.pressed) { + SEND_STRING("john.helveston@gmail.com"); + } else { + } + break; + + case E_GWU: + if (record->event.pressed) { + SEND_STRING("jph@gwu.edu"); + } else { + } + break; + + } + + return true; +}; + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR(" Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case QWERTY: + oled_write_P(PSTR("QWERTY\n"), false); + break; + case HOTKEYS: + oled_write_P(PSTR("HOTKEYS\n"), false); + break; + case TEXT: + oled_write_P(PSTR("TEXT\n"), false); + break; + case SELECT: + oled_write_P(PSTR("SELECT\n"), false); + break; + case NUMBERS: + oled_write_P(PSTR("NUMBERS\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (IS_LAYER_ON(HOTKEYS)) { + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + } else if (IS_LAYER_ON(TEXT)) { + if (clockwise) { + tap_code(KC_MS_WH_LEFT); + } else { + tap_code(KC_MS_WH_RIGHT); + } + } else if (IS_LAYER_ON(NUMBERS)) { + if (clockwise) { + tap_code16(G(KC_MINS)); + } else { + register_code(KC_LGUI); + tap_code(KC_EQL); + unregister_code(KC_LGUI); + } + } else { + if (clockwise) { + tap_code(KC_MS_WH_UP); + } else { + tap_code(KC_MS_WH_DOWN); + } + } + return true; +} diff --git a/keyboards/splitkb/kyria/keymaps/jhelvy/rules.mk b/keyboards/splitkb/kyria/keymaps/jhelvy/rules.mk new file mode 100644 index 000000000..a987a4ded --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/jhelvy/rules.mk @@ -0,0 +1,9 @@ +AUTO_SHIFT_ENABLE = yes # Autoshift by holding down a key +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +LEADER_ENABLE = no # Enable the Leader Key feature +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +BACKLIGHT_ENABLE = no diff --git a/keyboards/splitkb/kyria/keymaps/kejadlen/config.h b/keyboards/splitkb/kyria/keymaps/kejadlen/config.h new file mode 100644 index 000000000..673bcc778 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/kejadlen/config.h @@ -0,0 +1,47 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP +#endif + +// EC11K encoders have a different resolution than other EC11 encoders. +// When using the default resolution of 4, if you notice your encoder skipping +// every other tick, lower the resolution to 2. +#define ENCODER_RESOLUTION 2 + +// The Leader key allows to flexibly assign macros to key sequences. +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 350 + +#define TAPPING_TERM 200 + +// Allows to use either side as the master. Look at the documentation for info: +// https://docs.qmk.fm/#/config_options?id=setting-handedness +#define EE_HANDS + +// Allows media codes to properly register in macros and rotary encoder code +#define TAP_CODE_DELAY 10 diff --git a/keyboards/kyria/keymaps/kejadlen/keymap.c b/keyboards/splitkb/kyria/keymaps/kejadlen/keymap.c similarity index 100% rename from keyboards/kyria/keymaps/kejadlen/keymap.c rename to keyboards/splitkb/kyria/keymaps/kejadlen/keymap.c diff --git a/keyboards/splitkb/kyria/keymaps/kejadlen/rules.mk b/keyboards/splitkb/kyria/keymaps/kejadlen/rules.mk new file mode 100644 index 000000000..e11b7e936 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/kejadlen/rules.mk @@ -0,0 +1,5 @@ +OLED_ENABLE = no # Enables the use of OLED displays +ENCODER_ENABLE = no # Enables the use of one or more encoders +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +LEADER_ENABLE = no # Enable the Leader Key feature +MOUSEKEY_ENABLE = no diff --git a/keyboards/kyria/keymaps/manna-harbour_miryoku/config.h b/keyboards/splitkb/kyria/keymaps/manna-harbour_miryoku/config.h similarity index 100% rename from keyboards/kyria/keymaps/manna-harbour_miryoku/config.h rename to keyboards/splitkb/kyria/keymaps/manna-harbour_miryoku/config.h diff --git a/keyboards/kyria/keymaps/manna-harbour_miryoku/keymap.c b/keyboards/splitkb/kyria/keymaps/manna-harbour_miryoku/keymap.c similarity index 100% rename from keyboards/kyria/keymaps/manna-harbour_miryoku/keymap.c rename to keyboards/splitkb/kyria/keymaps/manna-harbour_miryoku/keymap.c diff --git a/keyboards/splitkb/kyria/keymaps/mattir/config.h b/keyboards/splitkb/kyria/keymaps/mattir/config.h new file mode 100644 index 000000000..b65ceee40 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/mattir/config.h @@ -0,0 +1,55 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE +# define OLED_DISPLAY_128X64 +# define OLED_TIMEOUT 300000 +# define OLED_UPDATE_INTERVAL 30 +#endif + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_LIMIT_VAL 150 +# define RGBLIGHT_ANIMATIONS +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_SLEEP +#endif + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +//#define SPLIT_USB_DETECT +//#define NO_USB_STARTUP_CHECK + +// Set the layer toggle to only need 2 clicks instead of 5 +#define TAPPING_TOGGLE 2 + +// EC11K encoders have a different resolution than other EC11 encoders. +#define ENCODER_RESOLUTION 2 + +// The Leader key allows to flexibly assign macros to key sequences. +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 350 + +#define TAPPING_TERM 200 + +// Allows to use either side as the master. Look at the documentation for info: +// https://docs.qmk.fm/#/config_options?id=setting-handedness +#define EE_HANDS + +// Allows media codes to properly register in macros and rotary encoder code +#define TAP_CODE_DELAY 10 diff --git a/keyboards/splitkb/kyria/keymaps/mattir/keymap.c b/keyboards/splitkb/kyria/keymaps/mattir/keymap.c new file mode 100644 index 000000000..89efaec55 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/mattir/keymap.c @@ -0,0 +1,292 @@ +/* Copyright 2020 Matthew Gilbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layers { + QWERTY = 0, + LOWER, + RAISE, + FUNCS, + RGBLED +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LEAD, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, XXXXXXX, XXXXXXX, KC_MINS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, + KC_MUTE, KC_LCTL, KC_LGUI, TT(RAISE), SFT_T(KC_SPC), SFT_T(KC_SPC), TT(LOWER), KC_BSPC, KC_LALT, TG(RGBLED) + ), + [LOWER] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, + _______, KC_DLR, KC_PERC, KC_CIRC, KC_LPRN, KC_RPRN, KC_EQL, KC_PLUS, KC_MINS, KC_ASTR, KC_SLSH, _______, + TG(FUNCS), KC_AMPR, _______, _______, KC_LBRC, KC_RBRC, _______, XXXXXXX, XXXXXXX, _______, _______, _______, KC_COMM, KC_DOT, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [RAISE] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______, XXXXXXX, XXXXXXX, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______ + ), + [FUNCS] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PAST, _______, + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PMNS, KC_P4, KC_P5, KC_P6, KC_PSLS, _______, + TG(FUNCS), KC_F11, KC_F12, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PEQL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [RGBLED] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_VAI, RGB_HUI, RGB_SAI, RGB_MOD, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_VAD, RGB_HUD, RGB_SAD, RGB_RMOD, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, TG(RGBLED) + ), +}; + +bool is_cmd_tab_active = false; +uint16_t cmd_tab_timer = 0; + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + if (is_cmd_tab_active) { + if (timer_elapsed(cmd_tab_timer) > 1000) { + unregister_code(KC_LGUI); + is_cmd_tab_active = false; + } + } + + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_A) { + tap_code16(SGUI(KC_L)); + } + SEQ_TWO_KEYS(KC_S, KC_S) { + tap_code16(SGUI(KC_5)); + } + } +} + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_mattir_logo(void) { + static const char PROGMEM mattir_logo[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x3c, 0xfc, 0xf8, 0xe0, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xe0, 0xc0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x83, 0x07, + 0x1f, 0x7e, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xfe, 0x3f, 0x1f, 0x7f, 0xff, + 0xfc, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0xf8, 0x1c, 0x0f, 0x07, 0x00, + 0x00, 0x00, 0x01, 0x07, 0x1f, 0x7e, 0xf8, 0xe0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xfc, 0x7f, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x0f, + 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x80, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xfe, 0xff, 0x3f, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x1f, 0x7f, 0xfc, 0xf0, 0xc0, 0x00, 0x00, 0x80, + 0xe0, 0xf8, 0xfe, 0x3f, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x3f, 0xff, 0xfe, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, + 0xfe, 0xff, 0x7f, 0xfc, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xfc, 0x7f, 0xff, 0xff, 0xe0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xe0, 0xe0, 0xe0, + 0x00, 0x00, 0xe0, 0xfe, 0xfe, 0xfe, 0xe0, 0xe0, 0x00, 0xe0, 0xfe, 0xfe, 0xfe, 0xe0, 0x60, 0x00, + 0xe3, 0xe3, 0xe3, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xc0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xf8, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x1f, 0x3f, 0x7f, 0x1f, + 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x07, 0xff, 0xff, 0xf8, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, + 0xff, 0x07, 0x00, 0x01, 0x07, 0x1f, 0x7f, 0xf8, 0xfe, 0x3f, 0x07, 0x01, 0x00, 0x03, 0xff, 0xff, + 0xfc, 0x00, 0x00, 0x00, 0x1e, 0x7f, 0xff, 0xe1, 0xc0, 0xc0, 0xc0, 0xc0, 0xe1, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0xfc, 0xff, 0x7f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0xfe, 0xff, 0xff, 0x1f, 0x7f, 0xfe, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xfc, 0x7f, 0x1f, 0xff, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, + 0xff, 0x3f, 0x00, 0x00, 0x00, 0x01, 0x03, 0x0f, 0x3f, 0xff, 0xfc, 0xf0, 0xc0, 0x80, 0x00, 0xc0, + 0xf0, 0xfc, 0xfe, 0x3f, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xff, 0xf0, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x78, 0xff, 0xef, 0xcf, 0xce, 0xfc, 0x7c, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x38, 0x3f, 0x3f, 0x3f, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x3c, 0x3f, 0x3f, + 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x1f, 0x3f, 0x3f, 0x1f, + 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x3f, 0x3f, 0x3c, 0x38, + 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x39, 0x39, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x30, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + oled_write_raw_P(mattir_logo, sizeof(mattir_logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0 + }; + oled_write_P(qmk_logo, false); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR("Matt's Kyria\n\n"), false); + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case FUNCS: + oled_write_P(PSTR("F-keys\n"), false); + break; + case RGBLED: + oled_write_P(PSTR("Underglow\n"), false); + break; + default: + oled_write_P(PSTR("No idea dog\n"), false); + } +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard layer + } else { + render_mattir_logo(); + } +} +#endif + +// Layer-specific encoder knob functions +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { // left knob + switch (get_highest_layer(layer_state)) { + case QWERTY: // Volume + if (clockwise) { + tap_code(KC_VOLD); + } else { + tap_code(KC_VOLU); + } + break; + case LOWER: // Desktop switching + if (clockwise) { + tap_code16(C(KC_RIGHT)); + } else { + tap_code16(C(KC_LEFT)); + } + break; + case RAISE: // Mousewheel L/R + if (clockwise) { + tap_code(KC_WH_L); + } else { + tap_code(KC_WH_R); + } + break; + case RGBLED: // Underglow color + if (clockwise) { + rgblight_increase_hue(); + } else { + rgblight_decrease_hue(); + } + break; + default: // No action + if (clockwise) { + tap_code(KC_NO); + } else { + tap_code(KC_NO); + } + break; + } + } else if (index == 1) { // right knob + switch (get_highest_layer(layer_state)) { + case QWERTY: // Undo / Redo + if (clockwise) { + tap_code16(LGUI(KC_Z)); + } else { + tap_code16(SGUI(KC_Z)); + } + break; + case LOWER: // App switching + if (clockwise) { + if (!is_cmd_tab_active) { + is_cmd_tab_active = true; + register_code(KC_LGUI); + } + cmd_tab_timer = timer_read(); + tap_code16(KC_TAB); + } else { + tap_code16(S(KC_TAB)); + } + break; + case RAISE: // Mouse wheel U/D + if (clockwise) { + tap_code(KC_WH_U); + } else { + tap_code(KC_WH_D); + } + break; + case RGBLED: // Underglow brightness + if (clockwise) { + rgblight_increase_val(); + } else { + rgblight_decrease_val(); + } + break; + default: // No action + if (clockwise) { + tap_code(KC_NO); + } else { + tap_code(KC_NO); + } + break; + } + } + return true; +} +#endif diff --git a/keyboards/kyria/keymaps/mattir/readme.md b/keyboards/splitkb/kyria/keymaps/mattir/readme.md similarity index 100% rename from keyboards/kyria/keymaps/mattir/readme.md rename to keyboards/splitkb/kyria/keymaps/mattir/readme.md diff --git a/keyboards/splitkb/kyria/keymaps/mattir/rules.mk b/keyboards/splitkb/kyria/keymaps/mattir/rules.mk new file mode 100644 index 000000000..9d1a91831 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/mattir/rules.mk @@ -0,0 +1,5 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +LEADER_ENABLE = yes # Enables the use of the leader key diff --git a/keyboards/kyria/keymaps/mattir2/config.h b/keyboards/splitkb/kyria/keymaps/mattir2/config.h similarity index 100% rename from keyboards/kyria/keymaps/mattir2/config.h rename to keyboards/splitkb/kyria/keymaps/mattir2/config.h diff --git a/keyboards/kyria/keymaps/mattir2/keymap.c b/keyboards/splitkb/kyria/keymaps/mattir2/keymap.c similarity index 100% rename from keyboards/kyria/keymaps/mattir2/keymap.c rename to keyboards/splitkb/kyria/keymaps/mattir2/keymap.c diff --git a/keyboards/kyria/keymaps/mattir2/readme.md b/keyboards/splitkb/kyria/keymaps/mattir2/readme.md similarity index 100% rename from keyboards/kyria/keymaps/mattir2/readme.md rename to keyboards/splitkb/kyria/keymaps/mattir2/readme.md diff --git a/keyboards/splitkb/kyria/keymaps/mattir2/rules.mk b/keyboards/splitkb/kyria/keymaps/mattir2/rules.mk new file mode 100644 index 000000000..d51a30bfe --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/mattir2/rules.mk @@ -0,0 +1,4 @@ +OLED_ENABLE = no # Enables the use of OLED displays +ENCODER_ENABLE = no # Enables the use of one or more encoders +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +LEADER_ENABLE = yes # Enables the use of the leader key diff --git a/keyboards/kyria/keymaps/ninjonas/README.md b/keyboards/splitkb/kyria/keymaps/ninjonas/README.md similarity index 100% rename from keyboards/kyria/keymaps/ninjonas/README.md rename to keyboards/splitkb/kyria/keymaps/ninjonas/README.md diff --git a/keyboards/splitkb/kyria/keymaps/ninjonas/config.h b/keyboards/splitkb/kyria/keymaps/ninjonas/config.h new file mode 100644 index 000000000..11525a577 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/ninjonas/config.h @@ -0,0 +1,37 @@ +/* Copyright 2020 ninjonas + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define TAPPING_TERM 200 + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 + #define OLED_TIMEOUT 15000 +#endif + +#ifdef RGBLIGHT_ENABLE +# define RGBLIGHT_SLEEP +# define RGBLIGHT_LIMIT_VAL 200 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_SPLIT +#endif + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +#define SPLIT_USB_DETECT +#define SPLIT_USB_TIMEOUT 1000 diff --git a/keyboards/kyria/keymaps/ninjonas/keymap.c b/keyboards/splitkb/kyria/keymaps/ninjonas/keymap.c similarity index 100% rename from keyboards/kyria/keymaps/ninjonas/keymap.c rename to keyboards/splitkb/kyria/keymaps/ninjonas/keymap.c diff --git a/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c b/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c new file mode 100644 index 000000000..216f47534 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c @@ -0,0 +1,209 @@ +/* Copyright 2020 ninjonas + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "ninjonas.h" + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +static void render_logo(void) { + static const char PROGMEM logo[] = { + // Converter: https://javl.github.io/image2cpp/ + // Image Dimensions: 128x64 + // Code Output Format: Plain Bytes + // Draw Mode: Vertical, 1 bit per pixel +0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x00, 0x00, 0xe0, +0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x80, 0xe0, 0xe0, 0xe0, 0xe0, 0x80, 0x00, 0x00, 0xe0, 0xe0, 0xe0, +0xe0, 0x00, 0x60, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, 0xe0, 0x80, 0x00, 0x00, +0xc0, 0xe0, 0xe0, 0xe0, 0x20, 0x60, 0xe0, 0xe0, 0xe0, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0xe0, 0xe0, +0xe0, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0xc0, 0x00, 0x00, 0x00, +0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0xe0, 0xe0, 0xfc, 0xfe, +0xfe, 0xfe, 0xee, 0xee, 0x0e, 0x80, 0xc0, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, +0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, 0x80, 0x00, 0x00, +0x00, 0x00, 0x79, 0xfd, 0xfd, 0xfd, 0xec, 0xee, 0x76, 0x7f, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, +0x07, 0x3f, 0xff, 0xfc, 0xf8, 0xff, 0x7f, 0x07, 0x0f, 0x7f, 0xff, 0xf8, 0xfc, 0xff, 0x3f, 0x07, +0x00, 0x00, 0x00, 0x03, 0x1f, 0xff, 0xfe, 0xf0, 0xff, 0x7f, 0x0f, 0x07, 0x3f, 0xff, 0xfc, 0xf8, +0xff, 0x7f, 0x0f, 0x01, 0x00, 0x00, 0x01, 0x0f, 0x3f, 0xff, 0xfe, 0xf8, 0xff, 0xff, 0x1f, 0x03, +0x00, 0x00, 0x1f, 0x7f, 0x7f, 0xff, 0xf6, 0xe6, 0xe6, 0xf7, 0xf7, 0x77, 0x37, 0x17, 0x00, 0x30, +0x79, 0xfd, 0xfd, 0xfd, 0xee, 0xee, 0x76, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, +0xff, 0xff, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0x7f, 0xff, 0xf1, 0xe0, 0xe0, 0xff, 0xff, 0x7f, 0x3f, +0x0e, 0x00, 0x0e, 0x3f, 0x7f, 0xff, 0xff, 0xe0, 0xe0, 0xe1, 0xff, 0x7f, 0x7f, 0x3f, 0x04, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, +0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x0e, 0x0e, 0x0f, 0x0f, 0x07, 0x03, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x0c, 0x3c, 0xfc, 0xfc, 0xfc, 0xc0, 0x00, 0xe0, 0xfc, 0xfc, 0x7c, 0x1c, 0x00, 0xf0, 0xf8, +0xf8, 0xfc, 0xdc, 0xdc, 0xdc, 0xfc, 0xfc, 0xf8, 0xf0, 0xe0, 0x00, 0x00, 0x30, 0xb8, 0xbc, 0xbc, +0xdc, 0xdc, 0xdc, 0xfc, 0xfc, 0xf8, 0xf0, 0x00, 0x1c, 0x1c, 0xff, 0xff, 0xff, 0xff, 0x1d, 0x1d, +0x00, 0xf0, 0xf8, 0xf8, 0xfc, 0x3c, 0x1c, 0x1c, 0xfc, 0xfc, 0xf8, 0xf0, 0xc0, 0x00, 0xe0, 0xf0, +0xf8, 0xfc, 0x3c, 0x1c, 0x1c, 0x3c, 0xfc, 0xf8, 0xf8, 0xe0, 0x00, 0x00, 0x20, 0xb8, 0xbc, 0xbc, +0xbc, 0xdc, 0xdc, 0xfc, 0xfc, 0xfc, 0xf8, 0xe0, 0x00, 0x0c, 0x7c, 0xfc, 0xfc, 0xc0, 0x00, 0xe0, +0xfc, 0xfc, 0xfc, 0xfc, 0xf0, 0x80, 0x00, 0xf8, 0xfc, 0xfc, 0x3c, 0x04, 0x0c, 0x7c, 0xfc, 0xfc, +0xf0, 0x00, 0xc0, 0xfc, 0xfc, 0x7c, 0xfc, 0xf8, 0xc0, 0x00, 0xf0, 0xfc, 0xfc, 0x7c, 0x0c, 0x00, +0x00, 0x00, 0xc0, 0xc1, 0xc7, 0xff, 0xff, 0xff, 0x7f, 0x1f, 0x03, 0x00, 0x00, 0x00, 0x07, 0x0f, +0x1f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1e, 0x1e, 0x0e, 0x06, 0x00, 0x00, 0x06, 0x0f, 0x1f, 0x1f, 0x1f, +0x1d, 0x1d, 0x0e, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, +0x00, 0x07, 0x0f, 0x0f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x00, 0x03, 0x07, +0x0f, 0x1f, 0x1e, 0x1c, 0x1c, 0x1e, 0x1f, 0x0f, 0x0f, 0x03, 0x00, 0x00, 0x0f, 0x1f, 0x1f, 0x1f, +0x1d, 0x1d, 0x0c, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x03, 0x1f, 0x1f, 0x1e, 0x1f, +0x0f, 0x01, 0x00, 0x07, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0f, +0x1f, 0x1e, 0x1f, 0x1f, 0x03, 0x00, 0x03, 0x1f, 0x1f, 0x1e, 0x1f, 0x0f, 0x01, 0x00, 0x00, 0x00, +0x00, 0x80, 0xc1, 0xf1, 0xf9, 0xf9, 0xf9, 0xb8, 0xb8, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, +0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, +0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, +0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, +0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, +0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x03, 0x7c, 0xfe, 0xff, 0xff, 0xc7, 0x83, 0x83, +0xc7, 0xff, 0xff, 0xff, 0x7c, 0x00, 0x00, 0x7c, 0xff, 0xff, 0xff, 0xc7, 0x83, 0x83, 0xc7, 0xff, +0xff, 0xfe, 0x7c, 0x00, 0xc0, 0xe6, 0xf7, 0xf7, 0xf7, 0xbb, 0xbb, 0xdb, 0xff, 0xff, 0xff, 0xfe, +0x00, 0x00, 0x03, 0x1f, 0xff, 0xff, 0xf0, 0xe0, 0xfe, 0xff, 0x1f, 0x3f, 0xff, 0xfe, 0xe0, 0xf0, +0xff, 0xff, 0x1f, 0x03, 0x00, 0x01, 0x0f, 0x7f, 0xff, 0xf8, 0xc0, 0xfc, 0xff, 0x3f, 0x1f, 0xff, +0xfe, 0xf0, 0xe0, 0xff, 0xff, 0x3f, 0x07, 0x00, 0x01, 0x07, 0x3f, 0xff, 0xff, 0xf8, 0xe0, 0xfc, +0xff, 0x7f, 0x0f, 0x03, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xdb, 0x9b, 0x9b, 0xdf, 0xdf, 0xdf, 0xde, +0x1c, 0x00, 0xc0, 0xe6, 0xf7, 0xf7, 0xf7, 0xbb, 0xbb, 0xdb, 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, +0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, +0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, +0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, +0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, +0x03, 0x03, 0x03, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x38, 0x38, 0x38, 0x3f, 0x3f, 0x1f, 0x0f, +0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x00, +0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00 + }; + oled_write_raw_P(logo, sizeof(logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +void oled_white_space(void){ + oled_write_P(PSTR(" "), false); +} + +void oled_slash_separator(void){ + oled_write_P(PSTR(" / "), false); +} + +void render_layout_state(void) { + oled_write_P(PSTR("Layout: "), false); + switch (biton32(default_layer_state)) { + case _COLEMAK: + oled_write_P(PSTR("Colemak"), false); + break; + case _DVORAK: + oled_write_P(PSTR("Dvorak"), false); + break; + case _QWERTY: + oled_write_P(PSTR("Qwerty"), false); + break; + default: + oled_write_ln_P(PSTR("Undefined"), false); + } +} +#ifdef ENCODER_ENABLE +static void render_encoder_state(void) { + oled_write_P(PSTR("\nEnc: "), false); + bool lower = layer_state_is(_LOWER) & !layer_state_is(_ADJUST); + bool raise = layer_state_is(_RAISE) & !layer_state_is(_ADJUST); + bool adjust = layer_state_is(_ADJUST); + + if(lower){ + oled_write_P(PSTR("APPSW"), left_encoder_rotated); + oled_slash_separator(); + oled_write_P(PSTR("UPDN"), right_encoder_rotated); + } else if(raise){ + oled_write_P(PSTR("PGUD"), left_encoder_rotated); + oled_slash_separator(); + oled_write_P(PSTR("TABSW"), right_encoder_rotated); + } else if(adjust){ + oled_write_P(PSTR("RHUE"), left_encoder_rotated); + oled_slash_separator(); + oled_write_P(PSTR("RBRI"), right_encoder_rotated); + } else { + oled_write_P(PSTR("BRI"), left_encoder_rotated); + oled_slash_separator(); + oled_write_P(PSTR("VOL"), right_encoder_rotated); + } + + if (timer_elapsed(encoder_rotated_timer) > 200) { + left_encoder_rotated = false; + right_encoder_rotated = false; + } +} +#endif + +static void render_layer_state(void) { + oled_write_P(PSTR("\nLayer:"), false); + bool lower = layer_state_is(_LOWER) & !layer_state_is(_ADJUST); + bool raise = layer_state_is(_RAISE) & !layer_state_is(_ADJUST); + bool adjust = layer_state_is(_ADJUST); + bool numpad = layer_state_is(_NUMPAD); + + if(lower){ + oled_write_P(PSTR(" Lower "), true); + } else if(raise){ + oled_write_P(PSTR(" Raise "), true); + } else if(adjust){ + oled_write_P(PSTR(" Adjust "), true); + } else if(numpad) { + oled_write_P(PSTR(" Numpad "), true); + } else { + oled_write_P(PSTR(" Default"), false); + } +} + +void render_mod_state(uint8_t modifiers) { + oled_write_P(PSTR("\nMods: "), false); + oled_write_P(PSTR("SHF"), (modifiers & MOD_MASK_SHIFT)); + oled_white_space(); + oled_write_P(PSTR("CTL"), (modifiers & MOD_MASK_CTRL)); + oled_white_space(); + oled_write_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT)); + oled_white_space(); + oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); +} + +static void render_status(void) { + render_qmk_logo(); + render_layout_state(); + #ifdef ENCODER_ENABLE + render_encoder_state(); + #endif + render_layer_state(); + render_mod_state(get_mods()|get_oneshot_mods()); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); + } else { + render_logo(); + oled_scroll_left(); + } +} +#endif diff --git a/keyboards/splitkb/kyria/keymaps/ninjonas/rules.mk b/keyboards/splitkb/kyria/keymaps/ninjonas/rules.mk new file mode 100644 index 000000000..1931861ca --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/ninjonas/rules.mk @@ -0,0 +1,7 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +LTO_ENABLE = yes + +SRC += oled.c diff --git a/keyboards/splitkb/kyria/keymaps/pierrec83/config.h b/keyboards/splitkb/kyria/keymaps/pierrec83/config.h new file mode 100644 index 000000000..8bd27105e --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/pierrec83/config.h @@ -0,0 +1,65 @@ +/* Copyright 2020 Pierre Chevalier + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +#ifdef ENCODER_ENABLE + #define ENCODER_DIRECTION_FLIP + #define ENCODER_RESOLUTION 2 +#endif + +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_FORCE_HOLD +// Allows to use either side as the master. Look at the documentation for info: +// https://docs.qmk.fm/#/config_options?id=setting-handedness +#define EE_HANDS + +// Allows media codes to properly register in macros and rotary encoder code +#define TAP_CODE_DELAY 10 + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK + +// Set the mouse settings to a comfortable speed/accuracy trade-off +// Assume the screen refresh rate is 60 Htz or higher +// The default is 50. This makes the mouse ~3 times faster and more accurate +#define MOUSEKEY_INTERVAL 16 +// The default is 20. Since we made the mouse about 3 times faster with the previous setting, +// give it more time to accelerate to max speed to retain precise control over short distances. +#define MOUSEKEY_TIME_TO_MAX 40 +// The default is 300. Let's try and make this as low as possible while keeping the cursor responsive +#define MOUSEKEY_DELAY 100 +// It makes sense to use the same delay for the mouseweel +#define MOUSEKEY_WHEEL_DELAY 100 +// The default is 100 +#define MOUSEKEY_WHEEL_INTERVAL 50 +// The default is 40 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 100 + diff --git a/keyboards/kyria/keymaps/pierrec83/encoders.c b/keyboards/splitkb/kyria/keymaps/pierrec83/encoders.c similarity index 100% rename from keyboards/kyria/keymaps/pierrec83/encoders.c rename to keyboards/splitkb/kyria/keymaps/pierrec83/encoders.c diff --git a/keyboards/kyria/keymaps/pierrec83/keymap.c b/keyboards/splitkb/kyria/keymaps/pierrec83/keymap.c similarity index 100% rename from keyboards/kyria/keymaps/pierrec83/keymap.c rename to keyboards/splitkb/kyria/keymaps/pierrec83/keymap.c diff --git a/keyboards/kyria/keymaps/pierrec83/keymap.json b/keyboards/splitkb/kyria/keymaps/pierrec83/keymap.json similarity index 100% rename from keyboards/kyria/keymaps/pierrec83/keymap.json rename to keyboards/splitkb/kyria/keymaps/pierrec83/keymap.json diff --git a/keyboards/kyria/keymaps/pierrec83/layers.h b/keyboards/splitkb/kyria/keymaps/pierrec83/layers.h similarity index 100% rename from keyboards/kyria/keymaps/pierrec83/layers.h rename to keyboards/splitkb/kyria/keymaps/pierrec83/layers.h diff --git a/keyboards/kyria/keymaps/pierrec83/readme.md b/keyboards/splitkb/kyria/keymaps/pierrec83/readme.md similarity index 100% rename from keyboards/kyria/keymaps/pierrec83/readme.md rename to keyboards/splitkb/kyria/keymaps/pierrec83/readme.md diff --git a/keyboards/splitkb/kyria/keymaps/pierrec83/rules.mk b/keyboards/splitkb/kyria/keymaps/pierrec83/rules.mk new file mode 100644 index 000000000..fbccedd56 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/pierrec83/rules.mk @@ -0,0 +1,5 @@ +OLED_ENABLE = no # Enables the use of OLED displays +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow + +SRC += encoders.c diff --git a/keyboards/kyria/keymaps/plattfot/README.md b/keyboards/splitkb/kyria/keymaps/plattfot/README.md similarity index 100% rename from keyboards/kyria/keymaps/plattfot/README.md rename to keyboards/splitkb/kyria/keymaps/plattfot/README.md diff --git a/keyboards/splitkb/kyria/keymaps/plattfot/config.h b/keyboards/splitkb/kyria/keymaps/plattfot/config.h new file mode 100644 index 000000000..bb13d365f --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/plattfot/config.h @@ -0,0 +1,44 @@ +/* Copyright 2019 Thomas Baart + * Copyright 2020-2021 Fredrik Salomonsson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +#define ENCODER_DIRECTION_FLIP +// Fixing the skipping with the EC11K encoder +#define ENCODER_RESOLUTION 2 + +#define EE_HANDS + +// The Leader key allows to flexibly assign macros to key sequences. +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 350 + +// Remove the delay for the OSL keys. Not using any other tap keys. +// Otherwise TAPPING_TERM_PER_KEY would be the way to go. +#define TAPPING_TERM 0 + diff --git a/keyboards/splitkb/kyria/keymaps/plattfot/keymap.c b/keyboards/splitkb/kyria/keymaps/plattfot/keymap.c new file mode 100644 index 000000000..8b4b0c263 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/plattfot/keymap.c @@ -0,0 +1,480 @@ +/* Copyright 2020-2021 Fredrik Salomonsson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "version.h" + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + // New keys + CLO_TAP, // Close the next key press +}; + +// Close tap feature based on a post from drashna +// https://www.reddit.com/r/olkb/comments/citkbx/double_key_press_modifier_qmkwould_work_like/ev9cue8/ +// Will insert the closing equivalent key and move the cursor inside. +// For example clo_tap and then ( will result in (|), where | is the +// cursor. For " it will be "|" as the close equivalent key is the +// same key. +enum close_tap_modes { + CLO_DISABLED = 0b000, + CLO_PRESSED = 0b001, // Close tap key is pressed + CLO_ACTIVE = 0b010, // Close tap next keypress + CLO_USED = 0b100, // Turn off when close tap key is released +}; + +#define CLO_RELEASE(flag) flag & ~CLO_PRESSED + +static enum close_tap_modes close_tap_it = CLO_DISABLED; + +enum layers { + _DEFAULT, + _LOWER, + _RAISE, + _NAV, + _ADJUST, +}; + +#define MO_ADJT MO(_ADJUST) +#define L_RAISE OSL(_RAISE) +#define L_LOWER OSL(_LOWER) +#define L_NAV MO(_NAV) +#define EU_TDOT RSA(KC_SLSH) +#define EU_CDOT RALT(KC_EQUAL) +#define EU_DEG RALT(KC_SCLN) + +// clang-format off +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: Default + * + * ,-------------------------------------------. ,-------------------------------------------. + * | Esc | Q | W | E | R | T | | Y | U | I | O | P | Del | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | Tab | A | S | D | F | G | | H | J | K | L | ; | ' | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | Lead | RAISE| | LOWER|BSpace| N | M | , | . | / | RShift | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | MPlay| GUI | LCtrl| Space| LALT | | RCtrl| Enter| NAV | RALT |Scroll| + * | | | | | | | | | | | Lock | + * `----------------------------------' `----------------------------------' + */ + [_DEFAULT] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LEAD, L_RAISE, L_LOWER, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_MPLY,KC_LGUI,KC_LCTL, KC_SPACE, KC_LALT, KC_RCTL, KC_ENT, L_NAV, KC_RALT, KC_SLCK + ), + +/* + * Lower Layer: Left symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | ! | @ | # | $ | % | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | _ | \ | - | + | | F12 | | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | ° | : | ( | ) | × | |ADJUST| | | |CLOTAP| | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, KC_PIPE, KC_UNDS, KC_BSLS, KC_MINS, KC_PLUS, KC_F12, _______, _______, _______, _______, _______, + _______, EU_DEG, KC_COLN, KC_LPRN, KC_RPRN, EU_CDOT, _______, MO_ADJT, _______, _______, CLO_TAP, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Raise Layer: Right symbols + state + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | ^ | & | * | ~ | ? | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | F11 | | = | { | } | [ | ] | ` | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | |CLOTAP| | | |ADJUST| | … | " | < | > | / |CapsLock| + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | Mute | | | | | | | | | |Insert| + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_CIRC, KC_AMPR, KC_ASTR, KC_TILDE,KC_QUES, _______, + _______, _______, _______, _______, _______, KC_F11, KC_EQUAL,KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_GRV, + _______, _______, _______, _______, _______, CLO_TAP, _______, _______, MO_ADJT, _______, EU_TDOT, KC_DQUO, KC_LT, KC_GT, _______, KC_CAPS, + KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS + + ), +/* + * Navigation Layer: Number/Function keys, navigation + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | | Left | Up | Down | Right| | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_NAV] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Adjust Layer: RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | TOG | SAI | HUI | VAI | MOD | | | | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; +// clang-format on + +/* void keyboard_post_init_user(void) { */ +/* rgblight_setrgb(51, 135, 204); */ +/* } */ +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case CLO_TAP: + close_tap_it = close_tap_it & CLO_ACTIVE? + CLO_USED: + CLO_ACTIVE|CLO_PRESSED; + return false; + case KC_LEAD: + close_tap_it = CLO_DISABLED; + return true; + } + } else if (close_tap_it & CLO_ACTIVE && + keycode != CLO_TAP && + keycode != OSL(_RAISE) && + keycode != OSL(_LOWER) && + keycode != MO(_NAV)) { + + close_tap_it = close_tap_it & CLO_PRESSED? + close_tap_it | CLO_USED: + CLO_DISABLED; + switch(keycode) + { + case KC_LPRN: + tap_code16(KC_RPRN); + tap_code16(KC_LEFT); + break; + case KC_RPRN: + tap_code16(KC_LEFT); + tap_code16(KC_LPRN); + break; + case KC_LCBR: + tap_code16(KC_RCBR); + tap_code16(KC_LEFT); + break; + case KC_RCBR: + tap_code16(KC_LEFT); + tap_code16(KC_LCBR); + break; + case KC_LBRC: + tap_code16(KC_RBRC); + tap_code16(KC_LEFT); + break; + case KC_RBRC: + tap_code16(KC_LEFT); + tap_code16(KC_LBRC); + break; + case KC_LT: + tap_code16(KC_GT); + tap_code16(KC_LEFT); + break; + case KC_GT: + tap_code16(KC_LEFT); + tap_code16(KC_LT); + break; + default: + tap_code16(keycode); + tap_code16(KC_LEFT); + break; + } + } else { + switch (keycode) { + case CLO_TAP: + close_tap_it = close_tap_it & CLO_USED? + CLO_DISABLED: + CLO_RELEASE(close_tap_it); + } + } + + return true; +} + +//layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +// clang-format off +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} +// clang-format on +static void render_static_info(void) { + render_qmk_logo(); + oled_write_P(PSTR("Kyria rev1.0\n"), false); + oled_write_P(PSTR("Keymap: plattfot v2\n"), false); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR("Kyria rev1.0\n"), false); + oled_write_P(PSTR("v" QMK_VERSION "\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _DEFAULT: + oled_write_P(PSTR("base\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("<-sym/fun->\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("<-fun/sym->\n"), false); + break; + case _NAV: + oled_write_P(PSTR("num/nav\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("adjust\n"), false); + break; + default: + oled_write_P(PSTR("undefined\n"), false); + } + + // Host Keyboard LED Status and Double tap + led_t led_state = host_keyboard_led_state(); + if (led_state.num_lock) { + oled_write_P(PSTR("NUMLCK "), false); + } else if (close_tap_it) { + oled_write_P(PSTR("Close "), false); + } else { + oled_write_P(PSTR(" "), false); + } + + if (led_state.caps_lock) { + oled_write_P(PSTR("CAPLCK "), false); + } else if (close_tap_it) { + oled_write_P(PSTR("Tap "), false); + } else { + oled_write_P(PSTR(" "), false); + } + + oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_static_info(); + } +} +#endif + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (get_highest_layer(layer_state)) { + case _LOWER: + // Skip/Prev song + if (clockwise) { + tap_code(KC_MNXT); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } else { + tap_code(KC_MPRV); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + break; + case _NAV: + // Brightness control + if (clockwise) { + tap_code(KC_BRIU); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } else { + tap_code(KC_BRID); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + break; + default: + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } else { + tap_code(KC_VOLD); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + break; + } + } else if (index == 1) { + switch (get_highest_layer(layer_state)) { + case _RAISE: + // Scroll through the workspaces + if (clockwise) { + tap_code16(G(KC_GT)); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } else { + tap_code16(G(KC_LT)); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + break; + default: + // Scrolling + if (clockwise) { + tap_code(KC_PGDN); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } else { + tap_code(KC_PGUP); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + break; + } + } + return true; +} +#endif + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + // Sway navigation + SEQ_ONE_KEY(KC_Q) { // Jump to workspace 1 + SEND_STRING(SS_LGUI("1")); + } + SEQ_ONE_KEY(KC_W) { // Jump to workspace 2 + SEND_STRING(SS_LGUI("2")); + } + SEQ_ONE_KEY(KC_E) { // Jump to workspace 3 + SEND_STRING(SS_LGUI("3")); + } + SEQ_ONE_KEY(KC_R) { // Jump to workspace 4 + SEND_STRING(SS_LGUI("4")); + } + SEQ_ONE_KEY(KC_T) { // Jump to workspace 5 + SEND_STRING(SS_LGUI("5")); + } + + SEQ_ONE_KEY(KC_Y) { // Jump to workspace 6 + SEND_STRING(SS_LGUI("6")); + } + SEQ_ONE_KEY(KC_U) { // Jump to workspace 7 + SEND_STRING(SS_LGUI("7")); + } + SEQ_ONE_KEY(KC_I) { // Jump to workspace 8 + SEND_STRING(SS_LGUI("8")); + } + SEQ_ONE_KEY(KC_O) { // Jump to workspace 9 + SEND_STRING(SS_LGUI("9")); + } + SEQ_ONE_KEY(KC_P) { // Jump to workspace 0 + SEND_STRING(SS_LGUI("0")); + } + SEQ_ONE_KEY(KC_G) { // View scratch pad + SEND_STRING(SS_LGUI("-")); + } + + // Sway move window + SEQ_TWO_KEYS(KC_M, KC_Q) { // Move to workspace 1 + SEND_STRING(SS_LSFT(SS_LGUI("1"))); + } + SEQ_TWO_KEYS(KC_M, KC_W) { // Move to workspace 2 + SEND_STRING(SS_LSFT(SS_LGUI("2"))); + } + SEQ_TWO_KEYS(KC_M, KC_E) { // Move to workspace 3 + SEND_STRING(SS_LSFT(SS_LGUI("3"))); + } + SEQ_TWO_KEYS(KC_M, KC_R) { // Move to workspace 4 + SEND_STRING(SS_LSFT(SS_LGUI("4"))); + } + SEQ_TWO_KEYS(KC_M, KC_T) { // Move to workspace 5 + SEND_STRING(SS_LSFT(SS_LGUI("5"))); + } + + SEQ_TWO_KEYS(KC_M, KC_Y) { // Move to workspace 6 + SEND_STRING(SS_LSFT(SS_LGUI("6"))); + } + SEQ_TWO_KEYS(KC_M, KC_U) { // Move to workspace 7 + SEND_STRING(SS_LSFT(SS_LGUI("7"))); + } + SEQ_TWO_KEYS(KC_M, KC_I) { // Move to workspace 8 + SEND_STRING(SS_LSFT(SS_LGUI("8"))); + } + SEQ_TWO_KEYS(KC_M, KC_O) { // Move to workspace 9 + SEND_STRING(SS_LSFT(SS_LGUI("9"))); + } + SEQ_TWO_KEYS(KC_M, KC_P) { // Move to workspace 0 + SEND_STRING(SS_LSFT(SS_LGUI("0"))); + } + SEQ_TWO_KEYS(KC_M, KC_G) { // Move to scratch pad + SEND_STRING(SS_LSFT(SS_LGUI("-"))); + } + } +} diff --git a/keyboards/splitkb/kyria/keymaps/plattfot/rules.mk b/keyboards/splitkb/kyria/keymaps/plattfot/rules.mk new file mode 100644 index 000000000..4d148481c --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/plattfot/rules.mk @@ -0,0 +1,6 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +LEADER_ENABLE = yes # Enable the Leader Key feature +MOUSEKEY_ENABLE = no # Disable mouse, need to save space. diff --git a/keyboards/splitkb/kyria/keymaps/rmw/config.h b/keyboards/splitkb/kyria/keymaps/rmw/config.h new file mode 100644 index 000000000..57f252263 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/rmw/config.h @@ -0,0 +1,36 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define MACOSX + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +// If you are using an Elite C rev3 on the follower side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK + + diff --git a/keyboards/kyria/keymaps/rmw/keymap.c b/keyboards/splitkb/kyria/keymaps/rmw/keymap.c similarity index 100% rename from keyboards/kyria/keymaps/rmw/keymap.c rename to keyboards/splitkb/kyria/keymaps/rmw/keymap.c diff --git a/keyboards/kyria/keymaps/rmw/readme.md b/keyboards/splitkb/kyria/keymaps/rmw/readme.md similarity index 100% rename from keyboards/kyria/keymaps/rmw/readme.md rename to keyboards/splitkb/kyria/keymaps/rmw/readme.md diff --git a/keyboards/splitkb/kyria/keymaps/rmw/rules.mk b/keyboards/splitkb/kyria/keymaps/rmw/rules.mk new file mode 100644 index 000000000..1e2e1ad81 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/rmw/rules.mk @@ -0,0 +1,4 @@ +OLED_ENABLE = no # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +TAP_DANCE_ENABLE=yes # Enables Tap Dance diff --git a/keyboards/splitkb/kyria/keymaps/shinze/config.h b/keyboards/splitkb/kyria/keymaps/shinze/config.h new file mode 100644 index 000000000..0d1e0b837 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/shinze/config.h @@ -0,0 +1,32 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 +#endif + +// If you are using an Elite C rev3 on the slave side, uncomment the lines below: +// #define SPLIT_USB_DETECT +// #define NO_USB_STARTUP_CHECK diff --git a/keyboards/splitkb/kyria/keymaps/shinze/keymap.c b/keyboards/splitkb/kyria/keymaps/shinze/keymap.c new file mode 100644 index 000000000..ad9ca4da1 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/shinze/keymap.c @@ -0,0 +1,248 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "keymap_bepo.h" + +enum layers { + _BEPO = 0, + _LOWER, + _RAISE, + _ADJUST +}; + +#define RESC LT(_RAISE, KC_ESC) +#define BP_EA BP_EACU +#define BP_AG BP_AGRV +#define BP_EG BP_EGRV +#define BP_DC BP_DCIR +#define BP_AP BP_QUOT +#define BP_CO BP_COMM +#define BP_DT BP_DOT +#define LS KC_LSFT +#define BP_DOL BP_DLR + +/* Bottom Row */ +#define BR01 KC_LCTL +#define BR02 KC_LALT +#define BR03 MT(MOD_LGUI, KC_ENT) +#define BR04 LT(_LOWER, KC_SPC) +#define BR05 LT(_RAISE, KC_ESC) +#define BR06 LT(_LOWER, KC_ENT) +#define BR07 LT(_RAISE, KC_SPC) +#define BR08 KC_TAB +#define BR09 KC_BSPC +#define BR10 KC_RALT + +/* Under the screen row */ +#define U1 KC_LSFT + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * Base Layer: BÉPO + * + * ,-------------------------------------------. ,-------------------------------------------. + * |RAIS/ESC| B | É | P | O | È | | ^ | V | D | L | J | | Z | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | W | A | U | I | E | , | | C | T | S | R | N | M | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | À | Y | X | . | K | SPC |LShift| |LShift|LShift| ’ | Q | G | H | F | Ç | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | CTRL | Alt | Enter| Space| Esc | | Enter| Space| Tab | Bksp | AltGr| + * | | | CMD | Lower| Raise| | Lower| Raise| | | | + * `----------------------------------' `----------------------------------' + */ + [_BEPO] = LAYOUT( + RESC, BP_B, BP_EA, BP_P, BP_O, BP_EG, BP_DC, BP_V, BP_D, BP_L, BP_J, BP_Z, + BP_W, BP_A, BP_U, BP_I, BP_E, BP_CO, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, + LS, BP_AG, BP_Y, BP_X, BP_DT, BP_K, KC_SPC, U1, U1, U1, BP_AP, BP_Q, BP_G, BP_H, BP_F, BP_CCED, + BR01, BR02, BR03, BR04, BR05, BR06, BR07, BR08, BR09, BR10 + ), +/* + * Lower Layer: Numbers and symbols ? + * + * ,-------------------------------------------. ,-------------------------------------------. + * | $ | " | « | » | ( | ) | | @ | + | - | / | * | = | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | # | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ° | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | % | | | | | | | | | | | | | | | | ` | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + BP_DOL , BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, + BP_HASH, BP_1, BP_2, BP_3, BP_4, BP_5, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEG, + BP_PERC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BP_GRV, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Raise Layer: Media + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Prev | Play | Next | VolUp| | Left | Down | Up | Right| | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | Mute | VolDn| | | | | | MLeft| Mdown| MUp |MRight| | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLU, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, + _______, _______, _______, _______, KC_MUTE, KC_VOLD, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Adjust Layer: Function keys, RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | TOG | SAI | HUI | VAI | MOD | | | | | F11 | F12 | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | SAD | HUD | VAD | RMOD | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, _______, _______, KC_F11, KC_F12, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR("Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case _BEPO: + oled_write_P(PSTR("BEPO\n"), false); + break; + case _LOWER: + oled_write_P(PSTR("NumSym\n"), false); + break; + case _RAISE: + oled_write_P(PSTR("Media\n"), false); + break; + case _ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } + else if (index == 1) { + // Page up/Page down + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } + return true; +} +#endif diff --git a/keyboards/splitkb/kyria/keymaps/shinze/rules.mk b/keyboards/splitkb/kyria/keymaps/shinze/rules.mk new file mode 100644 index 000000000..35f8ec90c --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/shinze/rules.mk @@ -0,0 +1,4 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/splitkb/kyria/keymaps/tessachka/config.h b/keyboards/splitkb/kyria/keymaps/tessachka/config.h new file mode 100644 index 000000000..3fc508542 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/tessachka/config.h @@ -0,0 +1,29 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP +#endif diff --git a/keyboards/splitkb/kyria/keymaps/tessachka/keymap.c b/keyboards/splitkb/kyria/keymaps/tessachka/keymap.c new file mode 100644 index 000000000..51a91fc91 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/tessachka/keymap.c @@ -0,0 +1,241 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + + +enum layers { + QWERTY = 0, + LOWER, + RAISE, + ADJUST +}; + +enum custom_keycodes { + RGBRST = SAFE_RANGE, + KC_RACL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | BSPC | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | TAB/ADJ| A | S | D | F | G | | H | J | K | L | ; : | ENTER | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LSHIFT | Z | X | C | V | B | | | | | | N | M | , < | . > | / ? | F16 | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | Space| | MYCM | Calc | F15 | | | + * | | | Ctrl | LAlt | Lower| | Raise| | | | | + * `----------------------------------' `----------------------------------' + */ + [QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(ADJUST,KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_F16, + XXXXXXX, XXXXXXX, KC_LCTL, KC_LALT, LT(LOWER,KC_SPC), LT(RAISE,KC_MYCM), KC_CALC, KC_F15, XXXXXXX, XXXXXXX + ), +/* + * Lower Layer: Numbers and symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ` | 1 ! | 2 @ | 3 # | 4 $ | 5 % | | 6 ^ | 7 & | 8 * | 9 ( | 0 ) | DEL | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | CAPS | - _ | = + | [ { | ] } | | | | | | | ' " | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LSHIFT | TAB | | | | | | | | | | Home | PgDn | PgUp | End | \ | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | Space| | Space| | | | | + * | | | Ctrl | LAlt | Lower| | | | | | | + * `----------------------------------' `----------------------------------' + */ + [LOWER] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_CAPS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_QUOT, KC_NO, + KC_LSFT, KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_BSLS, KC_NO, + _______, _______, _______, _______, _______, KC_SPC, KC_NO, KC_NO, _______, _______ + ), +/* + * Raise Layer: Function Keys + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | |EEPRST| | | | | | | | | | F12 | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LSHIFT | TAB | RESET| | | | | | | | | Play | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | Space| | MYCM | Prev | Next | | | + * | | | Ctrl | LAlt | | | Raise| | | | | + * `----------------------------------' `----------------------------------' + */ + [RAISE] = LAYOUT( + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_NO, KC_NO, EEP_RST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F12, + KC_LSFT, KC_TAB, RESET, KC_NO, KC_NO, KC_NO, _______, _______, _______, _______, KC_MPLY, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + _______, _______, _______, _______, KC_SPC , KC_MPRV, KC_MNXT, _______, _______, _______ + ), +/* + * Adjust Layer: Arrow keys, RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | BTN2 | Up | BTN1 |RGBMOD|RGBTOG| | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | Left | Down | Right|RGBSAI|RGBHUI| | | | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | RGBRST | |RGBVAI|RGBVAD|RGBSAD|RGBHUD| | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | WBAK | BTN3 | WFWD | | MYCM | Calc | F15 | | | + * | | | | | | | Raise| | | | | + * `----------------------------------' `----------------------------------' + */ + [ADJUST] = LAYOUT( + KC_NO, KC_BTN2, KC_UP, KC_BTN1, RGB_MOD, RGB_TOG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, RGB_SAI, RGB_HUI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + RGBRST, KC_NO, RGB_VAI, RGB_VAD, RGB_SAD, RGB_HUD, _______, _______, _______, _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + _______, _______, KC_WBAK, KC_BTN3, KC_WFWD, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, LOWER, RAISE, ADJUST); +} + +// bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case MyCustomKeycode: +// if (record->event.pressed) { +// // What to do if the button was pressed +// } else { +// // What to do if the button was released +// } +// break; +// } +// return true; +// } + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} + +static void render_tessachka_logo(void) { + static const char PROGMEM Tessachka_OLED_Logo_Inverted[] = + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 192, 192, 192, 192, 192, 192, + 192, 192, 192, 64, 0, 0, 128, 128, 192, 192, 192, 192, 192, 192, 64, 0, 0, + 128, 192, 192, 192, 192, 192, 192, 192, 192, 192, 64, 0, 0, 128, 192, 192, 192, + 192, 192, 192, 192, 192, 192, 64, 0, 0, 0, 0, 0, 0, 192, 192, 0, 0, + 0, 0, 0, 0, 0, 128, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 0, + 192, 128, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 0, 192, 128, 0, 0, + 0, 0, 128, 192, 192, 128, 0, 0, 0, 0, 0, 0, 0, 192, 192, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 255, 255, 255, 127, 1, 1, 1, 0, 24, 126, 255, 255, 219, + 219, 153, 153, 153, 137, 128, 128, 0, 135, 143, 159, 153, 153, 153, 153, 153, 153, + 249, 240, 224, 0, 135, 143, 159, 153, 153, 153, 153, 153, 153, 249, 240, 224, 0, + 0, 192, 240, 252, 159, 135, 135, 159, 124, 240, 192, 0, 60, 255, 255, 231, 195, + 129, 0, 0, 0, 129, 195, 195, 195, 0, 255, 255, 255, 24, 24, 24, 24, 24, + 24, 255, 255, 255, 0, 255, 255, 255, 28, 62, 127, 247, 227, 193, 128, 0, 0, + 0, 192, 240, 252, 159, 135, 135, 159, 124, 240, 192, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 3, 3, 3, 3, 1, 0, 0, + 0, 1, 3, 3, 3, 3, 3, 3, 3, 3, 1, 0, 0, 0, 1, 3, 3, + 3, 3, 3, 3, 3, 3, 1, 0, 0, 3, 3, 3, 3, 3, 3, 1, 0, + 0, 1, 3, 3, 0, 0, 1, 3, 3, 3, 3, 3, 3, 3, 3, 1, 0, + 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 1, 3, + 0, 0, 0, 0, 1, 3, 3, 1, 0, 3, 3, 3, 3, 3, 3, 1, 0, + 0, 1, 3, 3, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(Tessachka_OLED_Logo_Inverted, sizeof(Tessachka_OLED_Logo_Inverted)); + oled_advance_page(false); + oled_advance_page(false); + oled_advance_page(false); +} + +static void render_status(void) { + // Logo and version information + render_tessachka_logo(); + oled_write_P(PSTR("Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif diff --git a/keyboards/splitkb/kyria/keymaps/tessachka/rules.mk b/keyboards/splitkb/kyria/keymaps/tessachka/rules.mk new file mode 100644 index 000000000..e79a5604e --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/tessachka/rules.mk @@ -0,0 +1,4 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MOUSEKEY_ENABLE = yes diff --git a/keyboards/splitkb/kyria/keymaps/thomasbaart/config.h b/keyboards/splitkb/kyria/keymaps/thomasbaart/config.h new file mode 100644 index 000000000..acb070359 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/thomasbaart/config.h @@ -0,0 +1,47 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#ifdef RGBLIGHT_ENABLE + #define RGBLIGHT_ANIMATIONS + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_SLEEP +#endif + +// EC11K encoders have a different resolution than other EC11 encoders. +// When using the default resolution of 4, if you notice your encoder skipping +// every other tick, lower the resolution to 2. +#define ENCODER_RESOLUTION 2 + +// The Leader key allows to flexibly assign macros to key sequences. +#define LEADER_PER_KEY_TIMING +#define LEADER_TIMEOUT 350 + +#define TAPPING_TERM 200 + +// Allows to use either side as the master. Look at the documentation for info: +// https://docs.qmk.fm/#/config_options?id=setting-handedness +#define EE_HANDS + +// Allows media codes to properly register in macros and rotary encoder code +#define TAP_CODE_DELAY 10 diff --git a/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c b/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c new file mode 100644 index 000000000..24be4135e --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c @@ -0,0 +1,359 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +uint16_t copy_paste_timer; + +enum layers { + QWERTY = 0, + LOWER, + RAISE, + NAV, + ADJUST +}; + +enum custom_keycodes { + KC_CCCV = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | LSFT | A | S | D | F | G | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LCTL | Z | X | C | V | B | CCCV | | | Del |Leader| N | M | , < | . > | / ? | - _ | + * `----------------------+------+------+------+------+ | |------+------+------+------+------+----------------------' + * | GUI | Alt | | Space| Enter| | Bspc | Space| | Tab | AltGr| + * | | | Lower| Shift| Alt | | | Nav | Raise| | | + * `----------------------------------' `----------------------------------' + */ + [QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_CCCV, XXXXXXX, KC_DEL, KC_LEAD, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + KC_LGUI, KC_LALT, MO(LOWER), MT(MOD_LSFT, KC_SPC), MT(MOD_LALT, KC_ENT), KC_BSPC, LT(NAV, KC_SPC), MO(RAISE), KC_TAB, KC_RALT + ), +/* + * Lower Layer: Numpad, Media + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | VolUp| | | | / ? | 7 & | 8 * | 9 ( | - _ | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | Prev | Play | Next | | | * | 4 $ | 5 % | 6 ^ | , < | + | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | VolDn| Mute | | | | | | | 0 ) | 1 ! | 2 @ | 3 # | = + | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | Lower| | | | | Nav | Raise| | | + * `----------------------------------' `----------------------------------' + */ + [LOWER] = LAYOUT( + _______, _______, _______, KC_VOLU, _______, _______, KC_SLSH, KC_7, KC_8, KC_9, KC_MINS, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_ASTR, KC_4, KC_5, KC_6, KC_COMM, KC_PLUS, + _______, _______, _______, KC_VOLD, KC_MUTE, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_EQL, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Raise Layer: Symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | ! | @ | { | } | | | | | _ | € | | | \ | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` | | + | - | / | * | % | ' " | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | | | & | = | , | . | / ? | - _ | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | Lower| | | | | Nav | Raise| | | + * `----------------------------------' `----------------------------------' + */ + [RAISE] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, _______, KC_UNDS, ALGR(KC_5),_______,_______,KC_BSLS, + _______, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, + _______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Navigation Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | PgUp | Home | Up | End | | ScrlLk | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | PgDn | Left | Down | Right| | CapsLk | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | Lower| | | | | Nav | Raise| | | + * `----------------------------------' `----------------------------------' + */ + [NAV] = LAYOUT( + _______, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, KC_SLCK, + _______, _______, _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_CAPS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +/* + * Adjust Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | F7 | F8 | F9 | F10 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | SAI | HUI | VAI | | | | F4 | F5 | F6 | F11 | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | SAD | HUD | VAD | | | | | | | | F1 | F2 | F3 | F12 | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, RGB_SAI, RGB_HUI, RGB_VAI, _______, _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, + _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, LOWER, RAISE, ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_CCCV: // One key copy/paste + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + tap_code16(LCTL(KC_C)); + } else { // Tap, paste + tap_code16(LCTL(KC_V)); + } + } + break; + } + return true; +} + + +bool is_alt_tab_active = false; +uint16_t alt_tab_timer = 0; + +LEADER_EXTERNS(); + +void matrix_scan_user(void) { + if (is_alt_tab_active) { + if (timer_elapsed(alt_tab_timer) > 1000) { + unregister_code(KC_LALT); + is_alt_tab_active = false; + } + } + + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_C) { // Inline Code + SEND_STRING("`` " SS_TAP(X_LEFT) SS_TAP(X_LEFT)); + } + SEQ_ONE_KEY(KC_P) { // Invoke Password Manager + SEND_STRING(SS_LCTRL(SS_LALT("\\"))); + } + SEQ_ONE_KEY(KC_S) { // Windows screenshot + SEND_STRING(SS_LGUI("\nS")); + } + SEQ_TWO_KEYS(KC_F, KC_P) { // Fusion Projection prefix + SEND_STRING("[Projection] "); + } + SEQ_TWO_KEYS(KC_B, KC_B) { // Basecone invoice description + SEND_STRING("[Leveranciersnaam] [Factuurnummer]"); + } + SEQ_TWO_KEYS(KC_E, KC_S) { // Support email splitkb + SEND_STRING("support@splitkb.com"); + } + SEQ_TWO_KEYS(KC_E, KC_T) { // Email splitkb + SEND_STRING("thomas@splitkb.com"); + } + SEQ_TWO_KEYS(KC_E, KC_P) { // Email personal + SEND_STRING("mail@thomasbaart.nl"); + } + SEQ_TWO_KEYS(KC_S, KC_D) { // Splitkb documentation + SEND_STRING("https://docs.splitkb.com/"); + } + SEQ_TWO_KEYS(KC_S, KC_V) { // Splitkb VAT number + SEND_STRING("NL210593349B01"); + } + SEQ_TWO_KEYS(KC_B, KC_C) { // Discord bongocat + SEND_STRING(":bongocat:\n"); + } + SEQ_TWO_KEYS(KC_C, KC_B) { // Discord code block + SEND_STRING("```c" SS_LSFT("\n\n") "``` " SS_TAP(X_UP)); + } + SEQ_TWO_KEYS(KC_Y, KC_S) { // Greeting + SEND_STRING("Yours sincerely,\n\nThomas Baart"); + } + SEQ_THREE_KEYS(KC_M, KC_V, KC_G) { // Greeting + SEND_STRING("Met vriendelijke groet,\n\nThomas Baart"); + } + } +} + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + +static void render_kyria_logo(void) { + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); +} + +static void render_qmk_logo(void) { + static const char PROGMEM qmk_logo[] = { + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; + + oled_write_P(qmk_logo, false); +} + +static void render_status(void) { + // QMK Logo and version information + render_qmk_logo(); + oled_write_P(PSTR(" Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state)) { + case QWERTY: + oled_write_P(PSTR("Default\n"), false); + break; + case LOWER: + oled_write_P(PSTR("Lower\n"), false); + break; + case RAISE: + oled_write_P(PSTR("Raise\n"), false); + break; + case NAV: + oled_write_P(PSTR("Navigation\n"), false); + break; + case ADJUST: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + uint8_t led_usb_state = host_keyboard_leds(); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); +} + +void oled_task_user(void) { + if (is_keyboard_master()) { + render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } else { + render_kyria_logo(); + } +} +#endif + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + switch (biton32(layer_state)) { + case QWERTY: + // History scrubbing. For Adobe products, hold shift while moving + // backward to go forward instead. + if (clockwise) { + tap_code16(C(KC_Z)); + } else { + tap_code16(C(KC_Y)); + } + break; + default: + // Switch between windows on Windows with alt tab. + if (clockwise) { + if (!is_alt_tab_active) { + is_alt_tab_active = true; + register_code(KC_LALT); + } + alt_tab_timer = timer_read(); + tap_code16(KC_TAB); + } else { + tap_code16(S(KC_TAB)); + } + break; + } + } else if (index == 1) { + switch (biton32(layer_state)) { + case QWERTY: + // Scrolling with PageUp and PgDn. + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + break; + default: + // Volume control. + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + break; + } + } + return true; +} +#endif diff --git a/keyboards/splitkb/kyria/keymaps/thomasbaart/rules.mk b/keyboards/splitkb/kyria/keymaps/thomasbaart/rules.mk new file mode 100644 index 000000000..65b44a298 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/thomasbaart/rules.mk @@ -0,0 +1,6 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +LEADER_ENABLE = yes # Enable the Leader Key feature +MOUSEKEY_ENABLE = no diff --git a/keyboards/splitkb/kyria/keymaps/via/config.h b/keyboards/splitkb/kyria/keymaps/via/config.h new file mode 100644 index 000000000..3ca93f4fd --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/via/config.h @@ -0,0 +1,40 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#define LAYER_STATE_8BIT +#define DYNAMIC_KEYMAP_LAYER_COUNT 5 +#define IGNORE_MOD_TAP_INTERRUPT + +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +#ifdef RGBLIGHT_ENABLE +# 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_STATIC_GRADIENT + +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 150 +#endif + +#define USB_POLLING_INTERVAL_MS 1 diff --git a/keyboards/splitkb/kyria/keymaps/via/keymap.c b/keyboards/splitkb/kyria/keymaps/via/keymap.c new file mode 100644 index 000000000..730b5028c --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/via/keymap.c @@ -0,0 +1,248 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum layers { _BASE = 0, _NAV, _SYM, _FUNCTION, _ADJUST }; + +// Aliases for readability + +#define SYM MO(_SYM) +#define NAV MO(_NAV) +#define FKEYS MO(_FUNCTION) +#define ADJUST MO(_ADJUST) + +#define CTL_ESC MT(MOD_LCTL, KC_ESC) +#define CTL_QUOT MT(MOD_RCTL, KC_QUOTE) +#define CTL_MINS MT(MOD_RCTL, KC_MINUS) +#define ALT_ENT MT(MOD_LALT, KC_ENT) + +// Note: LAlt/Enter (ALT_ENT) is not the same thing as the keyboard shortcut Alt+Enter. +// The notation `mod/tap` denotes a key that activates the modifier `mod` when held down, and +// produces the key `tap` when tapped (i.e. pressed and released). + +// clang-format off +#define LAYOUT_via( \ + L00, L01, L02, L03, L04, L05, LE0, LE1, RE0, RE1, R06, R07, R08, R09, R10, R11, \ + L12, L13, L14, L15, L16, L17, R18, R19, R20, R21, R22, R23, \ + L24, L25, L26, L27, L28, L29, L30, L31, R32, R33, R34, R35, R36, R37, R38, R39, \ + L40, L41, L42, L43, L44, R45, R46, R47, R48, R49 \ +) \ +{ \ + { LE0, LE1, L05, L04, L03, L02, L01, L00 }, \ + { RE0, RE1, L17, L16, L15, L14, L13, L12 }, \ + { L31, L30, L29, L28, L27, L26, L25, L24 }, \ + { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \ + { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \ + { R32, R33, R34, R35, R36, R37, R38, R39 }, \ + { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * |Ctrl/Esc| A | S | D | F | G | | H | J | K | L | ; : |Ctrl/' "| + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | [ { |CapsLk| |F-keys| ] } | N | M | , < | . > | / ? | RShift | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * |Adjust| LGUI | LAlt/| Space| Nav | | Sym | Space| AltGr| RGUI | Menu | + * | | | Enter| | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_BASE] = LAYOUT_via( + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_VOLD, KC_VOLU, KC_PGDN, KC_PGUP, KC_Y, KC_U , KC_I , KC_O , KC_P , KC_BSPC, + CTL_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H, KC_J , KC_K , KC_L ,KC_SCLN,CTL_QUOT, + KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_LBRC,KC_CAPS, FKEYS , KC_RBRC, KC_N, KC_M ,KC_COMM, KC_DOT ,KC_SLSH, KC_RSFT, + ADJUST , KC_LGUI, ALT_ENT, KC_SPC , NAV , SYM , KC_SPC ,KC_RALT, KC_RGUI, KC_APP + ), + +/* + * Nav Layer: Media, navigation + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | PgUp | Home | ↑ | End | VolUp| Delete | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | GUI | Alt | Ctrl | Shift| | | PgDn | ← | ↓ | → | VolDn| Insert | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | |ScLck | | | | Pause|M Prev|M Play|M Next|VolMut| PrtSc | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_NAV] = LAYOUT_via( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_VOLU, KC_DEL, + _______, KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_VOLD, KC_INS, + _______, _______, _______, _______, _______, _______, _______, KC_SLCK, _______, _______,KC_PAUSE, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_PSCR, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + * Sym Layer: Numbers and symbols + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + | + * |--------+------+------+------+------+------+-------------. ,------+-------------+------+------+------+------+--------| + * | | | \ | : | ; | - | \ | | [ { | | | | ] } | # ~ | _ | , | . | / | ? | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_SYM] = LAYOUT_via( + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , _______, _______, _______, _______, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL , + KC_TILD , KC_EXLM, KC_AT , KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, + KC_PIPE , KC_BSLS, KC_COLN, KC_SCLN, KC_MINS, KC_NUBS, KC_LBRC, _______, _______, KC_RBRC, KC_NUHS, KC_UNDS, KC_COMM, KC_DOT, KC_SLSH, KC_QUES, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + * Function Layer: Function keys + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | F9 | F10 | F11 | F12 | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | F5 | F6 | F7 | F8 | | | | Shift| Ctrl | Alt | GUI | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | | | | | | | | | | | | | + * `--------+------+------+--------------------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_FUNCTION] = LAYOUT_via( + _______, KC_F9 , KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , _______, _______, KC_RSFT, KC_RCTL, KC_LALT, KC_RGUI, _______, + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* + * Adjust Layer: Default layer settings, RGB + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | |QWERTY| | | | | | | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | |Dvorak| | | | TOG | SAI | HUI | VAI | MOD | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | |Colmak| | | | | | | | | SAD | HUD | VAD | RMOD | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT_via( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, RGB_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_VAD, RGB_RMOD, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + +}; +// clang-format on + +#ifdef ENCODER_ENABLE +static uint8_t encoder_state[2] = {0}; +static keypos_t encoder_ccw[2] = {{0, 0}, {0, 1}}; +static keypos_t encoder_cw[2] = {{1, 0}, {1, 1}}; + +void encoder_action_unregister(void) { + for (int index = 0; index < 2; ++index) { + if (encoder_state[index]) { + keyevent_t encoder_event = (keyevent_t){.key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], .pressed = false, .time = (timer_read() | 1)}; + encoder_state[index] = 0; + action_exec(encoder_event); + } + } +} + +void encoder_action_register(uint8_t index, bool clockwise) { + keyevent_t encoder_event = (keyevent_t){.key = clockwise ? encoder_cw[index] : encoder_ccw[index], .pressed = true, .time = (timer_read() | 1)}; + encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); + action_exec(encoder_event); +} + +void matrix_scan_user(void) { encoder_action_unregister(); } + +bool encoder_update_user(uint8_t index, bool clockwise) { + encoder_action_register(index, clockwise); + return false; +}; +#endif + +#ifdef OLED_ENABLE +void oled_task_user(void) { + if (is_keyboard_master()) { + // QMK Logo and version information + // clang-format off + 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}; + // clang-format on + + oled_write_P(qmk_logo, false); + oled_write_P(PSTR("Kyria rev1.0 w/ VIA\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state | default_layer_state)) { + case 0: + oled_write_P(PSTR("Base\n"), false); + break; + case 1: + oled_write_P(PSTR("Nav\n"), false); + break; + case 2: + oled_write_P(PSTR("Sym\n"), false); + break; + case 3: + oled_write_P(PSTR("Function\n"), false); + break; + case 4: + oled_write_P(PSTR("Adjust\n"), false); + break; + } + + // Host Keyboard LED Status + led_t led_usb_state = host_keyboard_led_state(); + oled_write_P(led_usb_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); + } else { + // clang-format off + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + // clang-format on + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); + } +} +#endif diff --git a/keyboards/splitkb/kyria/keymaps/via/rules.mk b/keyboards/splitkb/kyria/keymaps/via/rules.mk new file mode 100644 index 000000000..9f383dfa2 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/via/rules.mk @@ -0,0 +1,10 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +VIA_ENABLE = yes +NKRO_ENABLE = yes +KEY_LOCK_ENABLE = no +SPACE_CADET_ENABLE = no +MAGIC_ENABLE = no +GRAVE_ESCAPE_ENABLE = no diff --git a/keyboards/splitkb/kyria/keymaps/winternebs/config.h b/keyboards/splitkb/kyria/keymaps/winternebs/config.h new file mode 100755 index 000000000..1df48a1f4 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/winternebs/config.h @@ -0,0 +1,31 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define OLED_FONT_H "keyboards/splitkb/kyria/keymaps/winternebs/glcdfont.c" +#define OLED_FONT_END 127 +#ifdef OLED_ENABLE + #define OLED_DISPLAY_128X64 +#endif + +#define FORCE_NKRO +#define ENCODER_RESOLUTION 4 + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION +#define NO_ACTION_ONESHOT +#define TAPPING_FORCE_HOLD +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/kyria/keymaps/winternebs/glcdfont.c b/keyboards/splitkb/kyria/keymaps/winternebs/glcdfont.c similarity index 100% rename from keyboards/kyria/keymaps/winternebs/glcdfont.c rename to keyboards/splitkb/kyria/keymaps/winternebs/glcdfont.c diff --git a/keyboards/splitkb/kyria/keymaps/winternebs/keymap.c b/keyboards/splitkb/kyria/keymaps/winternebs/keymap.c new file mode 100755 index 000000000..082903031 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/winternebs/keymap.c @@ -0,0 +1,732 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#ifdef CONSOLE_ENABLE + #include +#endif +enum custom_keycodes { + QWERTY = SAFE_RANGE, + WORKMAN, + ADJUST, + SBKSP, + ENDW +}; + +enum layers { + _QWERTY = 0, + _WORKMAN, + _LOWER, + _RAISE, + _ADJUST +}; +#define RAISE LT(_RAISE, KC_ENT) +#define LOWER MO(_LOWER) +#define HOME_A KC_A +#define HOME_S KC_S +#define HOME_H CTL_T(KC_H) +#define HOME_T SFT_T(KC_T) +#define HOME_N SFT_T(KC_N) +#define HOME_E CTL_T(KC_E) +#define HOME_O KC_O +#define HOME_I KC_I +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* + * Base Layer: QWERTY + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | TAB | A | S | D | F | G | | H | J | K | L | ; | ' | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | CTRL | Z | X | C | V | B | | | | | | N | M | , | . | / | ENTER | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | GUI | ALT | LOWER| Space| | | SHIFT| Bksp | RAISE| | | + * `----------------------------------' `----------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, _______, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, _______, _______, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LGUI, KC_LALT, LOWER, KC_SPC, _______, KC_LSFT, KC_BSPC, RAISE, _______, _______ + ), + /* + * Workman Layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ESC | Q | D | R | W | B | | J | F | U | P | ; | Bksp | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | TAB | A | S | H | T | G | | Y | N | E | O | I | ' | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | Z | X | M | C | V | SHIFT| Space| | | ENTER| K | L | , | . | / | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | GUI | ESC | LOWER| Space| SWAP | | SWAP | Bksp | RAISE| | | + * `----------------------------------' `----------------------------------' + */ + [_WORKMAN] = LAYOUT( + KC_ESC, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, + KC_TAB, HOME_A, HOME_S, HOME_H, HOME_T, KC_G, KC_Y, HOME_N, HOME_E, HOME_O, HOME_I, KC_QUOT, + XXXXXXX, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_LSFT, KC_SPC, SH_MON, KC_ENT, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, + KC_LGUI, KC_LALT, LOWER, KC_SPC, SH_MON, SH_MON, KC_BSPC, RAISE, XXXXXXX, _______ + ), +/* + * Lower Layer: NUM/symb + * + * ,-------------------------------------------. ,-------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | DEL | $ | + | ( | ) | @ | | | | - | = | _ | * | \ | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | ! | # | { | } | ~ | | | | | | & | [ | ] | % | ^ | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * |prints| | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_LOWER] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_DEL, KC_DLR, KC_PLUS, KC_LPRN, KC_RPRN, KC_AT, KC_PIPE, KC_MINS, KC_EQL, KC_UNDS, KC_ASTR, KC_BSLS, + _______, KC_EXLM, KC_HASH, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, _______, _______, KC_AMPR, KC_LBRC, KC_RBRC, KC_PERC, KC_CIRC, _______, + KC_PSCR, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______ + ), + /* + * Raise Layer: VIM Movement + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | PgDn | | Word | Back | | Down | | PgUp | | | | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | Left | | | | | | End | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | | | | | | | | | Up | Right| | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_RAISE] = LAYOUT( + _______, _______, KC_PGDN, _______, C(KC_RGHT), C(KC_LEFT), KC_DOWN, _______, KC_PGUP, _______, _______, _______, + _______, _______, _______, KC_LEFT, _______, _______, _______, _______, ENDW, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + /* + * Layer template + * + * ,-------------------------------------------. ,-------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+------+------+------+------+------| |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| + * | | | | |QWERTY|WRKMAN| | | | | | | | | | | | + * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + */ + [_ADJUST] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, QWERTY, WORKMAN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +// /* +// * Layer template +// * +// * ,-------------------------------------------. ,-------------------------------------------. +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------| |------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | +// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------| +// * | | | | | | | | | | | | | | | | | | +// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------' +// * | | | | | | | | | | | | +// * | | | | | | | | | | | | +// * `----------------------------------' `----------------------------------' +// */ +// [_LAYERINDEX] = LAYOUT( +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +// ), +}; + + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +#ifdef ENCODER_ENABLE +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_RGHT); + } else { + tap_code(KC_LEFT); + } + } + else if (index == 1) { + // Page up/Page down + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } + return true; +} +#endif +#ifdef OLED_ENABLE +bool left = false; +bool right = false; +bool lastl = false; +bool lastr = false; +#endif +bool bksp = false; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + #ifdef CONSOLE_ENABLE + uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u, total: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.key.col + 10 * record->event.key.row); + #endif + #ifdef OLED_ENABLE + if(record->event.pressed){ + uint8_t n = record->event.key.col + 10 * record->event.key.row; + if (n<40) { + left = true; + } + else { + right = true; + } + } + #endif + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + break; + case SBKSP: + if (record->event.pressed) { + register_code(KC_LSFT); + bksp = true; + } + else { + unregister_code(KC_LSFT); + if (bksp) { + tap_code(KC_BSPC); + } + } + return false; + break; + case ENDW: + if (record->event.pressed) { + register_code(KC_LCTL); + tap_code(KC_RGHT); + unregister_code(KC_LCTL); + tap_code(KC_LEFT); + } + } + bksp = false; + return true; + +} + +#ifdef OLED_ENABLE +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} + + + +char wpm_str[10]; +// WPM-responsive animation stuff here +#define IDLE_FRAMES 2 +#define IDLE_SPEED 10 // below this wpm value your animation will idle + + +#define TAP_FRAMES 3 + +#define ANIM_FRAME_DURATION 400 // how long each frame lasts in ms +// #define SLEEP_TIMER 60000 // should sleep after this period of 0 wpm, needs fixing +#define ANIM_SIZE 896 // number of bytes in array, minimize for adequate firmware size, max is 1024 + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; +// uint8_t current_prep_frame = 0; // uncomment if PREP_FRAMES >1 +uint8_t current_tap_frame = 0; +// Credit to obosob for initial animation approach. +static void render_anim(void) { + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { +// 'bongo0', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, +0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, +0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, +0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, +0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { +// 'bongo1', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0x40, +0x60, 0x20, 0x20, 0x20, 0x20, 0x00, 0x10, 0x10, 0x10, 0x90, 0x90, 0x90, 0x90, 0x90, 0xa0, 0xa0, +0xa0, 0xa0, 0xa0, 0xc0, 0xc0, 0xc1, 0x80, 0x80, 0x81, 0x81, 0x02, 0x06, 0x84, 0x7c, 0x5f, 0x58, +0x4c, 0x46, 0x42, 0x42, 0x42, 0x43, 0x61, 0x23, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xa0, 0x20, 0x20, +0x30, 0x10, 0x10, 0x18, 0x08, 0x08, 0x0c, 0x04, 0x06, 0x02, 0x03, 0x01, 0x08, 0x18, 0x18, 0x28, +0x68, 0x44, 0x84, 0x84, 0x86, 0x02, 0x02, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x40, 0x40, 0x20, 0x10, 0x09, 0x07, 0x01, 0x01, 0x03, +0x06, 0x06, 0x10, 0x3c, 0x4c, 0xc8, 0x88, 0x08, 0x08, 0x18, 0x10, 0x30, 0x60, 0xc0, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, +0x01, 0x01, 0x81, 0xc1, 0x21, 0x31, 0x11, 0x0d, 0x05, 0x01, 0x03, 0x02, 0x06, 0x0e, 0xc6, 0xe4, +0x04, 0x04, 0x04, 0x06, 0x02, 0x03, 0x01, 0x03, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, +0x81, 0x01, 0x01, 0x01, 0x00, 0x00, 0x07, 0x0c, 0x30, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x1e, 0x30, 0x40, 0x80, 0x00, 0x00, 0x00, 0x01, 0x07, +0x1c, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, +0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, +0x00, 0x00, 0x00, 0x02, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x02, 0x02, +0x06, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x0c, 0x04, 0x0c, 0x3c, 0x15, 0xd3, 0x72, 0x10, 0x20, +0x20, 0x20, 0x21, 0x23, 0x26, 0x24, 0x2c, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, +0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, +0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, +0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }; + static const char PROGMEM prep[][ANIM_SIZE] = { + { +// 'bongo2', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x08, 0x0c, 0x04, 0x04, +0x04, 0x07, 0x0a, 0x92, 0xf9, 0xc9, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x46, 0x78, 0x20, 0x20, 0x20, 0x20, 0x40, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x64, 0xc4, 0x04, 0x04, +0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x03, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x20, +0x30, 0x19, 0x0e, 0x38, 0xcc, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x05, 0x07, 0x0e, +0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, +0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + + } + }; + static const char PROGMEM tap[TAP_FRAMES][ANIM_SIZE] = { + { + // 'bongo3', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x46, 0x78, 0x20, 0x20, 0x20, 0x20, 0x40, +0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0xe0, 0xf8, 0xf8, 0xf0, +0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x01, 0x03, 0x1f, 0x0f, 0x07, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, +0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x40, 0x40, 0x40, 0x40, 0x40, 0x60, 0x20, +0x30, 0x19, 0x0e, 0x38, 0xcc, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f, +0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, +0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x83, 0x87, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x0e, 0x38, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xf8, 0xf9, 0xe1, 0x81, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, +0x01, 0x01, 0x03, 0x02, 0x02, 0x02, 0x03, 0x03, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x1c, 0x1f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { + // 'bongo4', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x08, 0x0c, 0x04, 0x04, +0x04, 0x07, 0x0a, 0x92, 0xf9, 0xc9, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1e, 0x64, 0xc4, 0x04, 0x04, +0x00, 0x02, 0x03, 0x01, 0x00, 0x01, 0x03, 0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, +0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x05, 0x07, 0x0e, +0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0xa0, 0xa0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7c, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3e, 0x1e, 0x1e, 0x1c, 0x0c, 0x00, 0xf8, +0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, +0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x38, 0x38, 0x78, 0x7c, 0x7e, 0xff, 0xff, 0xff, 0xfc, +0xf1, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x06, 0x0e, +0x1e, 0x3e, 0x3e, 0x7e, 0x7e, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + { +// 'bongo5', 128x56px +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x60, 0x20, 0x30, 0x30, 0x10, +0x18, 0x08, 0x0c, 0x04, 0x04, 0x04, 0x86, 0x82, 0xc2, 0x42, 0x22, 0x12, 0x12, 0x12, 0x12, 0x14, +0x14, 0x14, 0x14, 0x14, 0x18, 0x19, 0x19, 0x11, 0x11, 0x10, 0x10, 0x00, 0x20, 0xf0, 0x2f, 0x24, +0x66, 0xda, 0xd1, 0x11, 0x91, 0x91, 0x11, 0x11, 0x11, 0x12, 0x1e, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0xc0, 0x20, 0x18, 0x04, 0x02, 0x01, 0x80, 0x80, 0x00, 0x40, 0x40, 0xc0, 0x40, 0x30, +0x90, 0x88, 0x44, 0x42, 0x42, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x20, 0x20, 0x20, +0x20, 0x20, 0x20, 0x20, 0x20, 0x10, 0x10, 0xf0, 0x88, 0x08, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x03, 0x06, 0x08, 0x71, 0x81, 0x02, 0x06, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x1f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x03, 0x82, 0xe2, 0x39, 0x09, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x39, +0x1c, 0x00, 0x00, 0x00, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0xf0, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x18, 0x20, 0x40, 0x80, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, +0x06, 0x38, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x80, 0x80, 0x80, 0xe0, 0xf8, 0xf8, 0xf0, +0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x01, 0x03, 0x1f, 0x0f, 0x07, 0x00, 0x80, 0xc0, 0x40, 0x20, 0x30, +0x18, 0x0e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, +0x02, 0x04, 0x08, 0x08, 0x10, 0x08, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x0d, 0xf3, 0x06, 0x0c, 0x10, +0x20, 0x20, 0xc1, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f, +0x1f, 0x1f, 0x0f, 0x07, 0x01, 0x02, 0x02, 0xfa, 0x06, 0x06, 0x03, 0x03, 0x02, 0x02, 0x04, 0x18, +0xf0, 0x80, 0xc0, 0x60, 0x20, 0x10, 0x18, 0x0c, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x10, 0x10, +0x10, 0x10, 0x10, 0x10, 0x20, 0xa0, 0xa0, 0x20, 0x20, 0x20, 0x20, 0x40, 0x40, 0x40, 0x40, 0x40, +0x40, 0x40, 0x80, 0x40, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x80, 0xe0, 0xf0, 0xf8, 0xf9, 0xe1, 0x81, 0x02, 0x02, 0x02, 0x03, 0x01, 0x01, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x7c, 0x7f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3e, 0x1e, 0x1e, 0x1c, 0x0c, 0x00, 0xf8, +0x8e, 0x03, 0x01, 0x01, 0x01, 0x03, 0x06, 0x9c, 0xf0, 0x80, 0xc0, 0x40, 0x60, 0x20, 0x30, 0x10, +0x08, 0x0d, 0x07, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x04, 0x07, 0x04, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 0x10, +0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x08, 0x1c, 0x1f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x30, 0x38, 0x38, 0x78, 0x7c, 0x7e, 0xff, 0xff, 0xff, 0xfc, +0xf1, 0xe1, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x03, 0x07, 0x06, 0x0e, +0x1e, 0x3e, 0x3e, 0x7e, 0x7e, 0x1e, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + } + }; + + //assumes 1 frame prep stage + void animation_phase(void) { + if(get_current_wpm() <= IDLE_SPEED){ + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + else { + // if is true 2 frames in a row make it false; + if(left && !lastl && right && !lastr) { + oled_write_raw_P(tap[2], ANIM_SIZE); + } + else if (left && !lastl) { + oled_write_raw_P(tap[0], ANIM_SIZE); + } + else if (right && !lastr) { + oled_write_raw_P(tap[1], ANIM_SIZE); + } + else { + oled_write_raw_P(prep[0], ANIM_SIZE); + left = false; + right = false; + } + lastl = left; + lastr = right; + left = false; + right = false; + } + } + if(get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } else { + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) { + oled_off(); + } else { + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} +bool wpm_keycode_user(uint16_t keycode) { + return true; +} +static void render_logo(void) { + oled_set_cursor(0,0); + oled_write_P(PSTR(" play asc "), false); + oled_set_cursor(3,3); + oled_write_P(PSTR(" play asc "), false); + oled_set_cursor(6,6); + oled_write_P(PSTR(" play asc "), false); +} +void oled_task_user(void) { + if (is_keyboard_master()) { + render_anim(); + oled_set_cursor(0,7); + uint8_t n = get_current_wpm(); + wpm_str[3] = '\0'; + wpm_str[2] = '0' + n % 10; + wpm_str[1] = '0' + (n /= 10) % 10; + wpm_str[0] = '0' + n / 10 ; + oled_write_P(PSTR("WPM: "), false); + oled_write(wpm_str, false); + oled_write_P(PSTR(" "), false); + switch (get_highest_layer(layer_state)) { + case _QWERTY: + oled_write_ln_P(PSTR("base"), false); + break; + case _LOWER: + oled_write_ln_P(PSTR("LOWER"), false); + break; + case _RAISE: + oled_write_ln_P(PSTR("RAISE"), false); + break; + case _ADJUST: + oled_write_ln_P(PSTR("ADJUST"), false); + break; + default: + oled_write_ln_P(PSTR("Undefined"), false); + } + } else { + render_logo(); + oled_scroll_left(); + + } +} +#endif diff --git a/keyboards/splitkb/kyria/keymaps/winternebs/rules.mk b/keyboards/splitkb/kyria/keymaps/winternebs/rules.mk new file mode 100755 index 000000000..47a3988e6 --- /dev/null +++ b/keyboards/splitkb/kyria/keymaps/winternebs/rules.mk @@ -0,0 +1,13 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # Enables the use of one or more +NKRO_ENABLE = yes +WPM_ENABLE = yes +CONSOLE_ENABLE = no # Console for debug +AUDIO_ENABLE = no # Audio output +SPACE_CADET_ENABLE = no +EXTRAKEY_ENABLE = no +MOUSEKEY_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +SWAP_HANDS_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/splitkb/kyria/kyria.c b/keyboards/splitkb/kyria/kyria.c new file mode 100644 index 000000000..21ed5e84c --- /dev/null +++ b/keyboards/splitkb/kyria/kyria.c @@ -0,0 +1,16 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "kyria.h" diff --git a/keyboards/splitkb/kyria/kyria.h b/keyboards/splitkb/kyria/kyria.h new file mode 100644 index 000000000..2b1a29815 --- /dev/null +++ b/keyboards/splitkb/kyria/kyria.h @@ -0,0 +1,31 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#if defined(KEYBOARD_splitkb_kyria_rev1) +# include "rev1.h" +#endif + +/* 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. + */ diff --git a/keyboards/splitkb/kyria/readme.md b/keyboards/splitkb/kyria/readme.md new file mode 100644 index 000000000..5ce652589 --- /dev/null +++ b/keyboards/splitkb/kyria/readme.md @@ -0,0 +1,21 @@ +# Kyria + +![Kyria](https://cdn.shopify.com/s/files/1/0227/9171/6941/products/PlateCase_f1870016-98b8-43a9-8aed-3eaf073b367b_900x.jpg?v=1568934600) + +An ergonomical 40% split keyboard + +Keyboard Maintainer: [splitkb.com](https://github.com/splitkb) +Hardware Supported: Pro Micro 5V/16MHz and compatible. +Hardware Availability: [splitkb.com](https://splitkb.com) and partners. + +Make example for this keyboard (after setting up your build environment): + + make splitkb/kyria:default + +Example of flashing this keyboard: + + make splitkb/kyria/rev1:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +A build guide for the Kyria can be found at [docs.splitkb.com](https://docs.splitkb.com/hc/en-us/articles/360010552059-Kyria-Build-Guide-Introduction). diff --git a/keyboards/splitkb/kyria/rev1/config.h b/keyboards/splitkb/kyria/rev1/config.h new file mode 100644 index 000000000..a330dfc10 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/config.h @@ -0,0 +1,84 @@ +/* +Copyright 2019 Thomas Baart + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x8D1D +#define PRODUCT_ID 0x9D9D +#define DEVICE_VER 0x0001 +#define MANUFACTURER splitKB +#define PRODUCT Kyria + +/* key matrix size */ +/* Rows are doubled up */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +// wiring +#define MATRIX_ROW_PINS \ + { B4, E6, D7, D4 } +#define MATRIX_COL_PINS \ + { B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS + +#define ENCODERS_PAD_A \ + { C6 } +#define ENCODERS_PAD_B \ + { B5 } +#define ENCODERS_PAD_A_RIGHT \ + { B5 } +#define ENCODERS_PAD_B_RIGHT \ + { C6 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 + +#define RGB_DI_PIN D3 +#define RGBLED_SPLIT \ + { 10, 10 } +#define RGBLED_NUM 20 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#ifdef OLED_ENABLE +# define OLED_DISPLAY_128X64 +# define SPLIT_OLED_ENABLE +#endif + +/* RGB matrix support */ +#ifdef RGB_MATRIX_ENABLE +# define SPLIT_TRANSPORT_MIRROR +# define DRIVER_LED_TOTAL RGBLED_NUM // Number of LEDs +# define RGB_MATRIX_SPLIT { 10, 10 } +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 170 +# define RGB_DISABLE_WHEN_USB_SUSPENDED +#endif diff --git a/keyboards/splitkb/kyria/rev1/rev1.c b/keyboards/splitkb/kyria/rev1/rev1.c new file mode 100644 index 000000000..ac82f7373 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/rev1.c @@ -0,0 +1,148 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "rev1.h" + +#ifdef SWAP_HANDS_ENABLE +// clang-format off +__attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}}, + {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}, {7, 5}}, + {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}}, + {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}, {7, 7}}, + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}}, + {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}} +}; +// clang-format on +#endif + +#ifdef RGB_MATRIX_ENABLE +/* Map physical under glow LEDs for RGB matrix support */ +led_config_t g_led_config = { { + // Key Matrix to LED Index + { NO_LED, NO_LED, NO_LED, 4, NO_LED, NO_LED, 5, 9 }, + { NO_LED, NO_LED, 3, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, 0, NO_LED, NO_LED, NO_LED, 7, 6, 8 }, + { NO_LED, NO_LED, 1, 2, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, 14, NO_LED, NO_LED, 15, 19 }, + { NO_LED, NO_LED, 13, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, 10, NO_LED, NO_LED, NO_LED, 17, 16, 18 }, + { NO_LED, NO_LED, 11, 12, NO_LED, NO_LED, NO_LED, NO_LED }, +}, { + // LED Index to Physical Position + {91,40}, {77,56}, {63,56}, {77,24}, {63,8}, {21,8}, {21,40}, {35,40}, {7,40}, {7,8}, + {133,40}, {147,56}, {161,56}, {147,24}, {161,8}, {203,8}, {203,40}, {189,40}, {217,40}, {217,8} +}, { + // LED Index to Flag + LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, + LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, + LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, + LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL +} }; +#endif + +#ifdef OLED_ENABLE +__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } + +__attribute__((weak)) void oled_task_user(void) { + if (is_keyboard_master()) { + // QMK Logo and version information + // clang-format off + 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}; + // clang-format on + + oled_write_P(qmk_logo, false); + oled_write_P(PSTR("Kyria rev1.0\n\n"), false); + + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + switch (get_highest_layer(layer_state | default_layer_state)) { + case 0: + oled_write_P(PSTR("QWERTY\n"), false); + break; + case 1: + oled_write_P(PSTR("Dvorak\n"), false); + break; + case 2: + oled_write_P(PSTR("Colemak-DH\n"), false); + break; + case 3: + oled_write_P(PSTR("Nav\n"), false); + break; + case 4: + oled_write_P(PSTR("Sym\n"), false); + break; + case 5: + oled_write_P(PSTR("Function\n"), false); + break; + case 6: + oled_write_P(PSTR("Adjust\n"), false); + break; + default: + oled_write_P(PSTR("Undefined\n"), false); + } + + // Host Keyboard LED Status + led_t led_usb_state = host_keyboard_led_state(); + oled_write_P(led_usb_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); + } else { + // clang-format off + static const char PROGMEM kyria_logo[] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, + 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + // clang-format on + oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); + } +} +#endif + +#ifdef ENCODER_ENABLE +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { + return false; + } + + if (index == 0) { + // Volume control + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } else if (index == 1) { + // Page up/Page down + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } + return true; +} +#endif diff --git a/keyboards/splitkb/kyria/rev1/rev1.h b/keyboards/splitkb/kyria/rev1/rev1.h new file mode 100644 index 000000000..bf9864fe3 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/rev1.h @@ -0,0 +1,67 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "kyria.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R06, R07, R08, R09, R10, R11, \ + L12, L13, L14, L15, L16, L17, R18, R19, R20, R21, R22, R23, \ + L24, L25, L26, L27, L28, L29, L30, L31, R32, R33, R34, R35, R36, R37, R38, R39, \ + L40, L41, L42, L43, L44, R45, R46, R47, R48, R49 \ +) \ +{ \ + { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \ + { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \ + { L31, L30, L29, L28, L27, L26, L25, L24 }, \ + { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \ + { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \ + { R32, R33, R34, R35, R36, R37, R38, R39 }, \ + { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ +} + +#define LAYOUT_stack( \ + L00, L01, L02, L03, L04, L05, \ + L12, L13, L14, L15, L16, L17, \ + L24, L25, L26, L27, L28, L29, L30, L31, \ + L40, L41, L42, L43, L44, \ + \ + R06, R07, R08, R09, R10, R11, \ + R18, R19, R20, R21, R22, R23, \ + R32, R33, R34, R35, R36, R37, R38, R39, \ + R45, R46, R47, R48, R49 \ +) \ +{ \ + { KC_NO, KC_NO, L05, L04, L03, L02, L01, L00 }, \ + { KC_NO, KC_NO, L17, L16, L15, L14, L13, L12 }, \ + { L31, L30, L29, L28, L27, L26, L25, L24 }, \ + { L44, L43, L42, L41, L40, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, R06, R07, R08, R09, R10, R11 }, \ + { KC_NO, KC_NO, R18, R19, R20, R21, R22, R23 }, \ + { R32, R33, R34, R35, R36, R37, R38, R39 }, \ + { R45, R46, R47, R48, R49, KC_NO, KC_NO, KC_NO }, \ +} + +#define LAYOUT_split_3x6_5 LAYOUT diff --git a/keyboards/splitkb/kyria/rev1/rules.mk b/keyboards/splitkb/kyria/rev1/rules.mk new file mode 100644 index 000000000..cc2cbba60 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/rules.mk @@ -0,0 +1,8 @@ +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +ENCODER_ENABLE = yes # ENables the use of one or more encoders +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +RGB_MATRIX_ENABLE = no # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE) +RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support + +RGB_MATRIX_SUPPORTED = yes diff --git a/keyboards/splitkb/kyria/rules.mk b/keyboards/splitkb/kyria/rules.mk new file mode 100644 index 000000000..cc40ef088 --- /dev/null +++ b/keyboards/splitkb/kyria/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +SPLIT_KEYBOARD = yes # Split common +LTO_ENABLE = yes + +DEFAULT_FOLDER = splitkb/kyria/rev1 diff --git a/keyboards/splitkb/zima/config.h b/keyboards/splitkb/zima/config.h index fcfa37ff3..7e79e7f35 100644 --- a/keyboards/splitkb/zima/config.h +++ b/keyboards/splitkb/zima/config.h @@ -20,15 +20,15 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xF75B -#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x8D1D +#define PRODUCT_ID 0xF75B +#define DEVICE_VER 0x0001 #define MANUFACTURER splitkb -#define PRODUCT Zima +#define PRODUCT Zima /* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 3 +#define MATRIX_ROWS 4 +#define MATRIX_COLS 3 /* * Keyboard Matrix Assignments @@ -37,9 +37,8 @@ along with this program. If not, see . { C6, D6, D5 }, \ { C7, F7, D4 }, \ { E6, F5, F6 }, \ - { F0, F1, F4 } \ + { F0, F1, F4 }, \ } - #define UNUSED_PINS #define ENCODERS_PAD_A { B4 } @@ -53,11 +52,11 @@ along with this program. If not, see . #define AUDIO_CLICKY #define NO_MUSIC_MODE -#define RGB_DI_PIN B5 -#define RGBLED_NUM 5 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 +#define RGB_DI_PIN B5 +#define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ #define RGBLIGHT_EFFECT_BREATHING @@ -67,7 +66,7 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_TWINKLE /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 +#define DEBOUNCE 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -77,16 +76,16 @@ along with this program. If not, see . /* Locking resynchronize hack */ // #define LOCKING_RESYNC_ENABLE -#define FB_ERM_LRA 0 -#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ -#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ +#define FB_ERM_LRA 0 +#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ +#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ /* Please refer to your datasheet for the optimal setting for your specific motor. */ -#define RATED_VOLTAGE 3 -#define V_PEAK 5 +#define RATED_VOLTAGE 3 +#define V_PEAK 5 -#define DRV_GREETING alert_750ms -#define DRV_MODE_DEFAULT buzz +#define DRV_GREETING alert_750ms +#define DRV_MODE_DEFAULT buzz // EC11K encoders have a different resolution than other EC11 encoders. // When using the default resolution of 4, if you notice your encoder skipping // every other tick, lower the resolution to 2. diff --git a/keyboards/splitkb/zima/keymaps/drashna/config.h b/keyboards/splitkb/zima/keymaps/drashna/config.h index 91d657eda..133ab6a91 100644 --- a/keyboards/splitkb/zima/keymaps/drashna/config.h +++ b/keyboards/splitkb/zima/keymaps/drashna/config.h @@ -30,3 +30,5 @@ // # define OLED_LOGO_CORNE // # define OLED_LOGO_GOTHAM #define OLED_LOGO_SCIFI + +#define ENCODER_RESOLUTION 2 diff --git a/keyboards/splitkb/zima/keymaps/drashna/keymap.c b/keyboards/splitkb/zima/keymaps/drashna/keymap.c index d9e1f44e2..29d03ec91 100644 --- a/keyboards/splitkb/zima/keymaps/drashna/keymap.c +++ b/keyboards/splitkb/zima/keymaps/drashna/keymap.c @@ -15,13 +15,13 @@ * along with this program. If not, see . */ #include QMK_KEYBOARD_H -#include #ifdef HAPTIC_ENABLE # include "haptic.h" extern haptic_config_t haptic_config; #endif +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_ortho_4x3( /* Base */ KC_MUTE, TG(1), TG(2), @@ -43,12 +43,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { { KC_DOWN, KC_UP } }, + [1] = { { KC_VOLD, KC_VOLU } }, + [2] = { { RGB_MOD, RGB_RMOD} }, +}; +#endif +// clang-format on -static bool is_asleep = false; +static bool is_asleep = false; static uint32_t oled_timer; void render_oled_logo(void) { - // clang-format off + // clang-format off 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, @@ -68,9 +76,7 @@ void render_user_status(void) { oled_write_P(nukem_good[0], haptic_config.enable); } -void keyboard_post_init_user(void) { - oled_scroll_set_speed(0); -} +void keyboard_post_init_user(void) { oled_scroll_set_speed(0); } void oled_task_user(void) { if (is_asleep) { @@ -83,15 +89,35 @@ void oled_task_user(void) { oled_scroll_off(); oled_write_P(PSTR("SplitKB's Zima"), false); char layer[2] = {0}; - snprintf(layer, sizeof(layer), "%d", get_highest_layer(layer_state)); + uint8_t n = get_highest_layer(layer_state); + layer[1] = '\0'; + layer[0] = '0' + n % 10; oled_write_P(PSTR(" L:"), false); oled_write_ln(layer, false); oled_write_ln_P(PSTR("--------------"), false); if (rgblight_is_enabled()) { oled_write_P(PSTR("HSV: "), false); - char rgbs[14]; - snprintf(rgbs, sizeof(rgbs), "%3d, %3d, %3d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); - oled_write_ln(rgbs, false); + char hsv_char[4]; + n = rgblight_get_hue(); + hsv_char[3] = '\0'; + hsv_char[2] = '0' + n % 10; + hsv_char[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; + hsv_char[0] = n / 10 ? '0' + n / 10 : ' '; + oled_write(hsv_char, false); + oled_write_P(PSTR(", "), false); + n = rgblight_get_sat(); + hsv_char[3] = '\0'; + hsv_char[2] = '0' + n % 10; + hsv_char[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; + hsv_char[0] = n / 10 ? '0' + n / 10 : ' '; + oled_write(hsv_char, false); + oled_write_P(PSTR(", "), false); + n = rgblight_get_val(); + hsv_char[3] = '\0'; + hsv_char[2] = '0' + n % 10; + hsv_char[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; + hsv_char[0] = n / 10 ? '0' + n / 10 : ' '; + oled_write_ln(hsv_char, false); } else { oled_write_ln_P(PSTR("RGB LIGHT DISABLED"), false); } @@ -107,13 +133,9 @@ void oled_task_user(void) { } } -void suspend_power_down_user(void) { - is_asleep = true; -} +void suspend_power_down_user(void) { is_asleep = true; } -void suspend_wakeup_init_user(void) { - is_asleep = false; -} +void suspend_wakeup_init_user(void) { is_asleep = false; } bool process_record_user(uint16_t keycode, keyrecord_t* record) { oled_timer = timer_read32(); @@ -121,12 +143,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) { return true; } - bool encoder_update_user(uint8_t index, bool clockwise) { + oled_timer = timer_read32(); if (clockwise) { - tap_code16(KC_VOLU); + tap_code_delay(KC_VOLU, 10); } else { - tap_code16(KC_VOLD); + tap_code_delay(KC_VOLD, 10); } - return true; + return false; } diff --git a/keyboards/splitkb/zima/keymaps/drashna/rules.mk b/keyboards/splitkb/zima/keymaps/drashna/rules.mk index b9a1f7f25..b9dc00915 100644 --- a/keyboards/splitkb/zima/keymaps/drashna/rules.mk +++ b/keyboards/splitkb/zima/keymaps/drashna/rules.mk @@ -1,2 +1,3 @@ # is intentional. won't compile under size, otherwise. USER_NAME := not_drashna +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/splitkb/zima/keymaps/via/config.h b/keyboards/splitkb/zima/keymaps/via/config.h new file mode 100644 index 000000000..5a0e407c9 --- /dev/null +++ b/keyboards/splitkb/zima/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* Copyright 2019 Thomas Baart + * Copyright 2021 Christopher Courtney, aka Drashna Jael're (@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 . + */ + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 8 diff --git a/keyboards/splitkb/zima/keymaps/via/keymap.c b/keyboards/splitkb/zima/keymaps/via/keymap.c new file mode 100644 index 000000000..e9fb001bb --- /dev/null +++ b/keyboards/splitkb/zima/keymaps/via/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2019 Thomas Baart + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // clang-format off + [0] = LAYOUT_ortho_4x3(/* Base */ + KC_MUTE, TG(1), TG(2), + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3 + ), + [1] = LAYOUT_ortho_4x3(/* Layer 1 */ + RESET, _______, XXXXXXX, + AU_ON, AU_OFF, XXXXXXX, + CK_TOGG, XXXXXXX, CK_UP, + CK_RST, XXXXXXX, CK_DOWN + ), + [2] = LAYOUT_ortho_4x3(/* Layer 2*/ + RGB_TOG, RGB_MOD, _______, + RGB_HUI, RGB_SAI, RGB_VAI, + RGB_HUD, RGB_SAD, RGB_VAD, + HPT_TOG, HPT_FBK, HPT_CONT + ), + [3] = LAYOUT_ortho_4x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [4] = LAYOUT_ortho_4x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [5] = LAYOUT_ortho_4x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [6] = LAYOUT_ortho_4x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), + [7] = LAYOUT_ortho_4x3( + _______, _______, _______, + _______, _______, _______, + _______, _______, _______, + _______, _______, _______ + ), +}; diff --git a/keyboards/splitkb/zima/keymaps/via/rules.mk b/keyboards/splitkb/zima/keymaps/via/rules.mk new file mode 100644 index 000000000..1eb438e46 --- /dev/null +++ b/keyboards/splitkb/zima/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +HAPTIC_ENABLE = no diff --git a/keyboards/splitkb/zima/rules.mk b/keyboards/splitkb/zima/rules.mk index 71c9dc6e8..e069e1481 100644 --- a/keyboards/splitkb/zima/rules.mk +++ b/keyboards/splitkb/zima/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,8 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = yes # Audio output ENCODER_ENABLE = yes # ENables the use of one or more encoders -OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enables the use of OLED displays HAPTIC_ENABLE += DRV2605L # Supported but not included by defaut LTO_ENABLE = yes diff --git a/keyboards/splitkb/zima/zima.c b/keyboards/splitkb/zima/zima.c index 74f9c84a7..6570f3449 100644 --- a/keyboards/splitkb/zima/zima.c +++ b/keyboards/splitkb/zima/zima.c @@ -21,7 +21,7 @@ extern haptic_config_t haptic_config; #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static bool is_asleep = false; static uint32_t oled_timer; @@ -94,7 +94,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { #ifdef ENCODER_ENABLE bool encoder_update_kb(uint8_t index, bool clockwise) { -# ifdef OLED_DRIVER_ENABLE +# ifdef OLED_ENABLE oled_timer = timer_read32(); # endif # if defined(AUDIO_ENABLE) && defined(AUDIO_CLICKY) diff --git a/keyboards/splitreus62/rules.mk b/keyboards/splitreus62/rules.mk index ce1ec3b87..fb6ae65f4 100644 --- a/keyboards/splitreus62/rules.mk +++ b/keyboards/splitreus62/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI controls BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/splitty/rules.mk b/keyboards/splitty/rules.mk index 56572fe8a..c943a825f 100644 --- a/keyboards/splitty/rules.mk +++ b/keyboards/splitty/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/squiggle/rev1/rules.mk b/keyboards/squiggle/rev1/rules.mk index 71d218e25..277c3612f 100644 --- a/keyboards/squiggle/rev1/rules.mk +++ b/keyboards/squiggle/rev1/rules.mk @@ -3,7 +3,7 @@ MCU = atmega32u4 BOOTLOADER = caterina -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -14,7 +14,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output diff --git a/keyboards/standaside/config.h b/keyboards/standaside/config.h index 23ae52d7c..d6d60fd96 100644 --- a/keyboards/standaside/config.h +++ b/keyboards/standaside/config.h @@ -150,23 +150,3 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/standaside/rules.mk b/keyboards/standaside/rules.mk index b0bcf9c14..78ad779f1 100644 --- a/keyboards/standaside/rules.mk +++ b/keyboards/standaside/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/staryu/readme.md b/keyboards/staryu/readme.md deleted file mode 100644 index 1b2f9e8f5..000000000 --- a/keyboards/staryu/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# Staryu - -![Staryu](https://i.imgur.com/obcCpZN.jpg) - -A 5 key macropad, designed by Kai and sold by KPRepublic. - -Keyboard Maintainer: QMK Community -Hardware Supported: Staryu (only the non-lite version has been tested) -Hardware Availability: [AliExpress](https://www.aliexpress.com/item/Staryu-Mini-Macro-Pad-custom-keyboard-by-tkg-kai-Mini-macro-pad-mechanical-keyboard-5-keys/32817560746.html) - -Make example for this keyboard (after setting up your build environment): - - make staryu:default - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/staryu/rules.mk b/keyboards/staryu/rules.mk deleted file mode 100755 index 83b6ceaec..000000000 --- a/keyboards/staryu/rules.mk +++ /dev/null @@ -1,31 +0,0 @@ -# MCU name -MCU = atmega32u2 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = lufa-dfu - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/steal_this_keyboard/rules.mk b/keyboards/steal_this_keyboard/rules.mk index ce4d52156..d48beb97c 100644 --- a/keyboards/steal_this_keyboard/rules.mk +++ b/keyboards/steal_this_keyboard/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/stella/rules.mk b/keyboards/stella/rules.mk index 6ffd641e7..bd7ea5427 100644 --- a/keyboards/stella/rules.mk +++ b/keyboards/stella/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/stratos/rules.mk b/keyboards/stratos/rules.mk index f5fd19f2c..17da945ed 100644 --- a/keyboards/stratos/rules.mk +++ b/keyboards/stratos/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/studiokestra/cascade/rules.mk b/keyboards/studiokestra/cascade/rules.mk index 76528fcf9..14dff880f 100644 --- a/keyboards/studiokestra/cascade/rules.mk +++ b/keyboards/studiokestra/cascade/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/studiokestra/nue/rules.mk b/keyboards/studiokestra/nue/rules.mk index 59fb880c7..cb0668234 100644 --- a/keyboards/studiokestra/nue/rules.mk +++ b/keyboards/studiokestra/nue/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/subatomic/rules.mk b/keyboards/subatomic/rules.mk index 0d77351f3..95af9210e 100644 --- a/keyboards/subatomic/rules.mk +++ b/keyboards/subatomic/rules.mk @@ -15,19 +15,18 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = yes # MIDI controls +MIDI_ENABLE = yes # MIDI support AUDIO_ENABLE = no # Audio output UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/suihankey/alpha/config.h b/keyboards/suihankey/alpha/config.h index ff0498abb..c63592298 100644 --- a/keyboards/suihankey/alpha/config.h +++ b/keyboards/suihankey/alpha/config.h @@ -189,26 +189,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/suihankey/alpha/keymaps/default/keymap.c b/keyboards/suihankey/alpha/keymaps/default/keymap.c index e7c7da4b8..852334d87 100644 --- a/keyboards/suihankey/alpha/keymaps/default/keymap.c +++ b/keyboards/suihankey/alpha/keymaps/default/keymap.c @@ -71,7 +71,7 @@ void led_set_user(uint8_t usb_led) { } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { diff --git a/keyboards/suihankey/rev1/config.h b/keyboards/suihankey/rev1/config.h index 889cb0cad..ddc8b95d6 100644 --- a/keyboards/suihankey/rev1/config.h +++ b/keyboards/suihankey/rev1/config.h @@ -189,26 +189,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/suihankey/rev1/keymaps/default/keymap.c b/keyboards/suihankey/rev1/keymaps/default/keymap.c index e7c7da4b8..852334d87 100644 --- a/keyboards/suihankey/rev1/keymaps/default/keymap.c +++ b/keyboards/suihankey/rev1/keymaps/default/keymap.c @@ -71,7 +71,7 @@ void led_set_user(uint8_t usb_led) { } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { diff --git a/keyboards/suihankey/rules.mk b/keyboards/suihankey/rules.mk index 706d6464e..dc4b5b83a 100644 --- a/keyboards/suihankey/rules.mk +++ b/keyboards/suihankey/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,11 +25,11 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 SPLIT_KEYBOARD = no DEFAULT_FOLDER = suihankey/rev1 diff --git a/keyboards/suihankey/split/alpha/config.h b/keyboards/suihankey/split/alpha/config.h index b0e4311be..b54744afb 100644 --- a/keyboards/suihankey/split/alpha/config.h +++ b/keyboards/suihankey/split/alpha/config.h @@ -189,26 +189,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/suihankey/split/rev1/config.h b/keyboards/suihankey/split/rev1/config.h index 362816327..f2d8239db 100644 --- a/keyboards/suihankey/split/rev1/config.h +++ b/keyboards/suihankey/split/rev1/config.h @@ -189,26 +189,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/suihankey/split/rules.mk b/keyboards/suihankey/split/rules.mk index b5d2dc8e8..f0bdf744e 100644 --- a/keyboards/suihankey/split/rules.mk +++ b/keyboards/suihankey/split/rules.mk @@ -1,4 +1,4 @@ -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no SPLIT_KEYBOARD = yes DEFAULT_FOLDER = suihankey/split/rev1 diff --git a/keyboards/swiftrax/retropad/rules.mk b/keyboards/swiftrax/retropad/rules.mk index 8771c701d..5a3a81abc 100644 --- a/keyboards/swiftrax/retropad/rules.mk +++ b/keyboards/swiftrax/retropad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/switchplate/southpaw_65/config.h b/keyboards/switchplate/southpaw_65/config.h index 6b7952283..ee6567b23 100644 --- a/keyboards/switchplate/southpaw_65/config.h +++ b/keyboards/switchplate/southpaw_65/config.h @@ -182,26 +182,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/switchplate/southpaw_65/rules.mk b/keyboards/switchplate/southpaw_65/rules.mk index 2a9da62ac..f257d8c86 100644 --- a/keyboards/switchplate/southpaw_65/rules.mk +++ b/keyboards/switchplate/southpaw_65/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/switchplate/southpaw_fullsize/rules.mk b/keyboards/switchplate/southpaw_fullsize/rules.mk index bd1eea303..2c585cc9a 100644 --- a/keyboards/switchplate/southpaw_fullsize/rules.mk +++ b/keyboards/switchplate/southpaw_fullsize/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/switchplate/switchplate910/rules.mk b/keyboards/switchplate/switchplate910/rules.mk index 6e53d4cab..bbdf52f86 100644 --- a/keyboards/switchplate/switchplate910/rules.mk +++ b/keyboards/switchplate/switchplate910/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sx60/rules.mk b/keyboards/sx60/rules.mk index 6443ca6a4..8c2ad5259 100755 --- a/keyboards/sx60/rules.mk +++ b/keyboards/sx60/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tada68/keymaps/abishalom/rules.mk b/keyboards/tada68/keymaps/abishalom/rules.mk index 1112b40d7..b04b98e57 100644 --- a/keyboards/tada68/keymaps/abishalom/rules.mk +++ b/keyboards/tada68/keymaps/abishalom/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tada68/keymaps/ardakilic/rules.mk b/keyboards/tada68/keymaps/ardakilic/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/tada68/keymaps/ardakilic/rules.mk +++ b/keyboards/tada68/keymaps/ardakilic/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/bazooka/rules.mk b/keyboards/tada68/keymaps/bazooka/rules.mk index b2789a78a..697e093ed 100644 --- a/keyboards/tada68/keymaps/bazooka/rules.mk +++ b/keyboards/tada68/keymaps/bazooka/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/cheese/rules.mk b/keyboards/tada68/keymaps/cheese/rules.mk index b2789a78a..697e093ed 100644 --- a/keyboards/tada68/keymaps/cheese/rules.mk +++ b/keyboards/tada68/keymaps/cheese/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/dlg/rules.mk b/keyboards/tada68/keymaps/dlg/rules.mk index 2e0f1a661..021059686 100644 --- a/keyboards/tada68/keymaps/dlg/rules.mk +++ b/keyboards/tada68/keymaps/dlg/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/emdarcher/keymap.c b/keyboards/tada68/keymaps/emdarcher/keymap.c index 642b4d8fa..d6ac2f7bc 100755 --- a/keyboards/tada68/keymaps/emdarcher/keymap.c +++ b/keyboards/tada68/keymaps/emdarcher/keymap.c @@ -5,7 +5,7 @@ #define _CL 2 #define _ML 3 -#define KC_X0 LT(_CL, KC_CAPS) +#define KC_X0 LT(_CL, KC_CAPS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //layer state control -uint32_t layer_state_set_user(uint32_t state){ +layer_state_t layer_state_set_user(layer_state_t state){ //switch to _ML if both _FL and _CL are activated return update_tri_layer_state(state, _FL, _CL, _ML); } diff --git a/keyboards/tada68/keymaps/fakb/rules.mk b/keyboards/tada68/keymaps/fakb/rules.mk index 47fd29663..043515605 100644 --- a/keyboards/tada68/keymaps/fakb/rules.mk +++ b/keyboards/tada68/keymaps/fakb/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/fezzant/rules.mk b/keyboards/tada68/keymaps/fezzant/rules.mk index 7b32f0a66..705fc39e2 100644 --- a/keyboards/tada68/keymaps/fezzant/rules.mk +++ b/keyboards/tada68/keymaps/fezzant/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/iso-nor/rules.mk b/keyboards/tada68/keymaps/iso-nor/rules.mk index 5cbbc3453..00ecf0184 100644 --- a/keyboards/tada68/keymaps/iso-nor/rules.mk +++ b/keyboards/tada68/keymaps/iso-nor/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tada68/keymaps/iso-uk/rules.mk b/keyboards/tada68/keymaps/iso-uk/rules.mk index 5cbbc3453..00ecf0184 100644 --- a/keyboards/tada68/keymaps/iso-uk/rules.mk +++ b/keyboards/tada68/keymaps/iso-uk/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tada68/keymaps/isoish/rules.mk b/keyboards/tada68/keymaps/isoish/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/tada68/keymaps/isoish/rules.mk +++ b/keyboards/tada68/keymaps/isoish/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/kbp-v60/rules.mk b/keyboards/tada68/keymaps/kbp-v60/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/tada68/keymaps/kbp-v60/rules.mk +++ b/keyboards/tada68/keymaps/kbp-v60/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/mattdicarlo/rules.mk b/keyboards/tada68/keymaps/mattdicarlo/rules.mk index 739b73997..9f973f158 100644 --- a/keyboards/tada68/keymaps/mattdicarlo/rules.mk +++ b/keyboards/tada68/keymaps/mattdicarlo/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/mattgemmell/rules.mk b/keyboards/tada68/keymaps/mattgemmell/rules.mk index 020d12635..5425d055f 100644 --- a/keyboards/tada68/keymaps/mattgemmell/rules.mk +++ b/keyboards/tada68/keymaps/mattgemmell/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/mlechner/rules.mk b/keyboards/tada68/keymaps/mlechner/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/tada68/keymaps/mlechner/rules.mk +++ b/keyboards/tada68/keymaps/mlechner/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/mtdjr/rules.mk b/keyboards/tada68/keymaps/mtdjr/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/tada68/keymaps/mtdjr/rules.mk +++ b/keyboards/tada68/keymaps/mtdjr/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/onelivesleft/rules.mk b/keyboards/tada68/keymaps/onelivesleft/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/tada68/keymaps/onelivesleft/rules.mk +++ b/keyboards/tada68/keymaps/onelivesleft/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/pascamel/rules.mk b/keyboards/tada68/keymaps/pascamel/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/tada68/keymaps/pascamel/rules.mk +++ b/keyboards/tada68/keymaps/pascamel/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/raylas/rules.mk b/keyboards/tada68/keymaps/raylas/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/tada68/keymaps/raylas/rules.mk +++ b/keyboards/tada68/keymaps/raylas/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/rbong/rules.mk b/keyboards/tada68/keymaps/rbong/rules.mk index b2789a78a..697e093ed 100644 --- a/keyboards/tada68/keymaps/rbong/rules.mk +++ b/keyboards/tada68/keymaps/rbong/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/rgb/rules.mk b/keyboards/tada68/keymaps/rgb/rules.mk index 247c98616..7cffca44f 100644 --- a/keyboards/tada68/keymaps/rgb/rules.mk +++ b/keyboards/tada68/keymaps/rgb/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tada68/keymaps/rys/rules.mk b/keyboards/tada68/keymaps/rys/rules.mk index eb868df07..48aa308d5 100644 --- a/keyboards/tada68/keymaps/rys/rules.mk +++ b/keyboards/tada68/keymaps/rys/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/sm0g/rules.mk b/keyboards/tada68/keymaps/sm0g/rules.mk index 0826db755..7f95d4bd8 100644 --- a/keyboards/tada68/keymaps/sm0g/rules.mk +++ b/keyboards/tada68/keymaps/sm0g/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/stephengrier/rules.mk b/keyboards/tada68/keymaps/stephengrier/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/tada68/keymaps/stephengrier/rules.mk +++ b/keyboards/tada68/keymaps/stephengrier/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/trashcat/rules.mk b/keyboards/tada68/keymaps/trashcat/rules.mk index 488111732..e0ec1dc43 100644 --- a/keyboards/tada68/keymaps/trashcat/rules.mk +++ b/keyboards/tada68/keymaps/trashcat/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/tshack/rules.mk b/keyboards/tada68/keymaps/tshack/rules.mk index 1a3bda460..ef343bd7e 100644 --- a/keyboards/tada68/keymaps/tshack/rules.mk +++ b/keyboards/tada68/keymaps/tshack/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/unix/rules.mk b/keyboards/tada68/keymaps/unix/rules.mk index 316106c03..bcb15ec5e 100644 --- a/keyboards/tada68/keymaps/unix/rules.mk +++ b/keyboards/tada68/keymaps/unix/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/keymaps/wamsm_tada/rules.mk b/keyboards/tada68/keymaps/wamsm_tada/rules.mk index 53644093d..14367f2f8 100644 --- a/keyboards/tada68/keymaps/wamsm_tada/rules.mk +++ b/keyboards/tada68/keymaps/wamsm_tada/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tada68/rules.mk b/keyboards/tada68/rules.mk index 47fdba555..7ccc893ea 100755 --- a/keyboards/tada68/rules.mk +++ b/keyboards/tada68/rules.mk @@ -17,7 +17,7 @@ BOOTLOADER_SIZE = 6144 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/takashicompany/endzone34/keymaps/default/keymap.c b/keyboards/takashicompany/endzone34/keymaps/default/keymap.c index 7317ab477..eb0ea5029 100644 --- a/keyboards/takashicompany/endzone34/keymaps/default/keymap.c +++ b/keyboards/takashicompany/endzone34/keymaps/default/keymap.c @@ -18,27 +18,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( - LT(2, KC_Q), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - KC_A, KC_S, LT(2, KC_D), KC_F, KC_G, KC_H, KC_J, LT(2, KC_K), KC_L, KC_ENT, - SFT_T(KC_Z), GUI_T(KC_X), KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, CTL_T(KC_DOT), KC_BSPC, + LT(2, KC_Q), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, LT(2, KC_D), KC_F, KC_G, KC_H, KC_J, LT(2, KC_K), KC_L, KC_ENT, + SFT_T(KC_Z), GUI_T(KC_X), KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, CTL_T(KC_DOT), KC_BSPC, ALT_T(KC_LANG2), SFT_T(KC_TAB), KC_SPC, LT(1, KC_LANG1)), LAYOUT( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, - CTL_T(KC_EQL), KC_LBRC, KC_SLSH, KC_MINS, KC_RO, KC_SCLN, KC_QUOT, KC_RBRC, KC_NUHS, KC_JYEN, - KC_LSFT, KC_LGUI, KC_LALT, KC_LANG2, KC_LSFT, KC_SPC, KC_LANG1, KC_TRNS, KC_TRNS, KC_DEL, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + CTL_T(KC_EQL), KC_LBRC, KC_SLSH, KC_MINS, KC_RO, KC_SCLN, KC_QUOT, KC_RBRC, KC_NUHS, KC_JYEN, + KC_LSFT, KC_LGUI, KC_LALT, KC_LANG2, KC_LSFT, KC_SPC, KC_LANG1, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), LAYOUT( - KC_ESC, KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, - KC_LCTL, KC_TRNS, KC_QUES, KC_EXLM, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, - KC_LSFT, KC_LGUI, KC_LALT, KC_LANG2, KC_TRNS, KC_TRNS, KC_LANG1, KC_NO, MO(3), KC_DEL, + KC_ESC, KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, + KC_LCTL, KC_TRNS, KC_QUES, KC_EXLM, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, + KC_LSFT, KC_LGUI, KC_LALT, KC_LANG2, KC_TRNS, KC_TRNS, KC_LANG1, KC_NO, MO(3), KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), LAYOUT( - RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, - RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, - RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, RGB_M_T, KC_F11, KC_F12, KC_CAPS, KC_NO, KC_NO, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, RGB_M_T, KC_F11, KC_F12, KC_CAPS, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; @@ -59,18 +59,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { - + static const char PROGMEM my_logo[] = { - 0x00, 0x00, 0x00, 0xff, 0x01, 0x01, 0x39, 0x29, 0x29, 0x29, 0x29, 0x29, 0xe9, 0x0f, 0x00, 0x00, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf8, 0x08, 0xf8, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x80, 0x80, 0xbf, 0xa0, 0xa0, 0xa7, 0xa5, 0xa5, 0xa5, 0xa5, 0x25, 0x25, 0x3c, 0x00, 0x1f, - 0x20, 0x3e, 0x02, 0x3e, 0x20, 0x1f, 0x20, 0x2e, 0x2a, 0x2e, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, - 0x87, 0x44, 0x24, 0x14, 0x0c, 0x00, 0xc0, 0xa0, 0x90, 0x88, 0x87, 0x00, 0xe0, 0x10, 0xd0, 0x50, - 0xd0, 0x10, 0xe0, 0x10, 0xd0, 0x50, 0xd0, 0x10, 0xe0, 0x10, 0xd0, 0x50, 0x50, 0x10, 0xf0, 0x00, - 0x07, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x07, 0x00, 0x03, 0x04, 0x05, 0x05, + 0x00, 0x00, 0x00, 0xff, 0x01, 0x01, 0x39, 0x29, 0x29, 0x29, 0x29, 0x29, 0xe9, 0x0f, 0x00, 0x00, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf8, 0x08, 0xf8, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 0x80, 0xbf, 0xa0, 0xa0, 0xa7, 0xa5, 0xa5, 0xa5, 0xa5, 0x25, 0x25, 0x3c, 0x00, 0x1f, + 0x20, 0x3e, 0x02, 0x3e, 0x20, 0x1f, 0x20, 0x2e, 0x2a, 0x2e, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, + 0x87, 0x44, 0x24, 0x14, 0x0c, 0x00, 0xc0, 0xa0, 0x90, 0x88, 0x87, 0x00, 0xe0, 0x10, 0xd0, 0x50, + 0xd0, 0x10, 0xe0, 0x10, 0xd0, 0x50, 0xd0, 0x10, 0xe0, 0x10, 0xd0, 0x50, 0x50, 0x10, 0xf0, 0x00, + 0x07, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x07, 0x00, 0x03, 0x04, 0x05, 0x05, 0x05, 0x04, 0x03, 0x04, 0x07, 0x00, 0x07, 0x04, 0x03, 0x04, 0x05, 0x05, 0x05, 0x05, 0x07, 0x00 }; @@ -107,6 +107,6 @@ void oled_task_user(void) { count_str[0] = m / 10 ? '0' + m / 10 : ' '; oled_write_ln(count_str, false); - + } #endif diff --git a/keyboards/takashicompany/endzone34/rules.mk b/keyboards/takashicompany/endzone34/rules.mk index 9a4130536..6fe2bafef 100644 --- a/keyboards/takashicompany/endzone34/rules.mk +++ b/keyboards/takashicompany/endzone34/rules.mk @@ -20,4 +20,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/taleguers/taleguers75/rules.mk b/keyboards/taleguers/taleguers75/rules.mk index 928f9ba59..3bb907a9d 100644 --- a/keyboards/taleguers/taleguers75/rules.mk +++ b/keyboards/taleguers/taleguers75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tanuki/keymaps/tucznak/rules.mk b/keyboards/tanuki/keymaps/tucznak/rules.mk index 5c5263eae..627c89394 100644 --- a/keyboards/tanuki/keymaps/tucznak/rules.mk +++ b/keyboards/tanuki/keymaps/tucznak/rules.mk @@ -4,7 +4,7 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/tanuki/rules.mk b/keyboards/tanuki/rules.mk index f8a4ecec3..4b656bbed 100644 --- a/keyboards/tanuki/rules.mk +++ b/keyboards/tanuki/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE =yes # Enable keyboard underlight functionality BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/tau4/keymaps/default/keymap.c b/keyboards/tau4/keymaps/default/keymap.c index f5585ce2a..1a1e5b38c 100755 --- a/keyboards/tau4/keymaps/default/keymap.c +++ b/keyboards/tau4/keymaps/default/keymap.c @@ -113,7 +113,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_status(void) { oled_write_P(PSTR("Tau.4 v1.0\n\n"), false); diff --git a/keyboards/tau4/rules.mk b/keyboards/tau4/rules.mk index 712646abc..d483fcb65 100755 --- a/keyboards/tau4/rules.mk +++ b/keyboards/tau4/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,7 +21,8 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes # Rotary Encoder support -OLED_DRIVER_ENABLE = yes # OLED display support +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # OLED display support # EEPROM_DRIVER ?= i2c # Driver for external EEPROM chip # This is currently not working due to QMK not officially supporting the chip used on the Tau4, I am working on a fix. diff --git a/keyboards/team0110/p1800fl/config.h b/keyboards/team0110/p1800fl/config.h new file mode 100644 index 000000000..75e63c75c --- /dev/null +++ b/keyboards/team0110/p1800fl/config.h @@ -0,0 +1,83 @@ +/* +Copyright 2020 marhalloweenvt + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3EAE +#define DEVICE_VER 0x0001 +#define MANUFACTURER team0110 +#define PRODUCT p1800fl + +/* key matrix size */ +#define MATRIX_ROWS 6 +#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 { B6, B5, B4, D7, D6, D4 } +#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, E6, B0, B1, B2, B3, D0, D1, D2} +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +/* RGB Lighting */ +#define RGB_DI_PIN C6 +#ifdef RGB_DI_PIN +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 8 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 255 +# define RGBLIGHT_SLEEP +#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 + +/* 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 \ No newline at end of file diff --git a/keyboards/team0110/p1800fl/info.json b/keyboards/team0110/p1800fl/info.json new file mode 100644 index 000000000..164f921de --- /dev/null +++ b/keyboards/team0110/p1800fl/info.json @@ -0,0 +1,99 @@ +{ + "keyboard_name": "p1800fl", + "url": "http://team0110.store/", + "maintainer": "team0110", + "width": 19.5, + "height": 5.25, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"Num Lock", "x":15.5, "y":0}, + {"label":"/", "x":16.5, "y":0}, + {"label":"*", "x":17.5, "y":0}, + {"label":"-", "x":18.5, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"7", "x":15.5, "y":1}, + {"label":"8", "x":16.5, "y":1}, + {"label":"9", "x":17.5, "y":1}, + {"label":"+", "x":18.5, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25}, + {"label":"4", "x":15.5, "y":2}, + {"label":"5", "x":16.5, "y":2}, + {"label":"6", "x":17.5, "y":2}, + {"label":"+", "x":18.5, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"Shift", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14.25, "y":3.25}, + {"label":"1", "x":15.5, "y":3}, + {"label":"2", "x":16.5, "y":3}, + {"label":"3", "x":17.5, "y":3}, + {"label":"Enter", "x":18.5, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"6.25x", "x":3.75, "y":4, "w":6.25}, + {"label":"Ctrl", "x":10, "y":4}, + {"label":"Win", "x":11, "y":4}, + {"label":"Alt", "x":12, "y":4}, + {"label":"Left", "x":13.25, "y":4.25}, + {"label":"Down", "x":14.25, "y":4.25}, + {"label":"Right", "x":15.25, "y":4.25}, + {"label":"0", "x":16.5, "y":4}, + {"label":".", "x":17.5, "y":4}, + {"label":"Enter", "x":18.5, "y":4} + ] + } + } +} diff --git a/keyboards/team0110/p1800fl/keymaps/default/keymap.c b/keyboards/team0110/p1800fl/keymaps/default/keymap.c new file mode 100644 index 000000000..e0a3ad35c --- /dev/null +++ b/keyboards/team0110/p1800fl/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2020 marhalloweenvt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [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_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PEQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_INS, KC_HOME, KC_PGUP, _______, + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDOWN, _______, + _______, _______, BL_TOGG, BL_BRTG, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/handwired/p1800fl/keymaps/default/readme.md b/keyboards/team0110/p1800fl/keymaps/default/readme.md similarity index 100% rename from keyboards/handwired/p1800fl/keymaps/default/readme.md rename to keyboards/team0110/p1800fl/keymaps/default/readme.md diff --git a/keyboards/team0110/p1800fl/keymaps/via/keymap.c b/keyboards/team0110/p1800fl/keymaps/via/keymap.c new file mode 100644 index 000000000..9cd55ff54 --- /dev/null +++ b/keyboards/team0110/p1800fl/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 marhalloweenvt + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [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_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PEQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, _______, + _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_INS, KC_HOME, KC_PGUP, _______, + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDOWN, _______, + _______, _______, BL_TOGG, BL_BRTG, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLU, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/team0110/p1800fl/keymaps/via/readme.md b/keyboards/team0110/p1800fl/keymaps/via/readme.md new file mode 100644 index 000000000..fabc3229f --- /dev/null +++ b/keyboards/team0110/p1800fl/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default VIA keymap for p1800fl diff --git a/keyboards/team0110/p1800fl/keymaps/via/rules.mk b/keyboards/team0110/p1800fl/keymaps/via/rules.mk new file mode 100644 index 000000000..036bd6d1c --- /dev/null +++ b/keyboards/team0110/p1800fl/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/handwired/p1800fl/p1800fl.c b/keyboards/team0110/p1800fl/p1800fl.c similarity index 100% rename from keyboards/handwired/p1800fl/p1800fl.c rename to keyboards/team0110/p1800fl/p1800fl.c diff --git a/keyboards/handwired/p1800fl/p1800fl.h b/keyboards/team0110/p1800fl/p1800fl.h similarity index 100% rename from keyboards/handwired/p1800fl/p1800fl.h rename to keyboards/team0110/p1800fl/p1800fl.h diff --git a/keyboards/team0110/p1800fl/readme.md b/keyboards/team0110/p1800fl/readme.md new file mode 100644 index 000000000..a9f50ddb7 --- /dev/null +++ b/keyboards/team0110/p1800fl/readme.md @@ -0,0 +1,15 @@ +# p1800fl + +![p1800fl](https://i.imgur.com/GQd28rNh.jpg) + +A 1800 Frow-less keyboard project from our team. + +* Keyboard Maintainer: [team0110](https://github.com/team0110) +* Hardware Supported: p1800fl PCB +* Hardware Availability: http://team0110.store/ + +Make example for this keyboard (after setting up your build environment): + + make team0110/p1800fl:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/team0110/p1800fl/rules.mk b/keyboards/team0110/p1800fl/rules.mk new file mode 100644 index 000000000..b91f40ae3 --- /dev/null +++ b/keyboards/team0110/p1800fl/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 # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/technika/rules.mk b/keyboards/technika/rules.mk index 50e88b591..da3111335 100644 --- a/keyboards/technika/rules.mk +++ b/keyboards/technika/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/telophase/rules.mk b/keyboards/telophase/rules.mk index d475836b7..b3ea85670 100644 --- a/keyboards/telophase/rules.mk +++ b/keyboards/telophase/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/tempo_turtle/bradpad/rules.mk b/keyboards/tempo_turtle/bradpad/rules.mk index c0685cf30..1796504f8 100644 --- a/keyboards/tempo_turtle/bradpad/rules.mk +++ b/keyboards/tempo_turtle/bradpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tender/macrowo_pad/keymaps/default/keymap.c b/keyboards/tender/macrowo_pad/keymaps/default/keymap.c index f3ee17995..fc3a45c98 100644 --- a/keyboards/tender/macrowo_pad/keymaps/default/keymap.c +++ b/keyboards/tender/macrowo_pad/keymaps/default/keymap.c @@ -39,15 +39,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO), - + [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) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_270; + return OLED_ROTATION_270; } void oled_task_user(void) { diff --git a/keyboards/tender/macrowo_pad/keymaps/default/rules.mk b/keyboards/tender/macrowo_pad/keymaps/default/rules.mk index b898ed179..fd3d5d7e5 100644 --- a/keyboards/tender/macrowo_pad/keymaps/default/rules.mk +++ b/keyboards/tender/macrowo_pad/keymaps/default/rules.mk @@ -1 +1,2 @@ -OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C \ No newline at end of file +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C diff --git a/keyboards/tender/macrowo_pad/keymaps/via/keymap.c b/keyboards/tender/macrowo_pad/keymaps/via/keymap.c index 9f527fd9e..84c7e3e44 100644 --- a/keyboards/tender/macrowo_pad/keymaps/via/keymap.c +++ b/keyboards/tender/macrowo_pad/keymaps/via/keymap.c @@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO, SAY_OWO), - + [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), @@ -53,9 +53,9 @@ 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) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_270; + return OLED_ROTATION_270; } void oled_task_user(void) { diff --git a/keyboards/tender/macrowo_pad/keymaps/via/rules.mk b/keyboards/tender/macrowo_pad/keymaps/via/rules.mk index 0d102b41e..d3ac2585b 100644 --- a/keyboards/tender/macrowo_pad/keymaps/via/rules.mk +++ b/keyboards/tender/macrowo_pad/keymaps/via/rules.mk @@ -1,2 +1,3 @@ VIA_ENABLE = yes -OLED_DRIVER_ENABLE = yes # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 # Enable Support for SSD1306 or SH1106 OLED Displays; Communicating over I2C diff --git a/keyboards/tender/macrowo_pad/rules.mk b/keyboards/tender/macrowo_pad/rules.mk index 9d5d7c8ce..400128468 100644 --- a/keyboards/tender/macrowo_pad/rules.mk +++ b/keyboards/tender/macrowo_pad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE @@ -16,7 +16,6 @@ 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 -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/tenki/rules.mk b/keyboards/tenki/rules.mk index e96881cc0..76ca49038 100644 --- a/keyboards/tenki/rules.mk +++ b/keyboards/tenki/rules.mk @@ -13,7 +13,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h index 985110d16..907c94ff5 100644 --- a/keyboards/terrazzo/config.h +++ b/keyboards/terrazzo/config.h @@ -83,13 +83,13 @@ so there is only one configuration. */ #ifdef LED_MATRIX_ENABLE -#define LED_DRIVER_ADDR_1 0x74 +#define LED_DRIVER_ADDR_1 0x74 #define LED_DRIVER_COUNT 1 #define DRIVER_LED_TOTAL 105 #define LED_MATRIX_ROWS 15 #define LED_MATRIX_COLS 7 #define LED_MATRIX_MAXIMUM_BRIGHTNESS 20 -#define LED_DISABLE_WHEN_USB_SUSPENDED true +#define LED_DISABLE_WHEN_USB_SUSPENDED #define DISABLE_LED_MATRIX_ALPHAS_MODS #define DISABLE_LED_MATRIX_BREATHING diff --git a/keyboards/terrazzo/rules.mk b/keyboards/terrazzo/rules.mk index 719c6cb1f..5ccf2b032 100644 --- a/keyboards/terrazzo/rules.mk +++ b/keyboards/terrazzo/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/terrazzo/terrazzo.c b/keyboards/terrazzo/terrazzo.c index e6ba1f6c3..19ac6be49 100644 --- a/keyboards/terrazzo/terrazzo.c +++ b/keyboards/terrazzo/terrazzo.c @@ -21,7 +21,7 @@ #include "print.h" #include "quantum.h" -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * https://cdn-learn.adafruit.com/downloads/pdf/adafruit-15x7-7x15-charlieplex-led-matrix-charliewing-featherwing.pdf */ diff --git a/keyboards/tetris/rules.mk b/keyboards/tetris/rules.mk index ca5a11333..7f5dae3a4 100755 --- a/keyboards/tetris/rules.mk +++ b/keyboards/tetris/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tg4x/config.h b/keyboards/tg4x/config.h index ca42b76ea..915ae130e 100644 --- a/keyboards/tg4x/config.h +++ b/keyboards/tg4x/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/tg4x/rules.mk b/keyboards/tg4x/rules.mk index 967eab5b7..c0a897f9c 100644 --- a/keyboards/tg4x/rules.mk +++ b/keyboards/tg4x/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 = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/tgr/910/rules.mk b/keyboards/tgr/910/rules.mk index 981f6b514..fe033da5e 100644 --- a/keyboards/tgr/910/rules.mk +++ b/keyboards/tgr/910/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/tgr/910ce/rules.mk b/keyboards/tgr/910ce/rules.mk index 743a70733..acfe2d76d 100644 --- a/keyboards/tgr/910ce/rules.mk +++ b/keyboards/tgr/910ce/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tgr/alice/rules.mk b/keyboards/tgr/alice/rules.mk index 39af20ef9..6c2e11421 100644 --- a/keyboards/tgr/alice/rules.mk +++ b/keyboards/tgr/alice/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/tgr/jane/rules.mk b/keyboards/tgr/jane/rules.mk index 75ab2bc5b..eb43dd7d5 100644 --- a/keyboards/tgr/jane/rules.mk +++ b/keyboards/tgr/jane/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/tgr/tris/rules.mk b/keyboards/tgr/tris/rules.mk index 358ab6dcc..96a25c4c1 100644 --- a/keyboards/tgr/tris/rules.mk +++ b/keyboards/tgr/tris/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/the_royal/liminal/rules.mk b/keyboards/the_royal/liminal/rules.mk index bb00fdfa0..e5317c535 100644 --- a/keyboards/the_royal/liminal/rules.mk +++ b/keyboards/the_royal/liminal/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # - change yes to no to disable -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/the_royal/schwann/rules.mk b/keyboards/the_royal/schwann/rules.mk index 9317699f5..161112e99 100644 --- a/keyboards/the_royal/schwann/rules.mk +++ b/keyboards/the_royal/schwann/rules.mk @@ -15,7 +15,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/the_ruler/rules.mk b/keyboards/the_ruler/rules.mk index bfcc09261..cb2732495 100644 --- a/keyboards/the_ruler/rules.mk +++ b/keyboards/the_ruler/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/the_uni/rules.mk b/keyboards/the_uni/rules.mk index 1422818bb..b4683fe3f 100644 --- a/keyboards/the_uni/rules.mk +++ b/keyboards/the_uni/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/thedogkeyboard/config.h b/keyboards/thedogkeyboard/config.h index 1447d2903..89698ca3d 100644 --- a/keyboards/thedogkeyboard/config.h +++ b/keyboards/thedogkeyboard/config.h @@ -189,26 +189,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/thedogkeyboard/rules.mk b/keyboards/thedogkeyboard/rules.mk index 1f8491e8d..81dc46e90 100644 --- a/keyboards/thedogkeyboard/rules.mk +++ b/keyboards/thedogkeyboard/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 CUSTOM_MATRIX = yes diff --git a/keyboards/themadnoodle/ncc1701kb/v2/rules.mk b/keyboards/themadnoodle/ncc1701kb/v2/rules.mk index 960f1d7a6..056098732 100644 --- a/keyboards/themadnoodle/ncc1701kb/v2/rules.mk +++ b/keyboards/themadnoodle/ncc1701kb/v2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,10 +25,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI controls BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode -API_SYSEX_ENABLE = yes TAP_DANCE_ENABLE = no ENCODER_ENABLE = yes diff --git a/keyboards/themadnoodle/noodlepad/rules.mk b/keyboards/themadnoodle/noodlepad/rules.mk index 960f1d7a6..056098732 100644 --- a/keyboards/themadnoodle/noodlepad/rules.mk +++ b/keyboards/themadnoodle/noodlepad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,10 +25,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI controls BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = yes # Unicode -API_SYSEX_ENABLE = yes TAP_DANCE_ENABLE = no ENCODER_ENABLE = yes diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/0010/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/0010/rules.mk index 9da4bf91a..d924278d3 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/0010/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/keymaps/0010/rules.mk @@ -18,7 +18,6 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) # MOUSEKEY_ENABLE = yes # Mouse keys(+4700) # EXTRAKEY_ENABLE = yes # Audio control and System control(+450) # CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/rules.mk index 9da4bf91a..d924278d3 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/rules.mk @@ -18,7 +18,6 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) # MOUSEKEY_ENABLE = yes # Mouse keys(+4700) # EXTRAKEY_ENABLE = yes # Audio control and System control(+450) # CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/kamon/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/kamon/rules.mk index 9da4bf91a..d924278d3 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/kamon/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/keymaps/kamon/rules.mk @@ -18,7 +18,6 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -# BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) # MOUSEKEY_ENABLE = yes # Mouse keys(+4700) # EXTRAKEY_ENABLE = yes # Audio control and System control(+450) # CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/bananasplit/rules.mk b/keyboards/thevankeyboards/bananasplit/rules.mk index 9d62db53f..fc2c193ef 100644 --- a/keyboards/thevankeyboards/bananasplit/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/thevankeyboards/caravan/rules.mk b/keyboards/thevankeyboards/caravan/rules.mk index 4bdaec4db..c78bf4c32 100644 --- a/keyboards/thevankeyboards/caravan/rules.mk +++ b/keyboards/thevankeyboards/caravan/rules.mk @@ -14,14 +14,13 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/thevankeyboards/jetvan/rules.mk b/keyboards/thevankeyboards/jetvan/rules.mk index 61f1127e1..24fec92ec 100644 --- a/keyboards/thevankeyboards/jetvan/rules.mk +++ b/keyboards/thevankeyboards/jetvan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk index f9d8b0eb0..8f7132775 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk @@ -1,4 +1,3 @@ -#BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) #EXTRAKEY_ENABLE = yes # Audio control and System control(+450) #CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/thevankeyboards/minivan/keymaps/jeebak/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/jeebak/rules.mk index 7a331cd53..93e7cd8bb 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/jeebak/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/jeebak/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c index f9bb64e05..0c1ea9dd0 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c @@ -56,7 +56,7 @@ void keyboard_post_init_user(void) { #endif //RGBLIGHT_ENABLE } -uint32_t layer_state_set_user(uint32_t state){ +layer_state_t layer_state_set_user(layer_state_t state){ #ifdef RGBLIGHT_ENABLE uint8_t led0r = 0; uint8_t led0g = 0; uint8_t led0b = 0; uint8_t led1r = 0; uint8_t led1g = 0; uint8_t led1b = 0; diff --git a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/rules.mk index 4a2770107..04cff0238 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/minivan/keymaps/josjoha/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/josjoha/rules.mk index e6998240e..e04cfe17d 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/josjoha/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/josjoha/rules.mk @@ -3,7 +3,7 @@ # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/minivan/keymaps/king/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/king/rules.mk index 9865184ab..5ae757f3c 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/king/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/king/rules.mk @@ -2,5 +2,5 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/minivan/keymaps/like_jis/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/like_jis/rules.mk index 07f71d6db..14e9b0076 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/like_jis/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/like_jis/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/rules.mk index 7a331cd53..93e7cd8bb 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/mikethetiger/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk index 8e22f3051..0a249a335 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk index 7a331cd53..93e7cd8bb 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/minivan/keymaps/tong92/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/tong92/rules.mk index f5556c8fc..850f2d3de 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/tong92/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/tong92/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/minivan/keymaps/via/keymap.json b/keyboards/thevankeyboards/minivan/keymaps/via/keymap.json index 1e9ef8810..54ceb5c34 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/via/keymap.json +++ b/keyboards/thevankeyboards/minivan/keymaps/via/keymap.json @@ -7,5 +7,14 @@ ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"] - ] + ], + "config": { + "features": { + "via": true, + "lto": true + }, + "dynamic_keymap": { + "layer_count": 4 + } + } } diff --git a/keyboards/thevankeyboards/minivan/keymaps/xyverz/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/xyverz/rules.mk index 7a331cd53..93e7cd8bb 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/xyverz/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/xyverz/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/minivan/rules.mk b/keyboards/thevankeyboards/minivan/rules.mk index 82a739c69..5e6bfc637 100644 --- a/keyboards/thevankeyboards/minivan/rules.mk +++ b/keyboards/thevankeyboards/minivan/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ 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 = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/rules.mk index 7a331cd53..93e7cd8bb 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk index 676e9a6e0..f6dfc2483 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk index 7a331cd53..93e7cd8bb 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/roadkit/keymaps/singles/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/singles/rules.mk index 7a331cd53..93e7cd8bb 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/singles/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/singles/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/rules.mk index 38fa7790b..3f07fbafc 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/roadkit/keymaps/wavebeem-gamepad/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/wavebeem-gamepad/rules.mk index d8284e6bd..825ca3688 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/wavebeem-gamepad/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/wavebeem-gamepad/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/thevankeyboards/roadkit/rules.mk b/keyboards/thevankeyboards/roadkit/rules.mk index 760337e18..cc4500379 100644 --- a/keyboards/thevankeyboards/roadkit/rules.mk +++ b/keyboards/thevankeyboards/roadkit/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ 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 = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/tiger910/rules.mk b/keyboards/tiger910/rules.mk index bcabafbf2..3e44fe592 100644 --- a/keyboards/tiger910/rules.mk +++ b/keyboards/tiger910/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/tkc/candybar/lefty/config.h b/keyboards/tkc/candybar/lefty/config.h index 0f789a7b6..ba5c0b077 100644 --- a/keyboards/tkc/candybar/lefty/config.h +++ b/keyboards/tkc/candybar/lefty/config.h @@ -80,26 +80,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - // #define WS2812_LED_N 2 // #define RGBLED_NUM WS2812_LED_N // #define WS2812_TIM_N 2 diff --git a/keyboards/tkc/candybar/lefty/rules.mk b/keyboards/tkc/candybar/lefty/rules.mk index 8e05f0643..61f8cc6fa 100644 --- a/keyboards/tkc/candybar/lefty/rules.mk +++ b/keyboards/tkc/candybar/lefty/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = stm32-dfu # EXTRAFLAGS+=-flto LTO_ENABLE = yes BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkc/candybar/righty/config.h b/keyboards/tkc/candybar/righty/config.h index 4c269c299..47e3985ff 100644 --- a/keyboards/tkc/candybar/righty/config.h +++ b/keyboards/tkc/candybar/righty/config.h @@ -80,26 +80,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - // #define WS2812_LED_N 2 // #define RGBLED_NUM WS2812_LED_N // #define WS2812_TIM_N 2 diff --git a/keyboards/tkc/candybar/righty/rules.mk b/keyboards/tkc/candybar/righty/rules.mk index 8e05f0643..61f8cc6fa 100644 --- a/keyboards/tkc/candybar/righty/rules.mk +++ b/keyboards/tkc/candybar/righty/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = stm32-dfu # EXTRAFLAGS+=-flto LTO_ENABLE = yes BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkc/godspeed75/config.h b/keyboards/tkc/godspeed75/config.h index 93604a9a6..f50d4c638 100644 --- a/keyboards/tkc/godspeed75/config.h +++ b/keyboards/tkc/godspeed75/config.h @@ -80,26 +80,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #define RGB_DI_PIN A13 #define RGBLED_NUM 14 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/tkc/godspeed75/rules.mk b/keyboards/tkc/godspeed75/rules.mk index 12ce2905d..3d67011c6 100644 --- a/keyboards/tkc/godspeed75/rules.mk +++ b/keyboards/tkc/godspeed75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkc/m0lly/keymaps/default/keymap.c b/keyboards/tkc/m0lly/keymaps/default/keymap.c index 03f07aff4..846429674 100644 --- a/keyboards/tkc/m0lly/keymaps/default/keymap.c +++ b/keyboards/tkc/m0lly/keymaps/default/keymap.c @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_P(PSTR("M0lly\n"),false); @@ -92,4 +92,4 @@ void oled_task_user(void) { oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/tkc/m0lly/keymaps/via/keymap.c b/keyboards/tkc/m0lly/keymaps/via/keymap.c index 4dd35169d..333e29f4e 100644 --- a/keyboards/tkc/m0lly/keymaps/via/keymap.c +++ b/keyboards/tkc/m0lly/keymaps/via/keymap.c @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_P(PSTR("M0lly\n"),false); diff --git a/keyboards/tkc/m0lly/rules.mk b/keyboards/tkc/m0lly/rules.mk index 01afbdd12..66cfdcc51 100644 --- a/keyboards/tkc/m0lly/rules.mk +++ b/keyboards/tkc/m0lly/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -20,4 +20,5 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/tkc/osav2/config.h b/keyboards/tkc/osav2/config.h index aaac1a0a9..c70fdc981 100644 --- a/keyboards/tkc/osav2/config.h +++ b/keyboards/tkc/osav2/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ //#define BOOTMAGIC_LITE_ROW 0 //#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/tkc/osav2/rules.mk b/keyboards/tkc/osav2/rules.mk index 7185a632c..835ccebd2 100644 --- a/keyboards/tkc/osav2/rules.mk +++ b/keyboards/tkc/osav2/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output diff --git a/keyboards/tkc/portico/config.h b/keyboards/tkc/portico/config.h index bd4d09625..ba4f11a41 100644 --- a/keyboards/tkc/portico/config.h +++ b/keyboards/tkc/portico/config.h @@ -45,7 +45,7 @@ along with this program. If not, see . # define RGB_MATRIX_LED_FLUSH_LIMIT 26 # define DEBOUNCE 3 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN # define DISABLE_RGB_MATRIX_BAND_SAT diff --git a/keyboards/tkc/portico/portico.c b/keyboards/tkc/portico/portico.c index a65a85d24..e3d3a1488 100644 --- a/keyboards/tkc/portico/portico.c +++ b/keyboards/tkc/portico/portico.c @@ -19,7 +19,7 @@ along with this program. If not, see . #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { { 0, C2_1, C3_1, C4_1 }, { 0, C1_1, C3_2, C4_2 }, { 0, C1_2, C2_2, C4_3 }, diff --git a/keyboards/tkc/portico/rules.mk b/keyboards/tkc/portico/rules.mk index 84a65370e..44a2a5142 100644 --- a/keyboards/tkc/portico/rules.mk +++ b/keyboards/tkc/portico/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -28,7 +28,7 @@ CIE1931_CURVE = yes SRC += keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c + drivers/led/issi/is31fl3731.c QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/tkc/tkc1800/config.h b/keyboards/tkc/tkc1800/config.h index 82d599c55..17441b084 100644 --- a/keyboards/tkc/tkc1800/config.h +++ b/keyboards/tkc/tkc1800/config.h @@ -161,23 +161,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/tkc/tkc1800/keymaps/default/keymap.c b/keyboards/tkc/tkc1800/keymaps/default/keymap.c index 4f4c7f8e9..762d5c4ed 100644 --- a/keyboards/tkc/tkc1800/keymaps/default/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include QMK_KEYBOARD_H //Layers @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status @@ -103,4 +103,4 @@ void oled_task_user(void) { oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/tkc/tkc1800/keymaps/smt/keymap.c b/keyboards/tkc/tkc1800/keymaps/smt/keymap.c index 9b6ad80d3..dd552cee8 100644 --- a/keyboards/tkc/tkc1800/keymaps/smt/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/smt/keymap.c @@ -144,7 +144,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status @@ -174,4 +174,4 @@ void oled_task_user(void) { oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/tkc/tkc1800/keymaps/via/keymap.c b/keyboards/tkc/tkc1800/keymaps/via/keymap.c index 55c2874c6..d05a1d420 100644 --- a/keyboards/tkc/tkc1800/keymaps/via/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/via/keymap.c @@ -97,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status @@ -127,4 +127,4 @@ void oled_task_user(void) { oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c index 3c65b61d1..da8e8b932 100644 --- a/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include QMK_KEYBOARD_H //Layers @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status @@ -85,4 +85,4 @@ void oled_task_user(void) { oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c index bbffc2d20..cee80a48c 100644 --- a/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include QMK_KEYBOARD_H //Layers @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status @@ -85,4 +85,4 @@ void oled_task_user(void) { oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); } -#endif \ No newline at end of file +#endif diff --git a/keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk b/keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk index b595964f7..517f469b6 100644 --- a/keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk +++ b/keyboards/tkc/tkc1800/keymaps/yanfali/rules.mk @@ -1 +1 @@ -OLED_DRIVER_ENABLE = no +OLED_ENABLE = no diff --git a/keyboards/tkc/tkc1800/rules.mk b/keyboards/tkc/tkc1800/rules.mk index fa90e9980..7f169d51a 100644 --- a/keyboards/tkc/tkc1800/rules.mk +++ b/keyboards/tkc/tkc1800/rules.mk @@ -15,7 +15,7 @@ BOOTLOADER = qmk-dfu # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -26,8 +26,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -OLED_DRIVER_ENABLE = yes \ No newline at end of file +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/tkc/tkl_ab87/rules.mk b/keyboards/tkc/tkl_ab87/rules.mk index 1d60cf3c2..a7eaf89e1 100644 --- a/keyboards/tkc/tkl_ab87/rules.mk +++ b/keyboards/tkc/tkl_ab87/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkw/grandiceps/keymaps/default/keymap.c b/keyboards/tkw/grandiceps/keymaps/default/keymap.c index 53a2fd85c..121ae1c41 100644 --- a/keyboards/tkw/grandiceps/keymaps/default/keymap.c +++ b/keyboards/tkw/grandiceps/keymaps/default/keymap.c @@ -315,7 +315,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM my_logo[] = { // 'protea', 128x32px diff --git a/keyboards/tkw/grandiceps/rules.mk b/keyboards/tkw/grandiceps/rules.mk index ca3435a19..f3a3de4e4 100644 --- a/keyboards/tkw/grandiceps/rules.mk +++ b/keyboards/tkw/grandiceps/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,7 @@ KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+m SPLIT_KEYBOARD = yes SERIAL_DRIVER = usart -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 WS2812_DRIVER = pwm OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE diff --git a/keyboards/tkw/stoutgat/v1/rules.mk b/keyboards/tkw/stoutgat/v1/rules.mk index a9b6c4fc3..bf4d8916c 100644 --- a/keyboards/tkw/stoutgat/v1/rules.mk +++ b/keyboards/tkw/stoutgat/v1/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkw/stoutgat/v2/rules.mk b/keyboards/tkw/stoutgat/v2/rules.mk index 587a17780..efe89827f 100644 --- a/keyboards/tkw/stoutgat/v2/rules.mk +++ b/keyboards/tkw/stoutgat/v2/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/tmo50/config.h b/keyboards/tmo50/config.h index 33d32eb0c..666f9fef1 100644 --- a/keyboards/tmo50/config.h +++ b/keyboards/tmo50/config.h @@ -176,23 +176,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/tmo50/rules.mk b/keyboards/tmo50/rules.mk index 2809f82b4..b7253b188 100644 --- a/keyboards/tmo50/rules.mk +++ b/keyboards/tmo50/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/toad/rules.mk b/keyboards/toad/rules.mk index 94733eeaf..d96183de9 100644 --- a/keyboards/toad/rules.mk +++ b/keyboards/toad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tokyo60/readme.md b/keyboards/tokyo60/readme.md deleted file mode 100644 index 11d4d353c..000000000 --- a/keyboards/tokyo60/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# Tokyo60 - -![Tokyo60](http://tokyokeyboard.com/wp-content/uploads/2018/02/AI7B4543_copy_page_20180215141449-1200x800.jpg) - -Minimal hacker style mechanical keyboard designed in Tokyo. Full aluminum hi-pro construction with integrated top-plate. Cherry MX compatible. More Info at [Tokyo Keyboard](http://tokyokeyboard.com). - -* Keyboard Maintainer: [Tokyo Keyboard](http://tokyokeyboard.com) -* Hardware Supported: Tokyo60 Rev.1 -* Hardware Availability: [Drop](https://drop.com/buy/massdrop-x-tokyo-keyboard-tokyo60-keyboard-kit?mode=guest_open) - -Make example for this keyboard (after setting up your build environment): - - make tokyo60:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/tokyo60/rules.mk b/keyboards/tokyo60/rules.mk deleted file mode 100644 index fa639b1ca..000000000 --- a/keyboards/tokyo60/rules.mk +++ /dev/null @@ -1,33 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -# 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 -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable RGB light - -LAYOUTS = 60_hhkb diff --git a/keyboards/tokyo60/tokyo60.c b/keyboards/tokyo60/tokyo60.c deleted file mode 100644 index 2126bb612..000000000 --- a/keyboards/tokyo60/tokyo60.c +++ /dev/null @@ -1,18 +0,0 @@ -#include "tokyo60.h" - -void matrix_init_kb(void) { - // Keyboard start-up code goes here - // Runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); -}; - -void matrix_scan_kb(void) { - // Looping keyboard code goes here - // This runs every cycle (a lot) - matrix_scan_user(); -}; - -void led_init_ports(void) { - /* LEDs on */ -} diff --git a/keyboards/tokyokeyboard/alix40/rules.mk b/keyboards/tokyokeyboard/alix40/rules.mk index 66097b63e..5fedaed83 100644 --- a/keyboards/tokyokeyboard/alix40/rules.mk +++ b/keyboards/tokyokeyboard/alix40/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tokyo60/config.h b/keyboards/tokyokeyboard/tokyo60/config.h similarity index 100% rename from keyboards/tokyo60/config.h rename to keyboards/tokyokeyboard/tokyo60/config.h diff --git a/keyboards/tokyo60/info.json b/keyboards/tokyokeyboard/tokyo60/info.json similarity index 100% rename from keyboards/tokyo60/info.json rename to keyboards/tokyokeyboard/tokyo60/info.json diff --git a/keyboards/tokyo60/keymaps/default/config.h b/keyboards/tokyokeyboard/tokyo60/keymaps/default/config.h similarity index 100% rename from keyboards/tokyo60/keymaps/default/config.h rename to keyboards/tokyokeyboard/tokyo60/keymaps/default/config.h diff --git a/keyboards/tokyo60/keymaps/default/keymap.c b/keyboards/tokyokeyboard/tokyo60/keymaps/default/keymap.c similarity index 100% rename from keyboards/tokyo60/keymaps/default/keymap.c rename to keyboards/tokyokeyboard/tokyo60/keymaps/default/keymap.c diff --git a/keyboards/tokyo60/keymaps/swappedBottomRow/config.h b/keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/config.h similarity index 100% rename from keyboards/tokyo60/keymaps/swappedBottomRow/config.h rename to keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/config.h diff --git a/keyboards/tokyo60/keymaps/swappedBottomRow/keymap.c b/keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/keymap.c similarity index 100% rename from keyboards/tokyo60/keymaps/swappedBottomRow/keymap.c rename to keyboards/tokyokeyboard/tokyo60/keymaps/swappedBottomRow/keymap.c diff --git a/keyboards/tokyo60/keymaps/via/keymap.c b/keyboards/tokyokeyboard/tokyo60/keymaps/via/keymap.c similarity index 100% rename from keyboards/tokyo60/keymaps/via/keymap.c rename to keyboards/tokyokeyboard/tokyo60/keymaps/via/keymap.c diff --git a/keyboards/xd96/keymaps/via/rules.mk b/keyboards/tokyokeyboard/tokyo60/keymaps/via/rules.mk similarity index 100% rename from keyboards/xd96/keymaps/via/rules.mk rename to keyboards/tokyokeyboard/tokyo60/keymaps/via/rules.mk diff --git a/keyboards/tokyokeyboard/tokyo60/readme.md b/keyboards/tokyokeyboard/tokyo60/readme.md new file mode 100644 index 000000000..4d4f53ef0 --- /dev/null +++ b/keyboards/tokyokeyboard/tokyo60/readme.md @@ -0,0 +1,15 @@ +# Tokyo60 + +![Tokyo60](https://i2.wp.com/tokyokeyboard.com/wp-content/uploads/2018/02/AI7B4543_copy_page_20180215141449-1200x800.jpg) + +Minimal hacker style mechanical keyboard designed in Tokyo. Full aluminum hi-pro construction with integrated top-plate. Cherry MX compatible. More Info at [Tokyo Keyboard](http://tokyokeyboard.com). + +* Keyboard Maintainer: [Tokyo Keyboard](https://tokyokeyboard.com) +* Hardware Supported: Tokyo60 Rev.1 - 4 +* Hardware Availability: [Drop](https://drop.com/buy/massdrop-x-tokyo-keyboard-tokyo60-keyboard-kit?mode=guest_open) + +Make example for this keyboard (after setting up your build environment): + + make tokyokeyboard/tokyo60:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/tokyokeyboard/tokyo60/rules.mk b/keyboards/tokyokeyboard/tokyo60/rules.mk new file mode 100644 index 000000000..549bf76dc --- /dev/null +++ b/keyboards/tokyokeyboard/tokyo60/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +# 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 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable RGB light + +LAYOUTS = 60_hhkb diff --git a/keyboards/tokyokeyboard/tokyo60/tokyo60.c b/keyboards/tokyokeyboard/tokyo60/tokyo60.c new file mode 100644 index 000000000..67113700a --- /dev/null +++ b/keyboards/tokyokeyboard/tokyo60/tokyo60.c @@ -0,0 +1 @@ +#include "tokyo60.h" diff --git a/keyboards/tokyo60/tokyo60.h b/keyboards/tokyokeyboard/tokyo60/tokyo60.h similarity index 100% rename from keyboards/tokyo60/tokyo60.h rename to keyboards/tokyokeyboard/tokyo60/tokyo60.h diff --git a/keyboards/torn/bongocat.c b/keyboards/torn/bongocat.c index 593cd5d4a..00f5cda6a 100644 --- a/keyboards/torn/bongocat.c +++ b/keyboards/torn/bongocat.c @@ -16,7 +16,7 @@ */ #include QMK_KEYBOARD_H -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) diff --git a/keyboards/torn/rules.mk b/keyboards/torn/rules.mk index 62f9d8393..8801760ee 100644 --- a/keyboards/torn/rules.mk +++ b/keyboards/torn/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -17,12 +17,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow ENCODER_ENABLE = yes # Enable rotary encoder -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 WPM_ENABLE = yes CUSTOM_MATRIX = lite -LAYOUTS = split_3x6_4 - SRC += matrix.c \ bongocat.c \ mcp23018.c \ diff --git a/keyboards/touchpad/rules.mk b/keyboards/touchpad/rules.mk index 14aac23d4..eaa7e2dad 100644 --- a/keyboards/touchpad/rules.mk +++ b/keyboards/touchpad/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no CUSTOM_MATRIX = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/tr60w/rules.mk b/keyboards/tr60w/rules.mk index 86b60bd1e..41d22b66a 100644 --- a/keyboards/tr60w/rules.mk +++ b/keyboards/tr60w/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/trashman/ketch/rules.mk b/keyboards/trashman/ketch/rules.mk index eeb384780..2a95b72a0 100644 --- a/keyboards/trashman/ketch/rules.mk +++ b/keyboards/trashman/ketch/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/treadstone32/rules.mk b/keyboards/treadstone32/rules.mk index ef45032da..89b9398fb 100644 --- a/keyboards/treadstone32/rules.mk +++ b/keyboards/treadstone32/rules.mk @@ -4,14 +4,13 @@ MCU = atmega32u4 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/treadstone48/common/oled_helper.c b/keyboards/treadstone48/common/oled_helper.c index 18d8681a4..68adbe83a 100644 --- a/keyboards/treadstone48/common/oled_helper.c +++ b/keyboards/treadstone48/common/oled_helper.c @@ -1,4 +1,4 @@ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include QMK_KEYBOARD_H #include #include diff --git a/keyboards/treadstone48/common/oled_helper.h b/keyboards/treadstone48/common/oled_helper.h index 69ab70560..56c2a5b23 100644 --- a/keyboards/treadstone48/common/oled_helper.h +++ b/keyboards/treadstone48/common/oled_helper.h @@ -1,4 +1,4 @@ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void render_logo(void); void update_key_status(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/treadstone48/keymaps/default/keymap.c b/keyboards/treadstone48/keymaps/default/keymap.c index 41f8f399f..fc53d7e57 100644 --- a/keyboards/treadstone48/keymaps/default/keymap.c +++ b/keyboards/treadstone48/keymaps/default/keymap.c @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define L_ADJUST (1<<_ADJUST) #define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include #include diff --git a/keyboards/treadstone48/keymaps/default/rules.mk b/keyboards/treadstone48/keymaps/default/rules.mk index 26bacb0cf..23c4ae954 100644 --- a/keyboards/treadstone48/keymaps/default/rules.mk +++ b/keyboards/treadstone48/keymaps/default/rules.mk @@ -1,7 +1,8 @@ MOUSEKEY_ENABLE = yes # Mouse keys RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes # If you want to change the display of OLED, you need to change here diff --git a/keyboards/treadstone48/keymaps/like_jis/keymap.c b/keyboards/treadstone48/keymaps/like_jis/keymap.c index bbc6351bc..b86ab5cdb 100644 --- a/keyboards/treadstone48/keymaps/like_jis/keymap.c +++ b/keyboards/treadstone48/keymaps/like_jis/keymap.c @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define L_ADJUST (1<<_ADJUST) #define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include #include diff --git a/keyboards/treadstone48/keymaps/like_jis/rules.mk b/keyboards/treadstone48/keymaps/like_jis/rules.mk index 26bacb0cf..23c4ae954 100644 --- a/keyboards/treadstone48/keymaps/like_jis/rules.mk +++ b/keyboards/treadstone48/keymaps/like_jis/rules.mk @@ -1,7 +1,8 @@ MOUSEKEY_ENABLE = yes # Mouse keys RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes # If you want to change the display of OLED, you need to change here diff --git a/keyboards/treadstone48/rev1/config.h b/keyboards/treadstone48/rev1/config.h index e16622df9..75e5252b3 100644 --- a/keyboards/treadstone48/rev1/config.h +++ b/keyboards/treadstone48/rev1/config.h @@ -200,26 +200,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c b/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c index 171e03455..a6a52e067 100644 --- a/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c +++ b/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c @@ -153,7 +153,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #define L_ADJUST (1<<_ADJUST) #define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #include #include diff --git a/keyboards/treadstone48/rev1/keymaps/like_jis_rs/rules.mk b/keyboards/treadstone48/rev1/keymaps/like_jis_rs/rules.mk index 7380582ca..fafe992d6 100644 --- a/keyboards/treadstone48/rev1/keymaps/like_jis_rs/rules.mk +++ b/keyboards/treadstone48/rev1/keymaps/like_jis_rs/rules.mk @@ -1,7 +1,8 @@ MOUSEKEY_ENABLE = yes # Mouse keys RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 LTO_ENABLE = yes # If you use connection the Rhymestone, please enable RS_EXTRA_LED diff --git a/keyboards/treadstone48/rev2/config.h b/keyboards/treadstone48/rev2/config.h index ae1d92dcb..e5be65f55 100644 --- a/keyboards/treadstone48/rev2/config.h +++ b/keyboards/treadstone48/rev2/config.h @@ -193,25 +193,6 @@ along with this program. If not, see . /* disable these deprecated features by default */ #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/treadstone48/rules.mk b/keyboards/treadstone48/rules.mk index 262ad0a61..769ac45d5 100644 --- a/keyboards/treadstone48/rules.mk +++ b/keyboards/treadstone48/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 = no # Enable Bootmagic Lite EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration @@ -23,7 +23,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 SPLIT_KEYBOARD = yes @@ -32,6 +31,7 @@ MOUSEKEY_ENABLE = yes # Mouse keys TAP_DANCE_ENABLE = no RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 DEFAULT_FOLDER = treadstone48/rev1 diff --git a/keyboards/treasure/type9/config.h b/keyboards/treasure/type9/config.h index eae8cdc55..1c65a3643 100644 --- a/keyboards/treasure/type9/config.h +++ b/keyboards/treasure/type9/config.h @@ -165,23 +165,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/treasure/type9/rules.mk b/keyboards/treasure/type9/rules.mk index eb8aef7e7..91677ac3c 100644 --- a/keyboards/treasure/type9/rules.mk +++ b/keyboards/treasure/type9/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/treasure/type9s2/rules.mk b/keyboards/treasure/type9s2/rules.mk index cfa90bc60..19ae1218d 100644 --- a/keyboards/treasure/type9s2/rules.mk +++ b/keyboards/treasure/type9s2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tronguylabs/m122_3270/blackpill/config.h b/keyboards/tronguylabs/m122_3270/blackpill/config.h index 95c94ef31..53c3ad73e 100644 --- a/keyboards/tronguylabs/m122_3270/blackpill/config.h +++ b/keyboards/tronguylabs/m122_3270/blackpill/config.h @@ -16,8 +16,6 @@ #pragma once -// place overrides below - // Blackpill pin assignments: reversed the rows from the Teensy version for easier PCB layout // DO NOT USE the following pins: A9 (has pulldown on it), A11/A12 (USB lines), B2 (external pulldown) // C13 has an LED, and C13/C14/C15 are best used as inputs (with DIODE_DIRECTION set to ROW2COL, the @@ -26,4 +24,4 @@ #define MATRIX_ROW_PINS { C13, C14, C15, A0, A1, A2, A3, A4 } // The BlackPill version is version 2 -#define DEVICE_VER 0x0002 +#define DEVICE_VER 0x0002 diff --git a/keyboards/tronguylabs/m122_3270/blackpill/readme.md b/keyboards/tronguylabs/m122_3270/blackpill/readme.md index 08df795b1..1e47a447a 100644 --- a/keyboards/tronguylabs/m122_3270/blackpill/readme.md +++ b/keyboards/tronguylabs/m122_3270/blackpill/readme.md @@ -1,2 +1,3 @@ # BlackPill controller for m122-3270 + This directory contains the BlackPill-specific definitions for the M122-3270 keyboard. diff --git a/keyboards/tronguylabs/m122_3270/blackpill/rules.mk b/keyboards/tronguylabs/m122_3270/blackpill/rules.mk index d3daefaeb..a698a6d1a 100644 --- a/keyboards/tronguylabs/m122_3270/blackpill/rules.mk +++ b/keyboards/tronguylabs/m122_3270/blackpill/rules.mk @@ -1,7 +1,22 @@ -# Overrides for the Blackpill version - # MCU name MCU = STM32F411 # Bootloader selection BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +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 diff --git a/keyboards/tronguylabs/m122_3270/config.h b/keyboards/tronguylabs/m122_3270/config.h index 0dd0187a1..98359e6cc 100644 --- a/keyboards/tronguylabs/m122_3270/config.h +++ b/keyboards/tronguylabs/m122_3270/config.h @@ -18,11 +18,10 @@ #include "config_common.h" -#define VENDOR_ID 0x1209 -#define PRODUCT_ID 0x3270 -// DEVICE_VER is defined in each variant's config.h file -#define MANUFACTURER IBM -#define PRODUCT Model M PC/3270 122 key +#define VENDOR_ID 0x1209 +#define PRODUCT_ID 0x3270 +#define MANUFACTURER IBM +#define PRODUCT Model M PC/3270 122 key // Both controllers draw 100 mA or less #define USB_MAX_POWER_CONSUMPTION 100 @@ -31,41 +30,8 @@ #define MATRIX_ROWS 8 #define MATRIX_COLS 20 -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define UNUSED_PINS - /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 15 - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION diff --git a/keyboards/tronguylabs/m122_3270/info.json b/keyboards/tronguylabs/m122_3270/info.json index fd158eb46..7bf6cb9e2 100644 --- a/keyboards/tronguylabs/m122_3270/info.json +++ b/keyboards/tronguylabs/m122_3270/info.json @@ -1,134 +1,157 @@ { - "keyboard_name": "IBM Model M PC/3270 122 key", - "maintainer": "jmaynard", - "width": 24.75, - "height": 8, - "layouts": { - "LAYOUT": { - "layout": [ - {"label":"F13", "x":3.25, "y":0}, - {"label":"F14", "x":4.25, "y":0}, - {"label":"F15", "x":5.25, "y":0}, - {"label":"F16", "x":6.25, "y":0}, - {"label":"F17", "x":7.25, "y":0}, - {"label":"F18", "x":8.25, "y":0}, - {"label":"F19", "x":9.25, "y":0}, - {"label":"F20", "x":10.25, "y":0}, - {"label":"F21", "x":11.25, "y":0}, - {"label":"F22", "x":12.25, "y":0}, - {"label":"F23", "x":13.25, "y":0}, - {"label":"F24", "x":14.25, "y":0}, - {"label":"F1", "x":3.25, "y":1}, - {"label":"F2", "x":4.25, "y":1}, - {"label":"F3", "x":5.25, "y":1}, - {"label":"F4", "x":6.25, "y":1}, - {"label":"F5", "x":7.25, "y":1}, - {"label":"F6", "x":8.25, "y":1}, - {"label":"F7", "x":9.25, "y":1}, - {"label":"F8", "x":10.25, "y":1}, - {"label":"F9", "x":11.25, "y":1}, - {"label":"F10", "x":12.25, "y":1}, - {"label":"F11", "x":13.25, "y":1}, - {"label":"F12", "x":14.25, "y":1}, - {"label":"Esc", "x":0, "y":3}, - {"x":1, "y":3}, - {"label":"`", "x":2.25, "y":3}, - {"label":"1", "x":3.25, "y":3}, - {"label":"2", "x":4.25, "y":3}, - {"label":"3", "x":5.25, "y":3}, - {"label":"4", "x":6.25, "y":3}, - {"label":"5", "x":7.25, "y":3}, - {"label":"6", "x":8.25, "y":3}, - {"label":"7", "x":9.25, "y":3}, - {"label":"8", "x":10.25, "y":3}, - {"label":"9", "x":11.25, "y":3}, - {"label":"0", "x":12.25, "y":3}, - {"label":"-", "x":13.25, "y":3}, - {"label":"=", "x":14.25, "y":3}, - {"label":"Backspace", "x":15.25, "y":3, "w":2}, - {"label":"Insert", "x":17.5, "y":3}, - {"label":"Home", "x":18.5, "y":3}, - {"label":"Page Up", "x":19.5, "y":3}, - {"label":"Num Lock", "x":20.75, "y":3}, - {"label":"/", "x":21.75, "y":3}, - {"label":"*", "x":22.75, "y":3}, - {"label":"-", "x":23.75, "y":3}, - {"x":0, "y":4}, - {"x":1, "y":4}, - {"label":"Tab", "x":2.25, "y":4, "w":1.5}, - {"label":"Q", "x":3.75, "y":4}, - {"label":"W", "x":4.75, "y":4}, - {"label":"E", "x":5.75, "y":4}, - {"label":"R", "x":6.75, "y":4}, - {"label":"T", "x":7.75, "y":4}, - {"label":"Y", "x":8.75, "y":4}, - {"label":"U", "x":9.75, "y":4}, - {"label":"I", "x":10.75, "y":4}, - {"label":"O", "x":11.75, "y":4}, - {"label":"P", "x":12.75, "y":4}, - {"label":"[", "x":13.75, "y":4}, - {"label":"]", "x":14.75, "y":4}, - {"label":"Enter", "x":16, "y":4, "w":1.25, "h":2}, - {"label":"Delete", "x":17.5, "y":4}, - {"label":"End", "x":18.5, "y":4}, - {"label":"Page Down", "x":19.5, "y":4}, - {"label":"7", "x":20.75, "y":4}, - {"label":"8", "x":21.75, "y":4}, - {"label":"9", "x":22.75, "y":4}, - {"label":"+", "x":23.75, "y":4}, - {"x":0, "y":5}, - {"x":1, "y":5}, - {"label":"Caps Lock", "x":2.25, "y":5, "w":1.75}, - {"label":"A", "x":4, "y":5}, - {"label":"S", "x":5, "y":5}, - {"label":"D", "x":6, "y":5}, - {"label":"F", "x":7, "y":5}, - {"label":"G", "x":8, "y":5}, - {"label":"H", "x":9, "y":5}, - {"label":"J", "x":10, "y":5}, - {"label":"K", "x":11, "y":5}, - {"label":"L", "x":12, "y":5}, - {"label":";", "x":13, "y":5}, - {"label":"'", "x":14, "y":5}, - {"label":"#", "x":15, "y":5}, - {"label":"Up", "x":18.5, "y":5}, - {"label":"4", "x":20.75, "y":5}, - {"label":"5", "x":21.75, "y":5}, - {"label":"6", "x":22.75, "y":5}, - {"x":23.75, "y":5}, - {"x":0, "y":6}, - {"x":1, "y":6}, - {"label":"Shift", "x":2.25, "y":6, "w":1.25}, - {"label":"\\", "x":3.5, "y":6}, - {"label":"Z", "x":4.5, "y":6}, - {"label":"X", "x":5.5, "y":6}, - {"label":"C", "x":6.5, "y":6}, - {"label":"V", "x":7.5, "y":6}, - {"label":"B", "x":8.5, "y":6}, - {"label":"N", "x":9.5, "y":6}, - {"label":"M", "x":10.5, "y":6}, - {"label":",", "x":11.5, "y":6}, - {"label":".", "x":12.5, "y":6}, - {"label":"/", "x":13.5, "y":6}, - {"label":"Shift", "x":14.5, "y":6, "w":2.75}, - {"label":"Left", "x":17.5, "y":6}, - {"x":18.5, "y":6}, - {"label":"Right", "x":19.5, "y":6}, - {"label":"1", "x":20.75, "y":6}, - {"label":"2", "x":21.75, "y":6}, - {"label":"3", "x":22.75, "y":6}, - {"label":"Enter", "x":23.75, "y":6, "h":2}, - {"x":0, "y":7}, - {"x":1, "y":7}, - {"label":"Ctrl", "x":2.25, "y":7, "w":1.5}, - {"label":"Alt", "x":4.75, "y":7, "w":1.5}, - {"x":6.25, "y":7, "w":7}, - {"label":"AltGr", "x":13.25, "y":7, "w":1.5}, - {"label":"Ctrl", "x":15.75, "y":7, "w":1.5}, - {"label":"Down", "x":18.5, "y":7}, - {"label":"0", "x":20.75, "y":7, "w":2}, - {"label":".", "x":22.75, "y":7} - ] + "keyboard_name": "IBM Model M PC/3270 122 key", + "maintainer": "jmaynard", + "width": 24.75, + "height": 8, + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 3.25, "y": 0}, + {"x": 4.25, "y": 0}, + {"x": 5.25, "y": 0}, + {"x": 6.25, "y": 0}, + {"x": 7.25, "y": 0}, + {"x": 8.25, "y": 0}, + {"x": 9.25, "y": 0}, + {"x": 10.25, "y": 0}, + {"x": 11.25, "y": 0}, + {"x": 12.25, "y": 0}, + {"x": 13.25, "y": 0}, + {"x": 14.25, "y": 0}, + + {"x": 3.25, "y": 1}, + {"x": 4.25, "y": 1}, + {"x": 5.25, "y": 1}, + {"x": 6.25, "y": 1}, + {"x": 7.25, "y": 1}, + {"x": 8.25, "y": 1}, + {"x": 9.25, "y": 1}, + {"x": 10.25, "y": 1}, + {"x": 11.25, "y": 1}, + {"x": 12.25, "y": 1}, + {"x": 13.25, "y": 1}, + {"x": 14.25, "y": 1}, + + {"x": 0, "y": 3}, + {"x": 1, "y": 3}, + + {"x": 2.25, "y": 3}, + {"x": 3.25, "y": 3}, + {"x": 4.25, "y": 3}, + {"x": 5.25, "y": 3}, + {"x": 6.25, "y": 3}, + {"x": 7.25, "y": 3}, + {"x": 8.25, "y": 3}, + {"x": 9.25, "y": 3}, + {"x": 10.25, "y": 3}, + {"x": 11.25, "y": 3}, + {"x": 12.25, "y": 3}, + {"x": 13.25, "y": 3}, + {"x": 14.25, "y": 3}, + {"x": 15.25, "y": 3, "w": 2}, + + {"x": 17.5, "y": 3}, + {"x": 18.5, "y": 3}, + {"x": 19.5, "y": 3}, + + {"x": 20.75, "y": 3}, + {"x": 21.75, "y": 3}, + {"x": 22.75, "y": 3}, + {"x": 23.75, "y": 3}, + + {"x": 0, "y": 4}, + {"x": 1, "y": 4}, + + {"x": 2.25, "y": 4, "w": 1.5}, + {"x": 3.75, "y": 4}, + {"x": 4.75, "y": 4}, + {"x": 5.75, "y": 4}, + {"x": 6.75, "y": 4}, + {"x": 7.75, "y": 4}, + {"x": 8.75, "y": 4}, + {"x": 9.75, "y": 4}, + {"x": 10.75, "y": 4}, + {"x": 11.75, "y": 4}, + {"x": 12.75, "y": 4}, + {"x": 13.75, "y": 4}, + {"x": 14.75, "y": 4}, + {"x": 16, "y": 4, "w": 1.25, "h": 2}, + + {"x": 17.5, "y": 4}, + {"x": 18.5, "y": 4}, + {"x": 19.5, "y": 4}, + + {"x": 20.75, "y": 4}, + {"x": 21.75, "y": 4}, + {"x": 22.75, "y": 4}, + {"x": 23.75, "y": 4}, + + {"x": 0, "y": 5}, + {"x": 1, "y": 5}, + + {"x": 2.25, "y": 5, "w": 1.75}, + {"x": 4, "y": 5}, + {"x": 5, "y": 5}, + {"x": 6, "y": 5}, + {"x": 7, "y": 5}, + {"x": 8, "y": 5}, + {"x": 9, "y": 5}, + {"x": 10, "y": 5}, + {"x": 11, "y": 5}, + {"x": 12, "y": 5}, + {"x": 13, "y": 5}, + {"x": 14, "y": 5}, + {"x": 15, "y": 5}, + + {"x": 18.5, "y": 5}, + + {"x": 20.75, "y": 5}, + {"x": 21.75, "y": 5}, + {"x": 22.75, "y": 5}, + {"x": 23.75, "y": 5}, + + {"x": 0, "y": 6}, + {"x": 1, "y": 6}, + + {"x": 2.25, "y": 6, "w": 1.25}, + {"x": 3.5, "y": 6}, + {"x": 4.5, "y": 6}, + {"x": 5.5, "y": 6}, + {"x": 6.5, "y": 6}, + {"x": 7.5, "y": 6}, + {"x": 8.5, "y": 6}, + {"x": 9.5, "y": 6}, + {"x": 10.5, "y": 6}, + {"x": 11.5, "y": 6}, + {"x": 12.5, "y": 6}, + {"x": 13.5, "y": 6}, + {"x": 14.5, "y": 6, "w": 2.75}, + + {"x": 17.5, "y": 6}, + {"x": 18.5, "y": 6}, + {"x": 19.5, "y": 6}, + + {"x": 20.75, "y": 6}, + {"x": 21.75, "y": 6}, + {"x": 22.75, "y": 6}, + {"x": 23.75, "y": 6, "h": 2}, + + {"x": 0, "y": 7}, + {"x": 1, "y": 7}, + + {"x": 2.25, "y": 7, "w": 1.5}, + + {"x": 4.75, "y": 7, "w": 1.5}, + {"x": 6.25, "y": 7, "w": 7}, + {"x": 13.25, "y": 7, "w": 1.5}, + + {"x": 15.75, "y": 7, "w": 1.5}, + + {"x": 18.5, "y": 7}, + + {"x": 20.75, "y": 7, "w": 2}, + {"x": 22.75, "y": 7} + ] + } } - } } diff --git a/keyboards/tronguylabs/m122_3270/keymaps/default/keymap.c b/keyboards/tronguylabs/m122_3270/keymaps/default/keymap.c index 14d8318e7..b32eb33ec 100644 --- a/keyboards/tronguylabs/m122_3270/keymaps/default/keymap.c +++ b/keyboards/tronguylabs/m122_3270/keymaps/default/keymap.c @@ -17,61 +17,65 @@ enum custom_keycodes { JM_DOT = SAFE_RANGE, // . both shifted and unshifted - JM_COMM, // , both shifted and unshifted - JM_GRLS, // < and > on one key - JM_CBRC, // { and } on one key - JM_CENT, // cent sign and ! on one key - JM_DPA1, // DUP/PA1, - JM_FPA2, // FldMk/PA2, - JM_JUMP, // JUMP/PA3, - JM_DEL, // Delete - JM_NSLC // NumLock/ScrollLock on one key + JM_COMM, // , both shifted and unshifted + JM_GRLS, // < and > on one key + JM_CBRC, // { and } on one key + JM_CENT, // cent sign and ! on one key + JM_DPA1, // DUP/PA1, + JM_FPA2, // FldMk/PA2, + JM_JUMP, // JUMP/PA3, + JM_DEL, // Delete + JM_NSLC // NumLock/ScrollLock on one key }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // PC/3270 layout: PC legends (blue) + // PC/3270 layout: PC legends (blue) [0] = LAYOUT( - KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - KC_NO, KC_NO, KC_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_NO, KC_PGUP, KC_PGDN, KC_ESC, JM_NSLC, KC_PAST, KC_PSLS, - KC_NO, KC_PAUS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_END, KC_INS, KC_DEL, KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_NO, KC_NO, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_UP, KC_P4, KC_P5, KC_P6, KC_PMNS, - KC_PSCR, KC_NO, KC_LSFT, JM_GRLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LEFT, KC_HOME, KC_RIGHT, KC_P1, KC_P2, KC_P3, KC_PENT, - MO(10), KC_LGUI, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_DOWN, KC_P0, KC_PDOT + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + + KC_NO, KC_NO, KC_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_NO, KC_PGUP, KC_PGDN, KC_ESC, JM_NSLC, KC_PAST, KC_PSLS, + KC_NO, KC_PAUS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_ENT, KC_END, KC_INS, KC_DEL, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_NO, KC_NO, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_UP, KC_P4, KC_P5, KC_P6, KC_PMNS, + KC_PSCR, KC_NO, KC_LSFT, JM_GRLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LEFT, KC_HOME, KC_RIGHT, KC_P1, KC_P2, KC_P3, KC_PENT, + MO(2), KC_LGUI, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_DOWN, KC_P0, KC_PDOT ), - // PC/3270 layout: 3270 legends (black), with x3270 keycodes + // PC/3270 layout: 3270 legends (black), with x3270 keycodes [1] = LAYOUT( - A(KC_F1), A(KC_F2), A(KC_F3), A(KC_F4), A(KC_F5), A(KC_F6), A(KC_F7), A(KC_F8), A(KC_F9), A(KC_F10), A(KC_F11), A(KC_F12), - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - A(KC_A), A(KC_C), 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, JM_DPA1, JM_FPA2, JM_JUMP, KC_ESC, JM_NSLC, KC_PCMM, KC_SPC, - KC_CRSEL, KC_PAUS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JM_CENT, KC_BSLS, S(KC_ENT), S(KC_TAB), KC_INS, JM_DEL, KC_P7, KC_P8, KC_P9, KC_TAB, - KC_EXSEL, A(KC_E), KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, JM_CBRC, KC_UP, KC_P4, KC_P5, KC_P6, KC_PMNS, - A(KC_B), C(KC_C), KC_LSFT, JM_GRLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JM_COMM, JM_DOT, KC_SLSH, KC_RSFT, KC_LEFT, A(KC_H), KC_RIGHT, KC_P1, KC_P2, KC_P3, KC_PENT, - MO(10), KC_LGUI, A(KC_R), KC_LALT, KC_SPC, KC_RALT, KC_ENT, KC_DOWN, KC_P0, KC_PDOT + A(KC_F1), A(KC_F2), A(KC_F3), A(KC_F4), A(KC_F5), A(KC_F6), A(KC_F7), A(KC_F8), A(KC_F9), A(KC_F10), A(KC_F11), A(KC_F12), + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + + A(KC_A), A(KC_C), 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, JM_DPA1, JM_FPA2, JM_JUMP, KC_ESC, JM_NSLC, KC_PCMM, KC_SPC, + KC_CRSEL, KC_PAUS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JM_CENT, KC_BSLS, S(KC_ENT), S(KC_TAB), KC_INS, JM_DEL, KC_P7, KC_P8, KC_P9, KC_TAB, + KC_EXSEL, A(KC_E), KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, JM_CBRC, KC_UP, KC_P4, KC_P5, KC_P6, KC_PMNS, + A(KC_B), C(KC_C), KC_LSFT, JM_GRLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, JM_COMM, JM_DOT, KC_SLSH, KC_RSFT, KC_LEFT, A(KC_H), KC_RIGHT, KC_P1, KC_P2, KC_P3, KC_PENT, + MO(2), KC_LGUI, A(KC_R), KC_LALT, KC_SPC, KC_RALT, KC_ENT, KC_DOWN, KC_P0, KC_PDOT ), -// Function layer, accessed by the Zoom key - [10] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - DF(0), DF(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(11), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + // Function layer, accessed by the Zoom key + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + DF(0), DF(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, MO(3), _______, _______, _______, _______, _______ ), -// Firmware layer, accessed by the Zoom/Space key pair (hold both down) - [11] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, EEP_RST, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DEBUG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), + // Firmware layer, accessed by the Zoom/Space key pair (hold both down) + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, EEP_RST, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; bool left_shift_down = false; @@ -82,160 +86,128 @@ bool right_alt_down = false; bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_LSHIFT: - if (record->event.pressed) { - left_shift_down = true; - return true; - } else { - left_shift_down = false; - return true; - } - break; + left_shift_down = record->event.pressed; + break; case KC_RSHIFT: - if (record->event.pressed) { - right_shift_down = true; - return true; - } else { - right_shift_down = false; - return true; - } - break; + right_shift_down = record->event.pressed; + break; case KC_LALT: - if (record->event.pressed) { - left_alt_down = true; - return true; - } else { - left_alt_down = false; - return true; - } - break; + left_alt_down = record->event.pressed; + break; case KC_RALT: - if (record->event.pressed) { - right_alt_down = true; - return true; - } else { - right_alt_down = false; - return true; - } - break; + right_alt_down = record->event.pressed; + break; case JM_GRLS: - if (left_shift_down || right_shift_down) { - if(record->event.pressed) { - SEND_STRING(">"); - } - return false; - } else { - if(record->event.pressed) { - SEND_STRING("<"); - } - return false; - } - break; - case JM_CBRC: - if (left_shift_down || right_shift_down) { - if (record->event.pressed) { - SEND_STRING("}"); - } - return false; - } else { - if(record->event.pressed) { - SEND_STRING("{"); - } - return false; - } - break; - case JM_CENT: - if (left_shift_down || right_shift_down) { - if (record->event.pressed) { - SEND_STRING("!"); - } - return false; - } else { // This assumes that the Linux Compose has eben set to Scroll Lock - if (record->event.pressed) { - tap_code16(KC_SLCK); - SEND_STRING("c/"); - } - return false; - } - break; - case JM_COMM: - if (record->event.pressed){ - SEND_STRING(","); - } - return false; - case JM_DOT: - if (record->event.pressed) { - SEND_STRING("."); - } - return false; - case JM_DPA1: - if (left_shift_down || right_shift_down) { - if (record->event.pressed) { - tap_code16(C(KC_D)); - } - return false; - } else { - if(record->event.pressed) { - tap_code16(A(KC_1)); - } - return false; - } - break; - case JM_FPA2: - if (left_shift_down || right_shift_down) { - if (record->event.pressed) { - tap_code16(C(KC_F)); - } - return false; - } else { - if(record->event.pressed) { - tap_code16(A(KC_2)); - } - return false; - } - break; - case JM_JUMP: - if (record->event.pressed) { - if (left_alt_down || right_alt_down) { - SEND_STRING("3"); - } - } - return false; - case JM_DEL: - if (record->event.pressed) { - if (left_alt_down || right_alt_down) { - unregister_code(KC_LALT); - unregister_code(KC_RALT); - tap_code16(C(KC_W)); - if (left_alt_down) { - register_code(KC_LALT); - } - if (right_alt_down) { - register_code(KC_RALT); + if (left_shift_down || right_shift_down) { + if(record->event.pressed) { + SEND_STRING(">"); } } else { - tap_code16(KC_DEL); + if(record->event.pressed) { + SEND_STRING("<"); + } } - } - return false; + return false; + case JM_CBRC: + if (left_shift_down || right_shift_down) { + if (record->event.pressed) { + SEND_STRING("}"); + } + } else { + if(record->event.pressed) { + SEND_STRING("{"); + } + } + return false; + case JM_CENT: + if (left_shift_down || right_shift_down) { + if (record->event.pressed) { + SEND_STRING("!"); + } + } else { // This assumes that the Linux Compose has been set to Scroll Lock + if (record->event.pressed) { + tap_code16(KC_SLCK); + SEND_STRING("c/"); + } + } + return false; + case JM_COMM: + if (record->event.pressed){ + SEND_STRING(","); + } + return false; + case JM_DOT: + if (record->event.pressed) { + SEND_STRING("."); + } + return false; + case JM_DPA1: + if (left_shift_down || right_shift_down) { + if (record->event.pressed) { + tap_code16(C(KC_D)); + } + return false; + } else { + if(record->event.pressed) { + tap_code16(A(KC_1)); + } + return false; + } + break; + case JM_FPA2: + if (left_shift_down || right_shift_down) { + if (record->event.pressed) { + tap_code16(C(KC_F)); + } + return false; + } else { + if(record->event.pressed) { + tap_code16(A(KC_2)); + } + return false; + } + break; + case JM_JUMP: + if (record->event.pressed) { + if (left_alt_down || right_alt_down) { + SEND_STRING("3"); + } + } + return false; + case JM_DEL: + if (record->event.pressed) { + if (left_alt_down || right_alt_down) { + unregister_code(KC_LALT); + unregister_code(KC_RALT); + tap_code16(C(KC_W)); + if (left_alt_down) { + register_code(KC_LALT); + } + if (right_alt_down) { + register_code(KC_RALT); + } + } else { + tap_code16(KC_DEL); + } + } + return false; case JM_NSLC: - if (left_shift_down || right_shift_down) { - if (record->event.pressed) { - register_code(KC_NLCK); - } - else { - unregister_code(KC_NLCK); + if (left_shift_down || right_shift_down) { + if (record->event.pressed) { + register_code(KC_NLCK); + } + else { + unregister_code(KC_NLCK); + } + } else { + if (record->event.pressed) { + register_code(KC_SLCK); + } + else { + unregister_code(KC_SLCK); + } } return false; - } else { - if (record->event.pressed) { - register_code(KC_SLCK); - } - else { - unregister_code(KC_SLCK); - } - return false; - } - break; } return true; diff --git a/keyboards/tronguylabs/m122_3270/keymaps/default/readme.md b/keyboards/tronguylabs/m122_3270/keymaps/default/readme.md index 1d54e0cb8..cab833dd3 100644 --- a/keyboards/tronguylabs/m122_3270/keymaps/default/readme.md +++ b/keyboards/tronguylabs/m122_3270/keymaps/default/readme.md @@ -1,4 +1,5 @@ # Default keymap for m122-3270 + This keymap is intended to make the PC/3270 122-key IBM keyboard work as closely as possible to the standard PC/3270 keyboard's (part number 1397000) original mapping. Two layers are defined: layer 0 is the PC layout, using the blue legends on the PC/3270 keys (as shipped by Unicomp; I don't have the original keycaps, and I diff --git a/keyboards/tronguylabs/m122_3270/m122_3270.c b/keyboards/tronguylabs/m122_3270/m122_3270.c index b206d66ae..397d495c2 100644 --- a/keyboards/tronguylabs/m122_3270/m122_3270.c +++ b/keyboards/tronguylabs/m122_3270/m122_3270.c @@ -13,4 +13,5 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "m122_3270.h" diff --git a/keyboards/tronguylabs/m122_3270/m122_3270.h b/keyboards/tronguylabs/m122_3270/m122_3270.h index 71ccf7b66..c18020ebc 100644 --- a/keyboards/tronguylabs/m122_3270/m122_3270.h +++ b/keyboards/tronguylabs/m122_3270/m122_3270.h @@ -13,28 +13,28 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #pragma once + #include "quantum.h" -// This a shortcut to help you visually see your layout. -// The first section contains all of the arguments -// The second converts the arguments into a two-dimensional array +#define XXX KC_NO + #define LAYOUT( \ - k09, k19, k1A, k29, k39, k3A, k49, k59, k5A, k69, k79, k7A, \ - k0A, k0B, k1B, k2A, k2B, k3B, k4A, k4B, k5B, k6A, k6B, k7B, \ + k09, k19, k1A, k29, k39, k3A, k49, k59, k5A, k69, k79, k7A, \ + k0A, k0B, k1B, k2A, k2B, k3B, k4A, k4B, k5B, k6A, k6B, k7B, \ k31, k32, k34, k24, k25, k26, k27, k37, k38, k28, k2C, k2D, k2E, k3E, k3C, k3F, k3G, k3H, k2G, k2F, k2H, k2I, k20, \ k21, k41, k42, k44, k45, k46, k47, k57, k58, k48, k4C, k4D, k4E, k5E, k5C, k6F, k1G, k5G, k4G, k4F, k4H, k4I, k40, \ k51, k52, k62, k14, k15, k16, k17, k07, k08, k18, k1C, k1D, k1E, k0E, k6E, k0G, k1F, k1H, k1I, k10, \ k11, k12, k73, k74, k64, k65, k66, k67, k77, k78, k68, k6C, k6D, k7E, k63, k60, k0J, k1J, k61, k6H, k6I, k7J, \ - k02, k01, k00, k70, k71, k03, k72, k0F, k7H, k7I \ -) \ -{ \ - { k00, k01, k02, k03, KC_NO, KC_NO, KC_NO, k07, k08, k09, k0A, k0B, KC_NO, KC_NO, k0E, k0F, k0G, KC_NO, KC_NO, k0J }, \ - { k10, k11, k12, KC_NO, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1J }, \ - { k20, k21, KC_NO, KC_NO, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, KC_NO }, \ - { KC_NO, k31, k32, KC_NO, k34, KC_NO, KC_NO, k37, k38, k39, k3A, k3B, k3C, KC_NO, k3E, k3F, k3G, k3H, KC_NO, KC_NO }, \ - { k40, k41, k42, KC_NO, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, KC_NO }, \ - { KC_NO, k51, k52, KC_NO, KC_NO, KC_NO, KC_NO, k57, k58, k59, k5A, k5B, k5C, KC_NO, k5E, KC_NO, k5G, KC_NO, KC_NO, KC_NO }, \ - { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, k6F, KC_NO, k6H, k6I, KC_NO }, \ - { k70, k71, k72, k73, k74, KC_NO, KC_NO, k77, k78, k79, k7A, k7B, KC_NO, KC_NO, k7E, KC_NO, KC_NO, k7H, k7I, k7J }, \ + k02, k01, k00, k70, k71, k03, k72, k0F, k7H, k7I \ +) { \ + { k00, k01, k02, k03, XXX, XXX, XXX, k07, k08, k09, k0A, k0B, XXX, XXX, k0E, k0F, k0G, XXX, XXX, k0J }, \ + { k10, k11, k12, XXX, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1J }, \ + { k20, k21, XXX, XXX, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, XXX }, \ + { XXX, k31, k32, XXX, k34, XXX, XXX, k37, k38, k39, k3A, k3B, k3C, XXX, k3E, k3F, k3G, k3H, XXX, XXX }, \ + { k40, k41, k42, XXX, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, XXX }, \ + { XXX, k51, k52, XXX, XXX, XXX, XXX, k57, k58, k59, k5A, k5B, k5C, XXX, k5E, XXX, k5G, XXX, XXX, XXX }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, k6F, XXX, k6H, k6I, XXX }, \ + { k70, k71, k72, k73, k74, XXX, XXX, k77, k78, k79, k7A, k7B, XXX, XXX, k7E, XXX, XXX, k7H, k7I, k7J } \ } diff --git a/keyboards/tronguylabs/m122_3270/readme.md b/keyboards/tronguylabs/m122_3270/readme.md index b8de84678..1dd1580bc 100644 --- a/keyboards/tronguylabs/m122_3270/readme.md +++ b/keyboards/tronguylabs/m122_3270/readme.md @@ -2,8 +2,7 @@ ![IBM Model M 122 key](https://i.imgur.com/Oo3Ozqzh.jpg) -This is a replacement controller for the IBM Model M 122 key terminal keyboard running on a STM32F411 BlackPill, intended -to act as closely to the 3270 keyboard's functioning as possible while still being usable on a PC. +This is a replacement controller for the IBM Model M 122 key terminal keyboard running on a STM32F411 BlackPill, intended to act as closely to the 3270 keyboard's functioning as possible while still being usable on a PC. * Keyboard Maintainer: [Jay Maynard](https://github.com/jmaynard) * Hardware Supported: BlackPill STM32F411, Teensy++ 2.0 @@ -14,14 +13,10 @@ Make example for this keyboard (after setting up your build environment): make tronguylabs/m122_3270/blackpill:default make tronguylabs/m122_3270/teensy:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the -[make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). A schematic and Gerber files are publicly available for those wishing to have carrier boards made professionally instead of handwiring things. The M122 matrix connectors plug right into it. It can -be found at https://github.com/jmaynard/tronguylabs-m122-blackpill . +be found at https://github.com/jmaynard/tronguylabs-m122-blackpill. -This is derived from Luke Stanley's handwired/ibm122m keyboard, with my own keymapping and -rework of the I/O for the BlackPill. There's also a version for the Teensy++ 2.0, since that -was my original design and I still use one on one board, even though I switched to the -BlackPill for future-proofing. The Teensy++ 2.0 is not recommended for new designs. +This is derived from Luke Stanley's handwired/ibm122m keyboard, with my own keymapping and rework of the I/O for the BlackPill. There's also a version for the Teensy++ 2.0, since that was my original design and I still use one on one board, even though I switched to the BlackPill for future-proofing. The Teensy++ 2.0 is not recommended for new designs. diff --git a/keyboards/tronguylabs/m122_3270/rules.mk b/keyboards/tronguylabs/m122_3270/rules.mk deleted file mode 100644 index 2604f4818..000000000 --- a/keyboards/tronguylabs/m122_3270/rules.mk +++ /dev/null @@ -1,16 +0,0 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = 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 diff --git a/keyboards/tronguylabs/m122_3270/teensy/config.h b/keyboards/tronguylabs/m122_3270/teensy/config.h index c23c5931e..33590b406 100644 --- a/keyboards/tronguylabs/m122_3270/teensy/config.h +++ b/keyboards/tronguylabs/m122_3270/teensy/config.h @@ -16,12 +16,10 @@ #pragma once -// place overrides below - // Teensy pin assignments: I'm wiring things a bit more straightforwardly, and // avoiding the LED on PD6 #define MATRIX_COL_PINS { B5, B6, B7, D0, D1, D2, D3, D4, D5, D7, E0, E1, C0, C1, C2, C3, C4, C5, C6, C7 } #define MATRIX_ROW_PINS { F0, F1, F2, F3, F4, F5, F6, F7 } // The Teensy version is version 1 -#define DEVICE_VER 0x0001 +#define DEVICE_VER 0x0001 diff --git a/keyboards/tronguylabs/m122_3270/teensy/readme.md b/keyboards/tronguylabs/m122_3270/teensy/readme.md index 99946d746..43357ea61 100644 --- a/keyboards/tronguylabs/m122_3270/teensy/readme.md +++ b/keyboards/tronguylabs/m122_3270/teensy/readme.md @@ -1,2 +1,3 @@ # Teensy controller for m122-3270 + This directory contains the Teensy++ 2.0-specific definitions for the M122-3270 keyboard. diff --git a/keyboards/tronguylabs/m122_3270/teensy/rules.mk b/keyboards/tronguylabs/m122_3270/teensy/rules.mk index 2919fdedf..5fe62fabc 100644 --- a/keyboards/tronguylabs/m122_3270/teensy/rules.mk +++ b/keyboards/tronguylabs/m122_3270/teensy/rules.mk @@ -1,7 +1,22 @@ -# Overrides for the Teensy version - # MCU name MCU = at90usb1286 # Bootloader selection BOOTLOADER = halfkay + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +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 diff --git a/keyboards/tszaboo/ortho4exent/rules.mk b/keyboards/tszaboo/ortho4exent/rules.mk index e1756f2c4..6135a33a8 100644 --- a/keyboards/tszaboo/ortho4exent/rules.mk +++ b/keyboards/tszaboo/ortho4exent/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/tunks/ergo33/rules.mk b/keyboards/tunks/ergo33/rules.mk index fcd2cf52b..ce115ccdb 100644 --- a/keyboards/tunks/ergo33/rules.mk +++ b/keyboards/tunks/ergo33/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control MOUSEKEY_ENABLE = yes # Mouse keys COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboards/tw40/rules.mk b/keyboards/tw40/rules.mk index ef4ccf32f..171d1e484 100644 --- a/keyboards/tw40/rules.mk +++ b/keyboards/tw40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/txuu/rules.mk b/keyboards/txuu/rules.mk index 32981133b..efca6bac6 100644 --- a/keyboards/txuu/rules.mk +++ b/keyboards/txuu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ua62/config.h b/keyboards/ua62/config.h index 2b1ab31dc..c27ceafeb 100644 --- a/keyboards/ua62/config.h +++ b/keyboards/ua62/config.h @@ -193,26 +193,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/ua62/rules.mk b/keyboards/ua62/rules.mk index b28e458b7..1448508c2 100644 --- a/keyboards/ua62/rules.mk +++ b/keyboards/ua62/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/uk78/rules.mk b/keyboards/uk78/rules.mk index 7bcfa4ef1..e5b6844d8 100644 --- a/keyboards/uk78/rules.mk +++ b/keyboards/uk78/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/underscore33/rev1/rules.mk b/keyboards/underscore33/rev1/rules.mk index 32981133b..efca6bac6 100644 --- a/keyboards/underscore33/rev1/rules.mk +++ b/keyboards/underscore33/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/underscore33/rev2/rules.mk b/keyboards/underscore33/rev2/rules.mk index d226af58e..500c7a862 100644 --- a/keyboards/underscore33/rev2/rules.mk +++ b/keyboards/underscore33/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ungodly/launch_pad/config.h b/keyboards/ungodly/launch_pad/config.h index 7cad816e3..66d940c1b 100644 --- a/keyboards/ungodly/launch_pad/config.h +++ b/keyboards/ungodly/launch_pad/config.h @@ -18,26 +18,30 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x5544 // "UD" = Ungodly Design -#define PRODUCT_ID 0x4C50 // "LP" = Launch Pad -#define DEVICE_VER 0x9999 -#define MANUFACTURER Ungodly Design -#define PRODUCT Launch Pad +#define VENDOR_ID 0x5544 // "UD" = Ungodly Design +#define PRODUCT_ID 0x4C50 // "LP" = Launch Pad +#define DEVICE_VER 0x9999 +#define MANUFACTURER Ungodly Design +#define PRODUCT Launch Pad /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 4 /* Keyboard Matrix Assignments */ -#define MATRIX_ROW_PINS { D4, D6, D7, B4, B5 } -#define MATRIX_COL_PINS { B0, B1, B2, B3 } +#define MATRIX_ROW_PINS \ + { D4, D6, D7, B4, B5 } +#define MATRIX_COL_PINS \ + { B0, B1, B2, B3 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW /* Rotary Encoder Assignment */ -#define ENCODERS_PAD_A { C6 } -#define ENCODERS_PAD_B { B6 } +#define ENCODERS_PAD_A \ + { C6 } +#define ENCODERS_PAD_B \ + { B6 } #define ENCODER_RESOLUTION 2 /* Midi Slider */ @@ -45,22 +49,18 @@ #define MIDI_ADVANCED /* RGB Matrix configuration */ -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_KEYPRESSES -#endif - #define RGB_DI_PIN F7 #ifdef RGB_MATRIX_ENABLE # define RGBLED_NUM 22 # define DRIVER_LED_TOTAL RGBLED_NUM -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. # define RGB_MATRIX_HUE_STEP 8 # define RGB_MATRIX_SAT_STEP 8 # define RGB_MATRIX_VAL_STEP 8 @@ -108,5 +108,3 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 - -#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c index a401be7e8..42b6b397c 100644 --- a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c @@ -150,7 +150,8 @@ void matrix_scan_user(void) { } // 0.91" OLED, 128x32 resolution -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE + oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } diff --git a/keyboards/ungodly/launch_pad/keymaps/via/keymap.c b/keyboards/ungodly/launch_pad/keymaps/via/keymap.c index a401be7e8..083bb8b81 100644 --- a/keyboards/ungodly/launch_pad/keymaps/via/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/via/keymap.c @@ -150,7 +150,7 @@ void matrix_scan_user(void) { } // 0.91" OLED, 128x32 resolution -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } diff --git a/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c b/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c index 04270bcf3..4f856b977 100644 --- a/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c @@ -126,7 +126,7 @@ void matrix_scan_user(void) { } // 0.91" OLED, 128x32 resolution -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } diff --git a/keyboards/ungodly/launch_pad/rules.mk b/keyboards/ungodly/launch_pad/rules.mk index 298ee450c..25bc4e7da 100644 --- a/keyboards/ungodly/launch_pad/rules.mk +++ b/keyboards/ungodly/launch_pad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,7 +21,8 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output MIDI_ENABLE = yes -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/ungodly/nines/rules.mk b/keyboards/ungodly/nines/rules.mk index c8cbaf06b..5bb16c5c2 100644 --- a/keyboards/ungodly/nines/rules.mk +++ b/keyboards/ungodly/nines/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/unikorn/rules.mk b/keyboards/unikorn/rules.mk index 93bb0a56e..8da7f421e 100644 --- a/keyboards/unikorn/rules.mk +++ b/keyboards/unikorn/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/unison/keymaps/via/rules.mk b/keyboards/unison/keymaps/via/rules.mk index 6f7de6391..e452e8335 100644 --- a/keyboards/unison/keymaps/via/rules.mk +++ b/keyboards/unison/keymaps/via/rules.mk @@ -1,5 +1,5 @@ MOUSEKEY_ENABLE = yes AUDIO_ENABLE = yes -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite VIA_ENABLE = yes diff --git a/keyboards/unison/v04/rules.mk b/keyboards/unison/v04/rules.mk index 9a3ab3dec..8c0e6d3af 100644 --- a/keyboards/unison/v04/rules.mk +++ b/keyboards/unison/v04/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/uno/rules.mk b/keyboards/uno/rules.mk index d23e95512..5efc225b8 100644 --- a/keyboards/uno/rules.mk +++ b/keyboards/uno/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/uranuma/config.h b/keyboards/uranuma/config.h index ea5b66fb3..b3dc62b52 100644 --- a/keyboards/uranuma/config.h +++ b/keyboards/uranuma/config.h @@ -179,26 +179,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/uranuma/rules.mk b/keyboards/uranuma/rules.mk index 8f3b2c52f..96e0f35c2 100644 --- a/keyboards/uranuma/rules.mk +++ b/keyboards/uranuma/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/ut472/keymaps/tucznak/rules.mk b/keyboards/ut472/keymaps/tucznak/rules.mk index 1c04eb7a2..d394c719f 100644 --- a/keyboards/ut472/keymaps/tucznak/rules.mk +++ b/keyboards/ut472/keymaps/tucznak/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/ut472/rules.mk b/keyboards/ut472/rules.mk index a100637b4..6fca0a9da 100644 --- a/keyboards/ut472/rules.mk +++ b/keyboards/ut472/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/utd80/rules.mk b/keyboards/utd80/rules.mk index f77a4ad18..2bbf9671b 100644 --- a/keyboards/utd80/rules.mk +++ b/keyboards/utd80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/uzu42/keymaps/default/keymap.c b/keyboards/uzu42/keymaps/default/keymap.c index 393f7c3ea..54b944b24 100644 --- a/keyboards/uzu42/keymaps/default/keymap.c +++ b/keyboards/uzu42/keymaps/default/keymap.c @@ -105,8 +105,8 @@ void matrix_init_user(void) { #endif } -//SSD1306 OLED update loop, make sure to enable OLED_DRIVER_ENABLE=yes in rules.mk -#ifdef OLED_DRIVER_ENABLE +//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk +#ifdef OLED_ENABLE #define L_BASE 0 #define L_LOWER (1 << 1) @@ -210,11 +210,11 @@ void oled_task_user(void) { oled_write(read_logo(), false); } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE set_keylog(keycode, record); #endif // set_timelog(); diff --git a/keyboards/uzu42/rules.mk b/keyboards/uzu42/rules.mk index 600e0c94c..c977ef37d 100644 --- a/keyboards/uzu42/rules.mk +++ b/keyboards/uzu42/rules.mk @@ -15,21 +15,20 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -OLED_DRIVER_ENABLE = no # OLED display +OLED_ENABLE = no # OLED display SPLIT_KEYBOARD = yes DEFAULT_FOLDER = uzu42/rev1 diff --git a/keyboards/v60_type_r/config.h b/keyboards/v60_type_r/config.h index 38758d4ad..cc6c1f450 100644 --- a/keyboards/v60_type_r/config.h +++ b/keyboards/v60_type_r/config.h @@ -165,23 +165,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk index 666022724..3a6304246 100644 --- a/keyboards/v60_type_r/rules.mk +++ b/keyboards/v60_type_r/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -26,7 +26,6 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable the RGB Underglow RGBLIGHT_CUSTOM_DRIVER = yes -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/vagrant_10/rules.mk b/keyboards/vagrant_10/rules.mk index e4ffb10d0..f0e9a7a83 100755 --- a/keyboards/vagrant_10/rules.mk +++ b/keyboards/vagrant_10/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/viktus/sp111/rules.mk b/keyboards/viktus/sp111/rules.mk index 6aab68074..e23906d6a 100644 --- a/keyboards/viktus/sp111/rules.mk +++ b/keyboards/viktus/sp111/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/viktus/styrka/rules.mk b/keyboards/viktus/styrka/rules.mk index 612d7e4cc..806bdbabb 100644 --- a/keyboards/viktus/styrka/rules.mk +++ b/keyboards/viktus/styrka/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/vinta/readme.md b/keyboards/vinta/readme.md deleted file mode 100644 index a55395197..000000000 --- a/keyboards/vinta/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -Vinta -========= - -[Vinta](https://i.imgur.com/huX3lff.jpg) - - -This is an ARM-powered 65% keyboard PCB with USB Mini B connector and breakout for optional RGB underglow. - -Keyboard Maintainer: [Peioris](http://peioris.space/) and on [GitHub](https://github.com/coarse) -Hardware Supported: Vinta with STM32F042K6T6 -Hardware Availability: Private Groupbuy (will post on Reddit once QMK has RGB underglow working) - -Make example for this keyboard (after setting up your build environment): - - make vinta:default - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. - -#### Developer's Note - -STM32F042xx chips does not allow jumping to bootloader without BOOT0 being set to high, therefore it is impossible to enter the bootloader from sending a `RESET` keycode nor using bootmagic or bootmagic lite. -The only way to enter bootloader is to hold the BOOT0 button while the keyboard is powering up or after a power reset (done by pressing the reset switch or sending a `RESET` keycode). \ No newline at end of file diff --git a/keyboards/vinta/rules.mk b/keyboards/vinta/rules.mk deleted file mode 100644 index 6addb0805..000000000 --- a/keyboards/vinta/rules.mk +++ /dev/null @@ -1,23 +0,0 @@ -# MCU name -MCU = STM32F042 - -# Bootloader selection -BOOTLOADER = stm32-dfu - -# Build Options -# comment out to disable the options. -# -BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover -NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in - -LAYOUTS = 65_ansi_blocker - - -# Enter lower-power sleep mode when on the ChibiOS idle thread -OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/vision_division/Potential Layouts.txt b/keyboards/vision_division/Potential Layouts.txt deleted file mode 100644 index f715ac8c6..000000000 --- a/keyboards/vision_division/Potential Layouts.txt +++ /dev/null @@ -1,84 +0,0 @@ -/* Numeric Max / Numeric Normal - Full Grid - * .-----------------------------------. .--------------------------------------------------------------_--------------------------------------------------------------. .-----------------------------------. - * | | | | | | | | | | | | | | | | | | | | | | | | | - * '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' - * .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - * | | | | | | | | | | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------| - * | | | | | | | | | | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------| o |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------| - * | | | | | o | | | | | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------| o |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------| - * | | | | | | | | | | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------| - * | | | | | | | | | | | | | | | | | | | | | | | | | - * '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' - */ - -//* Numeric Max / Homing Normal - Full Grid - * .-----------------------------------. .--------------------------------------------------------------_--------------------------------------------------------------. .--------------------------. - * | | | | | | | | | | | | | | | | | | | | | | | | - * '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '--------------------------' - * .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .--------------------------. - * | | | | | | | | | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------| - * | | | | | | | | | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------| o |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------| - * | | | | | o | | | | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------| o |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------| - * | | | | | | | | | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------| - * | | | | | | | | | | | | | | | | | | | | | | | | - * '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '--------------------------' - */ - -//* Numeric Max / Homing Normal - Traditional - * .-----------------------------------. .-----------------------------------. .-----------------_-----------------. .-----------------------------------. .--------------------------. - * | | | | | | | | | | | | | | | | | | | | | | | | - * '-----------------------------------' '-----------------------------------' '-----------------------------------' '-----------------------------------' '--------------------------' - * .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .--------------------------. - * | | | | | | | | | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------| - * | | | | | | | | | | | | | | | | | | | | | | | | - * |--------+--------+--------+ | o |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| '--------+--------+--------' - * | | | | | o | | | | | | | | | | | | | | | - * |--------+--------+--------+--------| o |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| .--------. - * | | | | | | | | | | | | | | | | | | | | - * |--------+--------+--------+ | |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| .--------+--------+--------. - * | | | | | | | | | | | | | | | | | | | | | | - * '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '--------------------------' - */ - -/* Numeric Max / Numeric Normal - * .-----------------------------------. .--------------------------------------------------------------_--------------------------------------------------------------. .-----------------------------------. - * | | | | | | | | | | | | | | | | | | | | | | | | | - * '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' - * .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - * | | | | | | 1U / 2U | | | | | | | | | | | 1U / 2U | | | | | | - * |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------| - * | 1U | | | 1U | | | | | | | | | | | | | | | | | 1U | | | 1U | - * | / +--------+--------+ / | o |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | / +--------+--------+ / | - * | 2U | | | 2U | o | 1U / 2U | | | | | | | | | | | | | 2U | | | 2U | - * |--------+--------+--------+--------| o |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| |--------+--------+--------+--------| - * | | | | | | 1U / 2U | | | | | | | | | | | 1U / 2U | | | | | | - * | '--------+--------' | |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | '--------+--------' | - * | 1U / 2UH / 2UV | 1U / 2UH / 2UV | | | | | | | | 1U / 2U | | | | | | | | 1U / 2UH / 2UV | 1U / 2UH / 2UV | - * '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' - */ - -/* Numeric Max / Numeric Max - * .-----------------------------------. .-----------------------------------------------------------------------_-----------------------------------------------------------------------. .-----------------------------------. - * | | | | | | | | | | | | | | | | | | | | | | | | | | | - * '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' - * .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - * | | | | | | 1U / 2U | | | | | | | | | | | | | 1U / 2U | | | | | | - * |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------| - * | 1U | | | 1U | | | | | | | | | | | | | | | | | | | 1U | | | 1U | - * | / +--------+--------+ / | o |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | / +--------+--------+ / | - * | 2U | | | 2U | o | 1U / 2U | | | | | | | | | | | | | | | 2U | | | 2U | - * |--------+--------+--------+--------| o |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| |--------+--------+--------+--------| - * | | | | | | 1U / 2U | | | | | | | | | | | | | 1U / 2U | | | | | | - * | '--------+--------' | |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| | '--------+--------' | - * | 1U / 2UH / 2UV | 1U / 2UH / 2UV | | | | | | | | 1U / 2U | 1U / 2U | | | | | | | | 1U / 2UH / 2UV | 1U / 2UH / 2UV | - * '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' - */ diff --git a/keyboards/vision_division/config.h b/keyboards/vision_division/config.h deleted file mode 100644 index 249431b87..000000000 --- a/keyboards/vision_division/config.h +++ /dev/null @@ -1,141 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -// Due to the configurability of this keyboard, matrix sizes are determined in the keymap's config.h - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -#define BACKLIGHT_PIN B7 -#define BACKLIGHT_BREATHING -#define BACKLIGHT_LEVELS 3 - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 0 - -#define MATRIX_MASKED - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -// #ifndef NO_DEBUG -// # define NO_DEBUG -// #endif - -/* disable print */ -// #ifndef NO_PRINT -// # define NO_PRINT -// #endif - -/* Only print user print statements */ -// #define USER_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/vision_division/keymaps/default/config.h b/keyboards/vision_division/keymaps/default/config.h deleted file mode 100644 index 7af43fb6b..000000000 --- a/keyboards/vision_division/keymaps/default/config.h +++ /dev/null @@ -1,77 +0,0 @@ -#pragma once - -// place overrides here - -#include "matrix_types.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define DEVICE_VER 0x0001 -#define MANUFACTURER IBNobody - -#define MATRIX_ROWS 6 -#define MATRIX_ROW_PINS { C2, C3, F4, F5, F6, F7 } - -// !!! MAKE SURE THAT THE LEFT/RIGHT PCB DEFINES MATCH ON ALL OF THESE COLUMNS - -// **LEFT** **RIGHT** -#define PRODUCT_ID GET_PID( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY) -#define MATRIX_COLS GET_MATRIX_COLS( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY) -#define MATRIX_COL_PINS GET_MATRIX_COL_PINS( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY) - -#define LAYOUT(MATRIX_LAYER, \ - k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ - k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ - k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ - k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \ - k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ - k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ -) \ -LAYOUT_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, NUMERIC_MAX_TEENSY, \ - k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ - k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ - k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ - k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, KC_NO, KC_NO, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \ - k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, KC_NO, KC_NO, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ - k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ -) - -// Example Keymap Macros - -/* -#define LAYOUT(MATRIX_LAYER, \ - k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ - k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ - k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ - k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \ - k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ - k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ -) \ -LAYOUT_MASTER(MATRIX_LAYER, NUMERIC_MAX_TEENSY, NUMERIC_MAX, \ - k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ - k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ - k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ - k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \ - k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ - k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ -) -*/ - -/* -#define LAYOUT(MATRIX_LAYER, \ - k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, \ - k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, \ - k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, \ - k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, \ - k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, \ - k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B \ -) \ -LAYOUT_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, HOMING_MAX_TEENSY, \ - k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, KC_NO, \ - k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, KC_NO, \ - k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, KC_NO, \ - k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, KC_NO, KC_NO, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, KC_NO, \ - k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, KC_NO, KC_NO, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, KC_NO, \ - k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, KC_NO \ -) -*/ diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c deleted file mode 100644 index 47c00ac37..000000000 --- a/keyboards/vision_division/keymaps/default/keymap.c +++ /dev/null @@ -1,367 +0,0 @@ -#include QMK_KEYBOARD_H -#include "led.h" - -enum keyboard_layers { - LAYER_QWERTY = 0, - LAYER_UPPER, - LAYER_LOWER, - LAYER_FUNCTION, - LAYER_MOUSE, - LAYER_ADJUST, -}; - -enum custom_keycodes { - M_CP_CT = SAFE_RANGE, - M_UPPER, - M_LOWER, - M_MOUSE, - TIMBR_1, - TIMBR_2, - TIMBR_3, - TIMBR_4, - TMPO_UP, - TMPO_DN, - TMPO_DF -}; - -#define SC_UNDO LCTL(KC_Z) -#define SC_REDO LCTL(KC_Y) -#define SC_CUT LCTL(KC_X) -#define SC_COPY LCTL(KC_C) -#define SC_PSTE LCTL(KC_V) -#define SC_SELA LCTL(KC_A) -#define SC_SAVE LCTL(KC_S) -#define SC_OPEN LCTL(KC_O) -#define SC_ACLS LALT(KC_F4) -#define SC_CCLS LCTL(KC_F4) - -#define OS_SHFT OSM(MOD_LSFT) - -#define ________________ _______, _______ -#define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX - -const matrix_row_t matrix_mask[MATRIX_ROWS] = -{ -// 1098765432109876543210987654321 - 0b0000000001111111101111011111111, - 0b0000000001111111111111111111111, - 0b0000000001111111111111111111111, - 0b0000000001111111111111111111111, - 0b0000000001010111111111111111111, - 0b0000000001111101111111101011111, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = -{ -/* LAYER = LAYER_QWERTY - .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | VOL DN | MUTE | VOL UP | BACKLT | | F1 | F2 | F3 | F4 | XXXXXX | F5 | F6 | F7 | F8 | XXXXXX | F9 | F10 | F11 | F12 | | PRINT | SCR LK | PAUSE | FN | - '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' - .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | NUM LK | KP / | KP * | KP - | | ESC | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = | BACKSP | | INS | HOME | PG UP | XXXXXX | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | KP 7 | KP 8 | KP 9 | KP + | | TAB | TAB | Q | W | E | R | T | Y | U | I | O | P | - | \ | | DEL | END | PG DN | XXXXXX | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | KP 4 | KP 5 | KP 6 | KP + | | CAP LK | BACKSP | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | o | CP/CT | UNDO | PASTE | XXXXXX | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | KP 1 | KP 2 | KP 3 | KP Ent | | LSHIFT | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | RSHIFT | | XXXXXX | UP | XXXXXX | XXXXXX | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | KP 0 | KP , | KP . | KP Ent | | LCTRL | XXXXXX | LWIN | XXXXXX | LALT | UPPER | SPACE . SPACE | LOWER | OSHIFT | RALT | APP | XXXXXX | RCTRL | | LEFT | DOWN | RIGHT | XXXXXX | - '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' -*/ -KEYMAP(LAYER_QWERTY, \ - KC_VOLD, KC_MUTE, KC_VOLU, BL_STEP, KC_F1 , KC_F2 , KC_F3 , KC_F4 , XXXXXXX, KC_F5 , KC_F6 , KC_F7 , KC_F8 , XXXXXXX, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX , \ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_ESC , KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL , KC_BSPC, KC_INS , KC_HOME, KC_PGUP, XXXXXXX , \ - KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_TAB , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS, KC_BSLS, KC_DEL , KC_END , KC_PGDN, XXXXXXX , \ - KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_CAPS, KC_BSPC, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , M_CP_CT, SC_UNDO, SC_PSTE, XXXXXXX , \ - KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_LSFT, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_RSFT, XXXXXXX, KC_UP , XXXXXXX, XXXXXXX , \ - KC_KP_0, KC_PCMM, KC_PDOT, KC_PENT, KC_LCTL, XXXXXXX, KC_LGUI, XXXXXXX, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_RALT, KC_APP , XXXXXXX, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX \ -), -/* LAYER = LAYER_LOWER - .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | ______ | ______ | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | ______ | ______ | ______ | - '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' - .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | ______ | ______ | | ______ | ______ | ______ | ______ | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | ______ | ______ | o | ______ | ______ | ______ | ______ | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | ______ | | | & | ! | ~ | ; | : | = | < | > | ? | ______ | ______ | | ______ | ______ | ______ | ______ | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ . ______ | LOWER | ______ | ______ | ______ | XXXXXX | ______ | | ______ | ______ | ______ | ______ | - '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' -*/ -KEYMAP(LAYER_LOWER, \ - _______, _______, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______ \ -), -/* LAYER = LAYER_UPPER - .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | ______ | ______ | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | ______ | ______ | ______ | - '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' - .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | ______ | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | ______ | ______ | | ______ | ______ | ______ | ______ | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | ______ | F5 | F6 | F7 | F8 | CAP LK | KP * | KP 4 | KP 5 | KP 6 | KP + | ______ | ______ | o | ______ | ______ | ______ | ______ | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | ______ | F9 | F10 | F11 | F12 | SCR LK | KP 0 | KP 1 | KP 2 | KP 3 | KP Ent | ______ | ______ | | ______ | ______ | ______ | ______ | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | UPPER | KP 0 . KP 0 | ______ | RALT | KP . | KP Ent | XXXXXX | ______ | | ______ | ______ | ______ | ______ | - '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' -*/ -KEYMAP(LAYER_UPPER, \ - _______, _______, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_CAPS, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_SLCK, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, XXXXXXX, _______, _______, _______, _______, _______ \ -), -/* LAYER = LAYER_MOUSE - .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | - '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' - .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | MS AC0 | MS WHU | MS AC2 | MS BT1 | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | MS WHL | MS WHD | MS WHU | MS BT2 | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | o | MS BT1 | MS BT2 | MS BT3 | MS BT3 | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | XXXXXX | MS U | XXXXXX | MS BT4 | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ . ______ | ______ | ______ | ______ | ______ | ______ | ______ | | MS L | MS D | MS R | MS BT5 | - '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' -*/ -KEYMAP(LAYER_MOUSE, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ACL0, KC_WH_U, KC_ACL2, KC_BTN1, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_BTN2, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN3, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_MS_U, XXXXXXX, KC_BTN4, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5 \ -), -/* LAYER = LAYER_ADJUST - .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | VOICE- | AUDIO | VOICE+ | MUSIC | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | - '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' - .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | o | XXXXXX | XXXXXX | XXXXXX | XXXXXX | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | - |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| - | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX . XXXXXX | LOWER | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | - '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' -*/ -KEYMAP(LAYER_ADJUST, \ - MUV_DE , AU_TOG , MUV_IN , MU_TOG , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ -), -}; - -#ifdef AUDIO_ENABLE - -float tone_my_startup[][2] = SONG(ODE_TO_JOY); -float tone_my_goodbye[][2] = SONG(ROCK_A_BYE_BABY); - -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); - -float tone_audio_on[][2] = SONG(CLOSE_ENCOUNTERS_5_NOTE); -float tone_music_on[][2] = SONG(DOE_A_DEER); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); - -float tone_caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND); -float tone_caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND); -float tone_numlk_on[][2] = SONG(NUM_LOCK_ON_SOUND); -float tone_numlk_off[][2] = SONG(NUM_LOCK_OFF_SOUND); -float tone_scroll_on[][2] = SONG(SCROLL_LOCK_ON_SOUND); -float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND); - -#endif /* AUDIO_ENABLE */ - -void persistent_default_layer_set(uint16_t default_layer) -{ - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case M_CP_CT: - if (record->event.pressed) { - register_code(KC_LCTL); - if (record->tap.count == 1) { - register_code(KC_C); - unregister_code(KC_C); - } else if (record->tap.count == 2) { - register_code(KC_X); - unregister_code(KC_X); - } - unregister_code(KC_LCTL); - } - return false; - - case M_UPPER: - if (record->event.pressed) { - layer_on(LAYER_UPPER); - breathing_period_set(2); - breathing_pulse(); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } else { - layer_off(LAYER_UPPER); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } - return false; - - case M_LOWER: - if (record->event.pressed) { - layer_on(LAYER_LOWER); - breathing_period_set(2); - breathing_pulse(); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } else { - layer_off(LAYER_LOWER); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } - return false; - -#ifdef MOUSEKEY_ENABLE - case M_MOUSE: - if (record->event.pressed) { - layer_invert(LAYER_MOUSE); - } - return false; -#endif /* MOUSEKEY_ENABLE */ - -#ifdef AUDIO_ENABLE - case TIMBR_1: - if (record->event.pressed) set_timbre(TIMBRE_12); - return false; - case TIMBR_2: - if (record->event.pressed) set_timbre(TIMBRE_25); - return false; - case TIMBR_3: - if (record->event.pressed) set_timbre(TIMBRE_50); - return false; - case TIMBR_4: - if (record->event.pressed) set_timbre(TIMBRE_75); - return false; - case TMPO_UP: - if (record->event.pressed) increase_tempo(10); - return false; - case TMPO_DN: - if (record->event.pressed) decrease_tempo(10); - return false; - case TMPO_DF: - if (record->event.pressed) { - set_timbre(TIMBRE_DEFAULT); - set_tempo(TEMPO_DEFAULT); - } - return false; -#endif /* AUDIO_ENABLE */ - - default: - return true; - } - return true; -}; - -#ifdef AUDIO_ENABLE - -void matrix_init_user(void) -{ - set_voice(default_voice); - startup_user(); - println("Matrix Init"); -} - -void led_set_user(uint8_t usb_led) -{ - static uint8_t old_usb_led = 0; - - _delay_ms(10); // gets rid of tick - - if (!is_playing_notes()) - { - if ((usb_led & (1<. #define PRODUCT Vitamins included #include "config_common.h" - -#ifndef NO_ACTION_MACRO - #define NO_ACTION_MACRO -#endif -#ifndef NO_ACTION_FUNCTION - #define NO_ACTION_FUNCTION -#endif -#ifndef NO_DEBUG - #define NO_DEBUG -#endif // !NO_DEBUG -#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE) - #define NO_PRINT -#endif // !NO_PRINT diff --git a/keyboards/vitamins_included/keymaps/via/config.h b/keyboards/vitamins_included/keymaps/via/config.h new file mode 100644 index 000000000..847858e12 --- /dev/null +++ b/keyboards/vitamins_included/keymaps/via/config.h @@ -0,0 +1,22 @@ +/* +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2019 Mikkel Jeppesen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +# define NO_MUSIC_MODE diff --git a/keyboards/vitamins_included/keymaps/via/rules.mk b/keyboards/vitamins_included/keymaps/via/rules.mk index 036bd6d1c..1e5b99807 100644 --- a/keyboards/vitamins_included/keymaps/via/rules.mk +++ b/keyboards/vitamins_included/keymaps/via/rules.mk @@ -1 +1 @@ -VIA_ENABLE = yes \ No newline at end of file +VIA_ENABLE = yes diff --git a/keyboards/vitamins_included/rev2/config.h b/keyboards/vitamins_included/rev2/config.h index 8bf640f0b..bab387ce6 100644 --- a/keyboards/vitamins_included/rev2/config.h +++ b/keyboards/vitamins_included/rev2/config.h @@ -47,11 +47,6 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - /* ws2812 RGB LED */ #define RGB_DI_PIN F0 @@ -61,7 +56,7 @@ along with this program. If not, see . /* Audio settings */ #ifdef AUDIO_ENABLE - #define AUDIO_PIN C6 // Define this to enable the buzzer +# define AUDIO_PIN C6 // Define this to enable the buzzer #endif #define QMK_ESC_OUTPUT F1 // usually COL diff --git a/keyboards/vitamins_included/rules.mk b/keyboards/vitamins_included/rules.mk index c95ae27ec..4805f2fe0 100644 --- a/keyboards/vitamins_included/rules.mk +++ b/keyboards/vitamins_included/rules.mk @@ -8,12 +8,11 @@ MCU = atmega32u4 AUDIO_ENABLE = yes # Audio output on port C6 BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no # Console for debug DEBUG_ENABLE = no # Enable more debug info EXTRAKEY_ENABLE = yes # Audio control and System control -MIDI_ENABLE = no # MIDI controls MOUSEKEY_ENABLE = no # Mouse keys NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. diff --git a/keyboards/vitamins_included/vitamins_included.c b/keyboards/vitamins_included/vitamins_included.c index 078f93e0e..e83c81633 100644 --- a/keyboards/vitamins_included/vitamins_included.c +++ b/keyboards/vitamins_included/vitamins_included.c @@ -1,6 +1,6 @@ #include QMK_KEYBOARD_H -#ifdef ONEHAND_ENABLE +#ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/vn66/rules.mk b/keyboards/vn66/rules.mk index c765aa74c..474270f2e 100644 --- a/keyboards/vn66/rules.mk +++ b/keyboards/vn66/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/waldo/rules.mk b/keyboards/waldo/rules.mk index db9db239d..5578ca941 100644 --- a/keyboards/waldo/rules.mk +++ b/keyboards/waldo/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/wallaby/config.h b/keyboards/wallaby/config.h index 98377098f..c81c97ff1 100644 --- a/keyboards/wallaby/config.h +++ b/keyboards/wallaby/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/wallaby/rules.mk b/keyboards/wallaby/rules.mk index 653fcdb38..b5d7a7300 100644 --- a/keyboards/wallaby/rules.mk +++ b/keyboards/wallaby/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/walletburner/cajal/rules.mk b/keyboards/walletburner/cajal/rules.mk index 173b00fee..58ae98074 100644 --- a/keyboards/walletburner/cajal/rules.mk +++ b/keyboards/walletburner/cajal/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/walletburner/neuron/rules.mk b/keyboards/walletburner/neuron/rules.mk index f74861730..eec3522db 100644 --- a/keyboards/walletburner/neuron/rules.mk +++ b/keyboards/walletburner/neuron/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wekey/we27/rules.mk b/keyboards/wekey/we27/rules.mk index f510969bf..b16309bf3 100644 --- a/keyboards/wekey/we27/rules.mk +++ b/keyboards/wekey/we27/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/westfoxtrot/aanzee/rules.mk b/keyboards/westfoxtrot/aanzee/rules.mk index b1f66767d..881cab930 100644 --- a/keyboards/westfoxtrot/aanzee/rules.mk +++ b/keyboards/westfoxtrot/aanzee/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/westfoxtrot/cyclops/config.h b/keyboards/westfoxtrot/cyclops/config.h index 9757c6c21..4ad660695 100644 --- a/keyboards/westfoxtrot/cyclops/config.h +++ b/keyboards/westfoxtrot/cyclops/config.h @@ -152,26 +152,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/westfoxtrot/cyclops/rules.mk b/keyboards/westfoxtrot/cyclops/rules.mk index 7be886618..d54779838 100644 --- a/keyboards/westfoxtrot/cyclops/rules.mk +++ b/keyboards/westfoxtrot/cyclops/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c b/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c index 2d7bf2a5e..c0df375a7 100644 --- a/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c +++ b/keyboards/westfoxtrot/cypher/rev1/keymaps/kwer/keymap.c @@ -28,14 +28,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DL] = LAYOUT_iso ( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, KC_BSPC, _______, KC_NLCK, KC_PSCR,KC_PSLS,KC_PAST, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, KC_P7, KC_P8, KC_P9, KC_PMNS, - SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA, DE_PLUS, KC_P7, KC_P8, KC_P9, KC_PMNS, + SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_ODIA,DE_ADIA, DE_HASH, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, DE_LABK, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LCTL, _______, KC_LALT, KC_SPC, _______, KC_RALT, TG(_LE), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_NO ), [_FN] = LAYOUT_iso ( - DE_RING, 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, _______, _______, _______, _______, _______, + DE_DEG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/westfoxtrot/cypher/rev1/rules.mk b/keyboards/westfoxtrot/cypher/rev1/rules.mk index b4d51c2af..c89f2224f 100644 --- a/keyboards/westfoxtrot/cypher/rev1/rules.mk +++ b/keyboards/westfoxtrot/cypher/rev1/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/westfoxtrot/cypher/rev5/rules.mk b/keyboards/westfoxtrot/cypher/rev5/rules.mk index 57c2f6899..3c8b00873 100644 --- a/keyboards/westfoxtrot/cypher/rev5/rules.mk +++ b/keyboards/westfoxtrot/cypher/rev5/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/westfoxtrot/prophet/rules.mk b/keyboards/westfoxtrot/prophet/rules.mk index 7079a7966..85aad7bfd 100644 --- a/keyboards/westfoxtrot/prophet/rules.mk +++ b/keyboards/westfoxtrot/prophet/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/whale/sk/v3/rules.mk b/keyboards/whale/sk/v3/rules.mk index cbb4c8dc5..032642055 100644 --- a/keyboards/whale/sk/v3/rules.mk +++ b/keyboards/whale/sk/v3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wheatfield/blocked65/rules.mk b/keyboards/wheatfield/blocked65/rules.mk index 7151e5e5e..a24b420d4 100644 --- a/keyboards/wheatfield/blocked65/rules.mk +++ b/keyboards/wheatfield/blocked65/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI controls BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/wheatfield/split75/config.h b/keyboards/wheatfield/split75/config.h index 4646dac46..63c9492c3 100644 --- a/keyboards/wheatfield/split75/config.h +++ b/keyboards/wheatfield/split75/config.h @@ -10,6 +10,10 @@ #define MATRIX_ROWS 8 #define MATRIX_COLS 14 +#define LED_NUM_LOCK_PIN D0 +#define LED_CAPS_LOCK_PIN D1 +#define LED_SCROLL_LOCK_PIN D6 + #define RGBLED_NUM 8 #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_SLEEP diff --git a/keyboards/wheatfield/split75/rules.mk b/keyboards/wheatfield/split75/rules.mk index a13911595..e6f6e94b7 100644 --- a/keyboards/wheatfield/split75/rules.mk +++ b/keyboards/wheatfield/split75/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wheatfield/split75/split75.c b/keyboards/wheatfield/split75/split75.c index 3ed456292..b8a3fe6c2 100644 --- a/keyboards/wheatfield/split75/split75.c +++ b/keyboards/wheatfield/split75/split75.c @@ -1,25 +1 @@ #include "split75.h" - -#include "i2c_master.h" - - -void keyboard_pre_init_kb(void) { - led_init_ports(); - keyboard_pre_init_user(); -} - -void led_init_ports(void) { - setPinOutput(NUMLOCK_LED_PIN); - setPinOutput(CAPSLOCK_LED_PIN); - setPinOutput(SCROLLLOCK_LED_PIN); -} - -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - if(res) { - writePin(NUMLOCK_LED_PIN, led_state.num_lock); - writePin(CAPSLOCK_LED_PIN, led_state.caps_lock); - writePin(SCROLLLOCK_LED_PIN, led_state.scroll_lock); - } - return res; -} diff --git a/keyboards/wheatfield/split75/split75.h b/keyboards/wheatfield/split75/split75.h index 9a84c129d..93da3e7b8 100644 --- a/keyboards/wheatfield/split75/split75.h +++ b/keyboards/wheatfield/split75/split75.h @@ -45,7 +45,3 @@ { K06, K16, K26, K36, K46, KC_NO, KC_NO, KC_NO, K86, K96, KC_NO, K116, K126, K136 }, \ { K07, K17, K27, K37, K47, KC_NO, KC_NO, KC_NO, K87, K97, K107, K117, K127, K137 } \ } - -#define NUMLOCK_LED_PIN D0 -#define CAPSLOCK_LED_PIN D1 -#define SCROLLLOCK_LED_PIN D6 diff --git a/keyboards/whitefox/config.h b/keyboards/whitefox/config.h index 4d7a460d2..1cdac01d0 100644 --- a/keyboards/whitefox/config.h +++ b/keyboards/whitefox/config.h @@ -62,6 +62,20 @@ along with this program. If not, see . #define LED_BRIGHTNESS_LO 100 #define LED_BRIGHTNESS_HI 255 +/* LED matrix driver */ +#define LED_DRIVER_ADDR_1 0x74 +#define LED_DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 71 +#define LED_DISABLE_WHEN_USB_SUSPENDED + +/* i2c (for LED matrix) */ +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_BANK GPIOB +#define I2C1_SCL 0 +#define I2C1_SDA 1 + /* 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). */ diff --git a/keyboards/whitefox/keymaps/billypython/rules.mk b/keyboards/whitefox/keymaps/billypython/rules.mk index 133c7af54..4bb1fdfaf 100644 --- a/keyboards/whitefox/keymaps/billypython/rules.mk +++ b/keyboards/whitefox/keymaps/billypython/rules.mk @@ -1,5 +1,5 @@ BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes TAP_DANCE_ENABLE = yes diff --git a/keyboards/whitefox/keymaps/kim-kim/keymap.c b/keyboards/whitefox/keymaps/kim-kim/keymap.c index a25406758..baaa13687 100644 --- a/keyboards/whitefox/keymaps/kim-kim/keymap.c +++ b/keyboards/whitefox/keymaps/kim-kim/keymap.c @@ -51,18 +51,3 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______, _______, _______,_______,_______, KC_HOME,_______,KC_END \ ), }; - -/* Give numbers some descriptive names */ -#define ACTION_LEDS_ALL 1 -#define ACTION_LEDS_GAME 2 - -const uint16_t fn_actions[] = { - [2] = ACTION_FUNCTION(ACTION_LEDS_ALL), - [3] = ACTION_FUNCTION(ACTION_LEDS_GAME), - - [4] = ACTION_USAGE_CONSUMER(0x1B4), - [5] = ACTION_USAGE_CONSUMER(0x196), - [6] = ACTION_USAGE_CONSUMER(0x1A6), - [7] = ACTION_USAGE_CONSUMER(0x1A0), - -}; diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index 111c0faba..bb327cf26 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -1,5 +1,5 @@ # Generic features -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/whitefox/keymaps/matt3o/keymap.c b/keyboards/whitefox/keymaps/matt3o/keymap.c index f6987fe1a..bb8419668 100644 --- a/keyboards/whitefox/keymaps/matt3o/keymap.c +++ b/keyboards/whitefox/keymaps/matt3o/keymap.c @@ -16,6 +16,13 @@ along with this program. If not, see . */ #include QMK_KEYBOARD_H +enum custom_keycodes { + AL_FILE = SAFE_RANGE, + AL_WWW, + AL_HELP, + AL_CMD +}; + const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer * ,---------------------------------------------------------------. @@ -45,25 +52,44 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \ ), [2] = LAYOUT( \ - KC_SLEP,KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN2, \ - KC_TRNS,KC_TRNS,KC_FN5 ,KC_FN6 ,KC_TRNS,KC_FN7 ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_TRNS,KC_TRNS,KC_TRNS, KC_FN3, \ - KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN4 ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,\ + KC_SLEP,KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_NO, \ + KC_TRNS,KC_TRNS,AL_WWW ,AL_HELP ,KC_TRNS,AL_CMD ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_TRNS,KC_TRNS,KC_TRNS, KC_NO, \ + KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,AL_FILE ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,\ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_CALC,KC_TRNS,KC_TRNS,KC_TRNS,KC_MAIL,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,\ KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS \ ), }; -/* Give numbers some descriptive names */ -#define ACTION_LEDS_ALL 1 -#define ACTION_LEDS_GAME 2 - -const uint16_t fn_actions[] = { - [2] = ACTION_FUNCTION(ACTION_LEDS_ALL), - [3] = ACTION_FUNCTION(ACTION_LEDS_GAME), - - [4] = ACTION_USAGE_CONSUMER(0x1B4), - [5] = ACTION_USAGE_CONSUMER(0x196), - [6] = ACTION_USAGE_CONSUMER(0x1A6), - [7] = ACTION_USAGE_CONSUMER(0x1A0), - -}; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case AL_FILE: + if (record->event.pressed) { + host_consumer_send(0x1B4); // AL File Browser + } else { + host_consumer_send(0); + } + return false; + case AL_WWW: + if (record->event.pressed) { + host_consumer_send(0x196); // AL Internet Browser + } else { + host_consumer_send(0); + } + return false; + case AL_HELP: + if (record->event.pressed) { + host_consumer_send(0x1A6); // AL Integrated Help Center + } else { + host_consumer_send(0); + } + return false; + case AL_CMD: + if (record->event.pressed) { + host_consumer_send(0x1A0); // AL Command Line Processor/Run + } else { + host_consumer_send(0); + } + return false; + } + return true; +} diff --git a/keyboards/whitefox/keymaps/mattrighetti/rules.mk b/keyboards/whitefox/keymaps/mattrighetti/rules.mk index ceb1c92ec..7a421cc9a 100644 --- a/keyboards/whitefox/keymaps/mattrighetti/rules.mk +++ b/keyboards/whitefox/keymaps/mattrighetti/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite # Keyboard-specific features BACKLIGHT_ENABLE = no diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index 771804369..990496876 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -6,17 +6,15 @@ BOOTLOADER = kiibohd # Board: it should exist either in /os/hal/boards/ # or /boards -# - BOARD = -# - PJRC_TEENSY_LC for Teensy LC -# - PJRC_TEENSY_3 for Teensy 3.0 -# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 -# - MCHCK_K20 for Infinity KB +# This board was copied from PJRC_TEENSY_3_1. The only difference should be a +# hack to ensure the watchdog has started before trying to disable it, and an +# override to disable restart of USB driver after returning from suspend. BOARD = IC_TEENSY_3_1 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,16 +23,12 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BACKLIGHT_DRIVER = custom -VISUALIZER_ENABLE = yes -LED_DRIVER = is31fl3731c -LED_WIDTH = 16 -LED_HEIGHT = 5 +LED_MATRIX_ENABLE = yes +LED_MATRIX_DRIVER = IS31FL3731 LAYOUTS = 65_ansi 65_ansi_blocker 65_ansi_blocker_split_bs 65_iso 65_iso_blocker 65_iso_blocker_split_bs diff --git a/keyboards/whitefox/whitefox.c b/keyboards/whitefox/whitefox.c index ea083c6e0..b17af1512 100644 --- a/keyboards/whitefox/whitefox.c +++ b/keyboards/whitefox/whitefox.c @@ -16,3 +16,79 @@ along with this program. If not, see . */ #include "whitefox.h" + +#ifdef LED_MATRIX_ENABLE +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +// The numbers in the comments are the led numbers DXX on the PCB +/* Refer to IS31 manual for these locations + * driver + * | LED address + * | | */ +// 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 + { 0, C1_1 }, { 0, C1_2 }, { 0, C1_3 }, { 0, C1_4 }, { 0, C1_5 }, { 0, C1_6 }, { 0, C1_7 }, { 0, C1_8 }, { 0, C2_1 }, { 0, C2_2 }, { 0, C2_3 }, { 0, C2_4 }, { 0, C2_5 }, { 0, C2_6 }, { 0, C2_7 }, { 0, C2_8 }, +// 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 + { 0, C3_1 }, { 0, C3_2 }, { 0, C3_3 }, { 0, C3_4 }, { 0, C3_5 }, { 0, C3_6 }, { 0, C3_7 }, { 0, C3_8 }, { 0, C4_1 }, { 0, C4_2 }, { 0, C4_3 }, { 0, C4_4 }, { 0, C4_5 }, { 0, C4_6 }, { 0, C4_7 }, +// 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 + { 0, C4_8 }, { 0, C5_1 }, { 0, C5_2 }, { 0, C5_3 }, { 0, C5_4 }, { 0, C5_5 }, { 0, C5_6 }, { 0, C5_7 }, { 0, C5_8 }, { 0, C6_1 }, { 0, C6_2 }, { 0, C6_3 }, { 0, C6_4 }, { 0, C6_5 }, { 0, C6_6 }, +// 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 + { 0, C6_7 }, { 0, C6_8 }, { 0, C7_1 }, { 0, C7_2 }, { 0, C7_3 }, { 0, C7_4 }, { 0, C7_5 }, { 0, C7_6 }, { 0, C7_7 }, { 0, C7_8 }, { 0, C8_1 }, { 0, C8_2 }, { 0, C8_3 }, { 0, C8_4 }, { 0, C8_5 }, +// 62 63 64 65 66 67 68 69 70 71 + { 0, C8_6 }, { 0, C8_7 }, { 0, C8_8 }, { 0, C9_1 }, { 0, C9_2 }, { 0, C9_3 }, { 0, C9_4 }, { 0, C9_5 }, { 0, C9_6 }, { 0, C9_7 }, +}; + +led_config_t g_led_config = { + { + // Key Matrix to LED Index + { 0, 1, 2, 3, 4, 5, 6, 7, 8 }, + { 9, 10, 11, 12, 13, 14, 15, 16, 17 }, + { 18, 19, 20, 21, 22, 23, 24, 25, 26 }, + { 27, 28, 29, 30, 31, 32, 33, 34, 35 }, + { 36, 37, 38, 39, 40, 41, 42, 43, 44 }, + { 45, 46, 47, 48, 49, 50, 51, 52, 53 }, + { 54, 55, 56, 57, 58, 59, 60, 61, 62 }, + { 63, 64, 65, 66, 67, 68, 69, 70, NO_LED }, + }, { + // LED Index to Physical Position + { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 119, 0 }, { 134, 0 }, { 149, 0 }, { 164, 0 }, { 179, 0 }, { 194, 0 }, { 209, 0 }, { 224, 0 }, + { 4, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 205, 16 }, { 224, 16 }, + { 6, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 175, 32 }, { 190, 32 }, { 207, 32 }, { 224, 32 }, + { 2, 48 }, { 19, 48 }, { 34, 48 }, { 49, 48 }, { 63, 48 }, { 78, 48 }, { 93, 48 }, { 108, 48 }, { 123, 48 }, { 138, 48 }, { 153, 48 }, { 168, 48 }, { 189, 48 }, { 209, 48 }, { 224, 48 }, + { 2, 64 }, { 21, 64 }, { 39, 64 }, { 95, 64 }, { 149, 64 }, { 164, 64 }, { 179, 64 }, { 194, 64 }, { 209, 64 }, { 224, 64 } + }, { + // LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + } +}; +#endif + +void keyboard_pre_init_kb(void) { +#ifdef LED_MATRIX_ENABLE + // Turn on LED controller + setPinOutput(B16); + writePinHigh(B16); +#endif + keyboard_pre_init_user(); +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + +#ifdef LED_MATRIX_ENABLE + /* + * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c), + * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot. + */ +# if !defined(LED_MATRIX_STARTUP_SPD) +# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2 +# endif + led_matrix_set_speed(LED_MATRIX_STARTUP_SPD), + led_matrix_set_flags(LED_FLAG_ALL); +#endif + + matrix_init_user(); +} diff --git a/keyboards/wilba_tech/rama_works_kara/rules.mk b/keyboards/wilba_tech/rama_works_kara/rules.mk index 8af9101d3..95d6c1dcb 100644 --- a/keyboards/wilba_tech/rama_works_kara/rules.mk +++ b/keyboards/wilba_tech/rama_works_kara/rules.mk @@ -12,7 +12,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -34,5 +34,5 @@ LAYOUTS = 60_hhkb SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_koyu/rules.mk b/keyboards/wilba_tech/rama_works_koyu/rules.mk index 809ab26d0..2893a8727 100644 --- a/keyboards/wilba_tech/rama_works_koyu/rules.mk +++ b/keyboards/wilba_tech/rama_works_koyu/rules.mk @@ -20,14 +20,13 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 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 @@ -42,5 +41,5 @@ CIE1931_CURVE = yes SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_m10_b/config.h b/keyboards/wilba_tech/rama_works_m10_b/config.h index 083ff35e8..4d41aae56 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/config.h +++ b/keyboards/wilba_tech/rama_works_m10_b/config.h @@ -156,24 +156,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - #define DYNAMIC_KEYMAP_LAYER_COUNT 10 diff --git a/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/keymap.c b/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/keymap.c index b90ca686f..d58606495 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/keymap.c +++ b/keyboards/wilba_tech/rama_works_m10_b/keymaps/knops/keymap.c @@ -23,14 +23,8 @@ void set_led_state(int ledId, bool state) { } -void led_init_ports() -{ -} - void led_set_layer(int layer) { - led_init_ports(); - led_set_layer(0); /*KNOPS_SIMPLELED_STATES*/ diff --git a/keyboards/wilba_tech/rama_works_m10_b/rules.mk b/keyboards/wilba_tech/rama_works_m10_b/rules.mk index 8b7a0c7f0..826fc8aec 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m10_b/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/rama_works_m10_c/rules.mk b/keyboards/wilba_tech/rama_works_m10_c/rules.mk index 9f4cc186e..89ebfaedc 100644 --- a/keyboards/wilba_tech/rama_works_m10_c/rules.mk +++ b/keyboards/wilba_tech/rama_works_m10_c/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -31,5 +31,5 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_m50_a/rules.mk b/keyboards/wilba_tech/rama_works_m50_a/rules.mk index 9f4cc186e..89ebfaedc 100644 --- a/keyboards/wilba_tech/rama_works_m50_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m50_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -31,5 +31,5 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_m50_ax/rules.mk b/keyboards/wilba_tech/rama_works_m50_ax/rules.mk index 04e644cbc..8dfbf4b75 100644 --- a/keyboards/wilba_tech/rama_works_m50_ax/rules.mk +++ b/keyboards/wilba_tech/rama_works_m50_ax/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/rama_works_m60_a/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/rules.mk index 7e76a962a..17df5e5f6 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m60_a/rules.mk @@ -20,14 +20,13 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 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 @@ -44,5 +43,5 @@ LAYOUTS = 60_hhkb SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_m65_b/rules.mk b/keyboards/wilba_tech/rama_works_m65_b/rules.mk index 9f4cc186e..89ebfaedc 100644 --- a/keyboards/wilba_tech/rama_works_m65_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m65_b/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -31,5 +31,5 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_m65_bx/rules.mk b/keyboards/wilba_tech/rama_works_m65_bx/rules.mk index 9f4cc186e..89ebfaedc 100644 --- a/keyboards/wilba_tech/rama_works_m65_bx/rules.mk +++ b/keyboards/wilba_tech/rama_works_m65_bx/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -31,5 +31,5 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/keymap.c b/keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/keymap.c index d687fe851..bb2d104ee 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/keymap.c +++ b/keyboards/wilba_tech/rama_works_m6_a/keymaps/knops/keymap.c @@ -60,7 +60,7 @@ void set_led_state(int ledId, bool state) } } -void led_init_ports() +void led_init_ports_user(void) { // Switch #1 DDRD |= (1 << 6); @@ -95,7 +95,7 @@ void led_set_layer(int layer) void matrix_init_user(void) { - led_init_ports(); + led_init_ports_user(); led_set_layer(0); diff --git a/keyboards/wilba_tech/rama_works_m6_a/rules.mk b/keyboards/wilba_tech/rama_works_m6_a/rules.mk index 6a60c5423..b9cb562e5 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_a/rules.mk @@ -19,14 +19,13 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 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 diff --git a/keyboards/wilba_tech/rama_works_m6_b/rules.mk b/keyboards/wilba_tech/rama_works_m6_b/rules.mk index 51d1a0c80..76170d3d8 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_b/rules.mk @@ -19,14 +19,13 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 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 @@ -41,5 +40,5 @@ CIE1931_CURVE = yes SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3218.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3218.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/rama_works_u80_a/config.h b/keyboards/wilba_tech/rama_works_u80_a/config.h index 91922d7a8..0985183d3 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/config.h +++ b/keyboards/wilba_tech/rama_works_u80_a/config.h @@ -155,26 +155,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - // IS31FL3731 driver #define DRIVER_COUNT 3 #define DRIVER_LED_TOTAL 108 diff --git a/keyboards/wilba_tech/rama_works_u80_a/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/rules.mk index 735d2a24a..b441d1737 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_u80_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 @@ -34,5 +33,5 @@ CIE1931_CURVE = yes SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index 82ab42463..bfb524c4e 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -155,26 +155,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - // enable the mono backlight #define MONO_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index a0f923a2f..f6c8e99a6 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,14 +24,13 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 # project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ +SRC = drivers/led/issi/is31fl3736.c \ + i2c_master.c \ quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt60_b/rules.mk b/keyboards/wilba_tech/wt60_b/rules.mk index 50faab968..bf4c3c8af 100644 --- a/keyboards/wilba_tech/wt60_b/rules.mk +++ b/keyboards/wilba_tech/wt60_b/rules.mk @@ -20,14 +20,13 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 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 @@ -42,5 +41,5 @@ CIE1931_CURVE = yes SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/wt60_bx/rules.mk b/keyboards/wilba_tech/wt60_bx/rules.mk index 50faab968..bf4c3c8af 100644 --- a/keyboards/wilba_tech/wt60_bx/rules.mk +++ b/keyboards/wilba_tech/wt60_bx/rules.mk @@ -20,14 +20,13 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 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 @@ -42,5 +41,5 @@ CIE1931_CURVE = yes SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/wt60_c/rules.mk b/keyboards/wilba_tech/wt60_c/rules.mk index 50faab968..bf4c3c8af 100644 --- a/keyboards/wilba_tech/wt60_c/rules.mk +++ b/keyboards/wilba_tech/wt60_c/rules.mk @@ -20,14 +20,13 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 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 @@ -42,5 +41,5 @@ CIE1931_CURVE = yes SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/wt60_d/config.h b/keyboards/wilba_tech/wt60_d/config.h index 578b3a554..1588f4c57 100644 --- a/keyboards/wilba_tech/wt60_d/config.h +++ b/keyboards/wilba_tech/wt60_d/config.h @@ -154,23 +154,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/wilba_tech/wt60_d/rules.mk b/keyboards/wilba_tech/wt60_d/rules.mk index 05abcb68f..826fc8aec 100644 --- a/keyboards/wilba_tech/wt60_d/rules.mk +++ b/keyboards/wilba_tech/wt60_d/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt60_g/rules.mk b/keyboards/wilba_tech/wt60_g/rules.mk index 04e644cbc..8dfbf4b75 100644 --- a/keyboards/wilba_tech/wt60_g/rules.mk +++ b/keyboards/wilba_tech/wt60_g/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_g2/rules.mk b/keyboards/wilba_tech/wt60_g2/rules.mk index 04e644cbc..8dfbf4b75 100644 --- a/keyboards/wilba_tech/wt60_g2/rules.mk +++ b/keyboards/wilba_tech/wt60_g2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_h1/rules.mk b/keyboards/wilba_tech/wt60_h1/rules.mk index 7e56f6e1b..e605c63cb 100644 --- a/keyboards/wilba_tech/wt60_h1/rules.mk +++ b/keyboards/wilba_tech/wt60_h1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_h2/rules.mk b/keyboards/wilba_tech/wt60_h2/rules.mk index 219b57ecf..1ed4217ae 100644 --- a/keyboards/wilba_tech/wt60_h2/rules.mk +++ b/keyboards/wilba_tech/wt60_h2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_h3/rules.mk b/keyboards/wilba_tech/wt60_h3/rules.mk index 219b57ecf..1ed4217ae 100644 --- a/keyboards/wilba_tech/wt60_h3/rules.mk +++ b/keyboards/wilba_tech/wt60_h3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_xt/config.h b/keyboards/wilba_tech/wt60_xt/config.h index 5914e59fd..a16c3c063 100644 --- a/keyboards/wilba_tech/wt60_xt/config.h +++ b/keyboards/wilba_tech/wt60_xt/config.h @@ -157,23 +157,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/wilba_tech/wt60_xt/rules.mk b/keyboards/wilba_tech/wt60_xt/rules.mk index 0e522ba5b..75c0d3cf0 100644 --- a/keyboards/wilba_tech/wt60_xt/rules.mk +++ b/keyboards/wilba_tech/wt60_xt/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = yes # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index 69979d5fd..a64a99efd 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -155,26 +155,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - // enable the mono backlight #define MONO_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index a0f923a2f..f6c8e99a6 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,14 +24,13 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 # project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ +SRC = drivers/led/issi/is31fl3736.c \ + i2c_master.c \ quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt65_b/config.h b/keyboards/wilba_tech/wt65_b/config.h index 15a8dba7e..fdc44de84 100644 --- a/keyboards/wilba_tech/wt65_b/config.h +++ b/keyboards/wilba_tech/wt65_b/config.h @@ -155,26 +155,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - // enable the mono backlight #define MONO_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt65_b/rules.mk b/keyboards/wilba_tech/wt65_b/rules.mk index a0f923a2f..f6c8e99a6 100644 --- a/keyboards/wilba_tech/wt65_b/rules.mk +++ b/keyboards/wilba_tech/wt65_b/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,14 +24,13 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 # project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ +SRC = drivers/led/issi/is31fl3736.c \ + i2c_master.c \ quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt65_f/rules.mk b/keyboards/wilba_tech/wt65_f/rules.mk index 04e644cbc..8dfbf4b75 100644 --- a/keyboards/wilba_tech/wt65_f/rules.mk +++ b/keyboards/wilba_tech/wt65_f/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_fx/rules.mk b/keyboards/wilba_tech/wt65_fx/rules.mk index 04e644cbc..8dfbf4b75 100644 --- a/keyboards/wilba_tech/wt65_fx/rules.mk +++ b/keyboards/wilba_tech/wt65_fx/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_g/rules.mk b/keyboards/wilba_tech/wt65_g/rules.mk index 04e644cbc..8dfbf4b75 100644 --- a/keyboards/wilba_tech/wt65_g/rules.mk +++ b/keyboards/wilba_tech/wt65_g/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_g2/rules.mk b/keyboards/wilba_tech/wt65_g2/rules.mk index 04e644cbc..8dfbf4b75 100644 --- a/keyboards/wilba_tech/wt65_g2/rules.mk +++ b/keyboards/wilba_tech/wt65_g2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_h1/rules.mk b/keyboards/wilba_tech/wt65_h1/rules.mk index 7dcc056ae..10cd6c4ab 100644 --- a/keyboards/wilba_tech/wt65_h1/rules.mk +++ b/keyboards/wilba_tech/wt65_h1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_xt/rules.mk b/keyboards/wilba_tech/wt65_xt/rules.mk index 04e644cbc..8dfbf4b75 100644 --- a/keyboards/wilba_tech/wt65_xt/rules.mk +++ b/keyboards/wilba_tech/wt65_xt/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_xtx/rules.mk b/keyboards/wilba_tech/wt65_xtx/rules.mk index 04e644cbc..8dfbf4b75 100644 --- a/keyboards/wilba_tech/wt65_xtx/rules.mk +++ b/keyboards/wilba_tech/wt65_xtx/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt69_a/config.h b/keyboards/wilba_tech/wt69_a/config.h index b96fc2c9f..d4d50e24b 100644 --- a/keyboards/wilba_tech/wt69_a/config.h +++ b/keyboards/wilba_tech/wt69_a/config.h @@ -154,23 +154,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/wilba_tech/wt69_a/rules.mk b/keyboards/wilba_tech/wt69_a/rules.mk index 98e4472d1..c823d28a6 100644 --- a/keyboards/wilba_tech/wt69_a/rules.mk +++ b/keyboards/wilba_tech/wt69_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt70_jb/rules.mk b/keyboards/wilba_tech/wt70_jb/rules.mk index 3d0797115..52e12330a 100644 --- a/keyboards/wilba_tech/wt70_jb/rules.mk +++ b/keyboards/wilba_tech/wt70_jb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h index 23fa8eb46..1bcfb08ad 100644 --- a/keyboards/wilba_tech/wt75_a/config.h +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -155,26 +155,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - // enable the mono backlight #define MONO_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk index a0f923a2f..f6c8e99a6 100644 --- a/keyboards/wilba_tech/wt75_a/rules.mk +++ b/keyboards/wilba_tech/wt75_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,14 +24,13 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 # project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ +SRC = drivers/led/issi/is31fl3736.c \ + i2c_master.c \ quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt75_b/config.h b/keyboards/wilba_tech/wt75_b/config.h index f703d7e0c..ee7783e72 100644 --- a/keyboards/wilba_tech/wt75_b/config.h +++ b/keyboards/wilba_tech/wt75_b/config.h @@ -155,26 +155,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - // enable the mono backlight #define MONO_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt75_b/rules.mk b/keyboards/wilba_tech/wt75_b/rules.mk index a0f923a2f..f6c8e99a6 100644 --- a/keyboards/wilba_tech/wt75_b/rules.mk +++ b/keyboards/wilba_tech/wt75_b/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,14 +24,13 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 # project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ +SRC = drivers/led/issi/is31fl3736.c \ + i2c_master.c \ quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt75_c/config.h b/keyboards/wilba_tech/wt75_c/config.h index 00fbfbd8a..900c8fb1a 100644 --- a/keyboards/wilba_tech/wt75_c/config.h +++ b/keyboards/wilba_tech/wt75_c/config.h @@ -155,26 +155,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - // enable the mono backlight #define MONO_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt75_c/rules.mk b/keyboards/wilba_tech/wt75_c/rules.mk index a0f923a2f..f6c8e99a6 100644 --- a/keyboards/wilba_tech/wt75_c/rules.mk +++ b/keyboards/wilba_tech/wt75_c/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,14 +24,13 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 # project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ +SRC = drivers/led/issi/is31fl3736.c \ + i2c_master.c \ quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 0fe4972fe..33c4299a6 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -155,26 +155,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - // enable the mono backlight #define MONO_BACKLIGHT_ENABLED 1 diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index a0f923a2f..f6c8e99a6 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,14 +24,13 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 # project specific files -SRC = drivers/issi/is31fl3736.c \ - drivers/avr/i2c_master.c \ +SRC = drivers/led/issi/is31fl3736.c \ + i2c_master.c \ quantum/color.c \ keyboards/wilba_tech/wt_mono_backlight.c \ keyboards/wilba_tech/wt_main.c diff --git a/keyboards/wilba_tech/wt80_bc/rules.mk b/keyboards/wilba_tech/wt80_bc/rules.mk index 0b6b9254a..df9009047 100644 --- a/keyboards/wilba_tech/wt80_bc/rules.mk +++ b/keyboards/wilba_tech/wt80_bc/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt80_g/rules.mk b/keyboards/wilba_tech/wt80_g/rules.mk index 04e644cbc..8dfbf4b75 100644 --- a/keyboards/wilba_tech/wt80_g/rules.mk +++ b/keyboards/wilba_tech/wt80_g/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index 98e4472d1..c823d28a6 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c index fbc3102e8..77cee34ca 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.c +++ b/keyboards/wilba_tech/wt_mono_backlight.c @@ -20,7 +20,7 @@ #include "wt_rgb_backlight_keycodes.h" // reuse these for now #include -#include "drivers/avr/i2c_master.h" +#include "i2c_master.h" #include "progmem.h" #include "quantum/color.h" @@ -33,7 +33,7 @@ #error VIA_EEPROM_CUSTOM_CONFIG_SIZE was not defined to store backlight_config struct #endif -#include "drivers/issi/is31fl3736.h" +#include "drivers/led/issi/is31fl3736.h" #define ISSI_ADDR_DEFAULT 0x50 diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index e57d061b2..82b1fb2fb 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -54,11 +54,11 @@ #if !defined(RGB_BACKLIGHT_HS60) && !defined(RGB_BACKLIGHT_NK65) && !defined(RGB_BACKLIGHT_NK87) && !defined(RGB_BACKLIGHT_NEBULA68) && !defined(RGB_BACKLIGHT_NEBULA12) && !defined (RGB_BACKLIGHT_KW_MEGA) #include -#include "drivers/avr/i2c_master.h" +#include "i2c_master.h" #else #include #include -#include "drivers/chibios/i2c_master.h" +#include "i2c_master.h" #endif #if defined(RGB_BACKLIGHT_DAWN60) @@ -78,19 +78,19 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #endif #if defined(RGB_BACKLIGHT_M6_B) -#include "drivers/issi/is31fl3218.h" +#include "drivers/led/issi/is31fl3218.h" #define BACKLIGHT_LED_COUNT 6 #elif defined(RGB_BACKLIGHT_HS60) -#include "drivers/issi/is31fl3733.h" +#include "drivers/led/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 64 #elif defined(RGB_BACKLIGHT_NK65) || defined(RGB_BACKLIGHT_NEBULA68) || defined(RGB_BACKLIGHT_KW_MEGA) -#include "drivers/issi/is31fl3733.h" +#include "drivers/led/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 69 #elif defined(RGB_BACKLIGHT_NK87) -#include "drivers/issi/is31fl3733.h" +#include "drivers/led/issi/is31fl3733.h" #define BACKLIGHT_LED_COUNT 128 #else -#include "drivers/issi/is31fl3731.h" +#include "drivers/led/issi/is31fl3731.h" #if defined(RGB_BACKLIGHT_U80_A) #define BACKLIGHT_LED_COUNT 108 #elif defined(RGB_BACKLIGHT_DAWN60) @@ -158,7 +158,7 @@ uint32_t g_any_key_hit = 0; // ADDR_2 is not needed. it is here as a dummy #define ISSI_ADDR_1 0x50 -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -239,7 +239,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { #define ISSI_ADDR_1 0x50 #define ISSI_ADDR_2 0x52 -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -382,7 +382,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { // set to 0 for write, 1 for read (as per I2C protocol) #define ISSI_ADDR_1 0x74 -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -414,7 +414,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { #define ISSI_ADDR_2 0x76 // 11101[10] <- SDA #define ISSI_ADDR_3 0x75 // 11101[01] <- SCL -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -541,7 +541,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { #define ISSI_ADDR_1 0x74 #define ISSI_ADDR_2 0x76 -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -622,7 +622,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { #define ISSI_ADDR_1 0x74 #define ISSI_ADDR_2 0x77 -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -709,7 +709,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { #define ISSI_ADDR_1 0x74 #define ISSI_ADDR_2 -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, C1_9, C3_10, C4_10}, // LB1 {0, C1_10, C2_10, C4_11}, // LB2 {0, C1_11, C2_11, C3_11}, // LB3 @@ -729,7 +729,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { #define ISSI_ADDR_1 0x74 #define ISSI_ADDR_2 0x76 -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/rules.mk b/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/rules.mk index 21b93c595..1fa405e78 100644 --- a/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/rules.mk +++ b/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/rules.mk @@ -1,2 +1,2 @@ -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/zeal60/rules.mk b/keyboards/wilba_tech/zeal60/rules.mk index 172ebaf6b..6d7d15d05 100644 --- a/keyboards/wilba_tech/zeal60/rules.mk +++ b/keyboards/wilba_tech/zeal60/rules.mk @@ -20,14 +20,13 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 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 @@ -44,5 +43,5 @@ LAYOUTS = 60_ansi 60_iso 60_hhkb 60_ansi_split_bs_rshift SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wilba_tech/zeal65/rules.mk b/keyboards/wilba_tech/zeal65/rules.mk index fcf3d0763..6853adc03 100644 --- a/keyboards/wilba_tech/zeal65/rules.mk +++ b/keyboards/wilba_tech/zeal65/rules.mk @@ -20,14 +20,13 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 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 @@ -42,5 +41,5 @@ CIE1931_CURVE = yes SRC = keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ - drivers/avr/i2c_master.c + drivers/led/issi/is31fl3731.c \ + i2c_master.c diff --git a/keyboards/wings42/rules.mk b/keyboards/wings42/rules.mk index 82fa227ad..51cf1cdeb 100644 --- a/keyboards/wings42/rules.mk +++ b/keyboards/wings42/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/winkeyless/bface/rules.mk b/keyboards/winkeyless/bface/rules.mk index 3d51be113..b5853beab 100644 --- a/keyboards/winkeyless/bface/rules.mk +++ b/keyboards/winkeyless/bface/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/winkeyless/bmini/rules.mk b/keyboards/winkeyless/bmini/rules.mk index 20f0222c1..bb26ba442 100644 --- a/keyboards/winkeyless/bmini/rules.mk +++ b/keyboards/winkeyless/bmini/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/winkeyless/bminiex/rules.mk b/keyboards/winkeyless/bminiex/rules.mk index fa7336cd8..0b1e0ca6f 100644 --- a/keyboards/winkeyless/bminiex/rules.mk +++ b/keyboards/winkeyless/bminiex/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/wolfmarkclub/wm1/rules.mk b/keyboards/wolfmarkclub/wm1/rules.mk index 85aa84f69..ead1c3466 100644 --- a/keyboards/wolfmarkclub/wm1/rules.mk +++ b/keyboards/wolfmarkclub/wm1/rules.mk @@ -10,7 +10,7 @@ PROGRAM_CMD = echo 'CLI flashing not supported' >&2 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -21,7 +21,6 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/work_louder/loop/keymaps/default/keymap.c b/keyboards/work_louder/loop/keymaps/default/keymap.c index 25ecb15a4..a2e35d967 100644 --- a/keyboards/work_louder/loop/keymaps/default/keymap.c +++ b/keyboards/work_louder/loop/keymaps/default/keymap.c @@ -15,10 +15,8 @@ */ #include QMK_KEYBOARD_H - - +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Base */ [0] = LAYOUT( KC_MUTE, KC_MPLY, R_M_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, MO(1) ), @@ -29,9 +27,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RESET, _______, R_M_TOG, R_M_MOD, R_M_HUI, R_M_HUD, R_M_SAI, R_M_SAD, R_M_VAI, R_M_VAD, _______, _______ ) }; +// clang-format on - -// void encoder_update_user(uint8_t index, bool clockwise) { +// bool encoder_update_user(uint8_t index, bool clockwise) { // if (index == 0) { // if (clockwise) { // tap_code(KC_VOLD); @@ -51,4 +49,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // rgb_matrix_step(); // } // } +// return false; // } diff --git a/keyboards/work_louder/loop/rules.mk b/keyboards/work_louder/loop/rules.mk index 4df169834..87c24f205 100644 --- a/keyboards/work_louder/loop/rules.mk +++ b/keyboards/work_louder/loop/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/work_louder/nano/keymaps/default/keymap.c b/keyboards/work_louder/nano/keymaps/default/keymap.c index e1b4bbcb9..d4647657e 100644 --- a/keyboards/work_louder/nano/keymaps/default/keymap.c +++ b/keyboards/work_louder/nano/keymaps/default/keymap.c @@ -15,23 +15,16 @@ */ #include QMK_KEYBOARD_H - - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ - [0] = LAYOUT( - KC_PSCR, KC_LSFT, MO(1) - ), - [1] = LAYOUT( - RESET, KC_LCTL, _______ - ) -}; + [0] = LAYOUT(KC_PSCR, KC_LSFT, MO(1)), + [1] = LAYOUT(RESET, KC_LCTL, _______)}; - -// void encoder_update_user(uint8_t index, bool clockwise) { +// bool encoder_update_user(uint8_t index, bool clockwise) { // if (clockwise) { // tap_code(KC_PGDN); // } else { // tap_code(KC_PGUP); // } +// return false; // } diff --git a/keyboards/work_louder/nano/rules.mk b/keyboards/work_louder/nano/rules.mk index fc478334b..72297cd15 100644 --- a/keyboards/work_louder/nano/rules.mk +++ b/keyboards/work_louder/nano/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/work_louder/work_board/rules.mk b/keyboards/work_louder/work_board/rules.mk index 0731edd41..52b08b419 100644 --- a/keyboards/work_louder/work_board/rules.mk +++ b/keyboards/work_louder/work_board/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/work_louder/work_board/work_board.c b/keyboards/work_louder/work_board/work_board.c index 32d36e940..e17f7417c 100644 --- a/keyboards/work_louder/work_board/work_board.c +++ b/keyboards/work_louder/work_board/work_board.c @@ -28,7 +28,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # ifdef RGB_MATRIX_ENABLE # error Cannot run OLED and Per Key RGB at the same time due to pin conflicts # endif diff --git a/keyboards/wsk/alpha9/rules.mk b/keyboards/wsk/alpha9/rules.mk index 676a400f7..18cc2d52a 100644 --- a/keyboards/wsk/alpha9/rules.mk +++ b/keyboards/wsk/alpha9/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wsk/g4m3ralpha/rules.mk b/keyboards/wsk/g4m3ralpha/rules.mk index 676a400f7..18cc2d52a 100644 --- a/keyboards/wsk/g4m3ralpha/rules.mk +++ b/keyboards/wsk/g4m3ralpha/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wsk/gothic50/rules.mk b/keyboards/wsk/gothic50/rules.mk index 268690e3c..dfe93b5f6 100644 --- a/keyboards/wsk/gothic50/rules.mk +++ b/keyboards/wsk/gothic50/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wsk/gothic70/rules.mk b/keyboards/wsk/gothic70/rules.mk index 268690e3c..dfe93b5f6 100644 --- a/keyboards/wsk/gothic70/rules.mk +++ b/keyboards/wsk/gothic70/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wsk/houndstooth/rules.mk b/keyboards/wsk/houndstooth/rules.mk index b1bdf25e3..2fbad5b8e 100644 --- a/keyboards/wsk/houndstooth/rules.mk +++ b/keyboards/wsk/houndstooth/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wsk/jerkin/rules.mk b/keyboards/wsk/jerkin/rules.mk index 7a4212cd7..a9ed10f74 100644 --- a/keyboards/wsk/jerkin/rules.mk +++ b/keyboards/wsk/jerkin/rules.mk @@ -15,7 +15,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wsk/kodachi50/rules.mk b/keyboards/wsk/kodachi50/rules.mk index 9de501227..5ed84b7f7 100644 --- a/keyboards/wsk/kodachi50/rules.mk +++ b/keyboards/wsk/kodachi50/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wsk/pain27/rules.mk b/keyboards/wsk/pain27/rules.mk index e939ba823..3efd13156 100644 --- a/keyboards/wsk/pain27/rules.mk +++ b/keyboards/wsk/pain27/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/wsk/sl40/rules.mk b/keyboards/wsk/sl40/rules.mk index 9de501227..5ed84b7f7 100644 --- a/keyboards/wsk/sl40/rules.mk +++ b/keyboards/wsk/sl40/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wsk/tkl30/rules.mk b/keyboards/wsk/tkl30/rules.mk index 689894be2..1a6d29e89 100644 --- a/keyboards/wsk/tkl30/rules.mk +++ b/keyboards/wsk/tkl30/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/wuque/ikki68/rules.mk b/keyboards/wuque/ikki68/rules.mk index bb9bbe201..f70a8918f 100644 --- a/keyboards/wuque/ikki68/rules.mk +++ b/keyboards/wuque/ikki68/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wuque/ikki68_aurora/rules.mk b/keyboards/wuque/ikki68_aurora/rules.mk index 5300d94da..2a8e41381 100644 --- a/keyboards/wuque/ikki68_aurora/rules.mk +++ b/keyboards/wuque/ikki68_aurora/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/x16/config.h b/keyboards/x16/config.h index 2711566b9..23509e430 100644 --- a/keyboards/x16/config.h +++ b/keyboards/x16/config.h @@ -189,26 +189,6 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/x16/rules.mk b/keyboards/x16/rules.mk index bf4c2e907..e9da92072 100644 --- a/keyboards/x16/rules.mk +++ b/keyboards/x16/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output diff --git a/keyboards/xbows/knight/config.h b/keyboards/xbows/knight/config.h index 540e29d4d..2b15cbbb3 100644 --- a/keyboards/xbows/knight/config.h +++ b/keyboards/xbows/knight/config.h @@ -35,10 +35,11 @@ # define RGB_MATRIX_LED_PROCESS_LIMIT 18 # define RGB_MATRIX_LED_FLUSH_LIMIT 16 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -# define RGB_MATRIX_CENTER { 92, 43 } +# define RGB_MATRIX_CENTER \ + { 92, 43 } # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110110 diff --git a/keyboards/xbows/knight/knight.c b/keyboards/xbows/knight/knight.c index 1a1aebf18..539ecb653 100644 --- a/keyboards/xbows/knight/knight.c +++ b/keyboards/xbows/knight/knight.c @@ -15,7 +15,7 @@ */ #include "knight.h" #ifdef RGB_MATRIX_ENABLE - const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, C1_3, C2_3, C3_3}, // L01 {0, C1_4, C2_4, C3_4}, // L02 diff --git a/keyboards/xbows/knight/rules.mk b/keyboards/xbows/knight/rules.mk index 71883128e..5a62a316e 100644 --- a/keyboards/xbows/knight/rules.mk +++ b/keyboards/xbows/knight/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xbows/knight_plus/config.h b/keyboards/xbows/knight_plus/config.h index ead345c04..6293a6ffb 100644 --- a/keyboards/xbows/knight_plus/config.h +++ b/keyboards/xbows/knight_plus/config.h @@ -36,9 +36,10 @@ # define RGB_MATRIX_LED_FLUSH_LIMIT 16 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_MATRIX_KEYPRESSES -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -# define RGB_MATRIX_CENTER { 92, 43 } +# define RGB_MATRIX_CENTER \ + { 92, 43 } # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110110 diff --git a/keyboards/xbows/knight_plus/knight_plus.c b/keyboards/xbows/knight_plus/knight_plus.c index f2cf5399b..c5dd1a5fd 100644 --- a/keyboards/xbows/knight_plus/knight_plus.c +++ b/keyboards/xbows/knight_plus/knight_plus.c @@ -15,7 +15,7 @@ */ #include "knight_plus.h" #ifdef RGB_MATRIX_ENABLE - const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, C1_3, C2_3, C3_3}, // L01 {0, C1_4, C2_4, C3_4}, // L02 diff --git a/keyboards/xbows/knight_plus/rules.mk b/keyboards/xbows/knight_plus/rules.mk index 71883128e..5a62a316e 100644 --- a/keyboards/xbows/knight_plus/rules.mk +++ b/keyboards/xbows/knight_plus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xbows/nature/config.h b/keyboards/xbows/nature/config.h index c1ff79335..e321f7ee1 100644 --- a/keyboards/xbows/nature/config.h +++ b/keyboards/xbows/nature/config.h @@ -35,7 +35,7 @@ # define RGB_MATRIX_LED_PROCESS_LIMIT 18 # define RGB_MATRIX_LED_FLUSH_LIMIT 16 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/xbows/nature/nature.c b/keyboards/xbows/nature/nature.c index f1b061584..b7b10d5ab 100644 --- a/keyboards/xbows/nature/nature.c +++ b/keyboards/xbows/nature/nature.c @@ -15,7 +15,7 @@ */ #include "nature.h" #ifdef RGB_MATRIX_ENABLE - const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, C1_3, C2_3, C3_3}, // L01 {0, C1_4, C2_4, C3_4}, // L02 diff --git a/keyboards/xbows/nature/rules.mk b/keyboards/xbows/nature/rules.mk index 71883128e..5a62a316e 100644 --- a/keyboards/xbows/nature/rules.mk +++ b/keyboards/xbows/nature/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xbows/numpad/config.h b/keyboards/xbows/numpad/config.h index fd13305ed..832da03a2 100644 --- a/keyboards/xbows/numpad/config.h +++ b/keyboards/xbows/numpad/config.h @@ -35,10 +35,11 @@ # define RGB_MATRIX_LED_PROCESS_LIMIT 18 # define RGB_MATRIX_LED_FLUSH_LIMIT 16 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -# define RGB_MATRIX_CENTER { 30, 32 } +# define RGB_MATRIX_CENTER \ + { 30, 32 } # define DRIVER_ADDR_1 0b1110111 # define DRIVER_COUNT 1 diff --git a/keyboards/xbows/numpad/numpad.c b/keyboards/xbows/numpad/numpad.c index 0ab677c76..4e05473b6 100644 --- a/keyboards/xbows/numpad/numpad.c +++ b/keyboards/xbows/numpad/numpad.c @@ -15,7 +15,7 @@ */ #include "numpad.h" #ifdef RGB_MATRIX_ENABLE - const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { + const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, C3_3, C2_3, C1_3}, // L01 {0, C3_4, C2_4, C1_4}, // L02 diff --git a/keyboards/xbows/numpad/rules.mk b/keyboards/xbows/numpad/rules.mk index f716d8fd3..26c7c8d55 100644 --- a/keyboards/xbows/numpad/rules.mk +++ b/keyboards/xbows/numpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xbows/ranger/config.h b/keyboards/xbows/ranger/config.h index 0af0bb8b7..ddf196b5b 100644 --- a/keyboards/xbows/ranger/config.h +++ b/keyboards/xbows/ranger/config.h @@ -34,7 +34,7 @@ # define RGB_MATRIX_LED_PROCESS_LIMIT 18 # define RGB_MATRIX_LED_FLUSH_LIMIT 16 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 diff --git a/keyboards/xbows/ranger/ranger.c b/keyboards/xbows/ranger/ranger.c index f6ec79f7f..0ba94f67d 100644 --- a/keyboards/xbows/ranger/ranger.c +++ b/keyboards/xbows/ranger/ranger.c @@ -15,128 +15,129 @@ */ #include "ranger.h" #ifdef RGB_MATRIX_ENABLE - const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { - {0, C3_3, C2_3, C1_3}, // L01 - {0, C3_4, C2_4, C1_4}, // L02 - {0, C3_5, C2_5, C1_5}, // L03 - {0, C3_6, C2_6, C1_6}, // L04 - {0, C3_7, C2_7, C1_7}, // L05 - {0, C3_8, C2_8, C1_8}, // L06 - {1, C3_3, C2_3, C1_3}, // L07 - {1, C3_4, C2_4, C1_4}, // L08 - {1, C3_5, C2_5, C1_5}, // L09 - {1, C3_6, C2_6, C1_6}, // L10 - {1, C3_7, C2_7, C1_7}, // L11 - {1, C3_8, C2_8, C1_8}, // L12 - {2, C3_4, C2_4, C1_4}, // L13 - {2, C3_5, C2_5, C1_5}, // L14 - {2, C3_6, C2_6, C1_6}, // L15 - {2, C3_7, C2_7, C1_7}, // L16 + {0, C3_3, C2_3, C1_3}, // L01 + {0, C3_4, C2_4, C1_4}, // L02 + {0, C3_5, C2_5, C1_5}, // L03 + {0, C3_6, C2_6, C1_6}, // L04 + {0, C3_7, C2_7, C1_7}, // L05 + {0, C3_8, C2_8, C1_8}, // L06 + {1, C3_3, C2_3, C1_3}, // L07 + {1, C3_4, C2_4, C1_4}, // L08 + {1, C3_5, C2_5, C1_5}, // L09 + {1, C3_6, C2_6, C1_6}, // L10 + {1, C3_7, C2_7, C1_7}, // L11 + {1, C3_8, C2_8, C1_8}, // L12 + {2, C3_4, C2_4, C1_4}, // L13 + {2, C3_5, C2_5, C1_5}, // L14 + {2, C3_6, C2_6, C1_6}, // L15 + {2, C3_7, C2_7, C1_7}, // L16 - {0, C6_1, C5_1, C4_1}, // L17 - {0, C6_2, C5_2, C4_2}, // L18 - {0, C6_3, C5_3, C4_3}, // L19 - {0, C6_6, C5_6, C4_6}, // L20 - {0, C6_7, C5_7, C4_7}, // L21 - {0, C6_8, C5_8, C4_8}, // L22 - {1, C6_1, C5_1, C4_1}, // L23 - {1, C6_2, C5_2, C4_2}, // L24 - {1, C6_3, C5_3, C4_3}, // L25 - {1, C6_6, C5_6, C4_6}, // L26 - {1, C6_7, C5_7, C4_7}, // L27 - {1, C6_8, C5_8, C4_8}, // L28 - {2, C6_1, C5_1, C4_1}, // L29 - {2, C6_3, C5_3, C4_3}, // L31 - {2, C6_6, C5_6, C4_6}, // L32 - {2, C6_7, C5_7, C4_7}, // L33 + {0, C6_1, C5_1, C4_1}, // L17 + {0, C6_2, C5_2, C4_2}, // L18 + {0, C6_3, C5_3, C4_3}, // L19 + {0, C6_6, C5_6, C4_6}, // L20 + {0, C6_7, C5_7, C4_7}, // L21 + {0, C6_8, C5_8, C4_8}, // L22 + {1, C6_1, C5_1, C4_1}, // L23 + {1, C6_2, C5_2, C4_2}, // L24 + {1, C6_3, C5_3, C4_3}, // L25 + {1, C6_6, C5_6, C4_6}, // L26 + {1, C6_7, C5_7, C4_7}, // L27 + {1, C6_8, C5_8, C4_8}, // L28 + {2, C6_1, C5_1, C4_1}, // L29 + {2, C6_3, C5_3, C4_3}, // L31 + {2, C6_6, C5_6, C4_6}, // L32 + {2, C6_7, C5_7, C4_7}, // L33 - {0, C9_1, C8_1, C7_1}, // L34 - {0, C9_2, C8_2, C7_2}, // L35 - {0, C9_3, C8_3, C7_3}, // L36 - {0, C9_4, C8_4, C7_4}, // L37 - {0, C9_5, C8_5, C7_5}, // L38 - {0, C9_6, C8_6, C7_6}, // L39 - {1, C9_1, C8_1, C7_1}, // L40 - {1, C9_2, C8_2, C7_2}, // L41 - {1, C9_3, C8_3, C7_3}, // L42 - {1, C9_4, C8_4, C7_4}, // L43 - {1, C9_5, C8_5, C7_5}, // L44 - {1, C9_6, C8_6, C7_6}, // L45 - {2, C9_1, C8_1, C7_1}, // L46 - {2, C9_3, C8_3, C7_3}, // L48 - {2, C9_4, C8_4, C7_4}, // L49 - {2, C9_6, C8_6, C7_6}, // L50 + {0, C9_1, C8_1, C7_1}, // L34 + {0, C9_2, C8_2, C7_2}, // L35 + {0, C9_3, C8_3, C7_3}, // L36 + {0, C9_4, C8_4, C7_4}, // L37 + {0, C9_5, C8_5, C7_5}, // L38 + {0, C9_6, C8_6, C7_6}, // L39 + {1, C9_1, C8_1, C7_1}, // L40 + {1, C9_2, C8_2, C7_2}, // L41 + {1, C9_3, C8_3, C7_3}, // L42 + {1, C9_4, C8_4, C7_4}, // L43 + {1, C9_5, C8_5, C7_5}, // L44 + {1, C9_6, C8_6, C7_6}, // L45 + {2, C9_1, C8_1, C7_1}, // L46 + {2, C9_3, C8_3, C7_3}, // L48 + {2, C9_4, C8_4, C7_4}, // L49 + {2, C9_6, C8_6, C7_6}, // L50 - {0, C3_11, C2_11, C1_11}, // L51 - {0, C3_12, C2_12, C1_12}, // L52 - {0, C3_13, C2_13, C1_13}, // L53 - {0, C3_14, C2_14, C1_14}, // L54 - {0, C3_15, C2_15, C1_15}, // L55 - {0, C3_16, C2_16, C1_16}, // L56 - {1, C3_11, C2_11, C1_11}, // L57 - {1, C3_12, C2_12, C1_12}, // L58 - {1, C3_13, C2_13, C1_13}, // L59 - {1, C3_14, C2_14, C1_14}, // L60 - {1, C3_15, C2_15, C1_15}, // L61 - {1, C3_16, C2_16, C1_16}, // L62 - {2, C3_14, C2_14, C1_14}, // L63 - {2, C6_2, C5_2, C4_2 }, // L30 + {0, C3_11, C2_11, C1_11}, // L51 + {0, C3_12, C2_12, C1_12}, // L52 + {0, C3_13, C2_13, C1_13}, // L53 + {0, C3_14, C2_14, C1_14}, // L54 + {0, C3_15, C2_15, C1_15}, // L55 + {0, C3_16, C2_16, C1_16}, // L56 + {1, C3_11, C2_11, C1_11}, // L57 + {1, C3_12, C2_12, C1_12}, // L58 + {1, C3_13, C2_13, C1_13}, // L59 + {1, C3_14, C2_14, C1_14}, // L60 + {1, C3_15, C2_15, C1_15}, // L61 + {1, C3_16, C2_16, C1_16}, // L62 + {2, C3_14, C2_14, C1_14}, // L63 + {2, C6_2, C5_2, C4_2}, // L30 - {0, C6_9, C5_9, C4_9}, // L64 - {0, C6_10, C5_10, C4_10}, // L65 - {0, C6_11, C5_11, C4_11}, // L66 - {0, C6_14, C5_14, C4_14}, // L67 - {0, C6_15, C5_15, C4_15}, // L68 - {0, C6_16, C5_16, C4_16}, // L69 - {1, C6_10, C5_10, C4_10}, // L70 - {1, C6_11, C5_11, C4_11}, // L71 - {1, C6_14, C5_14, C4_14}, // L72 - {1, C6_15, C5_15, C4_15}, // L73 - {1, C6_16, C5_16, C4_16}, // L74 - {2, C3_15, C2_15, C1_15}, // L75 - {2, C9_2, C8_2, C7_2 }, // L47 - {2, C9_14, C8_14, C7_14}, // L76 + {0, C6_9, C5_9, C4_9}, // L64 + {0, C6_10, C5_10, C4_10}, // L65 + {0, C6_11, C5_11, C4_11}, // L66 + {0, C6_14, C5_14, C4_14}, // L67 + {0, C6_15, C5_15, C4_15}, // L68 + {0, C6_16, C5_16, C4_16}, // L69 + {1, C6_10, C5_10, C4_10}, // L70 + {1, C6_11, C5_11, C4_11}, // L71 + {1, C6_14, C5_14, C4_14}, // L72 + {1, C6_15, C5_15, C4_15}, // L73 + {1, C6_16, C5_16, C4_16}, // L74 + {2, C3_15, C2_15, C1_15}, // L75 + {2, C9_2, C8_2, C7_2}, // L47 + {2, C9_14, C8_14, C7_14}, // L76 - {0, C9_9, C8_9, C7_9}, // L77 - {0, C9_10, C8_10, C7_10}, // L78 - {0, C9_11, C8_11, C7_11}, // L79 - {1, C6_9, C5_9, C4_9}, // L80 - {1, C9_13, C8_13, C7_13}, // L81 - {1, C9_14, C8_14, C7_14}, // L82 - {2, C9_9, C8_9, C7_9}, // L83 - {2, C9_10, C8_10, C7_10}, // L84 - {2, C9_11, C8_11, C7_11}, // L85 - {2, C9_12, C8_12, C7_12}, // L86 - {2, C9_13, C8_13, C7_13}, // L87 + {0, C9_9, C8_9, C7_9}, // L77 + {0, C9_10, C8_10, C7_10}, // L78 + {0, C9_11, C8_11, C7_11}, // L79 + {1, C6_9, C5_9, C4_9}, // L80 + {1, C9_13, C8_13, C7_13}, // L81 + {1, C9_14, C8_14, C7_14}, // L82 + {2, C9_9, C8_9, C7_9}, // L83 + {2, C9_10, C8_10, C7_10}, // L84 + {2, C9_11, C8_11, C7_11}, // L85 + {2, C9_12, C8_12, C7_12}, // L86 + {2, C9_13, C8_13, C7_13}, // L87n +}; - }; +// clang-format off +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, + { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }, + { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 }, + { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, NO_LED, NO_LED }, + { 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, NO_LED, 73, 74, 75, NO_LED }, + { 76, 77, 78, NO_LED, NO_LED, 79, NO_LED, NO_LED, NO_LED, 80, 81, 82, 83, 84, 85, 86 } + }, { + {0,0}, {24,0}, {36,0}, {48,0}, {60,0}, {78,0}, {90,0}, {102,0}, {114,0}, {132,0}, {144,0}, {156,0}, {168,0}, {182,0}, {194,0}, {206,0}, + {0,15}, {12,15}, {24,15}, {36,15}, {48,15}, {60,15}, {72,15}, {84,15}, {96,15}, {108,15}, {120,15}, {132,15}, {144,15}, {182,15}, {194,15},{206,15}, + {3,27}, {18,27}, {30,27}, {42,27}, {54,27}, {66,27}, {78,27}, {90,27}, {102,27}, {114,27}, {126,27}, {138,27}, {150,27}, {182,27}, {194,27},{206,27}, + {4,39}, {20,39}, {32,39}, {44,39}, {56,39}, {68,39}, {80,39}, {92,39}, {104,39}, {116,39}, {128,39}, {140,39}, {162,39}, {162,15}, + {6,51}, {26,51}, {38,51}, {50,51}, {62,51}, {74,51}, {86,51}, {98,51}, {110,51}, {122,51}, {134,51}, {155,51}, {165,27}, {210,51}, + {1,63}, {16,63}, {31,63}, {64,63}, {121,63},{136,63}, {151,63}, {166,63},{182,63}, {194,63}, {206,63} + }, { + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 + } +}; +// clang-format on - led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }, - { 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 }, - { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, NO_LED, NO_LED }, - { 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, NO_LED, 73, 74, 75, NO_LED }, - { 76, 77, 78, NO_LED, NO_LED, 79, NO_LED, NO_LED, NO_LED, 80, 81, 82, 83, 84, 85, 86 } - }, { - {0,0}, {24,0}, {36,0}, {48,0}, {60,0}, {78,0}, {90,0}, {102,0}, {114,0}, {132,0}, {144,0}, {156,0}, {168,0}, {182,0}, {194,0}, {206,0}, - {0,15}, {12,15}, {24,15}, {36,15}, {48,15}, {60,15}, {72,15}, {84,15}, {96,15}, {108,15}, {120,15}, {132,15}, {144,15}, {182,15}, {194,15},{206,15}, - {3,27}, {18,27}, {30,27}, {42,27}, {54,27}, {66,27}, {78,27}, {90,27}, {102,27}, {114,27}, {126,27}, {138,27}, {150,27}, {182,27}, {194,27},{206,27}, - {4,39}, {20,39}, {32,39}, {44,39}, {56,39}, {68,39}, {80,39}, {92,39}, {104,39}, {116,39}, {128,39}, {140,39}, {162,39}, {162,15}, - {6,51}, {26,51}, {38,51}, {50,51}, {62,51}, {74,51}, {86,51}, {98,51}, {110,51}, {122,51}, {134,51}, {155,51}, {165,27}, {210,51}, - {1,63}, {16,63}, {31,63}, {64,63}, {121,63},{136,63}, {151,63}, {166,63},{182,63}, {194,63}, {206,63} - }, { - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 - } }; - - - __attribute__ ((weak)) void rgb_matrix_indicators_user(void) { +__attribute__((weak)) void rgb_matrix_indicators_user(void) { if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(48, 0xFF, 0xFF, 0xFF); } diff --git a/keyboards/xbows/ranger/rules.mk b/keyboards/xbows/ranger/rules.mk index 5707fdc1d..45bfdddb6 100644 --- a/keyboards/xbows/ranger/rules.mk +++ b/keyboards/xbows/ranger/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xbows/woody/config.h b/keyboards/xbows/woody/config.h index 7f396d000..ea27508da 100644 --- a/keyboards/xbows/woody/config.h +++ b/keyboards/xbows/woody/config.h @@ -16,10 +16,10 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DEBOUNCE 3 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN #define DISABLE_RGB_MATRIX_BAND_SAT #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT @@ -40,4 +40,4 @@ #define DRIVER_1_LED_TOTAL 35 #define DRIVER_2_LED_TOTAL 32 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#endif \ No newline at end of file +#endif diff --git a/keyboards/xbows/woody/rules.mk b/keyboards/xbows/woody/rules.mk index a1a6e78db..4e27783c8 100644 --- a/keyboards/xbows/woody/rules.mk +++ b/keyboards/xbows/woody/rules.mk @@ -3,7 +3,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite BACKLIGHT_ENABLE = no MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/xbows/woody/woody.c b/keyboards/xbows/woody/woody.c index 9821f5f65..1027e3ca3 100644 --- a/keyboards/xbows/woody/woody.c +++ b/keyboards/xbows/woody/woody.c @@ -1,6 +1,6 @@ #include "woody.h" #ifdef RGB_MATRIX_ENABLE -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { {0, C8_8, C7_8, C6_8}, // LA17 {0, C9_8, C7_7, C6_7}, // LA16 diff --git a/keyboards/xd002/keymaps/multilayer_rgb/keymap.c b/keyboards/xd002/keymaps/multilayer_rgb/keymap.c deleted file mode 100644 index 01a96119e..000000000 --- a/keyboards/xd002/keymaps/multilayer_rgb/keymap.c +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright 2020 elmo-space - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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 "rgblite.h" - -// Defines names for use in layer keycodes and the keymap -enum layer_names { - _BASE, - _FUNC, -}; - -// set your keycodes here -#define layer1_left KC_PAUS -#define layer1_right KC_MPLY -#define layer2_left KC_MPRV -#define layer2_right KC_MNXT - - -enum custom_keycodes { - LEFT1 = SAFE_RANGE, - RIGHT1, - LEFT2, - RIGHT2 -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT( - LEFT1, RIGHT1 - ), - [_FUNC] = LAYOUT( - LEFT2, RIGHT2 - ) -}; - -static bool key1_down = false; -static bool key2_down = false; -static char layer_switched = 0; // this prevents the individual keys getting triggered after a layerchange - -bool process_record_user(uint16_t keycode, keyrecord_t *record) -{ - switch (keycode) - { - case LEFT1: - if (record->event.pressed) - { - if (key2_down) - { - layer_on(1); - layer_switched = 2; - return false; - break; - } - key1_down = true; - } - else { - if (layer_switched > 0) { - --layer_switched; - key1_down = false; - } - else { - tap_code(layer1_left); - key1_down = false; - } - } - return false; - break; - case RIGHT1: - if (record->event.pressed) - { - if (key1_down) - { - layer_on(1); - layer_switched = 2; - return false; - break; - } - key2_down = true; - } - else { - if (layer_switched > 0) { - --layer_switched; - key2_down = false; - } - else { - tap_code(layer1_right); - key2_down = false; - } - } - return false; - break; - case LEFT2: - if (record->event.pressed) - { - if (key2_down) - { - layer_off(1); - layer_switched = 2; - return false; - break; - } - key1_down = true; - } - else { - if (layer_switched > 0) { - --layer_switched; - key1_down = false; - } - else { - tap_code(layer2_left); - key1_down = false; - } - } - return false; - break; - case RIGHT2: - if (record->event.pressed) - { - if (key1_down) - { - layer_off(1); - layer_switched = 2; - return false; - break; - } - key2_down = true; - } - else { - if (layer_switched > 0) { - --layer_switched; - key2_down = false; - } - else { - tap_code(layer2_right); - key2_down = false; - } - } - return false; - break; - } - return true; -}; - -// layer colors -layer_state_t layer_state_set_user(layer_state_t state) { - switch (get_highest_layer(state)) { - case _FUNC: - rgblight_setrgb_red(); - break; - default: // for any other layers, or the default layer - rgblight_setrgb_green(); - break; - } - return state; -} - -// default color -void keyboard_post_init_user(void) { - rgblight_setrgb_green(); -} diff --git a/keyboards/xd002/keymaps/multilayer_rgb/rgblite.h b/keyboards/xd002/keymaps/multilayer_rgb/rgblite.h deleted file mode 100644 index ddc61d5f4..000000000 --- a/keyboards/xd002/keymaps/multilayer_rgb/rgblite.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#include "ws2812.h" -#include "rgblight_list.h" - -static inline void rgblight_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) { - LED_TYPE leds[RGBLED_NUM] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}}; - ws2812_setleds(leds, RGBLED_NUM); -} diff --git a/keyboards/xd002/keymaps/rgb_lite/keymap.c b/keyboards/xd002/keymaps/rgb_lite/keymap.c deleted file mode 100644 index ed9185e3b..000000000 --- a/keyboards/xd002/keymaps/rgb_lite/keymap.c +++ /dev/null @@ -1,31 +0,0 @@ -#include QMK_KEYBOARD_H -#include "rgblite.h" - -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKURL = SAFE_RANGE, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - RGB_HUI, QMKURL - ) -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch (keycode) { - case RGB_HUI: - rgblight_increase_hue(); - break; - case QMKURL: - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - break; - } - } - return true; -} - -void keyboard_post_init_user(void) { - rgblight_increase_hue(); -} diff --git a/keyboards/xd002/keymaps/rgb_lite/rgblite.h b/keyboards/xd002/keymaps/rgb_lite/rgblite.h deleted file mode 100644 index ca98484b8..000000000 --- a/keyboards/xd002/keymaps/rgb_lite/rgblite.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include "ws2812.h" -#include "rgblight_list.h" - -static inline void rgblight_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) { - LED_TYPE leds[RGBLED_NUM] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}}; - ws2812_setleds(leds, RGBLED_NUM); -} - -static void rgblight_increase_hue(void) { - static uint8_t state = 0; - - state = (state + 1) % 3; - switch (state) { - case 1: - rgblight_setrgb_red(); - break; - case 2: - rgblight_setrgb_blue(); - break; - default: - rgblight_setrgb_green(); - break; - } -} diff --git a/keyboards/xd002/keymaps/tap_dance/config.h b/keyboards/xd002/keymaps/tap_dance/config.h deleted file mode 100644 index b86e862d3..000000000 --- a/keyboards/xd002/keymaps/tap_dance/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#define TAPPING_TERM 500 diff --git a/keyboards/xd002/keymaps/tap_dance/rules.mk b/keyboards/xd002/keymaps/tap_dance/rules.mk deleted file mode 100644 index e5ddcae8d..000000000 --- a/keyboards/xd002/keymaps/tap_dance/rules.mk +++ /dev/null @@ -1 +0,0 @@ -TAP_DANCE_ENABLE = yes diff --git a/keyboards/xd002/readme.md b/keyboards/xd002/readme.md deleted file mode 100644 index 6358bc754..000000000 --- a/keyboards/xd002/readme.md +++ /dev/null @@ -1,49 +0,0 @@ -# xd002 - -![xd002](https://cdn.shopify.com/s/files/1/2711/4238/products/xd002_1024x1024.jpg?v=1522134411) - -2% Custom mechanical keyboard. ATtiny85 powered, with 2*WS2812 LEDs, and the micronucleus bootloader. - -**Note**: Due to limited firmware space, a _**lot**_ of features have to be disabled to get a functioning QMK based keyboard. - -* Keyboard Maintainer: [zvecr](https://github.com/zvecr) -* Hardware Supported: xd002 -* Hardware Availability: [kprepublic](https://kprepublic.com/products/xd002-xiudi-2-custom-mechanical-keyboard-2-keys-underglow-and-switch-rgb-pcb-programmed-hot-swappable-macro-key-aluminum-case) - -Make example for this keyboard (after setting up your build environment): - - make xd002: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). - -## Flashing -### Prerequisites - -```bash -git clone https://github.com/micronucleus/micronucleus.git -cd micronucleus/commandline/ -sudo make install -``` - -On Linux, you’ll need proper privileges to access the MCU. You can either use sudo when flashing firmware, or place [these files](https://github.com/micronucleus/micronucleus/blob/master/commandline/49-micronucleus.rules) in /etc/udev/rules.d/. Once added run the following: - -```bash -sudo udevadm control --reload-rules -sudo udevadm trigger -``` - -### Instructions - -**Reset Key**: Hold down key nearest to the USB socket while plugging in the keyboard. - -```bash -make xd002:default:flash - -# or directly with... -micronucleus --run -``` - -### Recovery - -* [Original Firmware](https://github.com/xiudi/Attiny85_vusb_pad_test) -* [Bootloader Repair](https://digistump.com/wiki/digispark/tutorials/proisp) diff --git a/keyboards/xd002/rules.mk b/keyboards/xd002/rules.mk deleted file mode 100644 index 595743a30..000000000 --- a/keyboards/xd002/rules.mk +++ /dev/null @@ -1,32 +0,0 @@ -# MCU name -MCU = attiny85 - -# Bootloader selection -BOOTLOADER = micronucleus -OPT_DEFS += -DBOOTLOADER_SIZE=1862 -PROGRAM_CMD = micronucleus --run $(BUILD_DIR)/$(TARGET).hex - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = no # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 - -# Save as much space as we can... -LTO_ENABLE = yes -GRAVE_ESC_ENABLE = no -MAGIC_ENABLE = no -SPACE_CADET_ENABLE = no diff --git a/keyboards/xd004/readme.md b/keyboards/xd004/readme.md deleted file mode 100644 index 8f858a841..000000000 --- a/keyboards/xd004/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -XD004 -== - -4-keys board - -![Top View of a XD004 board](https://ae01.alicdn.com/kf/HTB1_G9IX21H3KVjSZFHq6zKppXa0/xd004-xiudi-4-Custom-Mechanical-Keyboard-4-keys-switch-leds-PCB-programmed-hot-swappable-macro-key.jpg) - -Keyboard Maintainer: QMK Community -Hardware Supported: XD004 PCB v1.0 -Hardware Availability: [KPRepublic](https://kprepublic.com/products/xd004-xiudi-4-custom-mechanical-keyboard-4-keys-switch-leds-pcb-programmed-hot-swappable-macro-key-silver-case-micro-port) - -To put this board in DFU (firmware update) mode, bridge the last two pins (#5 & 6) of the 6-pin "J2" header on the opposite edge of the board to the USB port" -``` -----+ - J2 | -[o] | -(o) | -(o) | -(o) | -(o)-+-\ (These -(o)-+-/ two) - | -----+ -``` - -To build with a default keymap (not useful at all, have a look at other keymaps): - -```make xd004/v1:default``` - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xd004/v1/rules.mk b/keyboards/xd004/v1/rules.mk deleted file mode 100644 index e9afff93c..000000000 --- a/keyboards/xd004/v1/rules.mk +++ /dev/null @@ -1,32 +0,0 @@ -# MCU name -MCU = atmega16u2 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -SPACE_CADET_ENABLE = no -# Saves about 5% of space: -LTO_ENABLE = yes - -#LAYOUTS = ortho_1x4 diff --git a/keyboards/xd60/keymaps/birkir/keymap.c b/keyboards/xd60/keymaps/birkir/keymap.c deleted file mode 100644 index 560445054..000000000 --- a/keyboards/xd60/keymaps/birkir/keymap.c +++ /dev/null @@ -1,66 +0,0 @@ -#include QMK_KEYBOARD_H -#include "action_layer.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - // 0: Base Layer - 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ - KC_LSFT, KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_NO, KC_RSFT, KC_UP, TG(2), \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT - ), - - // 1: Function Layer - LAYOUT_all( - KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, BL_DEC, BL_INC, KC_F13, KC_F14, \ - KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ - KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, TG(2), \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END - ), - - // 2: Cool Layer - LAYOUT_all( - RESET, BL_DEC, BL_INC, BL_ON, BL_OFF, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_MODE_PLAIN, KC_TRNS, \ - KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ - KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, TG(2), \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END - ) -}; - -bool edit = false; -uint32_t mode; -uint16_t hue; -uint8_t sat; -uint8_t val; - -uint32_t layer_state_set_user(uint32_t state) { - - if (state == 0 && edit == true) { - mode = rgblight_get_mode(); - hue = rgblight_get_hue(); - sat = rgblight_get_sat(); - val = rgblight_get_val(); - edit = false; - } - - switch (biton32(state)) { - case 1: - rgblight_mode(1); - rgblight_setrgb(0xD3, 0x7F, 0xED); - break; - case 2: - rgblight_mode(1); - rgblight_setrgb(0xFF, 0x00, 0x00); - edit = true; - break; - default: - rgblight_mode(mode); - rgblight_sethsv(hue, sat, val); - break; - } - return state; -} diff --git a/keyboards/xd60/readme.md b/keyboards/xd60/readme.md deleted file mode 100644 index f4926d01a..000000000 --- a/keyboards/xd60/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -# XD60 - -Compact 60% with arrows. - -![Top View of a pair of XD60 Keyboard](https://i.imgur.com/3Jq2743.jpg) - -* Keyboard Maintainer: QMK Community -* Hardware Supported: XD60 PCB rev2 & rev3 -* Hardware Availability: [Drop.com](https://www.drop.com/buy/xd60-xd64-custom-mechanical-keyboard-kit?mode=guest_open), [KPRepublic on AliExpress](https://www.aliexpress.com/item/32814945677.html) -* Schematic Availability: Public Domain [on EasyEDA](https://easyeda.com/langzisanshao/xd60) - -Make example for this keyboard (after setting up your build environment): - - make xd60/rev2:default # rev2 - make xd60/rev3:default # rev3 - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xd60/rev2/rules.mk b/keyboards/xd60/rev2/rules.mk deleted file mode 100644 index a06ac2e2c..000000000 --- a/keyboards/xd60/rev2/rules.mk +++ /dev/null @@ -1,29 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift diff --git a/keyboards/xd60/rev3/rules.mk b/keyboards/xd60/rev3/rules.mk deleted file mode 100644 index a06ac2e2c..000000000 --- a/keyboards/xd60/rev3/rules.mk +++ /dev/null @@ -1,29 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift diff --git a/keyboards/xd68/readme.md b/keyboards/xd68/readme.md deleted file mode 100644 index a62d9c7c5..000000000 --- a/keyboards/xd68/readme.md +++ /dev/null @@ -1,53 +0,0 @@ -# XD68 - -![Kitteh](https://i.imgur.com/qkA5Of5.jpg) - -65% board with USB-C, RGB underglow and backlight. Powered by ATM32U4. - -![Top View of XD68 Keyboard](https://i.imgur.com/OLkQQ17.jpg) - -* Keyboard Maintainer: QMK Community -* Hardware Supported: XD68 -* Hardware Availability: [KPRepublic on AliExpress](http://kprepublic.com/products/xiudi-xd68-pcb-65-custom-mechanical-keyboard-support-tkg-tools-underglow-rgb-pcb-programmed-kle-lots-of-layouts) - -Make example for this keyboard (after setting up your build environment): - - make xd68:default - make xd68:default_iso # default ISO UK layout - -## Layouts - -### ANSI - -``` -,----------------------------------------------------------------. -|Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| -|----------------------------------------------------------------| -|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|End | -|----------------------------------------------------------------| -|Ctrl|Win |Alt | Space |App|Ctrl|FN |Lef|Dow|Rig | -`----------------------------------------------------------------' -``` - -### ISO-UK - -``` -,----------------------------------------------------------------. -|Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| -|----------------------------------------------------------------| -|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |PgUp| -|------------------------------------------------------- -----| -|CAPS | A| S| D| F| G| H| J| K| L| ;| '| #|Entr|PgDn| -|----------------------------------------------------------------| -|Shift| \ | Z| X| C| V| B| N| M| ,| .| /|Rshift|Up|End | -|----------------------------------------------------------------| -|Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | -`----------------------------------------------------------------' -``` - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). - diff --git a/keyboards/xd68/rules.mk b/keyboards/xd68/rules.mk deleted file mode 100644 index 49653923d..000000000 --- a/keyboards/xd68/rules.mk +++ /dev/null @@ -1,33 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# QMK Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode - -LAYOUTS = 65_ansi 65_ansi_split_bs 65_iso diff --git a/keyboards/xd75/keymaps/4sstylz/rules.mk b/keyboards/xd75/keymaps/4sstylz/rules.mk deleted file mode 100644 index 0a9e12512..000000000 --- a/keyboards/xd75/keymaps/4sstylz/rules.mk +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2013 Jun Wako -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -COMBO_ENABLE = yes # Enable combo for special function when using multiple keys at once. -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. - -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -MIDI_ENABLE = no # MIDI support -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/xd75/keymaps/arpinfidel/keymap.c b/keyboards/xd75/keymaps/arpinfidel/keymap.c deleted file mode 100644 index d6681e786..000000000 --- a/keyboards/xd75/keymaps/arpinfidel/keymap.c +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright 2017 Wunder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -// Layer shorthand -#define _QW 0 -#define _FN 1 - -enum my_kc { - A_BL_TG = SAFE_RANGE - // , A_BL_Y - // , A_BL_N -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* QWERTY - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | - | ` | = | 6 | 7 | 8 | 9 | 0 | BSPC | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | [ | ] | \ | Y | U | I | O | P | ' | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | CAP LK | A | S | D | F | G | UP | DEL | DOWN | H | J | K | L | ; | ENTER | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | LSHIFT | Z | X | C | V | B | HOME | PG UP | END | N | M | , | . | / | RSHIFT | - * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| - * | LCTRL | FN | LGUI | LALT | SPACE | SPACE | FN | PG DN | FN | BSPC | BSPC | RALT | RGUI | FN | RCTRL | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ - KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_MINS, KC_GRV , KC_EQL , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_BSPC, - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_LBRC, KC_RBRC, KC_BSLS, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_QUOT, - KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_UP , KC_DEL , KC_DOWN, KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_ENT, - KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_HOME, KC_PGUP, KC_END , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, - KC_LCTL, TT(_FN), KC_LGUI, KC_LALT, KC_SPC , KC_SPC , TT(_FN), KC_PGDN, TT(_FN), KC_BSPC, KC_BSPC, KC_RALT, KC_RGUI, TT(_FN), KC_RCTL - ), - -/* FUNCTION - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | MS W U | | MS 2 | MS UP | MS 1 | MS 3 | RGB HD | | RGB HI | [ | ] | UP | | = | \ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | MS W D | | MS L | MS DN | MS R | | RGB SD | | RGB SI | - | LEFT | DOWN | RIGHT | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | RGB VD | BL TG | RGB VI | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | FN | RGB TG | | MS W L | MS W R | | RESET | | MS 1 | MS 2 | RGB RMD| RGB MD | FN | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RGB_HUD, _______, RGB_HUI, KC_F7, KC_F8, KC_F9, KC_F10 , KC_F11 , KC_F12, - KC_WH_U, _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, RGB_SAD, _______, RGB_SAI, KC_LBRC, KC_RBRC, KC_UP , _______ , KC_EQL , KC_BSLS, - KC_WH_D, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, RGB_VAD, _______, RGB_VAI, KC_MINS, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, - _______, _______, _______, _______, _______, _______, RGB_RMOD,A_BL_TG, RGB_MOD, _______, _______, _______, _______ , _______, _______, - _______, TT(_FN), RGB_TOG, _______, KC_WH_L, KC_WH_R, TT(_FN), RESET , TT(_FN), KC_BTN1, KC_BTN2, _______, _______ , TT(_FN), _______ - ) -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case A_BL_TG: - if (record->event.pressed) { - // toggle keycaps leds (f5 pin) - PORTF ^= (1 << 5); - } - return false; - - // case A_BL_Y: - // if (record->event.pressed) { - // keycaps_led_on(); - // } - // return false; - - // case A_BL_N: - // if (record->event.pressed) { - // keycaps_led_off(); - // } - // return false; - - default: - return true; - } -} - -// Runs whenever there is a layer state change. -uint32_t layer_state_set_user(uint32_t state) { - uint8_t layer = biton32(state); - - gp100_led_off(); - gp103_led_off(); - - // turns on gp100 (top left led) for odd layers - if (layer & (1<<0)) gp100_led_on(); - // turns on gp103 (top mid led) for layers 2, 6, ... - if (layer & (1<<1)) gp103_led_on(); - - return state; -} \ No newline at end of file diff --git a/keyboards/xd75/keymaps/arpinfidel/rules.mk b/keyboards/xd75/keymaps/arpinfidel/rules.mk deleted file mode 100644 index a83220d58..000000000 --- a/keyboards/xd75/keymaps/arpinfidel/rules.mk +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2013 Jun Wako -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -BOOTMAGIC_ENABLE = no diff --git a/keyboards/xd75/keymaps/billypython/rules.mk b/keyboards/xd75/keymaps/billypython/rules.mk deleted file mode 100644 index c935bbac1..000000000 --- a/keyboards/xd75/keymaps/billypython/rules.mk +++ /dev/null @@ -1,15 +0,0 @@ -AUDIO_ENABLE = no -BACKLIGHT_ENABLE = no -BLUETOOTH_ENABLE = no -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = yes -CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MIDI_ENABLE = no -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -RGBLIGHT_ENABLE = no -SLEEP_LED_ENABLE = no -TAP_DANCE_ENABLE = no -UNICODE_ENABLE = yes -VISUALIZER_ENABLE = no diff --git a/keyboards/xd75/keymaps/buzzlighter1/rules.mk b/keyboards/xd75/keymaps/buzzlighter1/rules.mk deleted file mode 100644 index 69a0eb537..000000000 --- a/keyboards/xd75/keymaps/buzzlighter1/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ - -BOOTMAGIC_ENABLE = lite -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = no diff --git a/keyboards/xd75/keymaps/c4software_bepo/keymap.c b/keyboards/xd75/keymaps/c4software_bepo/keymap.c deleted file mode 100644 index 4571033c0..000000000 --- a/keyboards/xd75/keymaps/c4software_bepo/keymap.c +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright 2017 Valentin Brosseau - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H -#include "keymap_bepo.h" - -// Layer shorthand -#define _BP 0 -#define _FN 1 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Native BepoDev for compatible computer - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | ESC | " | < | > | ( | ) | % | VOL- | VOL+ | @ | + | - | / | * | = | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | B | E_ACUT | P | O | $ | E_GRAV | DEL | E_CIRC | V | D | L | J | Z | C_CEDIL| - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | RALT | A | U | I | E | , | BACKSP | ENTER | C | T | S | R | N | M | W | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | LSHIFT | A_GRAV | Y | X | . | K | BACKSP | ENTER | ’ | Q | G | H | F | UP | RSHIFT | - * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| - * | LALT | LCTRL | FN | LGUI | SPACE | SPACE | RALT | RALT | SPACE | SPACE | RGUI | FN | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_BP] = LAYOUT_ortho_5x15( /* BepoDev */ - KC_ESC, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_PERCENT, KC_VOLD, KC_VOLU, BP_AT, BP_PLUS, BP_MINUS, BP_SLASH, BP_ASTR, BP_EQUAL, - KC_TAB, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_DOLLAR, BP_E_GRAVE, KC_DEL, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_CCED, - KC_RALT, BP_A, BP_U, BP_I, BP_E, BP_COMMA, KC_BSPC, KC_ENT, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, BP_W, - KC_LSFT, BP_A_GRAVE, BP_Y, BP_X, BP_DOT, BP_K, KC_BSPC, KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_UP, KC_RSFT, - KC_LALT, KC_LCTL, MO(_FN), KC_LGUI, KC_SPC, KC_SPC, KC_RALT, KC_RALT, KC_SPC, KC_SPC, KC_RGUI, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT - ), - -/* FUNCTION - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | P/ | P* | F9 | F10 | F11 | F12 | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | P7 | P8 | P9 | - | RGB_TOG| RGB_MOD| RGB_HUI| - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | PREV | PLAY | NEXT | STOP | | | | P4 | P5 | P6 | + | RGB_SAI| RGB_SAD| RGB_VAI| - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | VOL- | MUTE | VOL+ | | | | | P1 | P2 | P3 | ENT | RGB_VAD| Home | RGB_HUD| - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | RESET | | FN | | | | | | P0 | P0 | . | FN | | End | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_SLSH, KC_ASTR, KC_F9, KC_F10, KC_F11, KC_F12, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_MINS, RGB_TOG, RGB_MOD, RGB_HUI, - KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PLUS, RGB_SAI, RGB_SAD, RGB_VAI, - KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_ENT, RGB_VAD, KC_HOME, RGB_HUD, - RESET, KC_TRNS, MO(_FN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_0, KC_KP_0, KC_PDOT, MO(_FN), KC_TRNS, KC_END, KC_TRNS - ) -}; diff --git a/keyboards/xd75/keymaps/cbbrowne/keymap.c b/keyboards/xd75/keymaps/cbbrowne/keymap.c deleted file mode 100644 index 6c356ac80..000000000 --- a/keyboards/xd75/keymaps/cbbrowne/keymap.c +++ /dev/null @@ -1,310 +0,0 @@ -/* Copyright 2017 Christopher B Browne - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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 - -/* Fillers to make layering more clear */ -#define ___T___ KC_TRNS - -/* Layer shorthand */ - -enum layers { - _QWERTY = 0, /* Qwerty mapping */ - _LOWER, /* Lower layer, where top line has symbols !@#$%^&*() */ - _RAISE, /* Raised layer, where top line has digits 1234567890 */ - _ADJUST, /* Special Adjust layer coming via tri-placement */ - _FUNCTION /* Function key layer */ -}; - - -/* Macros need to be uniquely identified; using an enum to do this - automatically - */ - -enum macro_id { - M_LED = 0, - M_USERNAME, - M_RANDDIGIT, - M_RANDLETTER, - M_VERSION, - MACRO_UPPER, - MACRO_LOWER, -}; - -/* I want some short forms for keycodes so that they fit into - limited-width cells */ - -#define M_LOWER M(MACRO_LOWER) -#define M_UPPER M(MACRO_UPPER) -#define ROT_LED M(M_LED) /* Rotate LED */ -#define QWERTY DF(_QWERTY) /* Switch to QWERTY layout */ -#define QCENT2 DF(_QCENT2) /* Switch to QWERTY-with-centre layout */ -#define USERNAME M(M_USERNAME) /* shortcut for username */ -#define RANDDIG M(M_RANDDIGIT) -#define RANDALP M(M_RANDLETTER) -#define CTLENTER MT(MOD_RCTL, KC_ENT) -#define SHIFTQUOTE MT(MOD_RSFT, KC_QUOT) -#define ALTRIGHT MT(MOD_LALT, KC_RGHT) -#define MVERSION M(M_VERSION) -#define ALTSLASH LALT(KC_SLSH) -#define FUNCTION MO(_FUNCTION) -#define MRAISE MO(_RAISE) -#define MLOWER MO(_LOWER) -#define ALTPLUS ALT_T(KC_PLUS) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* QWERTY - MIT ENHANCED / GRID COMPATIBLE - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - /* layout for centred keypad + qwerty... - -|ESC| 1 | 2 | 3 | 4 | 5 | ? | ? | ? | ? | 6 | 7 | 8 | 9 | 0 | -|TAB| q | w | e | r | t | ? | ? | ? | ? | y | u | i | o | p | -|CTL| a | s | d | f | g | ? | ? | ? | ? | h | j | k | l | ; | -|SHF| z | x | c | v | b | ? | ? | ? | ? | n | m | , | . | / | -|ALT|LED| | | | | | | | | | | | | | - - -keys needing to be assigned: -51 - KC_TAB - tab - - ROT_LED - rotate LED -15 - KC_LALT - Left ALT -53,55 - M_RAISE - switch to RAISE layer -5b - M_LOWER - switch to LOWER layer -56,59,5a - KC_SPC - space -5c - KC_LEFT - famous arrows -5d - KC_DOWN - famous arrows -5e - KC_UP - famous arrows -5f - KC_RIGHT - famous arrows -3f - KC_ENT - enter - - KC_GRV - leftwards quote -4f - KC_QUOT - rightwards quote -1f - KC_BSPC - backspace -11 - KC_ESC -19 - KC_GRV - ` - raised -19 - KC_TILD - ~ - lowered - - */ - -[_QWERTY] = LAYOUT_ortho_5x15( /* QWERTY, with keypad in the centre */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC , - KC_LALT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_8, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, ALTPLUS , - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC,KC_MINS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER , - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, KC_EQL, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE , - KC_TAB, FUNCTION, MRAISE, FUNCTION, MRAISE, KC_SPC,KC_PGDN, KC_MINS, KC_SPC, KC_SPC, MLOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -), - -/* LOWER - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | XXXXXX . | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - -[_LOWER] = LAYOUT_ortho_5x15( /* LOWERED */ - ___T___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_TILD, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 , - ___T___, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_INS , - ___T___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, ___T___, ___T___, _______ , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - -/* RAISED - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | XXXXXX . | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - -[_RAISE] = LAYOUT_ortho_5x15 ( /* RAISED */ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MVERSION, _______, KC_GRV, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___ , - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, USERNAME, _______, KC_7, KC_8, KC_LCBR, KC_RCBR, _______, _______, KC_INS , - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RANDDIG, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___ , - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RANDALP, _______, _______, _______, _______, ___T___, ___T___, _______, _______ , - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* FUNCTION - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | NUM LK | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX | | WHEEL+ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX | | MOUS U | WHEEL- | - * |--------+--------+--------+--------+--------+-- 2u -----------+--------+--------+--------+--------+-----------------+--------+--------| - * | RESET | | QWERTY | COLEMK | DVORAK | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - -[_FUNCTION] = LAYOUT_ortho_5x15( /* FUNCTION */ - KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET, RESET, - KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR , - KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U , - RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, ___T___, ___T___, KC_MS_U, KC_WH_D , - RESET , _______, DF(_QWERTY), DF(_QWERTY), DF(_QWERTY), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R - ) -}; - -/* This bit of logic seeds a wee linear congruential random number generator */ -/* lots of prime numbers everywhere... */ -static uint16_t random_value = 157; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - uint8_t clockbyte=0; - clockbyte = TCNT1 % 256; - uint8_t rval; - /* MACRODOWN only works in this function */ - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); -#ifdef BACKLIGHT_ENABLE - backlight_step(); -#endif - } else { - unregister_code(KC_RSFT); - } - break; - case M_USERNAME: - if (record->event.pressed) { - SEND_STRING("cbbrowne"); - } - break; - case M_VERSION: - if (record->event.pressed) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP); - } - break; - case M_RANDDIGIT: - /* Generate, based on random number generator, a keystroke for - a numeric digit chosen at random */ - random_value = ((random_value + randadd) * randmul) % randmod; - if (record->event.pressed) { - /* Here, we mix the LCRNG with low bits from one of the system - clocks via XOR in the theory that this may be more random - than either separately */ - rval = (random_value ^ clockbyte) % 10; - /* Note that KC_1 thru KC_0 are a contiguous range */ - register_code (KC_1 + rval); - unregister_code (KC_1 + rval); - } - break; - case M_RANDLETTER: - /* Generate, based on random number generator, a keystroke for - a letter chosen at random */ - /* Here, we mix the LCRNG with low bits from one of the system - clocks via XOR in the theory that this may be more random - than either separately */ - random_value = ((random_value + randadd) * randmul) % randmod; - if (record->event.pressed) { - rval = (random_value ^ clockbyte) % 26; - register_code (KC_A + rval); - unregister_code (KC_A + rval); - } - break; - case MACRO_UPPER: - if (record->event.pressed) - { - layer_on(_RAISE); -#ifdef BACKLIGHT_ENABLE - breathing_period_set(2); - breathing_pulse(); -#endif - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - else - { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - break; - case MACRO_LOWER: - if (record->event.pressed) - { - layer_on(_LOWER); -#ifdef BACKLIGHT_ENABLE - breathing_period_set(2); - breathing_pulse(); -#endif - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - else - { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - break; - } - return MACRO_NONE; -}; - -void matrix_init_user(void) { - rgblight_enable(); - rgblight_mode(1); - rgblight_sethsv(325,255,255); -} - -uint32_t layer_state_set_user(uint32_t state) { - switch(biton32(state)) { - case _QWERTY: - rgblight_sethsv_white(); - break; - case _LOWER: - rgblight_sethsv_blue(); - break; - case _RAISE: - rgblight_sethsv_green(); - break; - case _ADJUST: - rgblight_sethsv_orange(); - break; - case _FUNCTION: - rgblight_sethsv_red(); - break; - default: - rgblight_sethsv(325,255,255); - break; - } - return state; -} diff --git a/keyboards/xd75/keymaps/cbbrowne/rules.mk b/keyboards/xd75/keymaps/cbbrowne/rules.mk deleted file mode 100644 index eb2f87063..000000000 --- a/keyboards/xd75/keymaps/cbbrowne/rules.mk +++ /dev/null @@ -1,20 +0,0 @@ -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -API_SYSEX_ENABLE = no # Enable SYSEX API (+5390) - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/xd75/keymaps/developper_bepo/keymap.c b/keyboards/xd75/keymaps/developper_bepo/keymap.c deleted file mode 100644 index 7fedb7fb6..000000000 --- a/keyboards/xd75/keymaps/developper_bepo/keymap.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright 2017 Quentin Lebastard - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H -#include "keymap_bepo.h" - -// Layer shorthand -#define _BP 0 -#define _FN 1 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | $ | " | { | } | ( | ) | VOL- | MUTE | VOL+ | + | - | / | * | = | % | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | B | E_ACUT | P | O | E_GRAV | | | | ^ | V | D | L | J | Z | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | ESC | A | U | I | E | , | HOME | | END | C | T | S | R | N | M | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | LSHIFT | W | Y | X | . | K | PAGE UP| | PAGE D | ? | Q | G | H | F | RSHIFT | - * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| - * | LCTRL | LGUI | ALT | | _ |ENTER/FN| DEL | | BACKSP |SPACE/FN| _ | ALT | ALT | RGUI | LCTRL | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_BP] = LAYOUT_ortho_5x15( /* BepoDev */ - BP_DOLLAR, BP_DQOT, BP_LCBR, BP_RCBR, BP_LPRN, BP_RPRN, KC_VOLD, KC_MUTE, KC_VOLU, BP_PLUS, BP_MINUS,BP_SLASH,BP_ASTR, BP_EQL, BP_PERC, - KC_TAB, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_KP_7, KC_KP_8, KC_KP_9, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, - KC_ESC, BP_A, BP_U, BP_I, BP_E, BP_COMMA, KC_HOME, KC_KP_5, KC_END, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, - KC_LSFT, BP_W, BP_Y, BP_X, BP_DOT, BP_K, KC_PGUP, KC_END, KC_PGDOWN, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT, - KC_LCTL, KC_LGUI, KC_RALT, KC_LGUI, BP_UNDS, LT(_FN,KC_ENT), KC_DEL, KC_KP_0, KC_BSPC, LT(_FN,KC_SPC), BP_UNDS, KC_RALT, KC_RALT, KC_RGUI, KC_LCTL - ), - - -/* FUNCTION - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | PREV | PAUSE | NEXT | F7 | F8 | F9 | F10 | F11 | F12 | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | \ | [ | ] | & | | | | | LEFT | DOWN | UP | RIGHT | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | < | > | @ | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | _ | MO(_FN)| | | | | MO(_FN)| _ | | | | RESET | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - - [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, S(BP_DQOT), S(BP_LGIL), S(BP_RGIL), S(BP_LPRN), S(BP_RPRN), _______, _______, _______, S(BP_AT), S(BP_PLUS), S(BP_MINUS), S(BP_SLASH), S(BP_ASTR), S(BP_EQL), - _______, RALT(BP_B), BP_BSLS, BP_LBRC, BP_RBRC, RALT(BP_P), _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, - _______, BP_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, BP_LESS, BP_GRTR, BP_AT , _______, _______, - _______, _______, _______, _______, _______, LT(_FN,KC_ENT), _______, _______, _______, LT(_FN,KC_SPC), _______, _______, _______, _______, RESET - ) - -}; diff --git a/keyboards/xd75/keymaps/fabian/rules.mk b/keyboards/xd75/keymaps/fabian/rules.mk deleted file mode 100644 index 39b003dee..000000000 --- a/keyboards/xd75/keymaps/fabian/rules.mk +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2013 Jun Wako -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# QMK Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/xd75/keymaps/french/keymap.c b/keyboards/xd75/keymaps/french/keymap.c deleted file mode 100644 index f8de0763c..000000000 --- a/keyboards/xd75/keymaps/french/keymap.c +++ /dev/null @@ -1,56 +0,0 @@ -#include "keymap_french.c" -#include QMK_KEYBOARD_H - - -// Layer shorthand -#define _AZ 0 -#define _FN 1 - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* AZERTY - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | ESC | & | é | " | ' | ( | - | è | _ | ç | à | ) | = | INSERT | BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | a | z | e | r | t | y | u | i | o | p | ^ | $ | ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | CAP LK | q | s | d | f | g | h | j | k | l | m | ù | * | ENTER | PG DN | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | LSHIFT | w | x | c | v | b | n | , | ; | : | ! | < | LSHIFT | UP | DEL | - * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| - * | LCTRL | CMD | ALT | FN | SPACE | SPACE | SPACE | SPACE | ALGR | MENU | HOME | END | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_AZ] = LAYOUT_ortho_5x15( /* AZERTY */ - FR_ESC, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPAR, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPAR, FR_EQUA, FR_INST, FR_BSPC, - FR_TAB, FR_A, FR_Z, FR_E, FR_R, FR_T, FR_Y, FR_U, FR_I, FR_O, FR_P, FR_HAT, FR_DLR, FR_ENTR, FR_PGUP, - FR_CAPL, FR_Q, FR_S, FR_D, FR_F, FR_G, FR_H, FR_J, FR_K, FR_L, FR_M, FR_UGRV, FR_AST, FR_ENTR, FR_PGDN, - FR_LSFT, FR_W, FR_X, FR_C, FR_V, FR_B, FR_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXCL, FR_LESS, FR_RSFT, FR_UP, FR_DEL, - FR_LCTR, FR_LCMD, FR_LALT, MO(_FN), FR_SPAC, FR_SPAC, FR_SPAC, FR_SPAC, FR_ALGR, FR_MENU, FR_HOME, FR_END, FR_LEFT, FR_DOWN, FR_RIGT - ), - - -/* FUNCTION - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PRINT | LED | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | PREV | PLAY | NEXT | | | | | NUM LCK| 7 | 8 | 9 | * | | LED+ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | VOL- | MUTE | VOL+ | | | | | | 4 | 5 | 6 | - | | LED- | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | 1 | 2 | 3 | + | | LEDMAX | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | RESET | | | FN | | | | | | | 0 | . | PENT | | LEDLVL | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ - FR_EMPT, FR_F1, FR_F2, FR_F3, FR_F4, FR_F5, FR_F6, FR_F7, FR_F8, FR_F9, FR_F10, FR_F11, FR_F12, FR_PSCR, BL_TOGG, - FR_EMPT, FR_MPRV, FR_MPLY, FR_MNXT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_NUML, FR_7, FR_8, FR_9, FR_MULT, FR_EMPT, BL_INC, - FR_EMPT, FR_MVDN, FR_MUTE, FR_MVUP, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_4, FR_5, FR_6, FR_MOIN, FR_EMPT, BL_DEC, - FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_1, FR_2, FR_3, FR_PLUS, FR_EMPT, BL_ON, - RESET, FR_EMPT, FR_EMPT, FR_TRANS, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_0, FR_DOT, FR_ENTK, FR_EMPT, BL_STEP - ) -}; diff --git a/keyboards/xd75/keymaps/french/keymap_french.c b/keyboards/xd75/keymaps/french/keymap_french.c deleted file mode 100644 index f7d068c33..000000000 --- a/keyboards/xd75/keymaps/french/keymap_french.c +++ /dev/null @@ -1,157 +0,0 @@ -enum french_key { - - FR_EMPT = 0x00, - FR_TRANS, - FR_Q = 0x04, - FR_B, - FR_C, - FR_D, - FR_E, - FR_F, - FR_G, - FR_H, - FR_I, - FR_J, - FR_K, - FR_L, - FR_COMM, /* 0x10 */ - FR_N, - FR_O, - FR_P, - FR_A, - FR_R, - FR_S, - FR_T, - FR_U, - FR_V, - FR_Z, - FR_X, - FR_Y, - FR_W, - FR_AMP, - FR_EACU, - FR_QUOT, /* 0x20 */ - FR_APOS, - FR_LPAR, - FR_MINS, - FR_EGRV, - FR_UNDS, - FR_CCED, - FR_AGRV, - FR_ENTR, - FR_ESC, - FR_BSPC, - FR_TAB, - FR_SPAC, - FR_RPAR, - FR_EQUA, - FR_HAT, - FR_DLR, /* 0x30 */ - FR_AST =0x32, - FR_M, - FR_UGRV, - FR_SCLN =0x36, - FR_COLN, - FR_EXCL, - FR_CAPL, - FR_F1, - FR_F2, - FR_F3, - FR_F4, - FR_F5, - FR_F6, - FR_F7, /* 0x40 */ - FR_F8, - FR_F9, - FR_F10, - FR_F11, - FR_F12, - FR_PSCR, - FR_INST =0x49, - FR_HOME, - FR_PGUP, - FR_DEL, - FR_END, - FR_PGDN, - FR_RIGT, - FR_LEFT, /* 0x50 */ - FR_DOWN, - FR_UP, - FR_NUML, - FR_SLSH, /* KEYPAD */ - FR_MULT, - FR_MOIN, - FR_PLUS, - FR_ENTK, - FR_1, - FR_2, - FR_3, - FR_4, - FR_5, - FR_6, - FR_7, - FR_8, /* 0x60 */ - FR_9, - FR_0, - FR_DOT, - FR_LESS, - FR_EQ =0x67 /* END KEYPAD */, - FR_F13, - FR_F14, - FR_F15, - FR_F16, - FR_F17, - FR_F18, - FR_F19, - FR_F20, - FR_F21, /* 0x70 */ - FR_F22, - FR_F23, - FR_F24, - FR_MENU =0x76 -}; - - -enum french_control_touch{ - - /* Modifiers */ - FR_LCTR = 0xE0, - FR_LSFT, - FR_LALT, - FR_LCMD, - FR_RCTR, - FR_RSFT, - FR_ALGR, - FR_RCMD -}; - - -enum french_media_key{ - /* System Control */ - FR_SYSTEM_POWER = 0xA5, - FR_SYSTEM_SLEEP, - FR_SYSTEM_WAKE, - - /* Media Control */ - FR_MUTE, - FR_MVUP, - FR_MVDN, - FR_MNXT, - FR_MPRV, - FR_MSTP, - FR_MPLY, - FR_MEDIA_SELECT, - FR_MEDIA_EJECT, - FR_MAIL, - FR_CALCULATOR, - FR_MY_COMPUTER, - FR_WWW_SEARCH, - FR_WWW_HOME, - FR_WWW_BACK, - FR_WWW_FORWARD, - FR_WWW_STOP, - FR_WWW_REFRESH, - FR_WWW_FAVORITES, - FR_MEDIA_FAST_FORWARD, - FR_MEDIA_REWIND /* 0xBC */ -}; diff --git a/keyboards/xd75/keymaps/germanized/config.h b/keyboards/xd75/keymaps/germanized/config.h deleted file mode 100644 index 65ab6a0dc..000000000 --- a/keyboards/xd75/keymaps/germanized/config.h +++ /dev/null @@ -1,117 +0,0 @@ -/* Copyright 2018 Kolja Brauns - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -// place overrides here - -//Tap-Toggle -#define TAPPING_TOGGLE 3 - -//Tap Dancing -#define TAPPING_TERM 200 - -// normal characters -#define DE_Z KC_Y -#define DE_Y KC_Z - -#define DE_A KC_A -#define DE_B KC_B -#define DE_C KC_C -#define DE_D KC_D -#define DE_E KC_E -#define DE_F KC_F -#define DE_G KC_G -#define DE_H KC_H -#define DE_I KC_I -#define DE_J KC_J -#define DE_K KC_K -#define DE_L KC_L -#define DE_M KC_M -#define DE_N KC_N -#define DE_O KC_O -#define DE_P KC_P -#define DE_Q KC_Q -#define DE_R KC_R -#define DE_S KC_S -#define DE_T KC_T -#define DE_U KC_U -#define DE_V KC_V -#define DE_W KC_W -#define DE_X KC_X - -#define DE_0 KC_0 -#define DE_1 KC_1 -#define DE_2 KC_2 -#define DE_3 KC_3 -#define DE_4 KC_4 -#define DE_5 KC_5 -#define DE_6 KC_6 -#define DE_7 KC_7 -#define DE_8 KC_8 -#define DE_9 KC_9 - -#define DE_DOT KC_DOT -#define DE_COMM KC_COMM - -#define DE_SS KC_MINS -#define DE_AE KC_QUOT -#define DE_UE KC_LBRC -#define DE_OE KC_SCLN - -#define DE_CIRC KC_GRAVE // accent circumflex ^ and ring ° -#define DE_ACUT KC_EQL // accent acute ´ and grave ` -#define DE_PLUS KC_RBRC // + and * and ~ -#define DE_HASH KC_BSLS // # and ' -#define DE_LESS KC_NUBS // < and > and | -#define DE_MINS KC_SLSH // - and _ - -// shifted characters -#define DE_RING LSFT(DE_CIRC) // ° -#define DE_EXLM LSFT(KC_1) // ! -#define DE_DQOT LSFT(KC_2) // " -#define DE_PARA LSFT(KC_3) // § -#define DE_DLR LSFT(KC_4) // $ -#define DE_PERC LSFT(KC_5) // % -#define DE_AMPR LSFT(KC_6) // & -#define DE_SLSH LSFT(KC_7) // / -#define DE_LPRN LSFT(KC_8) // ( -#define DE_RPRN LSFT(KC_9) // ) -#define DE_EQL LSFT(KC_0) // = -#define DE_QST LSFT(DE_SS) // ? -#define DE_GRV LSFT(DE_ACUT) // ` -#define DE_ASTR LSFT(DE_PLUS) // * -#define DE_QUOT LSFT(DE_HASH) // ' -#define DE_MORE LSFT(DE_LESS) // > -#define DE_COLN LSFT(KC_DOT) // : -#define DE_SCLN LSFT(KC_COMM) // ; -#define DE_UNDS LSFT(DE_MINS) // _ - -// Alt Gr-ed characters -#define DE_SQ2 ALGR(KC_2) // ² -#define DE_SQ3 ALGR(KC_3) // ³ -#define DE_LCBR ALGR(KC_7) // { -#define DE_LBRC ALGR(KC_8) // [ -#define DE_RBRC ALGR(KC_9) // ] -#define DE_RCBR ALGR(KC_0) // } -#define DE_BSLS ALGR(DE_SS) // backslash -#define DE_AT ALGR(KC_Q) // @ -#define DE_EURO ALGR(KC_E) // € -#define DE_TILD ALGR(DE_PLUS) // ~ -#define DE_PIPE ALGR(DE_LESS) // | - -// Launchy -#define ALT_SPC LALT(KC_SPC) diff --git a/keyboards/xd75/keymaps/germanized/keymap.c b/keyboards/xd75/keymaps/germanized/keymap.c deleted file mode 100644 index 77346d186..000000000 --- a/keyboards/xd75/keymaps/germanized/keymap.c +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright 2017 Kolja Brauns -*/ -#include QMK_KEYBOARD_H - -#ifndef KEYMAP_GERMAN -#define KEYMAP_GERMAN - -#include "keymap.h" - -#endif - -//Tap Dance Declarations -enum { - TD_ESC_RUPT = 0 -}; - -enum { - TD_TAB = 1 -}; - -//Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - //Tap once for Esc, twice Ctrl+Alt+Del - [TD_ESC_RUPT] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, LALT(LCTL(KC_DEL))), - [TD_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, LGUI(KC_TAB)) -// Other declarations would go here, separated by commas, if you have them -}; - -//In Layer declaration, add tap dance item in place of a key code - - -// Layer shorthand -#define _QWZ 0 -#define _FNC 1 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - - /* QWZ - * .-----------------------------------------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BckSpc| Esc | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Tab | Q | W | E | R | T | Z | U | I | O | P | Ü | + | | PgUp | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| Enter |-------| - * | Ctrl/ | A | S | D | F | G | H | J | K | L | Ö | Ä | # | | PgDn | - * | GUITab| | | | | | | | | | | | | | | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | LShift| Y | X | C | V | B | N | M | , | . | - | ^ | Home/ | Up | End | - * | | | | | | | | | | | | | RShift| | | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | LCtrl | LAlt | MO(1)/| Space | Backspace | MO(1)/|AltGr/ | Win | < | Del | Left | Down | Right | - * | | | Enter | | | TO(1) |Pause | | | | | | | - * °-----------------------------------------------------------------------------------------------------------------------° - */ - - [_QWZ] = LAYOUT_ortho_5x15( - TD(TD_ESC_RUPT), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, KC_BSPC, KC_ESC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, KC_NO, KC_PGUP, - TD(TD_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, KC_PGDN, - KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, DE_CIRC, MT(MOD_RSFT, KC_HOME), KC_UP, KC_END, - KC_LCTL, KC_LALT, LT(1, KC_ENT), KC_SPC, KC_NO, KC_BSPC, KC_NO, TT(1), MT(MOD_RALT, KC_PAUS), KC_RGUI, DE_LESS, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT - ), - - /* FNC - * .-----------------------------------------------------------------------------------------------------------------------. - * | Reset | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | _____ | _____ | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | _____ | _____ | _____ |Bright+| _____ | _____ | _____ | _____ | _____ | Up | PrtSc | _____ | _____ | _____ | _____ | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | _____ | _____ | _____ |RGB Tog|RGB Mod| _____ | _____ | _____ | Left | Down | Right | _____ | _____ | Play | _____ | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | CpsLck| _____ | _____ |Bright-| _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | VolUp | Mute | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | TO(0) | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | Prev | VolDn | Next | - * °-----------------------------------------------------------------------------------------------------------------------° -*/ - [_FNC] = LAYOUT_ortho_5x15( - 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_TRNS, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, - KC_CAPS, KC_TRNS, KC_TRNS, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE, - TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT - ) - -}; - diff --git a/keyboards/xd75/keymaps/germanized/rules.mk b/keyboards/xd75/keymaps/germanized/rules.mk deleted file mode 100644 index ab81a5360..000000000 --- a/keyboards/xd75/keymaps/germanized/rules.mk +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2013 Jun Wako -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# QMK Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -TAP_DANCE_ENABLE = yes # Enable Tap Dancing - diff --git a/keyboards/xd75/keymaps/markus/keymap.c b/keyboards/xd75/keymaps/markus/keymap.c deleted file mode 100644 index ab818318e..000000000 --- a/keyboards/xd75/keymaps/markus/keymap.c +++ /dev/null @@ -1,215 +0,0 @@ -/* Copyright 2019 Markus Weimar - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include QMK_KEYBOARD_H -#include "keymap_german.h" - -#define ________ KC_TRNS -#define ___xx___ KC_NO - -enum my_layers { - _QWZ, - _QWY, - _GAM, - _FN1, - _FN2, - _FN3, -}; - -enum my_keycodes { - QWERTZ = SAFE_RANGE, - QWERTY, - GAMING, - FN1, - FN2, - FN3 -}; - -enum my_ucis { - UNI_LNX, - UNI_MAC, - UNI_WIN, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* QWERTZ - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | 1 ! | 2 " | 3 § | 4 $ | 5 % | 6 & | Mute | Vol- | Vol+ | 7 / | 8 ( | 9 ) | 0 = | ẞ ? | Ü | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | Esc | Q | W | E | R | T | Home | Play | End | Z | U | I | O | P | Ä | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LShift | A | S | D | F | G | Pg Up | Up | Pg Dn | H | J | K | L | Ö | RShift | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LCtrl | Y | X | C | V | B | Left | Down | Right | N | M | , ; | . : | - _ | RCtrl | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | Caps | Fn3 | LGUI | LAlt | Fn2 | Fn1 | Tab | Del | Enter | Space | Bksp | LAlt | LGUI | Fn3 | Ins | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ -[_QWZ] = LAYOUT_ortho_5x15( -DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, KC_MUTE, KC_VOLD, KC_VOLU, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_UE, -KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_HOME, KC_MPLY, KC_END, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_AE, -KC_LSFT, DE_A, DE_S, DE_D, DE_F, DE_G, KC_PGUP, KC_UP, KC_PGDN, DE_H, DE_J, DE_K, DE_L, DE_OE, KC_RSFT, -KC_LCTL, DE_Y, DE_X, DE_C, DE_V, DE_B, KC_LEFT, KC_DOWN, KC_RIGHT, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RCTL, -KC_CAPS, MO(_FN3), KC_LGUI, KC_LALT, MO(_FN2), MO(_FN1), KC_TAB, KC_DEL, KC_ENT, KC_SPC, KC_BSPC, KC_LALT, KC_LGUI, MO(_FN3), KC_INS -), - -/* QWERTY - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | Y | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | Z | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ -[_QWY] = LAYOUT_ortho_5x15( -DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, KC_MUTE, KC_VOLD, KC_VOLU, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_UE, -KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_HOME, KC_MPLY, KC_END, DE_Y, DE_U, DE_I, DE_O, DE_P, DE_AE, -KC_LSFT, DE_A, DE_S, DE_D, DE_F, DE_G, KC_PGUP, KC_UP, KC_PGDN, DE_H, DE_J, DE_K, DE_L, DE_OE, KC_RSFT, -KC_LCTL, DE_Z, DE_X, DE_C, DE_V, DE_B, KC_LEFT, KC_DOWN, KC_RIGHT, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RCTL, -KC_CAPS, MO(_FN3), KC_LGUI, KC_LALT, MO(_FN2), MO(_FN1), KC_TAB, KC_DEL, KC_ENT, KC_SPC, KC_BSPC, KC_LALT, KC_LGUI, MO(_FN3), KC_INS -), - -/* GAMING - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | Y | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | Z | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | Fn2 | | | | Space | | | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ -[_GAM] = LAYOUT_ortho_5x15( -DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, KC_MUTE, KC_VOLD, KC_VOLU, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_UE, -KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_HOME, KC_MPLY, KC_END, DE_Y, DE_U, DE_I, DE_O, DE_P, DE_AE, -KC_LSFT, DE_A, DE_S, DE_D, DE_F, DE_G, KC_PGUP, KC_UP, KC_PGDN, DE_H, DE_J, DE_K, DE_L, DE_OE, KC_RSFT, -KC_LCTL, DE_Z, DE_X, DE_C, DE_V, DE_B, KC_LEFT, KC_DOWN, KC_RIGHT, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RCTL, -MO(_FN2), MO(_FN3), KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_TAB, KC_DEL, KC_ENT, KC_SPC, KC_BSPC, KC_LALT, KC_LGUI, MO(_FN3), KC_INS -), - -/* FN1 - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | Prev | Play | Next | F7 | F8 | F9 | F10 | F11 | F12 | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | @ | ~ | € | ´ | ` | | | | \ | { | } | + | * | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | " | ' | ‚ | ‘ | ’ | | | | | | [ | ] | ! | ? | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | ° | ^ | „ | “ | ” | | | | # | < | > | … | – EN | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ -[_FN1] = LAYOUT_ortho_5x15( -KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, -________, DE_AT, DE_TILD, DE_EURO, DE_ACUT, DE_GRV, ________, ___xx___, ________, DE_BSLS, DE_LCBR, DE_RCBR, DE_PLUS, DE_ASTR, ___xx___, -________, DE_DQOT, DE_QUOT, UC(L'‚'), UC(L'‘'), UC(L'’'), ________, ________, ________, DE_PIPE, DE_LBRC, DE_RBRC, DE_EXLM, DE_QST, ________, -________, DE_RING, DE_CIRC, UC(L'„'), UC(L'“'), UC(L'”'), ________, ________, ________, DE_HASH, DE_LESS, DE_MORE, UC(L'…'), UC(L'–'), ________, -___xx___, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________ -), - -/* FN2 - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | % | ( | ) | P/ | P* | P- | Print | Scroll | Pause | ẞ | − MNS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | Mute | Vol- | Vol+ | Bspc | P7 | P8 | P9 | P+ | WH_U | MS_U | WH_D | × | ÷ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | App | ACL2 | ACL1 | ACL0 | Space | P4 | P5 | P6 | WH_L | MS_L | MS_D | MS_R | WH_R | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | Prev | Play | Next | Tab | P1 | P2 | P3 | PEnter | BTN1 | BTN2 | BTN3 | — EM | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | Fn2 | | | | | PEnter | P0 | . : | P, | BTN1 | BTN2 | BTN3 | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ -[_FN2] = LAYOUT_ortho_5x15( -___xx___, ___xx___, ___xx___, ___xx___, DE_PERC, DE_LPRN, DE_RPRN, KC_PSLS, KC_PAST, KC_PMNS, KC_PSCR, KC_LSCR, KC_PAUS, UC(L'ẞ'), UC(L'−'), -________, ___xx___, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_WH_U, KC_MS_U, KC_WH_D, UC(L'×'), UC(L'÷'), -________, KC_APP, KC_ACL2, KC_ACL1, KC_ACL0, KC_SPC, KC_P4, KC_P5, KC_P6, KC_WH_L, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_R, ________, -________, ___xx___, KC_MPRV, KC_MPLY, KC_MNXT, KC_TAB, KC_P1, KC_P2, KC_P3, KC_PENT, KC_BTN1, KC_BTN2, KC_BTN3, UC(L'—'), ________, -MO(_FN2), ________, ________, ________, ________, KC_PENT, KC_P0, DE_DOT, KC_PDOT, KC_BTN1, KC_BTN2, KC_BTN3, ________, ________, ________ -), - -/* FN3 - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | F13 | F14 | F15 | F16 | F17 | F18 | U LNX | U WIN | U MAC | F19 | F20 | F21 | F22 | F23 | F24 | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | QWERTZ | QWERTY | GAMING | | | L TOG | L MP | L MOD | | Pg Up | Up | Pg Dn | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | › | ‹ | | L HUI | L SAI | L VAI | Home | Left | Down | Right | End | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | » | « | | L HUD | L SAD | L VAD | NumSp | ThinSp | NaNbSp | NbSp | NbHyph | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | Reset | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ -[_FN3] = LAYOUT_ortho_5x15( -KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, UNI_LNX, UNI_WIN, UNI_MAC, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, -________, QWERTZ, QWERTY, GAMING, ___xx___, ___xx___, RGB_TOG, RGB_M_P, RGB_MOD, ___xx___, KC_PGUP, KC_UP, KC_PGDN, ___xx___, ___xx___, -________, ___xx___, ___xx___, UC(L'›'), UC(L'‹'), ___xx___, RGB_HUI, RGB_SAI, RGB_VAI, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, ________, -________, ___xx___, ___xx___, UC(L'»'), UC(L'«'), ___xx___, RGB_HUD, RGB_SAD, RGB_VAD, UC(L' '), UC(L' '), UC(L' '), UC(L' '), UC(L'‑'), ________, -___xx___, ________, ________, ________, ________, ________, ________, RESET, ________, ________, ________, ________, ________, ________, ________ -) - -}; - -void matrix_init_user(){ - set_unicode_input_mode(UC_LNX); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch(keycode) { - case QWERTZ: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWZ); - } - return false; - break; - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWY); - } - return false; - break; - case GAMING: - if (record->event.pressed) { - set_single_persistent_default_layer(_GAM); - } - return false; - break; - case UNI_LNX: - set_unicode_input_mode(UC_LNX); - return false; - break; - case UNI_WIN: - set_unicode_input_mode(UC_WINC); - return false; - break; - case UNI_MAC: - set_unicode_input_mode(UC_OSX); - return false; - break; - } - return true; -} diff --git a/keyboards/xd75/keymaps/markus/rules.mk b/keyboards/xd75/keymaps/markus/rules.mk deleted file mode 100644 index 22befc534..000000000 --- a/keyboards/xd75/keymaps/markus/rules.mk +++ /dev/null @@ -1,13 +0,0 @@ -BOOTMAGIC_ENABLE = no -MOUSEKEY_ENABLE = yes -EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = no -COMMAND_ENABLE = no -NKRO_ENABLE = yes -BACKLIGHT_ENABLE = no -MIDI_ENABLE = no -AUDIO_ENABLE = no -UNICODE_ENABLE = yes -BLUETOOTH_ENABLE = no -RGBLIGHT_ENABLE = yes -SLEEP_LED_ENABLE = no diff --git a/keyboards/xd75/keymaps/pitty/keymap.c b/keyboards/xd75/keymaps/pitty/keymap.c deleted file mode 100644 index 955ae59ed..000000000 --- a/keyboards/xd75/keymaps/pitty/keymap.c +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright 2017 Wunder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H -#include "keymap_hungarian.h" - -enum XD75_layers { - _QWERTY, - _GAME, - _LOWER, - _RAISE -}; - - -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QWERTY = SAFE_RANGE, - GAME, - LOWER, - RAISE, -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - -/* Qwerty - * ,--------------------------------------------------------------------------------------------------------. - * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö | Ü | Ó | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | TAB | Q | W | E | R | T | Z | U | I | O | P | Ő | Ú | | | - * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | É | Á | Ű | | | - * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| - * | Shift| Y | X | C | V | B | N | M | , | . | - | Shift| | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | ALt |Lower | Space | Enter| Bksp |AltGr | Raise| | | | | | - * `--------------------------------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT_ortho_5x15( \ - HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, HU_OO, KC_INS, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, HU_UU, KC_DEL, KC_PGDN, \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, HU_UEE, _______, KC_HOME, \ - MT(MOD_LSFT, KC_NUBS), HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, HU_EQL, KC_UP, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_SPC, _______, KC_ENT, KC_BSPC, KC_RALT, TT(_RAISE), _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \ -), - - -/* Game - * ,--------------------------------------------------------------------------------------------------------. - * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö | Ü | Ó | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | TAB | Q | W | E | R | T | Z | U | I | O | P | Ő | Ú | | | - * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | É | Á | Ű | | | - * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| - * | Shift| Y | X | C | V | B | N | M | , | . | - | Shift| | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | ALt |Raise | Space | Enter| Bksp |AltGr | Lower| | | | | | - * `--------------------------------------------------------------------------------------------------------' - */ -[_GAME] = LAYOUT_ortho_5x15( \ - HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_OE, HU_UE, HU_OO, KC_INS, KC_PGUP, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_OEE, HU_UU, KC_DEL, KC_PGDN, \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EE, HU_AA, HU_UEE, _______, KC_HOME, \ - KC_LSFT, HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, HU_EQL, KC_UP, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, TT(_RAISE), KC_SPC, _______, KC_ENT, KC_BSPC, KC_RALT, TT(_LOWER), _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \ -), - - -/* Lower - * ,--------------------------------------------------------------------------------------------------------. - * | | | | | | | | 7 | 8 | 9 | + | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | Up | | | | | 4 | 5 | 6 | - | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| - * | | Left | Down | Right| | | | 1 | 2 | 3 | * | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| - * | | | |Lnxcpy|Lnxpst| | | 0 | | | / | = | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Home |PageDn|PageUp| End | | | | - * `--------------------------------------------------------------------------------------------------------' - */ -[_LOWER] = LAYOUT_ortho_5x15( \ - _______, _______, _______, _______, _______, _______, _______, HU_7, HU_8, HU_9, HU_PLUS, _______, _______, _______, _______, \ - _______, _______, KC_UP, _______, _______, _______, _______, HU_4, HU_5, HU_6, HU_MINS, _______, _______, _______, _______, \ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, HU_1, HU_2, HU_3, HU_ASTR, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, HU_0, _______, _______, HU_SLSH, HU_EQL, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAME), TO(_QWERTY), _______, _______, _______ \ -), - -/* Raise - * ,--------------------------------------------------------------------------------------------------------. - * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | Up | | | | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| - * | | Left | Down | Right| | | | | | | | | | | | - * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Home |PageDn|PageUp| End | | | | - * `--------------------------------------------------------------------------------------------------------' - */ -[_RAISE] = LAYOUT_ortho_5x15( \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ - _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAME), TO(_QWERTY), _______, _______, _______ \ -), - - - -}; - - - -layer_state_t layer_state_set_user(layer_state_t state) { - switch (get_highest_layer(state)) { - case _RAISE: - rgblight_setrgb (0xC3, 0xFF, 0xFF); - rgblight_mode(5); - break; - case _LOWER: - rgblight_setrgb (0xFF, 0xFF, 0xFF); - rgblight_mode(5); - break; - case _GAME: - rgblight_mode(8); - break; - default: // for any other layers, or the default layer - rgblight_mode(14); - break; - } - return state; -} diff --git a/keyboards/xd75/keymaps/revok75/rules.mk b/keyboards/xd75/keymaps/revok75/rules.mk deleted file mode 100644 index 21ba8f74b..000000000 --- a/keyboards/xd75/keymaps/revok75/rules.mk +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2013 Jun Wako -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -BOOTMAGIC_ENABLE = full -BACKLIGHT_ENABLE = yes -RGBLIGHT_ENABLE = yes diff --git a/keyboards/xd75/keymaps/scheiklp/rules.mk b/keyboards/xd75/keymaps/scheiklp/rules.mk deleted file mode 100644 index 6e07de471..000000000 --- a/keyboards/xd75/keymaps/scheiklp/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = no -RGBLIGHT_ENABLE = no -DYNAMIC_MACRO_ENABLE = yes -AUTO_SHIFT_ENABLE = yes -KEY_LOCK_ENABLE = yes diff --git a/keyboards/xd75/keymaps/skewwhiffy/keymap.c b/keyboards/xd75/keymaps/skewwhiffy/keymap.c deleted file mode 100644 index ab0213862..000000000 --- a/keyboards/xd75/keymaps/skewwhiffy/keymap.c +++ /dev/null @@ -1,233 +0,0 @@ -/* Copyright 2017 Kenny Hung - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H -#include "keymap_uk.h" - -// Layer shorthand -enum Layers { - cm, // colemak - dv, // dvorak - qw, // qwerty - nbl, // numbers left - nbr, // numbers right - syl, // symbols left - syr, // symbols right - nal, // navigation left - nar // navigation right -}; - -// Layer buttons -#define _Z_SFT SFT_T(UK_Z) -#define _SCLSH SFT_T(UK_SCLN) -#define _SLSH SFT_T(UK_SLSH) - -#define _X_NB LT(nbl, UK_X) -#define _Q_NB LT(nbl, UK_Q) -#define _DOT_NB LT(nbr, UK_DOT) -#define _V_NB LT(nbr, UK_V) -#define __NBL LT(nbl, _______) -#define __NBR LT(nbr, _______) - -#define _C_SY LT(syl, UK_C) -#define _J_SY LT(syl, UK_J) -#define _W_SY LT(syr, UK_W) -#define _COM_SY LT(syr, UK_COMM) -#define __SYL LT(syl, _______) -#define __SYR LT(syr, _______) - -#define _V_NAL LT(nal, UK_V) -#define _K_NAL LT(nal, UK_K) -#define _M_NAR LT(nar, UK_M) -#define __NAL LT(nal, _______) -#define __NAR LT(nar, _______) - -// Custom hotkeys -#define _TERM LCTL(UK_QUOT) // Hotkey for terminal -#define _S_TAB S(UK_TAB) -#define _C_LEFT LCTL(UK_LEFT) -#define _C_RGHT LCTL(UK_RGHT) -#define _A_LEFT LALT(UK_LEFT) -#define _A_RGHT LALT(UK_RGHT) - -enum custom_keycodes { - IJ_OMN = SAFE_RANGE // IntelliJ Omnibox -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Colemak - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | Q | W | F | P | G | | | | | | J | L | U | Y | ; | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | A | R | S | T | D | | | | | | H | N | E | I | O | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | Z | X | C | V | B | | | UP | | | K | M | , | . | / | - * | SHIFT | NUMBER | SYMBOL | NAV | | | | | | | | NAV | SYMBOL | FUNC | SHIFT | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | LSHIFT | LCTRL | LALT | LGUI | SPACE | ENT | LEFT | DOWN | RIGHT | DEL | BKSPC | RGUI | RALT | RCTRL | RSHIFT | - * .--------------------------------------------------------------------------------------------------------------------------------------. - */ - [cm] = LAYOUT_ortho_5x15( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - UK_Q, UK_W, UK_F, UK_P, UK_G, _______, _______, _______, _______, _______, UK_J, UK_L, UK_U, UK_Y, UK_SCLN, \ - UK_A, UK_R, UK_S, UK_T, UK_D, _______, _______, _______, _______, _______, UK_H, UK_N, UK_E, UK_I, UK_O , \ - _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, UK_UP, _______, _______, UK_K, _M_NAR, _COM_SY, _DOT_NB, _SLSH , \ - UK_LSFT, UK_LCTL, UK_LALT, UK_LGUI, UK_SPC, UK_ENT, UK_LEFT, UK_DOWN, UK_RGHT, UK_DEL, UK_BSPC, UK_RGUI, UK_RALT, UK_RCTL, UK_RSFT \ - ), - -/* Dvorak - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | ' | , | . | P | Y | | | | | | F | G | C | R | L | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | A | O | E | U | I | | | | | | D | H | T | N | S | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | ; | Q | J | K | X | | | | | | B | M | W | V | Z | - * | SHIFT | NUMBER | SYMBOL | NAV | | | | | | | | NAV | SYMBOL | FUNC | SHIFT | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | | | | | | | | | | | | | | | | - * |--------------------------------------------------------------------------------------------------------------------------------------| - */ - [dv] = LAYOUT_ortho_5x15( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - UK_QUOT, UK_COMM, UK_DOT, UK_P, UK_Y, _______, _______, _______, _______, _______, UK_F, UK_G, UK_C, UK_R, UK_L , \ - UK_A, UK_O, UK_E, UK_U, UK_I, _______, _______, _______, _______, _______, UK_D, UK_H, UK_T, UK_N, UK_S , \ - _SCLSH, _Q_NB, _J_SY, _K_NAL, UK_X, _______, _______, _______, _______, _______, UK_B, _M_NAR, _W_SY, _V_NB, _Z_SFT , \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - -/* QWERTY _QW - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | Q | W | E | R | T | | | | | | Y | U | I | O | P | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | A | S | D | F | G | | | | | | H | J | K | L | ; | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | Z | X | C | V | B | | | | | | N | M | , | . | / | - * | SHIFT | NUMBER | SYMBOL | NAV | | | | | | | | NAV | SYMBOL | FUNC | SHIFT | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | | | | | | | | | | | | | | | | - * |--------------------------------------------------------------------------------------------------------------------------------------| - * | LSHIFT | LCTRL | LALT | LGUI | SPACE | ENT | | | | DEL | BKSPC | RGUI | RALT | RCTRL | RSHIFT | - * .--------------------------------------------------------------------------------------------------------------------------------------. - */ - [qw] = LAYOUT_ortho_5x15( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - UK_Q, UK_W, UK_E, UK_R, UK_T, _______, _______, _______, _______, _______, UK_Y, UK_U, UK_I, UK_O, UK_P , \ - UK_A, UK_S, UK_D, UK_F, UK_G, _______, _______, _______, _______, _______, UK_H, UK_J, UK_K, UK_L, UK_SCLN, \ - _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, _______, _______, _______, UK_N, _M_NAR, _COM_SY, _DOT_NB, _SLSH , \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - -/* Numbers _NB - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | F7 | F8 | F9 | F10 | | | | | | | 7 | 8 | 9 | | - * |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | F4 | F5 | F6 | F11 | | | | | | | 4 | 5 | 6 | | - * |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | | F1 | F2 | F3 | F12 | | | | | | 0 | 1 | 2 | 3 | . | - * |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | | | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - [nbl] = LAYOUT_ortho_5x15( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, _______, _______, _______, UK_7, UK_8, UK_9, _______, \ - _______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, _______, _______, _______, UK_4, UK_5, UK_6, _______, \ - _______, __NBL, UK_F2, UK_F3, UK_F12, _______, _______, _______, _______, _______, UK_0, UK_1, UK_2, UK_3, UK_DOT, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - [nbr] = LAYOUT_ortho_5x15( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, _______, _______, _______, UK_7, UK_8, UK_9, _______, \ - _______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, _______, _______, _______, UK_4, UK_5, UK_6, _______, \ - _______, UK_F1, UK_F2, UK_F3, UK_F12, _______, _______, _______, _______, _______, UK_0, UK_1, UK_2, __NBR, UK_DOT , \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - - /* Symbols _SY - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | ! | £ | _ | - | ~ | | | | | | \ | { | } | / | # | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | $ | % | + | = | | | | | | | " | ( | ) | ' | @ | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | ^ | & | * | | | | | | | | | < | [ | ] | > | ` | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - [syl] = LAYOUT_ortho_5x15( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, _______, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, \ - UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT , \ - UK_CIRC, UK_AMPR, __SYL, UK_PIPE, _______, _______, _______, _______, _______, _______, UK_LABK, UK_LBRC, UK_RBRC, UK_RABK, UK_GRV , \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - [syr] = LAYOUT_ortho_5x15( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, _______, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, \ - UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT , \ - UK_CIRC, UK_AMPR, UK_ASTR, UK_PIPE, _______, _______, _______, _______, _______, _______, UK_LABK, UK_LBRC, __SYR, UK_RABK, UK_GRV , \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), -/* - * Navigation _NA - * .--------------------------------------------------------------------------------------------------------------------------------------. - * | RESET | COLEMA | DVORAK | QWERTY | | RGB_TG | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | Esc | Ctrl L | Up | Ctrl R | | RGB HD | RGB HI | | | | | PtSn | ScLk | Pause | | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | Tab | Left | Down | Right | | RGB SD | RGB SI | | | | | Insert | Home | PgUp | Term | - * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | ShTab | Alt L | Shift | Alt R | | RGB VD | RGB VI | | | | | ScLk | End | PgDn | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | RGB RMD| RGB MD | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - [nal] = LAYOUT_ortho_5x15( \ - RESET, DF(cm), DF(dv), DF(qw), _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - UK_ESC, _C_LEFT, UK_UP , _C_RGHT, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, UK_PSCR, UK_SLCK, UK_PAUS, _______, \ - UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, UK_INS, UK_HOME, UK_PGUP, _TERM , \ - _S_TAB, _A_LEFT, IJ_OMN, __NAL, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, UK_SLCK, UK_END, UK_PGDN, _______, \ - _______, _______, _______, _______, _______, RGB_RMOD,RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ \ - ), - [nar] = LAYOUT_ortho_5x15( \ - RESET, DF(cm), DF(dv), DF(qw), _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - UK_ESC, _C_LEFT, UK_UP , _C_RGHT, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, UK_PSCR, UK_SLCK, UK_PAUS, _______, \ - UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, UK_INS, UK_HOME, UK_PGUP, _TERM , \ - _S_TAB, _A_LEFT, IJ_OMN, _A_RGHT, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, __NAR, UK_END, UK_PGDN, _______, \ - _______, _______, _______, _______, _______, RGB_RMOD,RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ \ - ) -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - switch(keycode) { - case IJ_OMN: - SEND_STRING(SS_TAP(X_LSHIFT)SS_TAP(X_LSHIFT)); - return false; - } - } - return true; -} diff --git a/keyboards/xd75/keymaps/tdl-jturner/keymap.c b/keyboards/xd75/keymaps/tdl-jturner/keymap.c deleted file mode 100644 index 0c51289b6..000000000 --- a/keyboards/xd75/keymaps/tdl-jturner/keymap.c +++ /dev/null @@ -1,312 +0,0 @@ -/* Copyright 2018 Josh Turner (/u/tdl-jturner) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public 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 xd75_layers { - _QWERTY, - _COLEMAK, - _LYMD, - _LYFK, - _LYMED, - _LYNUM, - _LYNAV, - _LYMOS, - _LYSYS, - _LYLT -}; - -enum xd75_keycodes { - HELP = SAFE_RANGE, - KC_BSDEL, - KC_FBSLH, - KC_DOTQ, - KC_CPIPE, - COLEMAK, - QWERTY, - KC_LYDEF -}; - -//Tap Dance Declarations -enum { - TD_LOCK_SLEEP, - TD_ABK, - TD_BRC, - TD_CBR, -}; - -//Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - //Tap once for Esc, twice for Caps Lock - [TD_LOCK_SLEEP] = ACTION_TAP_DANCE_DOUBLE(LGUI(KC_L), KC_SLEP), - [TD_ABK] = ACTION_TAP_DANCE_DOUBLE(KC_LABK,KC_RABK), - [TD_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC,KC_RBRC), - [TD_CBR] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR,KC_RCBR) -// Other declarations would go here, separated by commas, if you have them -}; - -//remaps for pretty layouts -#define ________ KC_TRNS -#define ___XX___ KC_NO - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - //QWERY - Base Layer - [_QWERTY] = LAYOUT_ortho_5x15( - KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,________ ,________,________, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINUS, - KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T ,________ ,________,________, KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_BSDEL, //Custom shift Codes. Backspace ^ Delete -LT(_LYMD,KC_ESC), KC_A , KC_S , KC_D , KC_F , KC_G ,________ ,________,________, KC_H , KC_J , KC_K , KC_L ,KC_SCLN ,KC_QUOT, - KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B ,________ ,________,________, KC_N , KC_M ,KC_CPIPE,KC_DOTQ ,KC_FBSLH,KC_RSPC, // Custom Shift Codes. ,^| .^? /^| - KC_MEH ,KC_LCTL ,KC_LGUI ,KC_LALT ,MO(_LYNUM), KC_SPC ,________ ,________,________, KC_ENT ,MO(_LYNAV),TD(TD_CBR) ,TD(TD_BRC),TD(TD_ABK),TD(TD_LOCK_SLEEP) - - ), - - //_COLEMAK - Colemak Layout - Identical to qwerty layer except for the layout changes - [_COLEMAK] = LAYOUT_ortho_5x15( - KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,________ ,________,________, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINUS, - KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G ,________ ,________,________, KC_J , KC_L , KC_U , KC_Y ,KC_SCLN ,KC_BSDEL, //Custom shift Codes. Backspace ^ Delete -LT(_LYMD,KC_ESC), KC_A , KC_R , KC_S , KC_T , KC_D ,________ ,________,________, KC_H , KC_N , KC_E , KC_I , KC_O ,KC_QUOT, - KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B ,________ ,________,________, KC_K , KC_M ,KC_CPIPE,KC_DOTQ ,KC_FBSLH,KC_RSPC, // Custom Shift Codes. ,^| .^? /^| - KC_MEH ,KC_LCTL ,KC_LGUI ,KC_LALT ,MO(_LYNUM), KC_SPC ,________ ,________,________, KC_ENT ,MO(_LYNAV),TD(TD_CBR) ,TD(TD_BRC),TD(TD_ABK),TD(TD_LOCK_SLEEP) - - ), - - // Decision Layer - [_LYMD] = - LAYOUT_ortho_5x15( - ________,________ ,________ ,________ ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, - ________,MO(_LYFK) ,MO(_LYMED),________ ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,________, - ________,MO(_LYNUM),MO(_LYNAV),________ ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, - ________,MO(_LYMOS),MO(_LYSYS),MO(_LYLT) ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, - ________,________ ,________ ,________ ,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___ - ), - - //F Keys - [_LYFK] = - LAYOUT_ortho_5x15( - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, - KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_F7 ,KC_F8 ,KC_F9 ,KC_F12 ,________, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_F4 ,KC_F5 ,KC_F6 ,KC_F11 ,___XX___, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_F1 ,KC_F2 ,KC_F3 ,KC_F10 ,___XX___, - ________,________,________,________,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___ - ), -//Media Keys -[_LYMED] = - LAYOUT_ortho_5x15( - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, - KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_VOLU ,___XX___,___XX___,________, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_MPRV ,KC_MUTE ,KC_MNXT ,___XX___,___XX___, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_VOLD ,___XX___,KC_MSTP ,___XX___, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_MPLY ,___XX___,___XX___,___XX___,___XX___ - ), -//Num Keys -[_LYNUM] = - LAYOUT_ortho_5x15( - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_PEQL ,KC_PSLS ,KC_PAST ,KC_PMNS ,___XX___, - KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_7 ,KC_8 ,KC_9 ,KC_MINUS,________, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_4 ,KC_5 ,KC_6 ,KC_PPLS ,KC_PSLS, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_1 ,KC_2 ,KC_3 ,KC_PENT ,KC_PAST, - ________,________,________,________,________,________,________,________,________,________,KC_0 ,KC_0 ,KC_PDOT ,KC_PEQL ,___XX___ - ), -//Navigation Keys -[_LYNAV] = - LAYOUT_ortho_5x15( - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, - KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_HOME ,KC_UP ,KC_PGUP ,KC_PSCR ,________, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_LEFT ,KC_F5 ,KC_RIGHT,KC_SLCK ,___XX___, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_END ,KC_DOWN ,KC_PGDN ,KC_PAUS ,___XX___, - ________,________,________,________,________,________,________,________,________,________,________,KC_INS ,KC_DEL ,___XX___,___XX___ - ), - //Mouse Keys - [_LYMOS] = - LAYOUT_ortho_5x15( - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, - KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_MS_U ,KC_WH_U ,KC_ACL2 ,________, - _______,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_MS_L ,KC_ACL0 ,KC_MS_R ,KC_ACL1 ,___XX___, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_MS_D ,KC_WH_D ,KC_BTN2 ,___XX___, - ________,________,________,________,________,________,________,________,________,________,KC_BTN1 ,KC_BTN3 ,KC_BTN4 ,___XX___,___XX___ - ), - //Systen Keys - [_LYSYS] = - LAYOUT_ortho_5x15( - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, - KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,________, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,QWERTY ,COLEMAK ,___XX___,RESET, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, - ________,________,________,________,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___ - ), - -// Light Control -[_LYLT] = - LAYOUT_ortho_5x15( - ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, - KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,RGB_HUD ,RGB_HUI ,RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,RGB_TOG ,RGB_RMOD,RGB_MOD ,___XX___,___XX___,___XX___, - ________,________,________,________,________,________,___XX___,___XX___,___XX___,BL_TOGG ,BL_DEC ,BL_INC ,BL_BRTG ,___XX___,___XX___, - ________,________,________,________,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___ - ) -}; - -//Define layer colors -#define rgblight_setrgb_user_base() rgblight_sethsv(325,255,255) -#define rgblight_setrgb_user_LYFK() rgblight_sethsv_red() -#define rgblight_setrgb_user_LYMED() rgblight_sethsv_blue() -#define rgblight_setrgb_user_LYNUM() rgblight_sethsv_purple() -#define rgblight_setrgb_user_LYNAV() rgblight_sethsv_cyan() -#define rgblight_setrgb_user_LYMOS() rgblight_sethsv_orange() -#define rgblight_setrgb_user_LYSYS() rgblight_sethsv_green() -#define rgblight_setrgb_user_LYLT() rgblight_sethsv_yellow() -#define rgblight_setrgb_user_LYMD() rgblight_sethsv_white() - -//initialize rgb -void matrix_init_user(void) { - rgblight_enable(); - rgblight_mode(1); - rgblight_setrgb_user_base(); -} - -//Set a color based on the layer -uint32_t layer_state_set_user(uint32_t state) { - switch(biton32(state)) { - case _LYFK: - rgblight_setrgb_user_LYFK(); - break; - case _LYMED: - rgblight_setrgb_user_LYMED(); - break; - case _LYNUM: - rgblight_setrgb_user_LYNUM(); - break; - case _LYNAV: - rgblight_setrgb_user_LYNAV(); - break; - case _LYMOS: - rgblight_setrgb_user_LYMOS(); - break; - case _LYSYS: - rgblight_setrgb_user_LYSYS(); - break; - case _LYLT: - rgblight_setrgb_user_LYLT(); - break; - case _LYMD: - rgblight_setrgb_user_LYMD(); - break; - default: - rgblight_setrgb_user_base(); - break; - } - return state; -} - - -//Const for shift -const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - - switch(keycode) { - case KC_LYDEF: - layer_clear(); - return false; - break; - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case KC_BSDEL: - if (record->event.pressed) { - if (keyboard_report->mods & shift) { - if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { - unregister_code(KC_LSHIFT); - } - else { - unregister_code(KC_RSHIFT); - } - register_code(KC_DEL); - } - else { - register_code(KC_BSPC); - } - } - else { - unregister_code(KC_DEL); - unregister_code (KC_BSPC); - } - return false; - break; - case KC_FBSLH: - if (record->event.pressed) { - if (keyboard_report->mods & shift) { - if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { - unregister_code(KC_LSHIFT); - } - else { - unregister_code(KC_RSHIFT); - } - register_code(KC_BSLASH); - } - else { - register_code(KC_SLSH); - } - } - else { - unregister_code(KC_BSLASH); - unregister_code (KC_SLSH); - } - return false; - break; - case KC_DOTQ: - if (record->event.pressed) { - if (keyboard_report->mods & shift) { - register_code(KC_SLSH); // shifted slash = ? - } - else { - register_code(KC_DOT); - } - } - else { - unregister_code(KC_SLSH); // shifted slash = ? - unregister_code (KC_DOT); - } - return false; - break; - case KC_CPIPE: - if (record->event.pressed) { - if (keyboard_report->mods & shift) { - register_code(KC_BSLS); - } - else { - register_code(KC_COMM); - } - } - else { - unregister_code(KC_BSLS); - unregister_code (KC_COMM); - } - return false; - break; - } - return true; -}; diff --git a/keyboards/xd75/readme.md b/keyboards/xd75/readme.md deleted file mode 100644 index 65da5cc02..000000000 --- a/keyboards/xd75/readme.md +++ /dev/null @@ -1,57 +0,0 @@ -# XD75 - -![XD75](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB1MzOISXXXXXXgXpXXq6xXFXXXO_1024x1024.jpg) - -The XD75 is a 15x5 full-grid ortholinear keyboard manufactured by XIUDI. Available in two different versions: XD75Re with hot swap switch sockets and XD75Am with Alps+MX Stem support that needs soldering. - -This port of the QMK firmware is my first shot at using QMK, so if you see any features done wrong (or just plain missing), feel free to fix them and put in a pull request! - -* Keyboard Maintainer: [The QMK Community](https://github.com/qmk) -* Hardware Supported: XD75Re, XD75Am -* Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd75re-xd75am-xd75-xiudi-60-custom-keyboard-pcb), [AliExpress](https://www.aliexpress.com/item/xd75re-Custom-Mechanical-Keyboard-75-keys-TKG-TOOLS-Underglow-RGB-PCB-GH60-60-programmed-gh60-kle/32818745981.html) - -Make example for this keyboard (after setting up your build environment): - - make xd75:default - -Flashing example for this keyboard: - - make xd75: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). - -## LED Control - -There are 3 individual LEDs that can be turned on and off. The functions are named according to how they're labeled on the PCB. - -TODO: it would be nice to have PWM support on these LEDs for fade-in/fade-out effects. - -```c -capslock_led_on(); -gp100_led_on(); -gp103_led_on(); - -bool led_update_user(led_t led_state) { - if (led_state.caps_lock) { - capslock_led_on(); - } else { - capslock_led_off(); - } - - if (some_custom_state) { - gp100_led_on(); - } else { - gp100_led_off(); - } - - return false; -} -``` - -For the curious: - -``` -CAPSLOCK_LED B2 -GP103_LED F4 -GP100_LED F7 -``` diff --git a/keyboards/xd75/rules.mk b/keyboards/xd75/rules.mk deleted file mode 100644 index 97d0f379f..000000000 --- a/keyboards/xd75/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output - -LAYOUTS = ortho_5x15 diff --git a/keyboards/xd84/config.h b/keyboards/xd84/config.h deleted file mode 100644 index 5253848e8..000000000 --- a/keyboards/xd84/config.h +++ /dev/null @@ -1,211 +0,0 @@ -/* Copyright 2019 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x7844 // "XD" -#define PRODUCT_ID 0x8484 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPrepublic -#define PRODUCT XD84 - -/* key matrix size */ -#define MATRIX_ROWS 6 -#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, D5 } -//#define MATRIX_COL_PINS { F1, F0, B0 } -//#define UNUSED_PINS - -/* COL2ROW, ROW2COL */ -//#define DIODE_DIRECTION COL2ROW - -#define LED_CAPS_LOCK_PIN B6 -#define LED_PIN_ON_STATE 0 - -#define BACKLIGHT_PIN B5 -#define BACKLIGHT_LEVELS 10 -#define BACKLIGHT_ON_STATE 0 -// #define BACKLIGHT_BREATHING - -#define RGB_DI_PIN C7 -#define RGBLED_NUM 7 -#define RGBLIGHT_ANIMATIONS -// #ifdef RGB_DI_PIN -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 -// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -// /*== all animations enable ==*/ -// #define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ -// #define RGBLIGHT_EFFECT_BREATHING -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL -// #define RGBLIGHT_EFFECT_SNAKE -// #define RGBLIGHT_EFFECT_KNIGHT -// #define RGBLIGHT_EFFECT_CHRISTMAS -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -// #endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -/* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - -/* Bootmagic Lite key configuration */ -// #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/xd84/readme.md b/keyboards/xd84/readme.md deleted file mode 100644 index b8d9c5dbb..000000000 --- a/keyboards/xd84/readme.md +++ /dev/null @@ -1,23 +0,0 @@ -# XD84 - -![XD84](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB17eeJSXXXXXbIXFXXq6xXFXXXp_1024x1024.jpg?v=1515505994) - -Keyboard with 84 Keys & RGB LED Underglow -- Designed by Xiudi -- Up to 87 keys - - iso and ansi support -- Uses Kimera core - -Keyboard Maintainer: QMK Community -Hardware Supported: XD84 -Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd84-xiudi-70-custom-keyboard-pcb) - -Make example for this keyboard (after setting up your build environment): - - make xd84:default - -Install examples: - - make xd84:default:dfu - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xd84/rules.mk b/keyboards/xd84/rules.mk deleted file mode 100644 index 3ec65b8ec..000000000 --- a/keyboards/xd84/rules.mk +++ /dev/null @@ -1,41 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -LTO_ENABLE = yes - -# custom matrix setup -CUSTOM_MATRIX = lite - -VPATH += drivers/gpio -SRC += pca9555.c matrix.c -QUANTUM_LIB_SRC += i2c_master.c - -LAYOUTS = 75_ansi 75_iso diff --git a/keyboards/xd84pro/readme.md b/keyboards/xd84pro/readme.md deleted file mode 100644 index 76e83c6c5..000000000 --- a/keyboards/xd84pro/readme.md +++ /dev/null @@ -1,24 +0,0 @@ -# XD84 Pro - -![XD84 Pro](https://cdn.shopify.com/s/files/1/2711/4238/products/Hf5d4a9571a524cb78870def7403f5acc5.jpg?v=1574416288) - -Keyboard with 84 Keys, RGB LED Underglow, and USB-C Connection -- Designed by Xiudi -- Up to 87 keys - - iso and ansi support - -The silkscreen printing on the PCB refers to this as the "XD84 v2.0". - -* Keyboard Maintainer: QMK Community -* Hardware Supported: XD84 Pro -* Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd84pro-xd84-pro-custom-mechanical-keyboard-kit-75-supports-tkg-tools-support-underglow-rgb-pcb-programmed-gh84-kle-type-c) - -Make example for this keyboard (after setting up your build environment): - - make xd84pro:default - -Flashing example for this keyboard: - - make xd84pro:default:flash - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xd84pro/rules.mk b/keyboards/xd84pro/rules.mk deleted file mode 100644 index 1c94b3a76..000000000 --- a/keyboards/xd84pro/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# 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 = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth -AUDIO_ENABLE = no # Audio output - -LAYOUTS = 75_ansi 75_iso diff --git a/keyboards/xd87/config.h b/keyboards/xd87/config.h deleted file mode 100644 index aa07e3225..000000000 --- a/keyboards/xd87/config.h +++ /dev/null @@ -1,193 +0,0 @@ -/* -Copyright 2018 Alexander Fougner - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x7844 // "XD" -#define PRODUCT_ID 0x8787 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KP Republic -#define PRODUCT XD87 TKL - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 17 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ - -#define MATRIX_ROW_PINS { D1, B0, B1, C7, D3, D5 } - -#define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B5, B6, C6, D4, D6, D7, B4, B2, B3, D2 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -#define LED_CAPS_LOCK_PIN E2 -#define LED_PIN_ON_STATE 0 - -#define BACKLIGHT_PIN D0 -// #define BACKLIGHT_BREATHING -#define BACKLIGHT_LEVELS 3 -#define BACKLIGHT_ON_STATE 0 - -#define RGB_DI_PIN B7 -#ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 14 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/xd87/keymaps/default_underglow/rules.mk b/keyboards/xd87/keymaps/default_underglow/rules.mk deleted file mode 100755 index 5cf1edf60..000000000 --- a/keyboards/xd87/keymaps/default_underglow/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -BOOTMAGIC_ENABLE = lite -COMMAND_ENABLE = no -RGBLIGHT_ENABLE = yes diff --git a/keyboards/xd87/keymaps/mac_underglow/rules.mk b/keyboards/xd87/keymaps/mac_underglow/rules.mk deleted file mode 100755 index 5cf1edf60..000000000 --- a/keyboards/xd87/keymaps/mac_underglow/rules.mk +++ /dev/null @@ -1,3 +0,0 @@ -BOOTMAGIC_ENABLE = lite -COMMAND_ENABLE = no -RGBLIGHT_ENABLE = yes diff --git a/keyboards/xd87/readme.md b/keyboards/xd87/readme.md deleted file mode 100644 index 0b9389740..000000000 --- a/keyboards/xd87/readme.md +++ /dev/null @@ -1,26 +0,0 @@ -# XD87 - -![XD87](https://i.imgur.com/qVyOies.jpg) - - -- Keyboard Maintainer: [Alexander Fougner](https://github.com/fougner) -- Hardware Supported: XD87 PCB v1.1 -- Hardware Availability: - - [KPrepublic.com](https://kprepublic.com/products/xd87-xd87-xd80-custom-mechanical-keyboard-kit80-supports-tkg-tools-support-underglow-rgb-pcb-programmed-gh80-kle) - - [AliExpress](https://www.aliexpress.com/item/xd87-XD87-XD80-Custom-Mechanical-Keyboard-Kit80-Supports-TKG-TOOLS-Support-Underglow-RGB-PCB-programmed-gh80/32892540743.html) - -Make example for this keyboard (after setting up your build environment): - - make xd87:default - -It also supports the tkl_ansi and tkl_iso community layouts: - - # Build firmware with ANSI layout - make xd87:default_tkl_ansi - # Build firmware with ISO layout - make xd87:default_tkl_iso - - -The keyboard can be reset to bootloader by using bootmagic (space+b by default) or short out the small connector between the Delete and End keys. - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/xd87/rules.mk b/keyboards/xd87/rules.mk deleted file mode 100644 index 6d5d8b6da..000000000 --- a/keyboards/xd87/rules.mk +++ /dev/null @@ -1,34 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 - -# Supported layouts -LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/xd96/config.h b/keyboards/xd96/config.h deleted file mode 100644 index d7197d006..000000000 --- a/keyboards/xd96/config.h +++ /dev/null @@ -1,212 +0,0 @@ -/* Copyright 2019 - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x7844 // "XD" -#define PRODUCT_ID 0x9696 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPrepublic -#define PRODUCT XD96 - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 18 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -//#define MATRIX_ROW_PINS { D0, D5 } -//#define MATRIX_COL_PINS { F1, F0, B0 } -//#define UNUSED_PINS - -/* COL2ROW, ROW2COL */ -//#define DIODE_DIRECTION COL2ROW - -#define LED_NUM_LOCK_PIN C6 -#define LED_CAPS_LOCK_PIN B6 -#define LED_PIN_ON_STATE 0 - -#define BACKLIGHT_PIN B5 -#define BACKLIGHT_LEVELS 10 -// #define BACKLIGHT_BREATHING - -#define RGB_DI_PIN C7 -#define RGBLED_NUM 16 -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_LIMIT_VAL 50 -// #ifdef RGB_DI_PIN -// #define RGBLIGHT_HUE_STEP 8 -// #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8 -// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ -// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -// /*== all animations enable ==*/ -// #define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ -// #define RGBLIGHT_EFFECT_BREATHING -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL -// #define RGBLIGHT_EFFECT_SNAKE -// #define RGBLIGHT_EFFECT_KNIGHT -// #define RGBLIGHT_EFFECT_CHRISTMAS -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -// #endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is userful for the Windows task manager shortcut (ctrl+shift+esc). - */ -// #define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -/* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - -/* Bootmagic Lite key configuration */ -// #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/xd96/readme.md b/keyboards/xd96/readme.md deleted file mode 100644 index bf01db8bb..000000000 --- a/keyboards/xd96/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -# XD96 - -![XD96](https://cdn.shopify.com/s/files/1/2711/4238/products/xd96_pcb_1024x1024.jpg?v=1515425370) - -Keyboard with 96 Keys & RGB LED Underglow -- Designed by Xiudi -- ISO and ANSI support -- Uses Kimera core - -Keyboard Maintainer: QMK Community -Hardware Supported: XD96 -Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd96-pcb-90-custom-mechanical-keyboard-supports-tkg-tools-underglow-rgb-programmed); [AliExpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html) - -Make example for this keyboard (after setting up your build environment): - - make xd96:default - -Install examples: - - make xd96:default:dfu - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xd96/rules.mk b/keyboards/xd96/rules.mk deleted file mode 100644 index d880fa65f..000000000 --- a/keyboards/xd96/rules.mk +++ /dev/null @@ -1,39 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = no # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -LTO_ENABLE = yes - -# custom matrix setup -CUSTOM_MATRIX = lite - -VPATH += drivers/gpio -SRC += pca9555.c matrix.c -QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/xelus/akis/rules.mk b/keyboards/xelus/akis/rules.mk index 15a1f59a7..f57d49518 100644 --- a/keyboards/xelus/akis/rules.mk +++ b/keyboards/xelus/akis/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xelus/dawn60/rev1/rules.mk b/keyboards/xelus/dawn60/rev1/rules.mk index 64b6615e8..09971e4bb 100644 --- a/keyboards/xelus/dawn60/rev1/rules.mk +++ b/keyboards/xelus/dawn60/rev1/rules.mk @@ -19,7 +19,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -29,7 +29,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 @@ -42,7 +41,7 @@ CIE1931_CURVE = yes SRC += keyboards/wilba_tech/wt_main.c \ keyboards/wilba_tech/wt_rgb_backlight.c \ quantum/color.c \ - drivers/issi/is31fl3731.c \ + drivers/led/issi/is31fl3731.c \ ws2812.c QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c b/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c index 901f7a18c..c6ddef093 100644 --- a/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c +++ b/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c @@ -18,14 +18,14 @@ #include #include #include -#include "drivers/issi/is31fl3731.h" +#include "drivers/led/issi/is31fl3731.h" #include "ws2812.h" #include "rev1_qmk.h" #ifdef RGB_MATRIX_ENABLE LED_TYPE rgb_matrix_ws2812_array[WS2812_LED_TOTAL]; -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/xelus/dawn60/rev1_qmk/rules.mk b/keyboards/xelus/dawn60/rev1_qmk/rules.mk index edfba2730..595236ad6 100644 --- a/keyboards/xelus/dawn60/rev1_qmk/rules.mk +++ b/keyboards/xelus/dawn60/rev1_qmk/rules.mk @@ -19,7 +19,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -29,7 +29,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 @@ -42,7 +41,7 @@ RGB_MATRIX_DRIVER = custom # Enable RGB matrix effects. COMMON_VPATH += $(DRIVER_PATH)/issi # project specific files -SRC += drivers/issi/is31fl3731.c \ +SRC += drivers/led/issi/is31fl3731.c \ ws2812.c QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/xelus/dharma/rules.mk b/keyboards/xelus/dharma/rules.mk index 32981133b..efca6bac6 100644 --- a/keyboards/xelus/dharma/rules.mk +++ b/keyboards/xelus/dharma/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xelus/kangaroo/rules.mk b/keyboards/xelus/kangaroo/rules.mk index b4b493234..ea66ecdd6 100644 --- a/keyboards/xelus/kangaroo/rules.mk +++ b/keyboards/xelus/kangaroo/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xelus/ninjin/rules.mk b/keyboards/xelus/ninjin/rules.mk index 33e0419e3..b7550aa53 100644 --- a/keyboards/xelus/ninjin/rules.mk +++ b/keyboards/xelus/ninjin/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xelus/pachi/mini_32u4/rules.mk b/keyboards/xelus/pachi/mini_32u4/rules.mk index 32981133b..efca6bac6 100644 --- a/keyboards/xelus/pachi/mini_32u4/rules.mk +++ b/keyboards/xelus/pachi/mini_32u4/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xelus/pachi/rev1/rules.mk b/keyboards/xelus/pachi/rev1/rules.mk index 04ebc638c..469b6207b 100644 --- a/keyboards/xelus/pachi/rev1/rules.mk +++ b/keyboards/xelus/pachi/rev1/rules.mk @@ -10,7 +10,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xelus/pachi/rgb/config.h b/keyboards/xelus/pachi/rgb/config.h index f97650850..9378b2c41 100644 --- a/keyboards/xelus/pachi/rgb/config.h +++ b/keyboards/xelus/pachi/rgb/config.h @@ -70,7 +70,7 @@ #define RGB_MATRIX_STARTUP_VAL 80 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES -#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define FORCE_NKRO diff --git a/keyboards/xelus/pachi/rgb/rgb.c b/keyboards/xelus/pachi/rgb/rgb.c index 1e4ad619c..6f44b13e1 100644 --- a/keyboards/xelus/pachi/rgb/rgb.c +++ b/keyboards/xelus/pachi/rgb/rgb.c @@ -23,8 +23,8 @@ void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } #ifdef RGB_MATRIX_ENABLE #include -#include "drivers/issi/is31fl3741.h" -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +#include "drivers/led/issi/is31fl3741.h" +const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/xelus/pachi/rgb/rules.mk b/keyboards/xelus/pachi/rgb/rules.mk index 42e9d3feb..37bf9937c 100644 --- a/keyboards/xelus/pachi/rgb/rules.mk +++ b/keyboards/xelus/pachi/rgb/rules.mk @@ -1,10 +1,13 @@ # MCU name -MCU = STM32L433 +MCU = STM32L422 + +# Bootloader selection +BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -14,7 +17,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 @@ -26,7 +28,7 @@ RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = custom COMMON_VPATH += $(DRIVER_PATH)/issi -SRC += drivers/issi/is31fl3741.c +SRC += drivers/led/issi/is31fl3741.c LTO_ENABLE = yes OPT = 2 diff --git a/keyboards/xelus/snap96/rules.mk b/keyboards/xelus/snap96/rules.mk index 2c033042b..34c7ebea7 100644 --- a/keyboards/xelus/snap96/rules.mk +++ b/keyboards/xelus/snap96/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,7 +24,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/xelus/trinityxttkl/rules.mk b/keyboards/xelus/trinityxttkl/rules.mk index b12368f15..e6a55577a 100644 --- a/keyboards/xelus/trinityxttkl/rules.mk +++ b/keyboards/xelus/trinityxttkl/rules.mk @@ -11,7 +11,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xelus/valor/rev1/rules.mk b/keyboards/xelus/valor/rev1/rules.mk index ef105495d..575323c29 100644 --- a/keyboards/xelus/valor/rev1/rules.mk +++ b/keyboards/xelus/valor/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xelus/valor/rev2/config.h b/keyboards/xelus/valor/rev2/config.h new file mode 100644 index 000000000..2ab581c75 --- /dev/null +++ b/keyboards/xelus/valor/rev2/config.h @@ -0,0 +1,88 @@ +/* Copyright 2021 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 "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5845 // "XE" +#define PRODUCT_ID 0x5653 // Valor "VR" + 1 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Xelus +#define PRODUCT Xelus Valor Rev2 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B11, B10, A3, A1, A2 } +#define MATRIX_COL_PINS { B2, B1, B0, A7, A6, A5, A4, A13, B7, B6, B5, B4, B3, A15, A14 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +// I2C setup +#define I2C1_SCL 8 +#define I2C1_SDA 9 +#define I2C1_SCL_PAL_MODE 4 +#define I2C1_SDA_PAL_MODE 4 +#define I2C1_TIMINGR_PRESC 0U +#define I2C1_TIMINGR_SCLDEL 11U +#define I2C1_TIMINGR_SDADEL 0U +#define I2C1_TIMINGR_SCLH 14U +#define I2C1_TIMINGR_SCLL 42U + +// I2C EEPROM +#define EEPROM_I2C_24LC64 + +// More EEPROM for layers +#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 8191 + +/* RGB Matrix */ +#define RGB_DI_PIN A9 +#define RGBLED_NUM 28 +#define DRIVER_LED_TOTAL 28 +#define NOP_FUDGE 0.4 + +// RGB PWM +#define WS2812_PWM_DRIVER PWMD1 +#define WS2812_PWM_CHANNEL 2 +#define WS2812_PWM_PAL_MODE 1 +#define WS2812_DMA_STREAM STM32_DMA1_STREAM6 +#define WS2812_DMA_CHANNEL 7 +#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM1_UP + +// RGB Pullup +#define WS2812_EXTERNAL_PULLUP + +// RGB Matrix settings +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 +#define RGB_DISABLE_WHEN_USB_SUSPENDED +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CUSTOM_test_mode diff --git a/keyboards/xelus/valor/rev2/halconf.h b/keyboards/xelus/valor/rev2/halconf.h new file mode 100644 index 000000000..03b15da04 --- /dev/null +++ b/keyboards/xelus/valor/rev2/halconf.h @@ -0,0 +1,23 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 HAL_USE_I2C TRUE + +#define HAL_USE_PWM TRUE + +#include_next + diff --git a/keyboards/xelus/valor/rev2/info.json b/keyboards/xelus/valor/rev2/info.json new file mode 100644 index 000000000..712050ca8 --- /dev/null +++ b/keyboards/xelus/valor/rev2/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "Xelus Valor Rev2", + "url": "", + "maintainer": "Xelus22", + "width": 17.75, + "height": 5, + "layouts": { + "LAYOUT_alice_split_bs": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0}, + {"x":5.25, "y":0}, + {"x":6.25, "y":0}, + {"x":7.25, "y":0}, + {"x":10.25, "y":0}, + {"x":11.25, "y":0}, + {"x":12.25, "y":0}, + {"x":13.25, "y":0}, + {"x":14.25, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + + {"x":0, "y":1}, + {"x":1.25, "y":1, "w":1.5}, + {"x":2.75, "y":1}, + {"x":3.75, "y":1}, + {"x":4.75, "y":1}, + {"x":5.75, "y":1}, + {"x":6.75, "y":1}, + {"x":9.75, "y":1}, + {"x":10.75, "y":1}, + {"x":11.75, "y":1}, + {"x":12.75, "y":1}, + {"x":13.75, "y":1}, + {"x":14.75, "y":1}, + {"x":15.75, "y":1}, + {"x":16.75, "y":1, "w":1.5}, + + {"x":0, "y":2}, + {"x":1.25, "y":2, "w":1.75}, + {"x":3, "y":2}, + {"x":4, "y":2}, + {"x":5, "y":2}, + {"x":6, "y":2}, + {"x":7, "y":2}, + {"x":10, "y":2}, + {"x":11, "y":2}, + {"x":12, "y":2}, + {"x":13, "y":2}, + {"x":14, "y":2}, + {"x":15, "y":2}, + {"x":16, "y":2, "w":2.25}, + + {"x":1.25, "y":3, "w":2.25}, + {"x":3.5, "y":3}, + {"x":4.5, "y":3}, + {"x":5.5, "y":3}, + {"x":6.5, "y":3}, + {"x":7.5, "y":3}, + {"x":9.5, "y":3}, + {"x":10.5, "y":3}, + {"x":11.5, "y":3}, + {"x":12.5, "y":3}, + {"x":13.5, "y":3}, + {"x":14.5, "y":3}, + {"x":15.5, "y":3, "w":1.75}, + {"x":17.25, "y":3}, + + {"x":1.25, "y":4, "w":1.5}, + {"x":4.25, "y":4, "w":1.5}, + {"x":5.75, "y":4, "w":2}, + {"x":7.75, "y":4, "w":1.25}, + {"x":9.5, "y":4, "w":2.75}, + {"x":12.25, "y":4, "w":1.5}, + {"x":16.75, "y":4, "w":1.5} + ] + } + } +} diff --git a/keyboards/xelus/valor/rev2/keymaps/default/config.h b/keyboards/xelus/valor/rev2/keymaps/default/config.h new file mode 100644 index 000000000..824d4633c --- /dev/null +++ b/keyboards/xelus/valor/rev2/keymaps/default/config.h @@ -0,0 +1,18 @@ +/* Copyright 2021 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 . + */ + +#define USB_POLLING_INTERVAL_MS 1 +#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/valor/rev2/keymaps/default/keymap.c b/keyboards/xelus/valor/rev2/keymaps/default/keymap.c new file mode 100644 index 000000000..eb5f55112 --- /dev/null +++ b/keyboards/xelus/valor/rev2/keymaps/default/keymap.c @@ -0,0 +1,79 @@ +/* Copyright 2021 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] = { + [0] = LAYOUT_all( + 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_DEL, KC_BSPC, + KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RGUI, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), + + [1] = LAYOUT_all( + RGB_TOG, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#ifdef RGB_MATRIX_ENABLE +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + // caps lock cyan + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(27, 0, 128, 128); + } else { + RGB_MATRIX_INDICATOR_SET_COLOR(27, 0, 0, 0); + } + + // num lock cyan + if (host_keyboard_led_state().num_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(26, 0, 128, 128); + } else { + RGB_MATRIX_INDICATOR_SET_COLOR(26, 0, 0, 0); + } + + // scroll lock cyan + if (host_keyboard_led_state().scroll_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(25, 0, 128, 128); + } else { + RGB_MATRIX_INDICATOR_SET_COLOR(25, 0, 0, 0); + } + + // layer state + switch (get_highest_layer(layer_state)) { + case 0: + RGB_MATRIX_INDICATOR_SET_COLOR(24, 0, 0, 0); + break; + case 1: + RGB_MATRIX_INDICATOR_SET_COLOR(24, 128, 0, 0); + break; + case 2: + RGB_MATRIX_INDICATOR_SET_COLOR(24, 0, 128, 0); + break; + case 3: + RGB_MATRIX_INDICATOR_SET_COLOR(24, 0, 0, 128); + break; + default: + // white + RGB_MATRIX_INDICATOR_SET_COLOR(24, 128, 128, 128); + break; + } +} +#endif diff --git a/keyboards/xelus/valor/rev2/keymaps/default/readme.md b/keyboards/xelus/valor/rev2/keymaps/default/readme.md new file mode 100644 index 000000000..8648f1c15 --- /dev/null +++ b/keyboards/xelus/valor/rev2/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The Default Valor Rev2 Layout + diff --git a/keyboards/xelus/valor/rev2/keymaps/via/config.h b/keyboards/xelus/valor/rev2/keymaps/via/config.h new file mode 100644 index 000000000..456369d88 --- /dev/null +++ b/keyboards/xelus/valor/rev2/keymaps/via/config.h @@ -0,0 +1,24 @@ +/* Copyright 2021 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 . + */ + +// RGB Matrix +#define VIA_QMK_RGBLIGHT_ENABLE + +// More layers +#define DYNAMIC_KEYMAP_LAYER_COUNT 8 + +#define USB_POLLING_INTERVAL_MS 1 +#define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/xelus/valor/rev2/keymaps/via/keymap.c b/keyboards/xelus/valor/rev2/keymaps/via/keymap.c new file mode 100644 index 000000000..c25665951 --- /dev/null +++ b/keyboards/xelus/valor/rev2/keymaps/via/keymap.c @@ -0,0 +1,127 @@ +/* Copyright 2021 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] = { + [0] = LAYOUT_all( + 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_DEL, KC_BSPC, + KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RGUI, + KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RCTL + ), + + [1] = LAYOUT_all( + RGB_TOG, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [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 + ), + + [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 + ), + + [4] = 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 + ), + + [5] = 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 + ), + + [6] = 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 + ), + + [7] = 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 + ) +}; + +#ifdef RGB_MATRIX_ENABLE +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + // caps lock cyan + if (host_keyboard_led_state().caps_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(27, 0, 128, 128); + } else { + RGB_MATRIX_INDICATOR_SET_COLOR(27, 0, 0, 0); + } + + // num lock cyan + if (host_keyboard_led_state().num_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(26, 0, 128, 128); + } else { + RGB_MATRIX_INDICATOR_SET_COLOR(26, 0, 0, 0); + } + + // scroll lock cyan + if (host_keyboard_led_state().scroll_lock) { + RGB_MATRIX_INDICATOR_SET_COLOR(25, 0, 128, 128); + } else { + RGB_MATRIX_INDICATOR_SET_COLOR(25, 0, 0, 0); + } + + // layer state + switch (get_highest_layer(layer_state)) { + case 0: + RGB_MATRIX_INDICATOR_SET_COLOR(24, 0, 0, 0); + break; + case 1: + RGB_MATRIX_INDICATOR_SET_COLOR(24, 128, 0, 0); + break; + case 2: + RGB_MATRIX_INDICATOR_SET_COLOR(24, 0, 128, 0); + break; + case 3: + RGB_MATRIX_INDICATOR_SET_COLOR(24, 0, 0, 128); + break; + default: + // white + RGB_MATRIX_INDICATOR_SET_COLOR(24, 128, 128, 128); + break; + } +} +#endif diff --git a/keyboards/xelus/valor/rev2/keymaps/via/readme.md b/keyboards/xelus/valor/rev2/keymaps/via/readme.md new file mode 100644 index 000000000..dcdfd4dd9 --- /dev/null +++ b/keyboards/xelus/valor/rev2/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA Valor Rev2 Layout + diff --git a/keyboards/xelus/valor/rev2/keymaps/via/rules.mk b/keyboards/xelus/valor/rev2/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/xelus/valor/rev2/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xelus/valor/rev2/mcuconf.h b/keyboards/xelus/valor/rev2/mcuconf.h new file mode 100644 index 000000000..736837565 --- /dev/null +++ b/keyboards/xelus/valor/rev2/mcuconf.h @@ -0,0 +1,30 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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_next + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM1 +#define STM32_PWM_USE_TIM1 TRUE + +#undef STM32_I2C_I2C1_RX_DMA_STREAM +#undef STM32_I2C_I2C1_TX_DMA_STREAM +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 6) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) diff --git a/keyboards/xelus/valor/rev2/readme.md b/keyboards/xelus/valor/rev2/readme.md new file mode 100644 index 000000000..863f5ef42 --- /dev/null +++ b/keyboards/xelus/valor/rev2/readme.md @@ -0,0 +1,20 @@ +# Valor Rev 2 + +An Alice replacement keyboard PCB. + +* Keyboard Maintainer: [Xelus22](https://github.com/Xelus22) +* Hardware Supported: Valor Rev 2 +* Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make xelus/valor/rev2:default + +Reset your keyboard in 3 ways: +
    +
  1. Software reset on Fn + PgDn (bottom of the 3 macro buttons)
  2. +
  3. Bootmagic reset: hold down the top left key (usually escape) and plugin the keyboard
  4. +
  5. Physical reset button: on the back of the PCB, there should be a small golden button you can press
  6. +
+ +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xelus/valor/rev2/rev2.c b/keyboards/xelus/valor/rev2/rev2.c new file mode 100644 index 000000000..f13041879 --- /dev/null +++ b/keyboards/xelus/valor/rev2/rev2.c @@ -0,0 +1,72 @@ +/* Copyright 2021 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 "rev2.h" + +#ifdef RGB_MATRIX_ENABLE + +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 24, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { 25, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { 26, 27, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, + { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED } +}, { + // LED Index to Physical Position + { 224, 0 }, + { 224, 9 }, + { 224, 21 }, + { 224, 33 }, + { 224, 45 }, + { 223, 51 }, + { 206, 52 }, + { 190, 52 }, + { 172, 52 }, + { 154, 57 }, + { 136, 61 }, + { 118, 63 }, + { 101, 64 }, + { 80 , 60 }, + { 64 , 57 }, + { 46 , 53 }, + { 28 , 53 }, + { 10 , 52 }, + { 3 , 51 }, + { 2 , 45 }, + { 2 , 33 }, + { 2 , 20 }, + { 2 , 9 }, + { 0 , 0 }, + { 9 , 3 }, + { 6 , 14 }, + { 4 , 26 }, + { 21 , 27 } + +}, { + // LED Index to Flag + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, + 8, 8, 8, 8 +} }; + + +void keyboard_pre_init_kb(void) { + rgb_matrix_set_flags(LED_FLAG_MODIFIER|LED_FLAG_UNDERGLOW|LED_FLAG_KEYLIGHT); + keyboard_pre_init_user(); +} +#endif diff --git a/keyboards/xelus/valor/rev2/rev2.h b/keyboards/xelus/valor/rev2/rev2.h new file mode 100644 index 000000000..9cf78c941 --- /dev/null +++ b/keyboards/xelus/valor/rev2/rev2.h @@ -0,0 +1,37 @@ +/* Copyright 2021 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 "quantum.h" + +#define ____ KC_NO + +#define LAYOUT_alice_split_bs( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K214, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K401, K403, K405, K406, K408, K410, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { ____, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { ____, K401, ____, K403, ____, K405, K406, ____, K408, ____, K410, ____, ____, K413, ____ } \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/xelus/valor/rev2/rgb_matrix_kb.inc b/keyboards/xelus/valor/rev2/rgb_matrix_kb.inc new file mode 100644 index 000000000..351840609 --- /dev/null +++ b/keyboards/xelus/valor/rev2/rgb_matrix_kb.inc @@ -0,0 +1,34 @@ +// Step 1. +// Declare custom effects using the RGB_MATRIX_EFFECT macro +// (note the lack of semicolon after the macro!) +RGB_MATRIX_EFFECT(test_mode) + +// Step 2. +// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block +#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +// e.g: A simple effect, self-contained within a single method +static bool test_mode(effect_params_t* params) { + uint8_t factor = 9; + switch ((g_rgb_timer & (0b11 << factor)) >> factor) { + case 0: { + rgb_matrix_set_color_all(150, 0, 0); + break; + } + case 1: { + rgb_matrix_set_color_all(0, 150, 0); + break; + } + case 2: { + rgb_matrix_set_color_all(0, 0, 150); + break; + } + case 3: { + rgb_matrix_set_color_all(150, 150, 150); + break; + } + } + return false; +} + +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/keyboards/xelus/valor/rev2/rules.mk b/keyboards/xelus/valor/rev2/rules.mk new file mode 100644 index 000000000..976638735 --- /dev/null +++ b/keyboards/xelus/valor/rev2/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = STM32L422 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +RGB_MATRIX_CUSTOM_KB = yes +WS2812_DRIVER = pwm +EEPROM_DRIVER = i2c + +OPT = 2 +LTO_ENABLE = yes + +LAYOUTS = alice_split_bs diff --git a/keyboards/xelus/valor_frl_tkl/rules.mk b/keyboards/xelus/valor_frl_tkl/rules.mk index a81f8d127..a82f99437 100644 --- a/keyboards/xelus/valor_frl_tkl/rules.mk +++ b/keyboards/xelus/valor_frl_tkl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xiaomi/mk02/rules.mk b/keyboards/xiaomi/mk02/rules.mk index 730fb0a89..a501009d1 100644 --- a/keyboards/xiaomi/mk02/rules.mk +++ b/keyboards/xiaomi/mk02/rules.mk @@ -6,7 +6,7 @@ MCU_LDSCRIPT = STM32F072_0x2000_bootloader DFU_ARGS = -d 0483:df11 -a 0 -s 0x08002000:leave DFU_SUFFIX_ARGS = -v 0483 -p DF11 -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xiudi/xd002/.noci b/keyboards/xiudi/xd002/.noci new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/xd002/config.h b/keyboards/xiudi/xd002/config.h similarity index 100% rename from keyboards/xd002/config.h rename to keyboards/xiudi/xd002/config.h diff --git a/keyboards/xd002/info.json b/keyboards/xiudi/xd002/info.json similarity index 100% rename from keyboards/xd002/info.json rename to keyboards/xiudi/xd002/info.json diff --git a/keyboards/xd002/keymaps/default/keymap.c b/keyboards/xiudi/xd002/keymaps/default/keymap.c similarity index 100% rename from keyboards/xd002/keymaps/default/keymap.c rename to keyboards/xiudi/xd002/keymaps/default/keymap.c diff --git a/keyboards/xd002/keymaps/multilayer_rgb/config.h b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/config.h similarity index 100% rename from keyboards/xd002/keymaps/multilayer_rgb/config.h rename to keyboards/xiudi/xd002/keymaps/multilayer_rgb/config.h diff --git a/keyboards/xiudi/xd002/keymaps/multilayer_rgb/keymap.c b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/keymap.c new file mode 100644 index 000000000..4ae28fd91 --- /dev/null +++ b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/keymap.c @@ -0,0 +1,173 @@ +/* Copyright 2020 elmo-space + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 "rgblite.h" + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FUNC, +}; + +// set your keycodes here +#define layer1_left KC_PAUS +#define layer1_right KC_MPLY +#define layer2_left KC_MPRV +#define layer2_right KC_MNXT + + +enum custom_keycodes { + LEFT1 = SAFE_RANGE, + RIGHT1, + LEFT2, + RIGHT2 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + LEFT1, RIGHT1 + ), + [_FUNC] = LAYOUT( + LEFT2, RIGHT2 + ) +}; + +static bool key1_down = false; +static bool key2_down = false; +static char layer_switched = 0; // this prevents the individual keys getting triggered after a layerchange + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) + { + case LEFT1: + if (record->event.pressed) + { + if (key2_down) + { + layer_on(1); + layer_switched = 2; + return false; + break; + } + key1_down = true; + } + else { + if (layer_switched > 0) { + --layer_switched; + key1_down = false; + } + else { + tap_code(layer1_left); + key1_down = false; + } + } + return false; + break; + case RIGHT1: + if (record->event.pressed) + { + if (key1_down) + { + layer_on(1); + layer_switched = 2; + return false; + break; + } + key2_down = true; + } + else { + if (layer_switched > 0) { + --layer_switched; + key2_down = false; + } + else { + tap_code(layer1_right); + key2_down = false; + } + } + return false; + break; + case LEFT2: + if (record->event.pressed) + { + if (key2_down) + { + layer_off(1); + layer_switched = 2; + return false; + break; + } + key1_down = true; + } + else { + if (layer_switched > 0) { + --layer_switched; + key1_down = false; + } + else { + tap_code(layer2_left); + key1_down = false; + } + } + return false; + break; + case RIGHT2: + if (record->event.pressed) + { + if (key1_down) + { + layer_off(1); + layer_switched = 2; + return false; + break; + } + key2_down = true; + } + else { + if (layer_switched > 0) { + --layer_switched; + key2_down = false; + } + else { + tap_code(layer2_right); + key2_down = false; + } + } + return false; + break; + } + return true; +}; + +// layer colors +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _FUNC: + rgblite_setrgb(RGB_RED); + break; + default: // for any other layers, or the default layer + rgblite_setrgb(RGB_GREEN); + break; + } + return state; +} + +// default color +void keyboard_post_init_user(void) { + rgblite_setrgb(RGB_GREEN); +} diff --git a/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h new file mode 100644 index 000000000..8a14a8f95 --- /dev/null +++ b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rgblite.h @@ -0,0 +1,9 @@ +#pragma once + +#include "ws2812.h" +#include "color.h" + +static inline void rgblite_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) { + LED_TYPE leds[RGBLED_NUM] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}}; + ws2812_setleds(leds, RGBLED_NUM); +} diff --git a/keyboards/xd002/keymaps/multilayer_rgb/rules.mk b/keyboards/xiudi/xd002/keymaps/multilayer_rgb/rules.mk similarity index 100% rename from keyboards/xd002/keymaps/multilayer_rgb/rules.mk rename to keyboards/xiudi/xd002/keymaps/multilayer_rgb/rules.mk diff --git a/keyboards/xd002/keymaps/rgb/keymap.c b/keyboards/xiudi/xd002/keymaps/rgb/keymap.c similarity index 100% rename from keyboards/xd002/keymaps/rgb/keymap.c rename to keyboards/xiudi/xd002/keymaps/rgb/keymap.c diff --git a/keyboards/xd002/keymaps/rgb/rules.mk b/keyboards/xiudi/xd002/keymaps/rgb/rules.mk similarity index 100% rename from keyboards/xd002/keymaps/rgb/rules.mk rename to keyboards/xiudi/xd002/keymaps/rgb/rules.mk diff --git a/keyboards/xiudi/xd002/keymaps/rgb_lite/keymap.c b/keyboards/xiudi/xd002/keymaps/rgb_lite/keymap.c new file mode 100644 index 000000000..a795ca8a6 --- /dev/null +++ b/keyboards/xiudi/xd002/keymaps/rgb_lite/keymap.c @@ -0,0 +1,31 @@ +#include QMK_KEYBOARD_H +#include "rgblite.h" + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKURL = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + RGB_HUI, QMKURL + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case RGB_HUI: + rgblite_increase_hue(); + break; + case QMKURL: + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + break; + } + } + return true; +} + +void keyboard_post_init_user(void) { + rgblite_increase_hue(); +} diff --git a/keyboards/xiudi/xd002/keymaps/rgb_lite/rgblite.h b/keyboards/xiudi/xd002/keymaps/rgb_lite/rgblite.h new file mode 100644 index 000000000..b7919f976 --- /dev/null +++ b/keyboards/xiudi/xd002/keymaps/rgb_lite/rgblite.h @@ -0,0 +1,26 @@ +#pragma once + +#include "ws2812.h" +#include "color.h" + +static inline void rgblite_setrgb(uint8_t _r, uint8_t _g, uint8_t _b) { + LED_TYPE leds[RGBLED_NUM] = {{.r = _r, .g = _g, .b = _b}, {.r = _r, .g = _g, .b = _b}}; + ws2812_setleds(leds, RGBLED_NUM); +} + +static void rgblite_increase_hue(void) { + static uint8_t state = 0; + + state = (state + 1) % 3; + switch (state) { + case 1: + rgblite_setrgb(RGB_RED); + break; + case 2: + rgblite_setrgb(RGB_BLUE); + break; + default: + rgblite_setrgb(RGB_GREEN); + break; + } +} diff --git a/keyboards/xd002/keymaps/rgb_lite/rules.mk b/keyboards/xiudi/xd002/keymaps/rgb_lite/rules.mk similarity index 100% rename from keyboards/xd002/keymaps/rgb_lite/rules.mk rename to keyboards/xiudi/xd002/keymaps/rgb_lite/rules.mk diff --git a/keyboards/anavi/macropad2/keymaps/tap_dance/config.h b/keyboards/xiudi/xd002/keymaps/tap_dance/config.h similarity index 100% rename from keyboards/anavi/macropad2/keymaps/tap_dance/config.h rename to keyboards/xiudi/xd002/keymaps/tap_dance/config.h diff --git a/keyboards/xd002/keymaps/tap_dance/keymap.c b/keyboards/xiudi/xd002/keymaps/tap_dance/keymap.c similarity index 100% rename from keyboards/xd002/keymaps/tap_dance/keymap.c rename to keyboards/xiudi/xd002/keymaps/tap_dance/keymap.c diff --git a/keyboards/anavi/macropad2/keymaps/tap_dance/rules.mk b/keyboards/xiudi/xd002/keymaps/tap_dance/rules.mk similarity index 100% rename from keyboards/anavi/macropad2/keymaps/tap_dance/rules.mk rename to keyboards/xiudi/xd002/keymaps/tap_dance/rules.mk diff --git a/keyboards/xd002/keymaps/volume/keymap.c b/keyboards/xiudi/xd002/keymaps/volume/keymap.c similarity index 100% rename from keyboards/xd002/keymaps/volume/keymap.c rename to keyboards/xiudi/xd002/keymaps/volume/keymap.c diff --git a/keyboards/xd002/keymaps/volume/rules.mk b/keyboards/xiudi/xd002/keymaps/volume/rules.mk similarity index 100% rename from keyboards/xd002/keymaps/volume/rules.mk rename to keyboards/xiudi/xd002/keymaps/volume/rules.mk diff --git a/keyboards/xiudi/xd002/readme.md b/keyboards/xiudi/xd002/readme.md new file mode 100644 index 000000000..65522fda2 --- /dev/null +++ b/keyboards/xiudi/xd002/readme.md @@ -0,0 +1,49 @@ +# xd002 + +![xd002](https://cdn.shopify.com/s/files/1/2711/4238/products/xd002_1024x1024.jpg?v=1522134411) + +2% Custom mechanical keyboard. ATtiny85 powered, with 2*WS2812 LEDs, and the micronucleus bootloader. + +**Note**: Due to limited firmware space, a _**lot**_ of features have to be disabled to get a functioning QMK based keyboard. + +* Keyboard Maintainer: [zvecr](https://github.com/zvecr) +* Hardware Supported: xd002 +* Hardware Availability: [kprepublic](https://kprepublic.com/products/xd002-xiudi-2-custom-mechanical-keyboard-2-keys-underglow-and-switch-rgb-pcb-programmed-hot-swappable-macro-key-aluminum-case) + +Make example for this keyboard (after setting up your build environment): + + make xiudi/xd002: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). + +## Flashing +### Prerequisites + +```bash +git clone https://github.com/micronucleus/micronucleus.git +cd micronucleus/commandline/ +sudo make install +``` + +On Linux, you’ll need proper privileges to access the MCU. You can either use sudo when flashing firmware, or place [these files](https://github.com/micronucleus/micronucleus/blob/master/commandline/49-micronucleus.rules) in /etc/udev/rules.d/. Once added run the following: + +```bash +sudo udevadm control --reload-rules +sudo udevadm trigger +``` + +### Instructions + +**Reset Key**: Hold down key nearest to the USB socket while plugging in the keyboard. + +```bash +make xd002:default:flash + +# or directly with... +micronucleus --run +``` + +### Recovery + +* [Original Firmware](https://github.com/xiudi/Attiny85_vusb_pad_test) +* [Bootloader Repair](https://digistump.com/wiki/digispark/tutorials/proisp) diff --git a/keyboards/xiudi/xd002/rules.mk b/keyboards/xiudi/xd002/rules.mk new file mode 100644 index 000000000..0c97b334c --- /dev/null +++ b/keyboards/xiudi/xd002/rules.mk @@ -0,0 +1,31 @@ +# MCU name +MCU = attiny85 + +# Bootloader selection +BOOTLOADER = micronucleus +OPT_DEFS += -DBOOTLOADER_SIZE=1862 +PROGRAM_CMD = micronucleus --run $(BUILD_DIR)/$(TARGET).hex + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +# Save as much space as we can... +LTO_ENABLE = yes +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no +SPACE_CADET_ENABLE = no diff --git a/keyboards/xd002/xd002.c b/keyboards/xiudi/xd002/xd002.c similarity index 100% rename from keyboards/xd002/xd002.c rename to keyboards/xiudi/xd002/xd002.c diff --git a/keyboards/xd002/xd002.h b/keyboards/xiudi/xd002/xd002.h similarity index 100% rename from keyboards/xd002/xd002.h rename to keyboards/xiudi/xd002/xd002.h diff --git a/keyboards/xd004/info.json b/keyboards/xiudi/xd004/info.json similarity index 100% rename from keyboards/xd004/info.json rename to keyboards/xiudi/xd004/info.json diff --git a/keyboards/xd004/keymaps/default/keymap.c b/keyboards/xiudi/xd004/keymaps/default/keymap.c similarity index 100% rename from keyboards/xd004/keymaps/default/keymap.c rename to keyboards/xiudi/xd004/keymaps/default/keymap.c diff --git a/keyboards/xd004/keymaps/default/readme.md b/keyboards/xiudi/xd004/keymaps/default/readme.md similarity index 100% rename from keyboards/xd004/keymaps/default/readme.md rename to keyboards/xiudi/xd004/keymaps/default/readme.md diff --git a/keyboards/xd004/keymaps/narze/keymap.c b/keyboards/xiudi/xd004/keymaps/narze/keymap.c similarity index 100% rename from keyboards/xd004/keymaps/narze/keymap.c rename to keyboards/xiudi/xd004/keymaps/narze/keymap.c diff --git a/keyboards/xd004/keymaps/narze/readme.md b/keyboards/xiudi/xd004/keymaps/narze/readme.md similarity index 100% rename from keyboards/xd004/keymaps/narze/readme.md rename to keyboards/xiudi/xd004/keymaps/narze/readme.md diff --git a/keyboards/xd004/keymaps/system_and_media/keymap.c b/keyboards/xiudi/xd004/keymaps/system_and_media/keymap.c similarity index 100% rename from keyboards/xd004/keymaps/system_and_media/keymap.c rename to keyboards/xiudi/xd004/keymaps/system_and_media/keymap.c diff --git a/keyboards/xd004/keymaps/system_and_media/readme.md b/keyboards/xiudi/xd004/keymaps/system_and_media/readme.md similarity index 100% rename from keyboards/xd004/keymaps/system_and_media/readme.md rename to keyboards/xiudi/xd004/keymaps/system_and_media/readme.md diff --git a/keyboards/xiudi/xd004/readme.md b/keyboards/xiudi/xd004/readme.md new file mode 100644 index 000000000..6ee2fa2cd --- /dev/null +++ b/keyboards/xiudi/xd004/readme.md @@ -0,0 +1,33 @@ +# XD004 + +4-keys board + +![Top View of a XD004 board](https://ae01.alicdn.com/kf/HTB1_G9IX21H3KVjSZFHq6zKppXa0/xd004-xiudi-4-Custom-Mechanical-Keyboard-4-keys-switch-leds-PCB-programmed-hot-swappable-macro-key.jpg) + +* Keyboard Maintainer: QMK Community +* Hardware Supported: XD004 PCB v1.0 +* Hardware Availability: [KPRepublic](https://kprepublic.com/products/xd004-xiudi-4-custom-mechanical-keyboard-4-keys-switch-leds-pcb-programmed-hot-swappable-macro-key-silver-case-micro-port) + +To put this board in DFU (firmware update) mode, bridge the last two pins (#5 & 6) of the 6-pin "J2" header on the opposite edge of the board to the USB port" +``` +----+ + J2 | +[o] | +(o) | +(o) | +(o) | +(o)-+-\ (These +(o)-+-/ two) + | +----+ +``` + +Make example for this keyboard (after setting up your build environment): + + make xiudi/xd004/v1:default + +Flashing example for this keyboard: + + make xiudi/xd004/v1:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xd004/v1/config.h b/keyboards/xiudi/xd004/v1/config.h similarity index 100% rename from keyboards/xd004/v1/config.h rename to keyboards/xiudi/xd004/v1/config.h diff --git a/keyboards/xiudi/xd004/v1/rules.mk b/keyboards/xiudi/xd004/v1/rules.mk new file mode 100644 index 000000000..d5d270f3f --- /dev/null +++ b/keyboards/xiudi/xd004/v1/rules.mk @@ -0,0 +1,31 @@ +# MCU name +MCU = atmega16u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SPACE_CADET_ENABLE = no +# Saves about 5% of space: +LTO_ENABLE = yes + +#LAYOUTS = ortho_1x4 diff --git a/keyboards/xd004/xd004.c b/keyboards/xiudi/xd004/xd004.c similarity index 100% rename from keyboards/xd004/xd004.c rename to keyboards/xiudi/xd004/xd004.c diff --git a/keyboards/xd004/xd004.h b/keyboards/xiudi/xd004/xd004.h similarity index 100% rename from keyboards/xd004/xd004.h rename to keyboards/xiudi/xd004/xd004.h diff --git a/keyboards/xd60/info.json b/keyboards/xiudi/xd60/info.json similarity index 100% rename from keyboards/xd60/info.json rename to keyboards/xiudi/xd60/info.json diff --git a/keyboards/xd60/keymaps/Jos/README.md b/keyboards/xiudi/xd60/keymaps/Jos/README.md similarity index 100% rename from keyboards/xd60/keymaps/Jos/README.md rename to keyboards/xiudi/xd60/keymaps/Jos/README.md diff --git a/keyboards/xd60/keymaps/Jos/config.h b/keyboards/xiudi/xd60/keymaps/Jos/config.h similarity index 100% rename from keyboards/xd60/keymaps/Jos/config.h rename to keyboards/xiudi/xd60/keymaps/Jos/config.h diff --git a/keyboards/xd60/keymaps/Jos/keymap.c b/keyboards/xiudi/xd60/keymaps/Jos/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/Jos/keymap.c rename to keyboards/xiudi/xd60/keymaps/Jos/keymap.c diff --git a/keyboards/xd60/keymaps/Jos/rules.mk b/keyboards/xiudi/xd60/keymaps/Jos/rules.mk similarity index 100% rename from keyboards/xd60/keymaps/Jos/rules.mk rename to keyboards/xiudi/xd60/keymaps/Jos/rules.mk diff --git a/keyboards/xiudi/xd60/keymaps/birkir/keymap.c b/keyboards/xiudi/xd60/keymaps/birkir/keymap.c new file mode 100644 index 000000000..fe7cd6066 --- /dev/null +++ b/keyboards/xiudi/xd60/keymaps/birkir/keymap.c @@ -0,0 +1,66 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // 0: Base Layer + 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_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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ + KC_LSFT, KC_SLSH, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_NO, KC_RSFT, KC_UP, TG(2), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + ), + + // 1: Function Layer + LAYOUT_all( + KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, BL_DEC, BL_INC, KC_F13, KC_F14, \ + KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ + KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, TG(2), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END + ), + + // 2: Cool Layer + LAYOUT_all( + RESET, BL_DEC, BL_INC, BL_ON, BL_OFF, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, RGB_MODE_PLAIN, KC_TRNS, \ + KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ + KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, TG(2), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END + ) +}; + +bool edit = false; +uint32_t mode; +uint16_t hue; +uint8_t sat; +uint8_t val; + +layer_state_t layer_state_set_user(layer_state_t state) { + + if (state == 0 && edit == true) { + mode = rgblight_get_mode(); + hue = rgblight_get_hue(); + sat = rgblight_get_sat(); + val = rgblight_get_val(); + edit = false; + } + + switch (biton32(state)) { + case 1: + rgblight_mode(1); + rgblight_setrgb(0xD3, 0x7F, 0xED); + break; + case 2: + rgblight_mode(1); + rgblight_setrgb(0xFF, 0x00, 0x00); + edit = true; + break; + default: + rgblight_mode(mode); + rgblight_sethsv(hue, sat, val); + break; + } + return state; +} diff --git a/keyboards/xd60/keymaps/birkir/readme.md b/keyboards/xiudi/xd60/keymaps/birkir/readme.md similarity index 100% rename from keyboards/xd60/keymaps/birkir/readme.md rename to keyboards/xiudi/xd60/keymaps/birkir/readme.md diff --git a/keyboards/xd60/keymaps/cheese/README.md b/keyboards/xiudi/xd60/keymaps/cheese/README.md similarity index 100% rename from keyboards/xd60/keymaps/cheese/README.md rename to keyboards/xiudi/xd60/keymaps/cheese/README.md diff --git a/keyboards/xd60/keymaps/cheese/keymap.c b/keyboards/xiudi/xd60/keymaps/cheese/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/cheese/keymap.c rename to keyboards/xiudi/xd60/keymaps/cheese/keymap.c diff --git a/keyboards/xd60/keymaps/crd_ansi/README.md b/keyboards/xiudi/xd60/keymaps/crd_ansi/README.md similarity index 100% rename from keyboards/xd60/keymaps/crd_ansi/README.md rename to keyboards/xiudi/xd60/keymaps/crd_ansi/README.md diff --git a/keyboards/xd60/keymaps/crd_ansi/keymap.c b/keyboards/xiudi/xd60/keymaps/crd_ansi/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/crd_ansi/keymap.c rename to keyboards/xiudi/xd60/keymaps/crd_ansi/keymap.c diff --git a/keyboards/xd60/keymaps/default/keymap.c b/keyboards/xiudi/xd60/keymaps/default/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/default/keymap.c rename to keyboards/xiudi/xd60/keymaps/default/keymap.c diff --git a/keyboards/xd60/keymaps/default/readme.md b/keyboards/xiudi/xd60/keymaps/default/readme.md similarity index 100% rename from keyboards/xd60/keymaps/default/readme.md rename to keyboards/xiudi/xd60/keymaps/default/readme.md diff --git a/keyboards/xd60/keymaps/edulpn/keymap.c b/keyboards/xiudi/xd60/keymaps/edulpn/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/edulpn/keymap.c rename to keyboards/xiudi/xd60/keymaps/edulpn/keymap.c diff --git a/keyboards/xd60/keymaps/edulpn/readme.md b/keyboards/xiudi/xd60/keymaps/edulpn/readme.md similarity index 100% rename from keyboards/xd60/keymaps/edulpn/readme.md rename to keyboards/xiudi/xd60/keymaps/edulpn/readme.md diff --git a/keyboards/xd60/keymaps/edulpn64/keymap.c b/keyboards/xiudi/xd60/keymaps/edulpn64/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/edulpn64/keymap.c rename to keyboards/xiudi/xd60/keymaps/edulpn64/keymap.c diff --git a/keyboards/xd60/keymaps/edulpn64/readme.md b/keyboards/xiudi/xd60/keymaps/edulpn64/readme.md similarity index 100% rename from keyboards/xd60/keymaps/edulpn64/readme.md rename to keyboards/xiudi/xd60/keymaps/edulpn64/readme.md diff --git a/keyboards/xd60/keymaps/fvolpe83/config.h b/keyboards/xiudi/xd60/keymaps/fvolpe83/config.h similarity index 100% rename from keyboards/xd60/keymaps/fvolpe83/config.h rename to keyboards/xiudi/xd60/keymaps/fvolpe83/config.h diff --git a/keyboards/xd60/keymaps/fvolpe83/keymap.c b/keyboards/xiudi/xd60/keymaps/fvolpe83/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/fvolpe83/keymap.c rename to keyboards/xiudi/xd60/keymaps/fvolpe83/keymap.c diff --git a/keyboards/xd60/keymaps/fvolpe83/readme.md b/keyboards/xiudi/xd60/keymaps/fvolpe83/readme.md similarity index 100% rename from keyboards/xd60/keymaps/fvolpe83/readme.md rename to keyboards/xiudi/xd60/keymaps/fvolpe83/readme.md diff --git a/keyboards/xiudi/xd60/keymaps/fvolpe83/rules.mk b/keyboards/xiudi/xd60/keymaps/fvolpe83/rules.mk new file mode 100755 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/xiudi/xd60/keymaps/fvolpe83/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xd60/keymaps/iso/keymap.c b/keyboards/xiudi/xd60/keymaps/iso/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/iso/keymap.c rename to keyboards/xiudi/xd60/keymaps/iso/keymap.c diff --git a/keyboards/xd60/keymaps/iso/readme.md b/keyboards/xiudi/xd60/keymaps/iso/readme.md similarity index 100% rename from keyboards/xd60/keymaps/iso/readme.md rename to keyboards/xiudi/xd60/keymaps/iso/readme.md diff --git a/keyboards/xd60/keymaps/kmontag42/keymap.c b/keyboards/xiudi/xd60/keymaps/kmontag42/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/kmontag42/keymap.c rename to keyboards/xiudi/xd60/keymaps/kmontag42/keymap.c diff --git a/keyboards/xd60/keymaps/kmontag42/readme.md b/keyboards/xiudi/xd60/keymaps/kmontag42/readme.md similarity index 100% rename from keyboards/xd60/keymaps/kmontag42/readme.md rename to keyboards/xiudi/xd60/keymaps/kmontag42/readme.md diff --git a/keyboards/xd60/keymaps/kmontag42/rules.mk b/keyboards/xiudi/xd60/keymaps/kmontag42/rules.mk similarity index 100% rename from keyboards/xd60/keymaps/kmontag42/rules.mk rename to keyboards/xiudi/xd60/keymaps/kmontag42/rules.mk diff --git a/keyboards/xd60/keymaps/krusli/keymap.c b/keyboards/xiudi/xd60/keymaps/krusli/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/krusli/keymap.c rename to keyboards/xiudi/xd60/keymaps/krusli/keymap.c diff --git a/keyboards/xd60/keymaps/krusli/readme.md b/keyboards/xiudi/xd60/keymaps/krusli/readme.md similarity index 100% rename from keyboards/xd60/keymaps/krusli/readme.md rename to keyboards/xiudi/xd60/keymaps/krusli/readme.md diff --git a/keyboards/xd60/keymaps/melka/.gitignore b/keyboards/xiudi/xd60/keymaps/melka/.gitignore similarity index 100% rename from keyboards/xd60/keymaps/melka/.gitignore rename to keyboards/xiudi/xd60/keymaps/melka/.gitignore diff --git a/keyboards/xd60/keymaps/melka/config.h b/keyboards/xiudi/xd60/keymaps/melka/config.h similarity index 100% rename from keyboards/xd60/keymaps/melka/config.h rename to keyboards/xiudi/xd60/keymaps/melka/config.h diff --git a/keyboards/xd60/keymaps/melka/keymap.c b/keyboards/xiudi/xd60/keymaps/melka/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/melka/keymap.c rename to keyboards/xiudi/xd60/keymaps/melka/keymap.c diff --git a/keyboards/xd60/keymaps/melka/passwd_template.h b/keyboards/xiudi/xd60/keymaps/melka/passwd_template.h similarity index 100% rename from keyboards/xd60/keymaps/melka/passwd_template.h rename to keyboards/xiudi/xd60/keymaps/melka/passwd_template.h diff --git a/keyboards/xd60/keymaps/melka/readme.md b/keyboards/xiudi/xd60/keymaps/melka/readme.md similarity index 100% rename from keyboards/xd60/keymaps/melka/readme.md rename to keyboards/xiudi/xd60/keymaps/melka/readme.md diff --git a/keyboards/xd60/keymaps/petesmom/README.md b/keyboards/xiudi/xd60/keymaps/petesmom/README.md similarity index 100% rename from keyboards/xd60/keymaps/petesmom/README.md rename to keyboards/xiudi/xd60/keymaps/petesmom/README.md diff --git a/keyboards/xd60/keymaps/petesmom/keymap.c b/keyboards/xiudi/xd60/keymaps/petesmom/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/petesmom/keymap.c rename to keyboards/xiudi/xd60/keymaps/petesmom/keymap.c diff --git a/keyboards/xd60/keymaps/rooski/instructions.txt b/keyboards/xiudi/xd60/keymaps/rooski/instructions.txt similarity index 100% rename from keyboards/xd60/keymaps/rooski/instructions.txt rename to keyboards/xiudi/xd60/keymaps/rooski/instructions.txt diff --git a/keyboards/xd60/keymaps/rooski/keymap.c b/keyboards/xiudi/xd60/keymaps/rooski/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/rooski/keymap.c rename to keyboards/xiudi/xd60/keymaps/rooski/keymap.c diff --git a/keyboards/xd60/keymaps/semicolonsnet/keymap.c b/keyboards/xiudi/xd60/keymaps/semicolonsnet/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/semicolonsnet/keymap.c rename to keyboards/xiudi/xd60/keymaps/semicolonsnet/keymap.c diff --git a/keyboards/xd60/keymaps/semicolonsnet/readme.md b/keyboards/xiudi/xd60/keymaps/semicolonsnet/readme.md similarity index 100% rename from keyboards/xd60/keymaps/semicolonsnet/readme.md rename to keyboards/xiudi/xd60/keymaps/semicolonsnet/readme.md diff --git a/keyboards/xd60/keymaps/split_bksp_arrows/keymap.c b/keyboards/xiudi/xd60/keymaps/split_bksp_arrows/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/split_bksp_arrows/keymap.c rename to keyboards/xiudi/xd60/keymaps/split_bksp_arrows/keymap.c diff --git a/keyboards/xd60/keymaps/split_bksp_arrows/readme.md b/keyboards/xiudi/xd60/keymaps/split_bksp_arrows/readme.md similarity index 100% rename from keyboards/xd60/keymaps/split_bksp_arrows/readme.md rename to keyboards/xiudi/xd60/keymaps/split_bksp_arrows/readme.md diff --git a/keyboards/xd60/keymaps/stanleylai/keymap.c b/keyboards/xiudi/xd60/keymaps/stanleylai/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/stanleylai/keymap.c rename to keyboards/xiudi/xd60/keymaps/stanleylai/keymap.c diff --git a/keyboards/xd60/keymaps/styr/keymap.c b/keyboards/xiudi/xd60/keymaps/styr/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/styr/keymap.c rename to keyboards/xiudi/xd60/keymaps/styr/keymap.c diff --git a/keyboards/xd60/keymaps/styr/readme.md b/keyboards/xiudi/xd60/keymaps/styr/readme.md similarity index 100% rename from keyboards/xd60/keymaps/styr/readme.md rename to keyboards/xiudi/xd60/keymaps/styr/readme.md diff --git a/keyboards/xd60/keymaps/supercoffee/keymap.c b/keyboards/xiudi/xd60/keymaps/supercoffee/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/supercoffee/keymap.c rename to keyboards/xiudi/xd60/keymaps/supercoffee/keymap.c diff --git a/keyboards/xd60/keymaps/supercoffee/readme.md b/keyboards/xiudi/xd60/keymaps/supercoffee/readme.md similarity index 100% rename from keyboards/xd60/keymaps/supercoffee/readme.md rename to keyboards/xiudi/xd60/keymaps/supercoffee/readme.md diff --git a/keyboards/xd60/keymaps/suryanisaac/README.md b/keyboards/xiudi/xd60/keymaps/suryanisaac/README.md similarity index 100% rename from keyboards/xd60/keymaps/suryanisaac/README.md rename to keyboards/xiudi/xd60/keymaps/suryanisaac/README.md diff --git a/keyboards/xd60/keymaps/suryanisaac/keymap.c b/keyboards/xiudi/xd60/keymaps/suryanisaac/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/suryanisaac/keymap.c rename to keyboards/xiudi/xd60/keymaps/suryanisaac/keymap.c diff --git a/keyboards/xd60/keymaps/via/keymap.c b/keyboards/xiudi/xd60/keymaps/via/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/via/keymap.c rename to keyboards/xiudi/xd60/keymaps/via/keymap.c diff --git a/keyboards/xd60/keymaps/via/readme.md b/keyboards/xiudi/xd60/keymaps/via/readme.md similarity index 100% rename from keyboards/xd60/keymaps/via/readme.md rename to keyboards/xiudi/xd60/keymaps/via/readme.md diff --git a/keyboards/xiudi/xd60/keymaps/via/rules.mk b/keyboards/xiudi/xd60/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/xiudi/xd60/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xd60/keymaps/yuuki/README.md b/keyboards/xiudi/xd60/keymaps/yuuki/README.md similarity index 100% rename from keyboards/xd60/keymaps/yuuki/README.md rename to keyboards/xiudi/xd60/keymaps/yuuki/README.md diff --git a/keyboards/xd60/keymaps/yuuki/keymap.c b/keyboards/xiudi/xd60/keymaps/yuuki/keymap.c similarity index 100% rename from keyboards/xd60/keymaps/yuuki/keymap.c rename to keyboards/xiudi/xd60/keymaps/yuuki/keymap.c diff --git a/keyboards/xiudi/xd60/readme.md b/keyboards/xiudi/xd60/readme.md new file mode 100644 index 000000000..db03613b8 --- /dev/null +++ b/keyboards/xiudi/xd60/readme.md @@ -0,0 +1,17 @@ +# XD60 + +Compact 60% with arrows. + +![Top View of a pair of XD60 Keyboard](https://i.imgur.com/3Jq2743.jpg) + +* Keyboard Maintainer: QMK Community +* Hardware Supported: XD60 PCB rev2 & rev3 +* Hardware Availability: [Drop.com](https://www.drop.com/buy/xd60-xd64-custom-mechanical-keyboard-kit?mode=guest_open), [KPRepublic on AliExpress](https://www.aliexpress.com/item/32814945677.html) +* Schematic Availability: Public Domain [on EasyEDA](https://easyeda.com/langzisanshao/xd60) + +Make example for this keyboard (after setting up your build environment): + + make xiudi/xd60/rev2:default # rev2 + make xiudi/xd60/rev3:default # rev3 + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xiudi/xd60/rev2/.noci b/keyboards/xiudi/xd60/rev2/.noci new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/xd60/rev2/config.h b/keyboards/xiudi/xd60/rev2/config.h similarity index 100% rename from keyboards/xd60/rev2/config.h rename to keyboards/xiudi/xd60/rev2/config.h diff --git a/keyboards/xiudi/xd60/rev2/rules.mk b/keyboards/xiudi/xd60/rev2/rules.mk new file mode 100644 index 000000000..a41c8d99e --- /dev/null +++ b/keyboards/xiudi/xd60/rev2/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift diff --git a/keyboards/xd60/rev3/config.h b/keyboards/xiudi/xd60/rev3/config.h similarity index 100% rename from keyboards/xd60/rev3/config.h rename to keyboards/xiudi/xd60/rev3/config.h diff --git a/keyboards/xiudi/xd60/rev3/rules.mk b/keyboards/xiudi/xd60/rev3/rules.mk new file mode 100644 index 000000000..a41c8d99e --- /dev/null +++ b/keyboards/xiudi/xd60/rev3/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso 60_iso_split_bs_rshift diff --git a/keyboards/xd60/xd60.c b/keyboards/xiudi/xd60/xd60.c similarity index 100% rename from keyboards/xd60/xd60.c rename to keyboards/xiudi/xd60/xd60.c diff --git a/keyboards/xd60/xd60.h b/keyboards/xiudi/xd60/xd60.h similarity index 100% rename from keyboards/xd60/xd60.h rename to keyboards/xiudi/xd60/xd60.h diff --git a/keyboards/xd68/config.h b/keyboards/xiudi/xd68/config.h similarity index 100% rename from keyboards/xd68/config.h rename to keyboards/xiudi/xd68/config.h diff --git a/keyboards/xd68/info.json b/keyboards/xiudi/xd68/info.json similarity index 100% rename from keyboards/xd68/info.json rename to keyboards/xiudi/xd68/info.json diff --git a/keyboards/xd68/keymaps/default/keymap.c b/keyboards/xiudi/xd68/keymaps/default/keymap.c similarity index 100% rename from keyboards/xd68/keymaps/default/keymap.c rename to keyboards/xiudi/xd68/keymaps/default/keymap.c diff --git a/keyboards/xd68/keymaps/default/readme.md b/keyboards/xiudi/xd68/keymaps/default/readme.md similarity index 100% rename from keyboards/xd68/keymaps/default/readme.md rename to keyboards/xiudi/xd68/keymaps/default/readme.md diff --git a/keyboards/xd68/keymaps/default_iso/keymap.c b/keyboards/xiudi/xd68/keymaps/default_iso/keymap.c similarity index 100% rename from keyboards/xd68/keymaps/default_iso/keymap.c rename to keyboards/xiudi/xd68/keymaps/default_iso/keymap.c diff --git a/keyboards/xd68/keymaps/default_iso/readme.md b/keyboards/xiudi/xd68/keymaps/default_iso/readme.md similarity index 100% rename from keyboards/xd68/keymaps/default_iso/readme.md rename to keyboards/xiudi/xd68/keymaps/default_iso/readme.md diff --git a/keyboards/xd68/keymaps/via/keymap.c b/keyboards/xiudi/xd68/keymaps/via/keymap.c similarity index 100% rename from keyboards/xd68/keymaps/via/keymap.c rename to keyboards/xiudi/xd68/keymaps/via/keymap.c diff --git a/keyboards/xd68/keymaps/via/readme.md b/keyboards/xiudi/xd68/keymaps/via/readme.md similarity index 100% rename from keyboards/xd68/keymaps/via/readme.md rename to keyboards/xiudi/xd68/keymaps/via/readme.md diff --git a/keyboards/xiudi/xd68/keymaps/via/rules.mk b/keyboards/xiudi/xd68/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/xiudi/xd68/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xiudi/xd68/readme.md b/keyboards/xiudi/xd68/readme.md new file mode 100644 index 000000000..dd12ad632 --- /dev/null +++ b/keyboards/xiudi/xd68/readme.md @@ -0,0 +1,53 @@ +# XD68 + +![Kitteh](https://i.imgur.com/qkA5Of5.jpg) + +65% board with USB-C, RGB underglow and backlight. Powered by ATM32U4. + +![Top View of XD68 Keyboard](https://i.imgur.com/OLkQQ17.jpg) + +* Keyboard Maintainer: QMK Community +* Hardware Supported: XD68 +* Hardware Availability: [KPRepublic on AliExpress](http://kprepublic.com/products/xiudi-xd68-pcb-65-custom-mechanical-keyboard-support-tkg-tools-underglow-rgb-pcb-programmed-kle-lots-of-layouts) + +Make example for this keyboard (after setting up your build environment): + + make xiudi/xd68:default + make xiudi/xd68:default_iso # default ISO UK layout + +## Layouts + +### ANSI + +``` +,----------------------------------------------------------------. +|Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| +|----------------------------------------------------------------| +|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|End | +|----------------------------------------------------------------| +|Ctrl|Win |Alt | Space |App|Ctrl|FN |Lef|Dow|Rig | +`----------------------------------------------------------------' +``` + +### ISO-UK + +``` +,----------------------------------------------------------------. +|Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Home| +|----------------------------------------------------------------| +|Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| |PgUp| +|------------------------------------------------------- -----| +|CAPS | A| S| D| F| G| H| J| K| L| ;| '| #|Entr|PgDn| +|----------------------------------------------------------------| +|Shift| \ | Z| X| C| V| B| N| M| ,| .| /|Rshift|Up|End | +|----------------------------------------------------------------| +|Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | +`----------------------------------------------------------------' +``` + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + diff --git a/keyboards/xiudi/xd68/rules.mk b/keyboards/xiudi/xd68/rules.mk new file mode 100644 index 000000000..c6db7ea63 --- /dev/null +++ b/keyboards/xiudi/xd68/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# QMK Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode + +LAYOUTS = 65_ansi 65_ansi_split_bs 65_iso diff --git a/keyboards/xd68/xd68.c b/keyboards/xiudi/xd68/xd68.c similarity index 100% rename from keyboards/xd68/xd68.c rename to keyboards/xiudi/xd68/xd68.c diff --git a/keyboards/xd68/xd68.h b/keyboards/xiudi/xd68/xd68.h similarity index 100% rename from keyboards/xd68/xd68.h rename to keyboards/xiudi/xd68/xd68.h diff --git a/keyboards/xd75/config.h b/keyboards/xiudi/xd75/config.h similarity index 100% rename from keyboards/xd75/config.h rename to keyboards/xiudi/xd75/config.h diff --git a/keyboards/xd75/info.json b/keyboards/xiudi/xd75/info.json similarity index 100% rename from keyboards/xd75/info.json rename to keyboards/xiudi/xd75/info.json diff --git a/keyboards/xd75/keymaps/4sstylz/config.h b/keyboards/xiudi/xd75/keymaps/4sstylz/config.h similarity index 100% rename from keyboards/xd75/keymaps/4sstylz/config.h rename to keyboards/xiudi/xd75/keymaps/4sstylz/config.h diff --git a/keyboards/xd75/keymaps/4sstylz/keycodes.h b/keyboards/xiudi/xd75/keymaps/4sstylz/keycodes.h similarity index 100% rename from keyboards/xd75/keymaps/4sstylz/keycodes.h rename to keyboards/xiudi/xd75/keymaps/4sstylz/keycodes.h diff --git a/keyboards/xd75/keymaps/4sstylz/keymap.c b/keyboards/xiudi/xd75/keymaps/4sstylz/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/4sstylz/keymap.c rename to keyboards/xiudi/xd75/keymaps/4sstylz/keymap.c diff --git a/keyboards/xd75/keymaps/4sstylz/leds.h b/keyboards/xiudi/xd75/keymaps/4sstylz/leds.h similarity index 100% rename from keyboards/xd75/keymaps/4sstylz/leds.h rename to keyboards/xiudi/xd75/keymaps/4sstylz/leds.h diff --git a/keyboards/xd75/keymaps/4sstylz/readme.md b/keyboards/xiudi/xd75/keymaps/4sstylz/readme.md similarity index 100% rename from keyboards/xd75/keymaps/4sstylz/readme.md rename to keyboards/xiudi/xd75/keymaps/4sstylz/readme.md diff --git a/keyboards/xiudi/xd75/keymaps/4sstylz/rules.mk b/keyboards/xiudi/xd75/keymaps/4sstylz/rules.mk new file mode 100644 index 000000000..45ff7b8e8 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/4sstylz/rules.mk @@ -0,0 +1,30 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +COMBO_ENABLE = yes # Enable combo for special function when using multiple keys at once. +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. + +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +MIDI_ENABLE = no # MIDI support +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/xd75/keymaps/adi/config.h b/keyboards/xiudi/xd75/keymaps/adi/config.h similarity index 100% rename from keyboards/xd75/keymaps/adi/config.h rename to keyboards/xiudi/xd75/keymaps/adi/config.h diff --git a/keyboards/xd75/keymaps/adi/keymap.c b/keyboards/xiudi/xd75/keymaps/adi/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/adi/keymap.c rename to keyboards/xiudi/xd75/keymaps/adi/keymap.c diff --git a/keyboards/xd75/keymaps/adi/readme.md b/keyboards/xiudi/xd75/keymaps/adi/readme.md similarity index 100% rename from keyboards/xd75/keymaps/adi/readme.md rename to keyboards/xiudi/xd75/keymaps/adi/readme.md diff --git a/keyboards/xd75/keymaps/adi/rules.mk b/keyboards/xiudi/xd75/keymaps/adi/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/adi/rules.mk rename to keyboards/xiudi/xd75/keymaps/adi/rules.mk diff --git a/keyboards/xd75/keymaps/arpinfidel/config.h b/keyboards/xiudi/xd75/keymaps/arpinfidel/config.h similarity index 100% rename from keyboards/xd75/keymaps/arpinfidel/config.h rename to keyboards/xiudi/xd75/keymaps/arpinfidel/config.h diff --git a/keyboards/xiudi/xd75/keymaps/arpinfidel/keymap.c b/keyboards/xiudi/xd75/keymaps/arpinfidel/keymap.c new file mode 100644 index 000000000..5f7337d68 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/arpinfidel/keymap.c @@ -0,0 +1,114 @@ +/* Copyright 2017 Wunder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Layer shorthand +#define _QW 0 +#define _FN 1 + +enum my_kc { + A_BL_TG = SAFE_RANGE + // , A_BL_Y + // , A_BL_N +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | ` | = | 6 | 7 | 8 | 9 | 0 | BSPC | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | [ | ] | \ | Y | U | I | O | P | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | A | S | D | F | G | UP | DEL | DOWN | H | J | K | L | ; | ENTER | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | Z | X | C | V | B | HOME | PG UP | END | N | M | , | . | / | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | FN | LGUI | LALT | SPACE | SPACE | FN | PG DN | FN | BSPC | BSPC | RALT | RGUI | FN | RCTRL | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_QW] = LAYOUT_ortho_5x15( /* QWERTY */ + KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_MINS, KC_GRV , KC_EQL , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_BSPC, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_LBRC, KC_RBRC, KC_BSLS, KC_Y , KC_U , KC_I , KC_O , KC_P , KC_QUOT, + KC_CAPS, KC_A , KC_S , KC_D , KC_F , KC_G , KC_UP , KC_DEL , KC_DOWN, KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_ENT, + KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_HOME, KC_PGUP, KC_END , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, + KC_LCTL, TT(_FN), KC_LGUI, KC_LALT, KC_SPC , KC_SPC , TT(_FN), KC_PGDN, TT(_FN), KC_BSPC, KC_BSPC, KC_RALT, KC_RGUI, TT(_FN), KC_RCTL + ), + +/* FUNCTION + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | MS W U | | MS 2 | MS UP | MS 1 | MS 3 | RGB HD | | RGB HI | [ | ] | UP | | = | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | MS W D | | MS L | MS DN | MS R | | RGB SD | | RGB SI | - | LEFT | DOWN | RIGHT | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | RGB VD | BL TG | RGB VI | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | FN | RGB TG | | MS W L | MS W R | | RESET | | MS 1 | MS 2 | RGB RMD| RGB MD | FN | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RGB_HUD, _______, RGB_HUI, KC_F7, KC_F8, KC_F9, KC_F10 , KC_F11 , KC_F12, + KC_WH_U, _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, RGB_SAD, _______, RGB_SAI, KC_LBRC, KC_RBRC, KC_UP , _______ , KC_EQL , KC_BSLS, + KC_WH_D, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, RGB_VAD, _______, RGB_VAI, KC_MINS, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, + _______, _______, _______, _______, _______, _______, RGB_RMOD,A_BL_TG, RGB_MOD, _______, _______, _______, _______ , _______, _______, + _______, TT(_FN), RGB_TOG, _______, KC_WH_L, KC_WH_R, TT(_FN), RESET , TT(_FN), KC_BTN1, KC_BTN2, _______, _______ , TT(_FN), _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case A_BL_TG: + if (record->event.pressed) { + // toggle keycaps leds (f5 pin) + PORTF ^= (1 << 5); + } + return false; + + // case A_BL_Y: + // if (record->event.pressed) { + // keycaps_led_on(); + // } + // return false; + + // case A_BL_N: + // if (record->event.pressed) { + // keycaps_led_off(); + // } + // return false; + + default: + return true; + } +} + +// Runs whenever there is a layer state change. +layer_state_t layer_state_set_user(layer_state_t state) { + uint8_t layer = biton32(state); + + gp100_led_off(); + gp103_led_off(); + + // turns on gp100 (top left led) for odd layers + if (layer & (1<<0)) gp100_led_on(); + // turns on gp103 (top mid led) for layers 2, 6, ... + if (layer & (1<<1)) gp103_led_on(); + + return state; +} diff --git a/keyboards/xd75/keymaps/arpinfidel/readme.md b/keyboards/xiudi/xd75/keymaps/arpinfidel/readme.md similarity index 100% rename from keyboards/xd75/keymaps/arpinfidel/readme.md rename to keyboards/xiudi/xd75/keymaps/arpinfidel/readme.md diff --git a/keyboards/xiudi/xd75/keymaps/arpinfidel/rules.mk b/keyboards/xiudi/xd75/keymaps/arpinfidel/rules.mk new file mode 100644 index 000000000..5130423e4 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/arpinfidel/rules.mk @@ -0,0 +1,16 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite diff --git a/keyboards/xd75/keymaps/atomic_style/config.h b/keyboards/xiudi/xd75/keymaps/atomic_style/config.h similarity index 100% rename from keyboards/xd75/keymaps/atomic_style/config.h rename to keyboards/xiudi/xd75/keymaps/atomic_style/config.h diff --git a/keyboards/xd75/keymaps/atomic_style/keymap.c b/keyboards/xiudi/xd75/keymaps/atomic_style/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/atomic_style/keymap.c rename to keyboards/xiudi/xd75/keymaps/atomic_style/keymap.c diff --git a/keyboards/xd75/keymaps/atomic_style/readme.md b/keyboards/xiudi/xd75/keymaps/atomic_style/readme.md similarity index 100% rename from keyboards/xd75/keymaps/atomic_style/readme.md rename to keyboards/xiudi/xd75/keymaps/atomic_style/readme.md diff --git a/keyboards/xd75/keymaps/atomic_style/rules.mk b/keyboards/xiudi/xd75/keymaps/atomic_style/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/atomic_style/rules.mk rename to keyboards/xiudi/xd75/keymaps/atomic_style/rules.mk diff --git a/keyboards/xd75/keymaps/atomic_style_jp/keymap.c b/keyboards/xiudi/xd75/keymaps/atomic_style_jp/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/atomic_style_jp/keymap.c rename to keyboards/xiudi/xd75/keymaps/atomic_style_jp/keymap.c diff --git a/keyboards/xd75/keymaps/atomic_style_jp/readme.md b/keyboards/xiudi/xd75/keymaps/atomic_style_jp/readme.md similarity index 100% rename from keyboards/xd75/keymaps/atomic_style_jp/readme.md rename to keyboards/xiudi/xd75/keymaps/atomic_style_jp/readme.md diff --git a/keyboards/xd75/keymaps/bbaserdem/config.h b/keyboards/xiudi/xd75/keymaps/bbaserdem/config.h similarity index 100% rename from keyboards/xd75/keymaps/bbaserdem/config.h rename to keyboards/xiudi/xd75/keymaps/bbaserdem/config.h diff --git a/keyboards/xd75/keymaps/bbaserdem/keymap.c b/keyboards/xiudi/xd75/keymaps/bbaserdem/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/bbaserdem/keymap.c rename to keyboards/xiudi/xd75/keymaps/bbaserdem/keymap.c diff --git a/keyboards/xd75/keymaps/bbaserdem/readme.md b/keyboards/xiudi/xd75/keymaps/bbaserdem/readme.md similarity index 100% rename from keyboards/xd75/keymaps/bbaserdem/readme.md rename to keyboards/xiudi/xd75/keymaps/bbaserdem/readme.md diff --git a/keyboards/xd75/keymaps/bbaserdem/rules.mk b/keyboards/xiudi/xd75/keymaps/bbaserdem/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/bbaserdem/rules.mk rename to keyboards/xiudi/xd75/keymaps/bbaserdem/rules.mk diff --git a/keyboards/xd75/keymaps/billypython/config.h b/keyboards/xiudi/xd75/keymaps/billypython/config.h similarity index 100% rename from keyboards/xd75/keymaps/billypython/config.h rename to keyboards/xiudi/xd75/keymaps/billypython/config.h diff --git a/keyboards/xd75/keymaps/billypython/keymap.c b/keyboards/xiudi/xd75/keymaps/billypython/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/billypython/keymap.c rename to keyboards/xiudi/xd75/keymaps/billypython/keymap.c diff --git a/keyboards/xiudi/xd75/keymaps/billypython/rules.mk b/keyboards/xiudi/xd75/keymaps/billypython/rules.mk new file mode 100644 index 000000000..a4fd56ac1 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/billypython/rules.mk @@ -0,0 +1,15 @@ +AUDIO_ENABLE = no +BACKLIGHT_ENABLE = no +BLUETOOTH_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MIDI_ENABLE = no +MOUSEKEY_ENABLE = yes +NKRO_ENABLE = yes +RGBLIGHT_ENABLE = no +SLEEP_LED_ENABLE = no +TAP_DANCE_ENABLE = no +UNICODE_ENABLE = yes +VISUALIZER_ENABLE = no diff --git a/keyboards/xd75/keymaps/boy_314/config.h b/keyboards/xiudi/xd75/keymaps/boy_314/config.h similarity index 100% rename from keyboards/xd75/keymaps/boy_314/config.h rename to keyboards/xiudi/xd75/keymaps/boy_314/config.h diff --git a/keyboards/xd75/keymaps/boy_314/keymap.c b/keyboards/xiudi/xd75/keymaps/boy_314/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/boy_314/keymap.c rename to keyboards/xiudi/xd75/keymaps/boy_314/keymap.c diff --git a/keyboards/xd75/keymaps/boy_314/readme.md b/keyboards/xiudi/xd75/keymaps/boy_314/readme.md similarity index 100% rename from keyboards/xd75/keymaps/boy_314/readme.md rename to keyboards/xiudi/xd75/keymaps/boy_314/readme.md diff --git a/keyboards/xiudi/xd75/keymaps/boy_314/rules.mk b/keyboards/xiudi/xd75/keymaps/boy_314/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/xd75/keymaps/bramver/config.h b/keyboards/xiudi/xd75/keymaps/bramver/config.h similarity index 100% rename from keyboards/xd75/keymaps/bramver/config.h rename to keyboards/xiudi/xd75/keymaps/bramver/config.h diff --git a/keyboards/xd75/keymaps/bramver/keymap.c b/keyboards/xiudi/xd75/keymaps/bramver/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/bramver/keymap.c rename to keyboards/xiudi/xd75/keymaps/bramver/keymap.c diff --git a/keyboards/xd75/keymaps/bramver/readme.md b/keyboards/xiudi/xd75/keymaps/bramver/readme.md similarity index 100% rename from keyboards/xd75/keymaps/bramver/readme.md rename to keyboards/xiudi/xd75/keymaps/bramver/readme.md diff --git a/keyboards/xd75/keymaps/bramver/rules.mk b/keyboards/xiudi/xd75/keymaps/bramver/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/bramver/rules.mk rename to keyboards/xiudi/xd75/keymaps/bramver/rules.mk diff --git a/keyboards/xd75/keymaps/bulbizarre/config.h b/keyboards/xiudi/xd75/keymaps/bulbizarre/config.h similarity index 100% rename from keyboards/xd75/keymaps/bulbizarre/config.h rename to keyboards/xiudi/xd75/keymaps/bulbizarre/config.h diff --git a/keyboards/xd75/keymaps/bulbizarre/keymap.c b/keyboards/xiudi/xd75/keymaps/bulbizarre/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/bulbizarre/keymap.c rename to keyboards/xiudi/xd75/keymaps/bulbizarre/keymap.c diff --git a/keyboards/xd75/keymaps/bulbizarre/readme.md b/keyboards/xiudi/xd75/keymaps/bulbizarre/readme.md similarity index 100% rename from keyboards/xd75/keymaps/bulbizarre/readme.md rename to keyboards/xiudi/xd75/keymaps/bulbizarre/readme.md diff --git a/keyboards/xd75/keymaps/bulbizarre/rules.mk b/keyboards/xiudi/xd75/keymaps/bulbizarre/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/bulbizarre/rules.mk rename to keyboards/xiudi/xd75/keymaps/bulbizarre/rules.mk diff --git a/keyboards/xd75/keymaps/buzzlighter1/config.h b/keyboards/xiudi/xd75/keymaps/buzzlighter1/config.h similarity index 100% rename from keyboards/xd75/keymaps/buzzlighter1/config.h rename to keyboards/xiudi/xd75/keymaps/buzzlighter1/config.h diff --git a/keyboards/xd75/keymaps/buzzlighter1/keymap.c b/keyboards/xiudi/xd75/keymaps/buzzlighter1/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/buzzlighter1/keymap.c rename to keyboards/xiudi/xd75/keymaps/buzzlighter1/keymap.c diff --git a/keyboards/xd75/keymaps/buzzlighter1/readme.md b/keyboards/xiudi/xd75/keymaps/buzzlighter1/readme.md similarity index 100% rename from keyboards/xd75/keymaps/buzzlighter1/readme.md rename to keyboards/xiudi/xd75/keymaps/buzzlighter1/readme.md diff --git a/keyboards/xiudi/xd75/keymaps/buzzlighter1/rules.mk b/keyboards/xiudi/xd75/keymaps/buzzlighter1/rules.mk new file mode 100644 index 000000000..d018ebecf --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/buzzlighter1/rules.mk @@ -0,0 +1,4 @@ + +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = no diff --git a/keyboards/xd75/keymaps/c4software_bepo/config.h b/keyboards/xiudi/xd75/keymaps/c4software_bepo/config.h similarity index 100% rename from keyboards/xd75/keymaps/c4software_bepo/config.h rename to keyboards/xiudi/xd75/keymaps/c4software_bepo/config.h diff --git a/keyboards/xiudi/xd75/keymaps/c4software_bepo/keymap.c b/keyboards/xiudi/xd75/keymaps/c4software_bepo/keymap.c new file mode 100644 index 000000000..fdfe3be16 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/c4software_bepo/keymap.c @@ -0,0 +1,68 @@ +/* Copyright 2017 Valentin Brosseau + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "keymap_bepo.h" + +// Layer shorthand +#define _BP 0 +#define _FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Native BepoDev for compatible computer + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | " | < | > | ( | ) | % | VOL- | VOL+ | @ | + | - | / | * | = | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | B | E_ACUT | P | O | $ | E_GRAV | DEL | E_CIRC | V | D | L | J | Z | C_CEDIL| + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | RALT | A | U | I | E | , | BACKSP | ENTER | C | T | S | R | N | M | W | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | A_GRAV | Y | X | . | K | BACKSP | ENTER | ’ | Q | G | H | F | UP | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LALT | LCTRL | FN | LGUI | SPACE | SPACE | RALT | RALT | SPACE | SPACE | RGUI | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_BP] = LAYOUT_ortho_5x15( /* BepoDev */ + KC_ESC, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, BP_PERC, KC_VOLD, KC_VOLU, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, + KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_DLR, BP_EGRV, KC_DEL, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_CCED, + KC_RALT, BP_A, BP_U, BP_I, BP_E, BP_COMM, KC_BSPC, KC_ENT, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, BP_W, + KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_BSPC, KC_ENT, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, KC_UP, KC_RSFT, + KC_LALT, KC_LCTL, MO(_FN), KC_LGUI, KC_SPC, KC_SPC, KC_RALT, KC_RALT, KC_SPC, KC_SPC, KC_RGUI, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT + ), + +/* FUNCTION + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | P/ | P* | F9 | F10 | F11 | F12 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | P7 | P8 | P9 | - | RGB_TOG| RGB_MOD| RGB_HUI| + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | PREV | PLAY | NEXT | STOP | | | | P4 | P5 | P6 | + | RGB_SAI| RGB_SAD| RGB_VAI| + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | VOL- | MUTE | VOL+ | | | | | P1 | P2 | P3 | ENT | RGB_VAD| Home | RGB_HUD| + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RESET | | FN | | | | | | P0 | P0 | . | FN | | End | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_SLSH, KC_ASTR, KC_F9, KC_F10, KC_F11, KC_F12, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_MINS, RGB_TOG, RGB_MOD, RGB_HUI, + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PLUS, RGB_SAI, RGB_SAD, RGB_VAI, + KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_ENT, RGB_VAD, KC_HOME, RGB_HUD, + RESET, KC_TRNS, MO(_FN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_KP_0, KC_KP_0, KC_PDOT, MO(_FN), KC_TRNS, KC_END, KC_TRNS + ) +}; diff --git a/keyboards/xd75/keymaps/c4software_bepo/readme.md b/keyboards/xiudi/xd75/keymaps/c4software_bepo/readme.md similarity index 100% rename from keyboards/xd75/keymaps/c4software_bepo/readme.md rename to keyboards/xiudi/xd75/keymaps/c4software_bepo/readme.md diff --git a/keyboards/xd75/keymaps/c4software_bepo/rules.mk b/keyboards/xiudi/xd75/keymaps/c4software_bepo/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/c4software_bepo/rules.mk rename to keyboards/xiudi/xd75/keymaps/c4software_bepo/rules.mk diff --git a/keyboards/xd75/keymaps/cbbrowne/config.h b/keyboards/xiudi/xd75/keymaps/cbbrowne/config.h similarity index 100% rename from keyboards/xd75/keymaps/cbbrowne/config.h rename to keyboards/xiudi/xd75/keymaps/cbbrowne/config.h diff --git a/keyboards/xiudi/xd75/keymaps/cbbrowne/keymap.c b/keyboards/xiudi/xd75/keymaps/cbbrowne/keymap.c new file mode 100644 index 000000000..1b29686cf --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/cbbrowne/keymap.c @@ -0,0 +1,310 @@ +/* Copyright 2017 Christopher B Browne + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 + +/* Fillers to make layering more clear */ +#define ___T___ KC_TRNS + +/* Layer shorthand */ + +enum layers { + _QWERTY = 0, /* Qwerty mapping */ + _LOWER, /* Lower layer, where top line has symbols !@#$%^&*() */ + _RAISE, /* Raised layer, where top line has digits 1234567890 */ + _ADJUST, /* Special Adjust layer coming via tri-placement */ + _FUNCTION /* Function key layer */ +}; + + +/* Macros need to be uniquely identified; using an enum to do this + automatically + */ + +enum macro_id { + M_LED = 0, + M_USERNAME, + M_RANDDIGIT, + M_RANDLETTER, + M_VERSION, + MACRO_UPPER, + MACRO_LOWER, +}; + +/* I want some short forms for keycodes so that they fit into + limited-width cells */ + +#define M_LOWER M(MACRO_LOWER) +#define M_UPPER M(MACRO_UPPER) +#define ROT_LED M(M_LED) /* Rotate LED */ +#define QWERTY DF(_QWERTY) /* Switch to QWERTY layout */ +#define QCENT2 DF(_QCENT2) /* Switch to QWERTY-with-centre layout */ +#define USERNAME M(M_USERNAME) /* shortcut for username */ +#define RANDDIG M(M_RANDDIGIT) +#define RANDALP M(M_RANDLETTER) +#define CTLENTER MT(MOD_RCTL, KC_ENT) +#define SHIFTQUOTE MT(MOD_RSFT, KC_QUOT) +#define ALTRIGHT MT(MOD_LALT, KC_RGHT) +#define MVERSION M(M_VERSION) +#define ALTSLASH LALT(KC_SLSH) +#define FUNCTION MO(_FUNCTION) +#define MRAISE MO(_RAISE) +#define MLOWER MO(_LOWER) +#define ALTPLUS ALT_T(KC_PLUS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY - MIT ENHANCED / GRID COMPATIBLE + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | BRITE | LCTRL | LALT | LGUI | RAISE | XXXXXX . SPACE | LOWER | RGUI | RALT | RCTRL | FN | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + /* layout for centred keypad + qwerty... + +|ESC| 1 | 2 | 3 | 4 | 5 | ? | ? | ? | ? | 6 | 7 | 8 | 9 | 0 | +|TAB| q | w | e | r | t | ? | ? | ? | ? | y | u | i | o | p | +|CTL| a | s | d | f | g | ? | ? | ? | ? | h | j | k | l | ; | +|SHF| z | x | c | v | b | ? | ? | ? | ? | n | m | , | . | / | +|ALT|LED| | | | | | | | | | | | | | + + +keys needing to be assigned: +51 - KC_TAB - tab + - ROT_LED - rotate LED +15 - KC_LALT - Left ALT +53,55 - M_RAISE - switch to RAISE layer +5b - M_LOWER - switch to LOWER layer +56,59,5a - KC_SPC - space +5c - KC_LEFT - famous arrows +5d - KC_DOWN - famous arrows +5e - KC_UP - famous arrows +5f - KC_RIGHT - famous arrows +3f - KC_ENT - enter + - KC_GRV - leftwards quote +4f - KC_QUOT - rightwards quote +1f - KC_BSPC - backspace +11 - KC_ESC +19 - KC_GRV - ` - raised +19 - KC_TILD - ~ - lowered + + */ + +[_QWERTY] = LAYOUT_ortho_5x15( /* QWERTY, with keypad in the centre */ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC , + KC_LALT, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_7, KC_8, KC_EQL, KC_Y, KC_U, KC_I, KC_O, KC_P, ALTPLUS , + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC,KC_MINS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER , + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, KC_EQL, KC_BSLS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE , + KC_TAB, FUNCTION, MRAISE, FUNCTION, MRAISE, KC_SPC,KC_PGDN, KC_MINS, KC_SPC, KC_SPC, MLOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* LOWER + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + +[_LOWER] = LAYOUT_ortho_5x15( /* LOWERED */ + ___T___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_TILD, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 , + ___T___, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_INS , + ___T___, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, ___T___, ___T___, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* RAISED + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | | | INS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | XXXXXX . | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | XXXXXX . | | | + * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | XXXXXX . | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + +[_RAISE] = LAYOUT_ortho_5x15 ( /* RAISED */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, MVERSION, _______, KC_GRV, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ___T___ , + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, USERNAME, _______, KC_7, KC_8, KC_LCBR, KC_RCBR, _______, _______, KC_INS , + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, RANDDIG, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, ___T___, ___T___ , + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RANDALP, _______, _______, _______, _______, ___T___, ___T___, _______, _______ , + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* FUNCTION + * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. + * | NUM LK | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| + * | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX | | WHEEL+ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| + * | RGB TG | RGB MD | RGB HI | RGB HD | RGB SI | RGB SD | RGB VI | RGB VD | BL TOG | BL INC | BL DEC | XXXXXX | | MOUS U | WHEEL- | + * |--------+--------+--------+--------+--------+-- 2u -----------+--------+--------+--------+--------+-----------------+--------+--------| + * | RESET | | QWERTY | COLEMK | DVORAK | XXXXXX . MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + +[_FUNCTION] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_NLCK, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET, RESET, + KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR , + KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U , + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, ___T___, ___T___, KC_MS_U, KC_WH_D , + RESET , _______, DF(_QWERTY), DF(_QWERTY), DF(_QWERTY), KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R + ) +}; + +/* This bit of logic seeds a wee linear congruential random number generator */ +/* lots of prime numbers everywhere... */ +static uint16_t random_value = 157; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + uint8_t clockbyte=0; + clockbyte = TCNT1 % 256; + uint8_t rval; + /* MACRODOWN only works in this function */ + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); +#ifdef BACKLIGHT_ENABLE + backlight_step(); +#endif + } else { + unregister_code(KC_RSFT); + } + break; + case M_USERNAME: + if (record->event.pressed) { + SEND_STRING("cbbrowne"); + } + break; + case M_VERSION: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP); + } + break; + case M_RANDDIGIT: + /* Generate, based on random number generator, a keystroke for + a numeric digit chosen at random */ + random_value = ((random_value + randadd) * randmul) % randmod; + if (record->event.pressed) { + /* Here, we mix the LCRNG with low bits from one of the system + clocks via XOR in the theory that this may be more random + than either separately */ + rval = (random_value ^ clockbyte) % 10; + /* Note that KC_1 thru KC_0 are a contiguous range */ + register_code (KC_1 + rval); + unregister_code (KC_1 + rval); + } + break; + case M_RANDLETTER: + /* Generate, based on random number generator, a keystroke for + a letter chosen at random */ + /* Here, we mix the LCRNG with low bits from one of the system + clocks via XOR in the theory that this may be more random + than either separately */ + random_value = ((random_value + randadd) * randmul) % randmod; + if (record->event.pressed) { + rval = (random_value ^ clockbyte) % 26; + register_code (KC_A + rval); + unregister_code (KC_A + rval); + } + break; + case MACRO_UPPER: + if (record->event.pressed) + { + layer_on(_RAISE); +#ifdef BACKLIGHT_ENABLE + breathing_period_set(2); + breathing_pulse(); +#endif + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + else + { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + break; + case MACRO_LOWER: + if (record->event.pressed) + { + layer_on(_LOWER); +#ifdef BACKLIGHT_ENABLE + breathing_period_set(2); + breathing_pulse(); +#endif + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + else + { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + break; + } + return MACRO_NONE; +}; + +void matrix_init_user(void) { + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(325,255,255); +} + +layer_state_t layer_state_set_user(layer_state_t state) { + switch(biton32(state)) { + case _QWERTY: + rgblight_sethsv_white(); + break; + case _LOWER: + rgblight_sethsv_blue(); + break; + case _RAISE: + rgblight_sethsv_green(); + break; + case _ADJUST: + rgblight_sethsv_orange(); + break; + case _FUNCTION: + rgblight_sethsv_red(); + break; + default: + rgblight_sethsv(325,255,255); + break; + } + return state; +} diff --git a/keyboards/xd75/keymaps/cbbrowne/readme.md b/keyboards/xiudi/xd75/keymaps/cbbrowne/readme.md similarity index 100% rename from keyboards/xd75/keymaps/cbbrowne/readme.md rename to keyboards/xiudi/xd75/keymaps/cbbrowne/readme.md diff --git a/keyboards/xiudi/xd75/keymaps/cbbrowne/rules.mk b/keyboards/xiudi/xd75/keymaps/cbbrowne/rules.mk new file mode 100644 index 000000000..9b7d553c9 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/cbbrowne/rules.mk @@ -0,0 +1,19 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/xd75/keymaps/clanghans/config.h b/keyboards/xiudi/xd75/keymaps/clanghans/config.h similarity index 100% rename from keyboards/xd75/keymaps/clanghans/config.h rename to keyboards/xiudi/xd75/keymaps/clanghans/config.h diff --git a/keyboards/xd75/keymaps/clanghans/keymap.c b/keyboards/xiudi/xd75/keymaps/clanghans/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/clanghans/keymap.c rename to keyboards/xiudi/xd75/keymaps/clanghans/keymap.c diff --git a/keyboards/xd75/keymaps/clanghans/readme.md b/keyboards/xiudi/xd75/keymaps/clanghans/readme.md similarity index 100% rename from keyboards/xd75/keymaps/clanghans/readme.md rename to keyboards/xiudi/xd75/keymaps/clanghans/readme.md diff --git a/keyboards/xd75/keymaps/colinta/config.h b/keyboards/xiudi/xd75/keymaps/colinta/config.h similarity index 100% rename from keyboards/xd75/keymaps/colinta/config.h rename to keyboards/xiudi/xd75/keymaps/colinta/config.h diff --git a/keyboards/xd75/keymaps/colinta/keymap.c b/keyboards/xiudi/xd75/keymaps/colinta/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/colinta/keymap.c rename to keyboards/xiudi/xd75/keymaps/colinta/keymap.c diff --git a/keyboards/xd75/keymaps/colinta/readme.md b/keyboards/xiudi/xd75/keymaps/colinta/readme.md similarity index 100% rename from keyboards/xd75/keymaps/colinta/readme.md rename to keyboards/xiudi/xd75/keymaps/colinta/readme.md diff --git a/keyboards/xd75/keymaps/daniel/keymap.c b/keyboards/xiudi/xd75/keymaps/daniel/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/daniel/keymap.c rename to keyboards/xiudi/xd75/keymaps/daniel/keymap.c diff --git a/keyboards/xd75/keymaps/daniel/readme.md b/keyboards/xiudi/xd75/keymaps/daniel/readme.md similarity index 100% rename from keyboards/xd75/keymaps/daniel/readme.md rename to keyboards/xiudi/xd75/keymaps/daniel/readme.md diff --git a/keyboards/xd75/keymaps/davidrambo/config.h b/keyboards/xiudi/xd75/keymaps/davidrambo/config.h similarity index 100% rename from keyboards/xd75/keymaps/davidrambo/config.h rename to keyboards/xiudi/xd75/keymaps/davidrambo/config.h diff --git a/keyboards/xd75/keymaps/davidrambo/keymap.c b/keyboards/xiudi/xd75/keymaps/davidrambo/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/davidrambo/keymap.c rename to keyboards/xiudi/xd75/keymaps/davidrambo/keymap.c diff --git a/keyboards/xd75/keymaps/davidrambo/readme.md b/keyboards/xiudi/xd75/keymaps/davidrambo/readme.md similarity index 100% rename from keyboards/xd75/keymaps/davidrambo/readme.md rename to keyboards/xiudi/xd75/keymaps/davidrambo/readme.md diff --git a/keyboards/xd75/keymaps/davidrambo/rules.mk b/keyboards/xiudi/xd75/keymaps/davidrambo/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/davidrambo/rules.mk rename to keyboards/xiudi/xd75/keymaps/davidrambo/rules.mk diff --git a/keyboards/xd75/keymaps/default/keymap.c b/keyboards/xiudi/xd75/keymaps/default/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/default/keymap.c rename to keyboards/xiudi/xd75/keymaps/default/keymap.c diff --git a/keyboards/xd75/keymaps/default/readme.md b/keyboards/xiudi/xd75/keymaps/default/readme.md similarity index 100% rename from keyboards/xd75/keymaps/default/readme.md rename to keyboards/xiudi/xd75/keymaps/default/readme.md diff --git a/keyboards/xd75/keymaps/developper_bepo/config.h b/keyboards/xiudi/xd75/keymaps/developper_bepo/config.h similarity index 100% rename from keyboards/xd75/keymaps/developper_bepo/config.h rename to keyboards/xiudi/xd75/keymaps/developper_bepo/config.h diff --git a/keyboards/xiudi/xd75/keymaps/developper_bepo/keymap.c b/keyboards/xiudi/xd75/keymaps/developper_bepo/keymap.c new file mode 100644 index 000000000..121b18438 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/developper_bepo/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2017 Quentin Lebastard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include "keymap_bepo.h" + +// Layer shorthand +#define _BP 0 +#define _FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | $ | " | { | } | ( | ) | VOL- | MUTE | VOL+ | + | - | / | * | = | % | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | B | E_ACUT | P | O | E_GRAV | | | | ^ | V | D | L | J | Z | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | ESC | A | U | I | E | , | HOME | | END | C | T | S | R | N | M | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | W | Y | X | . | K | PAGE UP| | PAGE D | ? | Q | G | H | F | RSHIFT | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | LGUI | ALT | | _ |ENTER/FN| DEL | | BACKSP |SPACE/FN| _ | ALT | ALT | RGUI | LCTRL | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_BP] = LAYOUT_ortho_5x15( /* BepoDev */ + BP_DLR, BP_DQUO, BP_LCBR, BP_RCBR, BP_LPRN, BP_RPRN, KC_VOLD, KC_MUTE, KC_VOLU, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, BP_PERC, + KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_KP_7, KC_KP_8, KC_KP_9, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, + KC_ESC, BP_A, BP_U, BP_I, BP_E, BP_COMM, KC_HOME, KC_KP_5, KC_END, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, + KC_LSFT, BP_W, BP_Y, BP_X, BP_DOT, BP_K, KC_PGUP, KC_END, KC_PGDOWN, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, KC_RSFT, + KC_LCTL, KC_LGUI, KC_RALT, KC_LGUI, BP_UNDS, LT(_FN,KC_ENT), KC_DEL, KC_KP_0, KC_BSPC, LT(_FN,KC_SPC), BP_UNDS, KC_RALT, KC_RALT, KC_RGUI, KC_LCTL + ), + + +/* FUNCTION + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | PREV | PAUSE | NEXT | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | \ | [ | ] | & | | | | | LEFT | DOWN | UP | RIGHT | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | < | > | @ | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | _ | MO(_FN)| | | | | MO(_FN)| _ | | | | RESET | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, S(BP_DQUO), S(BP_LDAQ), S(BP_RDAQ), S(BP_LPRN), S(BP_RPRN), _______, _______, _______, S(BP_AT), S(BP_PLUS), S(BP_MINS), S(BP_SLSH), S(BP_ASTR), S(BP_EQL), + _______, RALT(BP_B), BP_BSLS, BP_LBRC, BP_RBRC, RALT(BP_P), _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______, + _______, BP_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, BP_LABK, BP_RABK, BP_AT , _______, _______, + _______, _______, _______, _______, _______, LT(_FN,KC_ENT), _______, _______, _______, LT(_FN,KC_SPC), _______, _______, _______, _______, RESET + ) + +}; diff --git a/keyboards/xd75/keymaps/developper_bepo/readme.md b/keyboards/xiudi/xd75/keymaps/developper_bepo/readme.md similarity index 100% rename from keyboards/xd75/keymaps/developper_bepo/readme.md rename to keyboards/xiudi/xd75/keymaps/developper_bepo/readme.md diff --git a/keyboards/xd75/keymaps/developper_bepo/rules.mk b/keyboards/xiudi/xd75/keymaps/developper_bepo/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/developper_bepo/rules.mk rename to keyboards/xiudi/xd75/keymaps/developper_bepo/rules.mk diff --git a/keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h b/keyboards/xiudi/xd75/keymaps/dyn_macro_tap_dance/config.h similarity index 100% rename from keyboards/xd75/keymaps/dyn_macro_tap_dance/config.h rename to keyboards/xiudi/xd75/keymaps/dyn_macro_tap_dance/config.h diff --git a/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c b/keyboards/xiudi/xd75/keymaps/dyn_macro_tap_dance/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c rename to keyboards/xiudi/xd75/keymaps/dyn_macro_tap_dance/keymap.c diff --git a/keyboards/xd75/keymaps/dyn_macro_tap_dance/readme.md b/keyboards/xiudi/xd75/keymaps/dyn_macro_tap_dance/readme.md similarity index 100% rename from keyboards/xd75/keymaps/dyn_macro_tap_dance/readme.md rename to keyboards/xiudi/xd75/keymaps/dyn_macro_tap_dance/readme.md diff --git a/keyboards/xd75/keymaps/dyn_macro_tap_dance/rules.mk b/keyboards/xiudi/xd75/keymaps/dyn_macro_tap_dance/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/dyn_macro_tap_dance/rules.mk rename to keyboards/xiudi/xd75/keymaps/dyn_macro_tap_dance/rules.mk diff --git a/keyboards/xd75/keymaps/emilyh/config.h b/keyboards/xiudi/xd75/keymaps/emilyh/config.h similarity index 100% rename from keyboards/xd75/keymaps/emilyh/config.h rename to keyboards/xiudi/xd75/keymaps/emilyh/config.h diff --git a/keyboards/xd75/keymaps/emilyh/keymap.c b/keyboards/xiudi/xd75/keymaps/emilyh/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/emilyh/keymap.c rename to keyboards/xiudi/xd75/keymaps/emilyh/keymap.c diff --git a/keyboards/xd75/keymaps/emilyh/readme.md b/keyboards/xiudi/xd75/keymaps/emilyh/readme.md similarity index 100% rename from keyboards/xd75/keymaps/emilyh/readme.md rename to keyboards/xiudi/xd75/keymaps/emilyh/readme.md diff --git a/keyboards/xd75/keymaps/emilyh/rules.mk b/keyboards/xiudi/xd75/keymaps/emilyh/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/emilyh/rules.mk rename to keyboards/xiudi/xd75/keymaps/emilyh/rules.mk diff --git a/keyboards/xd75/keymaps/ericgebhart/config.h b/keyboards/xiudi/xd75/keymaps/ericgebhart/config.h similarity index 100% rename from keyboards/xd75/keymaps/ericgebhart/config.h rename to keyboards/xiudi/xd75/keymaps/ericgebhart/config.h diff --git a/keyboards/xd75/keymaps/ericgebhart/keymap.c b/keyboards/xiudi/xd75/keymaps/ericgebhart/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/ericgebhart/keymap.c rename to keyboards/xiudi/xd75/keymaps/ericgebhart/keymap.c diff --git a/keyboards/xd75/keymaps/ericgebhart/readme.md b/keyboards/xiudi/xd75/keymaps/ericgebhart/readme.md similarity index 100% rename from keyboards/xd75/keymaps/ericgebhart/readme.md rename to keyboards/xiudi/xd75/keymaps/ericgebhart/readme.md diff --git a/keyboards/xd75/keymaps/ericgebhart/rules.mk b/keyboards/xiudi/xd75/keymaps/ericgebhart/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/ericgebhart/rules.mk rename to keyboards/xiudi/xd75/keymaps/ericgebhart/rules.mk diff --git a/keyboards/xd75/keymaps/fabian/config.h b/keyboards/xiudi/xd75/keymaps/fabian/config.h similarity index 100% rename from keyboards/xd75/keymaps/fabian/config.h rename to keyboards/xiudi/xd75/keymaps/fabian/config.h diff --git a/keyboards/xd75/keymaps/fabian/keymap.c b/keyboards/xiudi/xd75/keymaps/fabian/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/fabian/keymap.c rename to keyboards/xiudi/xd75/keymaps/fabian/keymap.c diff --git a/keyboards/xiudi/xd75/keymaps/fabian/rules.mk b/keyboards/xiudi/xd75/keymaps/fabian/rules.mk new file mode 100644 index 000000000..3ff9b75d3 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/fabian/rules.mk @@ -0,0 +1,34 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + diff --git a/keyboards/xd75/keymaps/french/config.h b/keyboards/xiudi/xd75/keymaps/french/config.h similarity index 100% rename from keyboards/xd75/keymaps/french/config.h rename to keyboards/xiudi/xd75/keymaps/french/config.h diff --git a/keyboards/xiudi/xd75/keymaps/french/keymap.c b/keyboards/xiudi/xd75/keymaps/french/keymap.c new file mode 100644 index 000000000..8d5d2b634 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/french/keymap.c @@ -0,0 +1,56 @@ +#include "keymap_french.c" +#include QMK_KEYBOARD_H + + +// Layer shorthand +#define _AZ 0 +#define _FN 1 + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* AZERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | ESC | & | é | " | ' | ( | - | è | _ | ç | à | ) | = | INSERT | BACKSP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | TAB | a | z | e | r | t | y | u | i | o | p | ^ | $ | ENTER | PG UP | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| + * | CAP LK | q | s | d | f | g | h | j | k | l | m | ù | * | ENTER | PG DN | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | LSHIFT | w | x | c | v | b | n | , | ; | : | ! | < | LSHIFT | UP | DEL | + * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| + * | LCTRL | CMD | ALT | FN | SPACE | SPACE | SPACE | SPACE | ALGR | MENU | HOME | END | LEFT | DOWN | RIGHT | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_AZ] = LAYOUT_ortho_5x15( /* AZERTY */ + FR_ESC, FR_AMPR, FR_EACU, FR_DQUO, FR_QUOT, FR_LPAR, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPAR, FR_EQUA, FR_INST, FR_BSPC, + FR_TAB, FR_A, FR_Z, FR_E, FR_R, FR_T, FR_Y, FR_U, FR_I, FR_O, FR_P, FR_HAT, FR_DLR, FR_ENTR, FR_PGUP, + FR_CAPL, FR_Q, FR_S, FR_D, FR_F, FR_G, FR_H, FR_J, FR_K, FR_L, FR_M, FR_UGRV, FR_AST, FR_ENTR, FR_PGDN, + FR_LSFT, FR_W, FR_X, FR_C, FR_V, FR_B, FR_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXCL, FR_LABK, FR_RSFT, FR_UP, FR_DEL, + FR_LCTR, FR_LCMD, FR_LALT, MO(_FN), FR_SPAC, FR_SPAC, FR_SPAC, FR_SPAC, FR_ALGR, FR_MENU, FR_HOME, FR_END, FR_LEFT, FR_DOWN, FR_RIGT + ), + + +/* FUNCTION + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PRINT | LED | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | PREV | PLAY | NEXT | | | | | NUM LCK| 7 | 8 | 9 | * | | LED+ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | VOL- | MUTE | VOL+ | | | | | | 4 | 5 | 6 | - | | LED- | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | 1 | 2 | 3 | + | | LEDMAX | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | RESET | | | FN | | | | | | | 0 | . | PENT | | LEDLVL | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + + [_FN] = LAYOUT_ortho_5x15( /* FUNCTION */ + FR_EMPT, FR_F1, FR_F2, FR_F3, FR_F4, FR_F5, FR_F6, FR_F7, FR_F8, FR_F9, FR_F10, FR_F11, FR_F12, FR_PSCR, BL_TOGG, + FR_EMPT, FR_MPRV, FR_MPLY, FR_MNXT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_NUML, FR_7, FR_8, FR_9, FR_MULT, FR_EMPT, BL_INC, + FR_EMPT, FR_MVDN, FR_MUTE, FR_MVUP, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_4, FR_5, FR_6, FR_MOIN, FR_EMPT, BL_DEC, + FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_1, FR_2, FR_3, FR_PLUS, FR_EMPT, BL_ON, + RESET, FR_EMPT, FR_EMPT, FR_TRANS, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_0, FR_DOT, FR_ENTK, FR_EMPT, BL_STEP + ) +}; diff --git a/keyboards/xiudi/xd75/keymaps/french/keymap_french.c b/keyboards/xiudi/xd75/keymaps/french/keymap_french.c new file mode 100644 index 000000000..c34613838 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/french/keymap_french.c @@ -0,0 +1,157 @@ +enum french_key { + + FR_EMPT = 0x00, + FR_TRANS, + FR_Q = 0x04, + FR_B, + FR_C, + FR_D, + FR_E, + FR_F, + FR_G, + FR_H, + FR_I, + FR_J, + FR_K, + FR_L, + FR_COMM, /* 0x10 */ + FR_N, + FR_O, + FR_P, + FR_A, + FR_R, + FR_S, + FR_T, + FR_U, + FR_V, + FR_Z, + FR_X, + FR_Y, + FR_W, + FR_AMPR, + FR_EACU, + FR_DQUO, /* 0x20 */ + FR_QUOT, + FR_LPAR, + FR_MINS, + FR_EGRV, + FR_UNDS, + FR_CCED, + FR_AGRV, + FR_ENTR, + FR_ESC, + FR_BSPC, + FR_TAB, + FR_SPAC, + FR_RPAR, + FR_EQUA, + FR_HAT, + FR_DLR, /* 0x30 */ + FR_AST =0x32, + FR_M, + FR_UGRV, + FR_SCLN =0x36, + FR_COLN, + FR_EXCL, + FR_CAPL, + FR_F1, + FR_F2, + FR_F3, + FR_F4, + FR_F5, + FR_F6, + FR_F7, /* 0x40 */ + FR_F8, + FR_F9, + FR_F10, + FR_F11, + FR_F12, + FR_PSCR, + FR_INST =0x49, + FR_HOME, + FR_PGUP, + FR_DEL, + FR_END, + FR_PGDN, + FR_RIGT, + FR_LEFT, /* 0x50 */ + FR_DOWN, + FR_UP, + FR_NUML, + FR_SLSH, /* KEYPAD */ + FR_MULT, + FR_MOIN, + FR_PLUS, + FR_ENTK, + FR_1, + FR_2, + FR_3, + FR_4, + FR_5, + FR_6, + FR_7, + FR_8, /* 0x60 */ + FR_9, + FR_0, + FR_DOT, + FR_LABK, + FR_EQ =0x67 /* END KEYPAD */, + FR_F13, + FR_F14, + FR_F15, + FR_F16, + FR_F17, + FR_F18, + FR_F19, + FR_F20, + FR_F21, /* 0x70 */ + FR_F22, + FR_F23, + FR_F24, + FR_MENU =0x76 +}; + + +enum french_control_touch{ + + /* Modifiers */ + FR_LCTR = 0xE0, + FR_LSFT, + FR_LALT, + FR_LCMD, + FR_RCTR, + FR_RSFT, + FR_ALGR, + FR_RCMD +}; + + +enum french_media_key{ + /* System Control */ + FR_SYSTEM_POWER = 0xA5, + FR_SYSTEM_SLEEP, + FR_SYSTEM_WAKE, + + /* Media Control */ + FR_MUTE, + FR_MVUP, + FR_MVDN, + FR_MNXT, + FR_MPRV, + FR_MSTP, + FR_MPLY, + FR_MEDIA_SELECT, + FR_MEDIA_EJECT, + FR_MAIL, + FR_CALCULATOR, + FR_MY_COMPUTER, + FR_WWW_SEARCH, + FR_WWW_HOME, + FR_WWW_BACK, + FR_WWW_FORWARD, + FR_WWW_STOP, + FR_WWW_REFRESH, + FR_WWW_FAVORITES, + FR_MEDIA_FAST_FORWARD, + FR_MEDIA_REWIND /* 0xBC */ +}; diff --git a/keyboards/xd75/keymaps/french/readme.md b/keyboards/xiudi/xd75/keymaps/french/readme.md similarity index 100% rename from keyboards/xd75/keymaps/french/readme.md rename to keyboards/xiudi/xd75/keymaps/french/readme.md diff --git a/keyboards/xd75/keymaps/french/rules.mk b/keyboards/xiudi/xd75/keymaps/french/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/french/rules.mk rename to keyboards/xiudi/xd75/keymaps/french/rules.mk diff --git a/keyboards/xiudi/xd75/keymaps/germanized/config.h b/keyboards/xiudi/xd75/keymaps/germanized/config.h new file mode 100644 index 000000000..d8c8f2d50 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/germanized/config.h @@ -0,0 +1,117 @@ +/* Copyright 2018 Kolja Brauns + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here + +//Tap-Toggle +#define TAPPING_TOGGLE 3 + +//Tap Dancing +#define TAPPING_TERM 200 + +// normal characters +#define DE_Z KC_Y +#define DE_Y KC_Z + +#define DE_A KC_A +#define DE_B KC_B +#define DE_C KC_C +#define DE_D KC_D +#define DE_E KC_E +#define DE_F KC_F +#define DE_G KC_G +#define DE_H KC_H +#define DE_I KC_I +#define DE_J KC_J +#define DE_K KC_K +#define DE_L KC_L +#define DE_M KC_M +#define DE_N KC_N +#define DE_O KC_O +#define DE_P KC_P +#define DE_Q KC_Q +#define DE_R KC_R +#define DE_S KC_S +#define DE_T KC_T +#define DE_U KC_U +#define DE_V KC_V +#define DE_W KC_W +#define DE_X KC_X + +#define DE_0 KC_0 +#define DE_1 KC_1 +#define DE_2 KC_2 +#define DE_3 KC_3 +#define DE_4 KC_4 +#define DE_5 KC_5 +#define DE_6 KC_6 +#define DE_7 KC_7 +#define DE_8 KC_8 +#define DE_9 KC_9 + +#define DE_DOT KC_DOT +#define DE_COMM KC_COMM + +#define DE_SS KC_MINS +#define DE_ADIA KC_QUOT +#define DE_UDIA KC_LBRC +#define DE_ODIA KC_SCLN + +#define DE_CIRC KC_GRAVE // accent circumflex ^ and ring ° +#define DE_ACUT KC_EQL // accent acute ´ and grave ` +#define DE_PLUS KC_RBRC // + and * and ~ +#define DE_HASH KC_BSLS // # and ' +#define DE_LABK KC_NUBS // < and > and | +#define DE_MINS KC_SLSH // - and _ + +// shifted characters +#define DE_DEG LSFT(DE_CIRC) // ° +#define DE_EXLM LSFT(KC_1) // ! +#define DE_DQUO LSFT(KC_2) // " +#define DE_SECT LSFT(KC_3) // § +#define DE_DLR LSFT(KC_4) // $ +#define DE_PERC LSFT(KC_5) // % +#define DE_AMPR LSFT(KC_6) // & +#define DE_SLSH LSFT(KC_7) // / +#define DE_LPRN LSFT(KC_8) // ( +#define DE_RPRN LSFT(KC_9) // ) +#define DE_EQL LSFT(KC_0) // = +#define DE_QUES LSFT(DE_SS) // ? +#define DE_GRV LSFT(DE_ACUT) // ` +#define DE_ASTR LSFT(DE_PLUS) // * +#define DE_QUOT LSFT(DE_HASH) // ' +#define DE_RABK LSFT(DE_LABK) // > +#define DE_COLN LSFT(KC_DOT) // : +#define DE_SCLN LSFT(KC_COMM) // ; +#define DE_UNDS LSFT(DE_MINS) // _ + +// Alt Gr-ed characters +#define DE_SUP2 ALGR(KC_2) // ² +#define DE_SUP3 ALGR(KC_3) // ³ +#define DE_LCBR ALGR(KC_7) // { +#define DE_LBRC ALGR(KC_8) // [ +#define DE_RBRC ALGR(KC_9) // ] +#define DE_RCBR ALGR(KC_0) // } +#define DE_BSLS ALGR(DE_SS) // backslash +#define DE_AT ALGR(KC_Q) // @ +#define DE_EURO ALGR(KC_E) // € +#define DE_TILD ALGR(DE_PLUS) // ~ +#define DE_PIPE ALGR(DE_LABK) // | + +// Launchy +#define ALT_SPC LALT(KC_SPC) diff --git a/keyboards/xiudi/xd75/keymaps/germanized/keymap.c b/keyboards/xiudi/xd75/keymaps/germanized/keymap.c new file mode 100644 index 000000000..3b00a4b67 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/germanized/keymap.c @@ -0,0 +1,86 @@ +/* Copyright 2017 Kolja Brauns +*/ +#include QMK_KEYBOARD_H + +#ifndef KEYMAP_GERMAN +#define KEYMAP_GERMAN + +#include "keymap.h" + +#endif + +//Tap Dance Declarations +enum { + TD_ESC_RUPT = 0 +}; + +enum { + TD_TAB = 1 +}; + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for Esc, twice Ctrl+Alt+Del + [TD_ESC_RUPT] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, LALT(LCTL(KC_DEL))), + [TD_TAB] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, LGUI(KC_TAB)) +// Other declarations would go here, separated by commas, if you have them +}; + +//In Layer declaration, add tap dance item in place of a key code + + +// Layer shorthand +#define _QWZ 0 +#define _FNC 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + + /* QWZ + * .-----------------------------------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BckSpc| Esc | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | Tab | Q | W | E | R | T | Z | U | I | O | P | Ü | + | | PgUp | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| Enter |-------| + * | Ctrl/ | A | S | D | F | G | H | J | K | L | Ö | Ä | # | | PgDn | + * | GUITab| | | | | | | | | | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | LShift| Y | X | C | V | B | N | M | , | . | - | ^ | Home/ | Up | End | + * | | | | | | | | | | | | | RShift| | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | LCtrl | LAlt | MO(1)/| Space | Backspace | MO(1)/|AltGr/ | Win | < | Del | Left | Down | Right | + * | | | Enter | | | TO(1) |Pause | | | | | | | + * °-----------------------------------------------------------------------------------------------------------------------° + */ + + [_QWZ] = LAYOUT_ortho_5x15( + TD(TD_ESC_RUPT), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, KC_BSPC, KC_ESC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA, DE_PLUS, KC_NO, KC_PGUP, + TD(TD_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_ODIA, DE_ADIA, DE_HASH, KC_ENT, KC_PGDN, + KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, DE_CIRC, MT(MOD_RSFT, KC_HOME), KC_UP, KC_END, + KC_LCTL, KC_LALT, LT(1, KC_ENT), KC_SPC, KC_NO, KC_BSPC, KC_NO, TT(1), MT(MOD_RALT, KC_PAUS), KC_RGUI, DE_LABK, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + /* FNC + * .-----------------------------------------------------------------------------------------------------------------------. + * | Reset | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | _____ | _____ | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | _____ | _____ | _____ |Bright+| _____ | _____ | _____ | _____ | _____ | Up | PrtSc | _____ | _____ | _____ | _____ | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | _____ | _____ | _____ |RGB Tog|RGB Mod| _____ | _____ | _____ | Left | Down | Right | _____ | _____ | Play | _____ | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | CpsLck| _____ | _____ |Bright-| _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | VolUp | Mute | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | TO(0) | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | _____ | Prev | VolDn | Next | + * °-----------------------------------------------------------------------------------------------------------------------° +*/ + [_FNC] = LAYOUT_ortho_5x15( + 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_TRNS, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MUTE, + TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT + ) + +}; + diff --git a/keyboards/xd75/keymaps/germanized/readme.md b/keyboards/xiudi/xd75/keymaps/germanized/readme.md similarity index 100% rename from keyboards/xd75/keymaps/germanized/readme.md rename to keyboards/xiudi/xd75/keymaps/germanized/readme.md diff --git a/keyboards/xiudi/xd75/keymaps/germanized/rules.mk b/keyboards/xiudi/xd75/keymaps/germanized/rules.mk new file mode 100644 index 000000000..0b95ead09 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/germanized/rules.mk @@ -0,0 +1,35 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +TAP_DANCE_ENABLE = yes # Enable Tap Dancing + diff --git a/keyboards/xd75/keymaps/hybrid/config.h b/keyboards/xiudi/xd75/keymaps/hybrid/config.h similarity index 100% rename from keyboards/xd75/keymaps/hybrid/config.h rename to keyboards/xiudi/xd75/keymaps/hybrid/config.h diff --git a/keyboards/xd75/keymaps/hybrid/keymap.c b/keyboards/xiudi/xd75/keymaps/hybrid/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/hybrid/keymap.c rename to keyboards/xiudi/xd75/keymaps/hybrid/keymap.c diff --git a/keyboards/xd75/keymaps/hybrid/readme.md b/keyboards/xiudi/xd75/keymaps/hybrid/readme.md similarity index 100% rename from keyboards/xd75/keymaps/hybrid/readme.md rename to keyboards/xiudi/xd75/keymaps/hybrid/readme.md diff --git a/keyboards/xd75/keymaps/hybrid/rules.mk b/keyboards/xiudi/xd75/keymaps/hybrid/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/hybrid/rules.mk rename to keyboards/xiudi/xd75/keymaps/hybrid/rules.mk diff --git a/keyboards/xd75/keymaps/jarred/keymap.c b/keyboards/xiudi/xd75/keymaps/jarred/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/jarred/keymap.c rename to keyboards/xiudi/xd75/keymaps/jarred/keymap.c diff --git a/keyboards/xd75/keymaps/jarred/readme.md b/keyboards/xiudi/xd75/keymaps/jarred/readme.md similarity index 100% rename from keyboards/xd75/keymaps/jarred/readme.md rename to keyboards/xiudi/xd75/keymaps/jarred/readme.md diff --git a/keyboards/xd75/keymaps/kim-kim-xd73/config.h b/keyboards/xiudi/xd75/keymaps/kim-kim-xd73/config.h similarity index 100% rename from keyboards/xd75/keymaps/kim-kim-xd73/config.h rename to keyboards/xiudi/xd75/keymaps/kim-kim-xd73/config.h diff --git a/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c b/keyboards/xiudi/xd75/keymaps/kim-kim-xd73/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/kim-kim-xd73/keymap.c rename to keyboards/xiudi/xd75/keymaps/kim-kim-xd73/keymap.c diff --git a/keyboards/xd75/keymaps/kim-kim-xd73/rules.mk b/keyboards/xiudi/xd75/keymaps/kim-kim-xd73/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/kim-kim-xd73/rules.mk rename to keyboards/xiudi/xd75/keymaps/kim-kim-xd73/rules.mk diff --git a/keyboards/xd75/keymaps/kim-kim/config.h b/keyboards/xiudi/xd75/keymaps/kim-kim/config.h similarity index 100% rename from keyboards/xd75/keymaps/kim-kim/config.h rename to keyboards/xiudi/xd75/keymaps/kim-kim/config.h diff --git a/keyboards/xd75/keymaps/kim-kim/keymap.c b/keyboards/xiudi/xd75/keymaps/kim-kim/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/kim-kim/keymap.c rename to keyboards/xiudi/xd75/keymaps/kim-kim/keymap.c diff --git a/keyboards/xd75/keymaps/kim-kim/rules.mk b/keyboards/xiudi/xd75/keymaps/kim-kim/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/kim-kim/rules.mk rename to keyboards/xiudi/xd75/keymaps/kim-kim/rules.mk diff --git a/keyboards/xd75/keymaps/kloki/config.h b/keyboards/xiudi/xd75/keymaps/kloki/config.h similarity index 100% rename from keyboards/xd75/keymaps/kloki/config.h rename to keyboards/xiudi/xd75/keymaps/kloki/config.h diff --git a/keyboards/xd75/keymaps/kloki/keymap.c b/keyboards/xiudi/xd75/keymaps/kloki/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/kloki/keymap.c rename to keyboards/xiudi/xd75/keymaps/kloki/keymap.c diff --git a/keyboards/xd75/keymaps/kloki/readme.md b/keyboards/xiudi/xd75/keymaps/kloki/readme.md similarity index 100% rename from keyboards/xd75/keymaps/kloki/readme.md rename to keyboards/xiudi/xd75/keymaps/kloki/readme.md diff --git a/keyboards/xd75/keymaps/kloki/rules.mk b/keyboards/xiudi/xd75/keymaps/kloki/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/kloki/rules.mk rename to keyboards/xiudi/xd75/keymaps/kloki/rules.mk diff --git a/keyboards/xd75/keymaps/markus/config.h b/keyboards/xiudi/xd75/keymaps/markus/config.h similarity index 100% rename from keyboards/xd75/keymaps/markus/config.h rename to keyboards/xiudi/xd75/keymaps/markus/config.h diff --git a/keyboards/xiudi/xd75/keymaps/markus/keymap.c b/keyboards/xiudi/xd75/keymaps/markus/keymap.c new file mode 100644 index 000000000..ddef0e59b --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/markus/keymap.c @@ -0,0 +1,215 @@ +/* Copyright 2019 Markus Weimar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include "keymap_german.h" + +#define ________ KC_TRNS +#define ___xx___ KC_NO + +enum my_layers { + _QWZ, + _QWY, + _GAM, + _FN1, + _FN2, + _FN3, +}; + +enum my_keycodes { + QWERTZ = SAFE_RANGE, + QWERTY, + GAMING, + FN1, + FN2, + FN3 +}; + +enum my_ucis { + UNI_LNX, + UNI_MAC, + UNI_WIN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTZ + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | 1 ! | 2 " | 3 § | 4 $ | 5 % | 6 & | Mute | Vol- | Vol+ | 7 / | 8 ( | 9 ) | 0 = | ẞ ? | Ü | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Esc | Q | W | E | R | T | Home | Play | End | Z | U | I | O | P | Ä | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LShift | A | S | D | F | G | Pg Up | Up | Pg Dn | H | J | K | L | Ö | RShift | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | LCtrl | Y | X | C | V | B | Left | Down | Right | N | M | , ; | . : | - _ | RCtrl | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Caps | Fn3 | LGUI | LAlt | Fn2 | Fn1 | Tab | Del | Enter | Space | Bksp | LAlt | LGUI | Fn3 | Ins | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_QWZ] = LAYOUT_ortho_5x15( +DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, KC_MUTE, KC_VOLD, KC_VOLU, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_UDIA, +KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_HOME, KC_MPLY, KC_END, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_ADIA, +KC_LSFT, DE_A, DE_S, DE_D, DE_F, DE_G, KC_PGUP, KC_UP, KC_PGDN, DE_H, DE_J, DE_K, DE_L, DE_ODIA, KC_RSFT, +KC_LCTL, DE_Y, DE_X, DE_C, DE_V, DE_B, KC_LEFT, KC_DOWN, KC_RIGHT, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RCTL, +KC_CAPS, MO(_FN3), KC_LGUI, KC_LALT, MO(_FN2), MO(_FN1), KC_TAB, KC_DEL, KC_ENT, KC_SPC, KC_BSPC, KC_LALT, KC_LGUI, MO(_FN3), KC_INS +), + +/* QWERTY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | Y | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | Z | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_QWY] = LAYOUT_ortho_5x15( +DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, KC_MUTE, KC_VOLD, KC_VOLU, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_UDIA, +KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_HOME, KC_MPLY, KC_END, DE_Y, DE_U, DE_I, DE_O, DE_P, DE_ADIA, +KC_LSFT, DE_A, DE_S, DE_D, DE_F, DE_G, KC_PGUP, KC_UP, KC_PGDN, DE_H, DE_J, DE_K, DE_L, DE_ODIA, KC_RSFT, +KC_LCTL, DE_Z, DE_X, DE_C, DE_V, DE_B, KC_LEFT, KC_DOWN, KC_RIGHT, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RCTL, +KC_CAPS, MO(_FN3), KC_LGUI, KC_LALT, MO(_FN2), MO(_FN1), KC_TAB, KC_DEL, KC_ENT, KC_SPC, KC_BSPC, KC_LALT, KC_LGUI, MO(_FN3), KC_INS +), + +/* GAMING + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | Y | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | Z | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Fn2 | | | | Space | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_GAM] = LAYOUT_ortho_5x15( +DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, KC_MUTE, KC_VOLD, KC_VOLU, DE_7, DE_8, DE_9, DE_0, DE_SS, DE_UDIA, +KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_HOME, KC_MPLY, KC_END, DE_Y, DE_U, DE_I, DE_O, DE_P, DE_ADIA, +KC_LSFT, DE_A, DE_S, DE_D, DE_F, DE_G, KC_PGUP, KC_UP, KC_PGDN, DE_H, DE_J, DE_K, DE_L, DE_ODIA, KC_RSFT, +KC_LCTL, DE_Z, DE_X, DE_C, DE_V, DE_B, KC_LEFT, KC_DOWN, KC_RIGHT, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_RCTL, +MO(_FN2), MO(_FN3), KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_TAB, KC_DEL, KC_ENT, KC_SPC, KC_BSPC, KC_LALT, KC_LGUI, MO(_FN3), KC_INS +), + +/* FN1 + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | Prev | Play | Next | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | @ | ~ | € | ´ | ` | | | | \ | { | } | + | * | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | " | ' | ‚ | ‘ | ’ | | | | | | [ | ] | ! | ? | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | ° | ^ | „ | “ | ” | | | | # | < | > | … | – EN | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_FN1] = LAYOUT_ortho_5x15( +KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MPRV, KC_MPLY, KC_MNXT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, +________, DE_AT, DE_TILD, DE_EURO, DE_ACUT, DE_GRV, ________, ___xx___, ________, DE_BSLS, DE_LCBR, DE_RCBR, DE_PLUS, DE_ASTR, ___xx___, +________, DE_DQUO, DE_QUOT, UC(L'‚'), UC(L'‘'), UC(L'’'), ________, ________, ________, DE_PIPE, DE_LBRC, DE_RBRC, DE_EXLM, DE_QUES, ________, +________, DE_DEG, DE_CIRC, UC(L'„'), UC(L'“'), UC(L'”'), ________, ________, ________, DE_HASH, DE_LABK, DE_RABK, UC(L'…'), UC(L'–'), ________, +___xx___, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________ +), + +/* FN2 + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | % | ( | ) | P/ | P* | P- | Print | Scroll | Pause | ẞ | − MNS | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | Mute | Vol- | Vol+ | Bspc | P7 | P8 | P9 | P+ | WH_U | MS_U | WH_D | × | ÷ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | App | ACL2 | ACL1 | ACL0 | Space | P4 | P5 | P6 | WH_L | MS_L | MS_D | MS_R | WH_R | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | Prev | Play | Next | Tab | P1 | P2 | P3 | PEnter | BTN1 | BTN2 | BTN3 | — EM | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Fn2 | | | | | PEnter | P0 | . : | P, | BTN1 | BTN2 | BTN3 | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_FN2] = LAYOUT_ortho_5x15( +___xx___, ___xx___, ___xx___, ___xx___, DE_PERC, DE_LPRN, DE_RPRN, KC_PSLS, KC_PAST, KC_PMNS, KC_PSCR, KC_LSCR, KC_PAUS, UC(L'ẞ'), UC(L'−'), +________, ___xx___, KC_MUTE, KC_VOLD, KC_VOLU, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_WH_U, KC_MS_U, KC_WH_D, UC(L'×'), UC(L'÷'), +________, KC_APP, KC_ACL2, KC_ACL1, KC_ACL0, KC_SPC, KC_P4, KC_P5, KC_P6, KC_WH_L, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_R, ________, +________, ___xx___, KC_MPRV, KC_MPLY, KC_MNXT, KC_TAB, KC_P1, KC_P2, KC_P3, KC_PENT, KC_BTN1, KC_BTN2, KC_BTN3, UC(L'—'), ________, +MO(_FN2), ________, ________, ________, ________, KC_PENT, KC_P0, DE_DOT, KC_PDOT, KC_BTN1, KC_BTN2, KC_BTN3, ________, ________, ________ +), + +/* FN3 + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | F13 | F14 | F15 | F16 | F17 | F18 | U LNX | U WIN | U MAC | F19 | F20 | F21 | F22 | F23 | F24 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | QWERTZ | QWERTY | GAMING | | | L TOG | L MP | L MOD | | Pg Up | Up | Pg Dn | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | › | ‹ | | L HUI | L SAI | L VAI | Home | Left | Down | Right | End | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | » | « | | L HUD | L SAD | L VAD | NumSp | ThinSp | NaNbSp | NbSp | NbHyph | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | Reset | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ +[_FN3] = LAYOUT_ortho_5x15( +KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, UNI_LNX, UNI_WIN, UNI_MAC, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, +________, QWERTZ, QWERTY, GAMING, ___xx___, ___xx___, RGB_TOG, RGB_M_P, RGB_MOD, ___xx___, KC_PGUP, KC_UP, KC_PGDN, ___xx___, ___xx___, +________, ___xx___, ___xx___, UC(L'›'), UC(L'‹'), ___xx___, RGB_HUI, RGB_SAI, RGB_VAI, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_END, ________, +________, ___xx___, ___xx___, UC(L'»'), UC(L'«'), ___xx___, RGB_HUD, RGB_SAD, RGB_VAD, UC(L' '), UC(L' '), UC(L' '), UC(L' '), UC(L'‑'), ________, +___xx___, ________, ________, ________, ________, ________, ________, RESET, ________, ________, ________, ________, ________, ________, ________ +) + +}; + +void matrix_init_user(){ + set_unicode_input_mode(UC_LNX); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case QWERTZ: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWZ); + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWY); + } + return false; + break; + case GAMING: + if (record->event.pressed) { + set_single_persistent_default_layer(_GAM); + } + return false; + break; + case UNI_LNX: + set_unicode_input_mode(UC_LNX); + return false; + break; + case UNI_WIN: + set_unicode_input_mode(UC_WINC); + return false; + break; + case UNI_MAC: + set_unicode_input_mode(UC_OSX); + return false; + break; + } + return true; +} diff --git a/keyboards/xd75/keymaps/markus/readme.md b/keyboards/xiudi/xd75/keymaps/markus/readme.md similarity index 100% rename from keyboards/xd75/keymaps/markus/readme.md rename to keyboards/xiudi/xd75/keymaps/markus/readme.md diff --git a/keyboards/xiudi/xd75/keymaps/markus/rules.mk b/keyboards/xiudi/xd75/keymaps/markus/rules.mk new file mode 100644 index 000000000..f2552d2fa --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/markus/rules.mk @@ -0,0 +1,13 @@ +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +NKRO_ENABLE = yes +BACKLIGHT_ENABLE = no +MIDI_ENABLE = no +AUDIO_ENABLE = no +UNICODE_ENABLE = yes +BLUETOOTH_ENABLE = no +RGBLIGHT_ENABLE = yes +SLEEP_LED_ENABLE = no diff --git a/keyboards/xd75/keymaps/msiu/config.h b/keyboards/xiudi/xd75/keymaps/msiu/config.h similarity index 100% rename from keyboards/xd75/keymaps/msiu/config.h rename to keyboards/xiudi/xd75/keymaps/msiu/config.h diff --git a/keyboards/xd75/keymaps/msiu/keymap.c b/keyboards/xiudi/xd75/keymaps/msiu/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/msiu/keymap.c rename to keyboards/xiudi/xd75/keymaps/msiu/keymap.c diff --git a/keyboards/xd75/keymaps/msiu/readme.md b/keyboards/xiudi/xd75/keymaps/msiu/readme.md similarity index 100% rename from keyboards/xd75/keymaps/msiu/readme.md rename to keyboards/xiudi/xd75/keymaps/msiu/readme.md diff --git a/keyboards/xd75/keymaps/mtdjr/config.h b/keyboards/xiudi/xd75/keymaps/mtdjr/config.h similarity index 100% rename from keyboards/xd75/keymaps/mtdjr/config.h rename to keyboards/xiudi/xd75/keymaps/mtdjr/config.h diff --git a/keyboards/xd75/keymaps/mtdjr/keymap.c b/keyboards/xiudi/xd75/keymaps/mtdjr/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/mtdjr/keymap.c rename to keyboards/xiudi/xd75/keymaps/mtdjr/keymap.c diff --git a/keyboards/xd75/keymaps/mtdjr/readme.md b/keyboards/xiudi/xd75/keymaps/mtdjr/readme.md similarity index 100% rename from keyboards/xd75/keymaps/mtdjr/readme.md rename to keyboards/xiudi/xd75/keymaps/mtdjr/readme.md diff --git a/keyboards/xd75/keymaps/mtdjr/rules.mk b/keyboards/xiudi/xd75/keymaps/mtdjr/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/mtdjr/rules.mk rename to keyboards/xiudi/xd75/keymaps/mtdjr/rules.mk diff --git a/keyboards/xd75/keymaps/neothefox/keymap.c b/keyboards/xiudi/xd75/keymaps/neothefox/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/neothefox/keymap.c rename to keyboards/xiudi/xd75/keymaps/neothefox/keymap.c diff --git a/keyboards/xd75/keymaps/neothefox/readme.md b/keyboards/xiudi/xd75/keymaps/neothefox/readme.md similarity index 100% rename from keyboards/xd75/keymaps/neothefox/readme.md rename to keyboards/xiudi/xd75/keymaps/neothefox/readme.md diff --git a/keyboards/xd75/keymaps/odyssey/config.h b/keyboards/xiudi/xd75/keymaps/odyssey/config.h similarity index 100% rename from keyboards/xd75/keymaps/odyssey/config.h rename to keyboards/xiudi/xd75/keymaps/odyssey/config.h diff --git a/keyboards/xd75/keymaps/odyssey/keymap.c b/keyboards/xiudi/xd75/keymaps/odyssey/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/odyssey/keymap.c rename to keyboards/xiudi/xd75/keymaps/odyssey/keymap.c diff --git a/keyboards/xd75/keymaps/odyssey/readme.md b/keyboards/xiudi/xd75/keymaps/odyssey/readme.md similarity index 100% rename from keyboards/xd75/keymaps/odyssey/readme.md rename to keyboards/xiudi/xd75/keymaps/odyssey/readme.md diff --git a/keyboards/xd75/keymaps/odyssey/rules.mk b/keyboards/xiudi/xd75/keymaps/odyssey/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/odyssey/rules.mk rename to keyboards/xiudi/xd75/keymaps/odyssey/rules.mk diff --git a/keyboards/xd75/keymaps/pitty/config.h b/keyboards/xiudi/xd75/keymaps/pitty/config.h similarity index 100% rename from keyboards/xd75/keymaps/pitty/config.h rename to keyboards/xiudi/xd75/keymaps/pitty/config.h diff --git a/keyboards/xiudi/xd75/keymaps/pitty/keymap.c b/keyboards/xiudi/xd75/keymaps/pitty/keymap.c new file mode 100644 index 000000000..ff812d679 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/pitty/keymap.c @@ -0,0 +1,148 @@ +/* Copyright 2017 Wunder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "keymap_hungarian.h" + +enum XD75_layers { + _QWERTY, + _GAME, + _LOWER, + _RAISE +}; + + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + GAME, + LOWER, + RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +/* Qwerty + * ,--------------------------------------------------------------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö | Ü | Ó | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Z | U | I | O | P | Ő | Ú | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | É | Á | Ű | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | - | Shift| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | ALt |Lower | Space | Enter| Bksp |AltGr | Raise| | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_5x15( \ + HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_ODIA, HU_UDIA, HU_OACU, KC_INS, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_ODAC, HU_UACU, KC_DEL, KC_PGDN, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EACU, HU_AACU, HU_UDAC, _______, KC_HOME, \ + MT(MOD_LSFT, KC_NUBS), HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, HU_EQL, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, TT(_LOWER), KC_SPC, _______, KC_ENT, KC_BSPC, KC_RALT, TT(_RAISE), _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \ +), + + +/* Game + * ,--------------------------------------------------------------------------------------------------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Ö | Ü | Ó | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | TAB | Q | W | E | R | T | Z | U | I | O | P | Ő | Ú | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | É | Á | Ű | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | Shift| Y | X | C | V | B | N | M | , | . | - | Shift| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | ALt |Raise | Space | Enter| Bksp |AltGr | Lower| | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_GAME] = LAYOUT_ortho_5x15( \ + HU_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, HU_ODIA, HU_UDIA, HU_OACU, KC_INS, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, HU_Z, KC_U, KC_I, KC_O, KC_P, HU_ODAC, HU_UACU, KC_DEL, KC_PGDN, \ + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, HU_EACU, HU_AACU, HU_UDAC, _______, KC_HOME, \ + KC_LSFT, HU_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, HU_COMM, HU_DOT, HU_MINS, KC_RSFT, HU_EQL, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, TT(_RAISE), KC_SPC, _______, KC_ENT, KC_BSPC, KC_RALT, TT(_LOWER), _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \ +), + + +/* Lower + * ,--------------------------------------------------------------------------------------------------------. + * | | | | | | | | 7 | 8 | 9 | + | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Up | | | | | 4 | 5 | 6 | - | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | | Left | Down | Right| | | | 1 | 2 | 3 | * | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | | |Lnxcpy|Lnxpst| | | 0 | | | / | = | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Home |PageDn|PageUp| End | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x15( \ + _______, _______, _______, _______, _______, _______, _______, HU_7, HU_8, HU_9, HU_PLUS, _______, _______, _______, _______, \ + _______, _______, KC_UP, _______, _______, _______, _______, HU_4, HU_5, HU_6, HU_MINS, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, HU_1, HU_2, HU_3, HU_ASTR, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, HU_0, _______, _______, HU_SLSH, HU_EQL, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAME), TO(_QWERTY), _______, _______, _______ \ +), + +/* Raise + * ,--------------------------------------------------------------------------------------------------------. + * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | Up | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------+------+------+------| + * | | Left | Down | Right| | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Home |PageDn|PageUp| End | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x15( \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(_GAME), TO(_QWERTY), _______, _______, _______ \ +), + + + +}; + + + +layer_state_t layer_state_set_user(layer_state_t state) { + switch (get_highest_layer(state)) { + case _RAISE: + rgblight_setrgb (0xC3, 0xFF, 0xFF); + rgblight_mode(5); + break; + case _LOWER: + rgblight_setrgb (0xFF, 0xFF, 0xFF); + rgblight_mode(5); + break; + case _GAME: + rgblight_mode(8); + break; + default: // for any other layers, or the default layer + rgblight_mode(14); + break; + } + return state; +} diff --git a/keyboards/xd75/keymaps/pitty/readme.md b/keyboards/xiudi/xd75/keymaps/pitty/readme.md similarity index 100% rename from keyboards/xd75/keymaps/pitty/readme.md rename to keyboards/xiudi/xd75/keymaps/pitty/readme.md diff --git a/keyboards/xd75/keymaps/pitty/rules.mk b/keyboards/xiudi/xd75/keymaps/pitty/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/pitty/rules.mk rename to keyboards/xiudi/xd75/keymaps/pitty/rules.mk diff --git a/keyboards/xd75/keymaps/replicaJunction/config.h b/keyboards/xiudi/xd75/keymaps/replicajunction/config.h similarity index 100% rename from keyboards/xd75/keymaps/replicaJunction/config.h rename to keyboards/xiudi/xd75/keymaps/replicajunction/config.h diff --git a/keyboards/xd75/keymaps/replicaJunction/keymap.c b/keyboards/xiudi/xd75/keymaps/replicajunction/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/replicaJunction/keymap.c rename to keyboards/xiudi/xd75/keymaps/replicajunction/keymap.c diff --git a/keyboards/xd75/keymaps/replicaJunction/readme.md b/keyboards/xiudi/xd75/keymaps/replicajunction/readme.md similarity index 100% rename from keyboards/xd75/keymaps/replicaJunction/readme.md rename to keyboards/xiudi/xd75/keymaps/replicajunction/readme.md diff --git a/keyboards/xd75/keymaps/replicaJunction/rules.mk b/keyboards/xiudi/xd75/keymaps/replicajunction/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/replicaJunction/rules.mk rename to keyboards/xiudi/xd75/keymaps/replicajunction/rules.mk diff --git a/keyboards/xd75/keymaps/revok75/config.h b/keyboards/xiudi/xd75/keymaps/revok75/config.h similarity index 100% rename from keyboards/xd75/keymaps/revok75/config.h rename to keyboards/xiudi/xd75/keymaps/revok75/config.h diff --git a/keyboards/xd75/keymaps/revok75/keymap.c b/keyboards/xiudi/xd75/keymaps/revok75/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/revok75/keymap.c rename to keyboards/xiudi/xd75/keymaps/revok75/keymap.c diff --git a/keyboards/xd75/keymaps/revok75/readme.md b/keyboards/xiudi/xd75/keymaps/revok75/readme.md similarity index 100% rename from keyboards/xd75/keymaps/revok75/readme.md rename to keyboards/xiudi/xd75/keymaps/revok75/readme.md diff --git a/keyboards/xiudi/xd75/keymaps/revok75/rules.mk b/keyboards/xiudi/xd75/keymaps/revok75/rules.mk new file mode 100644 index 000000000..801198784 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/revok75/rules.mk @@ -0,0 +1,18 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes diff --git a/keyboards/xd75/keymaps/scheiklp/config.h b/keyboards/xiudi/xd75/keymaps/scheiklp/config.h similarity index 100% rename from keyboards/xd75/keymaps/scheiklp/config.h rename to keyboards/xiudi/xd75/keymaps/scheiklp/config.h diff --git a/keyboards/xd75/keymaps/scheiklp/keymap.c b/keyboards/xiudi/xd75/keymaps/scheiklp/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/scheiklp/keymap.c rename to keyboards/xiudi/xd75/keymaps/scheiklp/keymap.c diff --git a/keyboards/xd75/keymaps/scheiklp/readme.md b/keyboards/xiudi/xd75/keymaps/scheiklp/readme.md similarity index 100% rename from keyboards/xd75/keymaps/scheiklp/readme.md rename to keyboards/xiudi/xd75/keymaps/scheiklp/readme.md diff --git a/keyboards/xiudi/xd75/keymaps/scheiklp/rules.mk b/keyboards/xiudi/xd75/keymaps/scheiklp/rules.mk new file mode 100644 index 000000000..2cbbe08d7 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/scheiklp/rules.mk @@ -0,0 +1,6 @@ +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +COMMAND_ENABLE = no +RGBLIGHT_ENABLE = no +DYNAMIC_MACRO_ENABLE = yes +AUTO_SHIFT_ENABLE = yes +KEY_LOCK_ENABLE = yes diff --git a/keyboards/xiudi/xd75/keymaps/skewwhiffy/keymap.c b/keyboards/xiudi/xd75/keymaps/skewwhiffy/keymap.c new file mode 100644 index 000000000..3db29a363 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/skewwhiffy/keymap.c @@ -0,0 +1,233 @@ +/* Copyright 2017 Kenny Hung + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "keymap_uk.h" + +// Layer shorthand +enum Layers { + cm, // colemak + dv, // dvorak + qw, // qwerty + nbl, // numbers left + nbr, // numbers right + syl, // symbols left + syr, // symbols right + nal, // navigation left + nar // navigation right +}; + +// Layer buttons +#define _Z_SFT SFT_T(UK_Z) +#define _SCLSH SFT_T(UK_SCLN) +#define _SLSH SFT_T(UK_SLSH) + +#define _X_NB LT(nbl, UK_X) +#define _Q_NB LT(nbl, UK_Q) +#define _DOT_NB LT(nbr, UK_DOT) +#define _V_NB LT(nbr, UK_V) +#define __NBL LT(nbl, _______) +#define __NBR LT(nbr, _______) + +#define _C_SY LT(syl, UK_C) +#define _J_SY LT(syl, UK_J) +#define _W_SY LT(syr, UK_W) +#define _COM_SY LT(syr, UK_COMM) +#define __SYL LT(syl, _______) +#define __SYR LT(syr, _______) + +#define _V_NAL LT(nal, UK_V) +#define _K_NAL LT(nal, UK_K) +#define _M_NAR LT(nar, UK_M) +#define __NAL LT(nal, _______) +#define __NAR LT(nar, _______) + +// Custom hotkeys +#define _TERM LCTL(UK_QUOT) // Hotkey for terminal +#define _S_TAB S(KC_TAB) +#define _C_LEFT LCTL(KC_LEFT) +#define _C_RGHT LCTL(KC_RGHT) +#define _A_LEFT LALT(KC_LEFT) +#define _A_RGHT LALT(KC_RGHT) + +enum custom_keycodes { + IJ_OMN = SAFE_RANGE // IntelliJ Omnibox +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | Q | W | F | P | G | | | | | | J | L | U | Y | ; | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | A | R | S | T | D | | | | | | H | N | E | I | O | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | Z | X | C | V | B | | | UP | | | K | M | , | . | / | + * | SHIFT | NUMBER | SYMBOL | NAV | | | | | | | | NAV | SYMBOL | FUNC | SHIFT | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | LSHIFT | LCTRL | LALT | LGUI | SPACE | ENT | LEFT | DOWN | RIGHT | DEL | BKSPC | RGUI | RALT | RCTRL | RSHIFT | + * .--------------------------------------------------------------------------------------------------------------------------------------. + */ + [cm] = LAYOUT_ortho_5x15( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + UK_Q, UK_W, UK_F, UK_P, UK_G, _______, _______, _______, _______, _______, UK_J, UK_L, UK_U, UK_Y, UK_SCLN, \ + UK_A, UK_R, UK_S, UK_T, UK_D, _______, _______, _______, _______, _______, UK_H, UK_N, UK_E, UK_I, UK_O , \ + _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, KC_UP, _______, _______, UK_K, _M_NAR, _COM_SY, _DOT_NB, _SLSH , \ + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_ENT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_BSPC, KC_RGUI, KC_RALT, KC_RCTL, KC_RSFT \ + ), + +/* Dvorak + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | ' | , | . | P | Y | | | | | | F | G | C | R | L | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | A | O | E | U | I | | | | | | D | H | T | N | S | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | ; | Q | J | K | X | | | | | | B | M | W | V | Z | + * | SHIFT | NUMBER | SYMBOL | NAV | | | | | | | | NAV | SYMBOL | FUNC | SHIFT | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------------------------------------------------------------------| + */ + [dv] = LAYOUT_ortho_5x15( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + UK_QUOT, UK_COMM, UK_DOT, UK_P, UK_Y, _______, _______, _______, _______, _______, UK_F, UK_G, UK_C, UK_R, UK_L , \ + UK_A, UK_O, UK_E, UK_U, UK_I, _______, _______, _______, _______, _______, UK_D, UK_H, UK_T, UK_N, UK_S , \ + _SCLSH, _Q_NB, _J_SY, _K_NAL, UK_X, _______, _______, _______, _______, _______, UK_B, _M_NAR, _W_SY, _V_NB, _Z_SFT , \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +/* QWERTY _QW + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | Q | W | E | R | T | | | | | | Y | U | I | O | P | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | A | S | D | F | G | | | | | | H | J | K | L | ; | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | Z | X | C | V | B | | | | | | N | M | , | . | / | + * | SHIFT | NUMBER | SYMBOL | NAV | | | | | | | | NAV | SYMBOL | FUNC | SHIFT | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |--------------------------------------------------------------------------------------------------------------------------------------| + * | LSHIFT | LCTRL | LALT | LGUI | SPACE | ENT | | | | DEL | BKSPC | RGUI | RALT | RCTRL | RSHIFT | + * .--------------------------------------------------------------------------------------------------------------------------------------. + */ + [qw] = LAYOUT_ortho_5x15( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + UK_Q, UK_W, UK_E, UK_R, UK_T, _______, _______, _______, _______, _______, UK_Y, UK_U, UK_I, UK_O, UK_P , \ + UK_A, UK_S, UK_D, UK_F, UK_G, _______, _______, _______, _______, _______, UK_H, UK_J, UK_K, UK_L, UK_SCLN, \ + _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, _______, _______, _______, UK_N, _M_NAR, _COM_SY, _DOT_NB, _SLSH , \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +/* Numbers _NB + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| + * | | F7 | F8 | F9 | F10 | | | | | | | 7 | 8 | 9 | | + * |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F4 | F5 | F6 | F11 | | | | | | | 4 | 5 | 6 | | + * |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | F1 | F2 | F3 | F12 | | | | | | 0 | 1 | 2 | 3 | . | + * |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [nbl] = LAYOUT_ortho_5x15( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, UK_7, UK_8, UK_9, _______, \ + _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, _______, _______, _______, _______, _______, UK_4, UK_5, UK_6, _______, \ + _______, __NBL, KC_F2, KC_F3, KC_F12, _______, _______, _______, _______, _______, UK_0, UK_1, UK_2, UK_3, UK_DOT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [nbr] = LAYOUT_ortho_5x15( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, UK_7, UK_8, UK_9, _______, \ + _______, KC_F4, KC_F5, KC_F6, KC_F11, _______, _______, _______, _______, _______, _______, UK_4, UK_5, UK_6, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F12, _______, _______, _______, _______, _______, UK_0, UK_1, UK_2, __NBR, UK_DOT , \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + /* Symbols _SY + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ! | £ | _ | - | ~ | | | | | | \ | { | } | / | # | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | $ | % | + | = | | | | | | | " | ( | ) | ' | @ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ^ | & | * | | | | | | | | | < | [ | ] | > | ` | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [syl] = LAYOUT_ortho_5x15( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, _______, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, \ + UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT , \ + UK_CIRC, UK_AMPR, __SYL, UK_PIPE, _______, _______, _______, _______, _______, _______, UK_LABK, UK_LBRC, UK_RBRC, UK_RABK, UK_GRV , \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [syr] = LAYOUT_ortho_5x15( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, _______, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, \ + UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT , \ + UK_CIRC, UK_AMPR, UK_ASTR, UK_PIPE, _______, _______, _______, _______, _______, _______, UK_LABK, UK_LBRC, __SYR, UK_RABK, UK_GRV , \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +/* + * Navigation _NA + * .--------------------------------------------------------------------------------------------------------------------------------------. + * | RESET | COLEMA | DVORAK | QWERTY | | RGB_TG | | | | | | | | | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Esc | Ctrl L | Up | Ctrl R | | RGB HD | RGB HI | | | | | PtSn | ScLk | Pause | | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Tab | Left | Down | Right | | RGB SD | RGB SI | | | | | Insert | Home | PgUp | Term | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ShTab | Alt L | Shift | Alt R | | RGB VD | RGB VI | | | | | ScLk | End | PgDn | | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | RGB RMD| RGB MD | | | | | | | | | + * '--------------------------------------------------------------------------------------------------------------------------------------' + */ + [nal] = LAYOUT_ortho_5x15( \ + RESET, DF(cm), DF(dv), DF(qw), _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_ESC, _C_LEFT, KC_UP , _C_RGHT, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ + KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _TERM , \ + _S_TAB, _A_LEFT, IJ_OMN, __NAL, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, KC_SLCK, KC_END, KC_PGDN, _______, \ + _______, _______, _______, _______, _______, RGB_RMOD,RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [nar] = LAYOUT_ortho_5x15( \ + RESET, DF(cm), DF(dv), DF(qw), _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_ESC, _C_LEFT, KC_UP , _C_RGHT, _______, RGB_HUD, RGB_HUI, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ + KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, _______, RGB_SAD, RGB_SAI, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _TERM , \ + _S_TAB, _A_LEFT, IJ_OMN, _A_RGHT, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, __NAR, KC_END, KC_PGDN, _______, \ + _______, _______, _______, _______, _______, RGB_RMOD,RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case IJ_OMN: + SEND_STRING(SS_TAP(X_LSHIFT)SS_TAP(X_LSHIFT)); + return false; + } + } + return true; +} diff --git a/keyboards/xd75/keymaps/skewwhiffy/readme.md b/keyboards/xiudi/xd75/keymaps/skewwhiffy/readme.md similarity index 100% rename from keyboards/xd75/keymaps/skewwhiffy/readme.md rename to keyboards/xiudi/xd75/keymaps/skewwhiffy/readme.md diff --git a/keyboards/xd75/keymaps/skewwhiffy/rules.mk b/keyboards/xiudi/xd75/keymaps/skewwhiffy/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/skewwhiffy/rules.mk rename to keyboards/xiudi/xd75/keymaps/skewwhiffy/rules.mk diff --git a/keyboards/xd75/keymaps/tdl-jturner/config.h b/keyboards/xiudi/xd75/keymaps/tdl-jturner/config.h similarity index 100% rename from keyboards/xd75/keymaps/tdl-jturner/config.h rename to keyboards/xiudi/xd75/keymaps/tdl-jturner/config.h diff --git a/keyboards/xiudi/xd75/keymaps/tdl-jturner/keymap.c b/keyboards/xiudi/xd75/keymaps/tdl-jturner/keymap.c new file mode 100644 index 000000000..b7b98cd4c --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/tdl-jturner/keymap.c @@ -0,0 +1,312 @@ +/* Copyright 2018 Josh Turner (/u/tdl-jturner) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public 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 xd75_layers { + _QWERTY, + _COLEMAK, + _LYMD, + _LYFK, + _LYMED, + _LYNUM, + _LYNAV, + _LYMOS, + _LYSYS, + _LYLT +}; + +enum xd75_keycodes { + HELP = SAFE_RANGE, + KC_BSDEL, + KC_FBSLH, + KC_DOTQ, + KC_CPIPE, + COLEMAK, + QWERTY, + KC_LYDEF +}; + +//Tap Dance Declarations +enum { + TD_LOCK_SLEEP, + TD_ABK, + TD_BRC, + TD_CBR, +}; + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for Esc, twice for Caps Lock + [TD_LOCK_SLEEP] = ACTION_TAP_DANCE_DOUBLE(LGUI(KC_L), KC_SLEP), + [TD_ABK] = ACTION_TAP_DANCE_DOUBLE(KC_LABK,KC_RABK), + [TD_BRC] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC,KC_RBRC), + [TD_CBR] = ACTION_TAP_DANCE_DOUBLE(KC_LCBR,KC_RCBR) +// Other declarations would go here, separated by commas, if you have them +}; + +//remaps for pretty layouts +#define ________ KC_TRNS +#define ___XX___ KC_NO + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + //QWERY - Base Layer + [_QWERTY] = LAYOUT_ortho_5x15( + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,________ ,________,________, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINUS, + KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T ,________ ,________,________, KC_Y , KC_U , KC_I , KC_O , KC_P ,KC_BSDEL, //Custom shift Codes. Backspace ^ Delete +LT(_LYMD,KC_ESC), KC_A , KC_S , KC_D , KC_F , KC_G ,________ ,________,________, KC_H , KC_J , KC_K , KC_L ,KC_SCLN ,KC_QUOT, + KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B ,________ ,________,________, KC_N , KC_M ,KC_CPIPE,KC_DOTQ ,KC_FBSLH,KC_RSPC, // Custom Shift Codes. ,^| .^? /^| + KC_MEH ,KC_LCTL ,KC_LGUI ,KC_LALT ,MO(_LYNUM), KC_SPC ,________ ,________,________, KC_ENT ,MO(_LYNAV),TD(TD_CBR) ,TD(TD_BRC),TD(TD_ABK),TD(TD_LOCK_SLEEP) + + ), + + //_COLEMAK - Colemak Layout - Identical to qwerty layer except for the layout changes + [_COLEMAK] = LAYOUT_ortho_5x15( + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 ,________ ,________,________, KC_6 , KC_7 , KC_8 , KC_9 , KC_0 ,KC_MINUS, + KC_TAB , KC_Q , KC_W , KC_F , KC_P , KC_G ,________ ,________,________, KC_J , KC_L , KC_U , KC_Y ,KC_SCLN ,KC_BSDEL, //Custom shift Codes. Backspace ^ Delete +LT(_LYMD,KC_ESC), KC_A , KC_R , KC_S , KC_T , KC_D ,________ ,________,________, KC_H , KC_N , KC_E , KC_I , KC_O ,KC_QUOT, + KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B ,________ ,________,________, KC_K , KC_M ,KC_CPIPE,KC_DOTQ ,KC_FBSLH,KC_RSPC, // Custom Shift Codes. ,^| .^? /^| + KC_MEH ,KC_LCTL ,KC_LGUI ,KC_LALT ,MO(_LYNUM), KC_SPC ,________ ,________,________, KC_ENT ,MO(_LYNAV),TD(TD_CBR) ,TD(TD_BRC),TD(TD_ABK),TD(TD_LOCK_SLEEP) + + ), + + // Decision Layer + [_LYMD] = + LAYOUT_ortho_5x15( + ________,________ ,________ ,________ ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, + ________,MO(_LYFK) ,MO(_LYMED),________ ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,________, + ________,MO(_LYNUM),MO(_LYNAV),________ ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, + ________,MO(_LYMOS),MO(_LYSYS),MO(_LYLT) ,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, + ________,________ ,________ ,________ ,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___ + ), + + //F Keys + [_LYFK] = + LAYOUT_ortho_5x15( + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, + KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_F7 ,KC_F8 ,KC_F9 ,KC_F12 ,________, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_F4 ,KC_F5 ,KC_F6 ,KC_F11 ,___XX___, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_F1 ,KC_F2 ,KC_F3 ,KC_F10 ,___XX___, + ________,________,________,________,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___ + ), +//Media Keys +[_LYMED] = + LAYOUT_ortho_5x15( + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, + KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_VOLU ,___XX___,___XX___,________, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_MPRV ,KC_MUTE ,KC_MNXT ,___XX___,___XX___, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_VOLD ,___XX___,KC_MSTP ,___XX___, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_MPLY ,___XX___,___XX___,___XX___,___XX___ + ), +//Num Keys +[_LYNUM] = + LAYOUT_ortho_5x15( + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_PEQL ,KC_PSLS ,KC_PAST ,KC_PMNS ,___XX___, + KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_7 ,KC_8 ,KC_9 ,KC_MINUS,________, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_4 ,KC_5 ,KC_6 ,KC_PPLS ,KC_PSLS, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_1 ,KC_2 ,KC_3 ,KC_PENT ,KC_PAST, + ________,________,________,________,________,________,________,________,________,________,KC_0 ,KC_0 ,KC_PDOT ,KC_PEQL ,___XX___ + ), +//Navigation Keys +[_LYNAV] = + LAYOUT_ortho_5x15( + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, + KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_HOME ,KC_UP ,KC_PGUP ,KC_PSCR ,________, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_LEFT ,KC_F5 ,KC_RIGHT,KC_SLCK ,___XX___, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_END ,KC_DOWN ,KC_PGDN ,KC_PAUS ,___XX___, + ________,________,________,________,________,________,________,________,________,________,________,KC_INS ,KC_DEL ,___XX___,___XX___ + ), + //Mouse Keys + [_LYMOS] = + LAYOUT_ortho_5x15( + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, + KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_MS_U ,KC_WH_U ,KC_ACL2 ,________, + _______,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,KC_MS_L ,KC_ACL0 ,KC_MS_R ,KC_ACL1 ,___XX___, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,KC_MS_D ,KC_WH_D ,KC_BTN2 ,___XX___, + ________,________,________,________,________,________,________,________,________,________,KC_BTN1 ,KC_BTN3 ,KC_BTN4 ,___XX___,___XX___ + ), + //Systen Keys + [_LYSYS] = + LAYOUT_ortho_5x15( + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, + KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,________, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,QWERTY ,COLEMAK ,___XX___,RESET, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, + ________,________,________,________,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___ + ), + +// Light Control +[_LYLT] = + LAYOUT_ortho_5x15( + ________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___,___XX___, + KC_LYDEF,________,________,________,________,________,___XX___,___XX___,___XX___,RGB_HUD ,RGB_HUI ,RGB_SAD ,RGB_SAI ,RGB_VAD ,RGB_VAI, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,RGB_TOG ,RGB_RMOD,RGB_MOD ,___XX___,___XX___,___XX___, + ________,________,________,________,________,________,___XX___,___XX___,___XX___,BL_TOGG ,BL_DEC ,BL_INC ,BL_BRTG ,___XX___,___XX___, + ________,________,________,________,________,________,________,________,________,________,___XX___,___XX___,___XX___,___XX___,___XX___ + ) +}; + +//Define layer colors +#define rgblight_setrgb_user_base() rgblight_sethsv(325,255,255) +#define rgblight_setrgb_user_LYFK() rgblight_sethsv_red() +#define rgblight_setrgb_user_LYMED() rgblight_sethsv_blue() +#define rgblight_setrgb_user_LYNUM() rgblight_sethsv_purple() +#define rgblight_setrgb_user_LYNAV() rgblight_sethsv_cyan() +#define rgblight_setrgb_user_LYMOS() rgblight_sethsv_orange() +#define rgblight_setrgb_user_LYSYS() rgblight_sethsv_green() +#define rgblight_setrgb_user_LYLT() rgblight_sethsv_yellow() +#define rgblight_setrgb_user_LYMD() rgblight_sethsv_white() + +//initialize rgb +void matrix_init_user(void) { + rgblight_enable(); + rgblight_mode(1); + rgblight_setrgb_user_base(); +} + +//Set a color based on the layer +layer_state_t layer_state_set_user(layer_state_t state) { + switch(biton32(state)) { + case _LYFK: + rgblight_setrgb_user_LYFK(); + break; + case _LYMED: + rgblight_setrgb_user_LYMED(); + break; + case _LYNUM: + rgblight_setrgb_user_LYNUM(); + break; + case _LYNAV: + rgblight_setrgb_user_LYNAV(); + break; + case _LYMOS: + rgblight_setrgb_user_LYMOS(); + break; + case _LYSYS: + rgblight_setrgb_user_LYSYS(); + break; + case _LYLT: + rgblight_setrgb_user_LYLT(); + break; + case _LYMD: + rgblight_setrgb_user_LYMD(); + break; + default: + rgblight_setrgb_user_base(); + break; + } + return state; +} + + +//Const for shift +const uint8_t shift = MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT); + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch(keycode) { + case KC_LYDEF: + layer_clear(); + return false; + break; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case KC_BSDEL: + if (record->event.pressed) { + if (keyboard_report->mods & shift) { + if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { + unregister_code(KC_LSHIFT); + } + else { + unregister_code(KC_RSHIFT); + } + register_code(KC_DEL); + } + else { + register_code(KC_BSPC); + } + } + else { + unregister_code(KC_DEL); + unregister_code (KC_BSPC); + } + return false; + break; + case KC_FBSLH: + if (record->event.pressed) { + if (keyboard_report->mods & shift) { + if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { + unregister_code(KC_LSHIFT); + } + else { + unregister_code(KC_RSHIFT); + } + register_code(KC_BSLASH); + } + else { + register_code(KC_SLSH); + } + } + else { + unregister_code(KC_BSLASH); + unregister_code (KC_SLSH); + } + return false; + break; + case KC_DOTQ: + if (record->event.pressed) { + if (keyboard_report->mods & shift) { + register_code(KC_SLSH); // shifted slash = ? + } + else { + register_code(KC_DOT); + } + } + else { + unregister_code(KC_SLSH); // shifted slash = ? + unregister_code (KC_DOT); + } + return false; + break; + case KC_CPIPE: + if (record->event.pressed) { + if (keyboard_report->mods & shift) { + register_code(KC_BSLS); + } + else { + register_code(KC_COMM); + } + } + else { + unregister_code(KC_BSLS); + unregister_code (KC_COMM); + } + return false; + break; + } + return true; +}; diff --git a/keyboards/xd75/keymaps/tdl-jturner/readme.md b/keyboards/xiudi/xd75/keymaps/tdl-jturner/readme.md similarity index 100% rename from keyboards/xd75/keymaps/tdl-jturner/readme.md rename to keyboards/xiudi/xd75/keymaps/tdl-jturner/readme.md diff --git a/keyboards/xd75/keymaps/tdl-jturner/rules.mk b/keyboards/xiudi/xd75/keymaps/tdl-jturner/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/tdl-jturner/rules.mk rename to keyboards/xiudi/xd75/keymaps/tdl-jturner/rules.mk diff --git a/keyboards/xd75/keymaps/tomswartz07/keymap.c b/keyboards/xiudi/xd75/keymaps/tomswartz07/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/tomswartz07/keymap.c rename to keyboards/xiudi/xd75/keymaps/tomswartz07/keymap.c diff --git a/keyboards/xd75/keymaps/via/keymap.c b/keyboards/xiudi/xd75/keymaps/via/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/via/keymap.c rename to keyboards/xiudi/xd75/keymaps/via/keymap.c diff --git a/keyboards/xd75/keymaps/via/readme.md b/keyboards/xiudi/xd75/keymaps/via/readme.md similarity index 100% rename from keyboards/xd75/keymaps/via/readme.md rename to keyboards/xiudi/xd75/keymaps/via/readme.md diff --git a/keyboards/xiudi/xd75/keymaps/via/rules.mk b/keyboards/xiudi/xd75/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/xiudi/xd75/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xd75/keymaps/xo/config.h b/keyboards/xiudi/xd75/keymaps/xo/config.h similarity index 100% rename from keyboards/xd75/keymaps/xo/config.h rename to keyboards/xiudi/xd75/keymaps/xo/config.h diff --git a/keyboards/xd75/keymaps/xo/keymap.c b/keyboards/xiudi/xd75/keymaps/xo/keymap.c similarity index 100% rename from keyboards/xd75/keymaps/xo/keymap.c rename to keyboards/xiudi/xd75/keymaps/xo/keymap.c diff --git a/keyboards/xd75/keymaps/xo/readme.md b/keyboards/xiudi/xd75/keymaps/xo/readme.md similarity index 100% rename from keyboards/xd75/keymaps/xo/readme.md rename to keyboards/xiudi/xd75/keymaps/xo/readme.md diff --git a/keyboards/xd75/keymaps/xo/rules.mk b/keyboards/xiudi/xd75/keymaps/xo/rules.mk similarity index 100% rename from keyboards/xd75/keymaps/xo/rules.mk rename to keyboards/xiudi/xd75/keymaps/xo/rules.mk diff --git a/keyboards/xiudi/xd75/readme.md b/keyboards/xiudi/xd75/readme.md new file mode 100644 index 000000000..4b0bf1c3b --- /dev/null +++ b/keyboards/xiudi/xd75/readme.md @@ -0,0 +1,57 @@ +# XD75 + +![XD75](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB1MzOISXXXXXXgXpXXq6xXFXXXO_1024x1024.jpg) + +The XD75 is a 15x5 full-grid ortholinear keyboard manufactured by XIUDI. Available in two different versions: XD75Re with hot swap switch sockets and XD75Am with Alps+MX Stem support that needs soldering. + +This port of the QMK firmware is my first shot at using QMK, so if you see any features done wrong (or just plain missing), feel free to fix them and put in a pull request! + +* Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +* Hardware Supported: XD75Re, XD75Am +* Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd75re-xd75am-xd75-xiudi-60-custom-keyboard-pcb), [AliExpress](https://www.aliexpress.com/item/xd75re-Custom-Mechanical-Keyboard-75-keys-TKG-TOOLS-Underglow-RGB-PCB-GH60-60-programmed-gh60-kle/32818745981.html) + +Make example for this keyboard (after setting up your build environment): + + make xiudi/xd75:default + +Flashing example for this keyboard: + + make xiudi/xd75: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). + +## LED Control + +There are 3 individual LEDs that can be turned on and off. The functions are named according to how they're labeled on the PCB. + +TODO: it would be nice to have PWM support on these LEDs for fade-in/fade-out effects. + +```c +capslock_led_on(); +gp100_led_on(); +gp103_led_on(); + +bool led_update_user(led_t led_state) { + if (led_state.caps_lock) { + capslock_led_on(); + } else { + capslock_led_off(); + } + + if (some_custom_state) { + gp100_led_on(); + } else { + gp100_led_off(); + } + + return false; +} +``` + +For the curious: + +``` +CAPSLOCK_LED B2 +GP103_LED F4 +GP100_LED F7 +``` diff --git a/keyboards/xiudi/xd75/rules.mk b/keyboards/xiudi/xd75/rules.mk new file mode 100644 index 000000000..e032cb874 --- /dev/null +++ b/keyboards/xiudi/xd75/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 # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = ortho_5x15 diff --git a/keyboards/xd75/xd75.c b/keyboards/xiudi/xd75/xd75.c similarity index 100% rename from keyboards/xd75/xd75.c rename to keyboards/xiudi/xd75/xd75.c diff --git a/keyboards/xd75/xd75.h b/keyboards/xiudi/xd75/xd75.h similarity index 100% rename from keyboards/xd75/xd75.h rename to keyboards/xiudi/xd75/xd75.h diff --git a/keyboards/xiudi/xd84/config.h b/keyboards/xiudi/xd84/config.h new file mode 100644 index 000000000..9aa63a93f --- /dev/null +++ b/keyboards/xiudi/xd84/config.h @@ -0,0 +1,191 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7844 // "XD" +#define PRODUCT_ID 0x8484 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPrepublic +#define PRODUCT XD84 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#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, D5 } +//#define MATRIX_COL_PINS { F1, F0, B0 } +//#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +//#define DIODE_DIRECTION COL2ROW + +#define LED_CAPS_LOCK_PIN B6 +#define LED_PIN_ON_STATE 0 + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 10 +#define BACKLIGHT_ON_STATE 0 +// #define BACKLIGHT_BREATHING + +#define RGB_DI_PIN C7 +#define RGBLED_NUM 7 +#define RGBLIGHT_ANIMATIONS +// #ifdef RGB_DI_PIN +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/xd84/dev.md b/keyboards/xiudi/xd84/dev.md similarity index 100% rename from keyboards/xd84/dev.md rename to keyboards/xiudi/xd84/dev.md diff --git a/keyboards/xd84/info.json b/keyboards/xiudi/xd84/info.json similarity index 100% rename from keyboards/xd84/info.json rename to keyboards/xiudi/xd84/info.json diff --git a/keyboards/xd84/keymaps/default/keymap.c b/keyboards/xiudi/xd84/keymaps/default/keymap.c similarity index 100% rename from keyboards/xd84/keymaps/default/keymap.c rename to keyboards/xiudi/xd84/keymaps/default/keymap.c diff --git a/keyboards/xd84/keymaps/default_iso/keymap.c b/keyboards/xiudi/xd84/keymaps/default_iso/keymap.c similarity index 100% rename from keyboards/xd84/keymaps/default_iso/keymap.c rename to keyboards/xiudi/xd84/keymaps/default_iso/keymap.c diff --git a/keyboards/xd84/keymaps/via/keymap.c b/keyboards/xiudi/xd84/keymaps/via/keymap.c similarity index 100% rename from keyboards/xd84/keymaps/via/keymap.c rename to keyboards/xiudi/xd84/keymaps/via/keymap.c diff --git a/keyboards/xd84/keymaps/via/readme.md b/keyboards/xiudi/xd84/keymaps/via/readme.md similarity index 100% rename from keyboards/xd84/keymaps/via/readme.md rename to keyboards/xiudi/xd84/keymaps/via/readme.md diff --git a/keyboards/xiudi/xd84/keymaps/via/rules.mk b/keyboards/xiudi/xd84/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/xiudi/xd84/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xd84/matrix.c b/keyboards/xiudi/xd84/matrix.c similarity index 100% rename from keyboards/xd84/matrix.c rename to keyboards/xiudi/xd84/matrix.c diff --git a/keyboards/xiudi/xd84/readme.md b/keyboards/xiudi/xd84/readme.md new file mode 100644 index 000000000..4efedca36 --- /dev/null +++ b/keyboards/xiudi/xd84/readme.md @@ -0,0 +1,23 @@ +# XD84 + +![XD84](https://cdn.shopify.com/s/files/1/2711/4238/products/HTB17eeJSXXXXXbIXFXXq6xXFXXXp_1024x1024.jpg?v=1515505994) + +Keyboard with 84 Keys & RGB LED Underglow +- Designed by Xiudi +- Up to 87 keys + - iso and ansi support +- Uses Kimera core + +* Keyboard Maintainer: QMK Community +* Hardware Supported: XD84 +* Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd84-xiudi-70-custom-keyboard-pcb) + +Make example for this keyboard (after setting up your build environment): + + make xiudi/xd84:default + +Flashing example for this keyboard: + + make xiudi/xd84:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xiudi/xd84/rules.mk b/keyboards/xiudi/xd84/rules.mk new file mode 100644 index 000000000..92f231570 --- /dev/null +++ b/keyboards/xiudi/xd84/rules.mk @@ -0,0 +1,40 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +LTO_ENABLE = yes + +# custom matrix setup +CUSTOM_MATRIX = lite + +VPATH += drivers/gpio +SRC += pca9555.c matrix.c +QUANTUM_LIB_SRC += i2c_master.c + +LAYOUTS = 75_ansi 75_iso diff --git a/keyboards/xd84/xd84.c b/keyboards/xiudi/xd84/xd84.c similarity index 100% rename from keyboards/xd84/xd84.c rename to keyboards/xiudi/xd84/xd84.c diff --git a/keyboards/xd84/xd84.h b/keyboards/xiudi/xd84/xd84.h similarity index 100% rename from keyboards/xd84/xd84.h rename to keyboards/xiudi/xd84/xd84.h diff --git a/keyboards/xd84pro/config.h b/keyboards/xiudi/xd84pro/config.h similarity index 100% rename from keyboards/xd84pro/config.h rename to keyboards/xiudi/xd84pro/config.h diff --git a/keyboards/xd84pro/dev.md b/keyboards/xiudi/xd84pro/dev.md similarity index 100% rename from keyboards/xd84pro/dev.md rename to keyboards/xiudi/xd84pro/dev.md diff --git a/keyboards/xd84pro/info.json b/keyboards/xiudi/xd84pro/info.json similarity index 100% rename from keyboards/xd84pro/info.json rename to keyboards/xiudi/xd84pro/info.json diff --git a/keyboards/xd84pro/keymaps/default/keymap.c b/keyboards/xiudi/xd84pro/keymaps/default/keymap.c similarity index 100% rename from keyboards/xd84pro/keymaps/default/keymap.c rename to keyboards/xiudi/xd84pro/keymaps/default/keymap.c diff --git a/keyboards/xd84pro/keymaps/default_iso/keymap.c b/keyboards/xiudi/xd84pro/keymaps/default_iso/keymap.c similarity index 100% rename from keyboards/xd84pro/keymaps/default_iso/keymap.c rename to keyboards/xiudi/xd84pro/keymaps/default_iso/keymap.c diff --git a/keyboards/xd84pro/keymaps/via/keymap.c b/keyboards/xiudi/xd84pro/keymaps/via/keymap.c similarity index 100% rename from keyboards/xd84pro/keymaps/via/keymap.c rename to keyboards/xiudi/xd84pro/keymaps/via/keymap.c diff --git a/keyboards/xd84pro/keymaps/via/readme.md b/keyboards/xiudi/xd84pro/keymaps/via/readme.md similarity index 100% rename from keyboards/xd84pro/keymaps/via/readme.md rename to keyboards/xiudi/xd84pro/keymaps/via/readme.md diff --git a/keyboards/xd84pro/keymaps/via/rules.mk b/keyboards/xiudi/xd84pro/keymaps/via/rules.mk similarity index 100% rename from keyboards/xd84pro/keymaps/via/rules.mk rename to keyboards/xiudi/xd84pro/keymaps/via/rules.mk diff --git a/keyboards/xiudi/xd84pro/readme.md b/keyboards/xiudi/xd84pro/readme.md new file mode 100644 index 000000000..7641a26b7 --- /dev/null +++ b/keyboards/xiudi/xd84pro/readme.md @@ -0,0 +1,24 @@ +# XD84 Pro + +![XD84 Pro](https://cdn.shopify.com/s/files/1/2711/4238/products/Hf5d4a9571a524cb78870def7403f5acc5.jpg?v=1574416288) + +Keyboard with 84 Keys, RGB LED Underglow, and USB-C Connection +- Designed by Xiudi +- Up to 87 keys + - iso and ansi support + +The silkscreen printing on the PCB refers to this as the "XD84 v2.0". + +* Keyboard Maintainer: QMK Community +* Hardware Supported: XD84 Pro +* Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd84pro-xd84-pro-custom-mechanical-keyboard-kit-75-supports-tkg-tools-support-underglow-rgb-pcb-programmed-gh84-kle-type-c) + +Make example for this keyboard (after setting up your build environment): + + make xiudi/xd84pro:default + +Flashing example for this keyboard: + + make xiudi/xd84pro:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xiudi/xd84pro/rules.mk b/keyboards/xiudi/xd84pro/rules.mk new file mode 100644 index 000000000..d2d3db848 --- /dev/null +++ b/keyboards/xiudi/xd84pro/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 # Enable Bootmagic Lite +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 = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 75_ansi 75_iso diff --git a/keyboards/xd84pro/xd84pro.c b/keyboards/xiudi/xd84pro/xd84pro.c similarity index 100% rename from keyboards/xd84pro/xd84pro.c rename to keyboards/xiudi/xd84pro/xd84pro.c diff --git a/keyboards/xd84pro/xd84pro.h b/keyboards/xiudi/xd84pro/xd84pro.h similarity index 100% rename from keyboards/xd84pro/xd84pro.h rename to keyboards/xiudi/xd84pro/xd84pro.h diff --git a/keyboards/xiudi/xd87/config.h b/keyboards/xiudi/xd87/config.h new file mode 100644 index 000000000..24e2dc233 --- /dev/null +++ b/keyboards/xiudi/xd87/config.h @@ -0,0 +1,173 @@ +/* +Copyright 2018 Alexander Fougner + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7844 // "XD" +#define PRODUCT_ID 0x8787 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KP Republic +#define PRODUCT XD87 TKL + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + +#define MATRIX_ROW_PINS { D1, B0, B1, C7, D3, D5 } + +#define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B5, B6, C6, D4, D6, D7, B4, B2, B3, D2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define LED_CAPS_LOCK_PIN E2 +#define LED_PIN_ON_STATE 0 + +#define BACKLIGHT_PIN D0 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_ON_STATE 0 + +#define RGB_DI_PIN B7 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + diff --git a/keyboards/xd87/info.json b/keyboards/xiudi/xd87/info.json similarity index 100% rename from keyboards/xd87/info.json rename to keyboards/xiudi/xd87/info.json diff --git a/keyboards/xd87/keymaps/default/config.h b/keyboards/xiudi/xd87/keymaps/default/config.h similarity index 100% rename from keyboards/xd87/keymaps/default/config.h rename to keyboards/xiudi/xd87/keymaps/default/config.h diff --git a/keyboards/xd87/keymaps/default/keymap.c b/keyboards/xiudi/xd87/keymaps/default/keymap.c similarity index 100% rename from keyboards/xd87/keymaps/default/keymap.c rename to keyboards/xiudi/xd87/keymaps/default/keymap.c diff --git a/keyboards/xd87/keymaps/default/readme.md b/keyboards/xiudi/xd87/keymaps/default/readme.md similarity index 100% rename from keyboards/xd87/keymaps/default/readme.md rename to keyboards/xiudi/xd87/keymaps/default/readme.md diff --git a/keyboards/xd87/keymaps/default_underglow/config.h b/keyboards/xiudi/xd87/keymaps/default_underglow/config.h similarity index 100% rename from keyboards/xd87/keymaps/default_underglow/config.h rename to keyboards/xiudi/xd87/keymaps/default_underglow/config.h diff --git a/keyboards/xd87/keymaps/default_underglow/keymap.c b/keyboards/xiudi/xd87/keymaps/default_underglow/keymap.c similarity index 100% rename from keyboards/xd87/keymaps/default_underglow/keymap.c rename to keyboards/xiudi/xd87/keymaps/default_underglow/keymap.c diff --git a/keyboards/xd87/keymaps/default_underglow/readme.md b/keyboards/xiudi/xd87/keymaps/default_underglow/readme.md similarity index 100% rename from keyboards/xd87/keymaps/default_underglow/readme.md rename to keyboards/xiudi/xd87/keymaps/default_underglow/readme.md diff --git a/keyboards/xiudi/xd87/keymaps/default_underglow/rules.mk b/keyboards/xiudi/xd87/keymaps/default_underglow/rules.mk new file mode 100755 index 000000000..8d4da89e3 --- /dev/null +++ b/keyboards/xiudi/xd87/keymaps/default_underglow/rules.mk @@ -0,0 +1,3 @@ +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +COMMAND_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/xd87/keymaps/mac_underglow/keymap.c b/keyboards/xiudi/xd87/keymaps/mac_underglow/keymap.c similarity index 100% rename from keyboards/xd87/keymaps/mac_underglow/keymap.c rename to keyboards/xiudi/xd87/keymaps/mac_underglow/keymap.c diff --git a/keyboards/xd87/keymaps/mac_underglow/readme.md b/keyboards/xiudi/xd87/keymaps/mac_underglow/readme.md similarity index 100% rename from keyboards/xd87/keymaps/mac_underglow/readme.md rename to keyboards/xiudi/xd87/keymaps/mac_underglow/readme.md diff --git a/keyboards/xiudi/xd87/keymaps/mac_underglow/rules.mk b/keyboards/xiudi/xd87/keymaps/mac_underglow/rules.mk new file mode 100755 index 000000000..8d4da89e3 --- /dev/null +++ b/keyboards/xiudi/xd87/keymaps/mac_underglow/rules.mk @@ -0,0 +1,3 @@ +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +COMMAND_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/xd87/keymaps/via/keymap.c b/keyboards/xiudi/xd87/keymaps/via/keymap.c similarity index 100% rename from keyboards/xd87/keymaps/via/keymap.c rename to keyboards/xiudi/xd87/keymaps/via/keymap.c diff --git a/keyboards/xd87/keymaps/via/readme.md b/keyboards/xiudi/xd87/keymaps/via/readme.md similarity index 100% rename from keyboards/xd87/keymaps/via/readme.md rename to keyboards/xiudi/xd87/keymaps/via/readme.md diff --git a/keyboards/xiudi/xd87/keymaps/via/rules.mk b/keyboards/xiudi/xd87/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/xiudi/xd87/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xiudi/xd87/readme.md b/keyboards/xiudi/xd87/readme.md new file mode 100644 index 000000000..7beae2c6c --- /dev/null +++ b/keyboards/xiudi/xd87/readme.md @@ -0,0 +1,26 @@ +# XD87 + +![XD87](https://i.imgur.com/qVyOies.jpg) + + +- Keyboard Maintainer: [Alexander Fougner](https://github.com/fougner) +- Hardware Supported: XD87 PCB v1.1 +- Hardware Availability: + - [KPrepublic.com](https://kprepublic.com/products/xd87-xd87-xd80-custom-mechanical-keyboard-kit80-supports-tkg-tools-support-underglow-rgb-pcb-programmed-gh80-kle) + - [AliExpress](https://www.aliexpress.com/item/xd87-XD87-XD80-Custom-Mechanical-Keyboard-Kit80-Supports-TKG-TOOLS-Support-Underglow-RGB-PCB-programmed-gh80/32892540743.html) + +Make example for this keyboard (after setting up your build environment): + + make xiudi/xd87:default + +It also supports the tkl_ansi and tkl_iso community layouts: + + # Build firmware with ANSI layout + make xiudi/xd87:default_tkl_ansi + # Build firmware with ISO layout + make xiudi/xd87:default_tkl_iso + + +The keyboard can be reset to bootloader by using bootmagic (top left key by default) or short out the small connector between the Delete and End keys. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/xiudi/xd87/rules.mk b/keyboards/xiudi/xd87/rules.mk new file mode 100644 index 000000000..d63716a98 --- /dev/null +++ b/keyboards/xiudi/xd87/rules.mk @@ -0,0 +1,33 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +# Supported layouts +LAYOUTS = tkl_ansi tkl_iso diff --git a/keyboards/xd87/xd87.c b/keyboards/xiudi/xd87/xd87.c similarity index 100% rename from keyboards/xd87/xd87.c rename to keyboards/xiudi/xd87/xd87.c diff --git a/keyboards/xd87/xd87.h b/keyboards/xiudi/xd87/xd87.h similarity index 100% rename from keyboards/xd87/xd87.h rename to keyboards/xiudi/xd87/xd87.h diff --git a/keyboards/xiudi/xd96/config.h b/keyboards/xiudi/xd96/config.h new file mode 100644 index 000000000..280fd39df --- /dev/null +++ b/keyboards/xiudi/xd96/config.h @@ -0,0 +1,192 @@ +/* Copyright 2019 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x7844 // "XD" +#define PRODUCT_ID 0x9696 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPrepublic +#define PRODUCT XD96 + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 18 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +//#define MATRIX_ROW_PINS { D0, D5 } +//#define MATRIX_COL_PINS { F1, F0, B0 } +//#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +//#define DIODE_DIRECTION COL2ROW + +#define LED_NUM_LOCK_PIN C6 +#define LED_CAPS_LOCK_PIN B6 +#define LED_PIN_ON_STATE 0 + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 10 +// #define BACKLIGHT_BREATHING + +#define RGB_DI_PIN C7 +#define RGBLED_NUM 16 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_LIMIT_VAL 50 +// #ifdef RGB_DI_PIN +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/xd96/info.json b/keyboards/xiudi/xd96/info.json similarity index 100% rename from keyboards/xd96/info.json rename to keyboards/xiudi/xd96/info.json diff --git a/keyboards/xd96/keymaps/default/keymap.c b/keyboards/xiudi/xd96/keymaps/default/keymap.c similarity index 100% rename from keyboards/xd96/keymaps/default/keymap.c rename to keyboards/xiudi/xd96/keymaps/default/keymap.c diff --git a/keyboards/xd96/keymaps/default_iso/keymap.c b/keyboards/xiudi/xd96/keymaps/default_iso/keymap.c similarity index 100% rename from keyboards/xd96/keymaps/default_iso/keymap.c rename to keyboards/xiudi/xd96/keymaps/default_iso/keymap.c diff --git a/keyboards/xd96/keymaps/uuupah/keymap.c b/keyboards/xiudi/xd96/keymaps/uuupah/keymap.c similarity index 100% rename from keyboards/xd96/keymaps/uuupah/keymap.c rename to keyboards/xiudi/xd96/keymaps/uuupah/keymap.c diff --git a/keyboards/xd96/keymaps/via/keymap.c b/keyboards/xiudi/xd96/keymaps/via/keymap.c similarity index 100% rename from keyboards/xd96/keymaps/via/keymap.c rename to keyboards/xiudi/xd96/keymaps/via/keymap.c diff --git a/keyboards/xd96/keymaps/via/readme.md b/keyboards/xiudi/xd96/keymaps/via/readme.md similarity index 100% rename from keyboards/xd96/keymaps/via/readme.md rename to keyboards/xiudi/xd96/keymaps/via/readme.md diff --git a/keyboards/xiudi/xd96/keymaps/via/rules.mk b/keyboards/xiudi/xd96/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/xiudi/xd96/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/xd96/matrix.c b/keyboards/xiudi/xd96/matrix.c similarity index 100% rename from keyboards/xd96/matrix.c rename to keyboards/xiudi/xd96/matrix.c diff --git a/keyboards/xiudi/xd96/readme.md b/keyboards/xiudi/xd96/readme.md new file mode 100644 index 000000000..5f4038ef3 --- /dev/null +++ b/keyboards/xiudi/xd96/readme.md @@ -0,0 +1,22 @@ +# XD96 + +![XD96](https://cdn.shopify.com/s/files/1/2711/4238/products/xd96_pcb_1024x1024.jpg?v=1515425370) + +Keyboard with 96 Keys & RGB LED Underglow +- Designed by Xiudi +- ISO and ANSI support +- Uses Kimera core + +* Keyboard Maintainer: QMK Community +* Hardware Supported: XD96 +* Hardware Availability: [KPrepublic](https://kprepublic.com/products/xd96-pcb-90-custom-mechanical-keyboard-supports-tkg-tools-underglow-rgb-programmed); [AliExpress](https://aliexpress.com/item/cospad-Custom-Mechanical-Keyboard-Kit-up-tp-24-keys-Supports-TKG-TOOLS-Underglow-RGB-PCB-20/32818383873.html) + +Make example for this keyboard (after setting up your build environment): + + make xiudi/xd96:default + +Flashing example for this keyboard: + + make xiudi/xd96:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/xiudi/xd96/rules.mk b/keyboards/xiudi/xd96/rules.mk new file mode 100644 index 000000000..8230ff8f4 --- /dev/null +++ b/keyboards/xiudi/xd96/rules.mk @@ -0,0 +1,38 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +LTO_ENABLE = yes + +# custom matrix setup +CUSTOM_MATRIX = lite + +VPATH += drivers/gpio +SRC += pca9555.c matrix.c +QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/xd96/xd96.c b/keyboards/xiudi/xd96/xd96.c similarity index 100% rename from keyboards/xd96/xd96.c rename to keyboards/xiudi/xd96/xd96.c diff --git a/keyboards/xd96/xd96.h b/keyboards/xiudi/xd96/xd96.h similarity index 100% rename from keyboards/xd96/xd96.h rename to keyboards/xiudi/xd96/xd96.h diff --git a/keyboards/xmmx/rules.mk b/keyboards/xmmx/rules.mk index 94733eeaf..d96183de9 100644 --- a/keyboards/xmmx/rules.mk +++ b/keyboards/xmmx/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xw60/rules.mk b/keyboards/xw60/rules.mk index b8629daeb..9f51e199a 100644 --- a/keyboards/xw60/rules.mk +++ b/keyboards/xw60/rules.mk @@ -15,19 +15,17 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -API_SYSEX_ENABLE = no HAPTIC_ENABLE += SOLENOID # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/yampad/keymaps/default/keymap.c b/keyboards/yampad/keymaps/default/keymap.c index dfecab17e..d22eb2617 100644 --- a/keyboards/yampad/keymaps/default/keymap.c +++ b/keyboards/yampad/keymaps/default/keymap.c @@ -116,7 +116,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 270 degrees diff --git a/keyboards/yampad/keymaps/traditional/keymap.c b/keyboards/yampad/keymaps/traditional/keymap.c index e9fd2b8ae..57462c050 100644 --- a/keyboards/yampad/keymaps/traditional/keymap.c +++ b/keyboards/yampad/keymaps/traditional/keymap.c @@ -19,7 +19,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ +*/ #include QMK_KEYBOARD_H @@ -116,7 +116,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 270 degrees diff --git a/keyboards/yampad/rules.mk b/keyboards/yampad/rules.mk index db0a8b5da..f42be7ca5 100644 --- a/keyboards/yampad/rules.mk +++ b/keyboards/yampad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -20,5 +20,6 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = yes -DEBOUNCE_TYPE = eager_pk +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +DEBOUNCE_TYPE = sym_eager_pk diff --git a/keyboards/yampad/yampad.c b/keyboards/yampad/yampad.c index 764f48404..950a98721 100644 --- a/keyboards/yampad/yampad.c +++ b/keyboards/yampad/yampad.c @@ -1,4 +1,4 @@ - + /* Copyright 2019 * * This program is free software: you can redistribute it and/or modify @@ -16,13 +16,13 @@ */ #include "yampad.h" -#if defined(OLED_DRIVER_ENABLE) +#if defined(OLED_ENABLE) __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 270 degrees } -__attribute__((weak)) +__attribute__((weak)) void oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer"), false); diff --git a/keyboards/yasui/rules.mk b/keyboards/yasui/rules.mk index b8adede3e..808e9275a 100644 --- a/keyboards/yasui/rules.mk +++ b/keyboards/yasui/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/yatara/drink_me/rules.mk b/keyboards/yatara/drink_me/rules.mk index d432712bd..fc2df61a3 100644 --- a/keyboards/yatara/drink_me/rules.mk +++ b/keyboards/yatara/drink_me/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,6 +25,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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk index d6763bc75..728d786e4 100644 --- a/keyboards/yd60mq/rules.mk +++ b/keyboards/yd60mq/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/yd68/config.h b/keyboards/yd68/config.h index a17d3d92b..0a2b93e61 100644 --- a/keyboards/yd68/config.h +++ b/keyboards/yd68/config.h @@ -168,23 +168,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/yd68/rules.mk b/keyboards/yd68/rules.mk index e8ec4ea08..2032537ea 100644 --- a/keyboards/yd68/rules.mk +++ b/keyboards/yd68/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/yeehaw/rules.mk b/keyboards/yeehaw/rules.mk index 3fc8514b5..ce866949f 100644 --- a/keyboards/yeehaw/rules.mk +++ b/keyboards/yeehaw/rules.mk @@ -15,6 +15,5 @@ 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 RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support UNICODE_ENABLE = no # Unicode ENCODER_ENABLE = yes diff --git a/keyboards/ymd75/rev1/rules.mk b/keyboards/ymd75/rev1/rules.mk index 2499c1c5e..02b1725a9 100644 --- a/keyboards/ymd75/rev1/rules.mk +++ b/keyboards/ymd75/rev1/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/ymd75/rev2/rules.mk b/keyboards/ymd75/rev2/rules.mk index 2499c1c5e..02b1725a9 100644 --- a/keyboards/ymd75/rev2/rules.mk +++ b/keyboards/ymd75/rev2/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/ymd75/rev3/rules.mk b/keyboards/ymd75/rev3/rules.mk index 9506e636d..4d06a8818 100644 --- a/keyboards/ymd75/rev3/rules.mk +++ b/keyboards/ymd75/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymd96/rules.mk b/keyboards/ymd96/rules.mk index 2ce37cfc7..818aed04d 100644 --- a/keyboards/ymd96/rules.mk +++ b/keyboards/ymd96/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/ymdk/bface/rules.mk b/keyboards/ymdk/bface/rules.mk index 3d51be113..b5853beab 100644 --- a/keyboards/ymdk/bface/rules.mk +++ b/keyboards/ymdk/bface/rules.mk @@ -12,7 +12,7 @@ MCU = atmega32a BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/ymdk/np24/u4rgb6/rules.mk b/keyboards/ymdk/np24/u4rgb6/rules.mk index 625a433f9..d1fdbf6c7 100644 --- a/keyboards/ymdk/np24/u4rgb6/rules.mk +++ b/keyboards/ymdk/np24/u4rgb6/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -LAYOUTS = ortho_6x4 numpad_6x4 ortho_4x6 +LAYOUTS = ortho_6x4 numpad_6x4 diff --git a/keyboards/ymdk/sp64/rules.mk b/keyboards/ymdk/sp64/rules.mk index 8db57de3b..3d4453692 100644 --- a/keyboards/ymdk/sp64/rules.mk +++ b/keyboards/ymdk/sp64/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk/wings/rules.mk b/keyboards/ymdk/wings/rules.mk index 76bad1f48..e2576212f 100644 --- a/keyboards/ymdk/wings/rules.mk +++ b/keyboards/ymdk/wings/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk/ym68/rules.mk b/keyboards/ymdk/ym68/rules.mk index a48a691a9..838544556 100644 --- a/keyboards/ymdk/ym68/rules.mk +++ b/keyboards/ymdk/ym68/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk/ymd09/rules.mk b/keyboards/ymdk/ymd09/rules.mk index 88f2897b7..dafb7d373 100644 --- a/keyboards/ymdk/ymd09/rules.mk +++ b/keyboards/ymdk/ymd09/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 LTO_ENABLE = yes # reduce firmware size diff --git a/keyboards/ymdk/ymd40/v2/rules.mk b/keyboards/ymdk/ymd40/v2/rules.mk index 7c7c443c9..6f60f35e4 100644 --- a/keyboards/ymdk/ymd40/v2/rules.mk +++ b/keyboards/ymdk/ymd40/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk/ymd67/rules.mk b/keyboards/ymdk/ymd67/rules.mk index 2ffe8fcab..b036e19b3 100644 --- a/keyboards/ymdk/ymd67/rules.mk +++ b/keyboards/ymdk/ymd67/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk_np21/rules.mk b/keyboards/ymdk_np21/rules.mk index ed7d082f0..c2436a40a 100644 --- a/keyboards/ymdk_np21/rules.mk +++ b/keyboards/ymdk_np21/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadHID # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/yncognito/batpad/config.h b/keyboards/yncognito/batpad/config.h index 02c84a514..7ca4072e0 100644 --- a/keyboards/yncognito/batpad/config.h +++ b/keyboards/yncognito/batpad/config.h @@ -47,13 +47,11 @@ along with this program. If not, see . #define RGB_DI_PIN B5 #define DRIVER_LED_TOTAL 8 -#define RGB_MATRIX_KEYPRESSES -#define RGB_MATRIX_KEYRELEASES +#define RGB_MATRIX_KEYPRESSES +#define RGB_MATRIX_KEYRELEASES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_DISABLE_AFTER_TIMEOUT 0 -#define RGB_DISABLE_WHEN_USB_SUSPENDED false -#define RGB_MATRIX_LED_FLUSH_LIMIT 16 -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +#define RGB_DISABLE_AFTER_TIMEOUT 0 +// #define RGB_DISABLE_WHEN_USB_SUSPENDED +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL - - diff --git a/keyboards/yncognito/batpad/keymaps/via/rules.mk b/keyboards/yncognito/batpad/keymaps/via/rules.mk index 1e5b99807..36b7ba9cb 100644 --- a/keyboards/yncognito/batpad/keymaps/via/rules.mk +++ b/keyboards/yncognito/batpad/keymaps/via/rules.mk @@ -1 +1,2 @@ VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/yncognito/batpad/rules.mk b/keyboards/yncognito/batpad/rules.mk index 4abf1b6fc..b53a3c6d3 100644 --- a/keyboards/yncognito/batpad/rules.mk +++ b/keyboards/yncognito/batpad/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -26,7 +26,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality 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 AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/yoichiro/lunakey_mini/keymaps/default/rules.mk b/keyboards/yoichiro/lunakey_mini/keymaps/default/rules.mk index b4edb3a26..d43fb74b3 100644 --- a/keyboards/yoichiro/lunakey_mini/keymaps/default/rules.mk +++ b/keyboards/yoichiro/lunakey_mini/keymaps/default/rules.mk @@ -1,3 +1,3 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB Underglow AUDIO_ENABLE = no # Enable Audio output -OLED_DRIVER_ENABLE = no # Enable OLED Display +OLED_ENABLE = no # Enable OLED Display diff --git a/keyboards/yoichiro/lunakey_mini/keymaps/via/rules.mk b/keyboards/yoichiro/lunakey_mini/keymaps/via/rules.mk index 89b0f22d0..8b55a3b73 100644 --- a/keyboards/yoichiro/lunakey_mini/keymaps/via/rules.mk +++ b/keyboards/yoichiro/lunakey_mini/keymaps/via/rules.mk @@ -1,5 +1,5 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB Underglow AUDIO_ENABLE = no # Enable Audio output -OLED_DRIVER_ENABLE = no # Enable OLED Display +OLED_ENABLE = no # Enable OLED Display VIA_ENABLE = yes # Enable VIA support LTO_ENABLE = yes # CFLAGS=flto diff --git a/keyboards/yoichiro/lunakey_mini/rules.mk b/keyboards/yoichiro/lunakey_mini/rules.mk index 8096b2238..a23dda616 100644 --- a/keyboards/yoichiro/lunakey_mini/rules.mk +++ b/keyboards/yoichiro/lunakey_mini/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/yosino58/keymaps/sakura/rules.mk b/keyboards/yosino58/keymaps/sakura/rules.mk index 296e53287..0b2ca1ba5 100644 --- a/keyboards/yosino58/keymaps/sakura/rules.mk +++ b/keyboards/yosino58/keymaps/sakura/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/yosino58/rules.mk b/keyboards/yosino58/rules.mk index 57e06ed5f..54f7ca066 100644 --- a/keyboards/yosino58/rules.mk +++ b/keyboards/yosino58/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/yugo_m/model_m_101/rules.mk b/keyboards/yugo_m/model_m_101/rules.mk index 7708f89f3..3479adfdc 100644 --- a/keyboards/yugo_m/model_m_101/rules.mk +++ b/keyboards/yugo_m/model_m_101/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/yurei/config.h b/keyboards/yurei/config.h index 81ddbe428..c3527956a 100644 --- a/keyboards/yurei/config.h +++ b/keyboards/yurei/config.h @@ -194,26 +194,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 - /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/yurei/rules.mk b/keyboards/yurei/rules.mk index 734460c71..233b96375 100644 --- a/keyboards/yurei/rules.mk +++ b/keyboards/yurei/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 = no # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/yushakobo/quick7/config.h b/keyboards/yushakobo/quick7/config.h index e5bcfe761..fdff5d92e 100644 --- a/keyboards/yushakobo/quick7/config.h +++ b/keyboards/yushakobo/quick7/config.h @@ -195,25 +195,6 @@ along with this program. If not, see . #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION #endif -/* - * MIDI options - */ - -/* enable basic MIDI features: - - MIDI notes can be sent when in Music mode is on -*/ -//#define MIDI_BASIC - -/* enable advanced MIDI features: - - MIDI notes can be added to the keymap - - Octave shift and transpose - - Virtual sustain, portamento, and modulation wheel - - etc. -*/ -//#define MIDI_ADVANCED - -/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ -//#define MIDI_TONE_KEYCODE_OCTAVES 1 /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/yushakobo/quick7/rules.mk b/keyboards/yushakobo/quick7/rules.mk index 75e07106b..eb2cf50e0 100644 --- a/keyboards/yushakobo/quick7/rules.mk +++ b/keyboards/yushakobo/quick7/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/yynmt/acperience12/rules.mk b/keyboards/yynmt/acperience12/rules.mk index bb8f6496c..422b355ee 100644 --- a/keyboards/yynmt/acperience12/rules.mk +++ b/keyboards/yynmt/acperience12/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/z150_bh/rules.mk b/keyboards/z150_bh/rules.mk index 1843f1ba6..760d60150 100644 --- a/keyboards/z150_bh/rules.mk +++ b/keyboards/z150_bh/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zfrontier/big_switch/rules.mk b/keyboards/zfrontier/big_switch/rules.mk index ce4a8286e..5acc380f6 100644 --- a/keyboards/zfrontier/big_switch/rules.mk +++ b/keyboards/zfrontier/big_switch/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -25,7 +25,6 @@ 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 -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 TAP_DANCE_ENABLE = no diff --git a/keyboards/zinc/keymaps/default/rules.mk b/keyboards/zinc/keymaps/default/rules.mk index 7e3286f0f..1ef92ef2d 100644 --- a/keyboards/zinc/keymaps/default/rules.mk +++ b/keyboards/zinc/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zinc/keymaps/ginjake/rules.mk b/keyboards/zinc/keymaps/ginjake/rules.mk index 2cb59fe8b..63e5227ef 100644 --- a/keyboards/zinc/keymaps/ginjake/rules.mk +++ b/keyboards/zinc/keymaps/ginjake/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zinc/keymaps/monks/rules.mk b/keyboards/zinc/keymaps/monks/rules.mk index c1b98dead..d8ec4497e 100644 --- a/keyboards/zinc/keymaps/monks/rules.mk +++ b/keyboards/zinc/keymaps/monks/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zinc/keymaps/toshi0383/rules.mk b/keyboards/zinc/keymaps/toshi0383/rules.mk index 530271f43..7860cbd01 100644 --- a/keyboards/zinc/keymaps/toshi0383/rules.mk +++ b/keyboards/zinc/keymaps/toshi0383/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zinc/rules.mk b/keyboards/zinc/rules.mk index 45928af88..c6386a10a 100644 --- a/keyboards/zinc/rules.mk +++ b/keyboards/zinc/rules.mk @@ -15,14 +15,13 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/zj68/rules.mk b/keyboards/zj68/rules.mk index b4ed641be..174778177 100644 --- a/keyboards/zj68/rules.mk +++ b/keyboards/zj68/rules.mk @@ -15,7 +15,7 @@ BOOTLOADER = atmel-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zlant/rules.mk b/keyboards/zlant/rules.mk index 03d57e23f..687116bfd 100755 --- a/keyboards/zlant/rules.mk +++ b/keyboards/zlant/rules.mk @@ -14,7 +14,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zoo/wampus/rules.mk b/keyboards/zoo/wampus/rules.mk index a0eade37c..02375d924 100644 --- a/keyboards/zoo/wampus/rules.mk +++ b/keyboards/zoo/wampus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,7 +21,7 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow WS2812_DRIVER = spi # RGB underglow driver configuration BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = no # Enables the use of OLED displays +OLED_ENABLE = no # Enables the use of OLED displays # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/zoo/wampus/wampus.c b/keyboards/zoo/wampus/wampus.c index 1a333a70e..350d47a3e 100644 --- a/keyboards/zoo/wampus/wampus.c +++ b/keyboards/zoo/wampus/wampus.c @@ -15,7 +15,7 @@ */ #include "wampus.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE void board_init(void) { SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; diff --git a/keyboards/ztboards/after/rules.mk b/keyboards/ztboards/after/rules.mk index 6edb6ea54..c0e533d9c 100644 --- a/keyboards/ztboards/after/rules.mk +++ b/keyboards/ztboards/after/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ztboards/noon/rules.mk b/keyboards/ztboards/noon/rules.mk index 32981133b..efca6bac6 100644 --- a/keyboards/ztboards/noon/rules.mk +++ b/keyboards/ztboards/noon/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zvecr/split_blackpill/rules.mk b/keyboards/zvecr/split_blackpill/rules.mk index 8ba870e18..e54f20489 100644 --- a/keyboards/zvecr/split_blackpill/rules.mk +++ b/keyboards/zvecr/split_blackpill/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -18,7 +18,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/keyboards/zvecr/zv48/rules.mk b/keyboards/zvecr/zv48/rules.mk index 86bcad8a0..375a64c99 100644 --- a/keyboards/zvecr/zv48/rules.mk +++ b/keyboards/zvecr/zv48/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control @@ -14,7 +14,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow ENCODER_ENABLE = yes # Enable rotary encoder support -MIDI_ENABLE = no # MIDI support BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output diff --git a/layouts/community/ergodox/adnw_k_o_y/keymap.c b/layouts/community/ergodox/adnw_k_o_y/keymap.c index 6ade0001c..589a9ea87 100644 --- a/layouts/community/ergodox/adnw_k_o_y/keymap.c +++ b/layouts/community/ergodox/adnw_k_o_y/keymap.c @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DEL, DE_K, DE_DOT, DE_O, DE_COMM,DE_Y, TG(SYMB), KC_BSPC, DE_H, DE_A, DE_E, DE_I, DE_U, - KC_LSFT, CTL_T(DE_X), DE_Q, DE_AE, DE_UE, DE_OE, ALL_T(KC_NO), + KC_LSFT, CTL_T(DE_X), DE_Q, DE_ADIA,DE_UDIA,DE_ODIA,ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, ALT_T(KC_APP), KC_LGUI, KC_HOME, diff --git a/layouts/community/ergodox/adnw_p_u_q/keymap.c b/layouts/community/ergodox/adnw_p_u_q/keymap.c index a90fcbc2c..cf2ab9358 100644 --- a/layouts/community/ergodox/adnw_p_u_q/keymap.c +++ b/layouts/community/ergodox/adnw_p_u_q/keymap.c @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_H, KC_J, KC_K, KC_L, KC_RCTRL, // right thumb-cluster - DE_QST, DE_DLR, + DE_QUES, DE_DLR, LCTL(DE_C), KC_ESCAPE, KC_ENTER, KC_BSPACE ), @@ -134,8 +134,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Diakritika [DIAK] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, DE_UE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_AE, DE_OE, + KC_TRNS, KC_TRNS, DE_UDIA, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_ADIA, DE_ODIA, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -218,8 +218,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMBOLS] = LAYOUT_ergodox( // left hand KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, //DE_LBRC, - KC_TRNS,DE_SQ2, DE_RING, DE_TILD, DE_AT, DE_EXLM, DE_LPRN, - KC_TRNS,DE_ACUT,DE_QUOT, DE_COLN, DE_CIRC, DE_LESS, + KC_TRNS,DE_SUP2,DE_DEG, DE_TILD, DE_AT, DE_EXLM, DE_LPRN, + KC_TRNS,DE_ACUT,DE_QUOT, DE_COLN, DE_CIRC, DE_LABK, KC_TRNS,DE_EURO,DE_PLUS, DE_EQL, DE_ASTR, DE_SLSH, DE_LCBR, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -230,8 +230,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand //DE_RBRC, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, - DE_RPRN, DE_QST, DE_AMPR, DE_PARA, DE_DQOT, DE_SQ3, KC_TRNS, - DE_MORE, DE_DLR, DE_SCLN, DE_PIPE, DE_GRV, KC_TRNS, + DE_RPRN, DE_QUES, DE_AMPR, DE_SECT, DE_DQUO, DE_SUP3, KC_TRNS, + DE_RABK, DE_DLR, DE_SCLN, DE_PIPE, DE_GRV, KC_TRNS, DE_RCBR, DE_BSLS, DE_PERC, DE_HASH, DE_MINS, DE_UNDS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/layouts/community/ergodox/algernon/keymap.c b/layouts/community/ergodox/algernon/keymap.c index e6e9bdaf7..068087095 100644 --- a/layouts/community/ergodox/algernon/keymap.c +++ b/layouts/community/ergodox/algernon/keymap.c @@ -47,15 +47,15 @@ enum { APP_SCL2, // Social #2 // Hungarian layer keys - HU_AA, // Á - HU_OO, // Ó - HU_EE, // É - HU_UU, // Ú - HU_II, // Í - HU_OE, // Ö - HU_UE, // Ü - HU_OEE, // Ő - HU_UEE, // Ű + HU_AACU, // Á + HU_OACU, // Ó + HU_EACU, // É + HU_UACU, // Ú + HU_IACU, // Í + HU_ODIA, // Ö + HU_UDIA, // Ü + HU_ODAC, // Ő + HU_UDAC, // Ű // number/symbol keys A_1, // 1 @@ -322,9 +322,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [HUN] = LAYOUT_ergodox( // left hand KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,M(HU_OEE),KC_NO ,M(HU_UEE),KC_NO ,KC_NO -,KC_NO ,M(HU_AA),M(HU_OO) ,M(HU_EE),M(HU_UU) ,M(HU_II) -,KC_NO ,KC_NO ,M(HU_OE) ,KC_NO ,M(HU_UE) ,KC_NO ,KC_NO +,KC_NO ,KC_NO ,M(HU_ODAC),KC_NO ,M(HU_UDAC),KC_NO ,KC_NO +,KC_NO ,M(HU_AACU),M(HU_OACU) ,M(HU_EACU),M(HU_UACU) ,M(HU_IACU) +,KC_NO ,KC_NO ,M(HU_ODIA) ,KC_NO ,M(HU_UDIA) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO @@ -588,23 +588,23 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; /* Hungarian layer */ - case HU_AA: + case HU_AACU: return ang_do_hun (record, KC_QUOT, KC_A); - case HU_OO: + case HU_OACU: return ang_do_hun (record, KC_QUOT, KC_O); - case HU_EE: + case HU_EACU: return ang_do_hun (record, KC_QUOT, KC_E); - case HU_UU: + case HU_UACU: return ang_do_hun (record, KC_QUOT, KC_U); - case HU_II: + case HU_IACU: return ang_do_hun (record, KC_QUOT, KC_I); - case HU_OE: + case HU_ODIA: return ang_do_hun (record, KC_DQT, KC_O); - case HU_UE: + case HU_UDIA: return ang_do_hun (record, KC_DQT, KC_U); - case HU_OEE: + case HU_ODAC: return ang_do_hun (record, KC_EQL, KC_O); - case HU_UEE: + case HU_UDAC: return ang_do_hun (record, KC_EQL, KC_U); /* Plover base */ diff --git a/layouts/community/ergodox/algernon/rules.mk b/layouts/community/ergodox/algernon/rules.mk index 1b4c0995f..e8972cf10 100644 --- a/layouts/community/ergodox/algernon/rules.mk +++ b/layouts/community/ergodox/algernon/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE=no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE=no SLEEP_LED_ENABLE=no FORCE_NKRO ?= yes diff --git a/layouts/community/ergodox/bepo/keymap.c b/layouts/community/ergodox/bepo/keymap.c index 6ea8cba68..4090721d0 100644 --- a/layouts/community/ergodox/bepo/keymap.c +++ b/layouts/community/ergodox/bepo/keymap.c @@ -37,19 +37,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BEPO] = LAYOUT_ergodox( // Left hand -BP_DOLLAR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL, -BP_PERCENT, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_BSPC, -BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMMA, -BP_ECRC, BP_A_GRAVE, BP_Y, BP_X, BP_DOT, BP_K, KC_TAB, +BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, +BP_PERC, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC, +BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMM, +BP_ECIR, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_TAB, KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT, DF(BEPO), DF(QW_B), MO(NUMK), KC_SPC, KC_LSHIFT, MO(FNAV), // Right hand - KC_SLCK, BP_AT, BP_PLUS, BP_MINUS, BP_SLASH, BP_ASTR, BP_EQUAL, - KC_CAPSLOCK, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, + KC_SLCK, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, + KC_CAPSLOCK, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, - KC_NUMLOCK, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED, + KC_NUMLOCK, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, BP_CCED, KC_ALGR, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE, DF(AZ_B), DF(BEPO), MO(NUMK), @@ -74,7 +74,7 @@ MO(FNAV), KC_RSHIFT, KC_ENTER), */ [QW_B] = LAYOUT_ergodox( // Left hand -KC_DOLLAR, S(KC_QUOT), S(KC_COMM), S(KC_DOT), KC_LPRN, KC_RPRN, KC_DEL, +KC_DOLLAR, S(KC_DQUO), S(KC_COMM), S(KC_DOT), KC_LPRN, KC_RPRN, KC_DEL, KC_PERCENT, KC_B, KC_E, KC_P, KC_O, KC_E, KC_BSPC, KC_W, KC_A, KC_U, KC_I, KC_E, KC_COMMA, KC_E, KC_A, KC_Y, KC_X, KC_DOT, KC_K, KC_TAB, @@ -86,7 +86,7 @@ KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT, KC_SLCK, KC_AT, KC_PLUS, KC_MINUS, KC_SLASH, KC_ASTR, KC_EQUAL, KC_CAPSLOCK, KC_CIRC, KC_V, KC_D, KC_L, KC_J, KC_Z, KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, - KC_NUMLOCK, KC_QUOT, KC_Q, KC_G, KC_H, KC_F, KC_C, + KC_NUMLOCK, KC_DQUO, KC_Q, KC_G, KC_H, KC_F, KC_C, MO(QW_A), KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, @@ -111,7 +111,7 @@ KC_TRNS, MO(QW_S), KC_ENTER), */ [QW_A] = LAYOUT_ergodox( // Left hand -KC_DOLLAR, S(KC_QUOT), S(KC_COMM), S(KC_DOT), KC_LBRC, KC_RBRC, KC_DEL, +KC_DOLLAR, S(KC_DQUO), S(KC_COMM), S(KC_DOT), KC_LBRC, KC_RBRC, KC_DEL, KC_PERCENT, KC_PIPE, KC_E, KC_AMPR, KC_O, KC_E, KC_BSPC, KC_W, KC_A, KC_U, KC_I, RALT(KC_5), KC_COMMA, KC_E, KC_BSLASH, KC_LCBR, KC_RCBR, KC_DOT, KC_TILDE, KC_TAB, @@ -123,7 +123,7 @@ KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT, KC_SLCK, KC_AT, KC_PLUS, KC_MINUS, KC_SLASH, KC_ASTR, KC_EQUAL, KC_CAPSLOCK, KC_CIRC, KC_V, KC_D, KC_L, KC_J, KC_Z, KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, - KC_NUMLOCK, KC_QUOT, KC_Q, KC_G, KC_H, KC_F, KC_C, + KC_NUMLOCK, KC_DQUO, KC_Q, KC_G, KC_H, KC_F, KC_C, KC_TRNS, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, @@ -185,7 +185,7 @@ KC_TRNS, KC_TRNS, KC_TRNS), */ [AZ_B] = LAYOUT_ergodox( // Left hand -FR_DLR, FR_QUOT, FR_LESS, FR_GRTR, FR_LPRN, FR_RPRN, KC_DEL, +FR_DLR, FR_DQUO, FR_LABK, FR_RABK, FR_LPRN, FR_RPRN, KC_DEL, FR_PERC, KC_B, FR_EACU, KC_P, KC_O, FR_EGRV, KC_BSPC, FR_W, FR_A, KC_U, KC_I, KC_E, FR_COMM, KC_E, FR_AGRV, KC_Y, KC_X, FR_DOT, KC_K, KC_TAB, @@ -197,7 +197,7 @@ KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT, KC_SLCK, FR_AT, FR_PLUS, FR_MINS, FR_SLSH, FR_ASTR, FR_EQL, KC_CAPSLOCK, KC_LBRC, KC_V, KC_D, KC_L, KC_J, FR_Z, KC_C, KC_T, KC_S, KC_R, KC_N, FR_M, - KC_NUMLOCK, FR_APOS, FR_Q, KC_G, KC_H, KC_F, FR_CCED, + KC_NUMLOCK, FR_QUOT, FR_Q, KC_G, KC_H, KC_F, FR_CCED, MO(AZ_A), KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, @@ -222,8 +222,8 @@ KC_TRNS, MO(AZ_S), KC_ENTER), */ [AZ_A] = LAYOUT_ergodox( // Left hand -FR_DLR, FR_QUOT, FR_LESS, FR_GRTR, FR_LBRC, FR_RBRC, KC_DEL, -FR_PERC, FR_PIPE, FR_EACU, FR_AMP, KC_O, FR_EGRV, KC_BSPC, +FR_DLR, FR_DQUO, FR_LABK, FR_RABK, FR_LBRC, FR_RBRC, KC_DEL, +FR_PERC, FR_PIPE, FR_EACU, FR_AMPR, KC_O, FR_EGRV, KC_BSPC, FR_W, FR_A, FR_UGRV, S(KC_LBRC), FR_EURO, FR_COMM, FR_SLSH, FR_BSLS, FR_LCBR, FR_RCBR, FR_DOT, FR_TILD, KC_TAB, KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT, @@ -234,7 +234,7 @@ KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT, KC_SLCK, FR_AT, FR_PLUS, FR_MINS, FR_SLSH, FR_ASTR, FR_EQL, KC_CAPSLOCK, KC_LBRC, KC_V, KC_D, KC_L, KC_J, FR_Z, KC_C, KC_T, KC_S, KC_R, KC_N, FR_M, - KC_NUMLOCK, FR_APOS, FR_Q, KC_G, KC_H, KC_F, FR_CCED, + KC_NUMLOCK, FR_QUOT, FR_Q, KC_G, KC_H, KC_F, FR_CCED, KC_TRNS, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, @@ -268,7 +268,7 @@ S(KC_ESC), S(KC_INS), S(KC_LGUI), S(KC_LCTL), S(KC_LALT), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // Right hand - KC_TRNS, FR_6, FR_7, FR_8, FR_9, FR_0, FR_OVRR, + KC_TRNS, FR_6, FR_7, FR_8, FR_9, FR_0, FR_DEG, KC_TRNS, FR_EXLM, S(KC_V), S(KC_D), S(KC_L), S(KC_J), S(FR_Z), S(KC_C), S(KC_T), S(KC_S), S(KC_R), S(KC_N), S(FR_M), KC_TRNS, FR_QUES, S(FR_Q), S(KC_G), S(KC_H), S(KC_F), S(KC_C), diff --git a/layouts/community/ergodox/bepo_alt/keymap.c b/layouts/community/ergodox/bepo_alt/keymap.c index fc40afd87..a3bb955ab 100644 --- a/layouts/community/ergodox/bepo_alt/keymap.c +++ b/layouts/community/ergodox/bepo_alt/keymap.c @@ -30,20 +30,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BEPO] = LAYOUT_ergodox( /* Left hand */ -BP_DOLLAR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, BP_AT, -KC_TAB, BP_B, BP_E_ACUTE, BP_P, BP_O, BP_E_GRAVE, KC_BSPC, -BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMMA, -KC_LSHIFT, BP_ECRC, BP_A_GRAVE, BP_Y, BP_X, BP_DOT, BP_K, +BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, BP_AT, +KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC, +BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMM, +KC_LSHIFT, BP_ECIR, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_LCTL, KC_LGUI, KC_LGUI, KC_LGUI, KC_LALT, KC_PGUP, KC_PGDOWN, KC_INS, KC_SPC, KC_LSHIFT, DF(FNAV), /* Right hand */ - BP_PLUS, BP_MINUS, BP_MINUS, BP_SLASH, BP_ASTR, BP_EQUAL, BP_PERCENT, - KC_CAPSLOCK, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, + BP_PLUS, BP_MINS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, BP_PERC, + KC_CAPSLOCK, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, - KC_ESC, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED, + KC_ESC, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, BP_CCED, KC_ALGR, KC_RGUI, KC_RGUI, KC_RCTL, KC_ENTER, DF(BEPO), KC_DEL, DF(FNAV), diff --git a/layouts/community/ergodox/bepo_csa/keymap.c b/layouts/community/ergodox/bepo_csa/keymap.c index c6d4f628f..d869c5bb9 100644 --- a/layouts/community/ergodox/bepo_csa/keymap.c +++ b/layouts/community/ergodox/bepo_csa/keymap.c @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LR_BASE] = LAYOUT_ergodox( // layer 0 : default // left hand BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL, - KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, + KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC, BP_EQL, BP_A, BP_U, BP_I, BP_E, BP_COMM, KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, KC_LCTL, M(M_FNLR), KC_LGUI, M(M_NMAL), KC_LALT, @@ -102,9 +102,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand KC_DEL, KC_6, KC_7, KC_8, KC_9, KC_0, BP_W, - KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, + KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, - KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT, + KC_ENT, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, KC_RSFT, KC_ALGR, BP_PERC, KC_APP, BP_CCED, KC_RCTL, KC_LEFT, KC_RGHT, @@ -116,10 +116,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [LR_CSA] = LAYOUT_ergodox( // left hand - KC_DLR, CSA_DQOT, CSA_LGIL, CSA_RGIL, KC_LPRN, KC_RPRN, KC_TRNS, - KC_TRNS, KC_B, CSA_ECUT, KC_P, KC_O, CSA_EGRV, KC_TRNS, + KC_DLR, CA_DQUO, CA_LDAQ, CA_RDAQ, KC_LPRN, KC_RPRN, KC_TRNS, + KC_TRNS, KC_B, CA_EACU, KC_P, KC_O, CA_EGRV, KC_TRNS, KC_EQL, KC_A, KC_U, KC_I, KC_E, KC_COMM, - CSA(SFT), CSA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_TRNS, + CSA(SFT), CA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -127,11 +127,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, // right hand - KC_TRNS, KC_AT, KC_PLUS, KC_MINS, CSA_SLSH, KC_ASTR, KC_W, - KC_TRNS, CSA_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z, + KC_TRNS, KC_AT, KC_PLUS, KC_MINS, CA_SLSH, KC_ASTR, KC_W, + KC_TRNS, CA_CIRC, KC_V, KC_D, KC_L, KC_J, KC_Z, KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, - KC_TRNS, CSA_APOS, KC_Q, KC_G, KC_H, KC_F, CSA(SFT), - MO(LR_CSA_AGR), KC_PERC, KC_TRNS, CSA_CCED, KC_LCTL, // RCTL has a special behaviour in CSA so use LCTL + KC_TRNS, CA_QUOT, KC_Q, KC_G, KC_H, KC_F, CSA(SFT), + MO(LR_CSA_AGR), KC_PERC, KC_TRNS, CA_CCED, KC_LCTL, // RCTL has a special behaviour in CSA so use LCTL KC_TRNS, KC_TRNS, KC_TRNS, @@ -174,7 +174,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, M(M_6), M(M_7), M(M_8), M(M_9), M(M_0), KC_TRNS, KC_TRNS, KC_EXLM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, CSA_QEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, CA_QUES, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CSA(SFT_AGR), M(M_GRV), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -205,10 +205,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [LR_CSA_AGR] = LAYOUT_ergodox( // left hand - MUC(NDSH), MUC(MDSH), CSA_LESS, CSA_GRTR, CSA_LBRC, CSA_RBRC, KC_TRNS, - KC_TRNS, CSA_PIPE, CSA_DACT, KC_AMPR, CSA_OE, CSA_DGRV, KC_TRNS, - KC_NO, CSA_AE, CSA_UGRV, CSA_DTRM, CSA_EURO, CSA_RQOT, - CSA(AGR_SFT), CSA_BSLS, CSA_LCBR, CSA_RCBR, MUC(ELPS), CSA_TILD, KC_TRNS, + MUC(NDSH), MUC(MDSH), CA_LABK, CA_RABK, CA_LBRC, CA_RBRC, KC_TRNS, + KC_TRNS, CA_PIPE, CA_ACUT, KC_AMPR, CA_OE, CA_GRV, KC_TRNS, + KC_NO, CA_AE, CA_UGRV, CA_DIAE, CA_EURO, CA_RQSU, + CSA(AGR_SFT), CA_BSLS, CA_LCBR, CA_RCBR, MUC(ELPS), CA_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -216,11 +216,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_UNDS, CSA(AGR_SFT), KC_TRNS, // right hand - KC_TRNS, M(M_CRC), CSA_PSMS, KC_NO, CSA_DVSN, CSA_TIMS, CSA_DBRV, - KC_TRNS, CSA_IXLM, CSA_DCAR, CSA_ETH, KC_NO, CSA_IJ, KC_NO, - CSA_CPRT, CSA_THRN, CSA_SRPS, CSA_RTM, CSA_DTLD, CSA_DMCR, - KC_TRNS, CSA_IQST, CSA_DRNG, CSA_MU, KC_NO, CSA_DOGO, CSA(AGR_SFT), - KC_TRNS, KC_NO, KC_TRNS, CSA_DCED, KC_TRNS, + KC_TRNS, M(M_CRC), CA_PLMN, KC_NO, CA_DIV, CA_MUL, CA_BREV, + KC_TRNS, CA_IEXL, CA_CARN, CA_ETH, KC_NO, CA_IJ, KC_NO, + CA_COPY, CA_THRN, CA_SS, CA_REGD, CA_DTIL, CA_MACR, + KC_TRNS, CA_IQUE, CA_RNGA, CA_MICR, KC_NO, CA_OGON, CSA(AGR_SFT), + KC_TRNS, KC_NO, KC_TRNS, CA_CEDL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -250,10 +250,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [LR_CSA_AGR_SFT] = LAYOUT_ergodox( // left hand - CSA_PARG, KC_NO, CSA_LDQT, CSA_RDQT, KC_NO, KC_NO, KC_TRNS, - KC_TRNS, CSA_BPIP, CSA_DDCT, CSA_SECT, S(CSA_OE), M(M_GRV), KC_TRNS, - KC_NO, S(CSA_AE), S(CSA_UGRV), CSA_DDTA, KC_NO, KC_NO, - CSA(AGR_SFT), KC_NO, CSA_LQOT, CSA_RQOT, KC_NO, KC_NO, KC_TRNS, + CA_PARA, KC_NO, CA_LDQU, CA_RDQU, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, CA_BRKP, CA_DACU, CA_SECT, S(CA_OE), M(M_GRV), KC_TRNS, + KC_NO, S(CA_AE), S(CA_UGRV), CA_DOTA, KC_NO, KC_NO, + CSA(AGR_SFT), KC_NO, CA_LSQU, CA_RSQU, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -261,10 +261,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, CSA(AGR_SFT), KC_TRNS, // right hand - KC_TRNS, KC_NO, CSA_NEGT, CSA_1QRT, CSA_1HLF, CSA_3QRT, KC_NO, - KC_TRNS, KC_NO, KC_NO, S(CSA_ETH), KC_NO, S(CSA_IJ), KC_NO, - KC_NO, S(CSA_THRN), S(CSA_SRPS), CSA_TM, KC_NO, CSA_ORDO, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, CSA_ORDA, CSA(AGR_SFT), + KC_TRNS, KC_NO, CA_NOT, CA_QRTR, CA_HALF, CA_TQTR, KC_NO, + KC_TRNS, KC_NO, KC_NO, S(CA_ETH), KC_NO, S(CA_IJ), KC_NO, + KC_NO, S(CA_THRN), S(CA_SS), CA_TM, KC_NO, CA_MORD, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, CA_FORD, CSA(AGR_SFT), CSA(SFT_AGR), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -450,7 +450,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case M_SCLN: return MACRO(D(SCLN), END); case M_GRV: - return MACRO(I(75), DOWN(KC_ALGR), TYPE(CSA_DCRC), UP(KC_ALGR), T(SPACE), END); + return MACRO(I(75), DOWN(KC_ALGR), TYPE(CA_CIRC), UP(KC_ALGR), T(SPACE), END); case M_NBSP: // use weak mod such that pressing another key will not be affected add_weak_mods(MOD_BIT(KC_ALGR)); @@ -474,7 +474,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case M_CRC: if (record->event.pressed) { - return MACRO(I(75), TYPE(CSA_DCRC), T(SPACE), END); + return MACRO(I(75), TYPE(CA_CIRC), T(SPACE), END); } break; case M_DBL0: diff --git a/layouts/community/ergodox/berfarah/rules.mk b/layouts/community/ergodox/berfarah/rules.mk index abd95b500..2ad163064 100644 --- a/layouts/community/ergodox/berfarah/rules.mk +++ b/layouts/community/ergodox/berfarah/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = no SLEEP_LED_ENABLE = yes FORCE_NKRO ?= yes diff --git a/layouts/community/ergodox/coderkun_neo2/keymap.c b/layouts/community/ergodox/coderkun_neo2/keymap.c index 638442676..b731ab495 100644 --- a/layouts/community/ergodox/coderkun_neo2/keymap.c +++ b/layouts/community/ergodox/coderkun_neo2/keymap.c @@ -33,20 +33,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT_ergodox( // left hand - KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, NEO_GRV, - NEO_Y, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_HOME, - NEO_L1_L, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O, - KC_LSFT, NEO_UE, NEO_OE, NEO_AE, NEO_P, NEO_Z, TG(PMQ), - KC_LCTL, KC_LALT,MO(FMU),KC_LGUI,NEO_L2_L, + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, NE_GRV, + NE_Y, NE_X, NE_V, NE_L, NE_C, NE_W, KC_HOME, + NE_L3L, NE_U, NE_I, NE_A, NE_E, NE_O, + KC_LSFT, NE_UDIA, NE_ODIA, NE_ADIA, NE_P, NE_Z, TG(PMQ), + KC_LCTL, KC_LALT,MO(FMU),KC_LGUI,NE_L4L, KC_LEFT, KC_UP, KC_MINS, KC_SPC, KC_ENT, ALL_T(KC_NO), // right hand - NEO_ACUT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_END, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_SS, - NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R, - TG(PMN), NEO_B, NEO_M, KC_COMM,KC_DOT, NEO_J, KC_RSFT, - NEO_L2_R,KC_RGUI,MO(FMU),KC_LALT,KC_RCTL, + NE_ACUT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_END, NE_K, NE_H, NE_G, NE_F, NE_Q, NE_SS, + NE_S, NE_N, NE_R, NE_T, NE_D, NE_L3R, + TG(PMN), NE_B, NE_M, KC_COMM,KC_DOT, NE_J, KC_RSFT, + NE_L4R,KC_RGUI,MO(FMU),KC_LALT,KC_RCTL, KC_DOWN, KC_RGHT, KC_MINS, MEH_T(KC_NO),KC_ENT,KC_SPC @@ -76,8 +76,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, DE_C, DE_P, DE_T, DE_F, DE_K, DE_L, KC_HOME, - NEO_L1_L, DE_D, DE_H, DE_OE, DE_O, DE_I, - KC_LSFT, DE_AE, DE_Q, DE_R, DE_W, DE_N, KC_TRNS, + NE_L3L, DE_D, DE_H, DE_ODIA,DE_O, DE_I, + KC_LSFT, DE_ADIA,DE_Q, DE_R, DE_W, DE_N, KC_TRNS, KC_LCTL, KC_LALT,MO(FMU),KC_LGUI,MO(NHL), KC_LEFT, KC_UP, KC_MINS, @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand DE_ACUT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_END, DE_B, DE_A, DE_S, DE_G, DE_V, DE_Y, - DE_U, DE_MINS,DE_Z, DE_E, DE_X, NEO_L1_R, + DE_U, DE_MINS,DE_Z, DE_E, DE_X, NE_L3R, KC_TRNS, DE_J, DE_M, DE_COMM,DE_DOT, DE_SS, KC_RSFT, MO(NHL),KC_RGUI,MO(FMU),KC_LALT,KC_RCTL, KC_DOWN, KC_RGHT, @@ -117,7 +117,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, DE_Y, DE_X, DE_V, DE_L, DE_C, DE_W, KC_HOME, KC_NO, DE_U, DE_I, DE_A, DE_E, DE_O, - KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, KC_TRNS, + KC_LSFT, DE_UDIA,DE_ODIA,DE_ADIA,DE_P, DE_Z, KC_TRNS, KC_LCTL, KC_LALT,MO(FMU),KC_LGUI,MO(NHL), KC_LEFT, KC_UP, KC_MINS, @@ -215,12 +215,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [BASE] = ACTION_FUNCTION(BASE), - [PMQ] = ACTION_FUNCTION(PMQ), - [PMN] = ACTION_FUNCTION(PMN), -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { set_unicode_input_mode(UC_LNX); @@ -260,12 +254,12 @@ void matrix_scan_user(void) }; -// Override Unicode start method to use NEO_U instead of KC_U +// Override Unicode start method to use NE_U instead of KC_U void unicode_input_start (void) { register_code(KC_LCTL); register_code(KC_LSFT); - register_code(NEO_U); - unregister_code(NEO_U); + register_code(NE_U); + unregister_code(NE_U); unregister_code(KC_LSFT); unregister_code(KC_LCTL); }; diff --git a/layouts/community/ergodox/colemak_code_friendly/rules.mk b/layouts/community/ergodox/colemak_code_friendly/rules.mk index 2bff0c5cf..ee89b5486 100644 --- a/layouts/community/ergodox/colemak_code_friendly/rules.mk +++ b/layouts/community/ergodox/colemak_code_friendly/rules.mk @@ -1,5 +1,5 @@ COMMAND_ENABLE = no -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no RGBLIGHT_ENABLE = no diff --git a/layouts/community/ergodox/colemak_osx_pc_no/keymap.c b/layouts/community/ergodox/colemak_osx_pc_no/keymap.c index a4a453349..b9986e0e9 100644 --- a/layouts/community/ergodox/colemak_osx_pc_no/keymap.c +++ b/layouts/community/ergodox/colemak_osx_pc_no/keymap.c @@ -9,6 +9,18 @@ #define NUMB_SYMB_MAC 3 // numbers and symbols mac #define FUNCTION 4 // function keys +enum custom_keycodes { + TILDE_NO = SAFE_RANGE, + LESS_NO, + GRTR_NO, + CIRC_NO, + ACUT_NO, + GRV_NO, + LESS_NO_MAC, + GRTR_NO_MAC, + ACUT_NO_MAC +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer PC @@ -35,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // left hand NO_BSLS, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, NO_ASTR, TG(1), - NO_QUES, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_QUO2, + NO_QUES, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_DQUO, NO_COLN, KC_A, KC_R, KC_S, KC_T, KC_D, KC_EXLM, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN, MO(4), KC_BTN1, KC_BTN2, KC_TAB,GUI_T(KC_COMMA), @@ -43,11 +55,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO_PLUS, OSM(MOD_LSFT),CTL_T(KC_DOT),ALT_T(NO_MINS), // right hand - KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT, - NO_APOS, KC_J, KC_L, KC_U, KC_Y, NO_AA, NO_AE , - KC_H, KC_N, KC_E, KC_I, KC_O, NO_OSLH, + CIRC_NO, NO_DLR, NO_LPRN, NO_RPRN ,LESS_NO, GRTR_NO,NO_AT, + NO_QUOT, KC_J, KC_L, KC_U, KC_Y, NO_ARNG, NO_AE , + KC_H, KC_N, KC_E, KC_I, KC_O, NO_OSTR, NO_EQL, KC_K, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_UNDS, - KC_LEFT, KC_ESC, KC_FN7, KC_HASH, MO(2), + KC_LEFT, KC_ESC, GRV_NO, KC_HASH, MO(2), KC_INSERT, NO_SLSH, KC_DEL, KC_BSPC,KC_ENT,KC_SPC @@ -74,20 +86,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ [BASE_MAC] = LAYOUT_ergodox( - NO_BSLS_MAC, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS, + S(ALGR(NO_7)), KC_TRNS,KC_TRNS, S(ALGR(NO_8)),S(ALGR(NO_9)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CTL_T(KC_COMMA), - KC_TRNS, NO_PIPE_MAC, + KC_TRNS, ALGR(NO_7), KC_TRNS, KC_TRNS,GUI_T(KC_DOT) , KC_TRNS, // right hand - KC_TRNS, NO_DLR_MAC, KC_TRNS,KC_TRNS,KC_FN8, KC_FN9,NO_AT_MAC, - NO_APOS_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, S(NO_4), KC_TRNS,KC_TRNS,LESS_NO_MAC, GRTR_NO_MAC,NO_QUOT, + NO_LABK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_GRV_MAC, KC_TRNS, MO(3), + KC_TRNS, KC_TRNS, ALGR(NO_BSLS), KC_TRNS, MO(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS @@ -125,7 +137,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, // right hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_FN2, KC_FN6 , KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, TILDE_NO, ACUT_NO , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_5, KC_6, KC_7, KC_8, KC_TRNS, KC_TRNS, KC_HOME, KC_9, KC_END, KC_PGDN, KC_PGUP, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -166,7 +178,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, // right hand KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_FN2, KC_FN10, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, TILDE_NO, ACUT_NO_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_5, KC_6, KC_7, KC_8, KC_TRNS, KC_TRNS, KC_HOME, KC_9, KC_END, KC_PGDN, KC_PGUP, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -217,47 +229,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -enum macro_id { - TILDE_NO, LESS_NO, GRTR_NO, CIRC_NO, ACUT_NO, GRV_NO, LESS_NO_MAC, GRTR_NO_MAC, ACUT_NO_MAC -}; - -const uint16_t PROGMEM fn_actions[] = { - [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed. - [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first. - [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first. - [5] = ACTION_MACRO(CIRC_NO), // Completed ^ character, no space needed. - [6] = ACTION_MACRO(ACUT_NO), // Completed ´ character, no space needed. - [7] = ACTION_MACRO(GRV_NO), // Completed ` character, no space needed. - [8] = ACTION_MACRO(LESS_NO_MAC), // < completed on keypress down, to avoid same button problem when typing <> quickly - [9] = ACTION_MACRO(GRTR_NO_MAC), // > completed on keypress down, to avoid same button problem when typing <> quickly - [10] = ACTION_MACRO(ACUT_NO_MAC), // Completed ´ character, no space needed -}; - - - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - keyevent_t event = record->event; - - switch (id) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { case TILDE_NO: - return (event.pressed ? MACRO( D(RALT), T(RBRC), U(RALT), T(SPC), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(ALGR(KC_RBRC)); + tap_code(KC_SPC); + } + return false; case LESS_NO: - return (event.pressed ? MACRO( T(NUBS), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code(KC_NUBS); + } + return false; case GRTR_NO: - return (event.pressed ? MACRO( D(LSFT), T(NUBS), U(LSFT), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(S(KC_NUBS)); + } + return false; case CIRC_NO: - return (event.pressed ? MACRO( D(LSFT), T(RBRC), U(LSFT), T(SPC), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(S(KC_RBRC)); + tap_code(KC_SPC); + } + return false; case ACUT_NO: - return (event.pressed ? MACRO( D(RALT), T(EQL), U(RALT), T(SPC), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(ALGR(KC_EQL)); + tap_code(KC_SPC); + } + return false; case GRV_NO: - return (event.pressed ? MACRO( D(LSFT), T(EQL), T(SPC), U(LSFT), END ) : MACRO_NONE); + if (record->event.pressed) { + SEND_STRING(SS_LSFT("= ")); + } + return false; case LESS_NO_MAC: - return (event.pressed ? MACRO( T(GRV), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code(KC_GRV); + } + return false; case GRTR_NO_MAC: - return (event.pressed ? MACRO( D(LSFT), T(GRV), U(LSFT), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(S(KC_GRV)); + } + return false; case ACUT_NO_MAC: - return (event.pressed ? MACRO( T(EQL), T(SPC), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code(KC_EQL); + tap_code(KC_SPC); + } + return false; } - return MACRO_NONE; -}; + return true; +} diff --git a/layouts/community/ergodox/deadcyclo/keymap.c b/layouts/community/ergodox/deadcyclo/keymap.c index 0ae1ef7fb..345e25e03 100644 --- a/layouts/community/ergodox/deadcyclo/keymap.c +++ b/layouts/community/ergodox/deadcyclo/keymap.c @@ -1,6 +1,4 @@ #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" #include "version.h" #define BASE 0 // default layer @@ -9,45 +7,19 @@ #define UNI 3 // unicode 1 #define UNI2 4 // unicode 2 -enum macros { - RUN -}; - -enum function_ids { - EMOJI, - EMOJI2, - EPRM, +enum custom_keycodes { + I3_RUN = SAFE_RANGE, VRSN, - RGB_SLD, - GO_GROUP -}; - -/* opt can only be 0-15 */ -enum emojis { - SHRUG, - YAY, - HUG, - SMILE, - SMILE2, - HMM1, - HMM2, - BEAR1, - BEAR2, - FUU, - EGGY1, - EGGY2, - FACE1, - FACE2, - UHU, - SMRK1 -}; - -enum emojis2 { - SMRK2, - LOVE -}; - -enum progmem_ids { + I3_GO_GROUP_1, + I3_GO_GROUP_2, + I3_GO_GROUP_3, + I3_GO_GROUP_4, + I3_GO_GROUP_5, + I3_GO_GROUP_6, + I3_GO_GROUP_7, + I3_GO_GROUP_8, + I3_GO_GROUP_9, + I3_GO_GROUP_10, EMOJI_SHRUG, EMOJI_YAY, EMOJI_HUG, @@ -65,20 +37,7 @@ enum progmem_ids { EMOJI_UHU, EMOJI_SMRK1, EMOJI_SMRK2, - EMOJI_LOVE, - F_EPRM, - F_VRSN, - F_RGB_SLD, - I3_GO_GROUP_10, - I3_GO_GROUP_1, - I3_GO_GROUP_2, - I3_GO_GROUP_3, - I3_GO_GROUP_4, - I3_GO_GROUP_5, - I3_GO_GROUP_6, - I3_GO_GROUP_7, - I3_GO_GROUP_8, - I3_GO_GROUP_9, + EMOJI_LOVE }; // TODO: Finish the macros for i3 (Macros should potentially be own function instead to make things easier? some of them at least, f. ex. the ones that use 1-0 keys so we can have a single switch) @@ -163,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, RGB_TOG,RGB_MOD, - F(F_RGB_SLD), + RGB_M_P, RGB_VAD,RGB_VAI,KC_TRNS, // right hand KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, @@ -173,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, RGB_HUD, RGB_HUI, KC_TRNS, - F(F_EPRM), KC_DEL, KC_TRNS + EEP_RST, KC_DEL, KC_TRNS ), /* Keymap 2: Media, mouse and navigation * @@ -198,8 +157,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA , MOUSE and NAVIGATION [MDIA] = LAYOUT_ergodox( - KC_TRNS, F(I3_GO_GROUP_1), F(I3_GO_GROUP_2), F(I3_GO_GROUP_3), F(I3_GO_GROUP_4), F(I3_GO_GROUP_5), F(I3_GO_GROUP_6), -KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS, + KC_TRNS, I3_GO_GROUP_1, I3_GO_GROUP_2, I3_GO_GROUP_3, I3_GO_GROUP_4, I3_GO_GROUP_5, I3_GO_GROUP_6, +KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, I3_RUN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, @@ -207,7 +166,7 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand - F(I3_GO_GROUP_6), F(I3_GO_GROUP_7), F(I3_GO_GROUP_8), F(I3_GO_GROUP_9), F(I3_GO_GROUP_10), KC_TRNS, KC_TRNS, + I3_GO_GROUP_6, I3_GO_GROUP_7, I3_GO_GROUP_8, I3_GO_GROUP_9, I3_GO_GROUP_10, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, @@ -241,10 +200,10 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS, // Unicode [UNI] = LAYOUT_ergodox( KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500), - KC_TRNS, F(EMOJI_SHRUG), F(EMOJI_YAY), F(EMOJI_HUG), F(EMOJI_SMILE), F(EMOJI_SMILE2), KC_TRNS, - KC_TRNS, F(EMOJI_HMM1), F(EMOJI_HMM2), F(EMOJI_BEAR1), F(EMOJI_BEAR2), F(EMOJI_FUU), - KC_TRNS, F(EMOJI_EGGY1), F(EMOJI_EGGY2), F(EMOJI_FACE1), F(EMOJI_FACE2), F(EMOJI_UHU), KC_TRNS, - KC_TRNS, F(EMOJI_SMRK1), F(EMOJI_SMRK2), F(EMOJI_LOVE), F(F_VRSN), + KC_TRNS, EMOJI_SHRUG, EMOJI_YAY, EMOJI_HUG, EMOJI_SMILE, EMOJI_SMILE2, KC_TRNS, + KC_TRNS, EMOJI_HMM1, EMOJI_HMM2, EMOJI_BEAR1, EMOJI_BEAR2, EMOJI_FUU, + KC_TRNS, EMOJI_EGGY1, EMOJI_EGGY2, EMOJI_FACE1, EMOJI_FACE2, EMOJI_UHU, KC_TRNS, + KC_TRNS, EMOJI_SMRK1, EMOJI_SMRK2, EMOJI_LOVE, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -302,220 +261,84 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), KC_TRNS, KC_TRNS, ), }; -const uint16_t PROGMEM fn_actions[] = { - [EMOJI_SHRUG] = ACTION_FUNCTION_OPT(EMOJI, SHRUG), - [EMOJI_YAY] = ACTION_FUNCTION_OPT(EMOJI, YAY), - [EMOJI_HUG] = ACTION_FUNCTION_OPT(EMOJI,HUG), - [EMOJI_SMILE] = ACTION_FUNCTION_OPT(EMOJI,SMILE), - [EMOJI_SMILE2] = ACTION_FUNCTION_OPT(EMOJI,SMILE2), - [EMOJI_HMM1] = ACTION_FUNCTION_OPT(EMOJI,HMM1), - [EMOJI_HMM2] = ACTION_FUNCTION_OPT(EMOJI,HMM2), - [EMOJI_BEAR1] = ACTION_FUNCTION_OPT(EMOJI,BEAR1), - [EMOJI_BEAR2] = ACTION_FUNCTION_OPT(EMOJI,BEAR2), - [EMOJI_FUU] = ACTION_FUNCTION_OPT(EMOJI,FUU), - [EMOJI_EGGY1] = ACTION_FUNCTION_OPT(EMOJI,EGGY1), - [EMOJI_EGGY2] = ACTION_FUNCTION_OPT(EMOJI,EGGY2), - [EMOJI_FACE1] = ACTION_FUNCTION_OPT(EMOJI,FACE1), - [EMOJI_FACE2] = ACTION_FUNCTION_OPT(EMOJI,FACE2), - [EMOJI_UHU] = ACTION_FUNCTION_OPT(EMOJI,UHU), - [EMOJI_SMRK1] = ACTION_FUNCTION_OPT(EMOJI,SMRK1), - [EMOJI_SMRK2] = ACTION_FUNCTION_OPT(EMOJI2,SMRK2), - [EMOJI_LOVE] = ACTION_FUNCTION_OPT(EMOJI2,LOVE), - [F_EPRM] = ACTION_FUNCTION(EPRM), - [F_VRSN] = ACTION_FUNCTION(VRSN), - [F_RGB_SLD] = ACTION_FUNCTION(RGB_SLD), - [I3_GO_GROUP_10]= ACTION_FUNCTION_OPT(GO_GROUP,0), - [I3_GO_GROUP_1] = ACTION_FUNCTION_OPT(GO_GROUP,1), - [I3_GO_GROUP_2] = ACTION_FUNCTION_OPT(GO_GROUP,2), - [I3_GO_GROUP_3] = ACTION_FUNCTION_OPT(GO_GROUP,3), - [I3_GO_GROUP_4] = ACTION_FUNCTION_OPT(GO_GROUP,4), - [I3_GO_GROUP_5] = ACTION_FUNCTION_OPT(GO_GROUP,5), - [I3_GO_GROUP_6] = ACTION_FUNCTION_OPT(GO_GROUP,6), - [I3_GO_GROUP_7] = ACTION_FUNCTION_OPT(GO_GROUP,7), - [I3_GO_GROUP_8] = ACTION_FUNCTION_OPT(GO_GROUP,8), - [I3_GO_GROUP_9] = ACTION_FUNCTION_OPT(GO_GROUP,9), -}; - -#define TAP_ONCE(code) \ - register_code (code); \ - unregister_code (code) - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch(id) { - case EPRM: - eeconfig_init(); - break; - case VRSN: - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - break; - case RGB_SLD: -#ifdef RGBLIGHT_ENABLE - rgblight_mode(1); -#endif - break; - case GO_GROUP: - register_code(KC_LCTL); TAP_ONCE(KC_I); unregister_code(KC_LCTL); - TAP_ONCE(KC_G); - if (opt == 0) { - TAP_ONCE(39); - } else { - TAP_ONCE(29+opt); - } - break; - case EMOJI: - switch(opt) { - case SHRUG: - unicode_input_start(); register_hex(0xaf); unicode_input_finish(); - TAP_ONCE (KC_BSLS); - register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); - unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); - register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); - TAP_ONCE (KC_SLSH); - unicode_input_start (); register_hex(0xaf); unicode_input_finish(); - break; - case YAY: - SEND_STRING ("\\o/"); - break; - case HUG: - unicode_input_start(); register_hex(0x0f3c); unicode_input_finish(); - TAP_ONCE (KC_SPC); - unicode_input_start(); register_hex(0x3064); unicode_input_finish(); - TAP_ONCE (KC_SPC); - unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); - TAP_ONCE (KC_SPC); - unicode_input_start(); register_hex(0x0f3d); unicode_input_finish(); - unicode_input_start(); register_hex(0x3064); unicode_input_finish(); - break; - case SMILE: - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - unicode_input_start(); register_hex(0x203f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - break; - case SMILE2: - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - unicode_input_start(); register_hex(0x203f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - break; - case HMM1: - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - break; - case HMM2: - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - break; - case BEAR1: - unicode_input_start(); register_hex(0x0295); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x0294); unicode_input_finish(); - break; - case BEAR2: - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - break; - case FUU: - unicode_input_start(); register_hex(0x256d); unicode_input_finish(); - unicode_input_start(); register_hex(0x2229); unicode_input_finish(); - unicode_input_start(); register_hex(0x256e); unicode_input_finish(); - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - unicode_input_start(); register_hex(0x256d); unicode_input_finish(); - unicode_input_start(); register_hex(0x2229); unicode_input_finish(); - unicode_input_start(); register_hex(0x256e); unicode_input_finish(); - break; - case EGGY1: - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x256f); unicode_input_finish(); - unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); - unicode_input_start(); register_hex(0x25a1); unicode_input_finish(); - unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); - unicode_input_start(); register_hex(0xff09); unicode_input_finish(); - unicode_input_start(); register_hex(0x256f); unicode_input_finish(); - break; - case EGGY2: - unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x0020); unicode_input_finish(); - unicode_input_start(); register_hex(0x309c); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x309c); unicode_input_finish(); - unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - break; - case FACE1: - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - break; - case FACE2: - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - break; - case UHU: - unicode_input_start(); register_hex(0x2299); unicode_input_finish(); - unicode_input_start(); register_hex(0xfe4f); unicode_input_finish(); - unicode_input_start(); register_hex(0x2299); unicode_input_finish(); - break; - case SMRK1: - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - unicode_input_start(); register_hex(0x032e); unicode_input_finish(); - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - break; - } - break; - case EMOJI2: - switch(opt) { - case SMRK2: - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - unicode_input_start(); register_hex(0x032e); unicode_input_finish(); - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - break; - case LOVE: - unicode_input_start(); register_hex(0x2665); unicode_input_finish(); - unicode_input_start(); register_hex(0x203f); unicode_input_finish(); - unicode_input_start(); register_hex(0x2665); unicode_input_finish(); - break; - } - break; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case I3_RUN: + tap_code16(C(KC_I)); + tap_code(KC_R); + return false; + case VRSN: + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + return false; + case I3_GO_GROUP_1 ... I3_GO_GROUP_10: + tap_code16(C(KC_I)); + tap_code(KC_G); + if (keycode == I3_GO_GROUP_10) { + tap_code(KC_0); + } else { + tap_code(KC_1 + (keycode - I3_GO_GROUP_1)); + } + return false; + case EMOJI_SHRUG: + send_unicode_string("¯\\_(ツ)_/¯"); + return false; + case EMOJI_YAY: + SEND_STRING("\\o/"); + return false; + case EMOJI_HUG: + send_unicode_string("༼ つ ◕_◕ ༽つ"); + return false; + case EMOJI_SMILE: + send_unicode_string("ʘ‿ʘ"); + return false; + case EMOJI_SMILE2: + send_unicode_string("(ʘ‿ʘ)"); + return false; + case EMOJI_HMM1: + send_unicode_string("ಠ_ಠ"); + return false; + case EMOJI_HMM2: + send_unicode_string("(ಠ_ಠ)"); + return false; + case EMOJI_BEAR1: + send_unicode_string("ʕ•ᴥ•ʔ"); + return false; + case EMOJI_BEAR2: + send_unicode_string("(ᵔᴥᵔ)"); + return false; + case EMOJI_FUU: + send_unicode_string("╭∩╮(-_-)╭∩╮"); + return false; + case EMOJI_EGGY1: + send_unicode_string("(╯°□°)╯"); + return false; + case EMOJI_EGGY2: + send_unicode_string("ノ( ゜-゜ノ)"); + return false; + case EMOJI_FACE1: + SEND_STRING("(-_-)"); + return false; + case EMOJI_FACE2: + send_unicode_string("(•_•)"); + return false; + case EMOJI_UHU: + send_unicode_string("⊙﹏⊙"); + return false; + case EMOJI_SMRK1: + send_unicode_string("^̮^"); + return false; + case EMOJI_SMRK2: + send_unicode_string("(^̮^)"); + return false; + case EMOJI_LOVE: + send_unicode_string("♥‿♥"); + return false; + } } - } + return true; } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch(id) { - case RUN: - return MACRO( D(LCTL), T(I), U(LCTL), T(R), END ); - break; - } - } - return MACRO_NONE; -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { set_unicode_input_mode(UC_LNX); diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 4ccba8f04..f9daf277f 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -47,3 +47,4 @@ #define PIMORONI_TRACKBALL_INVERT_X #define PIMORONI_TRACKBALL_INVERT_Y +#define PIMORONI_TRACKBALL_CLICK diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 3e1460606..430328fed 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -19,7 +19,7 @@ #ifdef UNICODEMAP_ENABLE # include "drashna_unicode.h" #endif // UNICODEMAP_ENABLE - +#include "drivers/sensors/pimoroni_trackball.h" enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE, PM_SCROLL, @@ -56,145 +56,33 @@ bool skip_leds = false; KC_SPC, LT(_LOWER, KC_BSPC), OS_LWR, OS_RSE, LT(_RAISE, KC_DEL), KC_ENT \ ) -#define LAYOUT_ergodox_pretty_base_wrapper(...) LAYOUT_ergodox_pretty_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_ergodox_pretty_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: QWERTY Layer - * - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | TAB | Q | W | E | R | T | TG(3)| |TG(3) | Y | U | I | O | P | \ | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " | - * |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------| - * | Shift | Z | X | C | V | B | | | | N | M | , < | . > | ? / | Shift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | - * `----------------------------------' `----------------------------------' - * ,--------------. ,--------------. - * |Alt/Ap| Win | | Alt |Ctl/Esc| - * ,------|------|-------| |------+-------+------. - * | | | Home | | PgUp | | | - * | Space| Bksp |-------| |------| DEL |Enter | - * | | | End | | PgDn | | | - * `---------------------' `---------------------' - */ - [_QWERTY] = LAYOUT_ergodox_pretty_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), -/* Keymap 0: COLEMAK layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' | - * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* - [_COLEMAK] = LAYOUT_ergodox_pretty_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), -/* Keymap 0: DVORAK Layout - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | O | E | U | I |------| |------| D | H | T | N |S / L2| - | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |:/Ctrl| Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* - [_DVORAK] = LAYOUT_ergodox_pretty_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), -/* Keymap 0: WORKMAN layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | D | R | W | B | L1 | | L1 | J | F | U | P | ; | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | H | T | D |------| |------| Y | N | E | O | I | ' | - * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | M | C | V | | | | K | L | , | . |//Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `----------------------' - */ + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), - [_WORKMAN] = LAYOUT_ergodox_pretty_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), - [_NORMAN] = LAYOUT_ergodox_pretty_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_ergodox_pretty_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_ergodox_pretty_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_ergodox_pretty_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), /* Keymap 4: Customized Overwatch Layout * @@ -311,24 +199,21 @@ void keyboard_post_init_keymap(void) { // trackball_set_precision(1.5); trackball_set_rgbw(RGB_MAGENTA, 0x00); } -void shutdown_keymap(void) { - trackball_set_rgbw(RGB_RED, 0x00); -} +void shutdown_keymap(void) { trackball_set_rgbw(RGB_RED, 0x00); } static bool mouse_button_one, trackball_button_one; -void trackball_check_click(bool pressed, report_mouse_t* mouse) { - if (mouse_button_one | pressed) { - mouse->buttons |= MOUSE_BTN1; +void trackball_register_button(bool pressed, enum mouse_buttons button) { + report_mouse_t currentReport = pointing_device_get_report(); + if (pressed) { + currentReport.buttons |= button; } else { - mouse->buttons &= ~MOUSE_BTN1; + currentReport.buttons &= ~button; } - trackball_button_one = pressed; + pointing_device_set_report(currentReport); } #endif - - bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_1: @@ -370,17 +255,17 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } run_trackball_cleanup(); break; -#if !defined(MOUSEKEY_ENABLE) - case KC_MS_BTN1: - mouse_button_one = record->event.pressed; - trackball_register_button(mouse_button_one | trackball_button_one, MOUSE_BTN1); - break; - case KC_MS_BTN2: - trackball_register_button(record->event.pressed, MOUSE_BTN2); - break; - case KC_MS_BTN3: - trackball_register_button(record->event.pressed, MOUSE_BTN3); - break; +# if !defined(MOUSEKEY_ENABLE) + case KC_MS_BTN1: + mouse_button_one = record->event.pressed; + trackball_register_button(mouse_button_one | trackball_button_one, MOUSE_BTN1); + break; + case KC_MS_BTN2: + trackball_register_button(record->event.pressed, MOUSE_BTN2); + break; + case KC_MS_BTN3: + trackball_register_button(record->event.pressed, MOUSE_BTN3); + break; # endif #endif } @@ -433,7 +318,6 @@ void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { - if (layer_state_is(_GAMEPAD)) { RGB_MATRIX_INDICATOR_SET_COLOR(32, 0x00, 0xFF, 0x00); // Q RGB_MATRIX_INDICATOR_SET_COLOR(31, 0x00, 0xFF, 0xFF); // W @@ -446,7 +330,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { RGB_MATRIX_INDICATOR_SET_COLOR((userspace_config.swapped_numbers ? 26 : 27), 0xFF, 0xFF, 0xFF); // 1 RGB_MATRIX_INDICATOR_SET_COLOR((userspace_config.swapped_numbers ? 27 : 26), 0x00, 0xFF, 0x00); // 2 - RGB_MATRIX_INDICATOR_SET_COLOR(25, 0x7A, 0x00, 0xFF); // 3 + RGB_MATRIX_INDICATOR_SET_COLOR(25, 0x7A, 0x00, 0xFF); // 3 } # if defined(RGBLIGHT_ENABLE) @@ -455,7 +339,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (userspace_config.rgb_layer_change) # endif { - switch (get_highest_layer(layer_state|default_layer_state)) { + switch (get_highest_layer(layer_state | default_layer_state)) { case _GAMEPAD: rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; @@ -471,29 +355,17 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { case _ADJUST: rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_1: + rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_2: + rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_3: + rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _WORKMAN: - rgb_matrix_layer_helper(HSV_GOLDENROD, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _NORMAN: - rgb_matrix_layer_helper(HSV_CORAL, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _MALTRON: - rgb_matrix_layer_helper(HSV_YELLOW, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _EUCALYN: - rgb_matrix_layer_helper(HSV_PINK, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _CARPLAX: - rgb_matrix_layer_helper(HSV_BLUE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_4: + rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; } } diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index 31f4788fa..4c47e0713 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite TAP_DANCE_ENABLE = no COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no @@ -7,7 +7,6 @@ SPACE_CADET_ENABLE = no ifeq ($(strip $(KEYBOARD)), ergodox_ez) RGBLIGHT_ENABLE = yes RGB_MATRIX_ENABLE = yes - RGBLIGHT_TWINKLE = no INDICATOR_LIGHTS = no RGBLIGHT_STARTUP_ANIMATION = yes PIMORONI_TRACKBALL_ENABLE = yes @@ -18,4 +17,4 @@ UNICODE_ENABLE = no UNICDOEMAP_ENABLE = no -DEBOUNCE_TYPE = eager_pr +DEBOUNCE_TYPE = sym_eager_pr diff --git a/layouts/community/ergodox/drashna/visualizer.c b/layouts/community/ergodox/drashna/visualizer.c_old similarity index 100% rename from layouts/community/ergodox/drashna/visualizer.c rename to layouts/community/ergodox/drashna/visualizer.c_old diff --git a/layouts/community/ergodox/dvorak_programmer/rules.mk b/layouts/community/ergodox/dvorak_programmer/rules.mk index 44d702209..a3ac8ed6f 100644 --- a/layouts/community/ergodox/dvorak_programmer/rules.mk +++ b/layouts/community/ergodox/dvorak_programmer/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE=no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE=no SLEEP_LED_ENABLE=no FORCE_NKRO = yes diff --git a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c index bb27f18e8..a8a428a04 100644 --- a/layouts/community/ergodox/dvorak_programmer_swe/keymap.c +++ b/layouts/community/ergodox/dvorak_programmer_swe/keymap.c @@ -69,8 +69,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SPC,KC_BSPC,KC_END, // right hand KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLASH, - TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, SE_AM, - KC_D, KC_H, KC_T, KC_N, KC_S, SE_AE, + TG(1), KC_F, KC_G, KC_C, KC_R, KC_L, SE_ARNG, + KC_D, KC_H, KC_T, KC_N, KC_S, SE_ADIA, TG(MDIA),KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), LALT(KC_LSFT), CTL_T(KC_ESC), @@ -111,8 +111,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS, // right hand KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, SE_LESS, KC_7, KC_8, KC_9, KC_KP_ASTERISK, KC_F12, - LSFT(SE_LESS), KC_4, KC_5, KC_6, KC_KP_PLUS, KC_TRNS, + KC_TRNS, SE_LABK, KC_7, KC_8, KC_9, KC_KP_ASTERISK, KC_F12, + SE_RABK, KC_4, KC_5, KC_6, KC_KP_PLUS, KC_TRNS, KC_TRNS, SE_QUES, KC_1, KC_2, KC_3, LSFT(KC_5), KC_TRNS, KC_DOT,KC_0, LSFT(KC_0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -186,7 +186,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DEVL] = LAYOUT_ergodox( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(MACRO_SAVE), M(MACRO_BUILD), M(MACRO_DEBUG), KC_PSCR, ALGR(KC_4), KC_TRNS, - KC_TRNS, SE_ACUT, SE_APOS, SE_PIPE, KC_TRNS, ALGR(KC_3), + KC_TRNS, SE_ACUT, SE_QUOT, SE_PIPE, KC_TRNS, ALGR(KC_3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ALGR(KC_5), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/layouts/community/ergodox/dvorak_programmer_swe/readme.md b/layouts/community/ergodox/dvorak_programmer_swe/readme.md index 3bedf50d7..78d872ab5 100644 --- a/layouts/community/ergodox/dvorak_programmer_swe/readme.md +++ b/layouts/community/ergodox/dvorak_programmer_swe/readme.md @@ -25,7 +25,7 @@ Known issues: * Switched position on Alt and Alt-shift * Added tilde character to symbol layer * Added Print Screen to keymap 3 - * Added ' (NO_APOS) to keymap 3 + * Added ' (NO_QUOT) to keymap 3 * Added how to install help in this readme * 2017-05-16 diff --git a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c index 4ca20bd48..3ecef9d9b 100644 --- a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c +++ b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, MO(MOUS), - KC_TAB, SE_AA, SE_AE, SE_OSLH, KC_P, KC_Y, KC_NO, + KC_TAB, SE_ARNG,SE_ADIA, SE_ODIA, KC_P, KC_Y, KC_NO, KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, KC_DOT, KC_Q, KC_J, KC_K, KC_X, KC_NO, KC_LCTRL, KC_NO, KC_NO, KC_LALT, KC_LCMD, @@ -84,9 +84,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_NO, KC_NO, // right hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, LSFT(KC_2), SE_QUES, LSFT(KC_6), SE_LESS, SE_GRTR, KC_NO, + KC_NO, LSFT(KC_2), SE_QUES, LSFT(KC_6), SE_LABK, SE_RABK, KC_NO, KC_HASH, SE_CIRC, KC_HASH, LSFT(KC_2), SE_TILD, KC_NO, - KC_NO, KC_PERC, SE_ACUT, SE_APOS, SE_ASTR, SE_GRV, KC_NO, + KC_NO, KC_PERC, SE_ACUT, SE_QUOT, SE_ASTR, SE_GRV, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, @@ -162,14 +162,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SE_ACUT, - CTL_T(SE_APOS), SE_CIRC, SE_ASTR, KC_LALT, KC_LGUI, + CTL_T(SE_QUOT), SE_CIRC, SE_ASTR, KC_LALT, KC_LGUI, KC_LCTRL, KC_LALT, SE_TILD, KC_BSPC, KC_TAB, KC_ESC, // right hand KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, - KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, - KC_H, KC_J, KC_K, KC_L, SE_OSLH, SE_AE, + KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, + KC_H, KC_J, KC_K, KC_L, SE_ODIA, SE_ADIA, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSFT, KC_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, KC_HOME, KC_END, diff --git a/layouts/community/ergodox/french_hacker/keymap.c b/layouts/community/ergodox/french_hacker/keymap.c index 731d917fd..b4c8e37bd 100644 --- a/layouts/community/ergodox/french_hacker/keymap.c +++ b/layouts/community/ergodox/french_hacker/keymap.c @@ -96,8 +96,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMB] = LAYOUT_ergodox( // left hand M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,FR_SECT,FR_LESS, FR_LCBR,FR_BSLS,FR_TILD,KC_TRNS, - KC_TRNS,FR_APOS,FR_EQL, FR_MINS,FR_LPRN,FR_PLUS, + KC_TRNS,FR_SECT,FR_LABK, FR_LCBR,FR_BSLS,FR_TILD,KC_TRNS, + KC_TRNS,FR_QUOT,FR_EQL, FR_MINS,FR_LPRN,FR_PLUS, KC_TRNS,FR_GRV,FR_QUES,FR_HASH,FR_LBRC,FR_PIPE,KC_TRNS, FR_EURO,FR_PND,FR_DLR,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, @@ -105,9 +105,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS, // right hand KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, FR_PERC, FR_AT, FR_RCBR, FR_GRTR, FR_MU, KC_F12, - FR_ASTR, FR_RPRN, FR_UNDS, FR_SLSH, FR_QUOT, KC_TRNS, - KC_TRNS, FR_AMP, FR_RBRC, FR_DLR, FR_EXLM, FR_CIRC, KC_TRNS, + KC_TRNS, FR_PERC, FR_AT, FR_RCBR, FR_RABK, FR_MICR, KC_F12, + FR_ASTR, FR_RPRN, FR_UNDS, FR_SLSH, FR_DQUO, KC_TRNS, + KC_TRNS, FR_AMPR, FR_RBRC, FR_DLR, FR_EXLM, FR_CIRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, ALGR(KC_S), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/layouts/community/ergodox/german-kinergo/keymap.c b/layouts/community/ergodox/german-kinergo/keymap.c index d9c297814..9f8b72596 100644 --- a/layouts/community/ergodox/german-kinergo/keymap.c +++ b/layouts/community/ergodox/german-kinergo/keymap.c @@ -43,14 +43,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(1), KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, MO(2), - KC_LGUI, DE_CIRC, DE_LESS, KC_LEFT, KC_RIGHT, + KC_LGUI, DE_CIRC, DE_LABK, KC_LEFT, KC_RIGHT, KC_LCTRL, KC_LALT, KC_HOME, KC_BSPC,KC_DEL,KC_END, // right hand KC_PSCREEN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - MO(1), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, - KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE), + MO(1), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA, + KC_H, KC_J, KC_K, KC_L, DE_ODIA, LT(MDIA,DE_ADIA), MO(2), KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_DOWN, KC_UP, DE_HASH, DE_PLUS, KC_RGUI, KC_RALT, KC_RCTRL, @@ -63,14 +63,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), // KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, // KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), -// LT(SYMB,DE_LESS),CTL_T(DE_HASH), DE_ACUT, DE_MINS, DE_PLUS, +// LT(SYMB,DE_LABK),CTL_T(DE_HASH), DE_ACUT, DE_MINS, DE_PLUS, // ALT_T(KC_APP), KC_LGUI, // KC_HOME, // KC_SPC,KC_BSPC,KC_END, // // right hand // KC_MNXT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, -// TG(2), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, -// KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE), +// TG(2), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA, +// KC_H, KC_J, KC_K, KC_L, DE_ODIA, LT(MDIA,DE_ADIA), // MEH_T(KC_NO),KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(DE_MINS), KC_RSFT, // KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TT(SYMB), // KC_LALT,CTL_T(KC_ESC), diff --git a/layouts/community/ergodox/german-lukas/keymap.c b/layouts/community/ergodox/german-lukas/keymap.c index cbc51c695..76a77acdb 100644 --- a/layouts/community/ergodox/german-lukas/keymap.c +++ b/layouts/community/ergodox/german-lukas/keymap.c @@ -40,14 +40,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - KC_LGUI, DE_CIRC, DE_LESS, KC_LEFT, KC_RIGHT, + KC_LGUI, DE_CIRC, DE_LABK, KC_LEFT, KC_RIGHT, KC_LCTRL, KC_LALT, KC_HOME, KC_SPC ,KC_DEL,KC_END, // right hand KC_PSCREEN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(MDIA), DE_Z, KC_U, KC_I, KC_O, KC_P, LT(SHRT,DE_UE), - KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE), + TG(MDIA), DE_Z, KC_U, KC_I, KC_O, KC_P, LT(SHRT,DE_UDIA), + KC_H, KC_J, KC_K, KC_L, DE_ODIA, LT(MDIA,DE_ADIA), MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_UP, KC_DOWN, DE_HASH, DE_PLUS, LCA_T(KC_NO), KC_RALT, KC_RCTRL, diff --git a/layouts/community/ergodox/german-manuneo/keymap.c b/layouts/community/ergodox/german-manuneo/keymap.c index d1e48e110..9b24df83d 100644 --- a/layouts/community/ergodox/german-manuneo/keymap.c +++ b/layouts/community/ergodox/german-manuneo/keymap.c @@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MO(5), DE_1, DE_2, DE_3, DE_4, DE_5, DE_ACUT, MO(4), DE_X, DE_P, DE_F, DE_W, DE_G, KC_HOME, MO(1), DE_U, DE_I, DE_A, DE_E, DE_O, - MO(3), DE_UE, DE_OE, DE_AE, DE_C, DE_V, KC_END, + MO(3), DE_UDIA, DE_ODIA, DE_ADIA, DE_C, DE_V, KC_END, KC_TRNS, KC_TRNS, KC_LGUI, KC_LALT, KC_LCTL, /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_INS, TG(2), /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_APP, @@ -167,7 +167,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * '-----------------' '-----------------' */ [L1] = LAYOUT_ergodox( - KC_TRNS, DE_EXLM, DE_DQOT, DE_PARA, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, DE_EXLM, DE_DQUO, DE_SECT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_ASTR, DE_PIPE, DE_SLSH, DE_LCBR, DE_RCBR, KC_TRNS, KC_TRNS, DE_UNDS, DE_MINS, DE_AMPR, DE_LBRC, DE_RBRC, KC_TRNS, KC_TRNS, DE_PLUS, DE_EQL, KC_TRNS, KC_TRNS, KC_TRNS, @@ -175,9 +175,9 @@ 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, DE_RING, KC_TRNS, - KC_TRNS, DE_HASH, DE_LESS, DE_MORE, KC_TRNS, DE_DQOT, KC_TRNS, - /*-*/ DE_DLR, DE_LPRN, DE_RPRN, DE_TILD, DE_QUOT, DE_QST, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DE_DEG, KC_TRNS, + KC_TRNS, DE_HASH, DE_LABK, DE_RABK, KC_TRNS, DE_DQUO, KC_TRNS, + /*-*/ DE_DLR, DE_LPRN, DE_RPRN, DE_TILD, DE_QUOT, DE_QUES, KC_TRNS, DE_BSLS, DE_PERC, DE_SCLN, DE_COLN, M(UC_UPWARDS_ARROW), KC_TRNS, /*-*/ /*-*/ KC_TRNS, KC_TRNS, M(UC_LEFTWARDS_ARROW), M(UC_DOWNWARDS_ARROW), M(UC_RIGHTWARDS_ARROW), KC_TRNS, KC_TRNS, diff --git a/layouts/community/ergodox/german/keymap.c b/layouts/community/ergodox/german/keymap.c index c64057dc4..99dda5185 100644 --- a/layouts/community/ergodox/german/keymap.c +++ b/layouts/community/ergodox/german/keymap.c @@ -38,14 +38,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, DE_Y, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,DE_LESS),CTL_T(DE_HASH), DE_ACUT, DE_MINS, DE_PLUS, + LT(SYMB,DE_LABK),CTL_T(DE_HASH), DE_ACUT, DE_MINS, DE_PLUS, ALT_T(KC_APP), KC_LGUI, KC_HOME, KC_SPC,KC_BSPC,KC_END, // right hand KC_MNXT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(2), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, - KC_H, KC_J, KC_K, KC_L, DE_OE, LT(MDIA,DE_AE), + TG(2), DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UDIA, + KC_H, KC_J, KC_K, KC_L, DE_ODIA, LT(MDIA,DE_ADIA), MEH_T(KC_NO),KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(DE_MINS), KC_RSFT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TT(SYMB), KC_LALT,CTL_T(KC_ESC), diff --git a/layouts/community/ergodox/guni/keymap.c b/layouts/community/ergodox/guni/keymap.c index 0707bcf77..cc67fbdea 100644 --- a/layouts/community/ergodox/guni/keymap.c +++ b/layouts/community/ergodox/guni/keymap.c @@ -1,7 +1,4 @@ #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" -#include "bootloader.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_ergodox( // layer 0 : default @@ -13,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LGUI , KC_GRV,KC_LEFT,KC_RGHT,KC_LALT, KC_NO , KC_NO , KC_NO , - KC_BSPC,KC_DEL ,KC_FN23, + KC_BSPC,KC_DEL ,TO(3), // right hand KC_RBRC , KC_6, KC_7 , KC_8, KC_9, KC_0, KC_MINS, KC_END , KC_Y, KC_U , KC_I, KC_O, KC_P, MT(MOD_RCTL, KC_BSLS), @@ -34,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, - KC_TRNS,KC_TRNS,KC_FN1, + KC_TRNS,KC_TRNS,TO(0), // right hand KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_TRNS,KC_EXLM,LSFT(KC_COMM),LSFT(KC_DOT),KC_EQL,KC_AMPR, KC_TRNS, @@ -55,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, - KC_TRNS,KC_TRNS,KC_FN1 , + KC_TRNS,KC_TRNS,TO(0) , // right hand KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS ,KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_END ,KC_TRNS, @@ -68,14 +65,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), LAYOUT_ergodox( // layer 3 : teensy bootloader functions // left hand - KC_FN0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + RESET, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, - KC_TRNS,KC_TRNS,KC_FN1 , + KC_TRNS,KC_TRNS,TO(0) , // right hand KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, @@ -110,31 +107,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -/* id for user defined functions */ -enum function_id { - TEENSY_KEY, -}; - -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key - [1] = ACTION_LAYER_SET(0, ON_PRESS), - [23] = ACTION_LAYER_SET(3, ON_PRESS), - [24] = ACTION_LAYER_SET(2, ON_PRESS), - [26] = ACTION_LAYER_SET(1, ON_PRESS), -}; - -void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) -{ - - if (id == TEENSY_KEY) { - clear_keyboard(); - print("\n\nJump to bootloader... "); - wait_ms(250); - bootloader_jump(); // should not return - print("not supported.\n"); - } -} diff --git a/layouts/community/ergodox/ishigoya-jp/keymap.c b/layouts/community/ergodox/ishigoya-jp/keymap.c index 59040cd50..c70cbba81 100644 --- a/layouts/community/ergodox/ishigoya-jp/keymap.c +++ b/layouts/community/ergodox/ishigoya-jp/keymap.c @@ -396,7 +396,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [NUM] = LAYOUT_ergodox( // left hand KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, - KC_NO, KC_NO, KC_NO, JP_DQT, KC_RBRACKET, KC_BSPC, KC_SCLN, + KC_NO, KC_NO, KC_NO, JP_DQUO, KC_RBRACKET, KC_BSPC, KC_SCLN, KC_NO, KC_NO, KC_SLSH, JP_PLUS, LSFT(KC_RBRACKET), JP_RCBR, KC_NO, KC_NO, JP_ASTR, KC_MINS, LSFT(KC_8), LSFT(KC_9), JP_COLN, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_HASH, diff --git a/layouts/community/ergodox/issmirnov/keymap.c b/layouts/community/ergodox/issmirnov/keymap.c index ce853f3d3..b129148b0 100644 --- a/layouts/community/ergodox/issmirnov/keymap.c +++ b/layouts/community/ergodox/issmirnov/keymap.c @@ -201,7 +201,7 @@ void matrix_scan_user(void) { } // only runs when when the layer is changed, good for updating LED's and clearing sticky state -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { uint8_t layer = biton32(state); ergodox_board_led_off(); diff --git a/layouts/community/ergodox/kejadlen/rules.mk b/layouts/community/ergodox/kejadlen/rules.mk index 8e8684828..ceee16687 100644 --- a/layouts/community/ergodox/kejadlen/rules.mk +++ b/layouts/community/ergodox/kejadlen/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/layouts/community/ergodox/kristian/keymap.c b/layouts/community/ergodox/kristian/keymap.c index b56e880c0..c3bb9e047 100644 --- a/layouts/community/ergodox/kristian/keymap.c +++ b/layouts/community/ergodox/kristian/keymap.c @@ -13,7 +13,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT_ergodox(NO_LESS,KC_1,KC_2,KC_3,KC_4,KC_5,KC_BSPACE,KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,TG(1),KC_BSPACE,KC_A,KC_S,KC_D,KC_F,KC_G,SFT_T(NO_APOS),CTL_T(KC_Z),KC_X,KC_C,KC_V,KC_B,SFT_T(KC_EQUAL),MO(1),CTL_T(KC_GRAVE),KC_LGUI,KC_LEFT,KC_RIGHT,KC_ESCAPE,KC_CAPSLOCK,KC_HOME,KC_SPACE,KC_LGUI,KC_LALT,KC_DELETE,KC_6,KC_7,KC_8,KC_9,KC_0,NO_PLUS,TG(1),KC_Y,KC_U,KC_I,KC_O,KC_P,NO_AM,KC_H,KC_J,KC_K,KC_L,LT(2,NO_OSLH),NO_AE,SFT_T(KC_RBRC),KC_N,KC_M,KC_COMMA,KC_DOT,CTL_T(KC_SLASH),SFT_T(NO_APOS),KC_DOWN,KC_UP,NO_LPRN,NO_RPRN,MO(1),NO_QUOT,CTL_T(KC_ESCAPE),NO_APOS,KC_LALT,KC_LGUI,KC_ENTER), +[0] = LAYOUT_ergodox(NO_LABK,KC_1,KC_2,KC_3,KC_4,KC_5,KC_BSPACE,KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,TG(1),KC_BSPACE,KC_A,KC_S,KC_D,KC_F,KC_G,SFT_T(NO_QUOT),CTL_T(KC_Z),KC_X,KC_C,KC_V,KC_B,SFT_T(KC_EQUAL),MO(1),CTL_T(KC_GRAVE),KC_LGUI,KC_LEFT,KC_RIGHT,KC_ESCAPE,KC_CAPSLOCK,KC_HOME,KC_SPACE,KC_LGUI,KC_LALT,KC_DELETE,KC_6,KC_7,KC_8,KC_9,KC_0,NO_PLUS,TG(1),KC_Y,KC_U,KC_I,KC_O,KC_P,NO_ARNG,KC_H,KC_J,KC_K,KC_L,LT(2,NO_OSTR),NO_AE,SFT_T(KC_RBRC),KC_N,KC_M,KC_COMMA,KC_DOT,CTL_T(KC_SLASH),SFT_T(NO_QUOT),KC_DOWN,KC_UP,NO_LPRN,NO_RPRN,MO(1),NO_QUOT,CTL_T(KC_ESCAPE),NO_QUOT,KC_LALT,KC_LGUI,KC_ENTER), [1] = LAYOUT_ergodox(M(0),KC_F1,KC_F2,KC_F3,KC_F4,KC_F5,KC_BSPACE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_BSPACE,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LSHIFT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LCTL,KC_LGUI,KC_LEFT,KC_RIGHT,KC_ESCAPE,KC_TRANSPARENT,KC_HOME,KC_SPACE,KC_LGUI,KC_LALT,KC_DELETE,KC_F6,KC_F7,KC_F8,KC_F9,KC_F10,KC_F11,KC_TRANSPARENT,KC_7,KC_8,KC_9,KC_TRANSPARENT,KC_TRANSPARENT,KC_F12,KC_4,KC_5,KC_6,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_0,KC_1,KC_2,KC_3,NO_LBRC,NO_RBRC,KC_LSHIFT,KC_COMMA,KC_DOT,LSFT(NO_LBRC),LSFT(NO_RBRC),KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_TRANSPARENT,KC_LALT,KC_LGUI,KC_ENTER), diff --git a/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c b/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c index 85782dda7..7c91b3fbb 100644 --- a/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c +++ b/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, DE_ACUT, KC_TAB, DE_X, DE_V, DE_L, DE_C, DE_W, KC_PSCR, MO(1), DE_U, DE_I, DE_A, DE_E, DE_O, - KC_LSFT, DE_UE, DE_OE, DE_AE, DE_P, DE_Z, KC_SPACE, + KC_LSFT, DE_UDIA, DE_ODIA, DE_ADIA, DE_P, DE_Z, KC_SPACE, KC_LCTL, KC_LGUI, KC_LALT, MO(3), MO(2), /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_VOLU, /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_TRNS, @@ -82,9 +82,9 @@ 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, DE_EXLM, DE_LESS, DE_MORE, DE_EQL, DE_AMPR, KC_TRNS, - /*-*/ DE_QST, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT, - KC_TRNS, DE_PLUS, DE_PERC, DE_DQOT, DE_QUOT, DE_SCLN, KC_TRNS, + KC_TRNS, DE_EXLM, DE_LABK, DE_RABK, DE_EQL, DE_AMPR, KC_TRNS, + /*-*/ DE_QUES, DE_LPRN, DE_RPRN, DE_MINS, DE_COLN, DE_AT, + KC_TRNS, DE_PLUS, DE_PERC, DE_DQUO, DE_QUOT, DE_SCLN, KC_TRNS, /*-*/ /*-*/ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c b/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c index ee9a9d180..2ddd7ab20 100644 --- a/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c +++ b/layouts/community/ergodox/norwegian_programmer_osx_pc/keymap.c @@ -7,6 +7,18 @@ #define BASE_MAC 1 // default layer mac #define NUMB_FUNC 2 // numbers and function keys +enum custom_keycodes { + TILDE_NO = SAFE_RANGE, + LESS_NO, + GRTR_NO, + CIRC_NO, + ACUT_NO, + GRV_NO, + LESS_NO_MAC, + GRTR_NO_MAC, + ACUT_NO_MAC +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer PC @@ -32,18 +44,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT_ergodox( // left hand - KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, KC_FN2, TG(1), - KC_PPLS, KC_Q, KC_W, KC_E, KC_R, KC_T, NO_QUO2, + KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, TILDE_NO, TG(1), + KC_PPLS, KC_Q, KC_W, KC_E, KC_R, KC_T, NO_DQUO, KC_PSLS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_PMNS, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN, ALT_T(KC_ESC), KC_EXLM , NO_QUES, NO_COLN, KC_TAB, - KC_HASH, KC_FN7, - KC_FN6, + KC_HASH, GRV_NO, + ACUT_NO, OSM(MOD_LSFT),CTL_T(KC_DOT),GUI_T(KC_COMMA), // right hand - KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT, - NO_APOS, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA , - KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE, + CIRC_NO, NO_DLR, NO_LPRN, NO_RPRN ,LESS_NO, GRTR_NO,NO_AT, + NO_QUOT, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_ARNG, + KC_H, KC_J, KC_K, KC_L, NO_OSTR, NO_AE, NO_EQL, KC_N, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_BSLS, KC_LEFT, NO_UNDS, NO_AMPR, NO_PIPE, OSL(2), KC_INSERT, KC_PERC, @@ -72,20 +84,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ [BASE_MAC] = LAYOUT_ergodox( - KC_TRNS, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS, S(ALGR(NO_8)),S(ALGR(NO_9)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_GRV_MAC, - KC_FN10, + KC_TRNS, ALGR(NO_BSLS), + ACUT_NO_MAC, KC_TRNS,GUI_T(KC_DOT) , CTL_T(KC_COMMA), // right hand - KC_TRNS, NO_DLR_MAC, KC_TRNS,KC_TRNS,KC_FN8, KC_FN9,NO_AT_MAC, - NO_APOS_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, S(NO_4), KC_TRNS,KC_TRNS,LESS_NO_MAC, GRTR_NO_MAC,NO_QUOT, + NO_LABK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_BSLS_MAC, - KC_TRNS, KC_TRNS, KC_TRNS, NO_PIPE_MAC, OSL(2), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(ALGR(NO_7)), + KC_TRNS, KC_TRNS, KC_TRNS, ALGR(NO_7), OSL(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS @@ -133,47 +145,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -enum macro_id { - TILDE_NO, LESS_NO, GRTR_NO, CIRC_NO, ACUT_NO, GRV_NO, LESS_NO_MAC, GRTR_NO_MAC, ACUT_NO_MAC -}; - -const uint16_t PROGMEM fn_actions[] = { - [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed. - [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first. - [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first. - [5] = ACTION_MACRO(CIRC_NO), // Completed ^ character, no space needed. - [6] = ACTION_MACRO(ACUT_NO), // Completed ´ character, no space needed. - [7] = ACTION_MACRO(GRV_NO), // Completed ` character, no space needed. - [8] = ACTION_MACRO(LESS_NO_MAC), // < completed on keypress down, to avoid same button problem when typing <> quickly - [9] = ACTION_MACRO(GRTR_NO_MAC), // > completed on keypress down, to avoid same button problem when typing <> quickly - [10] = ACTION_MACRO(ACUT_NO_MAC), // Completed ´ character, no space needed -}; - - - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - keyevent_t event = record->event; - - switch (id) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { case TILDE_NO: - return (event.pressed ? MACRO( D(RALT), T(RBRC), U(RALT), T(SPC), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(ALGR(KC_RBRC)); + tap_code(KC_SPC); + } + return false; case LESS_NO: - return (event.pressed ? MACRO( T(NUBS), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code(KC_NUBS); + } + return false; case GRTR_NO: - return (event.pressed ? MACRO( D(LSFT), T(NUBS), U(LSFT), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(S(KC_NUBS)); + } + return false; case CIRC_NO: - return (event.pressed ? MACRO( D(LSFT), T(RBRC), U(LSFT), T(SPC), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(S(KC_RBRC)); + tap_code(KC_SPC); + } + return false; case ACUT_NO: - return (event.pressed ? MACRO( D(RALT), T(EQL), U(RALT), T(SPC), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(ALGR(KC_EQL)); + tap_code(KC_SPC); + } + return false; case GRV_NO: - return (event.pressed ? MACRO( D(LSFT), T(EQL), T(SPC), U(LSFT), END ) : MACRO_NONE); + if (record->event.pressed) { + SEND_STRING(SS_LSFT("= ")); + } + return false; case LESS_NO_MAC: - return (event.pressed ? MACRO( T(GRV), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code(KC_GRV); + } + return false; case GRTR_NO_MAC: - return (event.pressed ? MACRO( D(LSFT), T(GRV), U(LSFT), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(S(KC_GRV)); + } + return false; case ACUT_NO_MAC: - return (event.pressed ? MACRO( T(EQL), T(SPC), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code(KC_EQL); + tap_code(KC_SPC); + } + return false; } - return MACRO_NONE; -}; + return true; +} diff --git a/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c b/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c index af1d268bd..5ca8d40db 100644 --- a/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c +++ b/layouts/community/ergodox/norwegian_programmer_osx_pc_colemak/keymap.c @@ -7,6 +7,18 @@ #define BASE_MAC 1 // default layer mac #define NUMB_FUNC 2 // numbers and function keys +enum custom_keycodes { + TILDE_NO = SAFE_RANGE, + LESS_NO, + GRTR_NO, + CIRC_NO, + ACUT_NO, + GRV_NO, + LESS_NO_MAC, + GRTR_NO_MAC, + ACUT_NO_MAC +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer PC @@ -32,18 +44,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT_ergodox( // left hand - KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, KC_FN2, TG(1), - KC_PPLS, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_QUO2, + KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, TILDE_NO, TG(1), + KC_PPLS, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_DQUO, KC_PSLS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_PMNS, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN, ALT_T(KC_ESC), KC_EXLM , NO_QUES, NO_COLN, KC_TAB, - KC_HASH, KC_FN7, - KC_FN6, + KC_HASH, GRV_NO, + ACUT_NO, OSM(MOD_LSFT),CTL_T(KC_DOT),GUI_T(KC_COMMA), // right hand - KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT, - NO_APOS, KC_J, KC_L, KC_U, KC_Y, NO_AA, NO_AE , - KC_H, KC_N, KC_E, KC_I, KC_O, NO_OSLH, + CIRC_NO, NO_DLR, NO_LPRN, NO_RPRN ,LESS_NO, GRTR_NO,NO_AT, + NO_QUOT, KC_J, KC_L, KC_U, KC_Y, NO_ARNG, NO_AE , + KC_H, KC_N, KC_E, KC_I, KC_O, NO_OSTR, NO_EQL, KC_K, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_BSLS, KC_LEFT, NO_UNDS, NO_AMPR, NO_PIPE, OSL(2), KC_INSERT, KC_PERC, @@ -72,20 +84,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ [BASE_MAC] = LAYOUT_ergodox( - KC_TRNS, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS, S(ALGR(NO_8)),S(ALGR(NO_9)), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_GRV_MAC, - KC_FN10, + KC_TRNS, ALGR(NO_BSLS), + ACUT_NO_MAC, KC_TRNS,GUI_T(KC_DOT) , CTL_T(KC_COMMA), // right hand - KC_TRNS, NO_DLR_MAC, KC_TRNS,KC_TRNS,KC_FN8, KC_FN9,NO_AT_MAC, - NO_APOS_MAC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, S(NO_4), KC_TRNS,KC_TRNS,LESS_NO_MAC, GRTR_NO_MAC,NO_QUOT, + NO_LABK, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_BSLS_MAC, - KC_TRNS, KC_TRNS, KC_TRNS, NO_PIPE_MAC, OSL(2), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(ALGR(NO_7)), + KC_TRNS, KC_TRNS, KC_TRNS, ALGR(NO_7), OSL(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS @@ -133,47 +145,57 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -enum macro_id { - TILDE_NO, LESS_NO, GRTR_NO, CIRC_NO, ACUT_NO, GRV_NO, LESS_NO_MAC, GRTR_NO_MAC, ACUT_NO_MAC -}; - -const uint16_t PROGMEM fn_actions[] = { - [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed. - [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first. - [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first. - [5] = ACTION_MACRO(CIRC_NO), // Completed ^ character, no space needed. - [6] = ACTION_MACRO(ACUT_NO), // Completed ´ character, no space needed. - [7] = ACTION_MACRO(GRV_NO), // Completed ` character, no space needed. - [8] = ACTION_MACRO(LESS_NO_MAC), // < completed on keypress down, to avoid same button problem when typing <> quickly - [9] = ACTION_MACRO(GRTR_NO_MAC), // > completed on keypress down, to avoid same button problem when typing <> quickly - [10] = ACTION_MACRO(ACUT_NO_MAC), // Completed ´ character, no space needed -}; - - - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - keyevent_t event = record->event; - - switch (id) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { case TILDE_NO: - return (event.pressed ? MACRO( D(RALT), T(RBRC), U(RALT), T(SPC), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(ALGR(KC_RBRC)); + tap_code(KC_SPC); + } + return false; case LESS_NO: - return (event.pressed ? MACRO( T(NUBS), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code(KC_NUBS); + } + return false; case GRTR_NO: - return (event.pressed ? MACRO( D(LSFT), T(NUBS), U(LSFT), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(S(KC_NUBS)); + } + return false; case CIRC_NO: - return (event.pressed ? MACRO( D(LSFT), T(RBRC), U(LSFT), T(SPC), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(S(KC_RBRC)); + tap_code(KC_SPC); + } + return false; case ACUT_NO: - return (event.pressed ? MACRO( D(RALT), T(EQL), U(RALT), T(SPC), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(ALGR(KC_EQL)); + tap_code(KC_SPC); + } + return false; case GRV_NO: - return (event.pressed ? MACRO( D(LSFT), T(EQL), T(SPC), U(LSFT), END ) : MACRO_NONE); + if (record->event.pressed) { + SEND_STRING(SS_LSFT("= ")); + } + return false; case LESS_NO_MAC: - return (event.pressed ? MACRO( T(GRV), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code(KC_GRV); + } + return false; case GRTR_NO_MAC: - return (event.pressed ? MACRO( D(LSFT), T(GRV), U(LSFT), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code16(S(KC_GRV)); + } + return false; case ACUT_NO_MAC: - return (event.pressed ? MACRO( T(EQL), T(SPC), END ) : MACRO_NONE); + if (record->event.pressed) { + tap_code(KC_EQL); + tap_code(KC_SPC); + } + return false; } - return MACRO_NONE; -}; + return true; +} diff --git a/layouts/community/ergodox/osx_de/keymap.c b/layouts/community/ergodox/osx_de/keymap.c index cd9a35e21..581aecf2d 100644 --- a/layouts/community/ergodox/osx_de/keymap.c +++ b/layouts/community/ergodox/osx_de/keymap.c @@ -15,8 +15,8 @@ #define M_MEH_SH_ACUT 2 #define M_LGUI_SHFT 3 #define M_CTL_SFT_HASH 4 -#define M_DE_OSX_CIRC_CTRLCMD 5 -#define M_DE_OSX_PLUS_CTRLALT 6 +#define M_DE_CIRC_CTRLCMD 5 +#define M_DE_PLUS_CTRLALT 6 #define SM_SMILE 7 #define SM_SMIRK 8 #define SM_CRY 9 @@ -31,39 +31,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE]=LAYOUT_ergodox( //left half - KC_ESC, DE_OSX_1, DE_OSX_2, DE_OSX_3, DE_OSX_4, DE_OSX_5, M(M_CTL_SFT_HASH), - KC_TAB, DE_OSX_Q, DE_OSX_W, DE_OSX_E, DE_OSX_R, DE_OSX_T, KC_LGUI, - KC_LALT, DE_OSX_A, DE_OSX_S, DE_OSX_D, DE_OSX_F, DE_OSX_G, - KC_LSFT, CTL_T(DE_OSX_Y), DE_OSX_X, DE_OSX_C, DE_OSX_V, DE_OSX_B, KC_LALT, - LT(SYMB,DE_OSX_LESS), M(M_DE_OSX_CIRC_CTRLCMD), M(M_DE_OSX_PLUS_CTRLALT), KC_UP, KC_DOWN, + KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, M(M_CTL_SFT_HASH), + KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_LGUI, + KC_LALT, DE_A, DE_S, DE_D, DE_F, DE_G, + KC_LSFT, CTL_T(DE_Y), DE_X, DE_C, DE_V, DE_B, KC_LALT, + LT(SYMB,DE_LABK), M(M_DE_CIRC_CTRLCMD), M(M_DE_PLUS_CTRLALT), KC_UP, KC_DOWN, M(M_MEH_SH_ACUT), TG(MDIA), KC_HOME, KC_BSPC, KC_DEL, LT(SMLY,KC_END), //right half - M(M_CTL_SFT_HASH), DE_OSX_6, DE_OSX_7, DE_OSX_8, DE_OSX_9, DE_OSX_0, DE_OSX_SS, - KC_RGUI, DE_OSX_Z, DE_OSX_U, DE_OSX_I, DE_OSX_O, DE_OSX_P, DE_OSX_UE, - DE_OSX_H, DE_OSX_J, DE_OSX_K, DE_OSX_L, DE_OSX_OE, ALT_T(DE_OSX_AE), - KC_RALT, DE_OSX_N, DE_OSX_M, DE_OSX_COMM, DE_OSX_DOT, CTL_T(DE_OSX_MINS), KC_RSFT, - KC_LEFT, KC_RIGHT, LGUI(KC_LSFT), LALT(KC_LSFT), LT(SYMB,DE_OSX_PLUS), - TG(NUMB), ALL_T(DE_OSX_ACUT), + M(M_CTL_SFT_HASH), DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS, + KC_RGUI, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_UDIA, + DE_H, DE_J, DE_K, DE_L, DE_ODIA, ALT_T(DE_ADIA), + KC_RALT, DE_N, DE_M, DE_COMM, DE_DOT, CTL_T(DE_MINS), KC_RSFT, + KC_LEFT, KC_RIGHT, LGUI(KC_LSFT), LALT(KC_LSFT), LT(SYMB,DE_PLUS), + TG(NUMB), ALL_T(DE_ACUT), KC_PGUP, KC_PGDN, KC_ENT, KC_SPC), [SYMB]=LAYOUT_ergodox( //left half KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS, DE_OSX_LESS, DE_OSX_MORE, DE_OSX_EXLM, DE_OSX_QST, KC_TRNS, KC_TRNS, - KC_TRNS, DE_OSX_HASH, DE_OSX_DLR, DE_OSX_BSLS, DE_OSX_SLSH, KC_DOT, - KC_TRNS, KC_TRNS, DE_OSX_LESS, DE_OSX_PERC, DE_OSX_PIPE, DE_OSX_TILD, KC_TRNS, + KC_TRNS, DE_LABK, DE_RABK, DE_EXLM, DE_QUES, KC_TRNS, KC_TRNS, + KC_TRNS, DE_HASH, DE_DLR, DE_BSLS, DE_SLSH, KC_DOT, + KC_TRNS, KC_TRNS, DE_LABK, DE_PERC, DE_PIPE, DE_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, //right half M(M_TOGGLE_5), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, LALT(LSFT(KC_7)), LALT(KC_5), LALT(KC_6), DE_OSX_LESS, DE_OSX_MORE, DE_OSX_EXLM, - DE_OSX_SLSH, DE_OSX_LPRN, DE_OSX_RPRN, LALT(KC_8), LALT(KC_9), DE_OSX_HASH, - KC_TRNS, DE_OSX_PIPE, DE_OSX_TILD, DE_OSX_CIRC, KC_UP, DE_OSX_MINS, LSFT(KC_4), - DE_OSX_QUOT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, + KC_TRNS, LALT(LSFT(KC_7)), LALT(KC_5), LALT(KC_6), DE_LABK, DE_RABK, DE_EXLM, + DE_SLSH, DE_LPRN, DE_RPRN, LALT(KC_8), LALT(KC_9), DE_HASH, + KC_TRNS, DE_PIPE, DE_TILD, DE_CIRC, KC_UP, DE_MINS, LSFT(KC_4), + DE_QUOT, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_F13, KC_F12, KC_F14, KC_F15, KC_TRNS, KC_TRNS), @@ -118,9 +118,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //right half KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, LSFT(KC_RBRC), KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, KC_RBRC, DE_OSX_MINS, + KC_DOWN, KC_4, KC_5, KC_6, KC_RBRC, DE_MINS, KC_TRNS, LSFT(KC_6), KC_1, KC_2, KC_3, LSFT(KC_7), KC_TRNS, - KC_0, KC_DOT, KC_COMM, DE_OSX_EQL, KC_TRNS, + KC_0, KC_DOT, KC_COMM, DE_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), @@ -171,8 +171,8 @@ if (record->event.pressed) { } break; -case M_DE_OSX_PLUS_CTRLALT: -//Macro: M_DE_OSX_PLUS_CTRLALT//----------------------- +case M_DE_PLUS_CTRLALT: +//Macro: M_DE_PLUS_CTRLALT//----------------------- if (record->event.pressed) { start = timer_read(); return MACRO(D(LCTRL),D(LALT),END); @@ -264,8 +264,8 @@ if (record->event.pressed) { } break; -case M_DE_OSX_CIRC_CTRLCMD: -//Macro: M_DE_OSX_CIRC_CTRLCMD//----------------------- +case M_DE_CIRC_CTRLCMD: +//Macro: M_DE_CIRC_CTRLCMD//----------------------- if (record->event.pressed) { start = timer_read(); return MACRO(D(LCTRL),D(LGUI),END); diff --git a/layouts/community/ergodox/osx_de_adnw_koy/keymap.c b/layouts/community/ergodox/osx_de_adnw_koy/keymap.c index 08b11cccd..18335652f 100644 --- a/layouts/community/ergodox/osx_de_adnw_koy/keymap.c +++ b/layouts/community/ergodox/osx_de_adnw_koy/keymap.c @@ -30,13 +30,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LCTL, KC_TAB, KC_K, KC_DOT, KC_O, KC_COMM, KC_Z, KC_LGUI, TG(QWERTZ), KC_H, KC_A, KC_E, KC_I, KC_U, - KC_LSFT, CTL_T(KC_X), KC_Q, DE_AE, DE_UE, DE_OE, KC_LALT, - LT(SYMB,KC_GRV), DE_LESS, LALT(KC_LSFT), KC_LEFT, KC_RGHT, + KC_LSFT, CTL_T(KC_X), KC_Q, DE_ADIA, DE_UDIA, DE_ODIA, KC_LALT, + LT(SYMB,KC_GRV), DE_LABK, LALT(KC_LSFT), KC_LEFT, KC_RGHT, TG(MDIA), MEH_T(LSFT(DE_ACUT)), KC_HOME, KC_BSPC, KC_DEL, KC_END, //right half - KC_RCTL, KC_6, KC_7, KC_8, KC_9, KC_0, DE_OSX_MINS, + KC_RCTL, KC_6, KC_7, KC_8, KC_9, KC_0, DE_MINS, KC_RGUI, KC_V, KC_G, KC_C, KC_L, KC_MINS, KC_Y, KC_D, KC_T, KC_R, KC_N, KC_S, LT(MDIA,KC_F), KC_RALT, KC_B, KC_P, KC_W, KC_M, CTL_T(KC_J), KC_RSFT, @@ -47,9 +47,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMB]=LAYOUT_ergodox( //left half KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS, KC_GRV, LSFT(KC_GRV), DE_EXLM, DE_QST, KC_TRNS, KC_TRNS, + KC_TRNS, KC_GRV, LSFT(KC_GRV), DE_EXLM, DE_QUES, KC_TRNS, KC_TRNS, KC_TRNS, DE_HASH, DE_DLR, LALT(LSFT(KC_7)), DE_SLSH, KC_DOT, - KC_TRNS, KC_TRNS, DE_LESS, DE_PERC, LALT(KC_7), LALT(KC_N), KC_TRNS, + KC_TRNS, KC_TRNS, DE_LABK, DE_PERC, LALT(KC_7), LALT(KC_N), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, LALT(LSFT(KC_7)), LALT(KC_5), LALT(KC_6), LALT(KC_7), DE_HASH, KC_F12, DE_SLSH, DE_LPRN, DE_RPRN, LALT(KC_8), LALT(KC_9), KC_TRNS, - KC_TRNS, DE_AMPR, KC_GRV, LSFT(KC_GRV), DE_DQOT, DE_QUOT, DE_QST, + KC_TRNS, DE_AMPR, KC_GRV, LSFT(KC_GRV), DE_DQUO, DE_QUOT, DE_QUES, KC_TRNS, KC_DOT, KC_EXLM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -88,14 +88,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LGUI, KC_TRNS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LALT, - LT(SYMB,KC_GRV), DE_LESS, LALT(KC_LSFT), KC_LEFT, KC_RGHT, + LT(SYMB,KC_GRV), DE_LABK, LALT(KC_LSFT), KC_LEFT, KC_RGHT, KC_TRNS, MEH_T(LSFT(DE_ACUT)), KC_HOME, KC_BSPC, KC_DEL, KC_END, //right half LGUI(KC_C), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_RGUI, KC_Y, KC_U, KC_I, KC_O, KC_P, DE_UE, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(MDIA,DE_AE), + KC_RGUI, KC_Y, KC_U, KC_I, KC_O, KC_P, DE_UDIA, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(MDIA,DE_ADIA), KC_RALT, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, KC_UP, KC_DOWN, LGUI(KC_LSFT), KC_RBRC, LT(SYMB,KC_BSLS), ALL_T(DE_ACUT), KC_TRNS, diff --git a/layouts/community/ergodox/osx_de_experimental/keymap.c b/layouts/community/ergodox/osx_de_experimental/keymap.c index cedecd45c..17ca4362e 100644 --- a/layouts/community/ergodox/osx_de_experimental/keymap.c +++ b/layouts/community/ergodox/osx_de_experimental/keymap.c @@ -35,7 +35,7 @@ #define TGH_NUM 2 -#define M_DE_OSX_PLUS_CTRLALT 3 +#define M_DE_PLUS_CTRLALT 3 #define SM_KISS 4 @@ -57,7 +57,7 @@ #define SM_SAD 13 -#define M_DE_OSX_CIRC_CTRLCMD 14 +#define M_DE_CIRC_CTRLCMD 14 #define M_MEH_SH_ACUT 15 @@ -83,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * /-------------------//-------------------//-------------------//-------------------//-------------------/ /-------------------//-------------------//-------------------//-------------------//-------------------/ * | < | LongPress / Type | LongPress / Type | Shift+Ctrl | Type | | # | ACUT | CMD+Shift | ALT+Shift | + | -* | SYMB | DE_OSX_CIRC_CTRLCMD| DE_OSX_PLUS_CTRAlt | | Toggle SMLY | | Meh | Hyper | | | SYMB | +* | SYMB | DE_CIRC_CTRLCMD | DE_PLUS_CTRAlt | | Toggle SMLY | | Meh | Hyper | | | SYMB | * \-------------------\\-------------------\\-------------------\\-------------------\/-------------------//-------------------/ /-------------------//-------------------/ \-------------------\\-------------------\\-------------------\\-------------------\\-------------------\ * | HOME | END | | LEFT | RIGHT | * | | | | | | @@ -99,20 +99,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { **/ [BASE]=LAYOUT_ergodox( //left half - KC_ESC, DE_OSX_1, DE_OSX_2, DE_OSX_3, DE_OSX_4, DE_OSX_5, M(TGH_NUM), - KC_TAB, DE_OSX_Q, DE_OSX_W, DE_OSX_E, DE_OSX_R, DE_OSX_T, KC_LGUI, - KC_LALT, DE_OSX_A, DE_OSX_S, DE_OSX_D, DE_OSX_F, DE_OSX_G, - KC_LSFT, CTL_T(DE_OSX_Y), DE_OSX_X, DE_OSX_C, DE_OSX_V, DE_OSX_B, KC_LALT, - LT(SYMB,DE_OSX_LESS), M(M_DE_OSX_CIRC_CTRLCMD), M(M_DE_OSX_PLUS_CTRLALT), LSFT(KC_LCTRL), M(SMLY_TOG_QUOT), + KC_ESC, DE_1, DE_2, DE_3, DE_4, DE_5, M(TGH_NUM), + KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_LGUI, + KC_LALT, DE_A, DE_S, DE_D, DE_F, DE_G, + KC_LSFT, CTL_T(DE_Y), DE_X, DE_C, DE_V, DE_B, KC_LALT, + LT(SYMB,DE_LABK), M(M_DE_CIRC_CTRLCMD), M(M_DE_PLUS_CTRLALT), LSFT(KC_LCTRL), M(SMLY_TOG_QUOT), KC_HOME, KC_END, KC_PGUP, KC_BSPC, KC_DEL, KC_PGDN, //right half - M(TOG_HLD_MDIA), DE_OSX_6, DE_OSX_7, DE_OSX_8, DE_OSX_9, DE_OSX_0, DE_OSX_SS, - KC_RGUI, DE_OSX_Z, DE_OSX_U, DE_OSX_I, DE_OSX_O, DE_OSX_P, DE_OSX_UE, - DE_OSX_H, DE_OSX_J, DE_OSX_K, DE_OSX_L, DE_OSX_OE, ALT_T(DE_OSX_AE), - KC_RALT, DE_OSX_N, DE_OSX_M, DE_OSX_COMM, DE_OSX_DOT, CTL_T(DE_OSX_MINS), KC_RSFT, - MEH_T(DE_OSX_HASH), ALL_T(DE_OSX_ACUT), LGUI(KC_LSFT), LALT(KC_LSFT), LT(SYMB,DE_OSX_PLUS), + M(TOG_HLD_MDIA), DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS, + KC_RGUI, DE_Z, DE_U, DE_I, DE_O, DE_P, DE_UDIA, + DE_H, DE_J, DE_K, DE_L, DE_ODIA, ALT_T(DE_ADIA), + KC_RALT, DE_N, DE_M, DE_COMM, DE_DOT, CTL_T(DE_MINS), KC_RSFT, + MEH_T(DE_HASH), ALL_T(DE_ACUT), LGUI(KC_LSFT), LALT(KC_LSFT), LT(SYMB,DE_PLUS), KC_LEFT, KC_RIGHT, KC_UP, KC_DOWN, KC_ENT, KC_SPC), @@ -152,19 +152,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMB]=LAYOUT_ergodox( //left half KC_APPLICATION, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F5, - KC_TRNS, DE_OSX_LESS, DE_OSX_MORE, DE_OSX_EXLM, DE_OSX_QST, KC_TRNS, KC_TRNS, - KC_TRNS, DE_OSX_HASH, DE_OSX_DLR, DE_OSX_BSLS, DE_OSX_SLSH, KC_DOT, - KC_TRNS, KC_TRNS, DE_OSX_LESS, DE_OSX_PERC, DE_OSX_PIPE, DE_OSX_TILD, KC_TRNS, + KC_TRNS, DE_LABK, DE_RABK, DE_EXLM, DE_QST, KC_TRNS, KC_TRNS, + KC_TRNS, DE_HASH, DE_DLR, DE_BSLS, DE_SLSH, KC_DOT, + KC_TRNS, KC_TRNS, DE_LABK, DE_PERC, DE_PIPE, DE_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, //right half KC_F6, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, DE_OSX_BSLS, DE_OSX_LBRC, DE_OSX_RBRC, DE_OSX_LESS, DE_OSX_MORE, DE_OSX_EXLM, - DE_OSX_SLSH, DE_OSX_LPRN, DE_OSX_RPRN, DE_OSX_LCBR, DE_OSX_RCBR, DE_OSX_HASH, - KC_TRNS, DE_OSX_PIPE, DE_OSX_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - DE_OSX_QUOT, DE_OSX_DQOT, KC_TRNS, M(M_TOGGLE_5), KC_TRNS, + KC_TRNS, DE_BSLS, DE_LBRC, DE_RBRC, DE_LABK, DE_RABK, DE_EXLM, + DE_SLSH, DE_LPRN, DE_RPRN, DE_LCBR, DE_RCBR, DE_HASH, + KC_TRNS, DE_PIPE, DE_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + DE_QUOT, DE_DQUO, KC_TRNS, M(M_TOGGLE_5), KC_TRNS, KC_F13, KC_F12, KC_F14, KC_F15, KC_TRNS, KC_TRNS), @@ -317,10 +317,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, //right half KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, DE_OSX_SLSH, KC_7, KC_8, KC_9, DE_OSX_ASTR, KC_F12, - DE_OSX_SLSH, KC_4, KC_5, KC_6, DE_OSX_PLUS, DE_OSX_MINS, - KC_TRNS, DE_OSX_PERC, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, - KC_0, KC_DOT, KC_COMM, DE_OSX_EQL, KC_TRNS, + KC_TRNS, DE_SLSH, KC_7, KC_8, KC_9, DE_ASTR, KC_F12, + DE_SLSH, KC_4, KC_5, KC_6, DE_PLUS, DE_MINS, + KC_TRNS, DE_PERC, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, + KC_0, KC_DOT, KC_COMM, DE_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), @@ -394,7 +394,7 @@ if (record->event.pressed) { if (timer_elapsed(start) >150) { return MACRO_NONE; } else { - return MACRO(DOWN(KC_LSFT),TYPE(DE_OSX_HASH),UP(KC_LSFT),END); + return MACRO(DOWN(KC_LSFT),TYPE(DE_HASH),UP(KC_LSFT),END); } } @@ -422,8 +422,8 @@ if (record->event.pressed){ return MACRO_NONE; break; -case M_DE_OSX_PLUS_CTRLALT: -//Macro: M_DE_OSX_PLUS_CTRLALT//----------------------- +case M_DE_PLUS_CTRLALT: +//Macro: M_DE_PLUS_CTRLALT//----------------------- if (record->event.pressed) { start = timer_read(); return MACRO(DOWN(KC_LCTRL),DOWN(KC_LALT),END); @@ -516,8 +516,8 @@ if (record->event.pressed) { } break; -case M_DE_OSX_CIRC_CTRLCMD: -//Macro: M_DE_OSX_CIRC_CTRLCMD//----------------------- +case M_DE_CIRC_CTRLCMD: +//Macro: M_DE_CIRC_CTRLCMD//----------------------- if (record->event.pressed) { start = timer_read(); return MACRO(DOWN(KC_LCTRL),DOWN(KC_LGUI),END); @@ -539,7 +539,7 @@ if (record->event.pressed) { if (timer_elapsed(start) >150) { return MACRO(U(LCTRL),U(LSFT),U(LALT),END); } else { - return MACRO(UP(KC_LCTRL),UP(KC_LALT),TYPE(DE_OSX_ACUT),UP(KC_LSFT),END); + return MACRO(UP(KC_LCTRL),UP(KC_LALT),TYPE(DE_ACUT),UP(KC_LSFT),END); } } diff --git a/layouts/community/ergodox/osx_fr/keymap.c b/layouts/community/ergodox/osx_fr/keymap.c index 09ef0edb6..924e9ee8a 100644 --- a/layouts/community/ergodox/osx_fr/keymap.c +++ b/layouts/community/ergodox/osx_fr/keymap.c @@ -34,17 +34,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand - FR_MINS, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_LEFT, + FR_MINS, FR_AMPR, FR_LEAC, FR_DQUO, FR_QUOT, FR_LPRN, KC_LEFT, KC_DEL, FR_A, FR_Z, KC_E, KC_R, KC_T, TG(1), KC_BSPC, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(FR_W), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,FR_UGRV), FR_LESS, LALT(KC_LSFT), KC_LEFT, KC_RGHT, + LT(SYMB,FR_LUGR), FR_LABK, LALT(KC_LSFT), KC_LEFT, KC_RGHT, ALT_T(KC_APP), KC_LGUI, KC_HOME, KC_SPC, KC_BSPC, KC_END, // right hand - KC_RGHT, FR_SECT, FR_EGRV, FR_EXLM, FR_CCED, FR_AGRV, FR_RPRN, + KC_RGHT, FR_SECT, FR_LEGR, FR_EXLM, FR_LCCE, FR_LAGR, FR_RPRN, TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, FR_GRV, KC_H, KC_J, KC_K, KC_L, FR_M, KC_LGUI, MEH_T(KC_NO), KC_N, FR_COMM, LT(MDIA, FR_SCLN), FR_COLN, CTL_T(FR_EQL), KC_RSFT, @@ -89,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, KC_UP, FR_7, FR_8, FR_9, FR_ASTR, KC_F12, KC_DOWN, FR_4, FR_5, FR_6, FR_PLUS, KC_TRNS, - KC_TRNS, FR_AMP, FR_1, FR_2, FR_3, FR_BSLS, KC_TRNS, + KC_TRNS, FR_AMPR, FR_1, FR_2, FR_3, FR_BSLS, KC_TRNS, KC_TRNS,FR_COMM, FR_0, FR_EQL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c index 729810705..6bf0285ab 100644 --- a/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c +++ b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { M(KC_CAPS), M(KC_A), M(KC_S), M(KC_D), M(KC_F), M(KC_G), KC_LSFT, M(KC_Z), M(KC_X), M(KC_C), M(KC_V), M(KC_B), MO(SYMB), KC_LCTL, KC_LALT, KC_LGUI, KC_LEFT, KC_RGHT, - KC_TRNS, KC_FN1, + KC_TRNS, F(1), KC_HOME, KC_BSPC, KC_DEL, KC_END, // right hand @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_FN3, KC_FN2, + F(3), F(2), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, // right hand @@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, - KC_FN4, KC_NO, + F(4), KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand diff --git a/layouts/community/ergodox/qwerty_code_friendly/keymap.c b/layouts/community/ergodox/qwerty_code_friendly/keymap.c index bf20e76a5..6e285d561 100644 --- a/layouts/community/ergodox/qwerty_code_friendly/keymap.c +++ b/layouts/community/ergodox/qwerty_code_friendly/keymap.c @@ -490,7 +490,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { /* Use layer 3 when 1 & 2 are pressed. */ state = update_tri_layer_state(state, LAYER_KPAD, LAYER_FKEY, LAYER_WORD); return state; diff --git a/layouts/community/ergodox/software_neo2/keymap.c b/layouts/community/ergodox/software_neo2/keymap.c index 8f7337601..5f600a5ab 100644 --- a/layouts/community/ergodox/software_neo2/keymap.c +++ b/layouts/community/ergodox/software_neo2/keymap.c @@ -34,20 +34,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand - KC_DEL, NEO_1, NEO_2, NEO_3, NEO_4, NEO_5, KC_MPLY, - KC_TAB, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_ESC, - NEO_L1_L, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O, - KC_LSFT, CTL_T(NEO_UE), GUI_T(NEO_OE), ALT_T(NEO_AE), NEO_P, NEO_Z, TG(1), - NEO_L2_L, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + KC_DEL, NE_1, NE_2, NE_3, NE_4, NE_5, KC_MPLY, + KC_TAB, NE_X, NE_V, NE_L, NE_C, NE_W, KC_ESC, + NE_L3L, NE_U, NE_I, NE_A, NE_E, NE_O, + KC_LSFT, CTL_T(NE_UDIA), GUI_T(NE_ODIA), ALT_T(NE_ADIA), NE_P, NE_Z, TG(1), + NE_L4L, KC_HOME, KC_PGDN, KC_PGUP, KC_END, C_S_T(KC_ESC),KC_LGUI, KC_ENT, KC_SPC,KC_BSPC,KC_TAB, // right hand - KC_MNXT, NEO_6, NEO_7, NEO_8, NEO_9, NEO_0, NEO_SS, - KC_ESC, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_Y, - NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R, - TG(1), NEO_B, NEO_M, NEO_COMM, NEO_DOT, NEO_J, KC_RSFT, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, NEO_L2_R, + KC_MNXT, NE_6, NE_7, NE_8, NE_9, NE_0, NE_SS, + KC_ESC, NE_K, NE_H, NE_G, NE_F, NE_Q, NE_Y, + NE_S, NE_N, NE_R, NE_T, NE_D, NE_L3R, + TG(1), NE_B, NE_M, NE_COMM, NE_DOT, NE_J, KC_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, NE_L4R, KC_LALT,KC_RGUI, KC_DEL, KC_ESC,KC_ENT, KC_SPC diff --git a/layouts/community/ergodox/supercoder/makefile.mk b/layouts/community/ergodox/supercoder/makefile.mk deleted file mode 100644 index 41a195d9c..000000000 --- a/layouts/community/ergodox/supercoder/makefile.mk +++ /dev/null @@ -1,6 +0,0 @@ -BOOTMAGIC_ENABLE=no -COMMAND_ENABLE=no -SLEEP_LED_ENABLE=no -UNICODE_ENABLE=no -MOUSEKEY_ENABLE=no -EXTRAKEY_ENABLE=no diff --git a/layouts/community/ergodox/supercoder/rules.mk b/layouts/community/ergodox/supercoder/rules.mk new file mode 100644 index 000000000..61b6dae84 --- /dev/null +++ b/layouts/community/ergodox/supercoder/rules.mk @@ -0,0 +1,6 @@ +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +COMMAND_ENABLE=no +SLEEP_LED_ENABLE=no +UNICODE_ENABLE=no +MOUSEKEY_ENABLE=no +EXTRAKEY_ENABLE=no diff --git a/layouts/community/ergodox/swedish-lindhe/keymap.c b/layouts/community/ergodox/swedish-lindhe/keymap.c index 1b16c31d4..368e216cd 100644 --- a/layouts/community/ergodox/swedish-lindhe/keymap.c +++ b/layouts/community/ergodox/swedish-lindhe/keymap.c @@ -54,14 +54,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SE_ACUT, - CTL_T(SE_APOS), SE_CIRC, SE_ASTR, KC_LALT, KC_LGUI, + CTL_T(SE_QUOT), SE_CIRC, SE_ASTR, KC_LALT, KC_LGUI, KC_LCTRL, KC_LALT, SE_TILD, KC_SPC, KC_BSPC, KC_ESC, // right hand KC_MS_BTN3, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, - KC_H, KC_J, KC_K, KC_L, SE_OSLH, SE_AE, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, + KC_H, KC_J, KC_K, KC_L, SE_ODIA, SE_ADIA, KC_DEL, KC_N, KC_M, KC_COMM, KC_DOT, SE_MINS, KC_RSFT, KC_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, KC_HOME, KC_END, diff --git a/layouts/community/ergodox/swedish/keymap.c b/layouts/community/ergodox/swedish/keymap.c index 8ef15d097..90218aa88 100644 --- a/layouts/community/ergodox/swedish/keymap.c +++ b/layouts/community/ergodox/swedish/keymap.c @@ -66,14 +66,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,SE_APOS), SE_ACUT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, + LT(SYMB,SE_QUOT), SE_ACUT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, ALT_T(KC_APP), KC_LGUI, KC_HOME, KC_SPC,KC_BSPC,KC_END, // right hand KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, SE_PLUS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_AA, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, SE_OSLH), GUI_T(SE_AE), + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, SE_ARNG, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, SE_ODIA), GUI_T(SE_ADIA), MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(SE_MINS), KC_RSFT, KC_UP, KC_DOWN, SE_CIRC, SE_ASTR, TT(SYMB), KC_ALGR, CTL_T(KC_ESC), diff --git a/layouts/community/ergodox/townk_osx/makefile.mk b/layouts/community/ergodox/townk_osx/rules.mk similarity index 100% rename from layouts/community/ergodox/townk_osx/makefile.mk rename to layouts/community/ergodox/townk_osx/rules.mk diff --git a/layouts/community/ergodox/workman_osx_mdw/keymap.c b/layouts/community/ergodox/workman_osx_mdw/keymap.c index 81fd3984b..f14d9cf4c 100644 --- a/layouts/community/ergodox/workman_osx_mdw/keymap.c +++ b/layouts/community/ergodox/workman_osx_mdw/keymap.c @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(1), KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSLS, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, MEH_T(KC_NO),KC_K, KC_L, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, KC_FN4, + KC_LEFT,KC_DOWN,KC_UP, KC_RGHT, F(4), KC_NO, KC_NO, KC_PGUP, KC_PGDN,KC_SPC,KC_ENT diff --git a/layouts/community/numpad_5x6/bjohnson/rules.mk b/layouts/community/numpad_5x6/bjohnson/rules.mk index d370da7f1..d85826165 100644 --- a/layouts/community/numpad_5x6/bjohnson/rules.mk +++ b/layouts/community/numpad_5x6/bjohnson/rules.mk @@ -2,4 +2,4 @@ AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = no NO_SECRETS = yes -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/layouts/community/numpad_5x6/drashna/config.h b/layouts/community/numpad_5x6/drashna/config.h index 1f485e193..aa0c20123 100644 --- a/layouts/community/numpad_5x6/drashna/config.h +++ b/layouts/community/numpad_5x6/drashna/config.h @@ -28,6 +28,8 @@ # define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 #endif // RGBLIGHT_ENABLE +#define RGBLIGHT_ALL_ANIMATIONS + #if defined(KEYBOARD_primekb_prime_m) # undef PRODUCT # define PRODUCT Drashna Hacked Prime_M Macro Pad diff --git a/layouts/community/numpad_5x6/drashna/rules.mk b/layouts/community/numpad_5x6/drashna/rules.mk index 0bdf97bae..f4854716b 100644 --- a/layouts/community/numpad_5x6/drashna/rules.mk +++ b/layouts/community/numpad_5x6/drashna/rules.mk @@ -2,8 +2,7 @@ AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = no NO_SECRETS = yes -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite INDICATOR_LIGHTS = no -RGBLIGHT_TWINKLE = yes MAKE_BOOTLOADER = yes RGBLIGHT_STARTUP_ANIMATION = yes diff --git a/layouts/community/ortho_4x12/brandonschlack/keymap.c b/layouts/community/ortho_4x12/brandonschlack/keymap.c index ea9d29506..4877a0b44 100644 --- a/layouts/community/ortho_4x12/brandonschlack/keymap.c +++ b/layouts/community/ortho_4x12/brandonschlack/keymap.c @@ -154,7 +154,7 @@ bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -183,6 +183,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_keymap(void) { diff --git a/layouts/community/ortho_4x12/brandonschlack/rules.mk b/layouts/community/ortho_4x12/brandonschlack/rules.mk index e36b073d2..d27ef6420 100644 --- a/layouts/community/ortho_4x12/brandonschlack/rules.mk +++ b/layouts/community/ortho_4x12/brandonschlack/rules.mk @@ -6,5 +6,5 @@ MOUSEKEY_ENABLE = yes # Mouse keys(+4700) BACKLIGHT_ENABLE = no # No backlights installed ifeq ($(strip $(KEYBOARD)), jnao) - BOOTMAGIC_ENABLE = lite + BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite endif diff --git a/layouts/community/ortho_4x12/buswerks/rules.mk b/layouts/community/ortho_4x12/buswerks/rules.mk index 72f825732..d08db7130 100644 --- a/layouts/community/ortho_4x12/buswerks/rules.mk +++ b/layouts/community/ortho_4x12/buswerks/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index f4abd64f5..d6197ece2 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -37,7 +37,7 @@ # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects // #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # undef RGB_MATRIX_LED_PROCESS_LIMIT # undef RGB_MATRIX_LED_FLUSH_LIMIT # ifdef KEYBOARD_planck_rev6 @@ -75,6 +75,7 @@ # define PRODUCT Drashna Hacked Planck Rev6 # elif defined(KEYBOARD_planck_ez) # define PRODUCT Drashna Hacked Planck EZ +# define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095 # endif #endif #undef NO_USB_STARTUP_CHECK diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 82594b9fd..cb3166c94 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -16,7 +16,6 @@ #include "drashna.h" - #ifdef BACKLIGHT_ENABLE enum planck_keycodes { BACKLIT = NEW_SAFE_RANGE, @@ -62,58 +61,32 @@ enum planck_keycodes { KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \ BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ) -#define LAYOUT_ortho_4x12_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), - [_QWERTY] = LAYOUT_ortho_4x12_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), - [_COLEMAK] = LAYOUT_ortho_4x12_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), - - [_DVORAK] = LAYOUT_ortho_4x12_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), - - [_WORKMAN] = LAYOUT_ortho_4x12_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_ortho_4x12_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_ortho_4x12_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_ortho_4x12_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_ortho_4x12_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), [_LOWER] = LAYOUT_ortho_4x12_wrapper( KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, @@ -137,6 +110,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_DEFAULT_LAYER_1] = { { KC_DOWN, KC_UP } }, + [_DEFAULT_LAYER_2] = { { _______, _______ } }, + [_DEFAULT_LAYER_3] = { { _______, _______ } }, + [_DEFAULT_LAYER_4] = { { _______, _______ } }, + [_GAMEPAD] = { { _______, _______ } }, + [_DIABLO] = { { _______, _______ } }, + [_MOUSE] = { { KC_WH_D, KC_WH_U } }, + [_MEDIA] = { { _______, _______ } }, + [_RAISE] = { { KC_VOLD, KC_VOLU } }, + [_LOWER] = { { RGB_MOD, RGB_RMOD} }, + [_ADJUST] = { { CK_DOWN, CK_UP } }, +}; +#endif // clang-format on bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { @@ -222,16 +211,16 @@ void suspend_wakeup_init_keymap(void) { } // clang-format on - void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { uint8_t this_mod = get_mods(); uint8_t this_led = host_keyboard_leds(); uint8_t this_osm = get_oneshot_mods(); - bool is_ez; # ifdef KEYBOARD_planck_ez - is_ez = true; +# define THUMB_LED 41 +# else +# define THUMB_LED 42 # endif - +# define RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(...) RGB_MATRIX_INDICATOR_SET_COLOR(__VA_ARGS__) # if defined(RGBLIGHT_ENABLE) if (!userspace_config.rgb_layer_change) # else @@ -254,50 +243,39 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { case _ADJUST: rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - default: { - switch (get_highest_layer(default_layer_state)) { - case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _WORKMAN: - rgb_matrix_layer_helper(HSV_GOLDENROD, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _NORMAN: - rgb_matrix_layer_helper(HSV_CORAL, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _MALTRON: - rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _EUCALYN: - rgb_matrix_layer_helper(HSV_PINK, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _CARPLAX: - rgb_matrix_layer_helper(HSV_BLUE, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; + default: + { + switch (get_highest_layer(default_layer_state)) { + case _DEFAULT_LAYER_1: + rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + break; + case _DEFAULT_LAYER_2: + rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + break; + case _DEFAULT_LAYER_3: + rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + break; + case _DEFAULT_LAYER_4: + rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + break; + } + break; } - break; - } } } switch (get_highest_layer(default_layer_state)) { - case _QWERTY: - RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0xFF); + case _DEFAULT_LAYER_1: + RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_1_RGB); break; - case _COLEMAK: - RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xFF, 0x00, 0xFF); + case _DEFAULT_LAYER_2: + RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_2_RGB); break; - case _DVORAK: - RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0x00); + case _DEFAULT_LAYER_3: + RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_3_RGB); break; - case _WORKMAN: - RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xD9, 0xA5, 0x21); + case _DEFAULT_LAYER_4: + RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(THUMB_LED, DEFAULT_LAYER_4_RGB); break; } @@ -368,7 +346,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif // ENCODER_ENABLE #ifdef KEYBOARD_planck_rev6 -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -391,6 +369,7 @@ void dip_update(uint8_t index, bool active) { userspace_config.nuke_switch = active; break; } + return true; } #endif // KEYBOARD_planck_rev6 diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk index 06a250ee7..775ad8e6e 100644 --- a/layouts/community/ortho_4x12/drashna/rules.mk +++ b/layouts/community/ortho_4x12/drashna/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) TAP_DANCE_ENABLE = no @@ -11,7 +11,6 @@ ifneq ($(strip $(KEYBOARD)), planck/rev6) ifeq ($(strip $(LAYOUT_HAS_RGB)), yes) RGBLIGHT_ENABLE = yes INDICATOR_LIGHTS = yes - RGBLIGHT_TWINKLE = yes RGBLIGHT_STARTUP_ANIMATION = yes endif else @@ -22,6 +21,7 @@ else RGB_MATRIX_ENABLE = no AUDIO_ENABLE = yes EEPROM_DRIVER = i2c + ENCODER_MAP_ENABLE = yes endif ifeq ($(strip $(KEYBOARD)), planck/light) RGB_MATRIX_ENABLE = yes @@ -31,13 +31,13 @@ ifeq ($(strip $(KEYBOARD)), planck/light) # HAPTIC_ENABLE += SOLENOID endif ifeq ($(strip $(KEYBOARD)), planck/ez) - RGBLIGHT_ENABLE = no - ENCODER_ENABLE = yes - RGB_MATRIX_ENABLE = yes + RGBLIGHT_ENABLE = no + ENCODER_ENABLE = yes + ENCODER_MAP_ENABLE = yes + RGB_MATRIX_ENABLE = yes INDICATOR_LIGHTS = yes - RGBLIGHT_TWINKLE = yes RGBLIGHT_STARTUP_ANIMATION = yes - CONSOLE_ENABLE = yes - COMMAND_ENABLE = yes - AUDIO_ENABLE = yes + CONSOLE_ENABLE = yes + COMMAND_ENABLE = yes + AUDIO_ENABLE = yes endif diff --git a/layouts/community/ortho_4x12/juno/keymap.c b/layouts/community/ortho_4x12/juno/keymap.c index b3ef8fce5..344759ed1 100644 --- a/layouts/community/ortho_4x12/juno/keymap.c +++ b/layouts/community/ortho_4x12/juno/keymap.c @@ -395,7 +395,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -420,6 +420,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/layouts/community/ortho_4x12/junonum/keymap.c b/layouts/community/ortho_4x12/junonum/keymap.c index 463ad600a..0b0bdc36b 100644 --- a/layouts/community/ortho_4x12/junonum/keymap.c +++ b/layouts/community/ortho_4x12/junonum/keymap.c @@ -293,7 +293,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_update(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: if (active) { @@ -318,6 +318,7 @@ void dip_update(uint8_t index, bool active) { #endif } } + return true; } void matrix_scan_user(void) { diff --git a/layouts/community/ortho_4x12/junonum/rules.mk b/layouts/community/ortho_4x12/junonum/rules.mk index 9f5d7e986..72e6214d2 100644 --- a/layouts/community/ortho_4x12/junonum/rules.mk +++ b/layouts/community/ortho_4x12/junonum/rules.mk @@ -17,4 +17,4 @@ EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -BOOTMAGIC_ENABLE = no # mainly to save space \ No newline at end of file +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite \ No newline at end of file diff --git a/layouts/community/ortho_4x12/mguterl/keymap.c b/layouts/community/ortho_4x12/mguterl/keymap.c index 66039b61e..f18ae14d4 100644 --- a/layouts/community/ortho_4x12/mguterl/keymap.c +++ b/layouts/community/ortho_4x12/mguterl/keymap.c @@ -290,7 +290,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -319,6 +319,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } void matrix_scan_user(void) { diff --git a/layouts/community/ortho_5x12/brandonschlack/keymap.c b/layouts/community/ortho_5x12/brandonschlack/keymap.c index c9c94fc96..1b423157b 100644 --- a/layouts/community/ortho_5x12/brandonschlack/keymap.c +++ b/layouts/community/ortho_5x12/brandonschlack/keymap.c @@ -149,7 +149,7 @@ bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; } -void dip_switch_update_user(uint8_t index, bool active) { +bool dip_switch_update_user(uint8_t index, bool active) { switch (index) { case 0: { #ifdef AUDIO_ENABLE @@ -178,6 +178,7 @@ void dip_switch_update_user(uint8_t index, bool active) { muse_mode = false; } } + return true; } diff --git a/layouts/community/ortho_5x12/brandonschlack/rules.mk b/layouts/community/ortho_5x12/brandonschlack/rules.mk index dacfc28b2..0035209d3 100644 --- a/layouts/community/ortho_5x12/brandonschlack/rules.mk +++ b/layouts/community/ortho_5x12/brandonschlack/rules.mk @@ -6,5 +6,5 @@ MOUSEKEY_ENABLE = yes # Mouse keys(+4700) BACKLIGHT_ENABLE = no # No backlights installed ifeq ($(strip $(KEYBOARD)), jnao) - BOOTMAGIC_ENABLE = lite + BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite endif diff --git a/layouts/community/ortho_5x12/drashna/keymap.c b/layouts/community/ortho_5x12/drashna/keymap.c index f882ead17..01b06d627 100644 --- a/layouts/community/ortho_5x12/drashna/keymap.c +++ b/layouts/community/ortho_5x12/drashna/keymap.c @@ -38,34 +38,32 @@ KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ) -#define LAYOUT_ortho_5x12_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), -[_QWERTY] = LAYOUT_ortho_5x12_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ -), + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), -[_COLEMAK] = LAYOUT_ortho_5x12_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ -), - -[_DVORAK] = LAYOUT_ortho_5x12_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ -), - -[_WORKMAN] = LAYOUT_ortho_5x12_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ -), + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), /* Lower * ,-----------------------------------------------------------------------------------. diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk index af68e04c0..69a025cc0 100644 --- a/layouts/community/ortho_5x12/drashna/rules.mk +++ b/layouts/community/ortho_5x12/drashna/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -12,7 +12,6 @@ ifeq ($(strip $(KEYBOARD)), fractal) AUDIO_SUPPORTED = yes RGBLIGHT_SUPPORTED = yes RGBLIGHT_ENABLE = yes - RGBLIGHT_TWINKLE = yes RGBLIGHT_STARTUP_ANIMATION = yes BOOTLOADER = qmk-dfu endif diff --git a/layouts/community/ortho_5x12/xyverz/rules.mk b/layouts/community/ortho_5x12/xyverz/rules.mk index c77748325..94b076ece 100644 --- a/layouts/community/ortho_5x12/xyverz/rules.mk +++ b/layouts/community/ortho_5x12/xyverz/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/layouts/community/split_3x6_3/drashna/config.h b/layouts/community/split_3x6_3/drashna/config.h index dd950ce7b..b86448c67 100644 --- a/layouts/community/split_3x6_3/drashna/config.h +++ b/layouts/community/split_3x6_3/drashna/config.h @@ -31,11 +31,11 @@ #ifdef RGBLIGHT_ENABLE # undef RGBLED_NUM -# define RGBLED_NUM 27 +# define RGBLED_NUM 27 -# define RGBLIGHT_HUE_STEP 8 -# define RGBLIGHT_SAT_STEP 8 -# define RGBLIGHT_VAL_STEP 5 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 5 # define RGBLIGHT_LIMIT_VAL 120 #endif @@ -44,37 +44,38 @@ # undef RGB_DI_PIN # define RGB_DI_PIN A3 # endif -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended +# define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -# define RGB_MATRIX_HUE_STEP 8 -# define RGB_MATRIX_SAT_STEP 8 -# define RGB_MATRIX_VAL_STEP 5 -# define RGB_MATRIX_SPD_STEP 10 +# ifndef RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# endif +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 5 +# define RGB_MATRIX_SPD_STEP 10 #endif #ifdef CONVERT_TO_PROTON_C -# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 -# define WS2812_PWM_CHANNEL 4 // default: 2 -# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 -# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. -# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 +# define WS2812_PWM_CHANNEL 4 // default: 2 +# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 +# define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU. +# define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU. # undef SOFT_SERIAL_PIN -# define SOFT_SERIAL_PIN D3 -# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 -# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 +# define SOFT_SERIAL_PIN D3 +# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 +# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 // #define INIT_EE_HANDS_LEFT // #define INIT_EE_HANDS_RIGHT #endif - #if defined(AUDIO_ENABLE) && !defined(CONVERT_TO_PROTON_C) # define AUDIO_PIN B6 # define NO_MUSIC_MODE diff --git a/layouts/community/split_3x6_3/drashna/keymap.c b/layouts/community/split_3x6_3/drashna/keymap.c index 5a2d2f2e2..707dd3646 100644 --- a/layouts/community/split_3x6_3/drashna/keymap.c +++ b/layouts/community/split_3x6_3/drashna/keymap.c @@ -26,6 +26,12 @@ enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE }; * of use. K## is a placeholder to pass through the individual keycodes */ +#ifdef CONVERT_TO_PROTON_C +# define MID_TMB ET_RAIS +#else +# define MID_TMB KC_ENT +#endif + // clang-format off #define LAYOUT_split_3x6_3_wrapper(...) LAYOUT_split_3x6_3(__VA_ARGS__) #define LAYOUT_split_3x6_3_base( \ @@ -37,58 +43,34 @@ enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE }; KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ ALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - RGB_MOD, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \ + OS_LGUI, KC_SPC, BK_LWER, DL_RAIS, MID_TMB, OS_RGUI \ ) -#define LAYOUT_split_3x6_3_base_wrapper(...) LAYOUT_split_3x6_3_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_split_3x6_3_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_split_3x6_3_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), - [_COLEMAK] = LAYOUT_split_3x6_3_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), - [_DVORAK] = LAYOUT_split_3x6_3_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), - [_WORKMAN] = LAYOUT_split_3x6_3_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_split_3x6_3_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_split_3x6_3_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_split_3x6_3_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_split_3x6_3_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), [_LOWER] = LAYOUT_split_3x6_3_wrapper( KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, @@ -113,10 +95,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // clang-format on -#ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_270; -} +#ifdef OLED_ENABLE +oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return OLED_ROTATION_270; } #endif #ifdef TAPPING_TERM_PER_KEY @@ -130,13 +110,6 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { } #endif - -void matrix_slave_scan_user(void) { -#ifdef RGB_MATRIX_ENABLE - rgb_matrix_task(); -#endif -} - #ifdef RGB_MATRIX_ENABLE void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } @@ -145,28 +118,16 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } void check_default_layer(uint8_t mode, uint8_t type, uint8_t led_min, uint8_t led_max) { switch (get_highest_layer(default_layer_state)) { case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type, led_min, led_max); + rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max); + break; + case _COLEMAK_DH: + rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max); break; case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type, led_min, led_max); + rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max); break; case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type, led_min, led_max); - break; - case _WORKMAN: - rgb_matrix_layer_helper(HSV_GOLDENROD, mode, rgb_matrix_config.speed, type, led_min, led_max); - break; - case _NORMAN: - rgb_matrix_layer_helper(HSV_CORAL, mode, rgb_matrix_config.speed, type, led_min, led_max); - break; - case _MALTRON: - rgb_matrix_layer_helper(HSV_YELLOW, mode, rgb_matrix_config.speed, type, led_min, led_max); - break; - case _EUCALYN: - rgb_matrix_layer_helper(HSV_PINK, mode, rgb_matrix_config.speed, type, led_min, led_max); - break; - case _CARPLAX: - rgb_matrix_layer_helper(HSV_BLUE, mode, rgb_matrix_config.speed, type, led_min, led_max); + rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max); break; } } @@ -189,10 +150,11 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { case _ADJUST: rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW, led_min, led_max); break; - default: { - check_default_layer(0, LED_FLAG_UNDERGLOW, led_min, led_max); - break; - } + default: + { + check_default_layer(0, LED_FLAG_UNDERGLOW, led_min, led_max); + break; + } } check_default_layer(0, LED_FLAG_MODIFIER, led_min, led_max); } diff --git a/layouts/community/split_3x6_3/drashna/rules.mk b/layouts/community/split_3x6_3/drashna/rules.mk index cbb0b1c11..3a8a771ee 100644 --- a/layouts/community/split_3x6_3/drashna/rules.mk +++ b/layouts/community/split_3x6_3/drashna/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -20,7 +20,7 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifeq ($(strip $(KEYBOARD)), crkbd/rev1) - OLED_DRIVER_ENABLE = yes + OLED_ENABLE = yes RGB_MATRIX_ENABLE = yes HAPTIC_ENABLE = no BOOTLOADER = qmk-dfu @@ -31,4 +31,5 @@ ifeq ($(strip $(CTPC)), yes) WS2812_DRIVER = pwm # won't work without a patch to the ctpc mk file SERIAL_DRIVER = usart SWAP_HANDS_ENABLE = yes + WPM_ENABLE = yes endif diff --git a/layouts/default/60_abnt2/default_60_abnt2/keymap.c b/layouts/default/60_abnt2/default_60_abnt2/keymap.c index 919a972f6..00b9a8de2 100644 --- a/layouts/default/60_abnt2/default_60_abnt2/keymap.c +++ b/layouts/default/60_abnt2/default_60_abnt2/keymap.c @@ -19,7 +19,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_abnt2( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, BR_ACUT, BR_LBRC, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCDL, BR_TILD, BR_RBRC, KC_ENT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, BR_CCED, BR_TILD, BR_RBRC, KC_ENT, KC_LSFT, BR_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, BR_SCLN, BR_SLSH, KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL ), diff --git a/lib/chibios b/lib/chibios index ffe54d63c..413e39c56 160000 --- a/lib/chibios +++ b/lib/chibios @@ -1 +1 @@ -Subproject commit ffe54d63cb10a355add318f8e922e39f1c3d4bfd +Subproject commit 413e39c5681d181720440f2a8b7391f581788d7b diff --git a/lib/chibios-contrib b/lib/chibios-contrib index 61baa6b03..4568901a9 160000 --- a/lib/chibios-contrib +++ b/lib/chibios-contrib @@ -1 +1 @@ -Subproject commit 61baa6b036138c155f7cfc5646d833d9423f3243 +Subproject commit 4568901a91e9bef78ea96a7a83e8150fe1f7353a diff --git a/lib/googletest b/lib/googletest index ec44c6c16..e2239ee60 160000 --- a/lib/googletest +++ b/lib/googletest @@ -1 +1 @@ -Subproject commit ec44c6c1675c25b9827aacd08c02433cccde7780 +Subproject commit e2239ee6043f73722e7aa812a459f54a28552929 diff --git a/lib/lufa b/lib/lufa index ce10f7642..19a5d533f 160000 --- a/lib/lufa +++ b/lib/lufa @@ -1 +1 @@ -Subproject commit ce10f7642b0459e409839b23cc91498945119b4d +Subproject commit 19a5d533f02a7b46eeadca99cc9699659cef7a60 diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index de71a5d1e..b22f1c0d2 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -40,7 +40,10 @@ subcommands = [ 'qmk.cli.doctor', 'qmk.cli.fileformat', 'qmk.cli.flash', + 'qmk.cli.format.c', 'qmk.cli.format.json', + 'qmk.cli.format.python', + 'qmk.cli.format.text', 'qmk.cli.generate.api', 'qmk.cli.generate.config_h', 'qmk.cli.generate.dfu_header', @@ -50,6 +53,7 @@ subcommands = [ 'qmk.cli.generate.layouts', 'qmk.cli.generate.rgb_breathe_table', 'qmk.cli.generate.rules_mk', + 'qmk.cli.generate.version_h', 'qmk.cli.hello', 'qmk.cli.info', 'qmk.cli.json2c', diff --git a/lib/python/qmk/cli/cformat.py b/lib/python/qmk/cli/cformat.py old mode 100644 new mode 100755 index efeb45967..9d0ecaeba --- a/lib/python/qmk/cli/cformat.py +++ b/lib/python/qmk/cli/cformat.py @@ -1,137 +1,28 @@ -"""Format C code according to QMK's style. +"""Point people to the new command name. """ -from os import path -from shutil import which -from subprocess import CalledProcessError, DEVNULL, Popen, PIPE +import sys +from pathlib import Path -from argcomplete.completers import FilesCompleter from milc import cli -from qmk.path import normpath -from qmk.c_parse import c_source_files - -c_file_suffixes = ('c', 'h', 'cpp') -core_dirs = ('drivers', 'quantum', 'tests', 'tmk_core', 'platforms') -ignored = ('tmk_core/protocol/usb_hid', 'quantum/template', 'platforms/chibios') - - -def find_clang_format(): - """Returns the path to clang-format. - """ - for clang_version in range(20, 6, -1): - binary = f'clang-format-{clang_version}' - - if which(binary): - return binary - - return 'clang-format' - - -def find_diffs(files): - """Run clang-format and diff it against a file. - """ - found_diffs = False - - for file in files: - cli.log.debug('Checking for changes in %s', file) - clang_format = Popen([find_clang_format(), file], stdout=PIPE, stderr=PIPE, universal_newlines=True) - diff = cli.run(['diff', '-u', f'--label=a/{file}', f'--label=b/{file}', str(file), '-'], stdin=clang_format.stdout, capture_output=True) - - if diff.returncode != 0: - print(diff.stdout) - found_diffs = True - - return found_diffs - - -def cformat_run(files): - """Spawn clang-format subprocess with proper arguments - """ - # Determine which version of clang-format to use - clang_format = [find_clang_format(), '-i'] - - try: - cli.run([*clang_format, *map(str, files)], check=True, capture_output=False, stdin=DEVNULL) - cli.log.info('Successfully formatted the C code.') - return True - - except CalledProcessError as e: - cli.log.error('Error formatting C code!') - cli.log.debug('%s exited with returncode %s', e.cmd, e.returncode) - cli.log.debug('STDOUT:') - cli.log.debug(e.stdout) - cli.log.debug('STDERR:') - cli.log.debug(e.stderr) - return False - - -def filter_files(files, core_only=False): - """Yield only files to be formatted and skip the rest - """ - if core_only: - # Filter non-core files - for index, file in enumerate(files): - # The following statement checks each file to see if the file path is - # - in the core directories - # - not in the ignored directories - if not any(i in str(file) for i in core_dirs) or any(i in str(file) for i in ignored): - files[index] = None - cli.log.debug("Skipping non-core file %s, as '--core-only' is used.", file) - - for file in files: - if file and file.name.split('.')[-1] in c_file_suffixes: - yield file - else: - cli.log.debug('Skipping file %s', file) - @cli.argument('-n', '--dry-run', arg_only=True, action='store_true', help="Flag only, don't automatically format.") @cli.argument('-b', '--base-branch', default='origin/master', help='Branch to compare to diffs to.') @cli.argument('-a', '--all-files', arg_only=True, action='store_true', help='Format all core files.') @cli.argument('--core-only', arg_only=True, action='store_true', help='Format core files only.') -@cli.argument('files', nargs='*', arg_only=True, type=normpath, completer=FilesCompleter('.c'), help='Filename(s) to format.') -@cli.subcommand("Format C code according to QMK's style.", hidden=False if cli.config.user.developer else True) +@cli.argument('files', nargs='*', arg_only=True, help='Filename(s) to format.') +@cli.subcommand('Pointer to the new command name: qmk format-c.', hidden=True) def cformat(cli): - """Format C code according to QMK's style. + """Pointer to the new command name: qmk format-c. """ - # Find the list of files to format - if cli.args.files: - files = list(filter_files(cli.args.files, cli.args.core_only)) + cli.log.warning('"qmk cformat" has been renamed to "qmk format-c". Please use the new command in the future.') + argv = [sys.executable, *sys.argv] + argv[argv.index('cformat')] = 'format-c' + script_path = Path(argv[1]) + script_path_exe = Path(f'{argv[1]}.exe') - if not files: - cli.log.error('No C files in filelist: %s', ', '.join(map(str, cli.args.files))) - exit(0) + if not script_path.exists() and script_path_exe.exists(): + # For reasons I don't understand ".exe" is stripped from the script name on windows. + argv[1] = str(script_path_exe) - if cli.args.all_files: - cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(map(str, files))) - - elif cli.args.all_files: - all_files = c_source_files(core_dirs) - files = list(filter_files(all_files, True)) - - else: - git_diff_cmd = ['git', 'diff', '--name-only', cli.args.base_branch, *core_dirs] - git_diff = cli.run(git_diff_cmd, stdin=DEVNULL) - - if git_diff.returncode != 0: - cli.log.error("Error running %s", git_diff_cmd) - print(git_diff.stderr) - return git_diff.returncode - - files = [] - - for file in git_diff.stdout.strip().split('\n'): - if not any([file.startswith(ignore) for ignore in ignored]): - if path.exists(file) and file.split('.')[-1] in c_file_suffixes: - files.append(file) - - # Sanity check - if not files: - cli.log.error('No changed files detected. Use "qmk cformat -a" to format all core files') - return False - - # Run clang-format on the files we've found - if cli.args.dry_run: - return not find_diffs(files) - else: - return cformat_run(files) + return cli.run(argv, capture_output=False).returncode diff --git a/lib/python/qmk/cli/compile.py b/lib/python/qmk/cli/compile.py index 7a45e7721..acbd77864 100755 --- a/lib/python/qmk/cli/compile.py +++ b/lib/python/qmk/cli/compile.py @@ -18,7 +18,7 @@ from qmk.keymap import keymap_completer @cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='The keyboard to build a firmware for. Ignored when a configurator export is supplied.') @cli.argument('-km', '--keymap', completer=keymap_completer, help='The keymap to build a firmware for. Ignored when a configurator export is supplied.') @cli.argument('-n', '--dry-run', arg_only=True, action='store_true', help="Don't actually build, just show the make command to be run.") -@cli.argument('-j', '--parallel', type=int, default=1, help="Set the number of parallel make jobs to run.") +@cli.argument('-j', '--parallel', type=int, default=1, help="Set the number of parallel make jobs; 0 means unlimited.") @cli.argument('-e', '--env', arg_only=True, action='append', default=[], help="Set a variable to be passed to make. May be passed multiple times.") @cli.argument('-c', '--clean', arg_only=True, action='store_true', help="Remove object files before compiling.") @cli.subcommand('Compile a QMK Firmware.') diff --git a/lib/python/qmk/cli/console.py b/lib/python/qmk/cli/console.py index 45ff0c8be..3c508160e 100644 --- a/lib/python/qmk/cli/console.py +++ b/lib/python/qmk/cli/console.py @@ -48,10 +48,11 @@ KNOWN_BOOTLOADERS = { ('239A', '000C'): 'caterina: Adafruit Feather 32U4', ('239A', '000D'): 'caterina: Adafruit ItsyBitsy 32U4 3v', ('239A', '000E'): 'caterina: Adafruit ItsyBitsy 32U4 5v', - ('239A', '000E'): 'caterina: Adafruit ItsyBitsy 32U4 5v', ('2A03', '0036'): 'caterina: Arduino Leonardo', ('2A03', '0037'): 'caterina: Arduino Micro', - ('314B', '0106'): 'apm32-dfu: APM32 DFU ISP Mode' + ('314B', '0106'): 'apm32-dfu: APM32 DFU ISP Mode', + ('03EB', '2067'): 'qmk-hid: HID Bootloader', + ('03EB', '2045'): 'lufa-ms: LUFA Mass Storage Bootloader' } diff --git a/lib/python/qmk/cli/doctor.py b/lib/python/qmk/cli/doctor.py deleted file mode 100755 index 327bc9cb3..000000000 --- a/lib/python/qmk/cli/doctor.py +++ /dev/null @@ -1,137 +0,0 @@ -"""QMK Doctor - -Check out the user's QMK environment and make sure it's ready to compile. -""" -import platform -from subprocess import DEVNULL - -from milc import cli -from milc.questions import yesno -from qmk import submodules -from qmk.constants import QMK_FIRMWARE -from qmk.os_helpers import CheckStatus, check_binaries, check_binary_versions, check_submodules, check_git_repo - - -def os_tests(): - """Determine our OS and run platform specific tests - """ - platform_id = platform.platform().lower() - - if 'darwin' in platform_id or 'macos' in platform_id: - return os_test_macos() - elif 'linux' in platform_id: - return os_test_linux() - elif 'windows' in platform_id: - return os_test_windows() - else: - cli.log.warning('Unsupported OS detected: %s', platform_id) - return CheckStatus.WARNING - - -def os_test_linux(): - """Run the Linux specific tests. - """ - # Don't bother with udev on WSL, for now - if 'microsoft' in platform.uname().release.lower(): - cli.log.info("Detected {fg_cyan}Linux (WSL){fg_reset}.") - - # https://github.com/microsoft/WSL/issues/4197 - if QMK_FIRMWARE.as_posix().startswith("/mnt"): - cli.log.warning("I/O performance on /mnt may be extremely slow.") - return CheckStatus.WARNING - - return CheckStatus.OK - else: - cli.log.info("Detected {fg_cyan}Linux{fg_reset}.") - from qmk.os_helpers.linux import check_udev_rules - - return check_udev_rules() - - -def os_test_macos(): - """Run the Mac specific tests. - """ - cli.log.info("Detected {fg_cyan}macOS %s{fg_reset}.", platform.mac_ver()[0]) - - return CheckStatus.OK - - -def os_test_windows(): - """Run the Windows specific tests. - """ - win32_ver = platform.win32_ver() - cli.log.info("Detected {fg_cyan}Windows %s (%s){fg_reset}.", win32_ver[0], win32_ver[1]) - - return CheckStatus.OK - - -@cli.argument('-y', '--yes', action='store_true', arg_only=True, help='Answer yes to all questions.') -@cli.argument('-n', '--no', action='store_true', arg_only=True, help='Answer no to all questions.') -@cli.subcommand('Basic QMK environment checks') -def doctor(cli): - """Basic QMK environment checks. - - This is currently very simple, it just checks that all the expected binaries are on your system. - - TODO(unclaimed): - * [ ] Compile a trivial program with each compiler - """ - cli.log.info('QMK Doctor is checking your environment.') - cli.log.info('CLI version: %s', cli.version) - cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE) - - status = os_tests() - - # Make sure our QMK home is a Git repo - git_ok = check_git_repo() - - if git_ok == CheckStatus.WARNING: - cli.log.warning("QMK home does not appear to be a Git repository! (no .git folder)") - status = CheckStatus.WARNING - - # Make sure the basic CLI tools we need are available and can be executed. - bin_ok = check_binaries() - - if not bin_ok: - if yesno('Would you like to install dependencies?', default=True): - cli.run(['util/qmk_install.sh', '-y'], stdin=DEVNULL, capture_output=False) - bin_ok = check_binaries() - - if bin_ok: - cli.log.info('All dependencies are installed.') - else: - status = CheckStatus.ERROR - - # Make sure the tools are at the correct version - ver_ok = check_binary_versions() - if CheckStatus.ERROR in ver_ok: - status = CheckStatus.ERROR - elif CheckStatus.WARNING in ver_ok and status == CheckStatus.OK: - status = CheckStatus.WARNING - - # Check out the QMK submodules - sub_ok = check_submodules() - - if sub_ok == CheckStatus.OK: - cli.log.info('Submodules are up to date.') - else: - if yesno('Would you like to clone the submodules?', default=True): - submodules.update() - sub_ok = check_submodules() - - if sub_ok == CheckStatus.ERROR: - status = CheckStatus.ERROR - elif sub_ok == CheckStatus.WARNING and status == CheckStatus.OK: - status = CheckStatus.WARNING - - # Report a summary of our findings to the user - if status == CheckStatus.OK: - cli.log.info('{fg_green}QMK is ready to go') - return 0 - elif status == CheckStatus.WARNING: - cli.log.info('{fg_yellow}QMK is ready to go, but minor problems were found') - return 1 - else: - cli.log.info('{fg_red}Major problems detected, please fix these problems before proceeding.') - cli.log.info('{fg_blue}Check out the FAQ (https://docs.qmk.fm/#/faq_build) or join the QMK Discord (https://discord.gg/Uq7gcHh) for help.') - return 2 diff --git a/lib/python/qmk/cli/doctor/__init__.py b/lib/python/qmk/cli/doctor/__init__.py new file mode 100755 index 000000000..272e04202 --- /dev/null +++ b/lib/python/qmk/cli/doctor/__init__.py @@ -0,0 +1,5 @@ +"""QMK Doctor + +Check out the user's QMK environment and make sure it's ready to compile. +""" +from .main import doctor diff --git a/lib/python/qmk/cli/doctor/check.py b/lib/python/qmk/cli/doctor/check.py new file mode 100644 index 000000000..0807f4151 --- /dev/null +++ b/lib/python/qmk/cli/doctor/check.py @@ -0,0 +1,164 @@ +"""Check for specific programs. +""" +from enum import Enum +import re +import shutil +from subprocess import DEVNULL + +from milc import cli +from qmk import submodules +from qmk.constants import QMK_FIRMWARE + + +class CheckStatus(Enum): + OK = 1 + WARNING = 2 + ERROR = 3 + + +ESSENTIAL_BINARIES = { + 'dfu-programmer': {}, + 'avrdude': {}, + 'dfu-util': {}, + 'avr-gcc': { + 'version_arg': '-dumpversion' + }, + 'arm-none-eabi-gcc': { + 'version_arg': '-dumpversion' + }, + 'bin/qmk': {}, +} + + +def _parse_gcc_version(version): + m = re.match(r"(\d+)(?:\.(\d+))?(?:\.(\d+))?", version) + + return { + 'major': int(m.group(1)), + 'minor': int(m.group(2)) if m.group(2) else 0, + 'patch': int(m.group(3)) if m.group(3) else 0, + } + + +def _check_arm_gcc_version(): + """Returns True if the arm-none-eabi-gcc version is not known to cause problems. + """ + if 'output' in ESSENTIAL_BINARIES['arm-none-eabi-gcc']: + version_number = ESSENTIAL_BINARIES['arm-none-eabi-gcc']['output'].strip() + cli.log.info('Found arm-none-eabi-gcc version %s', version_number) + + return CheckStatus.OK # Right now all known arm versions are ok + + +def _check_avr_gcc_version(): + """Returns True if the avr-gcc version is not known to cause problems. + """ + rc = CheckStatus.ERROR + if 'output' in ESSENTIAL_BINARIES['avr-gcc']: + version_number = ESSENTIAL_BINARIES['avr-gcc']['output'].strip() + + cli.log.info('Found avr-gcc version %s', version_number) + rc = CheckStatus.OK + + parsed_version = _parse_gcc_version(version_number) + if parsed_version['major'] > 8: + cli.log.warning('{fg_yellow}We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.') + rc = CheckStatus.WARNING + + return rc + + +def _check_avrdude_version(): + if 'output' in ESSENTIAL_BINARIES['avrdude']: + last_line = ESSENTIAL_BINARIES['avrdude']['output'].split('\n')[-2] + version_number = last_line.split()[2][:-1] + cli.log.info('Found avrdude version %s', version_number) + + return CheckStatus.OK + + +def _check_dfu_util_version(): + if 'output' in ESSENTIAL_BINARIES['dfu-util']: + first_line = ESSENTIAL_BINARIES['dfu-util']['output'].split('\n')[0] + version_number = first_line.split()[1] + cli.log.info('Found dfu-util version %s', version_number) + + return CheckStatus.OK + + +def _check_dfu_programmer_version(): + if 'output' in ESSENTIAL_BINARIES['dfu-programmer']: + first_line = ESSENTIAL_BINARIES['dfu-programmer']['output'].split('\n')[0] + version_number = first_line.split()[1] + cli.log.info('Found dfu-programmer version %s', version_number) + + return CheckStatus.OK + + +def check_binaries(): + """Iterates through ESSENTIAL_BINARIES and tests them. + """ + ok = True + + for binary in sorted(ESSENTIAL_BINARIES): + if not is_executable(binary): + ok = False + + return ok + + +def check_binary_versions(): + """Check the versions of ESSENTIAL_BINARIES + """ + versions = [] + for check in (_check_arm_gcc_version, _check_avr_gcc_version, _check_avrdude_version, _check_dfu_util_version, _check_dfu_programmer_version): + versions.append(check()) + return versions + + +def check_submodules(): + """Iterates through all submodules to make sure they're cloned and up to date. + """ + for submodule in submodules.status().values(): + if submodule['status'] is None: + cli.log.error('Submodule %s has not yet been cloned!', submodule['name']) + return CheckStatus.ERROR + elif not submodule['status']: + cli.log.warning('Submodule %s is not up to date!', submodule['name']) + return CheckStatus.WARNING + + return CheckStatus.OK + + +def is_executable(command): + """Returns True if command exists and can be executed. + """ + # Make sure the command is in the path. + res = shutil.which(command) + if res is None: + cli.log.error("{fg_red}Can't find %s in your path.", command) + return False + + # Make sure the command can be executed + version_arg = ESSENTIAL_BINARIES[command].get('version_arg', '--version') + check = cli.run([command, version_arg], combined_output=True, stdin=DEVNULL, timeout=5) + + ESSENTIAL_BINARIES[command]['output'] = check.stdout + + if check.returncode in [0, 1]: # Older versions of dfu-programmer exit 1 + cli.log.debug('Found {fg_cyan}%s', command) + return True + + cli.log.error("{fg_red}Can't run `%s %s`", command, version_arg) + return False + + +def check_git_repo(): + """Checks that the .git directory exists inside QMK_HOME. + + This is a decent enough indicator that the qmk_firmware directory is a + proper Git repository, rather than a .zip download from GitHub. + """ + dot_git = QMK_FIRMWARE / '.git' + + return CheckStatus.OK if dot_git.exists() else CheckStatus.WARNING diff --git a/lib/python/qmk/cli/doctor/linux.py b/lib/python/qmk/cli/doctor/linux.py new file mode 100644 index 000000000..6ce00f6ef --- /dev/null +++ b/lib/python/qmk/cli/doctor/linux.py @@ -0,0 +1,172 @@ +"""OS-specific functions for: Linux +""" +import platform +import shutil +from pathlib import Path + +from milc import cli + +from qmk.constants import QMK_FIRMWARE +from .check import CheckStatus + + +def _udev_rule(vid, pid=None, *args): + """ Helper function that return udev rules + """ + rule = "" + if pid: + rule = 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", ATTRS{idProduct}=="%s", TAG+="uaccess"' % ( + vid, + pid, + ) + else: + rule = 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", TAG+="uaccess"' % vid + if args: + rule = ', '.join([rule, *args]) + return rule + + +def _deprecated_udev_rule(vid, pid=None): + """ Helper function that return udev rules + + Note: these are no longer the recommended rules, this is just used to check for them + """ + if pid: + return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", ATTRS{idProduct}=="%s", MODE:="0666"' % (vid, pid) + else: + return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid + + +def check_udev_rules(): + """Make sure the udev rules look good. + """ + rc = CheckStatus.OK + udev_dirs = [ + Path("/usr/lib/udev/rules.d/"), + Path("/usr/local/lib/udev/rules.d/"), + Path("/run/udev/rules.d/"), + Path("/etc/udev/rules.d/"), + ] + desired_rules = { + 'atmel-dfu': { + _udev_rule("03eb", "2fef"), # ATmega16U2 + _udev_rule("03eb", "2ff0"), # ATmega32U2 + _udev_rule("03eb", "2ff3"), # ATmega16U4 + _udev_rule("03eb", "2ff4"), # ATmega32U4 + _udev_rule("03eb", "2ff9"), # AT90USB64 + _udev_rule("03eb", "2ffa"), # AT90USB162 + _udev_rule("03eb", "2ffb") # AT90USB128 + }, + 'kiibohd': {_udev_rule("1c11", "b007")}, + 'stm32': { + _udev_rule("1eaf", "0003"), # STM32duino + _udev_rule("0483", "df11") # STM32 DFU + }, + 'bootloadhid': {_udev_rule("16c0", "05df")}, + 'usbasploader': {_udev_rule("16c0", "05dc")}, + 'massdrop': {_udev_rule("03eb", "6124", 'ENV{ID_MM_DEVICE_IGNORE}="1"')}, + 'caterina': { + # Spark Fun Electronics + _udev_rule("1b4f", "9203", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 3V3/8MHz + _udev_rule("1b4f", "9205", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 5V/16MHz + _udev_rule("1b4f", "9207", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # LilyPad 3V3/8MHz (and some Pro Micro clones) + # Pololu Electronics + _udev_rule("1ffb", "0101", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # A-Star 32U4 + # Arduino SA + _udev_rule("2341", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo + _udev_rule("2341", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Micro + # Adafruit Industries LLC + _udev_rule("239a", "000c", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Feather 32U4 + _udev_rule("239a", "000d", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 3V3/8MHz + _udev_rule("239a", "000e", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 5V/16MHz + # dog hunter AG + _udev_rule("2a03", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo + _udev_rule("2a03", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"') # Micro + }, + 'hid-bootloader': { + _udev_rule("03eb", "2067"), # QMK HID + _udev_rule("16c0", "0478") # PJRC halfkay + } + } + + # These rules are no longer recommended, only use them to check for their presence. + deprecated_rules = { + 'atmel-dfu': {_deprecated_udev_rule("03eb", "2ff4"), _deprecated_udev_rule("03eb", "2ffb"), _deprecated_udev_rule("03eb", "2ff0")}, + 'kiibohd': {_deprecated_udev_rule("1c11")}, + 'stm32': {_deprecated_udev_rule("1eaf", "0003"), _deprecated_udev_rule("0483", "df11")}, + 'bootloadhid': {_deprecated_udev_rule("16c0", "05df")}, + 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'}, + 'tmk': {_deprecated_udev_rule("feed")} + } + + if any(udev_dir.exists() for udev_dir in udev_dirs): + udev_rules = [rule_file for udev_dir in udev_dirs for rule_file in udev_dir.glob('*.rules')] + current_rules = set() + + # Collect all rules from the config files + for rule_file in udev_rules: + for line in rule_file.read_text(encoding='utf-8').split('\n'): + line = line.strip() + if not line.startswith("#") and len(line): + current_rules.add(line) + + # Check if the desired rules are among the currently present rules + for bootloader, rules in desired_rules.items(): + if not rules.issubset(current_rules): + deprecated_rule = deprecated_rules.get(bootloader) + if deprecated_rule and deprecated_rule.issubset(current_rules): + cli.log.warning("{fg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader) + else: + # For caterina, check if ModemManager is running + if bootloader == "caterina": + if check_modem_manager(): + rc = CheckStatus.WARNING + cli.log.warning("{fg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") + rc = CheckStatus.WARNING + cli.log.warning("{fg_yellow}Missing or outdated udev rules for '%s' boards. Run 'sudo cp %s/util/udev/50-qmk.rules /etc/udev/rules.d/'.", bootloader, QMK_FIRMWARE) + + else: + cli.log.warning("{fg_yellow}Can't find udev rules, skipping udev rule checking...") + cli.log.debug("Checked directories: %s", ', '.join(str(udev_dir) for udev_dir in udev_dirs)) + + return rc + + +def check_systemd(): + """Check if it's a systemd system + """ + return bool(shutil.which("systemctl")) + + +def check_modem_manager(): + """Returns True if ModemManager is running. + + """ + if check_systemd(): + mm_check = cli.run(["systemctl", "--quiet", "is-active", "ModemManager.service"], timeout=10) + if mm_check.returncode == 0: + return True + else: + """(TODO): Add check for non-systemd systems + """ + return False + + +def os_test_linux(): + """Run the Linux specific tests. + """ + # Don't bother with udev on WSL, for now + if 'microsoft' in platform.uname().release.lower(): + cli.log.info("Detected {fg_cyan}Linux (WSL){fg_reset}.") + + # https://github.com/microsoft/WSL/issues/4197 + if QMK_FIRMWARE.as_posix().startswith("/mnt"): + cli.log.warning("I/O performance on /mnt may be extremely slow.") + return CheckStatus.WARNING + + return CheckStatus.OK + else: + cli.log.info("Detected {fg_cyan}Linux{fg_reset}.") + from .linux import check_udev_rules + + return check_udev_rules() diff --git a/lib/python/qmk/cli/doctor/macos.py b/lib/python/qmk/cli/doctor/macos.py new file mode 100644 index 000000000..00fb27285 --- /dev/null +++ b/lib/python/qmk/cli/doctor/macos.py @@ -0,0 +1,13 @@ +import platform + +from milc import cli + +from .check import CheckStatus + + +def os_test_macos(): + """Run the Mac specific tests. + """ + cli.log.info("Detected {fg_cyan}macOS %s{fg_reset}.", platform.mac_ver()[0]) + + return CheckStatus.OK diff --git a/lib/python/qmk/cli/doctor/main.py b/lib/python/qmk/cli/doctor/main.py new file mode 100755 index 000000000..6a31ccdfd --- /dev/null +++ b/lib/python/qmk/cli/doctor/main.py @@ -0,0 +1,135 @@ +"""QMK Doctor + +Check out the user's QMK environment and make sure it's ready to compile. +""" +import platform +from subprocess import DEVNULL + +from milc import cli +from milc.questions import yesno + +from qmk import submodules +from qmk.constants import QMK_FIRMWARE, QMK_FIRMWARE_UPSTREAM +from .check import CheckStatus, check_binaries, check_binary_versions, check_submodules +from qmk.commands import git_check_repo, git_get_branch, git_is_dirty, git_get_remotes, git_check_deviation, in_virtualenv + + +def os_tests(): + """Determine our OS and run platform specific tests + """ + platform_id = platform.platform().lower() + + if 'darwin' in platform_id or 'macos' in platform_id: + from .macos import os_test_macos + return os_test_macos() + elif 'linux' in platform_id: + from .linux import os_test_linux + return os_test_linux() + elif 'windows' in platform_id: + from .windows import os_test_windows + return os_test_windows() + else: + cli.log.warning('Unsupported OS detected: %s', platform_id) + return CheckStatus.WARNING + + +def git_tests(): + """Run Git-related checks + """ + status = CheckStatus.OK + + # Make sure our QMK home is a Git repo + git_ok = git_check_repo() + if not git_ok: + cli.log.warning("{fg_yellow}QMK home does not appear to be a Git repository! (no .git folder)") + status = CheckStatus.WARNING + else: + git_branch = git_get_branch() + if git_branch: + cli.log.info('Git branch: %s', git_branch) + git_dirty = git_is_dirty() + if git_dirty: + cli.log.warning('{fg_yellow}Git has unstashed/uncommitted changes.') + status = CheckStatus.WARNING + git_remotes = git_get_remotes() + if 'upstream' not in git_remotes.keys() or QMK_FIRMWARE_UPSTREAM not in git_remotes['upstream'].get('url', ''): + cli.log.warning('{fg_yellow}The official repository does not seem to be configured as git remote "upstream".') + status = CheckStatus.WARNING + else: + git_deviation = git_check_deviation(git_branch) + if git_branch in ['master', 'develop'] and git_deviation: + cli.log.warning('{fg_yellow}The local "%s" branch contains commits not found in the upstream branch.', git_branch) + status = CheckStatus.WARNING + + return status + + +@cli.argument('-y', '--yes', action='store_true', arg_only=True, help='Answer yes to all questions.') +@cli.argument('-n', '--no', action='store_true', arg_only=True, help='Answer no to all questions.') +@cli.subcommand('Basic QMK environment checks') +def doctor(cli): + """Basic QMK environment checks. + + This is currently very simple, it just checks that all the expected binaries are on your system. + + TODO(unclaimed): + * [ ] Compile a trivial program with each compiler + """ + cli.log.info('QMK Doctor is checking your environment.') + cli.log.info('CLI version: %s', cli.version) + cli.log.info('QMK home: {fg_cyan}%s', QMK_FIRMWARE) + + status = os_tests() + + status = git_tests() + + venv = in_virtualenv() + if venv: + cli.log.info('CLI installed in virtualenv.') + + # Make sure the basic CLI tools we need are available and can be executed. + bin_ok = check_binaries() + + if not bin_ok: + if yesno('Would you like to install dependencies?', default=True): + cli.run(['util/qmk_install.sh', '-y'], stdin=DEVNULL, capture_output=False) + bin_ok = check_binaries() + + if bin_ok: + cli.log.info('All dependencies are installed.') + else: + status = CheckStatus.ERROR + + # Make sure the tools are at the correct version + ver_ok = check_binary_versions() + if CheckStatus.ERROR in ver_ok: + status = CheckStatus.ERROR + elif CheckStatus.WARNING in ver_ok and status == CheckStatus.OK: + status = CheckStatus.WARNING + + # Check out the QMK submodules + sub_ok = check_submodules() + + if sub_ok == CheckStatus.OK: + cli.log.info('Submodules are up to date.') + else: + if yesno('Would you like to clone the submodules?', default=True): + submodules.update() + sub_ok = check_submodules() + + if sub_ok == CheckStatus.ERROR: + status = CheckStatus.ERROR + elif sub_ok == CheckStatus.WARNING and status == CheckStatus.OK: + status = CheckStatus.WARNING + + # Report a summary of our findings to the user + if status == CheckStatus.OK: + cli.log.info('{fg_green}QMK is ready to go') + return 0 + elif status == CheckStatus.WARNING: + cli.log.info('{fg_yellow}QMK is ready to go, but minor problems were found') + return 1 + else: + cli.log.info('{fg_red}Major problems detected, please fix these problems before proceeding.') + cli.log.info('{fg_blue}Check out the FAQ (https://docs.qmk.fm/#/faq_build) or join the QMK Discord (https://discord.gg/Uq7gcHh) for help.') + return 2 diff --git a/lib/python/qmk/cli/doctor/windows.py b/lib/python/qmk/cli/doctor/windows.py new file mode 100644 index 000000000..381ab36fd --- /dev/null +++ b/lib/python/qmk/cli/doctor/windows.py @@ -0,0 +1,14 @@ +import platform + +from milc import cli + +from .check import CheckStatus + + +def os_test_windows(): + """Run the Windows specific tests. + """ + win32_ver = platform.win32_ver() + cli.log.info("Detected {fg_cyan}Windows %s (%s){fg_reset}.", win32_ver[0], win32_ver[1]) + + return CheckStatus.OK diff --git a/lib/python/qmk/cli/fileformat.py b/lib/python/qmk/cli/fileformat.py old mode 100644 new mode 100755 index 112d8d59d..cee4ba1ac --- a/lib/python/qmk/cli/fileformat.py +++ b/lib/python/qmk/cli/fileformat.py @@ -1,13 +1,23 @@ -"""Format files according to QMK's style. +"""Point people to the new command name. """ +import sys +from pathlib import Path + from milc import cli -import subprocess - -@cli.subcommand("Format files according to QMK's style.", hidden=True) +@cli.subcommand('Pointer to the new command name: qmk format-text.', hidden=True) def fileformat(cli): - """Run several general formatting commands. + """Pointer to the new command name: qmk format-text. """ - dos2unix = subprocess.run(['bash', '-c', 'git ls-files -z | xargs -0 dos2unix'], stdout=subprocess.DEVNULL) - return dos2unix.returncode + cli.log.warning('"qmk fileformat" has been renamed to "qmk format-text". Please use the new command in the future.') + argv = [sys.executable, *sys.argv] + argv[argv.index('fileformat')] = 'format-text' + script_path = Path(argv[1]) + script_path_exe = Path(f'{argv[1]}.exe') + + if not script_path.exists() and script_path_exe.exists(): + # For reasons I don't understand ".exe" is stripped from the script name on windows. + argv[1] = str(script_path_exe) + + return cli.run(argv, capture_output=False).returncode diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py index 1b2932a5b..c2d9e09c6 100644 --- a/lib/python/qmk/cli/flash.py +++ b/lib/python/qmk/cli/flash.py @@ -38,7 +38,7 @@ def print_bootloader_help(): @cli.argument('-km', '--keymap', help='The keymap to build a firmware for. Use this if you dont have a configurator file. Ignored when a configurator file is supplied.') @cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='The keyboard to build a firmware for. Use this if you dont have a configurator file. Ignored when a configurator file is supplied.') @cli.argument('-n', '--dry-run', arg_only=True, action='store_true', help="Don't actually build, just show the make command to be run.") -@cli.argument('-j', '--parallel', type=int, default=1, help="Set the number of parallel make jobs to run.") +@cli.argument('-j', '--parallel', type=int, default=1, help="Set the number of parallel make jobs; 0 means unlimited.") @cli.argument('-e', '--env', arg_only=True, action='append', default=[], help="Set a variable to be passed to make. May be passed multiple times.") @cli.argument('-c', '--clean', arg_only=True, action='store_true', help="Remove object files before compiling.") @cli.subcommand('QMK Flash.') diff --git a/lib/python/qmk/cli/format/c.py b/lib/python/qmk/cli/format/c.py new file mode 100644 index 000000000..0160e6036 --- /dev/null +++ b/lib/python/qmk/cli/format/c.py @@ -0,0 +1,137 @@ +"""Format C code according to QMK's style. +""" +from os import path +from shutil import which +from subprocess import CalledProcessError, DEVNULL, Popen, PIPE + +from argcomplete.completers import FilesCompleter +from milc import cli + +from qmk.path import normpath +from qmk.c_parse import c_source_files + +c_file_suffixes = ('c', 'h', 'cpp') +core_dirs = ('drivers', 'quantum', 'tests', 'tmk_core', 'platforms') +ignored = ('tmk_core/protocol/usb_hid', 'platforms/chibios/boards') + + +def find_clang_format(): + """Returns the path to clang-format. + """ + for clang_version in range(20, 6, -1): + binary = f'clang-format-{clang_version}' + + if which(binary): + return binary + + return 'clang-format' + + +def find_diffs(files): + """Run clang-format and diff it against a file. + """ + found_diffs = False + + for file in files: + cli.log.debug('Checking for changes in %s', file) + clang_format = Popen([find_clang_format(), file], stdout=PIPE, stderr=PIPE, universal_newlines=True) + diff = cli.run(['diff', '-u', f'--label=a/{file}', f'--label=b/{file}', str(file), '-'], stdin=clang_format.stdout, capture_output=True) + + if diff.returncode != 0: + print(diff.stdout) + found_diffs = True + + return found_diffs + + +def cformat_run(files): + """Spawn clang-format subprocess with proper arguments + """ + # Determine which version of clang-format to use + clang_format = [find_clang_format(), '-i'] + + try: + cli.run([*clang_format, *map(str, files)], check=True, capture_output=False, stdin=DEVNULL) + cli.log.info('Successfully formatted the C code.') + return True + + except CalledProcessError as e: + cli.log.error('Error formatting C code!') + cli.log.debug('%s exited with returncode %s', e.cmd, e.returncode) + cli.log.debug('STDOUT:') + cli.log.debug(e.stdout) + cli.log.debug('STDERR:') + cli.log.debug(e.stderr) + return False + + +def filter_files(files, core_only=False): + """Yield only files to be formatted and skip the rest + """ + if core_only: + # Filter non-core files + for index, file in enumerate(files): + # The following statement checks each file to see if the file path is + # - in the core directories + # - not in the ignored directories + if not any(i in str(file) for i in core_dirs) or any(i in str(file) for i in ignored): + files[index] = None + cli.log.debug("Skipping non-core file %s, as '--core-only' is used.", file) + + for file in files: + if file and file.name.split('.')[-1] in c_file_suffixes: + yield file + else: + cli.log.debug('Skipping file %s', file) + + +@cli.argument('-n', '--dry-run', arg_only=True, action='store_true', help="Flag only, don't automatically format.") +@cli.argument('-b', '--base-branch', default='origin/master', help='Branch to compare to diffs to.') +@cli.argument('-a', '--all-files', arg_only=True, action='store_true', help='Format all core files.') +@cli.argument('--core-only', arg_only=True, action='store_true', help='Format core files only.') +@cli.argument('files', nargs='*', arg_only=True, type=normpath, completer=FilesCompleter('.c'), help='Filename(s) to format.') +@cli.subcommand("Format C code according to QMK's style.", hidden=False if cli.config.user.developer else True) +def format_c(cli): + """Format C code according to QMK's style. + """ + # Find the list of files to format + if cli.args.files: + files = list(filter_files(cli.args.files, cli.args.core_only)) + + if not files: + cli.log.error('No C files in filelist: %s', ', '.join(map(str, cli.args.files))) + exit(0) + + if cli.args.all_files: + cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(map(str, files))) + + elif cli.args.all_files: + all_files = c_source_files(core_dirs) + files = list(filter_files(all_files, True)) + + else: + git_diff_cmd = ['git', 'diff', '--name-only', cli.args.base_branch, *core_dirs] + git_diff = cli.run(git_diff_cmd, stdin=DEVNULL) + + if git_diff.returncode != 0: + cli.log.error("Error running %s", git_diff_cmd) + print(git_diff.stderr) + return git_diff.returncode + + files = [] + + for file in git_diff.stdout.strip().split('\n'): + if not any([file.startswith(ignore) for ignore in ignored]): + if path.exists(file) and file.split('.')[-1] in c_file_suffixes: + files.append(file) + + # Sanity check + if not files: + cli.log.error('No changed files detected. Use "qmk format-c -a" to format all core files') + return False + + # Run clang-format on the files we've found + if cli.args.dry_run: + return not find_diffs(files) + else: + return cformat_run(files) diff --git a/lib/python/qmk/cli/format/json.py b/lib/python/qmk/cli/format/json.py index 1358c70e7..19d504491 100755 --- a/lib/python/qmk/cli/format/json.py +++ b/lib/python/qmk/cli/format/json.py @@ -8,7 +8,7 @@ from jsonschema import ValidationError from milc import cli from qmk.info import info_json -from qmk.json_schema import json_load, keyboard_validate +from qmk.json_schema import json_load, validate from qmk.json_encoders import InfoJSONEncoder, KeymapJSONEncoder from qmk.path import normpath @@ -23,14 +23,13 @@ def format_json(cli): if cli.args.format == 'auto': try: - keyboard_validate(json_file) + validate(json_file, 'qmk.keyboard.v1') json_encoder = InfoJSONEncoder except ValidationError as e: cli.log.warning('File %s did not validate as a keyboard:\n\t%s', cli.args.json_file, e) cli.log.info('Treating %s as a keymap file.', cli.args.json_file) json_encoder = KeymapJSONEncoder - elif cli.args.format == 'keyboard': json_encoder = InfoJSONEncoder elif cli.args.format == 'keymap': diff --git a/lib/python/qmk/cli/format/python.py b/lib/python/qmk/cli/format/python.py new file mode 100755 index 000000000..00612f97e --- /dev/null +++ b/lib/python/qmk/cli/format/python.py @@ -0,0 +1,26 @@ +"""Format python code according to QMK's style. +""" +from subprocess import CalledProcessError, DEVNULL + +from milc import cli + + +@cli.argument('-n', '--dry-run', arg_only=True, action='store_true', help="Don't actually format.") +@cli.subcommand("Format python code according to QMK's style.", hidden=False if cli.config.user.developer else True) +def format_python(cli): + """Format python code according to QMK's style. + """ + edit = '--diff' if cli.args.dry_run else '--in-place' + yapf_cmd = ['yapf', '-vv', '--recursive', edit, 'bin/qmk', 'lib/python'] + try: + cli.run(yapf_cmd, check=True, capture_output=False, stdin=DEVNULL) + cli.log.info('Python code in `bin/qmk` and `lib/python` is correctly formatted.') + return True + + except CalledProcessError: + if cli.args.dry_run: + cli.log.error('Python code in `bin/qmk` and `lib/python` incorrectly formatted!') + else: + cli.log.error('Error formatting python code!') + + return False diff --git a/lib/python/qmk/cli/format/text.py b/lib/python/qmk/cli/format/text.py new file mode 100644 index 000000000..e7e07b729 --- /dev/null +++ b/lib/python/qmk/cli/format/text.py @@ -0,0 +1,27 @@ +"""Ensure text files have the proper line endings. +""" +from subprocess import CalledProcessError + +from milc import cli + + +@cli.subcommand("Ensure text files have the proper line endings.", hidden=True) +def format_text(cli): + """Ensure text files have the proper line endings. + """ + try: + file_list_cmd = cli.run(['git', 'ls-files', '-z'], check=True) + except CalledProcessError as e: + cli.log.error('Could not get file list: %s', e) + exit(1) + except Exception as e: + cli.log.error('Unhandled exception: %s: %s', e.__class__.__name__, e) + cli.log.exception(e) + exit(1) + + dos2unix = cli.run(['xargs', '-0', 'dos2unix'], stdin=None, input=file_list_cmd.stdout) + + if dos2unix.returncode != 0: + print(dos2unix.stderr) + + return dos2unix.returncode diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py index 54cd5b96a..ca7e14fe6 100755 --- a/lib/python/qmk/cli/generate/config_h.py +++ b/lib/python/qmk/cli/generate/config_h.py @@ -5,14 +5,14 @@ from pathlib import Path from dotty_dict import dotty from milc import cli -from qmk.decorators import automagic_keyboard, automagic_keymap from qmk.info import info_json -from qmk.json_schema import json_load +from qmk.json_schema import json_load, validate from qmk.keyboard import keyboard_completer, keyboard_folder -from qmk.path import is_keyboard, normpath +from qmk.keymap import locate_keymap +from qmk.path import normpath -def direct_pins(direct_pins): +def direct_pins(direct_pins, postfix): """Return the config.h lines that set the direct pins. """ rows = [] @@ -24,81 +24,60 @@ def direct_pins(direct_pins): col_count = len(direct_pins[0]) row_count = len(direct_pins) - return """ -#ifndef MATRIX_COLS -# define MATRIX_COLS %s -#endif // MATRIX_COLS + return f""" +#ifndef MATRIX_COLS{postfix} +# define MATRIX_COLS{postfix} {col_count} +#endif // MATRIX_COLS{postfix} -#ifndef MATRIX_ROWS -# define MATRIX_ROWS %s -#endif // MATRIX_ROWS +#ifndef MATRIX_ROWS{postfix} +# define MATRIX_ROWS{postfix} {row_count} +#endif // MATRIX_ROWS{postfix} -#ifndef DIRECT_PINS -# define DIRECT_PINS {%s} -#endif // DIRECT_PINS -""" % (col_count, row_count, ','.join(rows)) +#ifndef DIRECT_PINS{postfix} +# define DIRECT_PINS{postfix} {{ {", ".join(rows)} }} +#endif // DIRECT_PINS{postfix} +""" -def pin_array(define, pins): +def pin_array(define, pins, postfix): """Return the config.h lines that set a pin array. """ pin_num = len(pins) pin_array = ', '.join(map(str, [pin or 'NO_PIN' for pin in pins])) return f""" -#ifndef {define}S -# define {define}S {pin_num} -#endif // {define}S +#ifndef {define}S{postfix} +# define {define}S{postfix} {pin_num} +#endif // {define}S{postfix} -#ifndef {define}_PINS -# define {define}_PINS {{ {pin_array} }} -#endif // {define}_PINS +#ifndef {define}_PINS{postfix} +# define {define}_PINS{postfix} {{ {pin_array} }} +#endif // {define}_PINS{postfix} """ -def matrix_pins(matrix_pins): +def matrix_pins(matrix_pins, postfix=''): """Add the matrix config to the config.h. """ pins = [] if 'direct' in matrix_pins: - pins.append(direct_pins(matrix_pins['direct'])) + pins.append(direct_pins(matrix_pins['direct'], postfix)) if 'cols' in matrix_pins: - pins.append(pin_array('MATRIX_COL', matrix_pins['cols'])) + pins.append(pin_array('MATRIX_COL', matrix_pins['cols'], postfix)) if 'rows' in matrix_pins: - pins.append(pin_array('MATRIX_ROW', matrix_pins['rows'])) + pins.append(pin_array('MATRIX_ROW', matrix_pins['rows'], postfix)) return '\n'.join(pins) -@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') -@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") -@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='Keyboard to generate config.h for.') -@cli.subcommand('Used by the make system to generate info_config.h from info.json', hidden=True) -@automagic_keyboard -@automagic_keymap -def generate_config_h(cli): - """Generates the info_config.h file. +def generate_config_items(kb_info_json, config_h_lines): + """Iterate through the info_config map to generate basic config values. """ - # Determine our keyboard(s) - if not cli.config.generate_config_h.keyboard: - cli.log.error('Missing parameter: --keyboard') - cli.subcommands['info'].print_help() - return False - - if not is_keyboard(cli.config.generate_config_h.keyboard): - cli.log.error('Invalid keyboard: "%s"', cli.config.generate_config_h.keyboard) - return False - - # Build the info_config.h file. - kb_info_json = dotty(info_json(cli.config.generate_config_h.keyboard)) info_config_map = json_load(Path('data/mappings/info_config.json')) - config_h_lines = ['/* This file was generated by `qmk generate-config-h`. Do not edit or copy.' ' */', '', '#pragma once'] - - # Iterate through the info_config map to generate basic things for config_key, info_dict in info_config_map.items(): info_key = info_dict['info_key'] key_type = info_dict.get('value_type', 'str') @@ -135,9 +114,75 @@ def generate_config_h(cli): config_h_lines.append(f'# define {config_key} {config_value}') config_h_lines.append(f'#endif // {config_key}') + +def generate_split_config(kb_info_json, config_h_lines): + """Generate the config.h lines for split boards.""" + if 'primary' in kb_info_json['split']: + if kb_info_json['split']['primary'] in ('left', 'right'): + config_h_lines.append('') + config_h_lines.append('#ifndef MASTER_LEFT') + config_h_lines.append('# ifndef MASTER_RIGHT') + if kb_info_json['split']['primary'] == 'left': + config_h_lines.append('# define MASTER_LEFT') + elif kb_info_json['split']['primary'] == 'right': + config_h_lines.append('# define MASTER_RIGHT') + config_h_lines.append('# endif // MASTER_RIGHT') + config_h_lines.append('#endif // MASTER_LEFT') + elif kb_info_json['split']['primary'] == 'pin': + config_h_lines.append('') + config_h_lines.append('#ifndef SPLIT_HAND_PIN') + config_h_lines.append('# define SPLIT_HAND_PIN') + config_h_lines.append('#endif // SPLIT_HAND_PIN') + elif kb_info_json['split']['primary'] == 'matrix_grid': + config_h_lines.append('') + config_h_lines.append('#ifndef SPLIT_HAND_MATRIX_GRID') + config_h_lines.append('# define SPLIT_HAND_MATRIX_GRID {%s}' % (','.join(kb_info_json["split"]["matrix_grid"],))) + config_h_lines.append('#endif // SPLIT_HAND_MATRIX_GRID') + elif kb_info_json['split']['primary'] == 'eeprom': + config_h_lines.append('') + config_h_lines.append('#ifndef EE_HANDS') + config_h_lines.append('# define EE_HANDS') + config_h_lines.append('#endif // EE_HANDS') + + if 'protocol' in kb_info_json['split'].get('transport', {}): + if kb_info_json['split']['transport']['protocol'] == 'i2c': + config_h_lines.append('') + config_h_lines.append('#ifndef USE_I2C') + config_h_lines.append('# define USE_I2C') + config_h_lines.append('#endif // USE_I2C') + + if 'right' in kb_info_json['split'].get('matrix_pins', {}): + config_h_lines.append(matrix_pins(kb_info_json['split']['matrix_pins']['right'], '_RIGHT')) + + +@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') +@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") +@cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate config.h for.') +@cli.argument('-km', '--keymap', arg_only=True, help='Keymap to generate config.h for.') +@cli.subcommand('Used by the make system to generate info_config.h from info.json', hidden=True) +def generate_config_h(cli): + """Generates the info_config.h file. + """ + # Determine our keyboard/keymap + if cli.args.keymap: + km = locate_keymap(cli.args.keyboard, cli.args.keymap) + km_json = json_load(km) + validate(km_json, 'qmk.keymap.v1') + kb_info_json = dotty(km_json.get('config', {})) + else: + kb_info_json = dotty(info_json(cli.args.keyboard)) + + # Build the info_config.h file. + config_h_lines = ['/* This file was generated by `qmk generate-config-h`. Do not edit or copy.' ' */', '', '#pragma once'] + + generate_config_items(kb_info_json, config_h_lines) + if 'matrix_pins' in kb_info_json: config_h_lines.append(matrix_pins(kb_info_json['matrix_pins'])) + if 'split' in kb_info_json: + generate_split_config(kb_info_json, config_h_lines) + # Show the results config_h = '\n'.join(config_h_lines) diff --git a/lib/python/qmk/cli/generate/info_json.py b/lib/python/qmk/cli/generate/info_json.py index 8931b68b6..284d1a851 100755 --- a/lib/python/qmk/cli/generate/info_json.py +++ b/lib/python/qmk/cli/generate/info_json.py @@ -4,15 +4,17 @@ Compile an info.json for a particular keyboard and pretty-print it. """ import json -from jsonschema import Draft7Validator, validators +from argcomplete.completers import FilesCompleter +from jsonschema import Draft7Validator, RefResolver, validators from milc import cli +from pathlib import Path from qmk.decorators import automagic_keyboard, automagic_keymap from qmk.info import info_json from qmk.json_encoders import InfoJSONEncoder -from qmk.json_schema import load_jsonschema +from qmk.json_schema import compile_schema_store from qmk.keyboard import keyboard_completer, keyboard_folder -from qmk.path import is_keyboard +from qmk.path import is_keyboard, normpath def pruning_validator(validator_class): @@ -34,15 +36,19 @@ def pruning_validator(validator_class): def strip_info_json(kb_info_json): """Remove the API-only properties from the info.json. """ + schema_store = compile_schema_store() pruning_draft_7_validator = pruning_validator(Draft7Validator) - schema = load_jsonschema('keyboard') - validator = pruning_draft_7_validator(schema).validate + schema = schema_store['qmk.keyboard.v1'] + resolver = RefResolver.from_schema(schema_store['qmk.keyboard.v1'], store=schema_store) + validator = pruning_draft_7_validator(schema, resolver=resolver).validate return validator(kb_info_json) @cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='Keyboard to show info for.') @cli.argument('-km', '--keymap', help='Show the layers for a JSON keymap too.') +@cli.argument('-o', '--output', arg_only=True, completer=FilesCompleter, help='Write the output the specified file, overwriting if necessary.') +@cli.argument('-ow', '--overwrite', arg_only=True, action='store_true', help='Overwrite the existing info.json. (Overrides the location of --output)') @cli.subcommand('Generate an info.json file for a keyboard.', hidden=False if cli.config.user.developer else True) @automagic_keyboard @automagic_keymap @@ -59,9 +65,29 @@ def generate_info_json(cli): cli.log.error('Invalid keyboard: "%s"', cli.config.generate_info_json.keyboard) return False + if cli.args.overwrite: + output_path = (Path('keyboards') / cli.config.generate_info_json.keyboard / 'info.json').resolve() + + if cli.args.output: + cli.log.warning('Overwriting user supplied --output with %s', output_path) + + cli.args.output = output_path + # Build the info.json file kb_info_json = info_json(cli.config.generate_info_json.keyboard) strip_info_json(kb_info_json) + info_json_text = json.dumps(kb_info_json, indent=4, cls=InfoJSONEncoder) - # Display the results - print(json.dumps(kb_info_json, indent=2, cls=InfoJSONEncoder)) + if cli.args.output: + # Write to a file + output_path = normpath(cli.args.output) + + if output_path.exists(): + cli.log.warning('Overwriting output file %s', output_path) + + output_path.write_text(info_json_text + '\n') + cli.log.info('Wrote info.json to %s.', output_path) + + else: + # Display the results + print(info_json_text) diff --git a/lib/python/qmk/cli/generate/keyboard_h.py b/lib/python/qmk/cli/generate/keyboard_h.py index 22500dbc9..c9d7f549b 100755 --- a/lib/python/qmk/cli/generate/keyboard_h.py +++ b/lib/python/qmk/cli/generate/keyboard_h.py @@ -2,7 +2,6 @@ """ from milc import cli -from qmk.decorators import automagic_keyboard, automagic_keymap from qmk.info import info_json from qmk.keyboard import keyboard_completer, keyboard_folder from qmk.path import normpath @@ -29,14 +28,12 @@ def would_populate_layout_h(keyboard): @cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") -@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate keyboard.h for.') +@cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate keyboard.h for.') @cli.subcommand('Used by the make system to generate keyboard.h from info.json', hidden=True) -@automagic_keyboard -@automagic_keymap def generate_keyboard_h(cli): """Generates the keyboard.h file. """ - has_layout_h = would_populate_layout_h(cli.config.generate_keyboard_h.keyboard) + has_layout_h = would_populate_layout_h(cli.args.keyboard) # Build the layouts.h file. keyboard_h_lines = ['/* This file was generated by `qmk generate-keyboard-h`. Do not edit or copy.' ' */', '', '#pragma once', '#include "quantum.h"'] diff --git a/lib/python/qmk/cli/generate/rules_mk.py b/lib/python/qmk/cli/generate/rules_mk.py index 41c94e16b..cdf17dfbc 100755 --- a/lib/python/qmk/cli/generate/rules_mk.py +++ b/lib/python/qmk/cli/generate/rules_mk.py @@ -5,11 +5,11 @@ from pathlib import Path from dotty_dict import dotty from milc import cli -from qmk.decorators import automagic_keyboard, automagic_keymap from qmk.info import info_json -from qmk.json_schema import json_load +from qmk.json_schema import json_load, validate from qmk.keyboard import keyboard_completer, keyboard_folder -from qmk.path import is_keyboard, normpath +from qmk.keymap import locate_keymap +from qmk.path import normpath def process_mapping_rule(kb_info_json, rules_key, info_dict): @@ -39,23 +39,21 @@ def process_mapping_rule(kb_info_json, rules_key, info_dict): @cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') @cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") @cli.argument('-e', '--escape', arg_only=True, action='store_true', help="Escape spaces in quiet mode") -@cli.argument('-kb', '--keyboard', type=keyboard_folder, completer=keyboard_completer, help='Keyboard to generate config.h for.') -@cli.subcommand('Used by the make system to generate info_config.h from info.json', hidden=True) -@automagic_keyboard -@automagic_keymap +@cli.argument('-kb', '--keyboard', arg_only=True, type=keyboard_folder, completer=keyboard_completer, required=True, help='Keyboard to generate rules.mk for.') +@cli.argument('-km', '--keymap', arg_only=True, help='Keymap to generate rules.mk for.') +@cli.subcommand('Used by the make system to generate rules.mk from info.json', hidden=True) def generate_rules_mk(cli): """Generates a rules.mk file from info.json. """ - if not cli.config.generate_rules_mk.keyboard: - cli.log.error('Missing parameter: --keyboard') - cli.subcommands['info'].print_help() - return False + # Determine our keyboard/keymap + if cli.args.keymap: + km = locate_keymap(cli.args.keyboard, cli.args.keymap) + km_json = json_load(km) + validate(km_json, 'qmk.keymap.v1') + kb_info_json = dotty(km_json.get('config', {})) + else: + kb_info_json = dotty(info_json(cli.args.keyboard)) - if not is_keyboard(cli.config.generate_rules_mk.keyboard): - cli.log.error('Invalid keyboard: "%s"', cli.config.generate_rules_mk.keyboard) - return False - - kb_info_json = dotty(info_json(cli.config.generate_rules_mk.keyboard)) info_rules_map = json_load(Path('data/mappings/info_rules.json')) rules_mk_lines = ['# This file was generated by `qmk generate-rules-mk`. Do not edit or copy.', ''] @@ -76,6 +74,17 @@ def generate_rules_mk(cli): enabled = 'yes' if enabled else 'no' rules_mk_lines.append(f'{feature}_ENABLE ?= {enabled}') + # Set SPLIT_TRANSPORT, if needed + if kb_info_json.get('split', {}).get('transport', {}).get('protocol') == 'custom': + rules_mk_lines.append('SPLIT_TRANSPORT ?= custom') + + # Set CUSTOM_MATRIX, if needed + if kb_info_json.get('matrix_pins', {}).get('custom'): + if kb_info_json.get('matrix_pins', {}).get('custom_lite'): + rules_mk_lines.append('CUSTOM_MATRIX ?= lite') + else: + rules_mk_lines.append('CUSTOM_MATRIX ?= yes') + # Show the results rules_mk = '\n'.join(rules_mk_lines) + '\n' diff --git a/lib/python/qmk/cli/generate/version_h.py b/lib/python/qmk/cli/generate/version_h.py new file mode 100644 index 000000000..b8e52588c --- /dev/null +++ b/lib/python/qmk/cli/generate/version_h.py @@ -0,0 +1,28 @@ +"""Used by the make system to generate version.h for use in code. +""" +from milc import cli + +from qmk.commands import create_version_h +from qmk.path import normpath + + +@cli.argument('-o', '--output', arg_only=True, type=normpath, help='File to write to') +@cli.argument('-q', '--quiet', arg_only=True, action='store_true', help="Quiet mode, only output error messages") +@cli.argument('--skip-git', arg_only=True, action='store_true', help='Skip Git operations') +@cli.argument('--skip-all', arg_only=True, action='store_true', help='Use placeholder values for all defines (implies --skip-git)') +@cli.subcommand('Used by the make system to generate version.h for use in code', hidden=True) +def generate_version_h(cli): + """Generates the version.h file. + """ + if cli.args.skip_all: + cli.args.skip_git = True + + version_h = create_version_h(cli.args.skip_git, cli.args.skip_all) + + if cli.args.output: + cli.args.output.write_text(version_h) + + if not cli.args.quiet: + cli.log.info('Wrote version.h to %s.', cli.args.output) + else: + print(version_h) diff --git a/lib/python/qmk/cli/info.py b/lib/python/qmk/cli/info.py index 0d08d242c..3131d4b53 100755 --- a/lib/python/qmk/cli/info.py +++ b/lib/python/qmk/cli/info.py @@ -24,19 +24,15 @@ def show_keymap(kb_info_json, title_caps=True): keymap_path = locate_keymap(cli.config.info.keyboard, cli.config.info.keymap) if keymap_path and keymap_path.suffix == '.json': - if title_caps: - cli.echo('{fg_blue}Keymap "%s"{fg_reset}:', cli.config.info.keymap) - else: - cli.echo('{fg_blue}keymap_%s{fg_reset}:', cli.config.info.keymap) - keymap_data = json.load(keymap_path.open(encoding='utf-8')) layout_name = keymap_data['layout'] + layout_name = kb_info_json.get('layout_aliases', {}).get(layout_name, layout_name) # Resolve alias names for layer_num, layer in enumerate(keymap_data['layers']): if title_caps: - cli.echo('{fg_cyan}Layer %s{fg_reset}:', layer_num) + cli.echo('{fg_cyan}Keymap %s Layer %s{fg_reset}:', cli.config.info.keymap, layer_num) else: - cli.echo('{fg_cyan}layer_%s{fg_reset}:', layer_num) + cli.echo('{fg_cyan}keymap.%s.layer.%s{fg_reset}:', cli.config.info.keymap, layer_num) print(render_layout(kb_info_json['layouts'][layout_name]['layout'], cli.config.info.ascii, layer)) @@ -45,7 +41,7 @@ def show_layouts(kb_info_json, title_caps=True): """Render the layouts with info.json labels. """ for layout_name, layout_art in render_layouts(kb_info_json, cli.config.info.ascii).items(): - title = layout_name.title() if title_caps else layout_name + title = f'Layout {layout_name.title()}' if title_caps else f'layouts.{layout_name}' cli.echo('{fg_cyan}%s{fg_reset}:', title) print(layout_art) # Avoid passing dirty data to cli.echo() @@ -87,23 +83,12 @@ def print_friendly_output(kb_info_json): cli.echo('{fg_blue}Maintainer{fg_reset}: %s', kb_info_json['maintainer']) cli.echo('{fg_blue}Keyboard Folder{fg_reset}: %s', kb_info_json.get('keyboard_folder', 'Unknown')) cli.echo('{fg_blue}Layouts{fg_reset}: %s', ', '.join(sorted(kb_info_json['layouts'].keys()))) - if 'width' in kb_info_json and 'height' in kb_info_json: - cli.echo('{fg_blue}Size{fg_reset}: %s x %s' % (kb_info_json['width'], kb_info_json['height'])) cli.echo('{fg_blue}Processor{fg_reset}: %s', kb_info_json.get('processor', 'Unknown')) cli.echo('{fg_blue}Bootloader{fg_reset}: %s', kb_info_json.get('bootloader', 'Unknown')) if 'layout_aliases' in kb_info_json: aliases = [f'{key}={value}' for key, value in kb_info_json['layout_aliases'].items()] cli.echo('{fg_blue}Layout aliases:{fg_reset} %s' % (', '.join(aliases),)) - if cli.config.info.layouts: - show_layouts(kb_info_json, True) - - if cli.config.info.matrix: - show_matrix(kb_info_json, True) - - if cli.config_source.info.keymap and cli.config_source.info.keymap != 'config_file': - show_keymap(kb_info_json, True) - def print_text_output(kb_info_json): """Print the info.json in a plain text format. @@ -124,6 +109,24 @@ def print_text_output(kb_info_json): show_keymap(kb_info_json, False) +def print_dotted_output(kb_info_json, prefix=''): + """Print the info.json in a plain text format with dot-joined keys. + """ + for key in sorted(kb_info_json): + new_prefix = f'{prefix}.{key}' if prefix else key + + if key in ['parse_errors', 'parse_warnings']: + continue + elif key == 'layouts' and prefix == '': + cli.echo('{fg_blue}layouts{fg_reset}: %s', ', '.join(sorted(kb_info_json['layouts'].keys()))) + elif isinstance(kb_info_json[key], dict): + print_dotted_output(kb_info_json[key], new_prefix) + elif isinstance(kb_info_json[key], list): + cli.echo('{fg_blue}%s{fg_reset}: %s', new_prefix, ', '.join(map(str, sorted(kb_info_json[key])))) + else: + cli.echo('{fg_blue}%s{fg_reset}: %s', new_prefix, kb_info_json[key]) + + def print_parsed_rules_mk(keyboard_name): rules = rules_mk(keyboard_name) for k in sorted(rules.keys()): @@ -164,10 +167,22 @@ def info(cli): # Output in the requested format if cli.args.format == 'json': print(json.dumps(kb_info_json, cls=InfoJSONEncoder)) + return True elif cli.args.format == 'text': - print_text_output(kb_info_json) + print_dotted_output(kb_info_json) + title_caps = False elif cli.args.format == 'friendly': print_friendly_output(kb_info_json) + title_caps = True else: cli.log.error('Unknown format: %s', cli.args.format) return False + + if cli.config.info.layouts: + show_layouts(kb_info_json, title_caps) + + if cli.config.info.matrix: + show_matrix(kb_info_json, title_caps) + + if cli.config_source.info.keymap and cli.config_source.info.keymap != 'config_file': + show_keymap(kb_info_json, title_caps) diff --git a/lib/python/qmk/cli/kle2json.py b/lib/python/qmk/cli/kle2json.py index acb75ef4f..bbfddf426 100755 --- a/lib/python/qmk/cli/kle2json.py +++ b/lib/python/qmk/cli/kle2json.py @@ -44,8 +44,6 @@ def kle2json(cli): 'keyboard_name': kle.name, 'url': '', 'maintainer': 'qmk', - 'width': kle.columns, - 'height': kle.rows, 'layouts': { 'LAYOUT': { 'layout': kle2qmk(kle) diff --git a/lib/python/qmk/cli/multibuild.py b/lib/python/qmk/cli/multibuild.py index bdb0b493c..85ed0fa1e 100755 --- a/lib/python/qmk/cli/multibuild.py +++ b/lib/python/qmk/cli/multibuild.py @@ -10,7 +10,7 @@ from subprocess import DEVNULL from milc import cli from qmk.constants import QMK_FIRMWARE -from qmk.commands import _find_make +from qmk.commands import _find_make, get_make_parallel_args import qmk.keyboard import qmk.keymap @@ -28,7 +28,7 @@ def _is_split(keyboard_name): return True if 'SPLIT_KEYBOARD' in rules_mk and rules_mk['SPLIT_KEYBOARD'].lower() == 'yes' else False -@cli.argument('-j', '--parallel', type=int, default=1, help="Set the number of parallel make jobs to run.") +@cli.argument('-j', '--parallel', type=int, default=1, help="Set the number of parallel make jobs; 0 means unlimited.") @cli.argument('-c', '--clean', arg_only=True, action='store_true', help="Remove object files before compiling.") @cli.argument('-f', '--filter', arg_only=True, action='append', default=[], help="Filter the list of keyboards based on the supplied value in rules.mk. Supported format is 'SPLIT_KEYBOARD=yes'. May be passed multiple times.") @cli.argument('-km', '--keymap', type=str, default='default', help="The keymap name to build. Default is 'default'.") @@ -80,7 +80,7 @@ all: {keyboard_safe}_binary ) # yapf: enable - cli.run([make_cmd, '-j', str(cli.args.parallel), '-f', makefile.as_posix(), 'all'], capture_output=False, stdin=DEVNULL) + cli.run([make_cmd, *get_make_parallel_args(cli.args.parallel), '-f', makefile.as_posix(), 'all'], capture_output=False, stdin=DEVNULL) # Check for failures failures = [f for f in builddir.glob(f'failed.log.{os.getpid()}.*')] diff --git a/lib/python/qmk/cli/new/keyboard.py b/lib/python/qmk/cli/new/keyboard.py index ae4445ca4..369d2bd7d 100644 --- a/lib/python/qmk/cli/new/keyboard.py +++ b/lib/python/qmk/cli/new/keyboard.py @@ -1,11 +1,142 @@ -"""This script automates the creation of keyboards. +"""This script automates the creation of new keyboard directories using a starter template. """ +from datetime import date +import fileinput +from pathlib import Path +import re +import shutil + +from qmk.commands import git_get_username +import qmk.path from milc import cli +from milc.questions import choice, question + +KEYBOARD_TYPES = ['avr', 'ps2avrgb'] -@cli.subcommand('Creates a new keyboard') -def new_keyboard(cli): - """Creates a new keyboard +def keyboard_name(name): + """Callable for argparse validation. """ - # TODO: replace this bodge to the existing script - cli.run(['util/new_keyboard.sh'], stdin=None, capture_output=False) + if not validate_keyboard_name(name): + raise ValueError + return name + + +def validate_keyboard_name(name): + """Returns True if the given keyboard name contains only lowercase a-z, 0-9 and underscore characters. + """ + regex = re.compile(r'^[a-z0-9][a-z0-9/_]+$') + return bool(regex.match(name)) + + +@cli.argument('-kb', '--keyboard', help='Specify the name for the new keyboard directory', arg_only=True, type=keyboard_name) +@cli.argument('-t', '--type', help='Specify the keyboard type', arg_only=True, choices=KEYBOARD_TYPES) +@cli.argument('-u', '--username', help='Specify your username (default from Git config)', arg_only=True) +@cli.subcommand('Creates a new keyboard directory') +def new_keyboard(cli): + """Creates a new keyboard. + """ + cli.log.info('{style_bright}Generating a new QMK keyboard directory{style_normal}') + cli.echo('') + + # Get keyboard name + new_keyboard_name = None + while not new_keyboard_name: + new_keyboard_name = cli.args.keyboard if cli.args.keyboard else question('Keyboard Name:') + if not validate_keyboard_name(new_keyboard_name): + cli.log.error('Keyboard names must contain only {fg_cyan}lowercase a-z{fg_reset}, {fg_cyan}0-9{fg_reset}, and {fg_cyan}_{fg_reset}! Please choose a different name.') + + # Exit if passed by arg + if cli.args.keyboard: + return False + + new_keyboard_name = None + continue + + keyboard_path = qmk.path.keyboard(new_keyboard_name) + if keyboard_path.exists(): + cli.log.error(f'Keyboard {{fg_cyan}}{new_keyboard_name}{{fg_reset}} already exists! Please choose a different name.') + + # Exit if passed by arg + if cli.args.keyboard: + return False + + new_keyboard_name = None + + # Get keyboard type + keyboard_type = cli.args.type if cli.args.type else choice('Keyboard Type:', KEYBOARD_TYPES, default=0) + + # Get username + user_name = None + while not user_name: + user_name = question('Your Name:', default=find_user_name()) + + if not user_name: + cli.log.error('You didn\'t provide a username, and we couldn\'t find one set in your QMK or Git configs. Please try again.') + + # Exit if passed by arg + if cli.args.username: + return False + + # Copy all the files + copy_templates(keyboard_type, keyboard_path) + + # Replace all the placeholders + keyboard_basename = keyboard_path.name + replacements = [ + ('%YEAR%', str(date.today().year)), + ('%KEYBOARD%', keyboard_basename), + ('%YOUR_NAME%', user_name), + ] + filenames = [ + keyboard_path / 'config.h', + keyboard_path / 'info.json', + keyboard_path / 'readme.md', + keyboard_path / f'{keyboard_basename}.c', + keyboard_path / f'{keyboard_basename}.h', + keyboard_path / 'keymaps/default/readme.md', + keyboard_path / 'keymaps/default/keymap.c', + ] + replace_placeholders(replacements, filenames) + + cli.echo('') + cli.log.info(f'{{fg_green}}Created a new keyboard called {{fg_cyan}}{new_keyboard_name}{{fg_green}}.{{fg_reset}}') + cli.log.info(f'To start working on things, `cd` into {{fg_cyan}}{keyboard_path}{{fg_reset}},') + cli.log.info('or open the directory in your preferred text editor.') + + +def find_user_name(): + if cli.args.username: + return cli.args.username + elif cli.config.user.name: + return cli.config.user.name + else: + return git_get_username() + + +def copy_templates(keyboard_type, keyboard_path): + """Copies the template files from data/templates to the new keyboard directory. + """ + template_base_path = Path('data/templates') + keyboard_basename = keyboard_path.name + + cli.log.info('Copying base template files...') + shutil.copytree(template_base_path / 'base', keyboard_path) + + cli.log.info(f'Copying {{fg_cyan}}{keyboard_type}{{fg_reset}} template files...') + shutil.copytree(template_base_path / keyboard_type, keyboard_path, dirs_exist_ok=True) + + cli.log.info(f'Renaming {{fg_cyan}}keyboard.[ch]{{fg_reset}} to {{fg_cyan}}{keyboard_basename}.[ch]{{fg_reset}}...') + shutil.move(keyboard_path / 'keyboard.c', keyboard_path / f'{keyboard_basename}.c') + shutil.move(keyboard_path / 'keyboard.h', keyboard_path / f'{keyboard_basename}.h') + + +def replace_placeholders(replacements, filenames): + """Replaces the given placeholders in each template file. + """ + for replacement in replacements: + cli.log.info(f'Replacing {{fg_cyan}}{replacement[0]}{{fg_reset}} with {{fg_cyan}}{replacement[1]}{{fg_reset}}...') + + with fileinput.input(files=filenames, inplace=True) as file: + for line in file: + print(line.replace(replacement[0], replacement[1]), end='') diff --git a/lib/python/qmk/cli/pyformat.py b/lib/python/qmk/cli/pyformat.py index abe5f6de1..c624f74ae 100755 --- a/lib/python/qmk/cli/pyformat.py +++ b/lib/python/qmk/cli/pyformat.py @@ -1,26 +1,24 @@ -"""Format python code according to QMK's style. +"""Point people to the new command name. """ -from subprocess import CalledProcessError, DEVNULL +import sys +from pathlib import Path from milc import cli -@cli.argument('-n', '--dry-run', arg_only=True, action='store_true', help="Flag only, don't automatically format.") -@cli.subcommand("Format python code according to QMK's style.", hidden=False if cli.config.user.developer else True) +@cli.argument('-n', '--dry-run', arg_only=True, action='store_true', help="Don't actually format.") +@cli.subcommand('Pointer to the new command name: qmk format-python.', hidden=False if cli.config.user.developer else True) def pyformat(cli): - """Format python code according to QMK's style. + """Pointer to the new command name: qmk format-python. """ - edit = '--diff' if cli.args.dry_run else '--in-place' - yapf_cmd = ['yapf', '-vv', '--recursive', edit, 'bin/qmk', 'lib/python'] - try: - cli.run(yapf_cmd, check=True, capture_output=False, stdin=DEVNULL) - cli.log.info('Python code in `bin/qmk` and `lib/python` is correctly formatted.') - return True + cli.log.warning('"qmk pyformat" has been renamed to "qmk format-python". Please use the new command in the future.') + argv = [sys.executable, *sys.argv] + argv[argv.index('pyformat')] = 'format-python' + script_path = Path(argv[1]) + script_path_exe = Path(f'{argv[1]}.exe') - except CalledProcessError: - if cli.args.dry_run: - cli.log.error('Python code in `bin/qmk` and `lib/python` incorrectly formatted!') - else: - cli.log.error('Error formatting python code!') + if not script_path.exists() and script_path_exe.exists(): + # For reasons I don't understand ".exe" is stripped from the script name on windows. + argv[1] = str(script_path_exe) - return False + return cli.run(argv, capture_output=False).returncode diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 3a35c1103..421453d83 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -2,6 +2,7 @@ """ import json import os +import sys import shutil from pathlib import Path from subprocess import DEVNULL @@ -10,7 +11,7 @@ from time import strftime from milc import cli import qmk.keymap -from qmk.constants import KEYBOARD_OUTPUT_PREFIX +from qmk.constants import QMK_FIRMWARE, KEYBOARD_OUTPUT_PREFIX from qmk.json_schema import json_load time_fmt = '%Y-%m-%d-%H:%M:%S' @@ -51,7 +52,7 @@ def create_make_target(target, parallel=1, **env_vars): for key, value in env_vars.items(): env.append(f'{key}={value}') - return [make_cmd, '-j', str(parallel), *env, target] + return [make_cmd, *get_make_parallel_args(parallel), *env, target] def create_make_command(keyboard, keymap, target=None, parallel=1, **env_vars): @@ -86,11 +87,17 @@ def create_make_command(keyboard, keymap, target=None, parallel=1, **env_vars): return create_make_target(':'.join(make_args), parallel, **env_vars) -def get_git_version(repo_dir='.', check_dir='.'): +def get_git_version(current_time, repo_dir='.', check_dir='.'): """Returns the current git version for a repo, or the current time. """ git_describe_cmd = ['git', 'describe', '--abbrev=6', '--dirty', '--always', '--tags'] + if repo_dir != '.': + repo_dir = Path('lib') / repo_dir + + if check_dir != '.': + check_dir = repo_dir / check_dir + if Path(check_dir).exists(): git_describe = cli.run(git_describe_cmd, stdin=DEVNULL, cwd=repo_dir) @@ -100,23 +107,58 @@ def get_git_version(repo_dir='.', check_dir='.'): else: cli.log.warn(f'"{" ".join(git_describe_cmd)}" returned error code {git_describe.returncode}') print(git_describe.stderr) - return strftime(time_fmt) + return current_time - return strftime(time_fmt) + return current_time -def write_version_h(git_version, build_date, chibios_version, chibios_contrib_version): - """Generate and write quantum/version.h +def get_make_parallel_args(parallel=1): + """Returns the arguments for running the specified number of parallel jobs. """ - version_h = [ - f'#define QMK_VERSION "{git_version}"', - f'#define QMK_BUILDDATE "{build_date}"', - f'#define CHIBIOS_VERSION "{chibios_version}"', - f'#define CHIBIOS_CONTRIB_VERSION "{chibios_contrib_version}"', - ] + parallel_args = [] - version_h_file = Path('quantum/version.h') - version_h_file.write_text('\n'.join(version_h)) + if int(parallel) <= 0: + # 0 or -1 means -j without argument (unlimited jobs) + parallel_args.append('--jobs') + else: + parallel_args.append('--jobs=' + str(parallel)) + + if int(parallel) != 1: + # If more than 1 job is used, synchronize parallel output by target + parallel_args.append('--output-sync=target') + + return parallel_args + + +def create_version_h(skip_git=False, skip_all=False): + """Generate version.h contents + """ + if skip_all: + current_time = "1970-01-01-00:00:00" + else: + current_time = strftime(time_fmt) + + if skip_git: + git_version = "NA" + chibios_version = "NA" + chibios_contrib_version = "NA" + else: + git_version = get_git_version(current_time) + chibios_version = get_git_version(current_time, "chibios", "os") + chibios_contrib_version = get_git_version(current_time, "chibios-contrib", "os") + + version_h_lines = f"""/* This file was automatically generated. Do not edit or copy. + */ + +#pragma once + +#define QMK_VERSION "{git_version}" +#define QMK_BUILDDATE "{current_time}" +#define CHIBIOS_VERSION "{chibios_version}" +#define CHIBIOS_CONTRIB_VERSION "{chibios_contrib_version}" +""" + + return version_h_lines def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_vars): @@ -149,13 +191,8 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va keymap_dir.mkdir(exist_ok=True, parents=True) keymap_c.write_text(c_text) - # Write the version.h file - git_version = get_git_version() - build_date = strftime('%Y-%m-%d-%H:%M:%S') - chibios_version = get_git_version("lib/chibios", "lib/chibios/os") - chibios_contrib_version = get_git_version("lib/chibios-contrib", "lib/chibios-contrib/os") - - write_version_h(git_version, build_date, chibios_version, chibios_contrib_version) + version_h = Path('quantum/version.h') + version_h.write_text(create_version_h()) # Return a command that can be run to make the keymap and flash if given verbose = 'true' if cli.config.general.verbose else 'false' @@ -166,8 +203,7 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va make_command.append('-s') make_command.extend([ - '-j', - str(parallel), + *get_make_parallel_args(parallel), '-r', '-R', '-f', @@ -181,10 +217,6 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va make_command.append(f'{key}={value}') make_command.extend([ - f'GIT_VERSION={git_version}', - f'BUILD_DATE={build_date}', - f'CHIBIOS_VERSION={chibios_version}', - f'CHIBIOS_CONTRIB_VERSION={chibios_contrib_version}', f'KEYBOARD={user_keymap["keyboard"]}', f'KEYMAP={user_keymap["keymap"]}', f'KEYBOARD_FILESAFE={keyboard_filesafe}', @@ -223,3 +255,80 @@ def parse_configurator_json(configurator_file): user_keymap['layout'] = aliases[orig_keyboard]['layouts'][user_keymap['layout']] return user_keymap + + +def git_get_username(): + """Retrieves user's username from Git config, if set. + """ + git_username = cli.run(['git', 'config', '--get', 'user.name']) + + if git_username.returncode == 0 and git_username.stdout: + return git_username.stdout.strip() + + +def git_check_repo(): + """Checks that the .git directory exists inside QMK_HOME. + + This is a decent enough indicator that the qmk_firmware directory is a + proper Git repository, rather than a .zip download from GitHub. + """ + dot_git_dir = QMK_FIRMWARE / '.git' + + return dot_git_dir.is_dir() + + +def git_get_branch(): + """Returns the current branch for a repo, or None. + """ + git_branch = cli.run(['git', 'branch', '--show-current']) + if not git_branch.returncode != 0 or not git_branch.stdout: + # Workaround for Git pre-2.22 + git_branch = cli.run(['git', 'rev-parse', '--abbrev-ref', 'HEAD']) + + if git_branch.returncode == 0: + return git_branch.stdout.strip() + + +def git_is_dirty(): + """Returns 1 if repo is dirty, or 0 if clean + """ + git_diff_staged_cmd = ['git', 'diff', '--quiet'] + git_diff_unstaged_cmd = [*git_diff_staged_cmd, '--cached'] + + unstaged = cli.run(git_diff_staged_cmd) + staged = cli.run(git_diff_unstaged_cmd) + + return unstaged.returncode != 0 or staged.returncode != 0 + + +def git_get_remotes(): + """Returns the current remotes for a repo. + """ + remotes = {} + + git_remote_show_cmd = ['git', 'remote', 'show'] + git_remote_get_cmd = ['git', 'remote', 'get-url'] + + git_remote_show = cli.run(git_remote_show_cmd) + if git_remote_show.returncode == 0: + for name in git_remote_show.stdout.splitlines(): + git_remote_name = cli.run([*git_remote_get_cmd, name]) + remotes[name.strip()] = {"url": git_remote_name.stdout.strip()} + + return remotes + + +def git_check_deviation(active_branch): + """Return True if branch has custom commits + """ + cli.run(['git', 'fetch', 'upstream', active_branch]) + deviations = cli.run(['git', '--no-pager', 'log', f'upstream/{active_branch}...{active_branch}']) + return bool(deviations.returncode) + + +def in_virtualenv(): + """Check if running inside a virtualenv. + Based on https://stackoverflow.com/a/1883251 + """ + active_prefix = getattr(sys, "base_prefix", None) or getattr(sys, "real_prefix", None) or sys.prefix + return active_prefix != sys.prefix diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py index 49e5e0eb4..71a6c91c7 100644 --- a/lib/python/qmk/constants.py +++ b/lib/python/qmk/constants.py @@ -6,11 +6,14 @@ from pathlib import Path # The root of the qmk_firmware tree. QMK_FIRMWARE = Path.cwd() +# Upstream repo url +QMK_FIRMWARE_UPSTREAM = 'qmk/qmk_firmware' + # This is the number of directories under `qmk_firmware/keyboards` that will be traversed. This is currently a limitation of our make system. MAX_KEYBOARD_SUBFOLDERS = 5 # Supported processor types -CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F411', 'STM32F446', 'STM32G431', 'STM32G474', 'STM32L433', 'STM32L443' +CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F407', 'STM32F411', 'STM32F446', 'STM32G431', 'STM32G474', 'STM32L412', 'STM32L422', 'STM32L433', 'STM32L443' LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85' diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 5fc14dc85..7f3aabdc3 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -9,7 +9,7 @@ from milc import cli from qmk.constants import CHIBIOS_PROCESSORS, LUFA_PROCESSORS, VUSB_PROCESSORS from qmk.c_parse import find_layouts -from qmk.json_schema import deep_update, json_load, keyboard_validate, keyboard_api_validate +from qmk.json_schema import deep_update, json_load, validate from qmk.keyboard import config_h, rules_mk from qmk.keymap import list_keymaps from qmk.makefile import parse_rules_mk_file @@ -49,7 +49,7 @@ def info_json(keyboard): info_data['keymaps'][keymap.name] = {'url': f'https://raw.githubusercontent.com/qmk/qmk_firmware/master/{keymap}/keymap.json'} # Populate layout data - layouts, aliases = _find_all_layouts(info_data, keyboard) + layouts, aliases = _search_keyboard_h(keyboard) if aliases: info_data['layout_aliases'] = aliases @@ -61,12 +61,15 @@ def info_json(keyboard): # Merge in the data from info.json, config.h, and rules.mk info_data = merge_info_jsons(keyboard, info_data) - info_data = _extract_config_h(info_data) info_data = _extract_rules_mk(info_data) + info_data = _extract_config_h(info_data) + + # Ensure that we have matrix row and column counts + info_data = _matrix_size(info_data) # Validate against the jsonschema try: - keyboard_api_validate(info_data) + validate(info_data, 'qmk.api.keyboard.v1') except jsonschema.ValidationError as e: json_path = '.'.join([str(p) for p in e.absolute_path]) @@ -74,6 +77,9 @@ def info_json(keyboard): exit(1) # Make sure we have at least one layout + if not info_data.get('layouts'): + _find_missing_layouts(info_data, keyboard) + if not info_data.get('layouts'): _log_error(info_data, 'No LAYOUTs defined! Need at least one layout defined in the keyboard.h or info.json.') @@ -90,6 +96,9 @@ def info_json(keyboard): if layout_name not in info_data.get('layouts', {}) and layout_name not in info_data.get('layout_aliases', {}): _log_error(info_data, 'Claims to support community layout %s but no %s() macro found' % (layout, layout_name)) + # Check that the reported matrix size is consistent with the actual matrix size + _check_matrix(info_data) + return info_data @@ -143,10 +152,7 @@ def _pin_name(pin): elif pin == 'NO_PIN': return None - elif pin[0] in 'ABCDEFGHIJK' and pin[1].isdigit(): - return pin - - raise ValueError(f'Invalid pin: {pin}') + return pin def _extract_pins(pins): @@ -155,10 +161,9 @@ def _extract_pins(pins): return [_pin_name(pin) for pin in pins.split(',')] -def _extract_direct_matrix(info_data, direct_pins): +def _extract_direct_matrix(direct_pins): """ """ - info_data['matrix_pins'] = {} direct_pin_array = [] while direct_pins[-1] != '}': @@ -182,12 +187,157 @@ def _extract_direct_matrix(info_data, direct_pins): return direct_pin_array +def _extract_audio(info_data, config_c): + """Populate data about the audio configuration + """ + audio_pins = [] + + for pin in 'B5', 'B6', 'B7', 'C4', 'C5', 'C6': + if config_c.get(f'{pin}_AUDIO'): + audio_pins.append(pin) + + if audio_pins: + info_data['audio'] = {'pins': audio_pins} + + +def _extract_split_main(info_data, config_c): + """Populate data about the split configuration + """ + # Figure out how the main half is determined + if config_c.get('SPLIT_HAND_PIN') is True: + if 'split' not in info_data: + info_data['split'] = {} + + if 'main' in info_data['split']: + _log_warning(info_data, 'Split main hand is specified in both config.h (SPLIT_HAND_PIN) and info.json (split.main) (Value: %s), the config.h value wins.' % info_data['split']['main']) + + info_data['split']['main'] = 'pin' + + if config_c.get('SPLIT_HAND_MATRIX_GRID'): + if 'split' not in info_data: + info_data['split'] = {} + + if 'main' in info_data['split']: + _log_warning(info_data, 'Split main hand is specified in both config.h (SPLIT_HAND_MATRIX_GRID) and info.json (split.main) (Value: %s), the config.h value wins.' % info_data['split']['main']) + + info_data['split']['main'] = 'matrix_grid' + info_data['split']['matrix_grid'] = _extract_pins(config_c['SPLIT_HAND_MATRIX_GRID']) + + if config_c.get('EE_HANDS') is True: + if 'split' not in info_data: + info_data['split'] = {} + + if 'main' in info_data['split']: + _log_warning(info_data, 'Split main hand is specified in both config.h (EE_HANDS) and info.json (split.main) (Value: %s), the config.h value wins.' % info_data['split']['main']) + + info_data['split']['main'] = 'eeprom' + + if config_c.get('MASTER_RIGHT') is True: + if 'split' not in info_data: + info_data['split'] = {} + + if 'main' in info_data['split']: + _log_warning(info_data, 'Split main hand is specified in both config.h (MASTER_RIGHT) and info.json (split.main) (Value: %s), the config.h value wins.' % info_data['split']['main']) + + info_data['split']['main'] = 'right' + + if config_c.get('MASTER_LEFT') is True: + if 'split' not in info_data: + info_data['split'] = {} + + if 'main' in info_data['split']: + _log_warning(info_data, 'Split main hand is specified in both config.h (MASTER_LEFT) and info.json (split.main) (Value: %s), the config.h value wins.' % info_data['split']['main']) + + info_data['split']['main'] = 'left' + + +def _extract_split_transport(info_data, config_c): + # Figure out the transport method + if config_c.get('USE_I2C') is True: + if 'split' not in info_data: + info_data['split'] = {} + + if 'transport' not in info_data['split']: + info_data['split']['transport'] = {} + + if 'protocol' in info_data['split']['transport']: + _log_warning(info_data, 'Split transport is specified in both config.h (USE_I2C) and info.json (split.transport.protocol) (Value: %s), the config.h value wins.' % info_data['split']['transport']) + + info_data['split']['transport']['protocol'] = 'i2c' + + elif 'protocol' not in info_data.get('split', {}).get('transport', {}): + if 'split' not in info_data: + info_data['split'] = {} + + if 'transport' not in info_data['split']: + info_data['split']['transport'] = {} + + info_data['split']['transport']['protocol'] = 'serial' + + +def _extract_split_right_pins(info_data, config_c): + # Figure out the right half matrix pins + row_pins = config_c.get('MATRIX_ROW_PINS_RIGHT', '').replace('{', '').replace('}', '').strip() + col_pins = config_c.get('MATRIX_COL_PINS_RIGHT', '').replace('{', '').replace('}', '').strip() + unused_pin_text = config_c.get('UNUSED_PINS_RIGHT') + unused_pins = unused_pin_text.replace('{', '').replace('}', '').strip() if isinstance(unused_pin_text, str) else None + direct_pins = config_c.get('DIRECT_PINS_RIGHT', '').replace(' ', '')[1:-1] + + if row_pins and col_pins: + if info_data.get('split', {}).get('matrix_pins', {}).get('right') in info_data: + _log_warning(info_data, 'Right hand matrix data is specified in both info.json and config.h, the config.h values win.') + + if 'split' not in info_data: + info_data['split'] = {} + + if 'matrix_pins' not in info_data['split']: + info_data['split']['matrix_pins'] = {} + + if 'right' not in info_data['split']['matrix_pins']: + info_data['split']['matrix_pins']['right'] = {} + + info_data['split']['matrix_pins']['right'] = { + 'cols': _extract_pins(col_pins), + 'rows': _extract_pins(row_pins), + } + + if direct_pins: + if info_data.get('split', {}).get('matrix_pins', {}).get('right', {}): + _log_warning(info_data, 'Right hand matrix data is specified in both info.json and config.h, the config.h values win.') + + if 'split' not in info_data: + info_data['split'] = {} + + if 'matrix_pins' not in info_data['split']: + info_data['split']['matrix_pins'] = {} + + if 'right' not in info_data['split']['matrix_pins']: + info_data['split']['matrix_pins']['right'] = {} + + info_data['split']['matrix_pins']['right']['direct'] = _extract_direct_matrix(direct_pins) + + if unused_pins: + if 'split' not in info_data: + info_data['split'] = {} + + if 'matrix_pins' not in info_data['split']: + info_data['split']['matrix_pins'] = {} + + if 'right' not in info_data['split']['matrix_pins']: + info_data['split']['matrix_pins']['right'] = {} + + info_data['split']['matrix_pins']['right']['unused'] = _extract_pins(unused_pins) + + def _extract_matrix_info(info_data, config_c): """Populate the matrix information. """ row_pins = config_c.get('MATRIX_ROW_PINS', '').replace('{', '').replace('}', '').strip() col_pins = config_c.get('MATRIX_COL_PINS', '').replace('{', '').replace('}', '').strip() + unused_pin_text = config_c.get('UNUSED_PINS') + unused_pins = unused_pin_text.replace('{', '').replace('}', '').strip() if isinstance(unused_pin_text, str) else None direct_pins = config_c.get('DIRECT_PINS', '').replace(' ', '')[1:-1] + info_snippet = {} if 'MATRIX_ROWS' in config_c and 'MATRIX_COLS' in config_c: if 'matrix_size' in info_data: @@ -199,19 +349,35 @@ def _extract_matrix_info(info_data, config_c): } if row_pins and col_pins: - if 'matrix_pins' in info_data: + if 'matrix_pins' in info_data and 'cols' in info_data['matrix_pins'] and 'rows' in info_data['matrix_pins']: _log_warning(info_data, 'Matrix pins are specified in both info.json and config.h, the config.h values win.') - info_data['matrix_pins'] = { - 'cols': _extract_pins(col_pins), - 'rows': _extract_pins(row_pins), - } + info_snippet['cols'] = _extract_pins(col_pins) + info_snippet['rows'] = _extract_pins(row_pins) if direct_pins: - if 'matrix_pins' in info_data: + if 'matrix_pins' in info_data and 'direct' in info_data['matrix_pins']: _log_warning(info_data, 'Direct pins are specified in both info.json and config.h, the config.h values win.') - info_data['matrix_pins']['direct'] = _extract_direct_matrix(info_data, direct_pins) + info_snippet['direct'] = _extract_direct_matrix(direct_pins) + + if unused_pins: + if 'matrix_pins' not in info_data: + info_data['matrix_pins'] = {} + + info_snippet['unused'] = _extract_pins(unused_pins) + + if config_c.get('CUSTOM_MATRIX', 'no') != 'no': + if 'matrix_pins' in info_data and 'custom' in info_data['matrix_pins']: + _log_warning(info_data, 'Custom Matrix is specified in both info.json and config.h, the config.h values win.') + + info_snippet['custom'] = True + + if config_c['CUSTOM_MATRIX'] == 'lite': + info_snippet['custom_lite'] = True + + if info_snippet: + info_data['matrix_pins'] = info_snippet return info_data @@ -269,6 +435,10 @@ def _extract_config_h(info_data): # Pull data that easily can't be mapped in json _extract_matrix_info(info_data, config_c) + _extract_audio(info_data, config_c) + _extract_split_main(info_data, config_c) + _extract_split_transport(info_data, config_c) + _extract_split_right_pins(info_data, config_c) return info_data @@ -341,12 +511,53 @@ def _extract_rules_mk(info_data): return info_data -def _search_keyboard_h(path): +def _matrix_size(info_data): + """Add info_data['matrix_size'] if it doesn't exist. + """ + if 'matrix_size' not in info_data and 'matrix_pins' in info_data: + info_data['matrix_size'] = {} + + if 'direct' in info_data['matrix_pins']: + info_data['matrix_size']['cols'] = len(info_data['matrix_pins']['direct'][0]) + info_data['matrix_size']['rows'] = len(info_data['matrix_pins']['direct']) + elif 'cols' in info_data['matrix_pins'] and 'rows' in info_data['matrix_pins']: + info_data['matrix_size']['cols'] = len(info_data['matrix_pins']['cols']) + info_data['matrix_size']['rows'] = len(info_data['matrix_pins']['rows']) + + return info_data + + +def _check_matrix(info_data): + """Check the matrix to ensure that row/column count is consistent. + """ + if 'matrix_pins' in info_data and 'matrix_size' in info_data: + actual_col_count = info_data['matrix_size'].get('cols', 0) + actual_row_count = info_data['matrix_size'].get('rows', 0) + col_count = row_count = 0 + + if 'direct' in info_data['matrix_pins']: + col_count = len(info_data['matrix_pins']['direct'][0]) + row_count = len(info_data['matrix_pins']['direct']) + elif 'cols' in info_data['matrix_pins'] and 'rows' in info_data['matrix_pins']: + col_count = len(info_data['matrix_pins']['cols']) + row_count = len(info_data['matrix_pins']['rows']) + + if col_count != actual_col_count and col_count != (actual_col_count / 2): + # FIXME: once we can we should detect if split is enabled to do the actual_col_count/2 check. + _log_error(info_data, f'MATRIX_COLS is inconsistent with the size of MATRIX_COL_PINS: {col_count} != {actual_col_count}') + + if row_count != actual_row_count and row_count != (actual_row_count / 2): + # FIXME: once we can we should detect if split is enabled to do the actual_row_count/2 check. + _log_error(info_data, f'MATRIX_ROWS is inconsistent with the size of MATRIX_ROW_PINS: {row_count} != {actual_row_count}') + + +def _search_keyboard_h(keyboard): + keyboard = Path(keyboard) current_path = Path('keyboards/') aliases = {} layouts = {} - for directory in path.parts: + for directory in keyboard.parts: current_path = current_path / directory keyboard_h = '%s.h' % (directory,) keyboard_h_path = current_path / keyboard_h @@ -361,27 +572,28 @@ def _search_keyboard_h(path): return layouts, aliases -def _find_all_layouts(info_data, keyboard): - """Looks for layout macros associated with this keyboard. +def _find_missing_layouts(info_data, keyboard): + """Looks for layout macros when they aren't found other places. + + If we don't find any layouts from info.json or keyboard.h we widen our search. This is error prone which is why we want to encourage people to follow the standard above. """ - layouts, aliases = _search_keyboard_h(Path(keyboard)) + _log_warning(info_data, '%s: Falling back to searching for KEYMAP/LAYOUT macros.' % (keyboard)) - if not layouts: - # If we don't find any layouts from info.json or keyboard.h we widen our search. This is error prone which is why we want to encourage people to follow the standard above. - info_data['parse_warnings'].append('%s: Falling back to searching for KEYMAP/LAYOUT macros.' % (keyboard)) + for file in glob('keyboards/%s/*.h' % keyboard): + these_layouts, these_aliases = find_layouts(file) - for file in glob('keyboards/%s/*.h' % keyboard): - if file.endswith('.h'): - these_layouts, these_aliases = find_layouts(file) + if these_layouts: + for layout_name, layout_json in these_layouts.items(): + if not layout_name.startswith('LAYOUT_kc'): + layout_json['c_macro'] = True + info_data['layouts'][layout_name] = layout_json - if these_layouts: - layouts.update(these_layouts) + for alias, alias_text in these_aliases.items(): + if alias_text in these_layouts: + if 'layout_aliases' not in info_data: + info_data['layout_aliases'] = {} - for alias, alias_text in these_aliases.items(): - if alias_text in layouts: - aliases[alias] = alias_text - - return layouts, aliases + info_data['layout_aliases'][alias] = alias_text def _log_error(info_data, message): @@ -460,7 +672,7 @@ def merge_info_jsons(keyboard, info_data): continue try: - keyboard_validate(new_info_data) + validate(new_info_data, 'qmk.keyboard.v1') except jsonschema.ValidationError as e: json_path = '.'.join([str(p) for p in e.absolute_path]) cli.log.error('Not including data from file: %s', info_file) diff --git a/lib/python/qmk/json_encoders.py b/lib/python/qmk/json_encoders.py index 9f3da022b..72e91973a 100755 --- a/lib/python/qmk/json_encoders.py +++ b/lib/python/qmk/json_encoders.py @@ -102,9 +102,6 @@ class InfoJSONEncoder(QMKJSONEncoder): elif key == 'maintainer': return '12maintainer' - elif key in ('height', 'width'): - return '40' + str(key) - elif key == 'community_layouts': return '97community_layouts' diff --git a/lib/python/qmk/json_schema.py b/lib/python/qmk/json_schema.py index f3992ee71..ffc7c6bcd 100644 --- a/lib/python/qmk/json_schema.py +++ b/lib/python/qmk/json_schema.py @@ -2,6 +2,7 @@ """ import json from collections.abc import Mapping +from functools import lru_cache from pathlib import Path import hjson @@ -25,11 +26,13 @@ def json_load(json_file): exit(1) +@lru_cache(maxsize=0) def load_jsonschema(schema_name): """Read a jsonschema file from disk. - - FIXME(skullydazed/anyone): Refactor to make this a public function. """ + if Path(schema_name).exists(): + return json_load(schema_name) + schema_path = Path(f'data/schemas/{schema_name}.jsonschema') if not schema_path.exists(): @@ -38,28 +41,42 @@ def load_jsonschema(schema_name): return json_load(schema_path) -def keyboard_validate(data): - """Validates data against the keyboard jsonschema. +@lru_cache(maxsize=0) +def compile_schema_store(): + """Compile all our schemas into a schema store. """ - schema = load_jsonschema('keyboard') - validator = jsonschema.Draft7Validator(schema).validate + schema_store = {} - return validator(data) + for schema_file in Path('data/schemas').glob('*.jsonschema'): + schema_data = load_jsonschema(schema_file) + if not isinstance(schema_data, dict): + cli.log.debug('Skipping schema file %s', schema_file) + continue + schema_store[schema_data['$id']] = schema_data + + return schema_store -def keyboard_api_validate(data): - """Validates data against the api_keyboard jsonschema. +@lru_cache(maxsize=0) +def create_validator(schema): + """Creates a validator for the given schema id. """ - base = load_jsonschema('keyboard') - relative = load_jsonschema('api_keyboard') - resolver = jsonschema.RefResolver.from_schema(base) - validator = jsonschema.Draft7Validator(relative, resolver=resolver).validate + schema_store = compile_schema_store() + resolver = jsonschema.RefResolver.from_schema(schema_store['qmk.keyboard.v1'], store=schema_store) + + return jsonschema.Draft7Validator(schema_store[schema], resolver=resolver).validate + + +def validate(data, schema): + """Validates data against a schema. + """ + validator = create_validator(schema) return validator(data) def deep_update(origdict, newdict): - """Update a dictionary in place, recursing to do a deep copy. + """Update a dictionary in place, recursing to do a depth-first deep copy. """ for key, value in newdict.items(): if isinstance(value, Mapping): diff --git a/lib/python/qmk/os_helpers/__init__.py b/lib/python/qmk/os_helpers/__init__.py deleted file mode 100644 index 3e98db3c3..000000000 --- a/lib/python/qmk/os_helpers/__init__.py +++ /dev/null @@ -1,164 +0,0 @@ -"""OS-agnostic helper functions -""" -from enum import Enum -import re -import shutil -from subprocess import DEVNULL - -from milc import cli -from qmk import submodules -from qmk.constants import QMK_FIRMWARE - - -class CheckStatus(Enum): - OK = 1 - WARNING = 2 - ERROR = 3 - - -ESSENTIAL_BINARIES = { - 'dfu-programmer': {}, - 'avrdude': {}, - 'dfu-util': {}, - 'avr-gcc': { - 'version_arg': '-dumpversion' - }, - 'arm-none-eabi-gcc': { - 'version_arg': '-dumpversion' - }, - 'bin/qmk': {}, -} - - -def parse_gcc_version(version): - m = re.match(r"(\d+)(?:\.(\d+))?(?:\.(\d+))?", version) - - return { - 'major': int(m.group(1)), - 'minor': int(m.group(2)) if m.group(2) else 0, - 'patch': int(m.group(3)) if m.group(3) else 0, - } - - -def check_arm_gcc_version(): - """Returns True if the arm-none-eabi-gcc version is not known to cause problems. - """ - if 'output' in ESSENTIAL_BINARIES['arm-none-eabi-gcc']: - version_number = ESSENTIAL_BINARIES['arm-none-eabi-gcc']['output'].strip() - cli.log.info('Found arm-none-eabi-gcc version %s', version_number) - - return CheckStatus.OK # Right now all known arm versions are ok - - -def check_avr_gcc_version(): - """Returns True if the avr-gcc version is not known to cause problems. - """ - rc = CheckStatus.ERROR - if 'output' in ESSENTIAL_BINARIES['avr-gcc']: - version_number = ESSENTIAL_BINARIES['avr-gcc']['output'].strip() - - cli.log.info('Found avr-gcc version %s', version_number) - rc = CheckStatus.OK - - parsed_version = parse_gcc_version(version_number) - if parsed_version['major'] > 8: - cli.log.warning('{fg_yellow}We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.') - rc = CheckStatus.WARNING - - return rc - - -def check_avrdude_version(): - if 'output' in ESSENTIAL_BINARIES['avrdude']: - last_line = ESSENTIAL_BINARIES['avrdude']['output'].split('\n')[-2] - version_number = last_line.split()[2][:-1] - cli.log.info('Found avrdude version %s', version_number) - - return CheckStatus.OK - - -def check_dfu_util_version(): - if 'output' in ESSENTIAL_BINARIES['dfu-util']: - first_line = ESSENTIAL_BINARIES['dfu-util']['output'].split('\n')[0] - version_number = first_line.split()[1] - cli.log.info('Found dfu-util version %s', version_number) - - return CheckStatus.OK - - -def check_dfu_programmer_version(): - if 'output' in ESSENTIAL_BINARIES['dfu-programmer']: - first_line = ESSENTIAL_BINARIES['dfu-programmer']['output'].split('\n')[0] - version_number = first_line.split()[1] - cli.log.info('Found dfu-programmer version %s', version_number) - - return CheckStatus.OK - - -def check_binaries(): - """Iterates through ESSENTIAL_BINARIES and tests them. - """ - ok = True - - for binary in sorted(ESSENTIAL_BINARIES): - if not is_executable(binary): - ok = False - - return ok - - -def check_binary_versions(): - """Check the versions of ESSENTIAL_BINARIES - """ - versions = [] - for check in (check_arm_gcc_version, check_avr_gcc_version, check_avrdude_version, check_dfu_util_version, check_dfu_programmer_version): - versions.append(check()) - return versions - - -def check_submodules(): - """Iterates through all submodules to make sure they're cloned and up to date. - """ - for submodule in submodules.status().values(): - if submodule['status'] is None: - cli.log.error('Submodule %s has not yet been cloned!', submodule['name']) - return CheckStatus.ERROR - elif not submodule['status']: - cli.log.warning('Submodule %s is not up to date!', submodule['name']) - return CheckStatus.WARNING - - return CheckStatus.OK - - -def is_executable(command): - """Returns True if command exists and can be executed. - """ - # Make sure the command is in the path. - res = shutil.which(command) - if res is None: - cli.log.error("{fg_red}Can't find %s in your path.", command) - return False - - # Make sure the command can be executed - version_arg = ESSENTIAL_BINARIES[command].get('version_arg', '--version') - check = cli.run([command, version_arg], combined_output=True, stdin=DEVNULL, timeout=5) - - ESSENTIAL_BINARIES[command]['output'] = check.stdout - - if check.returncode in [0, 1]: # Older versions of dfu-programmer exit 1 - cli.log.debug('Found {fg_cyan}%s', command) - return True - - cli.log.error("{fg_red}Can't run `%s %s`", command, version_arg) - return False - - -def check_git_repo(): - """Checks that the .git directory exists inside QMK_HOME. - - This is a decent enough indicator that the qmk_firmware directory is a - proper Git repository, rather than a .zip download from GitHub. - """ - dot_git_dir = QMK_FIRMWARE / '.git' - - return CheckStatus.OK if dot_git_dir.is_dir() else CheckStatus.WARNING diff --git a/lib/python/qmk/os_helpers/linux/__init__.py b/lib/python/qmk/os_helpers/linux/__init__.py deleted file mode 100644 index 008654ab0..000000000 --- a/lib/python/qmk/os_helpers/linux/__init__.py +++ /dev/null @@ -1,140 +0,0 @@ -"""OS-specific functions for: Linux -""" -from pathlib import Path -import shutil - -from milc import cli -from qmk.constants import QMK_FIRMWARE -from qmk.os_helpers import CheckStatus - - -def _udev_rule(vid, pid=None, *args): - """ Helper function that return udev rules - """ - rule = "" - if pid: - rule = 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", ATTRS{idProduct}=="%s", TAG+="uaccess"' % ( - vid, - pid, - ) - else: - rule = 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", TAG+="uaccess"' % vid - if args: - rule = ', '.join([rule, *args]) - return rule - - -def _deprecated_udev_rule(vid, pid=None): - """ Helper function that return udev rules - - Note: these are no longer the recommended rules, this is just used to check for them - """ - if pid: - return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", ATTRS{idProduct}=="%s", MODE:="0666"' % (vid, pid) - else: - return 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="%s", MODE:="0666"' % vid - - -def check_udev_rules(): - """Make sure the udev rules look good. - """ - rc = CheckStatus.OK - udev_dir = Path("/etc/udev/rules.d/") - desired_rules = { - 'atmel-dfu': { - _udev_rule("03eb", "2fef"), # ATmega16U2 - _udev_rule("03eb", "2ff0"), # ATmega32U2 - _udev_rule("03eb", "2ff3"), # ATmega16U4 - _udev_rule("03eb", "2ff4"), # ATmega32U4 - _udev_rule("03eb", "2ff9"), # AT90USB64 - _udev_rule("03eb", "2ffa"), # AT90USB162 - _udev_rule("03eb", "2ffb") # AT90USB128 - }, - 'kiibohd': {_udev_rule("1c11", "b007")}, - 'stm32': { - _udev_rule("1eaf", "0003"), # STM32duino - _udev_rule("0483", "df11") # STM32 DFU - }, - 'bootloadhid': {_udev_rule("16c0", "05df")}, - 'usbasploader': {_udev_rule("16c0", "05dc")}, - 'massdrop': {_udev_rule("03eb", "6124", 'ENV{ID_MM_DEVICE_IGNORE}="1"')}, - 'caterina': { - # Spark Fun Electronics - _udev_rule("1b4f", "9203", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 3V3/8MHz - _udev_rule("1b4f", "9205", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Pro Micro 5V/16MHz - _udev_rule("1b4f", "9207", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # LilyPad 3V3/8MHz (and some Pro Micro clones) - # Pololu Electronics - _udev_rule("1ffb", "0101", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # A-Star 32U4 - # Arduino SA - _udev_rule("2341", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo - _udev_rule("2341", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Micro - # Adafruit Industries LLC - _udev_rule("239a", "000c", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Feather 32U4 - _udev_rule("239a", "000d", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 3V3/8MHz - _udev_rule("239a", "000e", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # ItsyBitsy 32U4 5V/16MHz - # dog hunter AG - _udev_rule("2a03", "0036", 'ENV{ID_MM_DEVICE_IGNORE}="1"'), # Leonardo - _udev_rule("2a03", "0037", 'ENV{ID_MM_DEVICE_IGNORE}="1"') # Micro - } - } - - # These rules are no longer recommended, only use them to check for their presence. - deprecated_rules = { - 'atmel-dfu': {_deprecated_udev_rule("03eb", "2ff4"), _deprecated_udev_rule("03eb", "2ffb"), _deprecated_udev_rule("03eb", "2ff0")}, - 'kiibohd': {_deprecated_udev_rule("1c11")}, - 'stm32': {_deprecated_udev_rule("1eaf", "0003"), _deprecated_udev_rule("0483", "df11")}, - 'bootloadhid': {_deprecated_udev_rule("16c0", "05df")}, - 'caterina': {'ATTRS{idVendor}=="2a03", ENV{ID_MM_DEVICE_IGNORE}="1"', 'ATTRS{idVendor}=="2341", ENV{ID_MM_DEVICE_IGNORE}="1"'}, - 'tmk': {_deprecated_udev_rule("feed")} - } - - if udev_dir.exists(): - udev_rules = [rule_file for rule_file in udev_dir.glob('*.rules')] - current_rules = set() - - # Collect all rules from the config files - for rule_file in udev_rules: - for line in rule_file.read_text(encoding='utf-8').split('\n'): - line = line.strip() - if not line.startswith("#") and len(line): - current_rules.add(line) - - # Check if the desired rules are among the currently present rules - for bootloader, rules in desired_rules.items(): - if not rules.issubset(current_rules): - deprecated_rule = deprecated_rules.get(bootloader) - if deprecated_rule and deprecated_rule.issubset(current_rules): - cli.log.warning("{fg_yellow}Found old, deprecated udev rules for '%s' boards. The new rules on https://docs.qmk.fm/#/faq_build?id=linux-udev-rules offer better security with the same functionality.", bootloader) - else: - # For caterina, check if ModemManager is running - if bootloader == "caterina": - if check_modem_manager(): - rc = CheckStatus.WARNING - cli.log.warning("{fg_yellow}Detected ModemManager without the necessary udev rules. Please either disable it or set the appropriate udev rules if you are using a Pro Micro.") - rc = CheckStatus.WARNING - cli.log.warning("{fg_yellow}Missing or outdated udev rules for '%s' boards. Run 'sudo cp %s/util/udev/50-qmk.rules /etc/udev/rules.d/'.", bootloader, QMK_FIRMWARE) - - else: - cli.log.warning("{fg_yellow}'%s' does not exist. Skipping udev rule checking...", udev_dir) - - return rc - - -def check_systemd(): - """Check if it's a systemd system - """ - return bool(shutil.which("systemctl")) - - -def check_modem_manager(): - """Returns True if ModemManager is running. - - """ - if check_systemd(): - mm_check = cli.run(["systemctl", "--quiet", "is-active", "ModemManager.service"], timeout=10) - if mm_check.returncode == 0: - return True - else: - """(TODO): Add check for non-systemd systems - """ - return False diff --git a/lib/python/qmk/tests/minimal_info.json b/lib/python/qmk/tests/minimal_info.json index b91c23bd3..11ef12fef 100644 --- a/lib/python/qmk/tests/minimal_info.json +++ b/lib/python/qmk/tests/minimal_info.json @@ -1,8 +1,6 @@ { "keyboard_name": "tester", "maintainer": "qmk", - "height": 5, - "width": 15, "layouts": { "LAYOUT": { "layout": [ diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index afdbc8142..b39fe5e46 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -31,13 +31,13 @@ def check_returncode(result, expected=[0]): assert result.returncode in expected -def test_cformat(): - result = check_subcommand('cformat', '-n', 'quantum/matrix.c') +def test_format_c(): + result = check_subcommand('format-c', '-n', 'quantum/matrix.c') check_returncode(result) -def test_cformat_all(): - result = check_subcommand('cformat', '-n', '-a') +def test_format_c_all(): + result = check_subcommand('format-c', '-n', '-a') check_returncode(result, [0, 1]) @@ -80,8 +80,8 @@ def test_hello(): assert 'Hello,' in result.stdout -def test_pyformat(): - result = check_subcommand('pyformat', '--dry-run') +def test_format_python(): + result = check_subcommand('format-python', '--dry-run') check_returncode(result) assert 'Python code in `bin/qmk` and `lib/python` is correctly formatted.' in result.stdout @@ -258,6 +258,12 @@ def test_generate_rules_mk(): assert 'MCU ?= atmega32u4' in result.stdout +def test_generate_version_h(): + result = check_subcommand('generate-version-h') + check_returncode(result) + assert '#define QMK_VERSION' in result.stdout + + def test_generate_layouts(): result = check_subcommand('generate-layouts', '-kb', 'handwired/pytest/basic') check_returncode(result) @@ -267,7 +273,7 @@ def test_generate_layouts(): def test_format_json_keyboard(): result = check_subcommand('format-json', '--format', 'keyboard', 'lib/python/qmk/tests/minimal_info.json') check_returncode(result) - assert result.stdout == '{\n "keyboard_name": "tester",\n "maintainer": "qmk",\n "height": 5,\n "width": 15,\n "layouts": {\n "LAYOUT": {\n "layout": [\n { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 }\n ]\n }\n }\n}\n' + assert result.stdout == '{\n "keyboard_name": "tester",\n "maintainer": "qmk",\n "layouts": {\n "LAYOUT": {\n "layout": [\n { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 }\n ]\n }\n }\n}\n' def test_format_json_keymap(): @@ -279,7 +285,7 @@ def test_format_json_keymap(): def test_format_json_keyboard_auto(): result = check_subcommand('format-json', '--format', 'auto', 'lib/python/qmk/tests/minimal_info.json') check_returncode(result) - assert result.stdout == '{\n "keyboard_name": "tester",\n "maintainer": "qmk",\n "height": 5,\n "width": 15,\n "layouts": {\n "LAYOUT": {\n "layout": [\n { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 }\n ]\n }\n }\n}\n' + assert result.stdout == '{\n "keyboard_name": "tester",\n "maintainer": "qmk",\n "layouts": {\n "LAYOUT": {\n "layout": [\n { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 }\n ]\n }\n }\n}\n' def test_format_json_keymap_auto(): diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/.gitattributes b/lib/usbhost/USB_Host_Shield_2.0/.gitattributes similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/.gitattributes rename to lib/usbhost/USB_Host_Shield_2.0/.gitattributes diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/.gitignore b/lib/usbhost/USB_Host_Shield_2.0/.gitignore similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/.gitignore rename to lib/usbhost/USB_Host_Shield_2.0/.gitignore diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/.gitmodules b/lib/usbhost/USB_Host_Shield_2.0/.gitmodules similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/.gitmodules rename to lib/usbhost/USB_Host_Shield_2.0/.gitmodules diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/BTD.cpp b/lib/usbhost/USB_Host_Shield_2.0/BTD.cpp old mode 100755 new mode 100644 similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/BTD.cpp rename to lib/usbhost/USB_Host_Shield_2.0/BTD.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/BTD.h b/lib/usbhost/USB_Host_Shield_2.0/BTD.h old mode 100755 new mode 100644 similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/BTD.h rename to lib/usbhost/USB_Host_Shield_2.0/BTD.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/BTHID.cpp b/lib/usbhost/USB_Host_Shield_2.0/BTHID.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/BTHID.cpp rename to lib/usbhost/USB_Host_Shield_2.0/BTHID.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/BTHID.h b/lib/usbhost/USB_Host_Shield_2.0/BTHID.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/BTHID.h rename to lib/usbhost/USB_Host_Shield_2.0/BTHID.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS3BT.cpp b/lib/usbhost/USB_Host_Shield_2.0/PS3BT.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS3BT.cpp rename to lib/usbhost/USB_Host_Shield_2.0/PS3BT.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS3BT.h b/lib/usbhost/USB_Host_Shield_2.0/PS3BT.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS3BT.h rename to lib/usbhost/USB_Host_Shield_2.0/PS3BT.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS3Enums.h b/lib/usbhost/USB_Host_Shield_2.0/PS3Enums.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS3Enums.h rename to lib/usbhost/USB_Host_Shield_2.0/PS3Enums.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS3USB.cpp b/lib/usbhost/USB_Host_Shield_2.0/PS3USB.cpp old mode 100755 new mode 100644 similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS3USB.cpp rename to lib/usbhost/USB_Host_Shield_2.0/PS3USB.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS3USB.h b/lib/usbhost/USB_Host_Shield_2.0/PS3USB.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS3USB.h rename to lib/usbhost/USB_Host_Shield_2.0/PS3USB.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS4BT.h b/lib/usbhost/USB_Host_Shield_2.0/PS4BT.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS4BT.h rename to lib/usbhost/USB_Host_Shield_2.0/PS4BT.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS4Parser.cpp b/lib/usbhost/USB_Host_Shield_2.0/PS4Parser.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS4Parser.cpp rename to lib/usbhost/USB_Host_Shield_2.0/PS4Parser.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS4Parser.h b/lib/usbhost/USB_Host_Shield_2.0/PS4Parser.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS4Parser.h rename to lib/usbhost/USB_Host_Shield_2.0/PS4Parser.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS4USB.h b/lib/usbhost/USB_Host_Shield_2.0/PS4USB.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PS4USB.h rename to lib/usbhost/USB_Host_Shield_2.0/PS4USB.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PSBuzz.cpp b/lib/usbhost/USB_Host_Shield_2.0/PSBuzz.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PSBuzz.cpp rename to lib/usbhost/USB_Host_Shield_2.0/PSBuzz.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PSBuzz.h b/lib/usbhost/USB_Host_Shield_2.0/PSBuzz.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/PSBuzz.h rename to lib/usbhost/USB_Host_Shield_2.0/PSBuzz.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/README.md b/lib/usbhost/USB_Host_Shield_2.0/README.md similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/README.md rename to lib/usbhost/USB_Host_Shield_2.0/README.md diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/SPP.cpp b/lib/usbhost/USB_Host_Shield_2.0/SPP.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/SPP.cpp rename to lib/usbhost/USB_Host_Shield_2.0/SPP.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/SPP.h b/lib/usbhost/USB_Host_Shield_2.0/SPP.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/SPP.h rename to lib/usbhost/USB_Host_Shield_2.0/SPP.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/Usb.cpp b/lib/usbhost/USB_Host_Shield_2.0/Usb.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/Usb.cpp rename to lib/usbhost/USB_Host_Shield_2.0/Usb.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/Usb.h b/lib/usbhost/USB_Host_Shield_2.0/Usb.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/Usb.h rename to lib/usbhost/USB_Host_Shield_2.0/Usb.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/UsbCore.h b/lib/usbhost/USB_Host_Shield_2.0/UsbCore.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/UsbCore.h rename to lib/usbhost/USB_Host_Shield_2.0/UsbCore.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/Wii.cpp b/lib/usbhost/USB_Host_Shield_2.0/Wii.cpp old mode 100755 new mode 100644 similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/Wii.cpp rename to lib/usbhost/USB_Host_Shield_2.0/Wii.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/Wii.h b/lib/usbhost/USB_Host_Shield_2.0/Wii.h old mode 100755 new mode 100644 similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/Wii.h rename to lib/usbhost/USB_Host_Shield_2.0/Wii.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/WiiCameraReadme.md b/lib/usbhost/USB_Host_Shield_2.0/WiiCameraReadme.md similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/WiiCameraReadme.md rename to lib/usbhost/USB_Host_Shield_2.0/WiiCameraReadme.md diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXOLD.cpp b/lib/usbhost/USB_Host_Shield_2.0/XBOXOLD.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXOLD.cpp rename to lib/usbhost/USB_Host_Shield_2.0/XBOXOLD.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXOLD.h b/lib/usbhost/USB_Host_Shield_2.0/XBOXOLD.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXOLD.h rename to lib/usbhost/USB_Host_Shield_2.0/XBOXOLD.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXONE.cpp b/lib/usbhost/USB_Host_Shield_2.0/XBOXONE.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXONE.cpp rename to lib/usbhost/USB_Host_Shield_2.0/XBOXONE.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXONE.h b/lib/usbhost/USB_Host_Shield_2.0/XBOXONE.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXONE.h rename to lib/usbhost/USB_Host_Shield_2.0/XBOXONE.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXRECV.cpp b/lib/usbhost/USB_Host_Shield_2.0/XBOXRECV.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXRECV.cpp rename to lib/usbhost/USB_Host_Shield_2.0/XBOXRECV.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXRECV.h b/lib/usbhost/USB_Host_Shield_2.0/XBOXRECV.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXRECV.h rename to lib/usbhost/USB_Host_Shield_2.0/XBOXRECV.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXUSB.cpp b/lib/usbhost/USB_Host_Shield_2.0/XBOXUSB.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXUSB.cpp rename to lib/usbhost/USB_Host_Shield_2.0/XBOXUSB.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXUSB.h b/lib/usbhost/USB_Host_Shield_2.0/XBOXUSB.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/XBOXUSB.h rename to lib/usbhost/USB_Host_Shield_2.0/XBOXUSB.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/address.h b/lib/usbhost/USB_Host_Shield_2.0/address.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/address.h rename to lib/usbhost/USB_Host_Shield_2.0/address.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/adk.cpp b/lib/usbhost/USB_Host_Shield_2.0/adk.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/adk.cpp rename to lib/usbhost/USB_Host_Shield_2.0/adk.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/adk.h b/lib/usbhost/USB_Host_Shield_2.0/adk.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/adk.h rename to lib/usbhost/USB_Host_Shield_2.0/adk.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/avrpins.h b/lib/usbhost/USB_Host_Shield_2.0/avrpins.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/avrpins.h rename to lib/usbhost/USB_Host_Shield_2.0/avrpins.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdc_XR21B1411.cpp b/lib/usbhost/USB_Host_Shield_2.0/cdc_XR21B1411.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdc_XR21B1411.cpp rename to lib/usbhost/USB_Host_Shield_2.0/cdc_XR21B1411.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdc_XR21B1411.h b/lib/usbhost/USB_Host_Shield_2.0/cdc_XR21B1411.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdc_XR21B1411.h rename to lib/usbhost/USB_Host_Shield_2.0/cdc_XR21B1411.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdcacm.cpp b/lib/usbhost/USB_Host_Shield_2.0/cdcacm.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdcacm.cpp rename to lib/usbhost/USB_Host_Shield_2.0/cdcacm.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdcacm.h b/lib/usbhost/USB_Host_Shield_2.0/cdcacm.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdcacm.h rename to lib/usbhost/USB_Host_Shield_2.0/cdcacm.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdcftdi.cpp b/lib/usbhost/USB_Host_Shield_2.0/cdcftdi.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdcftdi.cpp rename to lib/usbhost/USB_Host_Shield_2.0/cdcftdi.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdcftdi.h b/lib/usbhost/USB_Host_Shield_2.0/cdcftdi.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdcftdi.h rename to lib/usbhost/USB_Host_Shield_2.0/cdcftdi.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdcprolific.cpp b/lib/usbhost/USB_Host_Shield_2.0/cdcprolific.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdcprolific.cpp rename to lib/usbhost/USB_Host_Shield_2.0/cdcprolific.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdcprolific.h b/lib/usbhost/USB_Host_Shield_2.0/cdcprolific.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/cdcprolific.h rename to lib/usbhost/USB_Host_Shield_2.0/cdcprolific.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/confdescparser.h b/lib/usbhost/USB_Host_Shield_2.0/confdescparser.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/confdescparser.h rename to lib/usbhost/USB_Host_Shield_2.0/confdescparser.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/controllerEnums.h b/lib/usbhost/USB_Host_Shield_2.0/controllerEnums.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/controllerEnums.h rename to lib/usbhost/USB_Host_Shield_2.0/controllerEnums.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/BTHID/BTHID.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/BTHID/BTHID.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/BTHID/BTHID.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/BTHID/BTHID.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/BTHID/KeyboardParser.h b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/BTHID/KeyboardParser.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/BTHID/KeyboardParser.h rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/BTHID/KeyboardParser.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/BTHID/MouseParser.h b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/BTHID/MouseParser.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/BTHID/MouseParser.h rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/BTHID/MouseParser.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/PS3BT/PS3BT.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/PS3BT/PS3BT.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/PS3BT/PS3BT.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/PS3BT/PS3BT.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/PS3Multi/PS3Multi.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/PS3Multi/PS3Multi.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/PS3Multi/PS3Multi.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/PS3Multi/PS3Multi.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/PS3SPP/PS3SPP.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/PS3SPP/PS3SPP.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/PS3SPP/PS3SPP.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/PS3SPP/PS3SPP.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/PS4BT/PS4BT.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/PS4BT/PS4BT.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/PS4BT/PS4BT.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/PS4BT/PS4BT.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/SPP/SPP.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/SPP/SPP.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/SPP/SPP.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/SPP/SPP.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/SPPMulti/SPPMulti.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/SPPMulti/SPPMulti.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/SPPMulti/SPPMulti.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/SPPMulti/SPPMulti.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/Wii/Wii.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/Wii/Wii.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/Wii/Wii.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/Wii/Wii.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/WiiBalanceBoard/WiiBalanceBoard.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/WiiBalanceBoard/WiiBalanceBoard.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/WiiBalanceBoard/WiiBalanceBoard.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/WiiBalanceBoard/WiiBalanceBoard.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/WiiIRCamera/WiiIRCamera.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/WiiIRCamera/WiiIRCamera.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/WiiIRCamera/WiiIRCamera.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/WiiIRCamera/WiiIRCamera.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/WiiMulti/WiiMulti.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/WiiMulti/WiiMulti.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/WiiMulti/WiiMulti.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/WiiMulti/WiiMulti.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/WiiUProController/WiiUProController.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/WiiUProController/WiiUProController.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Bluetooth/WiiUProController/WiiUProController.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/WiiUProController/WiiUProController.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHIDBootKbdAndMouse/USBHIDBootKbdAndMouse.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHIDBootKbdAndMouse/USBHIDBootKbdAndMouse.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHIDBootKbdAndMouse/USBHIDBootKbdAndMouse.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHIDBootKbdAndMouse/USBHIDBootKbdAndMouse.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHIDBootMouse/USBHIDBootMouse.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHIDBootMouse/USBHIDBootMouse.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHIDBootMouse/USBHIDBootMouse.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHIDBootMouse/USBHIDBootMouse.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHIDJoystick/USBHIDJoystick.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHIDJoystick/USBHIDJoystick.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHIDJoystick/USBHIDJoystick.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHIDJoystick/USBHIDJoystick.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHIDJoystick/hidjoystickrptparser.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHIDJoystick/hidjoystickrptparser.h b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHIDJoystick/hidjoystickrptparser.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHIDJoystick/hidjoystickrptparser.h rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHIDJoystick/hidjoystickrptparser.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHID_desc/USBHID_desc.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHID_desc/USBHID_desc.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHID_desc/USBHID_desc.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHID_desc/USBHID_desc.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHID_desc/pgmstrings.h b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHID_desc/pgmstrings.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/USBHID_desc/pgmstrings.h rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/USBHID_desc/pgmstrings.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.cpp b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.cpp rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.h b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.h rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/scale/scale.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/scale/scale.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/scale/scale.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/scale/scale.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/scale/scale_rptparser.cpp b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/scale/scale_rptparser.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/scale/scale_rptparser.cpp rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/scale/scale_rptparser.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/scale/scale_rptparser.h b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/scale/scale_rptparser.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/scale/scale_rptparser.h rename to lib/usbhost/USB_Host_Shield_2.0/examples/HID/scale/scale_rptparser.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/PS3USB/PS3USB.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/PS3USB/PS3USB.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/PS3USB/PS3USB.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/PS3USB/PS3USB.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/PS4USB/PS4USB.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/PS4USB/PS4USB.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/PS4USB/PS4USB.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/PS4USB/PS4USB.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/PSBuzz/PSBuzz.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/PSBuzz/PSBuzz.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/PSBuzz/PSBuzz.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/PSBuzz/PSBuzz.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/USB_desc/USB_desc.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/USB_desc/USB_desc.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/USB_desc/USB_desc.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/USB_desc/USB_desc.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/USB_desc/pgmstrings.h b/lib/usbhost/USB_Host_Shield_2.0/examples/USB_desc/pgmstrings.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/USB_desc/pgmstrings.h rename to lib/usbhost/USB_Host_Shield_2.0/examples/USB_desc/pgmstrings.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Xbox/XBOXOLD/XBOXOLD.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Xbox/XBOXOLD/XBOXOLD.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Xbox/XBOXOLD/XBOXOLD.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Xbox/XBOXOLD/XBOXOLD.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Xbox/XBOXONE/XBOXONE.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Xbox/XBOXONE/XBOXONE.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Xbox/XBOXONE/XBOXONE.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Xbox/XBOXONE/XBOXONE.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Xbox/XBOXRECV/XBOXRECV.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Xbox/XBOXRECV/XBOXRECV.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Xbox/XBOXRECV/XBOXRECV.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Xbox/XBOXRECV/XBOXRECV.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Xbox/XBOXUSB/XBOXUSB.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Xbox/XBOXUSB/XBOXUSB.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/Xbox/XBOXUSB/XBOXUSB.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/Xbox/XBOXUSB/XBOXUSB.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/acm/acm_terminal/acm_terminal.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/acm/acm_terminal/acm_terminal.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/acm/acm_terminal/acm_terminal.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/acm/acm_terminal/acm_terminal.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/acm/acm_terminal/pgmstrings.h b/lib/usbhost/USB_Host_Shield_2.0/examples/acm/acm_terminal/pgmstrings.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/acm/acm_terminal/pgmstrings.h rename to lib/usbhost/USB_Host_Shield_2.0/examples/acm/acm_terminal/pgmstrings.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/adk/ArduinoBlinkLED/ArduinoBlinkLED.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/adk/ArduinoBlinkLED/ArduinoBlinkLED.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/adk/ArduinoBlinkLED/ArduinoBlinkLED.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/adk/ArduinoBlinkLED/ArduinoBlinkLED.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/adk/adk_barcode/adk_barcode.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/adk/adk_barcode/adk_barcode.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/adk/adk_barcode/adk_barcode.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/adk/adk_barcode/adk_barcode.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/adk/demokit_20/demokit_20.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/adk/demokit_20/demokit_20.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/adk/demokit_20/demokit_20.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/adk/demokit_20/demokit_20.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/adk/term_test/term_test.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/adk/term_test/term_test.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/adk/term_test/term_test.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/adk/term_test/term_test.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/adk/term_time/term_time.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/adk/term_time/term_time.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/adk/term_time/term_time.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/adk/term_time/term_time.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/board_qc/board_qc.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/board_qc/board_qc.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/board_qc/board_qc.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/board_qc/board_qc.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/cdc_XR21B1411/XR_terminal/XR_terminal.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/cdc_XR21B1411/XR_terminal/XR_terminal.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/cdc_XR21B1411/XR_terminal/XR_terminal.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/cdc_XR21B1411/XR_terminal/XR_terminal.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/ftdi/USBFTDILoopback/USBFTDILoopback.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/ftdi/USBFTDILoopback/USBFTDILoopback.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/ftdi/USBFTDILoopback/USBFTDILoopback.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/ftdi/USBFTDILoopback/USBFTDILoopback.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/ftdi/USBFTDILoopback/pgmstrings.h b/lib/usbhost/USB_Host_Shield_2.0/examples/ftdi/USBFTDILoopback/pgmstrings.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/ftdi/USBFTDILoopback/pgmstrings.h rename to lib/usbhost/USB_Host_Shield_2.0/examples/ftdi/USBFTDILoopback/pgmstrings.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/hub_demo/hub_demo.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/hub_demo/hub_demo.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/hub_demo/hub_demo.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/hub_demo/hub_demo.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/hub_demo/pgmstrings.h b/lib/usbhost/USB_Host_Shield_2.0/examples/hub_demo/pgmstrings.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/hub_demo/pgmstrings.h rename to lib/usbhost/USB_Host_Shield_2.0/examples/hub_demo/pgmstrings.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/max_LCD/max_LCD.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/max_LCD/max_LCD.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/max_LCD/max_LCD.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/max_LCD/max_LCD.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/pl2303/pl2303_gprs_terminal/pl2303_gprs_terminal.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/pl2303/pl2303_gprs_terminal/pl2303_gprs_terminal.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/pl2303/pl2303_gprs_terminal/pl2303_gprs_terminal.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/pl2303/pl2303_gprs_terminal/pl2303_gprs_terminal.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/pl2303/pl2303_gps/pl2303_gps.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/pl2303/pl2303_gps/pl2303_gps.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/pl2303/pl2303_gps/pl2303_gps.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/pl2303/pl2303_gps/pl2303_gps.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/pl2303/pl2303_tinygps/pl2303_tinygps.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/pl2303/pl2303_tinygps/pl2303_tinygps.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/pl2303/pl2303_tinygps/pl2303_tinygps.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/pl2303/pl2303_tinygps/pl2303_tinygps.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/pl2303/pl2303_xbee_terminal/pl2303_xbee_terminal.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/pl2303/pl2303_xbee_terminal/pl2303_xbee_terminal.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/pl2303/pl2303_xbee_terminal/pl2303_xbee_terminal.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/pl2303/pl2303_xbee_terminal/pl2303_xbee_terminal.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/testusbhostFAT/Makefile b/lib/usbhost/USB_Host_Shield_2.0/examples/testusbhostFAT/Makefile similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/testusbhostFAT/Makefile rename to lib/usbhost/USB_Host_Shield_2.0/examples/testusbhostFAT/Makefile diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/testusbhostFAT/README.md b/lib/usbhost/USB_Host_Shield_2.0/examples/testusbhostFAT/README.md similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/testusbhostFAT/README.md rename to lib/usbhost/USB_Host_Shield_2.0/examples/testusbhostFAT/README.md diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/testusbhostFAT/testusbhostFAT.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/testusbhostFAT/testusbhostFAT.ino similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/testusbhostFAT/testusbhostFAT.ino rename to lib/usbhost/USB_Host_Shield_2.0/examples/testusbhostFAT/testusbhostFAT.ino diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/gpl2.txt b/lib/usbhost/USB_Host_Shield_2.0/gpl2.txt similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/gpl2.txt rename to lib/usbhost/USB_Host_Shield_2.0/gpl2.txt diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hexdump.h b/lib/usbhost/USB_Host_Shield_2.0/hexdump.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hexdump.h rename to lib/usbhost/USB_Host_Shield_2.0/hexdump.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hid.cpp b/lib/usbhost/USB_Host_Shield_2.0/hid.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hid.cpp rename to lib/usbhost/USB_Host_Shield_2.0/hid.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hid.h b/lib/usbhost/USB_Host_Shield_2.0/hid.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hid.h rename to lib/usbhost/USB_Host_Shield_2.0/hid.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hidboot.cpp b/lib/usbhost/USB_Host_Shield_2.0/hidboot.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hidboot.cpp rename to lib/usbhost/USB_Host_Shield_2.0/hidboot.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hidboot.h b/lib/usbhost/USB_Host_Shield_2.0/hidboot.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hidboot.h rename to lib/usbhost/USB_Host_Shield_2.0/hidboot.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hidescriptorparser.cpp b/lib/usbhost/USB_Host_Shield_2.0/hidescriptorparser.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hidescriptorparser.cpp rename to lib/usbhost/USB_Host_Shield_2.0/hidescriptorparser.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hidescriptorparser.h b/lib/usbhost/USB_Host_Shield_2.0/hidescriptorparser.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hidescriptorparser.h rename to lib/usbhost/USB_Host_Shield_2.0/hidescriptorparser.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hiduniversal.cpp b/lib/usbhost/USB_Host_Shield_2.0/hiduniversal.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hiduniversal.cpp rename to lib/usbhost/USB_Host_Shield_2.0/hiduniversal.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hiduniversal.h b/lib/usbhost/USB_Host_Shield_2.0/hiduniversal.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hiduniversal.h rename to lib/usbhost/USB_Host_Shield_2.0/hiduniversal.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hidusagestr.h b/lib/usbhost/USB_Host_Shield_2.0/hidusagestr.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hidusagestr.h rename to lib/usbhost/USB_Host_Shield_2.0/hidusagestr.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hidusagetitlearrays.cpp b/lib/usbhost/USB_Host_Shield_2.0/hidusagetitlearrays.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/hidusagetitlearrays.cpp rename to lib/usbhost/USB_Host_Shield_2.0/hidusagetitlearrays.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/keywords.txt b/lib/usbhost/USB_Host_Shield_2.0/keywords.txt similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/keywords.txt rename to lib/usbhost/USB_Host_Shield_2.0/keywords.txt diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/library.json b/lib/usbhost/USB_Host_Shield_2.0/library.json similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/library.json rename to lib/usbhost/USB_Host_Shield_2.0/library.json diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/library.properties b/lib/usbhost/USB_Host_Shield_2.0/library.properties similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/library.properties rename to lib/usbhost/USB_Host_Shield_2.0/library.properties diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/macros.h b/lib/usbhost/USB_Host_Shield_2.0/macros.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/macros.h rename to lib/usbhost/USB_Host_Shield_2.0/macros.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/masstorage.cpp b/lib/usbhost/USB_Host_Shield_2.0/masstorage.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/masstorage.cpp rename to lib/usbhost/USB_Host_Shield_2.0/masstorage.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/masstorage.h b/lib/usbhost/USB_Host_Shield_2.0/masstorage.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/masstorage.h rename to lib/usbhost/USB_Host_Shield_2.0/masstorage.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/max3421e.h b/lib/usbhost/USB_Host_Shield_2.0/max3421e.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/max3421e.h rename to lib/usbhost/USB_Host_Shield_2.0/max3421e.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/max_LCD.cpp b/lib/usbhost/USB_Host_Shield_2.0/max_LCD.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/max_LCD.cpp rename to lib/usbhost/USB_Host_Shield_2.0/max_LCD.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/max_LCD.h b/lib/usbhost/USB_Host_Shield_2.0/max_LCD.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/max_LCD.h rename to lib/usbhost/USB_Host_Shield_2.0/max_LCD.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/message.cpp b/lib/usbhost/USB_Host_Shield_2.0/message.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/message.cpp rename to lib/usbhost/USB_Host_Shield_2.0/message.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/message.h b/lib/usbhost/USB_Host_Shield_2.0/message.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/message.h rename to lib/usbhost/USB_Host_Shield_2.0/message.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/parsetools.cpp b/lib/usbhost/USB_Host_Shield_2.0/parsetools.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/parsetools.cpp rename to lib/usbhost/USB_Host_Shield_2.0/parsetools.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/parsetools.h b/lib/usbhost/USB_Host_Shield_2.0/parsetools.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/parsetools.h rename to lib/usbhost/USB_Host_Shield_2.0/parsetools.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/printhex.h b/lib/usbhost/USB_Host_Shield_2.0/printhex.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/printhex.h rename to lib/usbhost/USB_Host_Shield_2.0/printhex.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/settings.h b/lib/usbhost/USB_Host_Shield_2.0/settings.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/settings.h rename to lib/usbhost/USB_Host_Shield_2.0/settings.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/sink_parser.h b/lib/usbhost/USB_Host_Shield_2.0/sink_parser.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/sink_parser.h rename to lib/usbhost/USB_Host_Shield_2.0/sink_parser.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/usb_ch9.h b/lib/usbhost/USB_Host_Shield_2.0/usb_ch9.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/usb_ch9.h rename to lib/usbhost/USB_Host_Shield_2.0/usb_ch9.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/usbhost.h b/lib/usbhost/USB_Host_Shield_2.0/usbhost.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/usbhost.h rename to lib/usbhost/USB_Host_Shield_2.0/usbhost.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/usbhub.cpp b/lib/usbhost/USB_Host_Shield_2.0/usbhub.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/usbhub.cpp rename to lib/usbhost/USB_Host_Shield_2.0/usbhub.cpp diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/usbhub.h b/lib/usbhost/USB_Host_Shield_2.0/usbhub.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/usbhub.h rename to lib/usbhost/USB_Host_Shield_2.0/usbhub.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/version_helper.h b/lib/usbhost/USB_Host_Shield_2.0/version_helper.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/version_helper.h rename to lib/usbhost/USB_Host_Shield_2.0/version_helper.h diff --git a/tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/xboxEnums.h b/lib/usbhost/USB_Host_Shield_2.0/xboxEnums.h similarity index 100% rename from tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/xboxEnums.h rename to lib/usbhost/USB_Host_Shield_2.0/xboxEnums.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Arduino.h b/lib/usbhost/arduino-1.0.1/cores/arduino/Arduino.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Arduino.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/Arduino.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/CDC.cpp b/lib/usbhost/arduino-1.0.1/cores/arduino/CDC.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/CDC.cpp rename to lib/usbhost/arduino-1.0.1/cores/arduino/CDC.cpp diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Client.h b/lib/usbhost/arduino-1.0.1/cores/arduino/Client.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Client.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/Client.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/HID.cpp b/lib/usbhost/arduino-1.0.1/cores/arduino/HID.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/HID.cpp rename to lib/usbhost/arduino-1.0.1/cores/arduino/HID.cpp diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/HardwareSerial.cpp b/lib/usbhost/arduino-1.0.1/cores/arduino/HardwareSerial.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/HardwareSerial.cpp rename to lib/usbhost/arduino-1.0.1/cores/arduino/HardwareSerial.cpp diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/HardwareSerial.h b/lib/usbhost/arduino-1.0.1/cores/arduino/HardwareSerial.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/HardwareSerial.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/HardwareSerial.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/IPAddress.cpp b/lib/usbhost/arduino-1.0.1/cores/arduino/IPAddress.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/IPAddress.cpp rename to lib/usbhost/arduino-1.0.1/cores/arduino/IPAddress.cpp diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/IPAddress.h b/lib/usbhost/arduino-1.0.1/cores/arduino/IPAddress.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/IPAddress.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/IPAddress.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Platform.h b/lib/usbhost/arduino-1.0.1/cores/arduino/Platform.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Platform.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/Platform.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Print.cpp b/lib/usbhost/arduino-1.0.1/cores/arduino/Print.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Print.cpp rename to lib/usbhost/arduino-1.0.1/cores/arduino/Print.cpp diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Print.h b/lib/usbhost/arduino-1.0.1/cores/arduino/Print.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Print.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/Print.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Printable.h b/lib/usbhost/arduino-1.0.1/cores/arduino/Printable.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Printable.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/Printable.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Server.h b/lib/usbhost/arduino-1.0.1/cores/arduino/Server.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Server.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/Server.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Stream.cpp b/lib/usbhost/arduino-1.0.1/cores/arduino/Stream.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Stream.cpp rename to lib/usbhost/arduino-1.0.1/cores/arduino/Stream.cpp diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Stream.h b/lib/usbhost/arduino-1.0.1/cores/arduino/Stream.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Stream.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/Stream.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Tone.cpp b/lib/usbhost/arduino-1.0.1/cores/arduino/Tone.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Tone.cpp rename to lib/usbhost/arduino-1.0.1/cores/arduino/Tone.cpp diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/USBAPI.h b/lib/usbhost/arduino-1.0.1/cores/arduino/USBAPI.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/USBAPI.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/USBAPI.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/USBCore.cpp b/lib/usbhost/arduino-1.0.1/cores/arduino/USBCore.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/USBCore.cpp rename to lib/usbhost/arduino-1.0.1/cores/arduino/USBCore.cpp diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/USBCore.h b/lib/usbhost/arduino-1.0.1/cores/arduino/USBCore.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/USBCore.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/USBCore.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/USBDesc.h b/lib/usbhost/arduino-1.0.1/cores/arduino/USBDesc.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/USBDesc.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/USBDesc.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Udp.h b/lib/usbhost/arduino-1.0.1/cores/arduino/Udp.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/Udp.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/Udp.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/WCharacter.h b/lib/usbhost/arduino-1.0.1/cores/arduino/WCharacter.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/WCharacter.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/WCharacter.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/WInterrupts.c b/lib/usbhost/arduino-1.0.1/cores/arduino/WInterrupts.c similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/WInterrupts.c rename to lib/usbhost/arduino-1.0.1/cores/arduino/WInterrupts.c diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/WMath.cpp b/lib/usbhost/arduino-1.0.1/cores/arduino/WMath.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/WMath.cpp rename to lib/usbhost/arduino-1.0.1/cores/arduino/WMath.cpp diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/WString.cpp b/lib/usbhost/arduino-1.0.1/cores/arduino/WString.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/WString.cpp rename to lib/usbhost/arduino-1.0.1/cores/arduino/WString.cpp diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/WString.h b/lib/usbhost/arduino-1.0.1/cores/arduino/WString.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/WString.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/WString.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/binary.h b/lib/usbhost/arduino-1.0.1/cores/arduino/binary.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/binary.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/binary.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/main.cpp b/lib/usbhost/arduino-1.0.1/cores/arduino/main.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/main.cpp rename to lib/usbhost/arduino-1.0.1/cores/arduino/main.cpp diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/new.cpp b/lib/usbhost/arduino-1.0.1/cores/arduino/new.cpp similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/new.cpp rename to lib/usbhost/arduino-1.0.1/cores/arduino/new.cpp diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/new.h b/lib/usbhost/arduino-1.0.1/cores/arduino/new.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/new.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/new.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring.c b/lib/usbhost/arduino-1.0.1/cores/arduino/wiring.c similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring.c rename to lib/usbhost/arduino-1.0.1/cores/arduino/wiring.c diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_analog.c b/lib/usbhost/arduino-1.0.1/cores/arduino/wiring_analog.c similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_analog.c rename to lib/usbhost/arduino-1.0.1/cores/arduino/wiring_analog.c diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_digital.c b/lib/usbhost/arduino-1.0.1/cores/arduino/wiring_digital.c similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_digital.c rename to lib/usbhost/arduino-1.0.1/cores/arduino/wiring_digital.c diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_private.h b/lib/usbhost/arduino-1.0.1/cores/arduino/wiring_private.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_private.h rename to lib/usbhost/arduino-1.0.1/cores/arduino/wiring_private.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_pulse.c b/lib/usbhost/arduino-1.0.1/cores/arduino/wiring_pulse.c similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_pulse.c rename to lib/usbhost/arduino-1.0.1/cores/arduino/wiring_pulse.c diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_shift.c b/lib/usbhost/arduino-1.0.1/cores/arduino/wiring_shift.c similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/cores/arduino/wiring_shift.c rename to lib/usbhost/arduino-1.0.1/cores/arduino/wiring_shift.c diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/variants/eightanaloginputs/pins_arduino.h b/lib/usbhost/arduino-1.0.1/variants/eightanaloginputs/pins_arduino.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/variants/eightanaloginputs/pins_arduino.h rename to lib/usbhost/arduino-1.0.1/variants/eightanaloginputs/pins_arduino.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/variants/leonardo/pins_arduino.h b/lib/usbhost/arduino-1.0.1/variants/leonardo/pins_arduino.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/variants/leonardo/pins_arduino.h rename to lib/usbhost/arduino-1.0.1/variants/leonardo/pins_arduino.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/variants/mega/pins_arduino.h b/lib/usbhost/arduino-1.0.1/variants/mega/pins_arduino.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/variants/mega/pins_arduino.h rename to lib/usbhost/arduino-1.0.1/variants/mega/pins_arduino.h diff --git a/tmk_core/protocol/usb_hid/arduino-1.0.1/variants/standard/pins_arduino.h b/lib/usbhost/arduino-1.0.1/variants/standard/pins_arduino.h similarity index 100% rename from tmk_core/protocol/usb_hid/arduino-1.0.1/variants/standard/pins_arduino.h rename to lib/usbhost/arduino-1.0.1/variants/standard/pins_arduino.h diff --git a/message.mk b/message.mk index dcd47e550..419e3f5f3 100644 --- a/message.mk +++ b/message.mk @@ -36,6 +36,10 @@ PRINT_OK = $(SILENT) || printf " $(OK_STRING)" | $(AWK_STATUS) BUILD_CMD = LOG=$$($(CMD) 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING); else $(PRINT_OK); fi; MAKE_MSG_FORMAT = $(AWK) '{ printf "%-118s", $$0;}' +# The UNSYNC_OUTPUT_CMD command disables the `--output-sync` for the current command, if the `--output-sync` granularity is `target` or lower. +# This is achieved by telling make to treat the current command as if it invokes a recursive make subcommand (as if by calling `$(MAKE)`). +UNSYNC_OUTPUT_CMD = +true + # Define Messages # English MSG_ERRORS_NONE = Errors: none diff --git a/platforms/arm_atsam/flash.mk b/platforms/arm_atsam/flash.mk new file mode 100644 index 000000000..f31d4b4d9 --- /dev/null +++ b/platforms/arm_atsam/flash.mk @@ -0,0 +1,11 @@ +# Hey Emacs, this is a -*- makefile -*- +############################################################################## +# Architecture or project specific options +# + +flash: bin +ifneq ($(strip $(PROGRAM_CMD)),) + $(UNSYNC_OUTPUT_CMD) && $(PROGRAM_CMD) +else + $(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_ARCH)" +endif diff --git a/drivers/avr/analog.c b/platforms/avr/drivers/analog.c similarity index 100% rename from drivers/avr/analog.c rename to platforms/avr/drivers/analog.c diff --git a/drivers/avr/analog.h b/platforms/avr/drivers/analog.h similarity index 100% rename from drivers/avr/analog.h rename to platforms/avr/drivers/analog.h diff --git a/drivers/avr/glcdfont.c b/platforms/avr/drivers/glcdfont.c similarity index 100% rename from drivers/avr/glcdfont.c rename to platforms/avr/drivers/glcdfont.c diff --git a/drivers/avr/hd44780.c b/platforms/avr/drivers/hd44780.c similarity index 100% rename from drivers/avr/hd44780.c rename to platforms/avr/drivers/hd44780.c diff --git a/drivers/avr/hd44780.h b/platforms/avr/drivers/hd44780.h similarity index 100% rename from drivers/avr/hd44780.h rename to platforms/avr/drivers/hd44780.h diff --git a/platforms/avr/drivers/i2c_master.c b/platforms/avr/drivers/i2c_master.c new file mode 100644 index 000000000..2773e0077 --- /dev/null +++ b/platforms/avr/drivers/i2c_master.c @@ -0,0 +1,241 @@ +/* Copyright (C) 2019 Elia Ritterbusch + + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +/* Library made by: g4lvanix + * GitHub repository: https://github.com/g4lvanix/I2C-master-lib + */ + +#include +#include + +#include "i2c_master.h" +#include "timer.h" +#include "wait.h" + +#ifndef F_SCL +# define F_SCL 400000UL // SCL frequency +#endif + +#ifndef I2C_START_RETRY_COUNT +# define I2C_START_RETRY_COUNT 20 +#endif // I2C_START_RETRY_COUNT + +#define TWBR_val (((F_CPU / F_SCL) - 16) / 2) + +#define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) + +void i2c_init(void) { + TWSR = 0; /* no prescaler */ + TWBR = (uint8_t)TWBR_val; + +#ifdef __AVR_ATmega32A__ + // set pull-up resistors on I2C bus pins + PORTC |= 0b11; + + // enable TWI (two-wire interface) + TWCR |= (1 << TWEN); + + // enable TWI interrupt and slave address ACK + TWCR |= (1 << TWIE); + TWCR |= (1 << TWEA); +#endif +} + +static i2c_status_t i2c_start_impl(uint8_t address, uint16_t timeout) { + // reset TWI control register + TWCR = 0; + // transmit START condition + TWCR = (1 << TWINT) | (1 << TWSTA) | (1 << TWEN); + + uint16_t timeout_timer = timer_read(); + while (!(TWCR & (1 << TWINT))) { + if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { + return I2C_STATUS_TIMEOUT; + } + } + + // check if the start condition was successfully transmitted + if (((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)) { + return I2C_STATUS_ERROR; + } + + // load slave address into data register + TWDR = address; + // start transmission of address + TWCR = (1 << TWINT) | (1 << TWEN); + + timeout_timer = timer_read(); + while (!(TWCR & (1 << TWINT))) { + if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { + return I2C_STATUS_TIMEOUT; + } + } + + // check if the device has acknowledged the READ / WRITE mode + uint8_t twst = TW_STATUS & 0xF8; + if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) { + return I2C_STATUS_ERROR; + } + + return I2C_STATUS_SUCCESS; +} + +i2c_status_t i2c_start(uint8_t address, uint16_t timeout) { + // Retry i2c_start_impl a bunch times in case the remote side has interrupts disabled. + uint16_t timeout_timer = timer_read(); + uint16_t time_slice = MAX(1, (timeout == (I2C_TIMEOUT_INFINITE)) ? 5 : (timeout / (I2C_START_RETRY_COUNT))); // if it's infinite, wait 1ms between attempts, otherwise split up the entire timeout into the number of retries + i2c_status_t status; + do { + status = i2c_start_impl(address, time_slice); + } while ((status < 0) && ((timeout == I2C_TIMEOUT_INFINITE) || (timer_elapsed(timeout_timer) < timeout))); + return status; +} + +i2c_status_t i2c_write(uint8_t data, uint16_t timeout) { + // load data into data register + TWDR = data; + // start transmission of data + TWCR = (1 << TWINT) | (1 << TWEN); + + uint16_t timeout_timer = timer_read(); + while (!(TWCR & (1 << TWINT))) { + if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { + return I2C_STATUS_TIMEOUT; + } + } + + if ((TW_STATUS & 0xF8) != TW_MT_DATA_ACK) { + return I2C_STATUS_ERROR; + } + + return I2C_STATUS_SUCCESS; +} + +int16_t i2c_read_ack(uint16_t timeout) { + // start TWI module and acknowledge data after reception + TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWEA); + + uint16_t timeout_timer = timer_read(); + while (!(TWCR & (1 << TWINT))) { + if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { + return I2C_STATUS_TIMEOUT; + } + } + + // return received data from TWDR + return TWDR; +} + +int16_t i2c_read_nack(uint16_t timeout) { + // start receiving without acknowledging reception + TWCR = (1 << TWINT) | (1 << TWEN); + + uint16_t timeout_timer = timer_read(); + while (!(TWCR & (1 << TWINT))) { + if ((timeout != I2C_TIMEOUT_INFINITE) && ((timer_read() - timeout_timer) >= timeout)) { + return I2C_STATUS_TIMEOUT; + } + } + + // return received data from TWDR + return TWDR; +} + +i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_status_t status = i2c_start(address | I2C_WRITE, timeout); + + for (uint16_t i = 0; i < length && status >= 0; i++) { + status = i2c_write(data[i], timeout); + } + + i2c_stop(); + + return status; +} + +i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_status_t status = i2c_start(address | I2C_READ, timeout); + + for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { + status = i2c_read_ack(timeout); + if (status >= 0) { + data[i] = status; + } + } + + if (status >= 0) { + status = i2c_read_nack(timeout); + if (status >= 0) { + data[(length - 1)] = status; + } + } + + i2c_stop(); + + return (status < 0) ? status : I2C_STATUS_SUCCESS; +} + +i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_status_t status = i2c_start(devaddr | 0x00, timeout); + if (status >= 0) { + status = i2c_write(regaddr, timeout); + + for (uint16_t i = 0; i < length && status >= 0; i++) { + status = i2c_write(data[i], timeout); + } + } + + i2c_stop(); + + return status; +} + +i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_status_t status = i2c_start(devaddr, timeout); + if (status < 0) { + goto error; + } + + status = i2c_write(regaddr, timeout); + if (status < 0) { + goto error; + } + + status = i2c_start(devaddr | 0x01, timeout); + + for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { + status = i2c_read_ack(timeout); + if (status >= 0) { + data[i] = status; + } + } + + if (status >= 0) { + status = i2c_read_nack(timeout); + if (status >= 0) { + data[(length - 1)] = status; + } + } + +error: + i2c_stop(); + + return (status < 0) ? status : I2C_STATUS_SUCCESS; +} + +void i2c_stop(void) { + // transmit STOP condition + TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO); +} diff --git a/drivers/avr/i2c_master.h b/platforms/avr/drivers/i2c_master.h similarity index 100% rename from drivers/avr/i2c_master.h rename to platforms/avr/drivers/i2c_master.h diff --git a/platforms/avr/drivers/i2c_slave.c b/platforms/avr/drivers/i2c_slave.c new file mode 100644 index 000000000..2907f164c --- /dev/null +++ b/platforms/avr/drivers/i2c_slave.c @@ -0,0 +1,111 @@ +/* Copyright (C) 2019 Elia Ritterbusch + + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +/* Library made by: g4lvanix + * GitHub repository: https://github.com/g4lvanix/I2C-slave-lib + */ + +#include +#include +#include +#include +#include + +#include "i2c_slave.h" + +#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS) +# include "transactions.h" + +static volatile bool is_callback_executor = false; +#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS) + +volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT]; + +static volatile uint8_t buffer_address; +static volatile bool slave_has_register_set = false; + +void i2c_slave_init(uint8_t address) { + // load address into TWI address register + TWAR = address; + // set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt + TWCR = (1 << TWIE) | (1 << TWEA) | (1 << TWINT) | (1 << TWEN); +} + +void i2c_slave_stop(void) { + // clear acknowledge and enable bits + TWCR &= ~((1 << TWEA) | (1 << TWEN)); +} + +ISR(TWI_vect) { + uint8_t ack = 1; + + switch (TW_STATUS) { + case TW_SR_SLA_ACK: + // The device is now a slave receiver + slave_has_register_set = false; +#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS) + is_callback_executor = false; +#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS) + break; + + case TW_SR_DATA_ACK: + // This device is a slave receiver and has received data + // First byte is the location then the bytes will be writen in buffer with auto-increment + if (!slave_has_register_set) { + buffer_address = TWDR; + + if (buffer_address >= I2C_SLAVE_REG_COUNT) { // address out of bounds dont ack + ack = 0; + buffer_address = 0; + } + slave_has_register_set = true; // address has been received now fill in buffer + +#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS) + // Work out if we're attempting to execute a callback + is_callback_executor = buffer_address == split_transaction_table[I2C_EXECUTE_CALLBACK].initiator2target_offset; +#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS) + } else { + i2c_slave_reg[buffer_address] = TWDR; + buffer_address++; + +#if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS) + // If we're intending to execute a transaction callback, do so, as we've just received the transaction ID + if (is_callback_executor) { + split_transaction_desc_t *trans = &split_transaction_table[split_shmem->transaction_id]; + if (trans->slave_callback) { + trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans)); + } + } +#endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS) + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // This device is a slave transmitter and master has requested data + TWDR = i2c_slave_reg[buffer_address]; + buffer_address++; + break; + + case TW_BUS_ERROR: + // We got an error, reset i2c + TWCR = 0; + default: + break; + } + + // Reset i2c state machine to be ready for next interrupt + TWCR |= (1 << TWIE) | (1 << TWINT) | (ack << TWEA) | (1 << TWEN); +} diff --git a/platforms/avr/drivers/i2c_slave.h b/platforms/avr/drivers/i2c_slave.h new file mode 100644 index 000000000..a8647c9da --- /dev/null +++ b/platforms/avr/drivers/i2c_slave.h @@ -0,0 +1,41 @@ +/* Copyright (C) 2019 Elia Ritterbusch + + + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +/* Library made by: g4lvanix + * GitHub repository: https://github.com/g4lvanix/I2C-slave-lib + + Info: Inititate the library by giving the required address. + Read or write to the necessary buffer according to the opperation. + */ + +#pragma once + +#ifndef I2C_SLAVE_REG_COUNT + +# if defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS) +# include "transport.h" +# define I2C_SLAVE_REG_COUNT sizeof(split_shared_memory_t) +# else // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS) +# define I2C_SLAVE_REG_COUNT 30 +# endif // defined(USE_I2C) && defined(SPLIT_COMMON_TRANSACTIONS) + +#endif // I2C_SLAVE_REG_COUNT + +_Static_assert(I2C_SLAVE_REG_COUNT < 256, "I2C target registers must be single byte"); + +extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT]; + +void i2c_slave_init(uint8_t address); +void i2c_slave_stop(void); diff --git a/platforms/avr/drivers/serial.c b/platforms/avr/drivers/serial.c new file mode 100644 index 000000000..9a7345a53 --- /dev/null +++ b/platforms/avr/drivers/serial.c @@ -0,0 +1,529 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + * + * 2018-10-28 checked + * avr-gcc 4.9.2 + * avr-gcc 5.4.0 + * avr-gcc 7.3.0 + */ + +#ifndef F_CPU +# define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include +#include "serial.h" + +#ifdef SOFT_SERIAL_PIN + +# if !(defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB162__) || 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 + +// ATmegaxxU2/AT90USB162 specific config +# if defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_AT90USB162__) +// 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 + +// 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 +# 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 +# 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) + +// parity check +# define ODD_PARITY 1 +# define EVEN_PARITY 0 +# define PARITY EVEN_PARITY + +# ifdef SERIAL_DELAY +// custom setup in config.h +// #define TID_SEND_ADJUST 2 +// #define SERIAL_DELAY 6 // micro sec +// #define READ_WRITE_START_ADJUST 30 // cycles +// #define READ_WRITE_WIDTH_ADJUST 8 // cycles +# else +// ============ Standard setups ============ + +# ifndef SELECT_SOFT_SERIAL_SPEED +# define SELECT_SOFT_SERIAL_SPEED 1 +// 0: about 189kbps (Experimental only) +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +# endif + +# if __GNUC__ < 6 +# define TID_SEND_ADJUST 14 +# else +# define TID_SEND_ADJUST 2 +# endif + +# if SELECT_SOFT_SERIAL_SPEED == 0 +// Very High speed +# define SERIAL_DELAY 4 // micro sec +# if __GNUC__ < 6 +# define READ_WRITE_START_ADJUST 33 // cycles +# define READ_WRITE_WIDTH_ADJUST 3 // cycles +# else +# define READ_WRITE_START_ADJUST 34 // cycles +# define READ_WRITE_WIDTH_ADJUST 7 // cycles +# endif +# elif SELECT_SOFT_SERIAL_SPEED == 1 +// High speed +# define SERIAL_DELAY 6 // micro sec +# if __GNUC__ < 6 +# define READ_WRITE_START_ADJUST 30 // cycles +# define READ_WRITE_WIDTH_ADJUST 3 // cycles +# else +# define READ_WRITE_START_ADJUST 33 // cycles +# define READ_WRITE_WIDTH_ADJUST 7 // cycles +# endif +# elif SELECT_SOFT_SERIAL_SPEED == 2 +// Middle speed +# define SERIAL_DELAY 12 // micro sec +# define READ_WRITE_START_ADJUST 30 // cycles +# if __GNUC__ < 6 +# define READ_WRITE_WIDTH_ADJUST 3 // cycles +# else +# define READ_WRITE_WIDTH_ADJUST 7 // cycles +# endif +# elif SELECT_SOFT_SERIAL_SPEED == 3 +// Low speed +# define SERIAL_DELAY 24 // micro sec +# define READ_WRITE_START_ADJUST 30 // cycles +# if __GNUC__ < 6 +# define READ_WRITE_WIDTH_ADJUST 3 // cycles +# else +# define READ_WRITE_WIDTH_ADJUST 7 // cycles +# endif +# elif SELECT_SOFT_SERIAL_SPEED == 4 +// Very Low speed +# define SERIAL_DELAY 36 // micro sec +# define READ_WRITE_START_ADJUST 30 // cycles +# if __GNUC__ < 6 +# define READ_WRITE_WIDTH_ADJUST 3 // cycles +# else +# define READ_WRITE_WIDTH_ADJUST 7 // cycles +# endif +# elif SELECT_SOFT_SERIAL_SPEED == 5 +// Ultra Low speed +# define SERIAL_DELAY 48 // micro sec +# define READ_WRITE_START_ADJUST 30 // cycles +# if __GNUC__ < 6 +# define READ_WRITE_WIDTH_ADJUST 3 // cycles +# else +# define READ_WRITE_WIDTH_ADJUST 7 // cycles +# endif +# else +# error invalid SELECT_SOFT_SERIAL_SPEED value +# endif /* SELECT_SOFT_SERIAL_SPEED */ +# endif /* SERIAL_DELAY */ + +# define SERIAL_DELAY_HALF1 (SERIAL_DELAY / 2) +# define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY / 2) + +# define SLAVE_INT_WIDTH_US 1 +# define SLAVE_INT_ACK_WIDTH_UNIT 2 +# define SLAVE_INT_ACK_WIDTH 4 + +inline static void serial_delay(void) ALWAYS_INLINE; +inline static void serial_delay(void) { _delay_us(SERIAL_DELAY); } + +inline static void serial_delay_half1(void) ALWAYS_INLINE; +inline static void serial_delay_half1(void) { _delay_us(SERIAL_DELAY_HALF1); } + +inline static void serial_delay_half2(void) ALWAYS_INLINE; +inline static void serial_delay_half2(void) { _delay_us(SERIAL_DELAY_HALF2); } + +inline static void serial_output(void) ALWAYS_INLINE; +inline static void serial_output(void) { setPinOutput(SOFT_SERIAL_PIN); } + +// make the serial pin an input with pull-up resistor +inline static void serial_input_with_pullup(void) ALWAYS_INLINE; +inline static void serial_input_with_pullup(void) { setPinInputHigh(SOFT_SERIAL_PIN); } + +inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; +inline static uint8_t serial_read_pin(void) { return !!readPin(SOFT_SERIAL_PIN); } + +inline static void serial_low(void) ALWAYS_INLINE; +inline static void serial_low(void) { writePinLow(SOFT_SERIAL_PIN); } + +inline static void serial_high(void) ALWAYS_INLINE; +inline static void serial_high(void) { writePinHigh(SOFT_SERIAL_PIN); } + +void soft_serial_initiator_init(void) { + serial_output(); + serial_high(); +} + +void soft_serial_target_init(void) { + serial_input_with_pullup(); + + // Enable INT0-INT7 + EIMSK |= EIMSK_BIT; + EICRx &= EICRx_BIT; +} + +// Used by the sender to synchronize timing with the reciver. +static void sync_recv(void) NO_INLINE; +static void sync_recv(void) { + for (uint8_t i = 0; i < SERIAL_DELAY * 5 && serial_read_pin(); i++) { + } + // This shouldn't hang if the target disconnects because the + // serial line will float to high if the target does disconnect. + while (!serial_read_pin()) + ; +} + +// Used by the reciver to send a synchronization signal to the sender. +static void sync_send(void) NO_INLINE; +static void sync_send(void) { + serial_low(); + serial_delay(); + serial_high(); +} + +// Reads a byte from the serial line +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE; +static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { + uint8_t byte, i, p, pb; + + _delay_sub_us(READ_WRITE_START_ADJUST); + for (i = 0, byte = 0, p = PARITY; i < bit; i++) { + serial_delay_half1(); // read the middle of pulses + if (serial_read_pin()) { + byte = (byte << 1) | 1; + p ^= 1; + } else { + byte = (byte << 1) | 0; + p ^= 0; + } + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + } + /* recive parity bit */ + serial_delay_half1(); // read the middle of pulses + pb = serial_read_pin(); + _delay_sub_us(READ_WRITE_WIDTH_ADJUST); + serial_delay_half2(); + + *pterrcount += (p != pb) ? 1 : 0; + + return byte; +} + +// Sends a byte with MSB ordering +void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; +void serial_write_chunk(uint8_t data, uint8_t bit) { + uint8_t b, p; + for (p = PARITY, b = 1 << (bit - 1); b; b >>= 1) { + if (data & b) { + serial_high(); + p ^= 1; + } else { + serial_low(); + p ^= 0; + } + serial_delay(); + } + /* send parity bit */ + if (p & 1) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + + serial_low(); // sync_send() / senc_recv() need raise edge +} + +static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static void serial_send_packet(uint8_t *buffer, uint8_t size) { + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + data = buffer[i]; + sync_send(); + serial_write_chunk(data, 8); + } +} + +static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE; +static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) { + uint8_t pecount = 0; + for (uint8_t i = 0; i < size; ++i) { + uint8_t data; + sync_recv(); + data = serial_read_chunk(&pecount, 8); + buffer[i] = data; + } + return pecount == 0; +} + +inline static void change_sender2reciver(void) { + sync_send(); // 0 + serial_delay_half1(); // 1 + serial_low(); // 2 + serial_input_with_pullup(); // 2 + serial_delay_half1(); // 3 +} + +inline static void change_reciver2sender(void) { + sync_recv(); // 0 + serial_delay(); // 1 + serial_low(); // 3 + serial_output(); // 3 + serial_delay_half1(); // 4 +} + +static inline uint8_t nibble_bits_count(uint8_t bits) { + bits = (bits & 0x5) + (bits >> 1 & 0x5); + bits = (bits & 0x3) + (bits >> 2 & 0x3); + return bits; +} + +// interrupt handle to be used by the target device +ISR(SERIAL_PIN_INTERRUPT) { + // recive transaction table index + uint8_t tid, bits; + uint8_t pecount = 0; + sync_recv(); + bits = serial_read_chunk(&pecount, 8); + tid = bits >> 3; + bits = (bits & 7) != (nibble_bits_count(tid) & 7); + if (bits || pecount > 0 || tid > NUM_TOTAL_TRANSACTIONS) { + return; + } + serial_delay_half1(); + + serial_high(); // response step1 low->high + serial_output(); + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT * SLAVE_INT_ACK_WIDTH); + split_transaction_desc_t *trans = &split_transaction_table[tid]; + serial_low(); // response step2 ack high->low + + // If the transaction has a callback, we can execute it now + if (trans->slave_callback) { + trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans)); + } + + // target send phase + if (trans->target2initiator_buffer_size > 0) serial_send_packet((uint8_t *)split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size); + // target switch to input + change_sender2reciver(); + + // target recive phase + if (trans->initiator2target_buffer_size > 0) { + if (serial_recive_packet((uint8_t *)split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size)) { + *trans->status = TRANSACTION_ACCEPTED; + } else { + *trans->status = TRANSACTION_DATA_ERROR; + } + } else { + *trans->status = TRANSACTION_ACCEPTED; + } + + sync_recv(); // weit initiator output to high +} + +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) +// +// Returns: +// TRANSACTION_END +// TRANSACTION_NO_RESPONSE +// TRANSACTION_DATA_ERROR +// this code is very time dependent, so we need to disable interrupts +int soft_serial_transaction(int sstd_index) { + if (sstd_index > NUM_TOTAL_TRANSACTIONS) return TRANSACTION_TYPE_ERROR; + split_transaction_desc_t *trans = &split_transaction_table[sstd_index]; + + if (!trans->status) return TRANSACTION_TYPE_ERROR; // not registered + + cli(); + + // signal to the target that we want to start a transaction + serial_output(); + serial_low(); + _delay_us(SLAVE_INT_WIDTH_US); + + // send transaction table index + int tid = (sstd_index << 3) | (7 & nibble_bits_count(sstd_index)); + sync_send(); + _delay_sub_us(TID_SEND_ADJUST); + serial_write_chunk(tid, 8); + serial_delay_half1(); + + // wait for the target response (step1 low->high) + serial_input_with_pullup(); + while (!serial_read_pin()) { + _delay_sub_us(2); + } + + // check if the target is present (step2 high->low) + for (int i = 0; serial_read_pin(); i++) { + if (i > SLAVE_INT_ACK_WIDTH + 1) { + // slave failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; + } + _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); + } + + // initiator recive phase + // if the target is present syncronize with it + if (trans->target2initiator_buffer_size > 0) { + if (!serial_recive_packet((uint8_t *)split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size)) { + serial_output(); + serial_high(); + *trans->status = TRANSACTION_DATA_ERROR; + sei(); + return TRANSACTION_DATA_ERROR; + } + } + + // initiator switch to output + change_reciver2sender(); + + // initiator send phase + if (trans->initiator2target_buffer_size > 0) { + serial_send_packet((uint8_t *)split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size); + } + + // always, release the line when not in use + sync_send(); + + *trans->status = TRANSACTION_END; + sei(); + return TRANSACTION_END; +} + +int soft_serial_get_and_clean_status(int sstd_index) { + split_transaction_desc_t *trans = &split_transaction_table[sstd_index]; + cli(); + int retval = *trans->status; + *trans->status = 0; + ; + sei(); + return retval; +} +#endif + +// Helix serial.c history +// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) +// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) +// (adjusted with avr-gcc 4.9.2) +// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) +// (adjusted with avr-gcc 4.9.2) +// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) +// (adjusted with avr-gcc 4.9.2) +// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) +// (adjusted with avr-gcc 7.3.0) +// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) +// (adjusted with avr-gcc 5.4.0, 7.3.0) +// 2018-12-17 copy to TOP/quantum/split_common/ and remove backward compatibility code (#4669) diff --git a/drivers/avr/spi_master.c b/platforms/avr/drivers/spi_master.c similarity index 100% rename from drivers/avr/spi_master.c rename to platforms/avr/drivers/spi_master.c diff --git a/drivers/avr/spi_master.h b/platforms/avr/drivers/spi_master.h similarity index 100% rename from drivers/avr/spi_master.h rename to platforms/avr/drivers/spi_master.h diff --git a/drivers/avr/ssd1306.c b/platforms/avr/drivers/ssd1306.c similarity index 100% rename from drivers/avr/ssd1306.c rename to platforms/avr/drivers/ssd1306.c diff --git a/drivers/avr/ssd1306.h b/platforms/avr/drivers/ssd1306.h similarity index 100% rename from drivers/avr/ssd1306.h rename to platforms/avr/drivers/ssd1306.h diff --git a/drivers/avr/uart.c b/platforms/avr/drivers/uart.c similarity index 100% rename from drivers/avr/uart.c rename to platforms/avr/drivers/uart.c diff --git a/drivers/avr/uart.h b/platforms/avr/drivers/uart.h similarity index 100% rename from drivers/avr/uart.h rename to platforms/avr/drivers/uart.h diff --git a/drivers/avr/ws2812.c b/platforms/avr/drivers/ws2812.c similarity index 100% rename from drivers/avr/ws2812.c rename to platforms/avr/drivers/ws2812.c diff --git a/drivers/avr/ws2812_i2c.c b/platforms/avr/drivers/ws2812_i2c.c similarity index 100% rename from drivers/avr/ws2812_i2c.c rename to platforms/avr/drivers/ws2812_i2c.c diff --git a/platforms/avr/flash.mk b/platforms/avr/flash.mk new file mode 100644 index 000000000..0af1ebb1c --- /dev/null +++ b/platforms/avr/flash.mk @@ -0,0 +1,179 @@ +# Hey Emacs, this is a -*- makefile -*- +############################################################################## +# Architecture or project specific options +# + +# Autodetect teensy loader +ifndef TEENSY_LOADER_CLI + ifneq (, $(shell which teensy-loader-cli 2>/dev/null)) + TEENSY_LOADER_CLI ?= teensy-loader-cli + else + TEENSY_LOADER_CLI ?= teensy_loader_cli + endif +endif + +define EXEC_TEENSY + $(TEENSY_LOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex +endef + +teensy: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + $(call EXEC_TEENSY) + +DFU_PROGRAMMER ?= dfu-programmer +GREP ?= grep + +define EXEC_DFU + if [ "$(1)" ]; then \ + echo "Flashing '$(1)' for EE_HANDS split keyboard support." ;\ + fi; \ + if ! $(DFU_PROGRAMMER) $(MCU) get bootloader-version >/dev/null 2>/dev/null; then\ + printf "$(MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY)" ;\ + sleep $(BOOTLOADER_RETRY_TIME) ;\ + while ! $(DFU_PROGRAMMER) $(MCU) get bootloader-version >/dev/null 2>/dev/null; do\ + printf "." ;\ + sleep $(BOOTLOADER_RETRY_TIME) ;\ + done ;\ + printf "\n" ;\ + fi; \ + $(DFU_PROGRAMMER) $(MCU) get bootloader-version ;\ + if $(DFU_PROGRAMMER) --version 2>&1 | $(GREP) -q 0.7 ; then\ + $(DFU_PROGRAMMER) $(MCU) erase --force; \ + if [ "$(1)" ]; then \ + $(DFU_PROGRAMMER) $(MCU) flash --force --eeprom $(QUANTUM_PATH)/split_common/$(1);\ + fi; \ + $(DFU_PROGRAMMER) $(MCU) flash --force $(BUILD_DIR)/$(TARGET).hex;\ + else \ + $(DFU_PROGRAMMER) $(MCU) erase; \ + if [ "$(1)" ]; then \ + $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(QUANTUM_PATH)/split_common/$(1);\ + fi; \ + $(DFU_PROGRAMMER) $(MCU) flash $(BUILD_DIR)/$(TARGET).hex;\ + fi; \ + $(DFU_PROGRAMMER) $(MCU) reset +endef + +dfu: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size + $(call EXEC_DFU) + +dfu-start: + $(DFU_PROGRAMMER) $(MCU) reset + $(DFU_PROGRAMMER) $(MCU) start + +dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep + if $(DFU_PROGRAMMER) --version 2>&1 | $(GREP) -q 0.7 ; then\ + $(DFU_PROGRAMMER) $(MCU) flash --force --eeprom $(BUILD_DIR)/$(TARGET).eep;\ + else\ + $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(BUILD_DIR)/$(TARGET).eep;\ + fi + $(DFU_PROGRAMMER) $(MCU) reset + +dfu-split-left: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size + $(call EXEC_DFU,eeprom-lefthand.eep) + +dfu-split-right: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size + $(call EXEC_DFU,eeprom-righthand.eep) + +AVRDUDE_PROGRAMMER ?= avrdude + +define EXEC_AVRDUDE + list_devices() { \ + if $(GREP) -q -s icrosoft /proc/version; then \ + wmic.exe path Win32_SerialPort get DeviceID 2>/dev/null | LANG=C perl -pne 's/COM(\d+)/COM.($$1-1)/e' | sed 's!COM!/dev/ttyS!' | xargs echo -n | sort; \ + elif [ "`uname`" = "FreeBSD" ]; then \ + ls /dev/tty* | grep -v '\.lock$$' | grep -v '\.init$$'; \ + else \ + ls /dev/tty*; \ + fi; \ + }; \ + USB= ;\ + printf "Waiting for USB serial port - reset your controller now (Ctrl+C to cancel)"; \ + TMP1=`mktemp`; \ + TMP2=`mktemp`; \ + list_devices > $$TMP1; \ + while [ -z "$$USB" ]; do \ + sleep $(BOOTLOADER_RETRY_TIME); \ + printf "."; \ + list_devices > $$TMP2; \ + USB=`comm -13 $$TMP1 $$TMP2 | $(GREP) -o '/dev/tty.*'`; \ + mv $$TMP2 $$TMP1; \ + done; \ + rm $$TMP1; \ + echo ""; \ + echo "Device $$USB has appeared; assuming it is the controller."; \ + if $(GREP) -q -s 'MINGW\|MSYS\|icrosoft' /proc/version; then \ + USB=`echo "$$USB" | LANG=C perl -pne 's/\/dev\/ttyS(\d+)/COM.($$1+1)/e'`; \ + echo "Remapped USB port to $$USB"; \ + sleep 1; \ + else \ + printf "Waiting for $$USB to become writable."; \ + while [ ! -w "$$USB" ]; do sleep $(BOOTLOADER_RETRY_TIME); printf "."; done; echo ""; \ + fi; \ + if [ -z "$(1)" ]; then \ + $(AVRDUDE_PROGRAMMER) -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ + else \ + $(AVRDUDE_PROGRAMMER) -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex -U eeprom:w:$(QUANTUM_PATH)/split_common/$(1); \ + fi +endef + +avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + $(call EXEC_AVRDUDE) + +avrdude-loop: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + while true; do \ + $(call EXEC_AVRDUDE) ; \ + done + +avrdude-split-left: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + $(call EXEC_AVRDUDE,eeprom-lefthand.eep) + +avrdude-split-right: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + $(call EXEC_AVRDUDE,eeprom-righthand.eep) + +define EXEC_USBASP + $(AVRDUDE_PROGRAMMER) -p $(AVRDUDE_MCU) -c usbasp -U flash:w:$(BUILD_DIR)/$(TARGET).hex +endef + +usbasp: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + $(call EXEC_USBASP) + +BOOTLOADHID_PROGRAMMER ?= bootloadHID + +# bootloadHid executable has no cross platform detect methods +# so keep running bootloadHid if the output contains "The specified device was not found" +define EXEC_BOOTLOADHID + until $(BOOTLOADHID_PROGRAMMER) -r $(BUILD_DIR)/$(TARGET).hex 2>&1 | tee /dev/stderr | grep -v "device was not found"; do\ + printf "$(MSG_BOOTLOADER_NOT_FOUND)" ;\ + sleep 5 ;\ + done +endef + +bootloadHID: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + $(call EXEC_BOOTLOADHID) + +HID_BOOTLOADER_CLI ?= hid_bootloader_cli + +define EXEC_HID_LUFA + $(HID_BOOTLOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex +endef + +hid_bootloader: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware + $(call EXEC_HID_LUFA) + +flash: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware +ifneq ($(strip $(PROGRAM_CMD)),) + $(UNSYNC_OUTPUT_CMD) && $(PROGRAM_CMD) +else ifeq ($(strip $(BOOTLOADER)), caterina) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_AVRDUDE) +else ifeq ($(strip $(BOOTLOADER)), halfkay) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_TEENSY) +else ifeq (dfu,$(findstring dfu,$(BOOTLOADER))) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_DFU) +else ifeq ($(strip $(BOOTLOADER)), USBasp) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_USBASP) +else ifeq ($(strip $(BOOTLOADER)), bootloadHID) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_BOOTLOADHID) +else ifeq ($(strip $(BOOTLOADER)), qmk-hid) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_HID_LUFA) +else + $(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_BOOTLOADER)" +endif diff --git a/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h b/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h deleted file mode 100644 index 51f9724f9..000000000 --- a/platforms/chibios/GENERIC_STM32_L433XC/configs/board.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright 2018-2021 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 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -#include_next "board.h" - -#undef STM32L432xx - -// Pretend that we're an L443xx as the ChibiOS definitions for L432/L433 mistakenly don't enable GPIOH, I2C2, or SPI2. -// Until ChibiOS upstream is fixed, this should be kept at L443, as nothing in QMK currently utilises the crypto peripheral on the L443. -#define STM32L443xx diff --git a/platforms/chibios/IC_TEENSY_3_1/board/board.c b/platforms/chibios/IC_TEENSY_3_1/board/board.c deleted file mode 100644 index 36ae8051e..000000000 --- a/platforms/chibios/IC_TEENSY_3_1/board/board.c +++ /dev/null @@ -1,146 +0,0 @@ -/* - ChibiOS - Copyright (C) 2015 RedoX https://github.com/RedoXyde - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -#include - -#if HAL_USE_PAL || defined(__DOXYGEN__) -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -const PALConfig pal_default_config = { - .ports = - { - { - /* - * PORTA setup. - * - * PTA4 - PIN33 - * PTA5 - PIN24 - * PTA12 - PIN3 - * PTA13 - PIN4 - * - * PTA18/19 crystal - * PTA0/3 SWD - */ - .port = IOPORT1, - .pads = - { - PAL_MODE_ALTERNATIVE_7, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_7, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_INPUT_ANALOG, PAL_MODE_INPUT_ANALOG, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - }, - }, - { - /* - * PORTB setup. - * - * PTB0 - PIN16 - * PTB1 - PIN17 - * PTB2 - PIN19 - * PTB3 - PIN18 - * PTB16 - PIN0 - UART0_TX - * PTB17 - PIN1 - UART0_RX - * PTB18 - PIN32 - * PTB19 - PIN25 - */ - .port = IOPORT2, - .pads = - { - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_3, PAL_MODE_ALTERNATIVE_3, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - }, - }, - { - /* - * PORTC setup. - * - * PTC0 - PIN15 - * PTC1 - PIN22 - * PTC2 - PIN23 - * PTC3 - PIN9 - * PTC4 - PIN10 - * PTC5 - PIN13 - * PTC6 - PIN11 - * PTC7 - PIN12 - * PTC8 - PIN28 - * PTC9 - PIN27 - * PTC10 - PIN29 - * PTC11 - PIN30 - */ - .port = IOPORT3, - .pads = - { - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - }, - }, - { - /* - * PORTD setup. - * - * PTD0 - PIN2 - * PTD1 - PIN14 - * PTD2 - PIN7 - * PTD3 - PIN8 - * PTD4 - PIN6 - * PTD5 - PIN20 - * PTD6 - PIN21 - * PTD7 - PIN5 - */ - .port = IOPORT4, - .pads = - { - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - }, - }, - { - /* - * PORTE setup. - * - * PTE0 - PIN31 - * PTE1 - PIN26 - */ - .port = IOPORT5, - .pads = - { - PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, - }, - }, - }, -}; -#endif - -// NOTE: This value comes from kiibohd/controller and is the location of a value -// which needs to be checked before disabling the watchdog (which happens in -// k20x_clock_init) -#define WDOG_TMROUTL *(volatile uint16_t *)0x40052012 - -/** - * @brief Early initialization code. - * @details This initialization must be performed just after stack setup - * and before any other initialization. - */ -void __early_init(void) { - // This is a dirty hack and should only be used as a temporary fix until this - // is upstreamed. - while (WDOG_TMROUTL < 2) - ; // Must wait for WDOG timer if already running, before jumping - - k20x_clock_init(); -} - -/** - * @brief Board-specific initialization code. - * @todo Add your board-specific code, if any. - */ -void boardInit(void) {} diff --git a/platforms/chibios/QMK_PROTON_C/configs/halconf.h b/platforms/chibios/QMK_PROTON_C/configs/halconf.h deleted file mode 100644 index 41fbac29e..000000000 --- a/platforms/chibios/QMK_PROTON_C/configs/halconf.h +++ /dev/null @@ -1,531 +0,0 @@ -/* - 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_1_ - -#include - -/** - * @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 TRUE -#endif - -/** - * @brief Enables the EFlash subsystem. - */ -#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__) -#define HAL_USE_EFL FALSE -#endif - -/** - * @brief Enables the GPT subsystem. - */ -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT TRUE -#endif - -/** - * @brief Enables the I2C subsystem. - */ -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE -#endif - -/** - * @brief Enables the I2S subsystem. - */ -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE -#endif - -/** - * @brief Enables the ICU subsystem. - */ -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE -#endif - -/** - * @brief Enables the MAC subsystem. - */ -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE -#endif - -/** - * @brief Enables the MMC_SPI subsystem. - */ -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) -#define HAL_USE_MMC_SPI FALSE -#endif - -/** - * @brief Enables the PWM subsystem. - */ -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE -#endif - -/** - * @brief Enables the RTC subsystem. - */ -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE -#endif - -/** - * @brief Enables the SDC subsystem. - */ -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE -#endif - -/** - * @brief Enables the SERIAL subsystem. - */ -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE -#endif - -/** - * @brief Enables the SERIAL over USB subsystem. - */ -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB TRUE -#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 TRUE -#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 TRUE -#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/platforms/chibios/BLACKPILL_STM32_F401/board/board.mk b/platforms/chibios/boards/BLACKPILL_STM32_F401/board/board.mk similarity index 100% rename from platforms/chibios/BLACKPILL_STM32_F401/board/board.mk rename to platforms/chibios/boards/BLACKPILL_STM32_F401/board/board.mk diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/board.h b/platforms/chibios/boards/BLACKPILL_STM32_F401/configs/board.h similarity index 100% rename from platforms/chibios/BLACKPILL_STM32_F401/configs/board.h rename to platforms/chibios/boards/BLACKPILL_STM32_F401/configs/board.h diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/bootloader_defs.h b/platforms/chibios/boards/BLACKPILL_STM32_F401/configs/bootloader_defs.h similarity index 100% rename from platforms/chibios/BLACKPILL_STM32_F401/configs/bootloader_defs.h rename to platforms/chibios/boards/BLACKPILL_STM32_F401/configs/bootloader_defs.h diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/config.h b/platforms/chibios/boards/BLACKPILL_STM32_F401/configs/config.h similarity index 100% rename from platforms/chibios/BLACKPILL_STM32_F401/configs/config.h rename to platforms/chibios/boards/BLACKPILL_STM32_F401/configs/config.h diff --git a/platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h b/platforms/chibios/boards/BLACKPILL_STM32_F401/configs/mcuconf.h similarity index 100% rename from platforms/chibios/BLACKPILL_STM32_F401/configs/mcuconf.h rename to platforms/chibios/boards/BLACKPILL_STM32_F401/configs/mcuconf.h diff --git a/platforms/chibios/boards/BLACKPILL_STM32_F401/ld/STM32F401xC_tinyuf2.ld b/platforms/chibios/boards/BLACKPILL_STM32_F401/ld/STM32F401xC_tinyuf2.ld new file mode 100644 index 000000000..f4e487dc8 --- /dev/null +++ b/platforms/chibios/boards/BLACKPILL_STM32_F401/ld/STM32F401xC_tinyuf2.ld @@ -0,0 +1,88 @@ +/* + 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. +*/ + +/* + * STM32F401xC memory setup. + */ +MEMORY +{ + flash0 (rx) : org = 0x08000000 + 64k, len = 256k - 64k /* tinyuf2 bootloader requires app to be located at 64k offset for this MCU */ + flash1 (rx) : org = 0x00000000, len = 0 + flash2 (rx) : org = 0x00000000, len = 0 + flash3 (rx) : org = 0x00000000, len = 0 + flash4 (rx) : org = 0x00000000, len = 0 + flash5 (rx) : org = 0x00000000, len = 0 + flash6 (rx) : org = 0x00000000, len = 0 + flash7 (rx) : org = 0x00000000, len = 0 + ram0 (wx) : org = 0x20000000, len = 64k + ram1 (wx) : org = 0x00000000, len = 0 + ram2 (wx) : org = 0x00000000, len = 0 + ram3 (wx) : org = 0x00000000, len = 0 + ram4 (wx) : org = 0x00000000, len = 0 + ram5 (wx) : org = 0x00000000, len = 0 + ram6 (wx) : org = 0x00000000, len = 0 + ram7 (wx) : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld + +/* TinyUF2 bootloader reset support */ +_board_dfu_dbl_tap = ORIGIN(ram0) + 64k - 4; /* this is based off the linker file for tinyuf2 */ diff --git a/platforms/chibios/boards/BLACKPILL_STM32_F401/ld/STM32F401xE_tinyuf2.ld b/platforms/chibios/boards/BLACKPILL_STM32_F401/ld/STM32F401xE_tinyuf2.ld new file mode 100644 index 000000000..895d13fa3 --- /dev/null +++ b/platforms/chibios/boards/BLACKPILL_STM32_F401/ld/STM32F401xE_tinyuf2.ld @@ -0,0 +1,88 @@ +/* + 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. +*/ + +/* + * STM32F401xE memory setup. + */ +MEMORY +{ + flash0 (rx) : org = 0x08000000 + 64k, len = 512k - 64k /* tinyuf2 bootloader requires app to be located at 64k offset for this MCU */ + flash1 (rx) : org = 0x00000000, len = 0 + flash2 (rx) : org = 0x00000000, len = 0 + flash3 (rx) : org = 0x00000000, len = 0 + flash4 (rx) : org = 0x00000000, len = 0 + flash5 (rx) : org = 0x00000000, len = 0 + flash6 (rx) : org = 0x00000000, len = 0 + flash7 (rx) : org = 0x00000000, len = 0 + ram0 (wx) : org = 0x20000000, len = 96k + ram1 (wx) : org = 0x00000000, len = 0 + ram2 (wx) : org = 0x00000000, len = 0 + ram3 (wx) : org = 0x00000000, len = 0 + ram4 (wx) : org = 0x00000000, len = 0 + ram5 (wx) : org = 0x00000000, len = 0 + ram6 (wx) : org = 0x00000000, len = 0 + ram7 (wx) : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld + +/* TinyUF2 bootloader reset support */ +_board_dfu_dbl_tap = ORIGIN(ram0) + 64k - 4; /* this is based off the linker file for tinyuf2 */ diff --git a/platforms/chibios/BLACKPILL_STM32_F411/board/board.mk b/platforms/chibios/boards/BLACKPILL_STM32_F411/board/board.mk similarity index 100% rename from platforms/chibios/BLACKPILL_STM32_F411/board/board.mk rename to platforms/chibios/boards/BLACKPILL_STM32_F411/board/board.mk diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/board.h b/platforms/chibios/boards/BLACKPILL_STM32_F411/configs/board.h similarity index 100% rename from platforms/chibios/BLACKPILL_STM32_F411/configs/board.h rename to platforms/chibios/boards/BLACKPILL_STM32_F411/configs/board.h diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/bootloader_defs.h b/platforms/chibios/boards/BLACKPILL_STM32_F411/configs/bootloader_defs.h similarity index 100% rename from platforms/chibios/BLACKPILL_STM32_F411/configs/bootloader_defs.h rename to platforms/chibios/boards/BLACKPILL_STM32_F411/configs/bootloader_defs.h diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/config.h b/platforms/chibios/boards/BLACKPILL_STM32_F411/configs/config.h similarity index 100% rename from platforms/chibios/BLACKPILL_STM32_F411/configs/config.h rename to platforms/chibios/boards/BLACKPILL_STM32_F411/configs/config.h diff --git a/platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h b/platforms/chibios/boards/BLACKPILL_STM32_F411/configs/mcuconf.h similarity index 100% rename from platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h rename to platforms/chibios/boards/BLACKPILL_STM32_F411/configs/mcuconf.h diff --git a/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld b/platforms/chibios/boards/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld similarity index 100% rename from platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld rename to platforms/chibios/boards/BLACKPILL_STM32_F411/ld/STM32F411xC_tinyuf2.ld diff --git a/platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld b/platforms/chibios/boards/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld similarity index 100% rename from platforms/chibios/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld rename to platforms/chibios/boards/BLACKPILL_STM32_F411/ld/STM32F411xE_tinyuf2.ld diff --git a/platforms/chibios/GENERIC_STM32_F042X6/board/board.c b/platforms/chibios/boards/GENERIC_STM32_F042X6/board/board.c similarity index 100% rename from platforms/chibios/GENERIC_STM32_F042X6/board/board.c rename to platforms/chibios/boards/GENERIC_STM32_F042X6/board/board.c diff --git a/platforms/chibios/GENERIC_STM32_F042X6/board/board.h b/platforms/chibios/boards/GENERIC_STM32_F042X6/board/board.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F042X6/board/board.h rename to platforms/chibios/boards/GENERIC_STM32_F042X6/board/board.h diff --git a/platforms/chibios/GENERIC_STM32_F042X6/board/board.mk b/platforms/chibios/boards/GENERIC_STM32_F042X6/board/board.mk similarity index 100% rename from platforms/chibios/GENERIC_STM32_F042X6/board/board.mk rename to platforms/chibios/boards/GENERIC_STM32_F042X6/board/board.mk diff --git a/platforms/chibios/GENERIC_STM32_F042X6/configs/bootloader_defs.h b/platforms/chibios/boards/GENERIC_STM32_F042X6/configs/bootloader_defs.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F042X6/configs/bootloader_defs.h rename to platforms/chibios/boards/GENERIC_STM32_F042X6/configs/bootloader_defs.h diff --git a/platforms/chibios/GENERIC_STM32_F042X6/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_F042X6/configs/config.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F042X6/configs/config.h rename to platforms/chibios/boards/GENERIC_STM32_F042X6/configs/config.h diff --git a/platforms/chibios/GENERIC_STM32_F042X6/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_F042X6/configs/mcuconf.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F042X6/configs/mcuconf.h rename to platforms/chibios/boards/GENERIC_STM32_F042X6/configs/mcuconf.h diff --git a/platforms/chibios/GENERIC_STM32_F072XB/board/board.mk b/platforms/chibios/boards/GENERIC_STM32_F072XB/board/board.mk similarity index 100% rename from platforms/chibios/GENERIC_STM32_F072XB/board/board.mk rename to platforms/chibios/boards/GENERIC_STM32_F072XB/board/board.mk diff --git a/platforms/chibios/GENERIC_STM32_F072XB/configs/board.h b/platforms/chibios/boards/GENERIC_STM32_F072XB/configs/board.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F072XB/configs/board.h rename to platforms/chibios/boards/GENERIC_STM32_F072XB/configs/board.h diff --git a/platforms/chibios/GENERIC_STM32_F072XB/configs/bootloader_defs.h b/platforms/chibios/boards/GENERIC_STM32_F072XB/configs/bootloader_defs.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F072XB/configs/bootloader_defs.h rename to platforms/chibios/boards/GENERIC_STM32_F072XB/configs/bootloader_defs.h diff --git a/platforms/chibios/GENERIC_STM32_F072XB/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_F072XB/configs/config.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F072XB/configs/config.h rename to platforms/chibios/boards/GENERIC_STM32_F072XB/configs/config.h diff --git a/platforms/chibios/GENERIC_STM32_F072XB/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_F072XB/configs/mcuconf.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F072XB/configs/mcuconf.h rename to platforms/chibios/boards/GENERIC_STM32_F072XB/configs/mcuconf.h diff --git a/platforms/chibios/GENERIC_STM32_F303XC/board/board.mk b/platforms/chibios/boards/GENERIC_STM32_F303XC/board/board.mk similarity index 100% rename from platforms/chibios/GENERIC_STM32_F303XC/board/board.mk rename to platforms/chibios/boards/GENERIC_STM32_F303XC/board/board.mk diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/board.h b/platforms/chibios/boards/GENERIC_STM32_F303XC/configs/board.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F303XC/configs/board.h rename to platforms/chibios/boards/GENERIC_STM32_F303XC/configs/board.h diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/bootloader_defs.h b/platforms/chibios/boards/GENERIC_STM32_F303XC/configs/bootloader_defs.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F303XC/configs/bootloader_defs.h rename to platforms/chibios/boards/GENERIC_STM32_F303XC/configs/bootloader_defs.h diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_F303XC/configs/config.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F303XC/configs/config.h rename to platforms/chibios/boards/GENERIC_STM32_F303XC/configs/config.h diff --git a/platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_F303XC/configs/mcuconf.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F303XC/configs/mcuconf.h rename to platforms/chibios/boards/GENERIC_STM32_F303XC/configs/mcuconf.h diff --git a/platforms/chibios/boards/GENERIC_STM32_F407XE/board/board.mk b/platforms/chibios/boards/GENERIC_STM32_F407XE/board/board.mk new file mode 100644 index 000000000..6c837bb8e --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_F407XE/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) \ No newline at end of file diff --git a/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/board.h b/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/board.h new file mode 100644 index 000000000..22c4e4cd7 --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/board.h @@ -0,0 +1,24 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#define STM32_HSECLK 8000000 +// The following is required to disable the pull-down on PA9, when PA9 is used for the keyboard matrix: +#define BOARD_OTG_NOVBUSSENS + +#include_next "board.h" + +#undef STM32_HSE_BYPASS \ No newline at end of file diff --git a/platforms/chibios/GENERIC_STM32_F446XE/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/config.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F446XE/configs/config.h rename to platforms/chibios/boards/GENERIC_STM32_F407XE/configs/config.h diff --git a/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/mcuconf.h new file mode 100644 index 000000000..4be47fe1b --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/mcuconf.h @@ -0,0 +1,355 @@ +/* + 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. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF +#define STM32F405_MCUCONF +#define STM32F415_MCUCONF +#define STM32F407_MCUCONF +#define STM32F417_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 8 +#define STM32_PLLN_VALUE 336 +#define STM32_PLLP_VALUE 2 +#define STM32_PLLQ_VALUE 7 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 + +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 6 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_USE_CAN2 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 +#define STM32_CAN_CAN2_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 FALSE +#define STM32_DAC_USE_DAC1_CH2 FALSE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(1, 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_TIM6 FALSE +#define STM32_GPT_USE_TIM7 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_USE_TIM12 FALSE +#define STM32_GPT_USE_TIM14 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_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 +#define STM32_GPT_TIM12_IRQ_PRIORITY 7 +#define STM32_GPT_TIM14_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) 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_USE_TIM9 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 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * MAC driver system settings. + */ +#define STM32_MAC_TRANSMIT_BUFFERS 2 +#define STM32_MAC_RECEIVE_BUFFERS 4 +#define STM32_MAC_BUFFERS_SIZE 1522 +#define STM32_MAC_PHY_TIMEOUT 100 +#define STM32_MAC_ETH1_CHANGE_PHY_STATE TRUE +#define STM32_MAC_ETH1_IRQ_PRIORITY 13 +#define STM32_MAC_IP_CHECKSUM_OFFLOAD 0 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM9 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 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + +/* + * SDC driver system settings. + */ +#define STM32_SDC_SDIO_DMA_PRIORITY 3 +#define STM32_SDC_SDIO_IRQ_PRIORITY 9 +#define STM32_SDC_WRITE_TIMEOUT_MS 1000 +#define STM32_SDC_READ_TIMEOUT_MS 1000 +#define STM32_SDC_CLOCK_ACTIVATION_DELAY 10 +#define STM32_SDC_SDIO_UNALIGNED_SUPPORT TRUE +#define STM32_SDC_SDIO_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) + +/* + * 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_USE_USART6 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 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#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_USE_UART4 FALSE +#define STM32_UART_USE_UART5 FALSE +#define STM32_UART_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_UART_UART5_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_UART_UART5_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_UART4_IRQ_PRIORITY 12 +#define STM32_UART_UART5_IRQ_PRIORITY 12 +#define STM32_UART_USART6_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_UART4_DMA_PRIORITY 0 +#define STM32_UART_UART5_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_USE_OTG2 FALSE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG2_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG2_RX_FIFO_SIZE 1024 +#define STM32_USB_HOST_WAKEUP_DURATION 2 + +#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 +#define STM32_USB_OTG_THREAD_STACK_SIZE 128 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/platforms/chibios/GENERIC_STM32_F446XE/board/board.mk b/platforms/chibios/boards/GENERIC_STM32_F446XE/board/board.mk similarity index 100% rename from platforms/chibios/GENERIC_STM32_F446XE/board/board.mk rename to platforms/chibios/boards/GENERIC_STM32_F446XE/board/board.mk diff --git a/platforms/chibios/GENERIC_STM32_F446XE/configs/board.h b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/board.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F446XE/configs/board.h rename to platforms/chibios/boards/GENERIC_STM32_F446XE/configs/board.h diff --git a/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h new file mode 100644 index 000000000..cc52a953e --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/config.h @@ -0,0 +1,23 @@ +/* Copyright 2021 Andrei Purdea + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up by checking against ST's application note AN2606. + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000 +#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP +# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE +#endif diff --git a/platforms/chibios/GENERIC_STM32_F446XE/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/mcuconf.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_F446XE/configs/mcuconf.h rename to platforms/chibios/boards/GENERIC_STM32_F446XE/configs/mcuconf.h diff --git a/platforms/chibios/GENERIC_STM32_G431XB/board/board.mk b/platforms/chibios/boards/GENERIC_STM32_G431XB/board/board.mk similarity index 100% rename from platforms/chibios/GENERIC_STM32_G431XB/board/board.mk rename to platforms/chibios/boards/GENERIC_STM32_G431XB/board/board.mk diff --git a/platforms/chibios/GENERIC_STM32_G431XB/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/config.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_G431XB/configs/config.h rename to platforms/chibios/boards/GENERIC_STM32_G431XB/configs/config.h diff --git a/platforms/chibios/GENERIC_STM32_G431XB/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/mcuconf.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_G431XB/configs/mcuconf.h rename to platforms/chibios/boards/GENERIC_STM32_G431XB/configs/mcuconf.h diff --git a/platforms/chibios/GENERIC_STM32_G474XE/board/board.mk b/platforms/chibios/boards/GENERIC_STM32_G474XE/board/board.mk similarity index 100% rename from platforms/chibios/GENERIC_STM32_G474XE/board/board.mk rename to platforms/chibios/boards/GENERIC_STM32_G474XE/board/board.mk diff --git a/platforms/chibios/GENERIC_STM32_G474XE/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_G474XE/configs/config.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_G474XE/configs/config.h rename to platforms/chibios/boards/GENERIC_STM32_G474XE/configs/config.h diff --git a/platforms/chibios/GENERIC_STM32_G474XE/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_G474XE/configs/mcuconf.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_G474XE/configs/mcuconf.h rename to platforms/chibios/boards/GENERIC_STM32_G474XE/configs/mcuconf.h diff --git a/platforms/chibios/GENERIC_STM32_L433XC/board/board.mk b/platforms/chibios/boards/GENERIC_STM32_L412XB/board/board.mk similarity index 100% rename from platforms/chibios/GENERIC_STM32_L433XC/board/board.mk rename to platforms/chibios/boards/GENERIC_STM32_L412XB/board/board.mk diff --git a/platforms/chibios/boards/GENERIC_STM32_L412XB/configs/board.h b/platforms/chibios/boards/GENERIC_STM32_L412XB/configs/board.h new file mode 100644 index 000000000..2e37d95fe --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_L412XB/configs/board.h @@ -0,0 +1,24 @@ +/* Copyright 2018-2021 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include_next "board.h" + +#undef STM32L432xx + +// Pretend that we're an L443xx as the ChibiOS definitions for L4x2/L4x3 mistakenly don't enable GPIOH, I2C2, or SPI2. +// Until ChibiOS upstream is fixed, this should be kept at L443, as nothing in QMK currently utilises the crypto peripheral on the L443. +#define STM32L443xx diff --git a/platforms/chibios/GENERIC_STM32_L433XC/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_L412XB/configs/config.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_L433XC/configs/config.h rename to platforms/chibios/boards/GENERIC_STM32_L412XB/configs/config.h diff --git a/platforms/chibios/boards/GENERIC_STM32_L412XB/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_L412XB/configs/mcuconf.h new file mode 100644 index 000000000..8ad5a8da2 --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_L412XB/configs/mcuconf.h @@ -0,0 +1,282 @@ +/* + 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. +*/ + +/* + * STM32L4xx 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. + */ + +#ifndef MCUCONF_H +#define MCUCONF_H + +#define STM32L4xx_MCUCONF +#define STM32L412_MCUCONF +#define STM32L422_MCUCONF +#define STM32L432_MCUCONF +#define STM32L433_MCUCONF +#define STM32L442_MCUCONF +#define STM32L443_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_VOS STM32_VOS_RANGE1 +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI16_ENABLED TRUE +#define STM32_HSI48_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_MSIPLL_ENABLED FALSE +#define STM32_ADC_CLOCK_ENABLED TRUE +#define STM32_USB_CLOCK_ENABLED TRUE +#define STM32_SAI1_CLOCK_ENABLED TRUE +#define STM32_SAI2_CLOCK_ENABLED TRUE +#define STM32_MSIRANGE STM32_MSIRANGE_4M +#define STM32_MSISRANGE STM32_MSISRANGE_4M +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI16 +#define STM32_PLLM_VALUE 4 +#define STM32_PLLN_VALUE 80 +#define STM32_PLLP_VALUE 7 +#define STM32_PLLQ_VALUE 4 +#define STM32_PLLR_VALUE 4 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV1 +#define STM32_PPRE2 STM32_PPRE2_DIV1 +#define STM32_STOPWUCK STM32_STOPWUCK_MSI +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_MCOPRE STM32_MCOPRE_DIV1 +#define STM32_LSCOSEL STM32_LSCOSEL_NOCLOCK +#define STM32_PLLSAI1N_VALUE 72 +#define STM32_PLLSAI1P_VALUE 7 +#define STM32_PLLSAI1Q_VALUE 6 +#define STM32_PLLSAI1R_VALUE 6 +#define STM32_PLLSAI2N_VALUE 72 +#define STM32_PLLSAI2P_VALUE 7 +#define STM32_PLLSAI2R_VALUE 6 + +/* + * Peripherals clock sources. + */ +#define STM32_USART1SEL STM32_USART1SEL_SYSCLK +#define STM32_USART2SEL STM32_USART2SEL_SYSCLK +#define STM32_USART3SEL STM32_USART3SEL_SYSCLK +#define STM32_UART4SEL STM32_UART4SEL_SYSCLK +#define STM32_UART5SEL STM32_UART5SEL_SYSCLK +#define STM32_LPUART1SEL STM32_LPUART1SEL_SYSCLK +#define STM32_I2C1SEL STM32_I2C1SEL_SYSCLK +#define STM32_I2C2SEL STM32_I2C2SEL_SYSCLK +#define STM32_I2C3SEL STM32_I2C3SEL_SYSCLK +#define STM32_LPTIM1SEL STM32_LPTIM1SEL_PCLK1 +#define STM32_LPTIM2SEL STM32_LPTIM2SEL_PCLK1 +#define STM32_SAI1SEL STM32_SAI1SEL_OFF +#define STM32_SAI2SEL STM32_SAI2SEL_OFF +#define STM32_CLK48SEL STM32_CLK48SEL_HSI48 +#define STM32_ADCSEL STM32_ADCSEL_SYSCLK +#define STM32_SWPMI1SEL STM32_SWPMI1SEL_PCLK1 +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI1635_38_PRIORITY 6 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_22_PRIORITY 15 + +#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 +#define STM32_IRQ_TIM2_PRIORITY 7 +#define STM32_IRQ_TIM6_PRIORITY 7 +#define STM32_IRQ_TIM7_PRIORITY 7 + +#define STM32_IRQ_USART1_PRIORITY 12 +#define STM32_IRQ_USART2_PRIORITY 12 +#define STM32_IRQ_USART3_PRIORITY 12 +#define STM32_IRQ_LPUART1_PRIORITY 12 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_COMPACT_SAMPLES FALSE +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC12_IRQ_PRIORITY 5 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 5 +#define STM32_ADC_ADC123_CLOCK_MODE ADC_CCR_CKMODE_AHB_DIV1 +#define STM32_ADC_ADC123_PRESC ADC_CCR_PRESC_DIV2 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 FALSE +#define STM32_DAC_USE_DAC1_CH2 FALSE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM6 FALSE +#define STM32_GPT_USE_TIM7 FALSE +#define STM32_GPT_USE_TIM15 FALSE +#define STM32_GPT_USE_TIM16 FALSE + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#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_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_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_TIM15 FALSE +#define STM32_ICU_USE_TIM16 FALSE + +/* + * 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_TIM15 FALSE +#define STM32_PWM_USE_TIM16 FALSE + +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_LPUART1 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_LPUART1_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_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 + +/* + * TRNG driver system settings. + */ +#define STM32_TRNG_USE_RNG1 FALSE + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 6) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +/* + * WSPI driver system settings. + */ +#define STM32_WSPI_USE_QUADSPI1 FALSE +#define STM32_WSPI_QUADSPI1_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_WSPI_QUADSPI1_PRESCALER_VALUE 1 + +#endif /* MCUCONF_H */ diff --git a/platforms/chibios/boards/GENERIC_STM32_L433XC/board/board.mk b/platforms/chibios/boards/GENERIC_STM32_L433XC/board/board.mk new file mode 100644 index 000000000..1250385eb --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_L433XC/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO32_L432KC/board.c + +# Required include directories +BOARDINC = $(CHIBIOS)/os/hal/boards/ST_NUCLEO32_L432KC + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/platforms/chibios/boards/GENERIC_STM32_L433XC/configs/board.h b/platforms/chibios/boards/GENERIC_STM32_L433XC/configs/board.h new file mode 100644 index 000000000..2e37d95fe --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_L433XC/configs/board.h @@ -0,0 +1,24 @@ +/* Copyright 2018-2021 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 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include_next "board.h" + +#undef STM32L432xx + +// Pretend that we're an L443xx as the ChibiOS definitions for L4x2/L4x3 mistakenly don't enable GPIOH, I2C2, or SPI2. +// Until ChibiOS upstream is fixed, this should be kept at L443, as nothing in QMK currently utilises the crypto peripheral on the L443. +#define STM32L443xx diff --git a/platforms/chibios/boards/GENERIC_STM32_L433XC/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_L433XC/configs/config.h new file mode 100644 index 000000000..c27c61b19 --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_L433XC/configs/config.h @@ -0,0 +1,26 @@ +/* Copyright 2018-2021 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 . + */ + +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up by checking against ST's application note AN2606. + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000 + +#define PAL_STM32_OSPEED_HIGHEST PAL_STM32_OSPEED_HIGH + +#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP +# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE +#endif diff --git a/platforms/chibios/GENERIC_STM32_L433XC/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_L433XC/configs/mcuconf.h similarity index 100% rename from platforms/chibios/GENERIC_STM32_L433XC/configs/mcuconf.h rename to platforms/chibios/boards/GENERIC_STM32_L433XC/configs/mcuconf.h diff --git a/platforms/chibios/boards/IC_TEENSY_3_1/board/board.c b/platforms/chibios/boards/IC_TEENSY_3_1/board/board.c new file mode 100644 index 000000000..424e0c975 --- /dev/null +++ b/platforms/chibios/boards/IC_TEENSY_3_1/board/board.c @@ -0,0 +1,151 @@ +/* + ChibiOS - Copyright (C) 2015 RedoX https://github.com/RedoXyde + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +#include + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { + .ports = + { + { + /* + * PORTA setup. + * + * PTA4 - PIN33 + * PTA5 - PIN24 + * PTA12 - PIN3 + * PTA13 - PIN4 + * + * PTA18/19 crystal + * PTA0/3 SWD + */ + .port = IOPORT1, + .pads = + { + PAL_MODE_ALTERNATIVE_7, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_7, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_INPUT_ANALOG, PAL_MODE_INPUT_ANALOG, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, + }, + }, + { + /* + * PORTB setup. + * + * PTB0 - PIN16 + * PTB1 - PIN17 + * PTB2 - PIN19 + * PTB3 - PIN18 + * PTB16 - PIN0 - UART0_TX + * PTB17 - PIN1 - UART0_RX + * PTB18 - PIN32 + * PTB19 - PIN25 + */ + .port = IOPORT2, + .pads = + { + PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_ALTERNATIVE_3, PAL_MODE_ALTERNATIVE_3, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, + }, + }, + { + /* + * PORTC setup. + * + * PTC0 - PIN15 + * PTC1 - PIN22 + * PTC2 - PIN23 + * PTC3 - PIN9 + * PTC4 - PIN10 + * PTC5 - PIN13 + * PTC6 - PIN11 + * PTC7 - PIN12 + * PTC8 - PIN28 + * PTC9 - PIN27 + * PTC10 - PIN29 + * PTC11 - PIN30 + */ + .port = IOPORT3, + .pads = + { + PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, + }, + }, + { + /* + * PORTD setup. + * + * PTD0 - PIN2 + * PTD1 - PIN14 + * PTD2 - PIN7 + * PTD3 - PIN8 + * PTD4 - PIN6 + * PTD5 - PIN20 + * PTD6 - PIN21 + * PTD7 - PIN5 + */ + .port = IOPORT4, + .pads = + { + PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, + }, + }, + { + /* + * PORTE setup. + * + * PTE0 - PIN31 + * PTE1 - PIN26 + */ + .port = IOPORT5, + .pads = + { + PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_OUTPUT_PUSHPULL, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, PAL_MODE_UNCONNECTED, + }, + }, + }, +}; +#endif + +// NOTE: This value comes from kiibohd/controller and is the location of a value +// which needs to be checked before disabling the watchdog (which happens in +// k20x_clock_init) +#define WDOG_TMROUTL *(volatile uint16_t *)0x40052012 + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + // This is a dirty hack and should only be used as a temporary fix until this + // is upstreamed. + while (WDOG_TMROUTL < 2) + ; // Must wait for WDOG timer if already running, before jumping + + k20x_clock_init(); +} + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) {} + + +void restart_usb_driver(USBDriver *usbp) { + // Do nothing. Restarting the USB driver on these boards breaks it. +} diff --git a/platforms/chibios/IC_TEENSY_3_1/board/board.h b/platforms/chibios/boards/IC_TEENSY_3_1/board/board.h similarity index 100% rename from platforms/chibios/IC_TEENSY_3_1/board/board.h rename to platforms/chibios/boards/IC_TEENSY_3_1/board/board.h diff --git a/platforms/chibios/IC_TEENSY_3_1/board/board.mk b/platforms/chibios/boards/IC_TEENSY_3_1/board/board.mk similarity index 100% rename from platforms/chibios/IC_TEENSY_3_1/board/board.mk rename to platforms/chibios/boards/IC_TEENSY_3_1/board/board.mk diff --git a/platforms/chibios/boards/IC_TEENSY_4_1/board/board.mk b/platforms/chibios/boards/IC_TEENSY_4_1/board/board.mk new file mode 100644 index 000000000..bc242ac3c --- /dev/null +++ b/platforms/chibios/boards/IC_TEENSY_4_1/board/board.mk @@ -0,0 +1 @@ +include $(CHIBIOS_CONTRIB)/os/hal/boards/PJRC_TEENSY_4_1/board.mk diff --git a/platforms/chibios/boards/IC_TEENSY_4_1/rules.mk b/platforms/chibios/boards/IC_TEENSY_4_1/rules.mk new file mode 100644 index 000000000..0c62d209c --- /dev/null +++ b/platforms/chibios/boards/IC_TEENSY_4_1/rules.mk @@ -0,0 +1 @@ +TEENSY_LOADER_CLI_MCU = imxrt1062 diff --git a/platforms/chibios/QMK_PROTON_C/board/board.mk b/platforms/chibios/boards/QMK_PROTON_C/board/board.mk similarity index 100% rename from platforms/chibios/QMK_PROTON_C/board/board.mk rename to platforms/chibios/boards/QMK_PROTON_C/board/board.mk diff --git a/platforms/chibios/QMK_PROTON_C/configs/board.h b/platforms/chibios/boards/QMK_PROTON_C/configs/board.h similarity index 100% rename from platforms/chibios/QMK_PROTON_C/configs/board.h rename to platforms/chibios/boards/QMK_PROTON_C/configs/board.h diff --git a/platforms/chibios/QMK_PROTON_C/configs/bootloader_defs.h b/platforms/chibios/boards/QMK_PROTON_C/configs/bootloader_defs.h similarity index 100% rename from platforms/chibios/QMK_PROTON_C/configs/bootloader_defs.h rename to platforms/chibios/boards/QMK_PROTON_C/configs/bootloader_defs.h diff --git a/platforms/chibios/QMK_PROTON_C/configs/chconf.h b/platforms/chibios/boards/QMK_PROTON_C/configs/chconf.h similarity index 100% rename from platforms/chibios/QMK_PROTON_C/configs/chconf.h rename to platforms/chibios/boards/QMK_PROTON_C/configs/chconf.h diff --git a/platforms/chibios/QMK_PROTON_C/configs/config.h b/platforms/chibios/boards/QMK_PROTON_C/configs/config.h similarity index 100% rename from platforms/chibios/QMK_PROTON_C/configs/config.h rename to platforms/chibios/boards/QMK_PROTON_C/configs/config.h diff --git a/platforms/chibios/boards/QMK_PROTON_C/configs/halconf.h b/platforms/chibios/boards/QMK_PROTON_C/configs/halconf.h new file mode 100644 index 000000000..d7a639a6d --- /dev/null +++ b/platforms/chibios/boards/QMK_PROTON_C/configs/halconf.h @@ -0,0 +1,531 @@ +/* + 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_1_ + +#include + +/** + * @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 TRUE +#endif + +/** + * @brief Enables the EFlash subsystem. + */ +#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__) +#define HAL_USE_EFL FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT TRUE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C TRUE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#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 TRUE +#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 TRUE +#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 128 +#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/platforms/chibios/QMK_PROTON_C/configs/mcuconf.h b/platforms/chibios/boards/QMK_PROTON_C/configs/mcuconf.h similarity index 100% rename from platforms/chibios/QMK_PROTON_C/configs/mcuconf.h rename to platforms/chibios/boards/QMK_PROTON_C/configs/mcuconf.h diff --git a/platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk b/platforms/chibios/boards/QMK_PROTON_C/convert_to_proton_c.mk similarity index 100% rename from platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk rename to platforms/chibios/boards/QMK_PROTON_C/convert_to_proton_c.mk diff --git a/platforms/chibios/STM32_F103_STM32DUINO/board/board.c b/platforms/chibios/boards/STM32_F103_STM32DUINO/board/board.c similarity index 100% rename from platforms/chibios/STM32_F103_STM32DUINO/board/board.c rename to platforms/chibios/boards/STM32_F103_STM32DUINO/board/board.c diff --git a/platforms/chibios/STM32_F103_STM32DUINO/board/board.h b/platforms/chibios/boards/STM32_F103_STM32DUINO/board/board.h similarity index 100% rename from platforms/chibios/STM32_F103_STM32DUINO/board/board.h rename to platforms/chibios/boards/STM32_F103_STM32DUINO/board/board.h diff --git a/platforms/chibios/STM32_F103_STM32DUINO/board/board.mk b/platforms/chibios/boards/STM32_F103_STM32DUINO/board/board.mk similarity index 100% rename from platforms/chibios/STM32_F103_STM32DUINO/board/board.mk rename to platforms/chibios/boards/STM32_F103_STM32DUINO/board/board.mk diff --git a/platforms/chibios/STM32_F103_STM32DUINO/configs/mcuconf.h b/platforms/chibios/boards/STM32_F103_STM32DUINO/configs/mcuconf.h similarity index 100% rename from platforms/chibios/STM32_F103_STM32DUINO/configs/mcuconf.h rename to platforms/chibios/boards/STM32_F103_STM32DUINO/configs/mcuconf.h diff --git a/platforms/chibios/boards/STM32_F103_STM32DUINO/ld/STM32F103x8_stm32duino_bootloader.ld b/platforms/chibios/boards/STM32_F103_STM32DUINO/ld/STM32F103x8_stm32duino_bootloader.ld new file mode 100644 index 000000000..a4bd566b5 --- /dev/null +++ b/platforms/chibios/boards/STM32_F103_STM32DUINO/ld/STM32F103x8_stm32duino_bootloader.ld @@ -0,0 +1,22 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * STM32F103x8 memory setup for use with the STM32Duino bootloader. + */ +f103_flash_size = 64k; + +INCLUDE stm32duino_bootloader_common.ld diff --git a/platforms/chibios/boards/STM32_F103_STM32DUINO/ld/STM32F103xB_stm32duino_bootloader.ld b/platforms/chibios/boards/STM32_F103_STM32DUINO/ld/STM32F103xB_stm32duino_bootloader.ld new file mode 100644 index 000000000..dc47400dc --- /dev/null +++ b/platforms/chibios/boards/STM32_F103_STM32DUINO/ld/STM32F103xB_stm32duino_bootloader.ld @@ -0,0 +1,22 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * STM32F103xB memory setup for use with the STM32Duino bootloader. + */ +f103_flash_size = 128k; + +INCLUDE stm32duino_bootloader_common.ld diff --git a/platforms/chibios/boards/STM32_F103_STM32DUINO/ld/stm32duino_bootloader_common.ld b/platforms/chibios/boards/STM32_F103_STM32DUINO/ld/stm32duino_bootloader_common.ld new file mode 100644 index 000000000..76cd3153b --- /dev/null +++ b/platforms/chibios/boards/STM32_F103_STM32DUINO/ld/stm32duino_bootloader_common.ld @@ -0,0 +1,85 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * STM32Duino bootloader common memory setup. + */ +MEMORY +{ + flash0 : org = 0x08002000, len = f103_flash_size - 0x2000 + flash1 : org = 0x00000000, len = 0 + flash2 : org = 0x00000000, len = 0 + flash3 : org = 0x00000000, len = 0 + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x20000000, len = 20k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/platforms/chibios/common/configs/chconf.h b/platforms/chibios/boards/common/configs/chconf.h similarity index 100% rename from platforms/chibios/common/configs/chconf.h rename to platforms/chibios/boards/common/configs/chconf.h diff --git a/platforms/chibios/boards/common/configs/halconf.h b/platforms/chibios/boards/common/configs/halconf.h new file mode 100644 index 000000000..c80f67ee2 --- /dev/null +++ b/platforms/chibios/boards/common/configs/halconf.h @@ -0,0 +1,531 @@ +/* + 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_1_ + +#include + +/** + * @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 EFlash subsystem. + */ +#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__) +#define HAL_USE_EFL 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 128 +#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/platforms/chibios/common/ld/MKL26Z64.ld b/platforms/chibios/boards/common/ld/MKL26Z64.ld similarity index 100% rename from platforms/chibios/common/ld/MKL26Z64.ld rename to platforms/chibios/boards/common/ld/MKL26Z64.ld diff --git a/platforms/chibios/boards/common/ld/STM32L412xB.ld b/platforms/chibios/boards/common/ld/STM32L412xB.ld new file mode 100644 index 000000000..5718d6bc7 --- /dev/null +++ b/platforms/chibios/boards/common/ld/STM32L412xB.ld @@ -0,0 +1,85 @@ +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * STM32L412xB memory setup. + */ +MEMORY +{ + flash0 : org = 0x08000000, len = 128k + flash1 : org = 0x00000000, len = 0 + flash2 : org = 0x00000000, len = 0 + flash3 : org = 0x00000000, len = 0 + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x20000000, len = 32k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/platforms/chibios/keyboard-config-templates/board.h b/platforms/chibios/boards/keyboard-config-templates/board.h similarity index 100% rename from platforms/chibios/keyboard-config-templates/board.h rename to platforms/chibios/boards/keyboard-config-templates/board.h diff --git a/platforms/chibios/keyboard-config-templates/chconf.h b/platforms/chibios/boards/keyboard-config-templates/chconf.h similarity index 100% rename from platforms/chibios/keyboard-config-templates/chconf.h rename to platforms/chibios/boards/keyboard-config-templates/chconf.h diff --git a/platforms/chibios/keyboard-config-templates/halconf.h b/platforms/chibios/boards/keyboard-config-templates/halconf.h similarity index 100% rename from platforms/chibios/keyboard-config-templates/halconf.h rename to platforms/chibios/boards/keyboard-config-templates/halconf.h diff --git a/platforms/chibios/keyboard-config-templates/mcuconf.h b/platforms/chibios/boards/keyboard-config-templates/mcuconf.h similarity index 100% rename from platforms/chibios/keyboard-config-templates/mcuconf.h rename to platforms/chibios/boards/keyboard-config-templates/mcuconf.h diff --git a/platforms/chibios/common/configs/halconf.h b/platforms/chibios/common/configs/halconf.h deleted file mode 100644 index 264ae4e6c..000000000 --- a/platforms/chibios/common/configs/halconf.h +++ /dev/null @@ -1,531 +0,0 @@ -/* - 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_1_ - -#include - -/** - * @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 EFlash subsystem. - */ -#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__) -#define HAL_USE_EFL 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/platforms/chibios/common/ld/STM32F103x8_stm32duino_bootloader.ld b/platforms/chibios/common/ld/STM32F103x8_stm32duino_bootloader.ld deleted file mode 100644 index bb852422a..000000000 --- a/platforms/chibios/common/ld/STM32F103x8_stm32duino_bootloader.ld +++ /dev/null @@ -1,85 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * ST32F103xB memory setup for use with the maplemini bootloader. - */ -MEMORY -{ - flash0 : org = 0x08002000, len = 64k - 0x2000 - flash1 : org = 0x00000000, len = 0 - flash2 : org = 0x00000000, len = 0 - flash3 : org = 0x00000000, len = 0 - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x20000000, len = 20k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash0); -REGION_ALIAS("XTORS_FLASH_LMA", flash0); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash0); -REGION_ALIAS("TEXT_FLASH_LMA", flash0); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash0); -REGION_ALIAS("RODATA_FLASH_LMA", flash0); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash0); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -/* Generic rules inclusion.*/ -INCLUDE rules.ld diff --git a/drivers/chibios/analog.c b/platforms/chibios/drivers/analog.c similarity index 100% rename from drivers/chibios/analog.c rename to platforms/chibios/drivers/analog.c diff --git a/drivers/chibios/analog.h b/platforms/chibios/drivers/analog.h similarity index 100% rename from drivers/chibios/analog.h rename to platforms/chibios/drivers/analog.h diff --git a/drivers/eeprom/eeprom_stm32_L0_L1.c b/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.c similarity index 100% rename from drivers/eeprom/eeprom_stm32_L0_L1.c rename to platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.c diff --git a/drivers/eeprom/eeprom_stm32_L0_L1.h b/platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.h similarity index 100% rename from drivers/eeprom/eeprom_stm32_L0_L1.h rename to platforms/chibios/drivers/eeprom/eeprom_stm32_L0_L1.h diff --git a/drivers/chibios/i2c_master.c b/platforms/chibios/drivers/i2c_master.c similarity index 100% rename from drivers/chibios/i2c_master.c rename to platforms/chibios/drivers/i2c_master.c diff --git a/drivers/chibios/i2c_master.h b/platforms/chibios/drivers/i2c_master.h similarity index 100% rename from drivers/chibios/i2c_master.h rename to platforms/chibios/drivers/i2c_master.h diff --git a/platforms/chibios/drivers/serial.c b/platforms/chibios/drivers/serial.c new file mode 100644 index 000000000..f54fbcee4 --- /dev/null +++ b/platforms/chibios/drivers/serial.c @@ -0,0 +1,278 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#include "quantum.h" +#include "serial.h" +#include "wait.h" + +#include + +// TODO: resolve/remove build warnings +#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) && defined(PROTOCOL_CHIBIOS) && defined(WS2812_DRIVER_BITBANG) +# warning "RGBLED_SPLIT not supported with bitbang WS2812 driver" +#endif + +// default wait implementation cannot be called within interrupt +// this method seems to be more accurate than GPT timers +#if PORT_SUPPORTS_RT == FALSE +# error "chSysPolledDelayX method not supported on this platform" +#else +# undef wait_us +# define wait_us(x) chSysPolledDelayX(US2RTC(STM32_SYSCLK, x)) +#endif + +#ifndef SELECT_SOFT_SERIAL_SPEED +# define SELECT_SOFT_SERIAL_SPEED 1 +// TODO: correct speeds... +// 0: about 189kbps (Experimental only) +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +#endif + +// Serial pulse period in microseconds. At the moment, going lower than 12 causes communication failure +#if SELECT_SOFT_SERIAL_SPEED == 0 +# define SERIAL_DELAY 12 +#elif SELECT_SOFT_SERIAL_SPEED == 1 +# define SERIAL_DELAY 16 +#elif SELECT_SOFT_SERIAL_SPEED == 2 +# define SERIAL_DELAY 24 +#elif SELECT_SOFT_SERIAL_SPEED == 3 +# define SERIAL_DELAY 32 +#elif SELECT_SOFT_SERIAL_SPEED == 4 +# define SERIAL_DELAY 48 +#elif SELECT_SOFT_SERIAL_SPEED == 5 +# define SERIAL_DELAY 64 +#else +# error invalid SELECT_SOFT_SERIAL_SPEED value +#endif + +inline static void serial_delay(void) { wait_us(SERIAL_DELAY); } +inline static void serial_delay_half(void) { wait_us(SERIAL_DELAY / 2); } +inline static void serial_delay_blip(void) { wait_us(1); } +inline static void serial_output(void) { setPinOutput(SOFT_SERIAL_PIN); } +inline static void serial_input(void) { setPinInputHigh(SOFT_SERIAL_PIN); } +inline static bool serial_read_pin(void) { return !!readPin(SOFT_SERIAL_PIN); } +inline static void serial_low(void) { writePinLow(SOFT_SERIAL_PIN); } +inline static void serial_high(void) { writePinHigh(SOFT_SERIAL_PIN); } + +void interrupt_handler(void *arg); + +// Use thread + palWaitLineTimeout instead of palSetLineCallback +// - Methods like setPinOutput and palEnableLineEvent/palDisableLineEvent +// cause the interrupt to lock up, which would limit to only receiving data... +static THD_WORKING_AREA(waThread1, 128); +static THD_FUNCTION(Thread1, arg) { + (void)arg; + chRegSetThreadName("blinker"); + while (true) { + palWaitLineTimeout(SOFT_SERIAL_PIN, TIME_INFINITE); + interrupt_handler(NULL); + } +} + +void soft_serial_initiator_init(void) { + serial_output(); + serial_high(); +} + +void soft_serial_target_init(void) { + serial_input(); + + palEnablePadEvent(PAL_PORT(SOFT_SERIAL_PIN), PAL_PAD(SOFT_SERIAL_PIN), PAL_EVENT_MODE_FALLING_EDGE); + chThdCreateStatic(waThread1, sizeof(waThread1), HIGHPRIO, Thread1, NULL); +} + +// Used by the master to synchronize timing with the slave. +static void __attribute__((noinline)) sync_recv(void) { + serial_input(); + // This shouldn't hang if the slave disconnects because the + // serial line will float to high if the slave does disconnect. + while (!serial_read_pin()) { + } + + serial_delay(); +} + +// Used by the slave to send a synchronization signal to the master. +static void __attribute__((noinline)) sync_send(void) { + serial_output(); + + serial_low(); + serial_delay(); + + serial_high(); +} + +// Reads a byte from the serial line +static uint8_t __attribute__((noinline)) serial_read_byte(void) { + uint8_t byte = 0; + serial_input(); + for (uint8_t i = 0; i < 8; ++i) { + byte = (byte << 1) | serial_read_pin(); + serial_delay(); + } + + return byte; +} + +// Sends a byte with MSB ordering +static void __attribute__((noinline)) serial_write_byte(uint8_t data) { + uint8_t b = 8; + serial_output(); + while (b--) { + if (data & (1 << b)) { + serial_high(); + } else { + serial_low(); + } + serial_delay(); + } +} + +// interrupt handle to be used by the slave device +void interrupt_handler(void *arg) { + chSysLockFromISR(); + + sync_send(); + + // read mid pulses + serial_delay_blip(); + + uint8_t checksum_computed = 0; + int sstd_index = 0; + + sstd_index = serial_read_byte(); + sync_send(); + + split_transaction_desc_t *trans = &split_transaction_table[sstd_index]; + for (int i = 0; i < trans->initiator2target_buffer_size; ++i) { + split_trans_initiator2target_buffer(trans)[i] = serial_read_byte(); + sync_send(); + checksum_computed += split_trans_initiator2target_buffer(trans)[i]; + } + checksum_computed ^= 7; + uint8_t checksum_received = serial_read_byte(); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + // Allow any slave processing to occur + if (trans->slave_callback) { + trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->target2initiator_buffer_size, split_trans_target2initiator_buffer(trans)); + } + + uint8_t checksum = 0; + for (int i = 0; i < trans->target2initiator_buffer_size; ++i) { + serial_write_byte(split_trans_target2initiator_buffer(trans)[i]); + sync_send(); + serial_delay_half(); + checksum += split_trans_target2initiator_buffer(trans)[i]; + } + serial_write_byte(checksum ^ 7); + sync_send(); + + // wait for the sync to finish sending + serial_delay(); + + *trans->status = (checksum_computed == checksum_received) ? TRANSACTION_ACCEPTED : TRANSACTION_DATA_ERROR; + + // end transaction + serial_input(); + + // TODO: remove extra delay between transactions + serial_delay(); + + chSysUnlockFromISR(); +} + +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) +// +// Returns: +// TRANSACTION_END +// TRANSACTION_NO_RESPONSE +// TRANSACTION_DATA_ERROR +// this code is very time dependent, so we need to disable interrupts +int soft_serial_transaction(int sstd_index) { + if (sstd_index > NUM_TOTAL_TRANSACTIONS) return TRANSACTION_TYPE_ERROR; + split_transaction_desc_t *trans = &split_transaction_table[sstd_index]; + if (!trans->status) return TRANSACTION_TYPE_ERROR; // not registered + + // TODO: remove extra delay between transactions + serial_delay(); + + // this code is very time dependent, so we need to disable interrupts + chSysLock(); + + // signal to the slave that we want to start a transaction + serial_output(); + serial_low(); + serial_delay_blip(); + + // wait for the slaves response + serial_input(); + serial_high(); + serial_delay(); + + // check if the slave is present + if (serial_read_pin()) { + // slave failed to pull the line low, assume not present + dprintf("serial::NO_RESPONSE\n"); + chSysUnlock(); + return TRANSACTION_NO_RESPONSE; + } + + // if the slave is present syncronize with it + + uint8_t checksum = 0; + // send data to the slave + serial_write_byte(sstd_index); // first chunk is transaction id + sync_recv(); + + for (int i = 0; i < trans->initiator2target_buffer_size; ++i) { + serial_write_byte(split_trans_initiator2target_buffer(trans)[i]); + sync_recv(); + checksum += split_trans_initiator2target_buffer(trans)[i]; + } + serial_write_byte(checksum ^ 7); + sync_recv(); + + serial_delay(); + serial_delay(); // read mid pulses + + // receive data from the slave + uint8_t checksum_computed = 0; + for (int i = 0; i < trans->target2initiator_buffer_size; ++i) { + split_trans_target2initiator_buffer(trans)[i] = serial_read_byte(); + sync_recv(); + checksum_computed += split_trans_target2initiator_buffer(trans)[i]; + } + checksum_computed ^= 7; + uint8_t checksum_received = serial_read_byte(); + + sync_recv(); + serial_delay(); + + if ((checksum_computed) != (checksum_received)) { + dprintf("serial::FAIL[%u,%u,%u]\n", checksum_computed, checksum_received, sstd_index); + serial_output(); + serial_high(); + + chSysUnlock(); + return TRANSACTION_DATA_ERROR; + } + + // always, release the line when not in use + serial_high(); + serial_output(); + + chSysUnlock(); + return TRANSACTION_END; +} diff --git a/platforms/chibios/drivers/serial_usart.c b/platforms/chibios/drivers/serial_usart.c new file mode 100644 index 000000000..ea4473791 --- /dev/null +++ b/platforms/chibios/drivers/serial_usart.c @@ -0,0 +1,318 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "serial_usart.h" + +#if defined(SERIAL_USART_CONFIG) +static SerialConfig serial_config = SERIAL_USART_CONFIG; +#else +static SerialConfig serial_config = { + .speed = (SERIAL_USART_SPEED), /* speed - mandatory */ + .cr1 = (SERIAL_USART_CR1), + .cr2 = (SERIAL_USART_CR2), +# if !defined(SERIAL_USART_FULL_DUPLEX) + .cr3 = ((SERIAL_USART_CR3) | USART_CR3_HDSEL) /* activate half-duplex mode */ +# else + .cr3 = (SERIAL_USART_CR3) +# endif +}; +#endif + +static SerialDriver* serial_driver = &SERIAL_USART_DRIVER; + +static inline bool react_to_transactions(void); +static inline bool __attribute__((nonnull)) receive(uint8_t* destination, const size_t size); +static inline bool __attribute__((nonnull)) send(const uint8_t* source, const size_t size); +static inline int initiate_transaction(uint8_t sstd_index); +static inline void usart_clear(void); + +/** + * @brief Clear the receive input queue. + */ +static inline void usart_clear(void) { + osalSysLock(); + bool volatile queue_not_empty = !iqIsEmptyI(&serial_driver->iqueue); + osalSysUnlock(); + + while (queue_not_empty) { + osalSysLock(); + /* Hard reset the input queue. */ + iqResetI(&serial_driver->iqueue); + osalSysUnlock(); + /* Allow pending interrupts to preempt. + * Do not merge the lock/unlock blocks into one + * or the code will not work properly. + * The empty read adds a tiny amount of delay. */ + (void)queue_not_empty; + osalSysLock(); + queue_not_empty = !iqIsEmptyI(&serial_driver->iqueue); + osalSysUnlock(); + } +} + +/** + * @brief Blocking send of buffer with timeout. + * + * @return true Send success. + * @return false Send failed. + */ +static inline bool send(const uint8_t* source, const size_t size) { + bool success = (size_t)sdWriteTimeout(serial_driver, source, size, TIME_MS2I(SERIAL_USART_TIMEOUT)) == size; + +#if !defined(SERIAL_USART_FULL_DUPLEX) + if (success) { + /* Half duplex fills the input queue with the data we wrote - just throw it away. + Under the right circumstances (e.g. bad cables paired with high baud rates) + less bytes can be present in the input queue, therefore a timeout is needed. */ + uint8_t dump[size]; + return receive(dump, size); + } +#endif + + return success; +} + +/** + * @brief Blocking receive of size * bytes with timeout. + * + * @return true Receive success. + * @return false Receive failed. + */ +static inline bool receive(uint8_t* destination, const size_t size) { + bool success = (size_t)sdReadTimeout(serial_driver, destination, size, TIME_MS2I(SERIAL_USART_TIMEOUT)) == size; + return success; +} + +#if !defined(SERIAL_USART_FULL_DUPLEX) + +/** + * @brief Initiate pins for USART peripheral. Half-duplex configuration. + */ +__attribute__((weak)) void usart_init(void) { +# if defined(MCU_STM32) +# if defined(USE_GPIOV1) + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_OPENDRAIN); +# else + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); +# endif + +# if defined(USART_REMAP) + USART_REMAP; +# endif +# else +# pragma message "usart_init: MCU Familiy not supported by default, please supply your own init code by implementing usart_init() in your keyboard files." +# endif +} + +#else + +/** + * @brief Initiate pins for USART peripheral. Full-duplex configuration. + */ +__attribute__((weak)) void usart_init(void) { +# if defined(MCU_STM32) +# if defined(USE_GPIOV1) + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL); + palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_INPUT); +# else + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); + palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_RX_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); +# endif + +# if defined(USART_REMAP) + USART_REMAP; +# endif +# else +# pragma message "usart_init: MCU Familiy not supported by default, please supply your own init code by implementing usart_init() in your keyboard files." +# endif +} + +#endif + +/** + * @brief Overridable master specific initializations. + */ +__attribute__((weak, nonnull)) void usart_master_init(SerialDriver** driver) { + (void)driver; + usart_init(); +} + +/** + * @brief Overridable slave specific initializations. + */ +__attribute__((weak, nonnull)) void usart_slave_init(SerialDriver** driver) { + (void)driver; + usart_init(); +} + +/** + * @brief This thread runs on the slave and responds to transactions initiated + * by the master. + */ +static THD_WORKING_AREA(waSlaveThread, 1024); +static THD_FUNCTION(SlaveThread, arg) { + (void)arg; + chRegSetThreadName("usart_tx_rx"); + + while (true) { + if (!react_to_transactions()) { + /* Clear the receive queue, to start with a clean slate. + * Parts of failed transactions or spurious bytes could still be in it. */ + usart_clear(); + } + } +} + +/** + * @brief Slave specific initializations. + */ +void soft_serial_target_init(void) { + usart_slave_init(&serial_driver); + + sdStart(serial_driver, &serial_config); + + /* Start transport thread. */ + chThdCreateStatic(waSlaveThread, sizeof(waSlaveThread), HIGHPRIO, SlaveThread, NULL); +} + +/** + * @brief React to transactions started by the master. + */ +static inline bool react_to_transactions(void) { + /* Wait until there is a transaction for us. */ + uint8_t sstd_index = (uint8_t)sdGet(serial_driver); + + /* Sanity check that we are actually responding to a valid transaction. */ + if (sstd_index >= NUM_TOTAL_TRANSACTIONS) { + return false; + } + + split_transaction_desc_t* trans = &split_transaction_table[sstd_index]; + + /* Send back the handshake which is XORed as a simple checksum, + to signal that the slave is ready to receive possible transaction buffers */ + sstd_index ^= HANDSHAKE_MAGIC; + if (!send(&sstd_index, sizeof(sstd_index))) { + *trans->status = TRANSACTION_DATA_ERROR; + return false; + } + + /* Receive transaction buffer from the master. If this transaction requires it.*/ + if (trans->initiator2target_buffer_size) { + if (!receive(split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size)) { + *trans->status = TRANSACTION_DATA_ERROR; + return false; + } + } + + /* Allow any slave processing to occur. */ + if (trans->slave_callback) { + trans->slave_callback(trans->initiator2target_buffer_size, split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size, split_trans_target2initiator_buffer(trans)); + } + + /* Send transaction buffer to the master. If this transaction requires it. */ + if (trans->target2initiator_buffer_size) { + if (!send(split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size)) { + *trans->status = TRANSACTION_DATA_ERROR; + return false; + } + } + + *trans->status = TRANSACTION_ACCEPTED; + return true; +} + +/** + * @brief Master specific initializations. + */ +void soft_serial_initiator_init(void) { + usart_master_init(&serial_driver); + +#if defined(MCU_STM32) && defined(SERIAL_USART_PIN_SWAP) + serial_config.cr2 |= USART_CR2_SWAP; // master has swapped TX/RX pins +#endif + + sdStart(serial_driver, &serial_config); +} + +/** + * @brief Start transaction from the master half to the slave half. + * + * @param index Transaction Table index of the transaction to start. + * @return int TRANSACTION_NO_RESPONSE in case of Timeout. + * TRANSACTION_TYPE_ERROR in case of invalid transaction index. + * TRANSACTION_END in case of success. + */ +int soft_serial_transaction(int index) { + /* Clear the receive queue, to start with a clean slate. + * Parts of failed transactions or spurious bytes could still be in it. */ + usart_clear(); + return initiate_transaction((uint8_t)index); +} + +/** + * @brief Initiate transaction to slave half. + */ +static inline int initiate_transaction(uint8_t sstd_index) { + /* Sanity check that we are actually starting a valid transaction. */ + if (sstd_index >= NUM_TOTAL_TRANSACTIONS) { + dprintln("USART: Illegal transaction Id."); + return TRANSACTION_TYPE_ERROR; + } + + split_transaction_desc_t* trans = &split_transaction_table[sstd_index]; + + /* Transaction is not registered. Abort. */ + if (!trans->status) { + dprintln("USART: Transaction not registered."); + return TRANSACTION_TYPE_ERROR; + } + + /* Send transaction table index to the slave, which doubles as basic handshake token. */ + if (!send(&sstd_index, sizeof(sstd_index))) { + dprintln("USART: Send Handshake failed."); + return TRANSACTION_TYPE_ERROR; + } + + uint8_t sstd_index_shake = 0xFF; + + /* Which we always read back first so that we can error out correctly. + * - due to the half duplex limitations on return codes, we always have to read *something*. + * - without the read, write only transactions *always* succeed, even during the boot process where the slave is not ready. + */ + if (!receive(&sstd_index_shake, sizeof(sstd_index_shake)) || (sstd_index_shake != (sstd_index ^ HANDSHAKE_MAGIC))) { + dprintln("USART: Handshake failed."); + return TRANSACTION_NO_RESPONSE; + } + + /* Send transaction buffer to the slave. If this transaction requires it. */ + if (trans->initiator2target_buffer_size) { + if (!send(split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size)) { + dprintln("USART: Send failed."); + return TRANSACTION_NO_RESPONSE; + } + } + + /* Receive transaction buffer from the slave. If this transaction requires it. */ + if (trans->target2initiator_buffer_size) { + if (!receive(split_trans_target2initiator_buffer(trans), trans->target2initiator_buffer_size)) { + dprintln("USART: Receive failed."); + return TRANSACTION_NO_RESPONSE; + } + } + + return TRANSACTION_END; +} diff --git a/platforms/chibios/drivers/serial_usart.h b/platforms/chibios/drivers/serial_usart.h new file mode 100644 index 000000000..7b135b31e --- /dev/null +++ b/platforms/chibios/drivers/serial_usart.h @@ -0,0 +1,116 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "quantum.h" +#include "serial.h" +#include "printf.h" + +#include +#include + +#if !defined(SERIAL_USART_DRIVER) +# define SERIAL_USART_DRIVER SD1 +#endif + +#if !defined(USE_GPIOV1) +/* The default PAL alternate modes are used to signal that the pins are used for USART. */ +# if !defined(SERIAL_USART_TX_PAL_MODE) +# define SERIAL_USART_TX_PAL_MODE 7 +# endif +# if !defined(SERIAL_USART_RX_PAL_MODE) +# define SERIAL_USART_RX_PAL_MODE 7 +# endif +#endif + +#if defined(SOFT_SERIAL_PIN) +# define SERIAL_USART_TX_PIN SOFT_SERIAL_PIN +#endif + +#if !defined(SERIAL_USART_TX_PIN) +# define SERIAL_USART_TX_PIN A9 +#endif + +#if !defined(SERIAL_USART_RX_PIN) +# define SERIAL_USART_RX_PIN A10 +#endif + +#if !defined(USART_CR1_M0) +# define USART_CR1_M0 USART_CR1_M // some platforms (f1xx) dont have this so +#endif + +#if !defined(SERIAL_USART_CR1) +# define SERIAL_USART_CR1 (USART_CR1_PCE | USART_CR1_PS | USART_CR1_M0) // parity enable, odd parity, 9 bit length +#endif + +#if !defined(SERIAL_USART_CR2) +# define SERIAL_USART_CR2 (USART_CR2_STOP_1) // 2 stop bits +#endif + +#if !defined(SERIAL_USART_CR3) +# define SERIAL_USART_CR3 0 +#endif + +#if defined(USART1_REMAP) +# define USART_REMAP \ + do { \ + (AFIO->MAPR |= AFIO_MAPR_USART1_REMAP); \ + } while (0) +#elif defined(USART2_REMAP) +# define USART_REMAP \ + do { \ + (AFIO->MAPR |= AFIO_MAPR_USART2_REMAP); \ + } while (0) +#elif defined(USART3_PARTIALREMAP) +# define USART_REMAP \ + do { \ + (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_PARTIALREMAP); \ + } while (0) +#elif defined(USART3_FULLREMAP) +# define USART_REMAP \ + do { \ + (AFIO->MAPR |= AFIO_MAPR_USART3_REMAP_FULLREMAP); \ + } while (0) +#endif + +#if !defined(SELECT_SOFT_SERIAL_SPEED) +# define SELECT_SOFT_SERIAL_SPEED 1 +#endif + +#if defined(SERIAL_USART_SPEED) +// Allow advanced users to directly set SERIAL_USART_SPEED +#elif SELECT_SOFT_SERIAL_SPEED == 0 +# define SERIAL_USART_SPEED 460800 +#elif SELECT_SOFT_SERIAL_SPEED == 1 +# define SERIAL_USART_SPEED 230400 +#elif SELECT_SOFT_SERIAL_SPEED == 2 +# define SERIAL_USART_SPEED 115200 +#elif SELECT_SOFT_SERIAL_SPEED == 3 +# define SERIAL_USART_SPEED 57600 +#elif SELECT_SOFT_SERIAL_SPEED == 4 +# define SERIAL_USART_SPEED 38400 +#elif SELECT_SOFT_SERIAL_SPEED == 5 +# define SERIAL_USART_SPEED 19200 +#else +# error invalid SELECT_SOFT_SERIAL_SPEED value +#endif + +#if !defined(SERIAL_USART_TIMEOUT) +# define SERIAL_USART_TIMEOUT 20 +#endif + +#define HANDSHAKE_MAGIC 7 diff --git a/platforms/chibios/drivers/spi_master.c b/platforms/chibios/drivers/spi_master.c new file mode 100644 index 000000000..28ddcbb2b --- /dev/null +++ b/platforms/chibios/drivers/spi_master.c @@ -0,0 +1,202 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "spi_master.h" + +#include "timer.h" + +static pin_t currentSlavePin = NO_PIN; + +#if defined(K20x) || defined(KL2x) +static SPIConfig spiConfig = {NULL, 0, 0, 0}; +#else +static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0}; +#endif + +__attribute__((weak)) void spi_init(void) { + static bool is_initialised = false; + if (!is_initialised) { + is_initialised = true; + + // Try releasing special pins for a short time + setPinInput(SPI_SCK_PIN); + setPinInput(SPI_MOSI_PIN); + setPinInput(SPI_MISO_PIN); + + chThdSleepMilliseconds(10); +#if defined(USE_GPIOV1) + palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), SPI_SCK_PAL_MODE); + palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), SPI_MOSI_PAL_MODE); + palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), SPI_MISO_PAL_MODE); +#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); +#endif + } +} + +bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) { + if (currentSlavePin != NO_PIN || slavePin == NO_PIN) { + return false; + } + + uint16_t roundedDivisor = 2; + while (roundedDivisor < divisor) { + roundedDivisor <<= 1; + } + + if (roundedDivisor < 2 || roundedDivisor > 256) { + return false; + } + +#if defined(K20x) || defined(KL2x) + spiConfig.tar0 = SPIx_CTARn_FMSZ(7) | SPIx_CTARn_ASC(1); + + if (lsbFirst) { + spiConfig.tar0 |= SPIx_CTARn_LSBFE; + } + + switch (mode) { + case 0: + break; + case 1: + spiConfig.tar0 |= SPIx_CTARn_CPHA; + break; + case 2: + spiConfig.tar0 |= SPIx_CTARn_CPOL; + break; + case 3: + spiConfig.tar0 |= SPIx_CTARn_CPHA | SPIx_CTARn_CPOL; + break; + } + + switch (roundedDivisor) { + case 2: + spiConfig.tar0 |= SPIx_CTARn_BR(0); + break; + case 4: + spiConfig.tar0 |= SPIx_CTARn_BR(1); + break; + case 8: + spiConfig.tar0 |= SPIx_CTARn_BR(3); + break; + case 16: + spiConfig.tar0 |= SPIx_CTARn_BR(4); + break; + case 32: + spiConfig.tar0 |= SPIx_CTARn_BR(5); + break; + case 64: + spiConfig.tar0 |= SPIx_CTARn_BR(6); + break; + case 128: + spiConfig.tar0 |= SPIx_CTARn_BR(7); + break; + case 256: + spiConfig.tar0 |= SPIx_CTARn_BR(8); + break; + } +#else + spiConfig.cr1 = 0; + + if (lsbFirst) { + spiConfig.cr1 |= SPI_CR1_LSBFIRST; + } + + switch (mode) { + case 0: + break; + case 1: + spiConfig.cr1 |= SPI_CR1_CPHA; + break; + case 2: + spiConfig.cr1 |= SPI_CR1_CPOL; + break; + case 3: + spiConfig.cr1 |= SPI_CR1_CPHA | SPI_CR1_CPOL; + break; + } + + switch (roundedDivisor) { + case 2: + break; + case 4: + spiConfig.cr1 |= SPI_CR1_BR_0; + break; + case 8: + spiConfig.cr1 |= SPI_CR1_BR_1; + break; + case 16: + spiConfig.cr1 |= SPI_CR1_BR_1 | SPI_CR1_BR_0; + break; + case 32: + spiConfig.cr1 |= SPI_CR1_BR_2; + break; + case 64: + spiConfig.cr1 |= SPI_CR1_BR_2 | SPI_CR1_BR_0; + break; + case 128: + spiConfig.cr1 |= SPI_CR1_BR_2 | SPI_CR1_BR_1; + break; + case 256: + spiConfig.cr1 |= SPI_CR1_BR_2 | SPI_CR1_BR_1 | SPI_CR1_BR_0; + break; + } +#endif + + currentSlavePin = slavePin; + spiConfig.ssport = PAL_PORT(slavePin); + spiConfig.sspad = PAL_PAD(slavePin); + + setPinOutput(slavePin); + spiStart(&SPI_DRIVER, &spiConfig); + spiSelect(&SPI_DRIVER); + + return true; +} + +spi_status_t spi_write(uint8_t data) { + uint8_t rxData; + spiExchange(&SPI_DRIVER, 1, &data, &rxData); + + return rxData; +} + +spi_status_t spi_read(void) { + uint8_t data = 0; + spiReceive(&SPI_DRIVER, 1, &data); + + return data; +} + +spi_status_t spi_transmit(const uint8_t *data, uint16_t length) { + spiSend(&SPI_DRIVER, length, data); + return SPI_STATUS_SUCCESS; +} + +spi_status_t spi_receive(uint8_t *data, uint16_t length) { + spiReceive(&SPI_DRIVER, length, data); + return SPI_STATUS_SUCCESS; +} + +void spi_stop(void) { + if (currentSlavePin != NO_PIN) { + spiUnselect(&SPI_DRIVER); + spiStop(&SPI_DRIVER); + currentSlavePin = NO_PIN; + } +} diff --git a/platforms/chibios/drivers/spi_master.h b/platforms/chibios/drivers/spi_master.h new file mode 100644 index 000000000..b5a6ef143 --- /dev/null +++ b/platforms/chibios/drivers/spi_master.h @@ -0,0 +1,93 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include +#include +#include + +#include "gpio.h" +#include "chibios_config.h" + +#ifndef SPI_DRIVER +# define SPI_DRIVER SPID2 +#endif + +#ifndef SPI_SCK_PIN +# define SPI_SCK_PIN B13 +#endif + +#ifndef SPI_SCK_PAL_MODE +# if defined(USE_GPIOV1) +# define SPI_SCK_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# else +# define SPI_SCK_PAL_MODE 5 +# endif +#endif + +#ifndef SPI_MOSI_PIN +# define SPI_MOSI_PIN B15 +#endif + +#ifndef SPI_MOSI_PAL_MODE +# if defined(USE_GPIOV1) +# define SPI_MOSI_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# else +# define SPI_MOSI_PAL_MODE 5 +# endif +#endif + +#ifndef SPI_MISO_PIN +# define SPI_MISO_PIN B14 +#endif + +#ifndef SPI_MISO_PAL_MODE +# if defined(USE_GPIOV1) +# define SPI_MISO_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# else +# define SPI_MISO_PAL_MODE 5 +# endif +#endif + +typedef int16_t spi_status_t; + +#define SPI_STATUS_SUCCESS (0) +#define SPI_STATUS_ERROR (-1) +#define SPI_STATUS_TIMEOUT (-2) + +#define SPI_TIMEOUT_IMMEDIATE (0) +#define SPI_TIMEOUT_INFINITE (0xFFFF) + +#ifdef __cplusplus +extern "C" { +#endif +void spi_init(void); + +bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor); + +spi_status_t spi_write(uint8_t data); + +spi_status_t spi_read(void); + +spi_status_t spi_transmit(const uint8_t *data, uint16_t length); + +spi_status_t spi_receive(uint8_t *data, uint16_t length); + +void spi_stop(void); +#ifdef __cplusplus +} +#endif diff --git a/drivers/chibios/uart.c b/platforms/chibios/drivers/uart.c similarity index 100% rename from drivers/chibios/uart.c rename to platforms/chibios/drivers/uart.c diff --git a/drivers/chibios/uart.h b/platforms/chibios/drivers/uart.h similarity index 100% rename from drivers/chibios/uart.h rename to platforms/chibios/drivers/uart.h diff --git a/drivers/chibios/usbpd_stm32g4.c b/platforms/chibios/drivers/usbpd_stm32g4.c similarity index 100% rename from drivers/chibios/usbpd_stm32g4.c rename to platforms/chibios/drivers/usbpd_stm32g4.c diff --git a/drivers/chibios/ws2812.c b/platforms/chibios/drivers/ws2812.c similarity index 100% rename from drivers/chibios/ws2812.c rename to platforms/chibios/drivers/ws2812.c diff --git a/drivers/chibios/ws2812_pwm.c b/platforms/chibios/drivers/ws2812_pwm.c similarity index 100% rename from drivers/chibios/ws2812_pwm.c rename to platforms/chibios/drivers/ws2812_pwm.c diff --git a/drivers/chibios/ws2812_spi.c b/platforms/chibios/drivers/ws2812_spi.c similarity index 100% rename from drivers/chibios/ws2812_spi.c rename to platforms/chibios/drivers/ws2812_spi.c diff --git a/platforms/chibios/flash.mk b/platforms/chibios/flash.mk new file mode 100644 index 000000000..c0b32c2f2 --- /dev/null +++ b/platforms/chibios/flash.mk @@ -0,0 +1,87 @@ +# Hey Emacs, this is a -*- makefile -*- +############################################################################## +# Architecture or project specific options +# + +DFU_ARGS ?= +ifneq ("$(SERIAL)","") + DFU_ARGS += -S $(SERIAL) +endif + +DFU_UTIL ?= dfu-util + +define EXEC_DFU_UTIL + if ! $(DFU_UTIL) -l | grep -q "Found DFU"; then \ + printf "$(MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY)" ;\ + sleep $(BOOTLOADER_RETRY_TIME) ;\ + while ! $(DFU_UTIL) -l | grep -q "Found DFU"; do \ + printf "." ;\ + sleep $(BOOTLOADER_RETRY_TIME) ;\ + done ;\ + printf "\n" ;\ + fi + $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin +endef + +dfu-util: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter + $(call EXEC_DFU_UTIL) + +# TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS +# within the emulated eeprom via dfu-util or another tool +ifneq (,$(filter $(MAKECMDGOALS),dfu-util-split-left)) + OPT_DEFS += -DINIT_EE_HANDS_LEFT +endif + +ifneq (,$(filter $(MAKECMDGOALS),dfu-util-split-right)) + OPT_DEFS += -DINIT_EE_HANDS_RIGHT +endif + +dfu-util-split-left: dfu-util + +dfu-util-split-right: dfu-util + +ST_LINK_CLI ?= st-link_cli +ST_LINK_ARGS ?= + +st-link-cli: $(BUILD_DIR)/$(TARGET).hex sizeafter + $(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst + +ST_FLASH ?= st-flash +ST_FLASH_ARGS ?= + +st-flash: $(BUILD_DIR)/$(TARGET).hex sizeafter + $(ST_FLASH) $(ST_FLASH_ARGS) --reset --format ihex write $(BUILD_DIR)/$(TARGET).hex + +# Autodetect teensy loader +ifndef TEENSY_LOADER_CLI + ifneq (, $(shell which teensy-loader-cli 2>/dev/null)) + TEENSY_LOADER_CLI ?= teensy-loader-cli + else + TEENSY_LOADER_CLI ?= teensy_loader_cli + endif +endif + +TEENSY_LOADER_CLI_MCU ?= $(MCU_LDSCRIPT) + +define EXEC_TEENSY + $(TEENSY_LOADER_CLI) -mmcu=$(TEENSY_LOADER_CLI_MCU) -w -v $(BUILD_DIR)/$(TARGET).hex +endef + +teensy: $(BUILD_DIR)/$(TARGET).hex cpfirmware sizeafter + $(call EXEC_TEENSY) + + +flash: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter +ifneq ($(strip $(PROGRAM_CMD)),) + $(UNSYNC_OUTPUT_CMD) && $(PROGRAM_CMD) +else ifeq ($(strip $(BOOTLOADER)),kiibohd) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_DFU_UTIL) +else ifeq ($(strip $(MCU_FAMILY)),KINETIS) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_TEENSY) +else ifeq ($(strip $(MCU_FAMILY)),MIMXRT1062) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_TEENSY) +else ifeq ($(strip $(MCU_FAMILY)),STM32) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_DFU_UTIL) +else + $(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_BOOTLOADER)" +endif diff --git a/quantum/action.c b/quantum/action.c new file mode 100644 index 000000000..d19fd2a04 --- /dev/null +++ b/quantum/action.c @@ -0,0 +1,1126 @@ +/* +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 "host.h" +#include "keycode.h" +#include "keyboard.h" +#include "mousekey.h" +#include "command.h" +#include "led.h" +#include "action_layer.h" +#include "action_tapping.h" +#include "action_macro.h" +#include "action_util.h" +#include "action.h" +#include "wait.h" + +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +#endif + +#ifdef DEBUG_ACTION +# include "debug.h" +#else +# include "nodebug.h" +#endif + +#ifdef POINTING_DEVICE_ENABLE +# include "pointing_device.h" +#endif + +int tp_buttons; + +#if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) +int retro_tapping_counter = 0; +#endif + +#ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY +__attribute__((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { return false; } +#endif + +#ifdef RETRO_TAPPING_PER_KEY +__attribute__((weak)) bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) { return false; } +#endif + +__attribute__((weak)) bool pre_process_record_quantum(keyrecord_t *record) { return true; } + +#ifndef TAP_CODE_DELAY +# define TAP_CODE_DELAY 0 +#endif +#ifndef TAP_HOLD_CAPS_DELAY +# define TAP_HOLD_CAPS_DELAY 80 +#endif +/** \brief Called to execute an action. + * + * FIXME: Needs documentation. + */ +void action_exec(keyevent_t event) { + if (!IS_NOEVENT(event)) { + dprint("\n---- action_exec: start -----\n"); + dprint("EVENT: "); + debug_event(event); + dprintln(); +#if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) + retro_tapping_counter++; +#endif + } + + if (event.pressed) { + // clear the potential weak mods left by previously pressed keys + clear_weak_mods(); + } + +#ifdef SWAP_HANDS_ENABLE + if (!IS_NOEVENT(event)) { + process_hand_swap(&event); + } +#endif + + keyrecord_t record = {.event = event}; + +#ifndef NO_ACTION_ONESHOT +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + if (has_oneshot_layer_timed_out()) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + if (has_oneshot_mods_timed_out()) { + clear_oneshot_mods(); + } +# ifdef SWAP_HANDS_ENABLE + if (has_oneshot_swaphands_timed_out()) { + clear_oneshot_swaphands(); + } +# endif +# endif +#endif + +#ifndef NO_ACTION_TAPPING + if (IS_NOEVENT(record.event) || pre_process_record_quantum(&record)) { + action_tapping_process(record); + } +#else + if (IS_NOEVENT(record.event) || pre_process_record_quantum(&record)) { + process_record(&record); + } + if (!IS_NOEVENT(record.event)) { + dprint("processed: "); + debug_record(record); + dprintln(); + } +#endif +} + +#ifdef SWAP_HANDS_ENABLE +bool swap_hands = false; +bool swap_held = false; + +/** \brief Process Hand Swap + * + * FIXME: Needs documentation. + */ +void process_hand_swap(keyevent_t *event) { + static swap_state_row_t swap_state[MATRIX_ROWS]; + + keypos_t pos = event->key; + swap_state_row_t col_bit = (swap_state_row_t)1 << pos.col; + bool do_swap = event->pressed ? swap_hands : swap_state[pos.row] & (col_bit); + + if (do_swap) { + event->key.row = pgm_read_byte(&hand_swap_config[pos.row][pos.col].row); + event->key.col = pgm_read_byte(&hand_swap_config[pos.row][pos.col].col); + swap_state[pos.row] |= col_bit; + } else { + swap_state[pos.row] &= ~(col_bit); + } +} +#endif + +#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) +bool disable_action_cache = false; + +void process_record_nocache(keyrecord_t *record) { + disable_action_cache = true; + process_record(record); + disable_action_cache = false; +} +#else +void process_record_nocache(keyrecord_t *record) { process_record(record); } +#endif + +__attribute__((weak)) bool process_record_quantum(keyrecord_t *record) { return true; } + +__attribute__((weak)) void post_process_record_quantum(keyrecord_t *record) {} + +#ifndef NO_ACTION_TAPPING +/** \brief Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress. + * + * FIXME: Needs documentation. + */ +void process_record_tap_hint(keyrecord_t *record) { + action_t action = layer_switch_get_action(record->event.key); + + switch (action.kind.id) { +# ifdef SWAP_HANDS_ENABLE + case ACT_SWAP_HANDS: + switch (action.swap.code) { + case OP_SH_ONESHOT: + break; + case OP_SH_TAP_TOGGLE: + default: + swap_hands = !swap_hands; + swap_held = true; + } + break; +# endif + } +} +#endif + +/** \brief Take a key event (key press or key release) and processes it. + * + * FIXME: Needs documentation. + */ +void process_record(keyrecord_t *record) { + if (IS_NOEVENT(record->event)) { + return; + } + + if (!process_record_quantum(record)) { +#ifndef NO_ACTION_ONESHOT + if (is_oneshot_layer_active() && record->event.pressed) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } +#endif + return; + } + + process_record_handler(record); + post_process_record_quantum(record); +} + +void process_record_handler(keyrecord_t *record) { +#ifdef COMBO_ENABLE + action_t action; + if (record->keycode) { + action = action_for_keycode(record->keycode); + } else { + action = store_or_get_action(record->event.pressed, record->event.key); + } +#else + action_t action = store_or_get_action(record->event.pressed, record->event.key); +#endif + dprint("ACTION: "); + debug_action(action); +#ifndef NO_ACTION_LAYER + dprint(" layer_state: "); + layer_debug(); + dprint(" default_layer_state: "); + default_layer_debug(); +#endif + dprintln(); + + process_action(record, action); +} + +#if defined(PS2_MOUSE_ENABLE) || defined(POINTING_DEVICE_ENABLE) +void register_button(bool pressed, enum mouse_buttons button) { +# ifdef PS2_MOUSE_ENABLE + tp_buttons = pressed ? tp_buttons | button : tp_buttons & ~button; +# endif +# ifdef POINTING_DEVICE_ENABLE + report_mouse_t currentReport = pointing_device_get_report(); + currentReport.buttons = pressed ? currentReport.buttons | button : currentReport.buttons & ~button; + pointing_device_set_report(currentReport); +# endif +} +#endif + +/** \brief Take an action and processes it. + * + * FIXME: Needs documentation. + */ +void process_action(keyrecord_t *record, action_t action) { + keyevent_t event = record->event; +#ifndef NO_ACTION_TAPPING + uint8_t tap_count = record->tap.count; +#endif + +#ifndef NO_ACTION_ONESHOT + bool do_release_oneshot = false; + // notice we only clear the one shot layer if the pressed key is not a modifier. + if (is_oneshot_layer_active() && event.pressed && (action.kind.id == ACT_USAGE || !IS_MOD(action.key.code)) +# ifdef SWAP_HANDS_ENABLE + && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT) +# endif + ) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + do_release_oneshot = !is_oneshot_layer_active(); + } +#endif + + switch (action.kind.id) { + /* Key and Mods */ + case ACT_LMODS: + case ACT_RMODS: { + uint8_t mods = (action.kind.id == ACT_LMODS) ? action.key.mods : action.key.mods << 4; + if (event.pressed) { + if (mods) { + if (IS_MOD(action.key.code) || action.key.code == KC_NO) { + // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. + // This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT). + // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO). + add_mods(mods); + } else { + add_weak_mods(mods); + } + send_keyboard_report(); + } + register_code(action.key.code); + } else { + unregister_code(action.key.code); + if (mods) { + if (IS_MOD(action.key.code) || action.key.code == KC_NO) { + del_mods(mods); + } else { + del_weak_mods(mods); + } + send_keyboard_report(); + } + } + } break; +#ifndef NO_ACTION_TAPPING + case ACT_LMODS_TAP: + case ACT_RMODS_TAP: { + uint8_t mods = (action.kind.id == ACT_LMODS_TAP) ? action.key.mods : action.key.mods << 4; + switch (action.layer_tap.code) { +# ifndef NO_ACTION_ONESHOT + case MODS_ONESHOT: + // Oneshot modifier + if (event.pressed) { + if (tap_count == 0) { + dprint("MODS_TAP: Oneshot: 0\n"); + register_mods(mods | get_oneshot_mods()); + } else if (tap_count == 1) { + dprint("MODS_TAP: Oneshot: start\n"); + set_oneshot_mods(mods | get_oneshot_mods()); +# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 + } else if (tap_count == ONESHOT_TAP_TOGGLE) { + dprint("MODS_TAP: Toggling oneshot"); + clear_oneshot_mods(); + set_oneshot_locked_mods(mods); + register_mods(mods); +# endif + } else { + register_mods(mods | get_oneshot_mods()); + } + } else { + if (tap_count == 0) { + clear_oneshot_mods(); + unregister_mods(mods); + } else if (tap_count == 1) { + // Retain Oneshot mods +# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 + if (mods & get_mods()) { + clear_oneshot_locked_mods(); + clear_oneshot_mods(); + unregister_mods(mods); + } + } else if (tap_count == ONESHOT_TAP_TOGGLE) { + // Toggle Oneshot Layer +# endif + } else { + clear_oneshot_mods(); + unregister_mods(mods); + } + } + break; +# endif + case MODS_TAP_TOGGLE: + if (event.pressed) { + if (tap_count <= TAPPING_TOGGLE) { + register_mods(mods); + } + } else { + if (tap_count < TAPPING_TOGGLE) { + unregister_mods(mods); + } + } + break; + default: + if (event.pressed) { + if (tap_count > 0) { +# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) + if ( +# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY + !get_ignore_mod_tap_interrupt(get_event_keycode(record->event, false), record) && +# endif + record->tap.interrupted) { + dprint("mods_tap: tap: cancel: add_mods\n"); + // ad hoc: set 0 to cancel tap + record->tap.count = 0; + register_mods(mods); + } else +# endif + { + dprint("MODS_TAP: Tap: register_code\n"); + register_code(action.key.code); + } + } else { + dprint("MODS_TAP: No tap: add_mods\n"); + register_mods(mods); + } + } else { + if (tap_count > 0) { + dprint("MODS_TAP: Tap: unregister_code\n"); + if (action.layer_tap.code == KC_CAPS) { + wait_ms(TAP_HOLD_CAPS_DELAY); + } else { + wait_ms(TAP_CODE_DELAY); + } + unregister_code(action.key.code); + } else { + dprint("MODS_TAP: No tap: add_mods\n"); + unregister_mods(mods); + } + } + break; + } + } break; +#endif +#ifdef EXTRAKEY_ENABLE + /* other HID usage */ + case ACT_USAGE: + switch (action.usage.page) { + case PAGE_SYSTEM: + if (event.pressed) { + host_system_send(action.usage.code); + } else { + host_system_send(0); + } + break; + case PAGE_CONSUMER: + if (event.pressed) { + host_consumer_send(action.usage.code); + } else { + host_consumer_send(0); + } + break; + } + break; +#endif +#ifdef MOUSEKEY_ENABLE + /* Mouse key */ + case ACT_MOUSEKEY: + if (event.pressed) { + mousekey_on(action.key.code); + } else { + mousekey_off(action.key.code); + } + switch (action.key.code) { +# if defined(PS2_MOUSE_ENABLE) || defined(POINTING_DEVICE_ENABLE) +# ifdef POINTING_DEVICE_ENABLE + case KC_MS_BTN1 ... KC_MS_BTN8: +# else + case KC_MS_BTN1 ... KC_MS_BTN3: +# endif + register_button(event.pressed, MOUSE_BTN_MASK(action.key.code - KC_MS_BTN1)); + break; +# endif + default: + mousekey_send(); + break; + } + break; +#endif +#ifndef NO_ACTION_LAYER + case ACT_LAYER: + if (action.layer_bitop.on == 0) { + /* Default Layer Bitwise Operation */ + if (!event.pressed) { + uint8_t shift = action.layer_bitop.part * 4; + layer_state_t bits = ((layer_state_t)action.layer_bitop.bits) << shift; + layer_state_t mask = (action.layer_bitop.xbit) ? ~(((layer_state_t)0xf) << shift) : 0; + switch (action.layer_bitop.op) { + case OP_BIT_AND: + default_layer_and(bits | mask); + break; + case OP_BIT_OR: + default_layer_or(bits | mask); + break; + case OP_BIT_XOR: + default_layer_xor(bits | mask); + break; + case OP_BIT_SET: + default_layer_set(bits | mask); + break; + } + } + } else { + /* Layer Bitwise Operation */ + if (event.pressed ? (action.layer_bitop.on & ON_PRESS) : (action.layer_bitop.on & ON_RELEASE)) { + uint8_t shift = action.layer_bitop.part * 4; + layer_state_t bits = ((layer_state_t)action.layer_bitop.bits) << shift; + layer_state_t mask = (action.layer_bitop.xbit) ? ~(((layer_state_t)0xf) << shift) : 0; + switch (action.layer_bitop.op) { + case OP_BIT_AND: + layer_and(bits | mask); + break; + case OP_BIT_OR: + layer_or(bits | mask); + break; + case OP_BIT_XOR: + layer_xor(bits | mask); + break; + case OP_BIT_SET: + layer_state_set(bits | mask); + break; + } + } + } + break; + case ACT_LAYER_MODS: + if (event.pressed) { + layer_on(action.layer_mods.layer); + register_mods(action.layer_mods.mods); + } else { + unregister_mods(action.layer_mods.mods); + layer_off(action.layer_mods.layer); + } + break; +# ifndef NO_ACTION_TAPPING + case ACT_LAYER_TAP: + case ACT_LAYER_TAP_EXT: + switch (action.layer_tap.code) { + case OP_TAP_TOGGLE: + /* tap toggle */ + if (event.pressed) { + if (tap_count < TAPPING_TOGGLE) { + layer_invert(action.layer_tap.val); + } + } else { + if (tap_count <= TAPPING_TOGGLE) { + layer_invert(action.layer_tap.val); + } + } + break; + case OP_ON_OFF: + event.pressed ? layer_on(action.layer_tap.val) : layer_off(action.layer_tap.val); + break; + case OP_OFF_ON: + event.pressed ? layer_off(action.layer_tap.val) : layer_on(action.layer_tap.val); + break; + case OP_SET_CLEAR: + event.pressed ? layer_move(action.layer_tap.val) : layer_clear(); + break; +# ifndef NO_ACTION_ONESHOT + case OP_ONESHOT: + // Oneshot modifier +# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 + do_release_oneshot = false; + if (event.pressed) { + del_mods(get_oneshot_locked_mods()); + if (get_oneshot_layer_state() == ONESHOT_TOGGLED) { + reset_oneshot_layer(); + layer_off(action.layer_tap.val); + break; + } else if (tap_count < ONESHOT_TAP_TOGGLE) { + layer_on(action.layer_tap.val); + set_oneshot_layer(action.layer_tap.val, ONESHOT_START); + } + } else { + add_mods(get_oneshot_locked_mods()); + if (tap_count >= ONESHOT_TAP_TOGGLE) { + reset_oneshot_layer(); + clear_oneshot_locked_mods(); + set_oneshot_layer(action.layer_tap.val, ONESHOT_TOGGLED); + } else { + clear_oneshot_layer_state(ONESHOT_PRESSED); + } + } +# else + if (event.pressed) { + layer_on(action.layer_tap.val); + set_oneshot_layer(action.layer_tap.val, ONESHOT_START); + } else { + clear_oneshot_layer_state(ONESHOT_PRESSED); + if (tap_count > 1) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + } +# endif + break; +# endif + default: + /* tap key */ + if (event.pressed) { + if (tap_count > 0) { + dprint("KEYMAP_TAP_KEY: Tap: register_code\n"); + register_code(action.layer_tap.code); + } else { + dprint("KEYMAP_TAP_KEY: No tap: On on press\n"); + layer_on(action.layer_tap.val); + } + } else { + if (tap_count > 0) { + dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n"); + if (action.layer_tap.code == KC_CAPS) { + wait_ms(TAP_HOLD_CAPS_DELAY); + } else { + wait_ms(TAP_CODE_DELAY); + } + unregister_code(action.layer_tap.code); + } else { + dprint("KEYMAP_TAP_KEY: No tap: Off on release\n"); + layer_off(action.layer_tap.val); + } + } + break; + } + break; +# endif +#endif + /* Extentions */ +#ifndef NO_ACTION_MACRO + case ACT_MACRO: + action_macro_play(action_get_macro(record, action.func.id, action.func.opt)); + break; +#endif +#ifdef SWAP_HANDS_ENABLE + case ACT_SWAP_HANDS: + switch (action.swap.code) { + case OP_SH_TOGGLE: + if (event.pressed) { + swap_hands = !swap_hands; + } + break; + case OP_SH_ON_OFF: + swap_hands = event.pressed; + break; + case OP_SH_OFF_ON: + swap_hands = !event.pressed; + break; + case OP_SH_ON: + if (!event.pressed) { + swap_hands = true; + } + break; + case OP_SH_OFF: + if (!event.pressed) { + swap_hands = false; + } + break; +# ifndef NO_ACTION_ONESHOT + case OP_SH_ONESHOT: + if (event.pressed) { + set_oneshot_swaphands(); + } else { + release_oneshot_swaphands(); + } + break; +# endif + +# ifndef NO_ACTION_TAPPING + case OP_SH_TAP_TOGGLE: + /* tap toggle */ + + if (event.pressed) { + if (swap_held) { + swap_held = false; + } else { + swap_hands = !swap_hands; + } + } else { + if (tap_count < TAPPING_TOGGLE) { + swap_hands = !swap_hands; + } + } + break; + default: + /* tap key */ + if (tap_count > 0) { + if (swap_held) { + swap_hands = !swap_hands; // undo hold set up in _tap_hint + swap_held = false; + } + if (event.pressed) { + register_code(action.swap.code); + } else { + wait_ms(TAP_CODE_DELAY); + unregister_code(action.swap.code); + *record = (keyrecord_t){}; // hack: reset tap mode + } + } else { + if (swap_held && !event.pressed) { + swap_hands = !swap_hands; // undo hold set up in _tap_hint + swap_held = false; + } + } +# endif + } +#endif +#ifndef NO_ACTION_FUNCTION + case ACT_FUNCTION: + action_function(record, action.func.id, action.func.opt); + break; +#endif + default: + break; + } + +#ifndef NO_ACTION_LAYER + // if this event is a layer action, update the leds + switch (action.kind.id) { + case ACT_LAYER: + case ACT_LAYER_MODS: +# ifndef NO_ACTION_TAPPING + case ACT_LAYER_TAP: + case ACT_LAYER_TAP_EXT: +# endif + led_set(host_keyboard_leds()); + break; + default: + break; + } +#endif + +#ifndef NO_ACTION_TAPPING +# if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) + if (!is_tap_action(action)) { + retro_tapping_counter = 0; + } else { + if (event.pressed) { + if (tap_count > 0) { + retro_tapping_counter = 0; + } + } else { + if (tap_count > 0) { + retro_tapping_counter = 0; + } else { + if ( +# ifdef RETRO_TAPPING_PER_KEY + get_retro_tapping(get_event_keycode(record->event, false), record) && +# endif + retro_tapping_counter == 2) { + tap_code(action.layer_tap.code); + } + retro_tapping_counter = 0; + } + } + } +# endif +#endif + +#ifdef SWAP_HANDS_ENABLE +# ifndef NO_ACTION_ONESHOT + if (event.pressed && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT)) { + use_oneshot_swaphands(); + } +# endif +#endif + +#ifndef NO_ACTION_ONESHOT + /* Because we switch layers after a oneshot event, we need to release the + * key before we leave the layer or no key up event will be generated. + */ + if (do_release_oneshot && !(get_oneshot_layer_state() & ONESHOT_PRESSED)) { + record->event.pressed = false; + layer_on(get_oneshot_layer()); + process_record(record); + layer_off(get_oneshot_layer()); + } +#endif +} + +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +void register_code(uint8_t code) { + if (code == KC_NO) { + return; + } +#ifdef LOCKING_SUPPORT_ENABLE + else if (KC_LOCKING_CAPS == code) { +# ifdef LOCKING_RESYNC_ENABLE + // Resync: ignore if caps lock already is on + if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) return; +# endif + add_key(KC_CAPSLOCK); + send_keyboard_report(); + wait_ms(100); + del_key(KC_CAPSLOCK); + send_keyboard_report(); + } + + else if (KC_LOCKING_NUM == code) { +# ifdef LOCKING_RESYNC_ENABLE + if (host_keyboard_leds() & (1 << USB_LED_NUM_LOCK)) return; +# endif + add_key(KC_NUMLOCK); + send_keyboard_report(); + wait_ms(100); + del_key(KC_NUMLOCK); + send_keyboard_report(); + } + + else if (KC_LOCKING_SCROLL == code) { +# ifdef LOCKING_RESYNC_ENABLE + if (host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK)) return; +# endif + add_key(KC_SCROLLLOCK); + send_keyboard_report(); + wait_ms(100); + del_key(KC_SCROLLLOCK); + send_keyboard_report(); + } +#endif + + else if IS_KEY (code) { + // TODO: should push command_proc out of this block? + if (command_proc(code)) return; + +#ifndef NO_ACTION_ONESHOT +/* TODO: remove + if (oneshot_state.mods && !oneshot_state.disabled) { + uint8_t tmp_mods = get_mods(); + add_mods(oneshot_state.mods); + + add_key(code); + send_keyboard_report(); + + set_mods(tmp_mods); + send_keyboard_report(); + oneshot_cancel(); + } else +*/ +#endif + { + // Force a new key press if the key is already pressed + // without this, keys with the same keycode, but different + // modifiers will be reported incorrectly, see issue #1708 + if (is_key_pressed(keyboard_report, code)) { + del_key(code); + send_keyboard_report(); + } + add_key(code); + send_keyboard_report(); + } + } else if IS_MOD (code) { + add_mods(MOD_BIT(code)); + send_keyboard_report(); + } +#ifdef EXTRAKEY_ENABLE + else if IS_SYSTEM (code) { + host_system_send(KEYCODE2SYSTEM(code)); + } else if IS_CONSUMER (code) { + host_consumer_send(KEYCODE2CONSUMER(code)); + } +#endif +#ifdef MOUSEKEY_ENABLE + else if IS_MOUSEKEY (code) { + mousekey_on(code); + mousekey_send(); + } +#endif +} + +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +void unregister_code(uint8_t code) { + if (code == KC_NO) { + return; + } +#ifdef LOCKING_SUPPORT_ENABLE + else if (KC_LOCKING_CAPS == code) { +# ifdef LOCKING_RESYNC_ENABLE + // Resync: ignore if caps lock already is off + if (!(host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK))) return; +# endif + add_key(KC_CAPSLOCK); + send_keyboard_report(); + del_key(KC_CAPSLOCK); + send_keyboard_report(); + } + + else if (KC_LOCKING_NUM == code) { +# ifdef LOCKING_RESYNC_ENABLE + if (!(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK))) return; +# endif + add_key(KC_NUMLOCK); + send_keyboard_report(); + del_key(KC_NUMLOCK); + send_keyboard_report(); + } + + else if (KC_LOCKING_SCROLL == code) { +# ifdef LOCKING_RESYNC_ENABLE + if (!(host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK))) return; +# endif + add_key(KC_SCROLLLOCK); + send_keyboard_report(); + del_key(KC_SCROLLLOCK); + send_keyboard_report(); + } +#endif + + else if IS_KEY (code) { + del_key(code); + send_keyboard_report(); + } else if IS_MOD (code) { + del_mods(MOD_BIT(code)); + send_keyboard_report(); + } else if IS_SYSTEM (code) { + host_system_send(0); + } else if IS_CONSUMER (code) { + host_consumer_send(0); + } +#ifdef MOUSEKEY_ENABLE + else if IS_MOUSEKEY (code) { + mousekey_off(code); + mousekey_send(); + } +#endif +} + +/** \brief Tap a keycode with a delay. + * + * \param code The basic keycode to tap. + * \param delay The amount of time in milliseconds to leave the keycode registered, before unregistering it. + */ +void tap_code_delay(uint8_t code, uint16_t delay) { + register_code(code); + for (uint16_t i = delay; i > 0; i--) { + wait_ms(1); + } + unregister_code(code); +} + +/** \brief Tap a keycode with the default delay. + * + * \param code The basic keycode to tap. If `code` is `KC_CAPS`, the delay will be `TAP_HOLD_CAPS_DELAY`, otherwise `TAP_CODE_DELAY`, if defined. + */ +void tap_code(uint8_t code) { tap_code_delay(code, code == KC_CAPS ? TAP_HOLD_CAPS_DELAY : TAP_CODE_DELAY); } + +/** \brief Adds the given physically pressed modifiers and sends a keyboard report immediately. + * + * \param mods A bitfield of modifiers to register. + */ +void register_mods(uint8_t mods) { + if (mods) { + add_mods(mods); + send_keyboard_report(); + } +} + +/** \brief Removes the given physically pressed modifiers and sends a keyboard report immediately. + * + * \param mods A bitfield of modifiers to unregister. + */ +void unregister_mods(uint8_t mods) { + if (mods) { + del_mods(mods); + send_keyboard_report(); + } +} + +/** \brief Adds the given weak modifiers and sends a keyboard report immediately. + * + * \param mods A bitfield of modifiers to register. + */ +void register_weak_mods(uint8_t mods) { + if (mods) { + add_weak_mods(mods); + send_keyboard_report(); + } +} + +/** \brief Removes the given weak modifiers and sends a keyboard report immediately. + * + * \param mods A bitfield of modifiers to unregister. + */ +void unregister_weak_mods(uint8_t mods) { + if (mods) { + del_weak_mods(mods); + send_keyboard_report(); + } +} + +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +void clear_keyboard(void) { + clear_mods(); + clear_keyboard_but_mods(); +} + +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +void clear_keyboard_but_mods(void) { + clear_keys(); + clear_keyboard_but_mods_and_keys(); +} + +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +void clear_keyboard_but_mods_and_keys() { +#ifdef EXTRAKEY_ENABLE + host_system_send(0); + host_consumer_send(0); +#endif + clear_weak_mods(); + clear_macro_mods(); + send_keyboard_report(); +#ifdef MOUSEKEY_ENABLE + mousekey_clear(); + mousekey_send(); +#endif +} + +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +bool is_tap_key(keypos_t key) { + action_t action = layer_switch_get_action(key); + return is_tap_action(action); +} + +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +bool is_tap_record(keyrecord_t *record) { +#ifdef COMBO_ENABLE + action_t action; + if (record->keycode) { + action = action_for_keycode(record->keycode); + } else { + action = layer_switch_get_action(record->event.key); + } +#else + action_t action = layer_switch_get_action(record->event.key); +#endif + return is_tap_action(action); +} + +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +bool is_tap_action(action_t action) { + switch (action.kind.id) { + case ACT_LMODS_TAP: + case ACT_RMODS_TAP: + case ACT_LAYER_TAP: + case ACT_LAYER_TAP_EXT: + switch (action.layer_tap.code) { + case KC_NO ... KC_RGUI: + case OP_TAP_TOGGLE: + case OP_ONESHOT: + return true; + } + return false; + case ACT_SWAP_HANDS: + switch (action.swap.code) { + case KC_NO ... KC_RGUI: + case OP_SH_TAP_TOGGLE: + return true; + } + return false; + case ACT_MACRO: + case ACT_FUNCTION: + if (action.func.opt & FUNC_TAP) { + return true; + } + return false; + } + return false; +} + +/** \brief Debug print (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +void debug_event(keyevent_t event) { dprintf("%04X%c(%u)", (event.key.row << 8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time); } +/** \brief Debug print (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +void debug_record(keyrecord_t record) { + debug_event(record.event); +#ifndef NO_ACTION_TAPPING + dprintf(":%u%c", record.tap.count, (record.tap.interrupted ? '-' : ' ')); +#endif +} + +/** \brief Debug print (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +void debug_action(action_t action) { + switch (action.kind.id) { + case ACT_LMODS: + dprint("ACT_LMODS"); + break; + case ACT_RMODS: + dprint("ACT_RMODS"); + break; + case ACT_LMODS_TAP: + dprint("ACT_LMODS_TAP"); + break; + case ACT_RMODS_TAP: + dprint("ACT_RMODS_TAP"); + break; + case ACT_USAGE: + dprint("ACT_USAGE"); + break; + case ACT_MOUSEKEY: + dprint("ACT_MOUSEKEY"); + break; + case ACT_LAYER: + dprint("ACT_LAYER"); + break; + case ACT_LAYER_MODS: + dprint("ACT_LAYER_MODS"); + break; + case ACT_LAYER_TAP: + dprint("ACT_LAYER_TAP"); + break; + case ACT_LAYER_TAP_EXT: + dprint("ACT_LAYER_TAP_EXT"); + break; + case ACT_MACRO: + dprint("ACT_MACRO"); + break; + case ACT_FUNCTION: + dprint("ACT_FUNCTION"); + break; + case ACT_SWAP_HANDS: + dprint("ACT_SWAP_HANDS"); + break; + default: + dprint("UNKNOWN"); + break; + } + dprintf("[%X:%02X]", action.kind.param >> 8, action.kind.param & 0xff); +} diff --git a/quantum/action.h b/quantum/action.h new file mode 100644 index 000000000..3d357b33b --- /dev/null +++ b/quantum/action.h @@ -0,0 +1,132 @@ +/* +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 . +*/ + +#pragma once + +#include +#include +#include "keyboard.h" +#include "keycode.h" +#include "action_code.h" +#include "action_macro.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Disable macro and function features when LTO is enabled, since they break */ +#ifdef LTO_ENABLE +# ifndef NO_ACTION_MACRO +# define NO_ACTION_MACRO +# endif +# ifndef NO_ACTION_FUNCTION +# define NO_ACTION_FUNCTION +# endif +#endif + +/* tapping count and state */ +typedef struct { + bool interrupted : 1; + bool reserved2 : 1; + bool reserved1 : 1; + bool reserved0 : 1; + uint8_t count : 4; +} tap_t; + +/* Key event container for recording */ +typedef struct { + keyevent_t event; +#ifndef NO_ACTION_TAPPING + tap_t tap; +#endif +#ifdef COMBO_ENABLE + uint16_t keycode; +#endif +} keyrecord_t; + +/* Execute action per keyevent */ +void action_exec(keyevent_t event); + +/* action for key */ +action_t action_for_key(uint8_t layer, keypos_t key); +action_t action_for_keycode(uint16_t keycode); + +/* macro */ +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); + +/* user defined special function */ +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt); + +/* keyboard-specific key event (pre)processing */ +bool process_record_quantum(keyrecord_t *record); + +/* Utilities for actions. */ +#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) +extern bool disable_action_cache; +#endif + +/* Code for handling one-handed key modifiers. */ +#ifdef SWAP_HANDS_ENABLE +extern bool swap_hands; +extern const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS]; +# if (MATRIX_COLS <= 8) +typedef uint8_t swap_state_row_t; +# elif (MATRIX_COLS <= 16) +typedef uint16_t swap_state_row_t; +# elif (MATRIX_COLS <= 32) +typedef uint32_t swap_state_row_t; +# else +# error "MATRIX_COLS: invalid value" +# endif + +void process_hand_swap(keyevent_t *record); +#endif + +void process_record_nocache(keyrecord_t *record); +void process_record(keyrecord_t *record); +void process_record_handler(keyrecord_t *record); +void post_process_record_quantum(keyrecord_t *record); +void process_action(keyrecord_t *record, action_t action); +void register_code(uint8_t code); +void unregister_code(uint8_t code); +void tap_code(uint8_t code); +void tap_code_delay(uint8_t code, uint16_t delay); +void register_mods(uint8_t mods); +void unregister_mods(uint8_t mods); +void register_weak_mods(uint8_t mods); +void unregister_weak_mods(uint8_t mods); +// void set_mods(uint8_t mods); +void clear_keyboard(void); +void clear_keyboard_but_mods(void); +void clear_keyboard_but_mods_and_keys(void); +void layer_switch(uint8_t new_layer); +bool is_tap_key(keypos_t key); +bool is_tap_record(keyrecord_t *record); +bool is_tap_action(action_t action); + +#ifndef NO_ACTION_TAPPING +void process_record_tap_hint(keyrecord_t *record); +#endif + +/* debug */ +void debug_event(keyevent_t event); +void debug_record(keyrecord_t record); +void debug_action(action_t action); + +#ifdef __cplusplus +} +#endif diff --git a/tmk_core/common/action_code.h b/quantum/action_code.h similarity index 100% rename from tmk_core/common/action_code.h rename to quantum/action_code.h diff --git a/quantum/action_layer.c b/quantum/action_layer.c new file mode 100644 index 000000000..ed1a4bd20 --- /dev/null +++ b/quantum/action_layer.c @@ -0,0 +1,279 @@ +#include +#include "keyboard.h" +#include "action.h" +#include "util.h" +#include "action_layer.h" + +#ifdef DEBUG_ACTION +# include "debug.h" +#else +# include "nodebug.h" +#endif + +/** \brief Default Layer State + */ +layer_state_t default_layer_state = 0; + +/** \brief Default Layer State Set At user Level + * + * Run user code on default layer state change + */ +__attribute__((weak)) layer_state_t default_layer_state_set_user(layer_state_t state) { return state; } + +/** \brief Default Layer State Set At Keyboard Level + * + * Run keyboard code on default layer state change + */ +__attribute__((weak)) layer_state_t default_layer_state_set_kb(layer_state_t state) { return default_layer_state_set_user(state); } + +/** \brief Default Layer State Set + * + * Static function to set the default layer state, prints debug info and clears keys + */ +static void default_layer_state_set(layer_state_t state) { + state = default_layer_state_set_kb(state); + debug("default_layer_state: "); + default_layer_debug(); + debug(" to "); + default_layer_state = state; + default_layer_debug(); + debug("\n"); +#ifdef STRICT_LAYER_RELEASE + clear_keyboard_but_mods(); // To avoid stuck keys +#else + clear_keyboard_but_mods_and_keys(); // Don't reset held keys +#endif +} + +/** \brief Default Layer Print + * + * Print out the hex value of the 32-bit default layer state, as well as the value of the highest bit. + */ +void default_layer_debug(void) { dprintf("%08lX(%u)", default_layer_state, get_highest_layer(default_layer_state)); } + +/** \brief Default Layer Set + * + * Sets the default layer state. + */ +void default_layer_set(layer_state_t state) { default_layer_state_set(state); } + +#ifndef NO_ACTION_LAYER +/** \brief Default Layer Or + * + * Turns on the default layer based on matching bits between specifed layer and existing layer state + */ +void default_layer_or(layer_state_t state) { default_layer_state_set(default_layer_state | state); } +/** \brief Default Layer And + * + * Turns on default layer based on matching enabled bits between specifed layer and existing layer state + */ +void default_layer_and(layer_state_t state) { default_layer_state_set(default_layer_state & state); } +/** \brief Default Layer Xor + * + * Turns on default layer based on non-matching bits between specifed layer and existing layer state + */ +void default_layer_xor(layer_state_t state) { default_layer_state_set(default_layer_state ^ state); } +#endif + +#ifndef NO_ACTION_LAYER +/** \brief Keymap Layer State + */ +layer_state_t layer_state = 0; + +/** \brief Layer state set user + * + * Runs user code on layer state change + */ +__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { return state; } + +/** \brief Layer state set keyboard + * + * Runs keyboard code on layer state change + */ +__attribute__((weak)) layer_state_t layer_state_set_kb(layer_state_t state) { return layer_state_set_user(state); } + +/** \brief Layer state set + * + * Sets the layer to match the specifed state (a bitmask) + */ +void layer_state_set(layer_state_t state) { + state = layer_state_set_kb(state); + dprint("layer_state: "); + layer_debug(); + dprint(" to "); + layer_state = state; + layer_debug(); + dprintln(); +# ifdef STRICT_LAYER_RELEASE + clear_keyboard_but_mods(); // To avoid stuck keys +# else + clear_keyboard_but_mods_and_keys(); // Don't reset held keys +# endif +} + +/** \brief Layer clear + * + * Turn off all layers + */ +void layer_clear(void) { layer_state_set(0); } + +/** \brief Layer state is + * + * Return whether the given state is on (it might still be shadowed by a higher state, though) + */ +bool layer_state_is(uint8_t layer) { return layer_state_cmp(layer_state, layer); } + +/** \brief Layer state compare + * + * Used for comparing layers {mostly used for unit testing} + */ +bool layer_state_cmp(layer_state_t cmp_layer_state, uint8_t layer) { + if (!cmp_layer_state) { + return layer == 0; + } + return (cmp_layer_state & ((layer_state_t)1 << layer)) != 0; +} + +/** \brief Layer move + * + * Turns on the given layer and turn off all other layers + */ +void layer_move(uint8_t layer) { layer_state_set((layer_state_t)1 << layer); } + +/** \brief Layer on + * + * Turns on given layer + */ +void layer_on(uint8_t layer) { layer_state_set(layer_state | ((layer_state_t)1 << layer)); } + +/** \brief Layer off + * + * Turns off given layer + */ +void layer_off(uint8_t layer) { layer_state_set(layer_state & ~((layer_state_t)1 << layer)); } + +/** \brief Layer invert + * + * Toggle the given layer (set it if it's unset, or unset it if it's set) + */ +void layer_invert(uint8_t layer) { layer_state_set(layer_state ^ ((layer_state_t)1 << layer)); } + +/** \brief Layer or + * + * Turns on layers based on matching bits between specifed layer and existing layer state + */ +void layer_or(layer_state_t state) { layer_state_set(layer_state | state); } +/** \brief Layer and + * + * Turns on layers based on matching enabled bits between specifed layer and existing layer state + */ +void layer_and(layer_state_t state) { layer_state_set(layer_state & state); } +/** \brief Layer xor + * + * Turns on layers based on non-matching bits between specifed layer and existing layer state + */ +void layer_xor(layer_state_t state) { layer_state_set(layer_state ^ state); } + +/** \brief Layer debug printing + * + * Print out the hex value of the 32-bit layer state, as well as the value of the highest bit. + */ +void layer_debug(void) { dprintf("%08lX(%u)", layer_state, get_highest_layer(layer_state)); } +#endif + +#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) +/** \brief source layer cache + */ + +uint8_t source_layers_cache[(MATRIX_ROWS * MATRIX_COLS + 7) / 8][MAX_LAYER_BITS] = {{0}}; + +/** \brief update source layers cache + * + * Updates the cached keys when changing layers + */ +void update_source_layers_cache(keypos_t key, uint8_t layer) { + const uint8_t key_number = key.col + (key.row * MATRIX_COLS); + const uint8_t storage_row = key_number / 8; + const uint8_t storage_bit = key_number % 8; + + for (uint8_t bit_number = 0; bit_number < MAX_LAYER_BITS; bit_number++) { + source_layers_cache[storage_row][bit_number] ^= (-((layer & (1U << bit_number)) != 0) ^ source_layers_cache[storage_row][bit_number]) & (1U << storage_bit); + } +} + +/** \brief read source layers cache + * + * reads the cached keys stored when the layer was changed + */ +uint8_t read_source_layers_cache(keypos_t key) { + const uint8_t key_number = key.col + (key.row * MATRIX_COLS); + const uint8_t storage_row = key_number / 8; + const uint8_t storage_bit = key_number % 8; + uint8_t layer = 0; + + for (uint8_t bit_number = 0; bit_number < MAX_LAYER_BITS; bit_number++) { + layer |= ((source_layers_cache[storage_row][bit_number] & (1U << storage_bit)) != 0) << bit_number; + } + + return layer; +} +#endif + +/** \brief Store or get action (FIXME: Needs better summary) + * + * Make sure the action triggered when the key is released is the same + * one as the one triggered on press. It's important for the mod keys + * when the layer is switched after the down event but before the up + * event as they may get stuck otherwise. + */ +action_t store_or_get_action(bool pressed, keypos_t key) { +#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) + if (disable_action_cache) { + return layer_switch_get_action(key); + } + + uint8_t layer; + + if (pressed) { + layer = layer_switch_get_layer(key); + update_source_layers_cache(key, layer); + } else { + layer = read_source_layers_cache(key); + } + return action_for_key(layer, key); +#else + return layer_switch_get_action(key); +#endif +} + +/** \brief Layer switch get layer + * + * Gets the layer based on key info + */ +uint8_t layer_switch_get_layer(keypos_t key) { +#ifndef NO_ACTION_LAYER + action_t action; + action.code = ACTION_TRANSPARENT; + + layer_state_t layers = layer_state | default_layer_state; + /* check top layer first */ + for (int8_t i = MAX_LAYER - 1; i >= 0; i--) { + if (layers & ((layer_state_t)1 << i)) { + action = action_for_key(i, key); + if (action.code != ACTION_TRANSPARENT) { + return i; + } + } + } + /* fall back to layer 0 */ + return 0; +#else + return get_highest_layer(default_layer_state); +#endif +} + +/** \brief Layer switch get layer + * + * Gets action code based on key position + */ +action_t layer_switch_get_action(keypos_t key) { return action_for_key(layer_switch_get_layer(key), key); } diff --git a/quantum/action_layer.h b/quantum/action_layer.h new file mode 100644 index 000000000..b87d096ee --- /dev/null +++ b/quantum/action_layer.h @@ -0,0 +1,147 @@ +/* +Copyright 2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include +#include "keyboard.h" +#include "action.h" + +#ifdef DYNAMIC_KEYMAP_ENABLE +# ifndef DYNAMIC_KEYMAP_LAYER_COUNT +# define DYNAMIC_KEYMAP_LAYER_COUNT 4 +# endif +# if DYNAMIC_KEYMAP_LAYER_COUNT <= 8 +# ifndef LAYER_STATE_8BIT +# define LAYER_STATE_8BIT +# endif +# elif DYNAMIC_KEYMAP_LAYER_COUNT <= 16 +# ifndef LAYER_STATE_16BIT +# define LAYER_STATE_16BIT +# endif +# else +# ifndef LAYER_STATE_32BIT +# define LAYER_STATE_32BIT +# endif +# endif +#endif + +#if !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_32BIT) +# define LAYER_STATE_32BIT +#endif + +#if defined(LAYER_STATE_8BIT) +typedef uint8_t layer_state_t; +# define MAX_LAYER_BITS 3 +# ifndef MAX_LAYER +# define MAX_LAYER 8 +# endif +# define get_highest_layer(state) biton(state) +#elif defined(LAYER_STATE_16BIT) +typedef uint16_t layer_state_t; +# define MAX_LAYER_BITS 4 +# ifndef MAX_LAYER +# define MAX_LAYER 16 +# endif +# define get_highest_layer(state) biton16(state) +#elif defined(LAYER_STATE_32BIT) +typedef uint32_t layer_state_t; +# define MAX_LAYER_BITS 5 +# ifndef MAX_LAYER +# define MAX_LAYER 32 +# endif +# define get_highest_layer(state) biton32(state) +#else +# error Layer Mask size not specified. HOW?! +#endif + +/* + * Default Layer + */ +extern layer_state_t default_layer_state; +void default_layer_debug(void); +void default_layer_set(layer_state_t state); + +__attribute__((weak)) layer_state_t default_layer_state_set_kb(layer_state_t state); +__attribute__((weak)) layer_state_t default_layer_state_set_user(layer_state_t state); + +#ifndef NO_ACTION_LAYER +/* bitwise operation */ +void default_layer_or(layer_state_t state); +void default_layer_and(layer_state_t state); +void default_layer_xor(layer_state_t state); +#else +# define default_layer_or(state) +# define default_layer_and(state) +# define default_layer_xor(state) +#endif + +/* + * Keymap Layer + */ +#ifndef NO_ACTION_LAYER +extern layer_state_t layer_state; + +void layer_state_set(layer_state_t state); +bool layer_state_is(uint8_t layer); +bool layer_state_cmp(layer_state_t layer1, uint8_t layer2); + +void layer_debug(void); +void layer_clear(void); +void layer_move(uint8_t layer); +void layer_on(uint8_t layer); +void layer_off(uint8_t layer); +void layer_invert(uint8_t layer); +/* bitwise operation */ +void layer_or(layer_state_t state); +void layer_and(layer_state_t state); +void layer_xor(layer_state_t state); +layer_state_t layer_state_set_user(layer_state_t state); +layer_state_t layer_state_set_kb(layer_state_t state); +#else +# define layer_state 0 + +# define layer_state_set(layer) +# define layer_state_is(layer) (layer == 0) +# define layer_state_cmp(state, layer) (state == 0 ? layer == 0 : (state & (layer_state_t)1 << layer) != 0) + +# define layer_debug() +# define layer_clear() +# define layer_move(layer) (void)layer +# define layer_on(layer) (void)layer +# define layer_off(layer) (void)layer +# define layer_invert(layer) (void)layer +# define layer_or(state) (void)state +# define layer_and(state) (void)state +# define layer_xor(state) (void)state +# define layer_state_set_kb(state) (void)state +# define layer_state_set_user(state) (void)state +#endif + +/* pressed actions cache */ +#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) + +void update_source_layers_cache(keypos_t key, uint8_t layer); +uint8_t read_source_layers_cache(keypos_t key); +#endif +action_t store_or_get_action(bool pressed, keypos_t key); + +/* return the topmost non-transparent layer currently associated with key */ +uint8_t layer_switch_get_layer(keypos_t key); + +/* return action depending on current layer status */ +action_t layer_switch_get_action(keypos_t key); diff --git a/tmk_core/common/action_macro.c b/quantum/action_macro.c similarity index 100% rename from tmk_core/common/action_macro.c rename to quantum/action_macro.c diff --git a/tmk_core/common/action_macro.h b/quantum/action_macro.h similarity index 100% rename from tmk_core/common/action_macro.h rename to quantum/action_macro.h diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c new file mode 100644 index 000000000..36839f9fa --- /dev/null +++ b/quantum/action_tapping.c @@ -0,0 +1,456 @@ +#include +#include +#include "action.h" +#include "action_layer.h" +#include "action_tapping.h" +#include "keycode.h" +#include "timer.h" + +#ifdef DEBUG_ACTION +# include "debug.h" +#else +# include "nodebug.h" +#endif + +#ifndef NO_ACTION_TAPPING + +# define IS_TAPPING() !IS_NOEVENT(tapping_key.event) +# define IS_TAPPING_PRESSED() (IS_TAPPING() && tapping_key.event.pressed) +# define IS_TAPPING_RELEASED() (IS_TAPPING() && !tapping_key.event.pressed) +# define IS_TAPPING_KEY(k) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (k))) +#ifndef COMBO_ENABLE +# define IS_TAPPING_RECORD(r) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (r->event.key))) +#else +# define IS_TAPPING_RECORD(r) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (r->event.key)) && tapping_key.keycode == r->keycode) +#endif + +__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { return TAPPING_TERM; } + +# ifdef TAPPING_TERM_PER_KEY +# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < get_tapping_term(get_record_keycode(&tapping_key, false), &tapping_key)) +# else +# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < TAPPING_TERM) +# endif + +# ifdef TAPPING_FORCE_HOLD_PER_KEY +__attribute__((weak)) bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { return false; } +# endif + +# ifdef PERMISSIVE_HOLD_PER_KEY +__attribute__((weak)) bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { return false; } +# endif + +# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY +__attribute__((weak)) bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { return false; } +# endif + +static keyrecord_t tapping_key = {}; +static keyrecord_t waiting_buffer[WAITING_BUFFER_SIZE] = {}; +static uint8_t waiting_buffer_head = 0; +static uint8_t waiting_buffer_tail = 0; + +static bool process_tapping(keyrecord_t *record); +static bool waiting_buffer_enq(keyrecord_t record); +static void waiting_buffer_clear(void); +static bool waiting_buffer_typed(keyevent_t event); +static bool waiting_buffer_has_anykey_pressed(void); +static void waiting_buffer_scan_tap(void); +static void debug_tapping_key(void); +static void debug_waiting_buffer(void); + +/** \brief Action Tapping Process + * + * FIXME: Needs doc + */ +void action_tapping_process(keyrecord_t record) { + if (process_tapping(&record)) { + if (!IS_NOEVENT(record.event)) { + debug("processed: "); + debug_record(record); + debug("\n"); + } + } else { + if (!waiting_buffer_enq(record)) { + // clear all in case of overflow. + debug("OVERFLOW: CLEAR ALL STATES\n"); + clear_keyboard(); + waiting_buffer_clear(); + tapping_key = (keyrecord_t){}; + } + } + + // process waiting_buffer + if (!IS_NOEVENT(record.event) && waiting_buffer_head != waiting_buffer_tail) { + debug("---- action_exec: process waiting_buffer -----\n"); + } + for (; waiting_buffer_tail != waiting_buffer_head; waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE) { + if (process_tapping(&waiting_buffer[waiting_buffer_tail])) { + debug("processed: waiting_buffer["); + debug_dec(waiting_buffer_tail); + debug("] = "); + debug_record(waiting_buffer[waiting_buffer_tail]); + debug("\n\n"); + } else { + break; + } + } + if (!IS_NOEVENT(record.event)) { + debug("\n"); + } +} + +/** \brief Tapping + * + * Rule: Tap key is typed(pressed and released) within TAPPING_TERM. + * (without interfering by typing other key) + */ +/* return true when key event is processed or consumed. */ +bool process_tapping(keyrecord_t *keyp) { + keyevent_t event = keyp->event; + + // if tapping + if (IS_TAPPING_PRESSED()) { + if (WITHIN_TAPPING_TERM(event)) { + if (tapping_key.tap.count == 0) { + if (IS_TAPPING_RECORD(keyp) && !event.pressed) { + // first tap! + debug("Tapping: First tap(0->1).\n"); + tapping_key.tap.count = 1; + debug_tapping_key(); + process_record(&tapping_key); + + // copy tapping state + keyp->tap = tapping_key.tap; + // enqueue + return false; + } + /* Process a key typed within TAPPING_TERM + * This can register the key before settlement of tapping, + * useful for long TAPPING_TERM but may prevent fast typing. + */ +# if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) + else if ((( +# ifdef TAPPING_TERM_PER_KEY + get_tapping_term(get_record_keycode(&tapping_key, false), keyp) +# else + TAPPING_TERM +# endif + >= 500) + +# ifdef PERMISSIVE_HOLD_PER_KEY + || get_permissive_hold(get_record_keycode(&tapping_key, false), keyp) +# elif defined(PERMISSIVE_HOLD) + || true +# endif + ) && + IS_RELEASED(event) && waiting_buffer_typed(event)) { + debug("Tapping: End. No tap. Interfered by typing key\n"); + process_record(&tapping_key); + tapping_key = (keyrecord_t){}; + debug_tapping_key(); + // enqueue + return false; + } +# endif + /* Process release event of a key pressed before tapping starts + * Without this unexpected repeating will occur with having fast repeating setting + * https://github.com/tmk/tmk_keyboard/issues/60 + */ + else if (IS_RELEASED(event) && !waiting_buffer_typed(event)) { + // Modifier should be retained till end of this tapping. + action_t action = layer_switch_get_action(event.key); + switch (action.kind.id) { + case ACT_LMODS: + case ACT_RMODS: + if (action.key.mods && !action.key.code) return false; + if (IS_MOD(action.key.code)) return false; + break; + case ACT_LMODS_TAP: + case ACT_RMODS_TAP: + if (action.key.mods && keyp->tap.count == 0) return false; + if (IS_MOD(action.key.code)) return false; + break; + } + // Release of key should be process immediately. + debug("Tapping: release event of a key pressed before tapping\n"); + process_record(keyp); + return true; + } else { + // set interrupted flag when other key preesed during tapping + if (event.pressed) { + tapping_key.tap.interrupted = true; +# if defined(HOLD_ON_OTHER_KEY_PRESS) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) +# if defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) + if (get_hold_on_other_key_press(get_record_keycode(&tapping_key, false), keyp)) +# endif + { + debug("Tapping: End. No tap. Interfered by pressed key\n"); + process_record(&tapping_key); + tapping_key = (keyrecord_t){}; + debug_tapping_key(); + // enqueue + return false; + } +# endif + } + // enqueue + return false; + } + } + // tap_count > 0 + else { + if (IS_TAPPING_RECORD(keyp) && !event.pressed) { + debug("Tapping: Tap release("); + debug_dec(tapping_key.tap.count); + debug(")\n"); + keyp->tap = tapping_key.tap; + process_record(keyp); + tapping_key = *keyp; + debug_tapping_key(); + return true; + } else if (is_tap_record(keyp) && event.pressed) { + if (tapping_key.tap.count > 1) { + debug("Tapping: Start new tap with releasing last tap(>1).\n"); + // unregister key + process_record(&(keyrecord_t){.tap = tapping_key.tap, .event.key = tapping_key.event.key, .event.time = event.time, .event.pressed = false, +#ifdef COMBO_ENABLE + .keycode = tapping_key.keycode, +#endif + }); + } else { + debug("Tapping: Start while last tap(1).\n"); + } + tapping_key = *keyp; + waiting_buffer_scan_tap(); + debug_tapping_key(); + return true; + } else { + if (!IS_NOEVENT(event)) { + debug("Tapping: key event while last tap(>0).\n"); + } + process_record(keyp); + return true; + } + } + } + // after TAPPING_TERM + else { + if (tapping_key.tap.count == 0) { + debug("Tapping: End. Timeout. Not tap(0): "); + debug_event(event); + debug("\n"); + process_record(&tapping_key); + tapping_key = (keyrecord_t){}; + debug_tapping_key(); + return false; + } else { + if (IS_TAPPING_RECORD(keyp) && !event.pressed) { + debug("Tapping: End. last timeout tap release(>0)."); + keyp->tap = tapping_key.tap; + process_record(keyp); + tapping_key = (keyrecord_t){}; + return true; + } else if (is_tap_record(keyp) && event.pressed) { + if (tapping_key.tap.count > 1) { + debug("Tapping: Start new tap with releasing last timeout tap(>1).\n"); + // unregister key + process_record(&(keyrecord_t){.tap = tapping_key.tap, .event.key = tapping_key.event.key, .event.time = event.time, .event.pressed = false, +#ifdef COMBO_ENABLE + .keycode = tapping_key.keycode, +#endif + }); + } else { + debug("Tapping: Start while last timeout tap(1).\n"); + } + tapping_key = *keyp; + waiting_buffer_scan_tap(); + debug_tapping_key(); + return true; + } else { + if (!IS_NOEVENT(event)) { + debug("Tapping: key event while last timeout tap(>0).\n"); + } + process_record(keyp); + return true; + } + } + } + } else if (IS_TAPPING_RELEASED()) { + if (WITHIN_TAPPING_TERM(event)) { + if (event.pressed) { + if (IS_TAPPING_RECORD(keyp)) { +//# ifndef TAPPING_FORCE_HOLD +# if !defined(TAPPING_FORCE_HOLD) || defined(TAPPING_FORCE_HOLD_PER_KEY) + if ( +# ifdef TAPPING_FORCE_HOLD_PER_KEY + !get_tapping_force_hold(get_record_keycode(&tapping_key, false), keyp) && +# endif + !tapping_key.tap.interrupted && tapping_key.tap.count > 0) { + // sequential tap. + keyp->tap = tapping_key.tap; + if (keyp->tap.count < 15) keyp->tap.count += 1; + debug("Tapping: Tap press("); + debug_dec(keyp->tap.count); + debug(")\n"); + process_record(keyp); + tapping_key = *keyp; + debug_tapping_key(); + return true; + } +# endif + // FIX: start new tap again + tapping_key = *keyp; + return true; + } else if (is_tap_record(keyp)) { + // Sequential tap can be interfered with other tap key. + debug("Tapping: Start with interfering other tap.\n"); + tapping_key = *keyp; + waiting_buffer_scan_tap(); + debug_tapping_key(); + return true; + } else { + // should none in buffer + // FIX: interrupted when other key is pressed + tapping_key.tap.interrupted = true; + process_record(keyp); + return true; + } + } else { + if (!IS_NOEVENT(event)) debug("Tapping: other key just after tap.\n"); + process_record(keyp); + return true; + } + } else { + // FIX: process_action here? + // timeout. no sequential tap. + debug("Tapping: End(Timeout after releasing last tap): "); + debug_event(event); + debug("\n"); + tapping_key = (keyrecord_t){}; + debug_tapping_key(); + return false; + } + } + // not tapping state + else { + if (event.pressed && is_tap_record(keyp)) { + debug("Tapping: Start(Press tap key).\n"); + tapping_key = *keyp; + process_record_tap_hint(&tapping_key); + waiting_buffer_scan_tap(); + debug_tapping_key(); + return true; + } else { + process_record(keyp); + return true; + } + } +} + +/** \brief Waiting buffer enq + * + * FIXME: Needs docs + */ +bool waiting_buffer_enq(keyrecord_t record) { + if (IS_NOEVENT(record.event)) { + return true; + } + + if ((waiting_buffer_head + 1) % WAITING_BUFFER_SIZE == waiting_buffer_tail) { + debug("waiting_buffer_enq: Over flow.\n"); + return false; + } + + waiting_buffer[waiting_buffer_head] = record; + waiting_buffer_head = (waiting_buffer_head + 1) % WAITING_BUFFER_SIZE; + + debug("waiting_buffer_enq: "); + debug_waiting_buffer(); + return true; +} + +/** \brief Waiting buffer clear + * + * FIXME: Needs docs + */ +void waiting_buffer_clear(void) { + waiting_buffer_head = 0; + waiting_buffer_tail = 0; +} + +/** \brief Waiting buffer typed + * + * FIXME: Needs docs + */ +bool waiting_buffer_typed(keyevent_t event) { + for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { + if (KEYEQ(event.key, waiting_buffer[i].event.key) && event.pressed != waiting_buffer[i].event.pressed) { + return true; + } + } + return false; +} + +/** \brief Waiting buffer has anykey pressed + * + * FIXME: Needs docs + */ +__attribute__((unused)) bool waiting_buffer_has_anykey_pressed(void) { + for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { + if (waiting_buffer[i].event.pressed) return true; + } + return false; +} + +/** \brief Scan buffer for tapping + * + * FIXME: Needs docs + */ +void waiting_buffer_scan_tap(void) { + // tapping already is settled + if (tapping_key.tap.count > 0) return; + // invalid state: tapping_key released && tap.count == 0 + if (!tapping_key.event.pressed) return; + + for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { + if (IS_TAPPING_KEY(waiting_buffer[i].event.key) && !waiting_buffer[i].event.pressed && WITHIN_TAPPING_TERM(waiting_buffer[i].event)) { + tapping_key.tap.count = 1; + waiting_buffer[i].tap.count = 1; + process_record(&tapping_key); + + debug("waiting_buffer_scan_tap: found at ["); + debug_dec(i); + debug("]\n"); + debug_waiting_buffer(); + return; + } + } +} + +/** \brief Tapping key debug print + * + * FIXME: Needs docs + */ +static void debug_tapping_key(void) { + debug("TAPPING_KEY="); + debug_record(tapping_key); + debug("\n"); +} + +/** \brief Waiting buffer debug print + * + * FIXME: Needs docs + */ +static void debug_waiting_buffer(void) { + debug("{ "); + for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { + debug("["); + debug_dec(i); + debug("]="); + debug_record(waiting_buffer[i]); + debug(" "); + } + debug("}\n"); +} + +#endif diff --git a/quantum/action_tapping.h b/quantum/action_tapping.h new file mode 100644 index 000000000..7de8049c7 --- /dev/null +++ b/quantum/action_tapping.h @@ -0,0 +1,42 @@ +/* +Copyright 2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* period of tapping(ms) */ +#ifndef TAPPING_TERM +# define TAPPING_TERM 200 +#endif + +/* tap count needed for toggling a feature */ +#ifndef TAPPING_TOGGLE +# define TAPPING_TOGGLE 5 +#endif + +#define WAITING_BUFFER_SIZE 8 + +#ifndef NO_ACTION_TAPPING +uint16_t get_record_keycode(keyrecord_t *record, bool update_layer_cache); +uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache); +void action_tapping_process(keyrecord_t record); + +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record); +bool get_permissive_hold(uint16_t keycode, keyrecord_t *record); +bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record); +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record); +bool get_retro_tapping(uint16_t keycode, keyrecord_t *record); +#endif diff --git a/quantum/action_util.c b/quantum/action_util.c new file mode 100644 index 000000000..2b3c00cba --- /dev/null +++ b/quantum/action_util.c @@ -0,0 +1,455 @@ +/* +Copyright 2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "host.h" +#include "report.h" +#include "debug.h" +#include "action_util.h" +#include "action_layer.h" +#include "timer.h" +#include "keycode_config.h" + +extern keymap_config_t keymap_config; + +static uint8_t real_mods = 0; +static uint8_t weak_mods = 0; +static uint8_t macro_mods = 0; +#ifdef KEY_OVERRIDE_ENABLE +static uint8_t weak_override_mods = 0; +static uint8_t suppressed_mods = 0; +#endif + +#ifdef USB_6KRO_ENABLE +# define RO_ADD(a, b) ((a + b) % KEYBOARD_REPORT_KEYS) +# define RO_SUB(a, b) ((a - b + KEYBOARD_REPORT_KEYS) % KEYBOARD_REPORT_KEYS) +# define RO_INC(a) RO_ADD(a, 1) +# define RO_DEC(a) RO_SUB(a, 1) +static int8_t cb_head = 0; +static int8_t cb_tail = 0; +static int8_t cb_count = 0; +#endif + +// TODO: pointer variable is not needed +// report_keyboard_t keyboard_report = {}; +report_keyboard_t *keyboard_report = &(report_keyboard_t){}; + +extern inline void add_key(uint8_t key); +extern inline void del_key(uint8_t key); +extern inline void clear_keys(void); + +#ifndef NO_ACTION_ONESHOT +static uint8_t oneshot_mods = 0; +static uint8_t oneshot_locked_mods = 0; +uint8_t get_oneshot_locked_mods(void) { return oneshot_locked_mods; } +void set_oneshot_locked_mods(uint8_t mods) { + if (mods != oneshot_locked_mods) { + oneshot_locked_mods = mods; + oneshot_locked_mods_changed_kb(oneshot_locked_mods); + } +} +void clear_oneshot_locked_mods(void) { + if (oneshot_locked_mods) { + oneshot_locked_mods = 0; + oneshot_locked_mods_changed_kb(oneshot_locked_mods); + } +} +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) +static uint16_t oneshot_time = 0; +bool has_oneshot_mods_timed_out(void) { return TIMER_DIFF_16(timer_read(), oneshot_time) >= ONESHOT_TIMEOUT; } +# else +bool has_oneshot_mods_timed_out(void) { return false; } +# endif +#endif + +/* oneshot layer */ +#ifndef NO_ACTION_ONESHOT +/** \brief oneshot_layer_data bits + * LLLL LSSS + * where: + * L => are layer bits + * S => oneshot state bits + */ +static int8_t oneshot_layer_data = 0; + +inline uint8_t get_oneshot_layer(void) { return oneshot_layer_data >> 3; } +inline uint8_t get_oneshot_layer_state(void) { return oneshot_layer_data & 0b111; } + +# ifdef SWAP_HANDS_ENABLE +enum { + SHO_OFF, + SHO_ACTIVE, // Swap hands button was pressed, and we didn't send any swapped keys yet + SHO_PRESSED, // Swap hands button is currently pressed + SHO_USED, // Swap hands button is still pressed, and we already sent swapped keys +} swap_hands_oneshot = SHO_OFF; +# endif + +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) +static uint16_t oneshot_layer_time = 0; +inline bool has_oneshot_layer_timed_out() { return TIMER_DIFF_16(timer_read(), oneshot_layer_time) >= ONESHOT_TIMEOUT && !(get_oneshot_layer_state() & ONESHOT_TOGGLED); } +# ifdef SWAP_HANDS_ENABLE +static uint16_t oneshot_swaphands_time = 0; +inline bool has_oneshot_swaphands_timed_out() { return TIMER_DIFF_16(timer_read(), oneshot_swaphands_time) >= ONESHOT_TIMEOUT && (swap_hands_oneshot == SHO_ACTIVE); } +# endif +# endif + +# ifdef SWAP_HANDS_ENABLE + +void set_oneshot_swaphands(void) { + swap_hands_oneshot = SHO_PRESSED; + swap_hands = true; +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + oneshot_swaphands_time = timer_read(); + if (oneshot_layer_time != 0) { + oneshot_layer_time = oneshot_swaphands_time; + } +# endif +} + +void release_oneshot_swaphands(void) { + if (swap_hands_oneshot == SHO_PRESSED) { + swap_hands_oneshot = SHO_ACTIVE; + } + if (swap_hands_oneshot == SHO_USED) { + clear_oneshot_swaphands(); + } +} + +void use_oneshot_swaphands(void) { + if (swap_hands_oneshot == SHO_PRESSED) { + swap_hands_oneshot = SHO_USED; + } + if (swap_hands_oneshot == SHO_ACTIVE) { + clear_oneshot_swaphands(); + } +} + +void clear_oneshot_swaphands(void) { + swap_hands_oneshot = SHO_OFF; + swap_hands = false; +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + oneshot_swaphands_time = 0; +# endif +} + +# endif + +/** \brief Set oneshot layer + * + * FIXME: needs doc + */ +void set_oneshot_layer(uint8_t layer, uint8_t state) { + if (!keymap_config.oneshot_disable) { + oneshot_layer_data = layer << 3 | state; + layer_on(layer); +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + oneshot_layer_time = timer_read(); +# endif + oneshot_layer_changed_kb(get_oneshot_layer()); + } else { + layer_on(layer); + } +} +/** \brief Reset oneshot layer + * + * FIXME: needs doc + */ +void reset_oneshot_layer(void) { + oneshot_layer_data = 0; +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + oneshot_layer_time = 0; +# endif + oneshot_layer_changed_kb(get_oneshot_layer()); +} +/** \brief Clear oneshot layer + * + * FIXME: needs doc + */ +void clear_oneshot_layer_state(oneshot_fullfillment_t state) { + uint8_t start_state = oneshot_layer_data; + oneshot_layer_data &= ~state; + if ((!get_oneshot_layer_state() && start_state != oneshot_layer_data) || keymap_config.oneshot_disable) { + layer_off(get_oneshot_layer()); + reset_oneshot_layer(); + } +} +/** \brief Is oneshot layer active + * + * FIXME: needs doc + */ +bool is_oneshot_layer_active(void) { return get_oneshot_layer_state(); } + +/** \brief set oneshot + * + * FIXME: needs doc + */ +void oneshot_set(bool active) { + if (keymap_config.oneshot_disable != active) { + keymap_config.oneshot_disable = active; + eeconfig_update_keymap(keymap_config.raw); + dprintf("Oneshot: active: %d\n", active); + } +} + +/** \brief toggle oneshot + * + * FIXME: needs doc + */ +void oneshot_toggle(void) { oneshot_set(!keymap_config.oneshot_disable); } + +/** \brief enable oneshot + * + * FIXME: needs doc + */ +void oneshot_enable(void) { oneshot_set(true); } + +/** \brief disable oneshot + * + * FIXME: needs doc + */ +void oneshot_disable(void) { oneshot_set(false); } + +bool is_oneshot_enabled(void) { return keymap_config.oneshot_disable; } + +#endif + +/** \brief Send keyboard report + * + * FIXME: needs doc + */ +void send_keyboard_report(void) { + keyboard_report->mods = real_mods; + keyboard_report->mods |= weak_mods; + keyboard_report->mods |= macro_mods; + +#ifndef NO_ACTION_ONESHOT + if (oneshot_mods) { +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + if (has_oneshot_mods_timed_out()) { + dprintf("Oneshot: timeout\n"); + clear_oneshot_mods(); + } +# endif + keyboard_report->mods |= oneshot_mods; + if (has_anykey(keyboard_report)) { + clear_oneshot_mods(); + } + } + +#endif + +#ifdef KEY_OVERRIDE_ENABLE + // These need to be last to be able to properly control key overrides + keyboard_report->mods &= ~suppressed_mods; + keyboard_report->mods |= weak_override_mods; +#endif + + host_keyboard_send(keyboard_report); +} + +/** \brief Get mods + * + * FIXME: needs doc + */ +uint8_t get_mods(void) { return real_mods; } +/** \brief add mods + * + * FIXME: needs doc + */ +void add_mods(uint8_t mods) { real_mods |= mods; } +/** \brief del mods + * + * FIXME: needs doc + */ +void del_mods(uint8_t mods) { real_mods &= ~mods; } +/** \brief set mods + * + * FIXME: needs doc + */ +void set_mods(uint8_t mods) { real_mods = mods; } +/** \brief clear mods + * + * FIXME: needs doc + */ +void clear_mods(void) { real_mods = 0; } + +/** \brief get weak mods + * + * FIXME: needs doc + */ +uint8_t get_weak_mods(void) { return weak_mods; } +/** \brief add weak mods + * + * FIXME: needs doc + */ +void add_weak_mods(uint8_t mods) { weak_mods |= mods; } +/** \brief del weak mods + * + * FIXME: needs doc + */ +void del_weak_mods(uint8_t mods) { weak_mods &= ~mods; } +/** \brief set weak mods + * + * FIXME: needs doc + */ +void set_weak_mods(uint8_t mods) { weak_mods = mods; } +/** \brief clear weak mods + * + * FIXME: needs doc + */ +void clear_weak_mods(void) { weak_mods = 0; } + +#ifdef KEY_OVERRIDE_ENABLE +/** \brief set weak mods used by key overrides. DO not call this manually + */ +void set_weak_override_mods(uint8_t mods) { weak_override_mods = mods; } +/** \brief clear weak mods used by key overrides. DO not call this manually + */ +void clear_weak_override_mods(void) { weak_override_mods = 0; } + +/** \brief set suppressed mods used by key overrides. DO not call this manually + */ +void set_suppressed_override_mods(uint8_t mods) { suppressed_mods = mods; } +/** \brief clear suppressed mods used by key overrides. DO not call this manually + */ +void clear_suppressed_override_mods(void) { suppressed_mods = 0; } +#endif + +/* macro modifier */ +/** \brief get macro mods + * + * FIXME: needs doc + */ +uint8_t get_macro_mods(void) { return macro_mods; } +/** \brief add macro mods + * + * FIXME: needs doc + */ +void add_macro_mods(uint8_t mods) { macro_mods |= mods; } +/** \brief del macro mods + * + * FIXME: needs doc + */ +void del_macro_mods(uint8_t mods) { macro_mods &= ~mods; } +/** \brief set macro mods + * + * FIXME: needs doc + */ +void set_macro_mods(uint8_t mods) { macro_mods = mods; } +/** \brief clear macro mods + * + * FIXME: needs doc + */ +void clear_macro_mods(void) { macro_mods = 0; } + +#ifndef NO_ACTION_ONESHOT +/** \brief get oneshot mods + * + * FIXME: needs doc + */ +uint8_t get_oneshot_mods(void) { return oneshot_mods; } + +void add_oneshot_mods(uint8_t mods) { + if ((oneshot_mods & mods) != mods) { +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + oneshot_time = timer_read(); +# endif + oneshot_mods |= mods; + oneshot_mods_changed_kb(mods); + } +} + +void del_oneshot_mods(uint8_t mods) { + if (oneshot_mods & mods) { + oneshot_mods &= ~mods; +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + oneshot_time = oneshot_mods ? timer_read() : 0; +# endif + oneshot_mods_changed_kb(oneshot_mods); + } +} + +/** \brief set oneshot mods + * + * FIXME: needs doc + */ +void set_oneshot_mods(uint8_t mods) { + if (!keymap_config.oneshot_disable) { + if (oneshot_mods != mods) { +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + oneshot_time = timer_read(); +# endif + oneshot_mods = mods; + oneshot_mods_changed_kb(mods); + } + } +} + +/** \brief clear oneshot mods + * + * FIXME: needs doc + */ +void clear_oneshot_mods(void) { + if (oneshot_mods) { + oneshot_mods = 0; +# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) + oneshot_time = 0; +# endif + oneshot_mods_changed_kb(oneshot_mods); + } +} +#endif + +/** \brief Called when the one shot modifiers have been changed. + * + * \param mods Contains the active modifiers active after the change. + */ +__attribute__((weak)) void oneshot_locked_mods_changed_user(uint8_t mods) {} + +/** \brief Called when the locked one shot modifiers have been changed. + * + * \param mods Contains the active modifiers active after the change. + */ +__attribute__((weak)) void oneshot_locked_mods_changed_kb(uint8_t mods) { oneshot_locked_mods_changed_user(mods); } + +/** \brief Called when the one shot modifiers have been changed. + * + * \param mods Contains the active modifiers active after the change. + */ +__attribute__((weak)) void oneshot_mods_changed_user(uint8_t mods) {} + +/** \brief Called when the one shot modifiers have been changed. + * + * \param mods Contains the active modifiers active after the change. + */ +__attribute__((weak)) void oneshot_mods_changed_kb(uint8_t mods) { oneshot_mods_changed_user(mods); } + +/** \brief Called when the one shot layers have been changed. + * + * \param layer Contains the layer that is toggled on, or zero when toggled off. + */ +__attribute__((weak)) void oneshot_layer_changed_user(uint8_t layer) {} + +/** \brief Called when the one shot layers have been changed. + * + * \param layer Contains the layer that is toggled on, or zero when toggled off. + */ +__attribute__((weak)) void oneshot_layer_changed_kb(uint8_t layer) { oneshot_layer_changed_user(layer); } + +/** \brief inspect keyboard state + * + * FIXME: needs doc + */ +uint8_t has_anymod(void) { return bitpop(real_mods); } diff --git a/tmk_core/common/action_util.h b/quantum/action_util.h similarity index 100% rename from tmk_core/common/action_util.h rename to quantum/action_util.h diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index 46277dd70..49bb309e8 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c @@ -139,6 +139,9 @@ void audio_init() { audio_initialized = true; } stop_all_notes(); +#ifndef AUDIO_INIT_DELAY + audio_startup(); +#endif } void audio_startup(void) { diff --git a/quantum/bootmagic/bootmagic.h b/quantum/bootmagic/bootmagic.h index 959750178..db826025c 100644 --- a/quantum/bootmagic/bootmagic.h +++ b/quantum/bootmagic/bootmagic.h @@ -15,9 +15,7 @@ */ #pragma once -#if defined(BOOTMAGIC_ENABLE) -# include "bootmagic_full.h" -#elif defined(BOOTMAGIC_LITE) +#if defined(BOOTMAGIC_LITE) # include "bootmagic_lite.h" #endif diff --git a/quantum/bootmagic/bootmagic_full.c b/quantum/bootmagic/bootmagic_full.c deleted file mode 100644 index a7a0dcfcb..000000000 --- a/quantum/bootmagic/bootmagic_full.c +++ /dev/null @@ -1,147 +0,0 @@ -/* Copyright 2021 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include -#include -#include "wait.h" -#include "matrix.h" -#include "bootloader.h" -#include "debug.h" -#include "keymap.h" -#include "host.h" -#include "action_layer.h" -#include "eeconfig.h" -#include "bootmagic.h" - -/** \brief Scan Keycode - * - * FIXME: needs doc - */ -static bool scan_keycode(uint8_t keycode) { - for (uint8_t r = 0; r < MATRIX_ROWS; r++) { - matrix_row_t matrix_row = matrix_get_row(r); - for (uint8_t c = 0; c < MATRIX_COLS; c++) { - if (matrix_row & ((matrix_row_t)1 << c)) { - if (keycode == keymap_key_to_keycode(0, (keypos_t){.row = r, .col = c})) { - return true; - } - } - } - } - return false; -} - -/** \brief Bootmagic Scan Keycode - * - * FIXME: needs doc - */ -static bool bootmagic_scan_keycode(uint8_t keycode) { - if (!scan_keycode(BOOTMAGIC_KEY_SALT)) return false; - - return scan_keycode(keycode); -} - -void bootmagic(void) { - /* do scans in case of bounce */ - print("bootmagic scan: ... "); - uint8_t scan = 100; - while (scan--) { - matrix_scan(); - wait_ms(10); - } - print("done.\n"); - - /* bootmagic skip */ - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SKIP)) { - return; - } - - /* eeconfig clear */ - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_EEPROM_CLEAR)) { - eeconfig_init(); - } - - /* bootloader */ - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_BOOTLOADER)) { - bootloader_jump(); - } - - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEBUG_ENABLE)) { - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEBUG_MATRIX)) { - debug_config.matrix = !debug_config.matrix; - } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEBUG_KEYBOARD)) { - debug_config.keyboard = !debug_config.keyboard; - } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEBUG_MOUSE)) { - debug_config.mouse = !debug_config.mouse; - } else { - debug_config.enable = !debug_config.enable; - } - } - eeconfig_update_debug(debug_config.raw); - - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK)) { - keymap_config.swap_control_capslock = !keymap_config.swap_control_capslock; - } - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL)) { - keymap_config.capslock_to_control = !keymap_config.capslock_to_control; - } - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SWAP_LALT_LGUI)) { - keymap_config.swap_lalt_lgui = !keymap_config.swap_lalt_lgui; - } - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SWAP_RALT_RGUI)) { - keymap_config.swap_ralt_rgui = !keymap_config.swap_ralt_rgui; - } - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_NO_GUI)) { - keymap_config.no_gui = !keymap_config.no_gui; - } - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SWAP_GRAVE_ESC)) { - keymap_config.swap_grave_esc = !keymap_config.swap_grave_esc; - } - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE)) { - keymap_config.swap_backslash_backspace = !keymap_config.swap_backslash_backspace; - } - if (bootmagic_scan_keycode(BOOTMAGIC_HOST_NKRO)) { - keymap_config.nkro = !keymap_config.nkro; - } - eeconfig_update_keymap(keymap_config.raw); - - /* default layer */ - uint8_t default_layer = 0; - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_0)) { - default_layer |= (1 << 0); - } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_1)) { - default_layer |= (1 << 1); - } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_2)) { - default_layer |= (1 << 2); - } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_3)) { - default_layer |= (1 << 3); - } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_4)) { - default_layer |= (1 << 4); - } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_5)) { - default_layer |= (1 << 5); - } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_6)) { - default_layer |= (1 << 6); - } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_DEFAULT_LAYER_7)) { - default_layer |= (1 << 7); - } - eeconfig_update_default_layer(default_layer); - - /* EE_HANDS handedness */ - if (bootmagic_scan_keycode(BOOTMAGIC_KEY_EE_HANDS_LEFT)) { - eeconfig_update_handedness(true); - } else if (bootmagic_scan_keycode(BOOTMAGIC_KEY_EE_HANDS_RIGHT)) { - eeconfig_update_handedness(false); - } -} diff --git a/quantum/bootmagic/bootmagic_full.h b/quantum/bootmagic/bootmagic_full.h deleted file mode 100644 index 28f914c1b..000000000 --- a/quantum/bootmagic/bootmagic_full.h +++ /dev/null @@ -1,115 +0,0 @@ -/* Copyright 2021 QMK - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -/* FIXME: Add special doxygen comments for defines here. */ - -/* bootmagic salt key */ -#ifndef BOOTMAGIC_KEY_SALT -# define BOOTMAGIC_KEY_SALT KC_SPACE -#endif - -/* skip bootmagic and eeconfig */ -#ifndef BOOTMAGIC_KEY_SKIP -# define BOOTMAGIC_KEY_SKIP KC_ESC -#endif - -/* eeprom clear */ -#ifndef BOOTMAGIC_KEY_EEPROM_CLEAR -# define BOOTMAGIC_KEY_EEPROM_CLEAR KC_BSPACE -#endif - -/* kick up bootloader */ -#ifndef BOOTMAGIC_KEY_BOOTLOADER -# define BOOTMAGIC_KEY_BOOTLOADER KC_B -#endif - -/* debug enable */ -#ifndef BOOTMAGIC_KEY_DEBUG_ENABLE -# define BOOTMAGIC_KEY_DEBUG_ENABLE KC_D -#endif -#ifndef BOOTMAGIC_KEY_DEBUG_MATRIX -# define BOOTMAGIC_KEY_DEBUG_MATRIX KC_X -#endif -#ifndef BOOTMAGIC_KEY_DEBUG_KEYBOARD -# define BOOTMAGIC_KEY_DEBUG_KEYBOARD KC_K -#endif -#ifndef BOOTMAGIC_KEY_DEBUG_MOUSE -# define BOOTMAGIC_KEY_DEBUG_MOUSE KC_M -#endif -#ifndef BOOTMAGIC_KEY_EE_HANDS_LEFT -# define BOOTMAGIC_KEY_EE_HANDS_LEFT KC_L -#endif -#ifndef BOOTMAGIC_KEY_EE_HANDS_RIGHT -# define BOOTMAGIC_KEY_EE_HANDS_RIGHT KC_R -#endif - -/* - * keymap config - */ -#ifndef BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK -# define BOOTMAGIC_KEY_SWAP_CONTROL_CAPSLOCK KC_LCTRL -#endif -#ifndef BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL -# define BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL KC_CAPSLOCK -#endif -#ifndef BOOTMAGIC_KEY_SWAP_LALT_LGUI -# define BOOTMAGIC_KEY_SWAP_LALT_LGUI KC_LALT -#endif -#ifndef BOOTMAGIC_KEY_SWAP_RALT_RGUI -# define BOOTMAGIC_KEY_SWAP_RALT_RGUI KC_RALT -#endif -#ifndef BOOTMAGIC_KEY_NO_GUI -# define BOOTMAGIC_KEY_NO_GUI KC_LGUI -#endif -#ifndef BOOTMAGIC_KEY_SWAP_GRAVE_ESC -# define BOOTMAGIC_KEY_SWAP_GRAVE_ESC KC_GRAVE -#endif -#ifndef BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE -# define BOOTMAGIC_KEY_SWAP_BACKSLASH_BACKSPACE KC_BSLASH -#endif -#ifndef BOOTMAGIC_HOST_NKRO -# define BOOTMAGIC_HOST_NKRO KC_N -#endif - -/* - * change default layer - */ -#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_0 -# define BOOTMAGIC_KEY_DEFAULT_LAYER_0 KC_0 -#endif -#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_1 -# define BOOTMAGIC_KEY_DEFAULT_LAYER_1 KC_1 -#endif -#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_2 -# define BOOTMAGIC_KEY_DEFAULT_LAYER_2 KC_2 -#endif -#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_3 -# define BOOTMAGIC_KEY_DEFAULT_LAYER_3 KC_3 -#endif -#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_4 -# define BOOTMAGIC_KEY_DEFAULT_LAYER_4 KC_4 -#endif -#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_5 -# define BOOTMAGIC_KEY_DEFAULT_LAYER_5 KC_5 -#endif -#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_6 -# define BOOTMAGIC_KEY_DEFAULT_LAYER_6 KC_6 -#endif -#ifndef BOOTMAGIC_KEY_DEFAULT_LAYER_7 -# define BOOTMAGIC_KEY_DEFAULT_LAYER_7 KC_7 -#endif \ No newline at end of file diff --git a/quantum/bootmagic/bootmagic_lite.c b/quantum/bootmagic/bootmagic_lite.c index 9cbdcb0bb..54bbf5a2e 100644 --- a/quantum/bootmagic/bootmagic_lite.c +++ b/quantum/bootmagic/bootmagic_lite.c @@ -19,13 +19,7 @@ * * ...just incase someone wants to only change the eeprom behaviour */ -__attribute__((weak)) void bootmagic_lite_reset_eeprom(void) { -#if defined(VIA_ENABLE) - via_eeprom_reset(); -#else - eeconfig_disable(); -#endif -} +__attribute__((weak)) void bootmagic_lite_reset_eeprom(void) { eeconfig_disable(); } /** \brief The lite version of TMK's bootmagic based on Wilba. * diff --git a/quantum/color.h b/quantum/color.h index 4783f6839..e2cfc4692 100644 --- a/quantum/color.h +++ b/quantum/color.h @@ -19,6 +19,60 @@ #include #include +// clang-format off + +/* + * RGB Colors + */ +#define RGB_AZURE 0x99, 0xF5, 0xFF +#define RGB_BLACK 0x00, 0x00, 0x00 +#define RGB_BLUE 0x00, 0x00, 0xFF +#define RGB_CHARTREUSE 0x80, 0xFF, 0x00 +#define RGB_CORAL 0xFF, 0x7C, 0x4D +#define RGB_CYAN 0x00, 0xFF, 0xFF +#define RGB_GOLD 0xFF, 0xD9, 0x00 +#define RGB_GOLDENROD 0xD9, 0xA5, 0x21 +#define RGB_GREEN 0x00, 0xFF, 0x00 +#define RGB_MAGENTA 0xFF, 0x00, 0xFF +#define RGB_ORANGE 0xFF, 0x80, 0x00 +#define RGB_PINK 0xFF, 0x80, 0xBF +#define RGB_PURPLE 0x7A, 0x00, 0xFF +#define RGB_RED 0xFF, 0x00, 0x00 +#define RGB_SPRINGGREEN 0x00, 0xFF, 0x80 +#define RGB_TEAL 0x00, 0x80, 0x80 +#define RGB_TURQUOISE 0x47, 0x6E, 0x6A +#define RGB_WHITE 0xFF, 0xFF, 0xFF +#define RGB_YELLOW 0xFF, 0xFF, 0x00 +#define RGB_OFF RGB_BLACK + +/* + * HSV Colors + * + * All values (including hue) are scaled to 0-255 + */ +#define HSV_AZURE 132, 102, 255 +#define HSV_BLACK 0, 0, 0 +#define HSV_BLUE 170, 255, 255 +#define HSV_CHARTREUSE 64, 255, 255 +#define HSV_CORAL 11, 176, 255 +#define HSV_CYAN 128, 255, 255 +#define HSV_GOLD 36, 255, 255 +#define HSV_GOLDENROD 30, 218, 218 +#define HSV_GREEN 85, 255, 255 +#define HSV_MAGENTA 213, 255, 255 +#define HSV_ORANGE 28, 255, 255 +#define HSV_PINK 234, 128, 255 +#define HSV_PURPLE 191, 255, 255 +#define HSV_RED 0, 255, 255 +#define HSV_SPRINGGREEN 106, 255, 255 +#define HSV_TEAL 128, 255, 128 +#define HSV_TURQUOISE 123, 90, 112 +#define HSV_WHITE 0, 0, 255 +#define HSV_YELLOW 43, 255, 255 +#define HSV_OFF HSV_BLACK + +// clang-format on + #if defined(__GNUC__) # define PACKED __attribute__((__packed__)) #else diff --git a/quantum/command.c b/quantum/command.c index 34c4b36b1..2ff640a7b 100644 --- a/quantum/command.c +++ b/quantum/command.c @@ -55,7 +55,6 @@ static bool command_console(uint8_t code); static void command_console_help(void); #if defined(MOUSEKEY_ENABLE) && !defined(MK_3_SPEED) static bool mousekey_console(uint8_t code); -static void mousekey_console_help(void); #endif static void switch_default_layer(uint8_t layer); @@ -103,190 +102,220 @@ bool command_console_extra(uint8_t code) { /*********************************************************** * Command common ***********************************************************/ + static void command_common_help(void) { - print("\n\t- Magic -\n" STR(MAGIC_KEY_DEBUG) ": Debug Message Toggle\n" STR(MAGIC_KEY_DEBUG_MATRIX) ": Matrix Debug Mode Toggle - Show keypresses in matrix grid\n" STR(MAGIC_KEY_DEBUG_KBD) ": Keyboard Debug Toggle - Show keypress report\n" STR(MAGIC_KEY_DEBUG_MOUSE) ": Debug Mouse Toggle\n" STR(MAGIC_KEY_VERSION) ": Version\n" STR(MAGIC_KEY_STATUS) ": Status\n" STR(MAGIC_KEY_CONSOLE) ": Activate Console Mode\n" + print(/* clang-format off */ + "\n\t- Magic -\n" + + STR(MAGIC_KEY_DEBUG) ": Debug Message Toggle\n" + STR(MAGIC_KEY_DEBUG_MATRIX) ": Matrix Debug Mode Toggle" + " - Show keypresses in matrix grid\n" + STR(MAGIC_KEY_DEBUG_KBD) ": Keyboard Debug Toggle" + " - Show keypress report\n" + STR(MAGIC_KEY_DEBUG_MOUSE) ": Debug Mouse Toggle\n" + STR(MAGIC_KEY_VERSION) ": Version\n" + STR(MAGIC_KEY_STATUS) ": Status\n" + STR(MAGIC_KEY_CONSOLE) ": Activate Console Mode\n" #if MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM - STR(MAGIC_KEY_LAYER0) ": Switch to Layer 0\n" STR(MAGIC_KEY_LAYER1) ": Switch to Layer 1\n" STR(MAGIC_KEY_LAYER2) ": Switch to Layer 2\n" STR(MAGIC_KEY_LAYER3) ": Switch to Layer 3\n" STR(MAGIC_KEY_LAYER4) ": Switch to Layer 4\n" STR(MAGIC_KEY_LAYER5) ": Switch to Layer 5\n" STR(MAGIC_KEY_LAYER6) ": Switch to Layer 6\n" STR(MAGIC_KEY_LAYER7) ": Switch to Layer 7\n" STR(MAGIC_KEY_LAYER8) ": Switch to Layer 8\n" STR(MAGIC_KEY_LAYER9) ": Switch to Layer 9\n" + STR(MAGIC_KEY_LAYER0) ": Switch to Layer 0\n" + STR(MAGIC_KEY_LAYER1) ": Switch to Layer 1\n" + STR(MAGIC_KEY_LAYER2) ": Switch to Layer 2\n" + STR(MAGIC_KEY_LAYER3) ": Switch to Layer 3\n" + STR(MAGIC_KEY_LAYER4) ": Switch to Layer 4\n" + STR(MAGIC_KEY_LAYER5) ": Switch to Layer 5\n" + STR(MAGIC_KEY_LAYER6) ": Switch to Layer 6\n" + STR(MAGIC_KEY_LAYER7) ": Switch to Layer 7\n" + STR(MAGIC_KEY_LAYER8) ": Switch to Layer 8\n" + STR(MAGIC_KEY_LAYER9) ": Switch to Layer 9\n" #endif #if MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS - "F1-F10: Switch to Layer 0-9 (F10 = L0)\n" + "F1-F10: Switch to Layer 0-9 (F10 = L0)\n" #endif #if MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS - "0-9: Switch to Layer 0-9\n" + "0-9: Switch to Layer 0-9\n" #endif - STR(MAGIC_KEY_LAYER0_ALT) ": Switch to Layer 0 (alternate)\n" + STR(MAGIC_KEY_LAYER0_ALT) ": Switch to Layer 0 (alternate)\n" - STR(MAGIC_KEY_BOOTLOADER) ": Jump to Bootloader\n" STR(MAGIC_KEY_BOOTLOADER_ALT) ": Jump to Bootloader (alternate)\n" + STR(MAGIC_KEY_BOOTLOADER) ": Jump to Bootloader\n" + STR(MAGIC_KEY_BOOTLOADER_ALT) ": Jump to Bootloader (alternate)\n" #ifdef KEYBOARD_LOCK_ENABLE - STR(MAGIC_KEY_LOCK) ": Lock Keyboard\n" + STR(MAGIC_KEY_LOCK) ": Lock Keyboard\n" #endif - STR(MAGIC_KEY_EEPROM) ": Print EEPROM Settings\n" STR(MAGIC_KEY_EEPROM_CLEAR) ": Clear EEPROM\n" + STR(MAGIC_KEY_EEPROM) ": Print EEPROM Settings\n" + STR(MAGIC_KEY_EEPROM_CLEAR) ": Clear EEPROM\n" #ifdef NKRO_ENABLE - STR(MAGIC_KEY_NKRO) ": NKRO Toggle\n" + STR(MAGIC_KEY_NKRO) ": NKRO Toggle\n" #endif #ifdef SLEEP_LED_ENABLE - STR(MAGIC_KEY_SLEEP_LED) ": Sleep LED Test\n" + STR(MAGIC_KEY_SLEEP_LED) ": Sleep LED Test\n" #endif - ); + ); /* clang-format on */ } static void print_version(void) { - // print version & information - print("\n\t- Version -\n"); - print("VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") " - "PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") " - "VER: " STR(DEVICE_VER) "\n"); - print("BUILD: (" __DATE__ ")\n"); + print(/* clang-format off */ + "\n\t- Version -\n" + "VID: " STR(VENDOR_ID) "(" STR(MANUFACTURER) ") " + "PID: " STR(PRODUCT_ID) "(" STR(PRODUCT) ") " + "VER: " STR(DEVICE_VER) "\n" + "BUILD: (" __DATE__ ")\n" #ifndef SKIP_VERSION # ifdef PROTOCOL_CHIBIOS - print("CHIBIOS: " STR(CHIBIOS_VERSION) ", CONTRIB: " STR(CHIBIOS_CONTRIB_VERSION) "\n"); + "CHIBIOS: " STR(CHIBIOS_VERSION) + ", CONTRIB: " STR(CHIBIOS_CONTRIB_VERSION) "\n" # endif #endif /* build options */ - print("OPTIONS:" + "OPTIONS:" #ifdef PROTOCOL_LUFA - " LUFA" + " LUFA" #endif #ifdef PROTOCOL_VUSB - " VUSB" + " VUSB" #endif #ifdef BOOTMAGIC_ENABLE - " BOOTMAGIC" + " BOOTMAGIC" #endif #ifdef MOUSEKEY_ENABLE - " MOUSEKEY" + " MOUSEKEY" #endif #ifdef EXTRAKEY_ENABLE - " EXTRAKEY" + " EXTRAKEY" #endif #ifdef CONSOLE_ENABLE - " CONSOLE" + " CONSOLE" #endif #ifdef COMMAND_ENABLE - " COMMAND" + " COMMAND" #endif #ifdef NKRO_ENABLE - " NKRO" + " NKRO" #endif #ifdef LTO_ENABLE - " LTO" + " LTO" #endif - " " STR(BOOTLOADER_SIZE) "\n"); + " " STR(BOOTLOADER_SIZE) "\n" - print("GCC: " STR(__GNUC__) "." STR(__GNUC_MINOR__) "." STR(__GNUC_PATCHLEVEL__) + "GCC: " STR(__GNUC__) + "." STR(__GNUC_MINOR__) + "." STR(__GNUC_PATCHLEVEL__) #if defined(__AVR__) - " AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ " AVR_ARCH: avr" STR(__AVR_ARCH__) + " AVR-LIBC: " __AVR_LIBC_VERSION_STRING__ + " AVR_ARCH: avr" STR(__AVR_ARCH__) #endif - "\n"); - - return; + "\n" + ); /* clang-format on */ } static void print_status(void) { - print("\n\t- Status -\n"); + xprintf(/* clang-format off */ + "\n\t- Status -\n" - print_val_hex8(host_keyboard_leds()); + "host_keyboard_leds(): %02X\n" #ifndef PROTOCOL_VUSB - // these aren't set on the V-USB protocol, so we just ignore them for now - print_val_hex8(keyboard_protocol); - print_val_hex8(keyboard_idle); + "keyboard_protocol: %02X\n" + "keyboard_idle: %02X\n" #endif #ifdef NKRO_ENABLE - print_val_hex8(keymap_config.nkro); + "keymap_config.nkro: %02X\n" #endif - print_val_hex32(timer_read32()); - return; + "timer_read32(): %08lX\n" + + , host_keyboard_leds() +#ifndef PROTOCOL_VUSB + /* these aren't set on the V-USB protocol, so we just ignore them for now */ + , keyboard_protocol + , keyboard_idle +#endif +#ifdef NKRO_ENABLE + , keymap_config.nkro +#endif + , timer_read32() + + ); /* clang-format on */ } -static void print_eeconfig(void) { -// Print these variables if NO_PRINT or USER_PRINT are not defined. #if !defined(NO_PRINT) && !defined(USER_PRINT) - - print("default_layer: "); - print_dec(eeconfig_read_default_layer()); - print("\n"); +static void print_eeconfig(void) { + xprintf("eeconfig:\ndefault_layer: %u\n", eeconfig_read_default_layer()); debug_config_t dc; dc.raw = eeconfig_read_debug(); - print("debug_config.raw: "); - print_hex8(dc.raw); - print("\n"); - print(".enable: "); - print_dec(dc.enable); - print("\n"); - print(".matrix: "); - print_dec(dc.matrix); - print("\n"); - print(".keyboard: "); - print_dec(dc.keyboard); - print("\n"); - print(".mouse: "); - print_dec(dc.mouse); - print("\n"); + xprintf(/* clang-format off */ + + "debug_config.raw: %02X\n" + ".enable: %u\n" + ".matrix: %u\n" + ".keyboard: %u\n" + ".mouse: %u\n" + + , dc.raw + , dc.enable + , dc.matrix + , dc.keyboard + , dc.mouse + ); /* clang-format on */ keymap_config_t kc; kc.raw = eeconfig_read_keymap(); - print("keymap_config.raw: "); - print_hex8(kc.raw); - print("\n"); - print(".swap_control_capslock: "); - print_dec(kc.swap_control_capslock); - print("\n"); - print(".capslock_to_control: "); - print_dec(kc.capslock_to_control); - print("\n"); - print(".swap_lctl_lgui: "); - print_dec(kc.swap_lctl_lgui); - print("\n"); - print(".swap_rctl_rgui: "); - print_dec(kc.swap_rctl_rgui); - print("\n"); - print(".swap_lalt_lgui: "); - print_dec(kc.swap_lalt_lgui); - print("\n"); - print(".swap_ralt_rgui: "); - print_dec(kc.swap_ralt_rgui); - print("\n"); - print(".no_gui: "); - print_dec(kc.no_gui); - print("\n"); - print(".swap_grave_esc: "); - print_dec(kc.swap_grave_esc); - print("\n"); - print(".swap_backslash_backspace: "); - print_dec(kc.swap_backslash_backspace); - print("\n"); - print(".nkro: "); - print_dec(kc.nkro); - print("\n"); + xprintf(/* clang-format off */ + + "keymap_config.raw: %02X\n" + ".swap_control_capslock: %u\n" + ".capslock_to_control: %u\n" + ".swap_lctl_lgui: %u\n" + ".swap_rctl_rgui: %u\n" + ".swap_lalt_lgui: %u\n" + ".swap_ralt_rgui: %u\n" + ".no_gui: %u\n" + ".swap_grave_esc: %u\n" + ".swap_backslash_backspace: %u\n" + ".nkro: %u\n" + + , kc.raw + , kc.swap_control_capslock + , kc.capslock_to_control + , kc.swap_lctl_lgui + , kc.swap_rctl_rgui + , kc.swap_lalt_lgui + , kc.swap_ralt_rgui + , kc.no_gui + , kc.swap_grave_esc + , kc.swap_backslash_backspace + , kc.nkro + ); /* clang-format on */ # ifdef BACKLIGHT_ENABLE + backlight_config_t bc; bc.raw = eeconfig_read_backlight(); - print("backlight_config.raw: "); - print_hex8(bc.raw); - print("\n"); - print(".enable: "); - print_dec(bc.enable); - print("\n"); - print(".level: "); - print_dec(bc.level); - print("\n"); -# endif /* BACKLIGHT_ENABLE */ + xprintf(/* clang-format off */ + "backlight_config" -#endif /* !NO_PRINT */ + ".raw: %02X\n" + ".enable: %u\n" + ".level: %u\n" + + , bc.raw + , bc.enable + , bc.level + + ); /* clang-format on */ + +# endif /* BACKLIGHT_ENABLE */ } +#endif /* !NO_PRINT && !USER_PRINT */ static bool command_common(uint8_t code) { #ifdef KEYBOARD_LOCK_ENABLE @@ -306,8 +335,9 @@ static bool command_common(uint8_t code) { // print stored eeprom config case MAGIC_KC(MAGIC_KEY_EEPROM): - print("eeconfig:\n"); +#if !defined(NO_PRINT) && !defined(USER_PRINT) print_eeconfig(); +#endif /* !NO_PRINT && !USER_PRINT */ break; // clear eeprom @@ -519,268 +549,199 @@ static bool command_console(uint8_t code) { case KC_H: case KC_SLASH: /* ? */ command_console_help(); - break; + print("C> "); + return true; case KC_Q: case KC_ESC: command_state = ONESHOT; return false; -#if defined(MOUSEKEY_ENABLE) && !defined(MK_3_SPEED) +#if defined(MOUSEKEY_ENABLE) case KC_M: - mousekey_console_help(); - print("M> "); command_state = MOUSEKEY; + mousekey_console(KC_SLASH /* ? */); return true; #endif default: print("?"); return false; } - print("C> "); - return true; } -#if defined(MOUSEKEY_ENABLE) && !defined(MK_3_SPEED) /*********************************************************** * Mousekey console ***********************************************************/ -static uint8_t mousekey_param = 0; -static void mousekey_param_print(void) { -// Print these variables if NO_PRINT or USER_PRINT are not defined. +#if defined(MOUSEKEY_ENABLE) + # if !defined(NO_PRINT) && !defined(USER_PRINT) - print("\n\t- Values -\n"); - print("1: delay(*10ms): "); - print_dec(mk_delay); - print("\n"); - print("2: interval(ms): "); - print_dec(mk_interval); - print("\n"); - print("3: max_speed: "); - print_dec(mk_max_speed); - print("\n"); - print("4: time_to_max: "); - print_dec(mk_time_to_max); - print("\n"); - print("5: wheel_max_speed: "); - print_dec(mk_wheel_max_speed); - print("\n"); - print("6: wheel_time_to_max: "); - print_dec(mk_wheel_time_to_max); - print("\n"); -# endif /* !NO_PRINT */ -} +static void mousekey_param_print(void) { + xprintf(/* clang-format off */ -//#define PRINT_SET_VAL(v) print(#v " = "); print_dec(v); print("\n"); -# define PRINT_SET_VAL(v) xprintf(# v " = %d\n", (v)) -static void mousekey_param_inc(uint8_t param, uint8_t inc) { - switch (param) { - case 1: - if (mk_delay + inc < UINT8_MAX) - mk_delay += inc; - else - mk_delay = UINT8_MAX; - PRINT_SET_VAL(mk_delay); - break; - case 2: - if (mk_interval + inc < UINT8_MAX) - mk_interval += inc; - else - mk_interval = UINT8_MAX; - PRINT_SET_VAL(mk_interval); - break; - case 3: - if (mk_max_speed + inc < UINT8_MAX) - mk_max_speed += inc; - else - mk_max_speed = UINT8_MAX; - PRINT_SET_VAL(mk_max_speed); - break; - case 4: - if (mk_time_to_max + inc < UINT8_MAX) - mk_time_to_max += inc; - else - mk_time_to_max = UINT8_MAX; - PRINT_SET_VAL(mk_time_to_max); - break; - case 5: - if (mk_wheel_max_speed + inc < UINT8_MAX) - mk_wheel_max_speed += inc; - else - mk_wheel_max_speed = UINT8_MAX; - PRINT_SET_VAL(mk_wheel_max_speed); - break; - case 6: - if (mk_wheel_time_to_max + inc < UINT8_MAX) - mk_wheel_time_to_max += inc; - else - mk_wheel_time_to_max = UINT8_MAX; - PRINT_SET_VAL(mk_wheel_time_to_max); - break; - } -} +#ifndef MK_3_SPEED + "1: delay(*10ms): %u\n" + "2: interval(ms): %u\n" + "3: max_speed: %u\n" + "4: time_to_max: %u\n" + "5: wheel_max_speed: %u\n" + "6: wheel_time_to_max: %u\n" -static void mousekey_param_dec(uint8_t param, uint8_t dec) { - switch (param) { - case 1: - if (mk_delay > dec) - mk_delay -= dec; - else - mk_delay = 0; - PRINT_SET_VAL(mk_delay); - break; - case 2: - if (mk_interval > dec) - mk_interval -= dec; - else - mk_interval = 0; - PRINT_SET_VAL(mk_interval); - break; - case 3: - if (mk_max_speed > dec) - mk_max_speed -= dec; - else - mk_max_speed = 0; - PRINT_SET_VAL(mk_max_speed); - break; - case 4: - if (mk_time_to_max > dec) - mk_time_to_max -= dec; - else - mk_time_to_max = 0; - PRINT_SET_VAL(mk_time_to_max); - break; - case 5: - if (mk_wheel_max_speed > dec) - mk_wheel_max_speed -= dec; - else - mk_wheel_max_speed = 0; - PRINT_SET_VAL(mk_wheel_max_speed); - break; - case 6: - if (mk_wheel_time_to_max > dec) - mk_wheel_time_to_max -= dec; - else - mk_wheel_time_to_max = 0; - PRINT_SET_VAL(mk_wheel_time_to_max); - break; - } -} + , mk_delay + , mk_interval + , mk_max_speed + , mk_time_to_max + , mk_wheel_max_speed + , mk_wheel_time_to_max +#else + "no knobs sorry\n" +#endif + ); /* clang-format on */ +} +# endif /* !NO_PRINT && !USER_PRINT */ + +# if !defined(NO_PRINT) && !defined(USER_PRINT) static void mousekey_console_help(void) { - print("\n\t- Mousekey -\n" - "ESC/q: quit\n" - "1: delay(*10ms)\n" - "2: interval(ms)\n" - "3: max_speed\n" - "4: time_to_max\n" - "5: wheel_max_speed\n" - "6: wheel_time_to_max\n" - "\n" - "p: print values\n" - "d: set defaults\n" - "up: +1\n" - "down: -1\n" - "pgup: +10\n" - "pgdown: -10\n" - "\n" - "speed = delta * max_speed * (repeat / time_to_max)\n"); - xprintf("where delta: cursor=%d, wheel=%d\n" - "See http://en.wikipedia.org/wiki/Mouse_keys\n", - MOUSEKEY_MOVE_DELTA, MOUSEKEY_WHEEL_DELTA); -} + mousekey_param_print(); + xprintf(/* clang-format off */ + "p: print values\n" + "d: set defaults\n" + "up: +1\n" + "dn: -1\n" + "lt: +10\n" + "rt: -10\n" + "ESC/q: quit\n" + +#ifndef MK_3_SPEED + "\n" + "speed = delta * max_speed * (repeat / time_to_max)\n" + "where delta: cursor=%d, wheel=%d\n" + "See http://en.wikipedia.org/wiki/Mouse_keys\n" + , MOUSEKEY_MOVE_DELTA, MOUSEKEY_WHEEL_DELTA +#endif + + ); /* clang-format on */ +} +# endif /* !NO_PRINT && !USER_PRINT */ + +/* Only used by `quantum/command.c` / `command_proc()`. To avoid + * any doubt: we return `false` to return to the main console, + * which differs from the `bool` that `command_proc()` returns. */ +bool mousekey_console(uint8_t code) { + static uint8_t param = 0; + static uint8_t *pp = NULL; + static char * desc = NULL; + +# if defined(NO_PRINT) || defined(USER_PRINT) /* -Wunused-parameter */ + (void)desc; +# endif + + int8_t change = 0; -static bool mousekey_console(uint8_t code) { switch (code) { case KC_H: case KC_SLASH: /* ? */ +# if !defined(NO_PRINT) && !defined(USER_PRINT) + print("\n\t- Mousekey -\n"); mousekey_console_help(); +# endif break; + case KC_Q: case KC_ESC: - if (mousekey_param) { - mousekey_param = 0; - } else { - print("C> "); - command_state = CONSOLE; - return false; - } + print("q\n"); + if (!param) return false; + param = 0; + pp = NULL; + desc = NULL; break; + case KC_P: +# if !defined(NO_PRINT) && !defined(USER_PRINT) + print("\n\t- Values -\n"); mousekey_param_print(); +# endif break; - case KC_1: - case KC_2: - case KC_3: - case KC_4: - case KC_5: - case KC_6: - mousekey_param = numkey2num(code); - break; - case KC_UP: - mousekey_param_inc(mousekey_param, 1); - break; - case KC_DOWN: - mousekey_param_dec(mousekey_param, 1); - break; - case KC_PGUP: - mousekey_param_inc(mousekey_param, 10); - break; - case KC_PGDN: - mousekey_param_dec(mousekey_param, 10); + + case KC_1 ... KC_0: /* KC_0 gives param = 10 */ + param = 1 + code - KC_1; + switch (param) { /* clang-format off */ +# define PARAM(n, v) case n: pp = &(v); desc = #v; break + +#ifndef MK_3_SPEED + PARAM(1, mk_delay); + PARAM(2, mk_interval); + PARAM(3, mk_max_speed); + PARAM(4, mk_time_to_max); + PARAM(5, mk_wheel_max_speed); + PARAM(6, mk_wheel_time_to_max); +#endif /* MK_3_SPEED */ + +# undef PARAM + default: + param = 0; + print("?\n"); + break; + } /* clang-format on */ + if (param) xprintf("%u\n", param); break; + + /* clang-format off */ + case KC_UP: change = +1; break; + case KC_DOWN: change = -1; break; + case KC_LEFT: change = -10; break; + case KC_RIGHT: change = +10; break; + /* clang-format on */ + case KC_D: + +# ifndef MK_3_SPEED mk_delay = MOUSEKEY_DELAY / 10; mk_interval = MOUSEKEY_INTERVAL; mk_max_speed = MOUSEKEY_MAX_SPEED; mk_time_to_max = MOUSEKEY_TIME_TO_MAX; mk_wheel_max_speed = MOUSEKEY_WHEEL_MAX_SPEED; mk_wheel_time_to_max = MOUSEKEY_WHEEL_TIME_TO_MAX; - print("set default\n"); +# endif /* MK_3_SPEED */ + + print("defaults\n"); break; + default: - print("?"); - return false; + print("?\n"); + break; } - if (mousekey_param) { - xprintf("M%d> ", mousekey_param); + + if (change) { + if (pp) { + int16_t val = *pp + change; + if (val > (int16_t)UINT8_MAX) + *pp = UINT8_MAX; + else if (val < 0) + *pp = 0; + else + *pp = (uint8_t)val; + xprintf("= %u\n", *pp); + } else { + print("?\n"); + } + } + + if (param) { + xprintf("M%u:%s> ", param, desc ? desc : "???"); } else { - print("M>"); + print("M> "); } return true; } -#endif + +#endif /* MOUSEKEY_ENABLE */ /*********************************************************** * Utilities ***********************************************************/ -uint8_t numkey2num(uint8_t code) { - switch (code) { - case KC_1: - return 1; - case KC_2: - return 2; - case KC_3: - return 3; - case KC_4: - return 4; - case KC_5: - return 5; - case KC_6: - return 6; - case KC_7: - return 7; - case KC_8: - return 8; - case KC_9: - return 9; - case KC_0: - return 0; - } - return 0; -} static void switch_default_layer(uint8_t layer) { xprintf("L%d\n", layer); - default_layer_set(1UL << layer); + default_layer_set((layer_state_t)1 << layer); clear_keyboard(); } diff --git a/quantum/command.h b/quantum/command.h index 4f77be085..676507d3b 100644 --- a/quantum/command.h +++ b/quantum/command.h @@ -28,8 +28,7 @@ bool command_extra(uint8_t code); bool command_console_extra(uint8_t code); #ifdef COMMAND_ENABLE -uint8_t numkey2num(uint8_t code); -bool command_proc(uint8_t code); +bool command_proc(uint8_t code); #else # define command_proc(code) false #endif diff --git a/quantum/crc.c b/quantum/crc.c new file mode 100644 index 000000000..0d8b9d601 --- /dev/null +++ b/quantum/crc.c @@ -0,0 +1,59 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "crc.h" + +__attribute__((weak)) void crc_init(void){ + /* Software implementation nothing todo here. */ +}; + +#if defined(CRC8_USE_TABLE) +/** + * Static table used for the table_driven implementation. + */ +static const crc_t crc_table[256] = {0x00, 0x07, 0x0e, 0x09, 0x1c, 0x1b, 0x12, 0x15, 0x38, 0x3f, 0x36, 0x31, 0x24, 0x23, 0x2a, 0x2d, 0x70, 0x77, 0x7e, 0x79, 0x6c, 0x6b, 0x62, 0x65, 0x48, 0x4f, 0x46, 0x41, 0x54, 0x53, 0x5a, 0x5d, 0xe0, 0xe7, 0xee, 0xe9, 0xfc, 0xfb, 0xf2, 0xf5, 0xd8, 0xdf, 0xd6, 0xd1, 0xc4, 0xc3, 0xca, 0xcd, 0x90, 0x97, 0x9e, 0x99, 0x8c, 0x8b, 0x82, 0x85, 0xa8, 0xaf, 0xa6, 0xa1, 0xb4, 0xb3, 0xba, 0xbd, 0xc7, 0xc0, 0xc9, 0xce, 0xdb, 0xdc, 0xd5, 0xd2, 0xff, 0xf8, 0xf1, 0xf6, 0xe3, 0xe4, 0xed, 0xea, 0xb7, 0xb0, 0xb9, 0xbe, 0xab, 0xac, 0xa5, 0xa2, 0x8f, 0x88, 0x81, 0x86, 0x93, 0x94, 0x9d, 0x9a, 0x27, 0x20, 0x29, 0x2e, 0x3b, 0x3c, 0x35, 0x32, 0x1f, 0x18, 0x11, 0x16, 0x03, 0x04, 0x0d, 0x0a, 0x57, 0x50, 0x59, 0x5e, 0x4b, 0x4c, 0x45, 0x42, 0x6f, 0x68, 0x61, 0x66, 0x73, 0x74, 0x7d, 0x7a, + 0x89, 0x8e, 0x87, 0x80, 0x95, 0x92, 0x9b, 0x9c, 0xb1, 0xb6, 0xbf, 0xb8, 0xad, 0xaa, 0xa3, 0xa4, 0xf9, 0xfe, 0xf7, 0xf0, 0xe5, 0xe2, 0xeb, 0xec, 0xc1, 0xc6, 0xcf, 0xc8, 0xdd, 0xda, 0xd3, 0xd4, 0x69, 0x6e, 0x67, 0x60, 0x75, 0x72, 0x7b, 0x7c, 0x51, 0x56, 0x5f, 0x58, 0x4d, 0x4a, 0x43, 0x44, 0x19, 0x1e, 0x17, 0x10, 0x05, 0x02, 0x0b, 0x0c, 0x21, 0x26, 0x2f, 0x28, 0x3d, 0x3a, 0x33, 0x34, 0x4e, 0x49, 0x40, 0x47, 0x52, 0x55, 0x5c, 0x5b, 0x76, 0x71, 0x78, 0x7f, 0x6a, 0x6d, 0x64, 0x63, 0x3e, 0x39, 0x30, 0x37, 0x22, 0x25, 0x2c, 0x2b, 0x06, 0x01, 0x08, 0x0f, 0x1a, 0x1d, 0x14, 0x13, 0xae, 0xa9, 0xa0, 0xa7, 0xb2, 0xb5, 0xbc, 0xbb, 0x96, 0x91, 0x98, 0x9f, 0x8a, 0x8d, 0x84, 0x83, 0xde, 0xd9, 0xd0, 0xd7, 0xc2, 0xc5, 0xcc, 0xcb, 0xe6, 0xe1, 0xe8, 0xef, 0xfa, 0xfd, 0xf4, 0xf3}; + +__attribute__((weak)) uint8_t crc8(const void *data, size_t data_len) { + const uint8_t *d = (const uint8_t *)data; + crc_t crc = 0xff; + size_t tbl_idx; + + while (data_len--) { + tbl_idx = crc ^ *d; + crc = crc_table[tbl_idx] & 0xff; + d++; + } + return crc & 0xff; +} +#else +__attribute__((weak)) uint8_t crc8(const void *data, size_t data_len) { + const uint8_t *d = (const uint8_t *)data; + crc_t crc = 0xff; + size_t i, j; + + for (i = 0; i < data_len; i++) { + crc ^= d[i]; + for (j = 0; j < 8; j++) { + if ((crc & 0x80) != 0) + crc = (crc_t)((crc << 1) ^ 0x31); + else + crc <<= 1; + } + } + return crc; +} +#endif \ No newline at end of file diff --git a/quantum/crc.h b/quantum/crc.h new file mode 100644 index 000000000..c17f5888e --- /dev/null +++ b/quantum/crc.h @@ -0,0 +1,44 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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" + +/** + * The type of the CRC values. + * + * This type must be big enough to contain at least 8 bits. + */ +#if defined(CRC8_OPTIMIZE_SPEED) +typedef uint_fast8_t crc_t; +#else +typedef uint_least8_t crc_t; +#endif + +/** + * Initialize crc subsystem. + */ +__attribute__((weak)) void crc_init(void); + +/** + * Generate CRC8 value from given data. + * + * \param[in] data Pointer to a buffer of \a data_len bytes. + * \param[in] data_len Number of bytes in the \a data buffer. + * \return The calculated crc value. + */ +__attribute__((weak)) uint8_t crc8(const void *data, size_t data_len); \ No newline at end of file diff --git a/quantum/debounce.h b/quantum/debounce.h index 9ca05c682..504386828 100644 --- a/quantum/debounce.h +++ b/quantum/debounce.h @@ -9,3 +9,5 @@ void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool bool debounce_active(void); void debounce_init(uint8_t num_rows); + +void debounce_free(void); diff --git a/quantum/debounce/asym_eager_defer_pk.c b/quantum/debounce/asym_eager_defer_pk.c new file mode 100644 index 000000000..24380dc5e --- /dev/null +++ b/quantum/debounce/asym_eager_defer_pk.c @@ -0,0 +1,171 @@ +/* + * Copyright 2017 Alex Ong + * Copyright 2020 Andrei Purdea + * Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/* +Basic symmetric per-key algorithm. Uses an 8-bit counter per key. +When no state changes have occured for DEBOUNCE milliseconds, we push the state. +*/ + +#include "matrix.h" +#include "timer.h" +#include "quantum.h" +#include + +#ifdef PROTOCOL_CHIBIOS +# if CH_CFG_USE_MEMCORE == FALSE +# error ChibiOS is configured without a memory allocator. Your keyboard may have set `#define CH_CFG_USE_MEMCORE FALSE`, which is incompatible with this debounce algorithm. +# endif +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +// Maximum debounce: 127ms +#if DEBOUNCE > 127 +# undef DEBOUNCE +# define DEBOUNCE 127 +#endif + +#define ROW_SHIFTER ((matrix_row_t)1) + +typedef struct { + bool pressed : 1; + uint8_t time : 7; +} debounce_counter_t; + +#if DEBOUNCE > 0 +static debounce_counter_t *debounce_counters; +static fast_timer_t last_time; +static bool counters_need_update; +static bool matrix_need_update; + +#define DEBOUNCE_ELAPSED 0 + +static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time); +static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows); + +// we use num_rows rather than MATRIX_ROWS to support split keyboards +void debounce_init(uint8_t num_rows) { + debounce_counters = malloc(num_rows * MATRIX_COLS * sizeof(debounce_counter_t)); + int i = 0; + for (uint8_t r = 0; r < num_rows; r++) { + for (uint8_t c = 0; c < MATRIX_COLS; c++) { + debounce_counters[i++].time = DEBOUNCE_ELAPSED; + } + } +} + +void debounce_free(void) { + free(debounce_counters); + debounce_counters = NULL; +} + +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { + bool updated_last = false; + + if (counters_need_update) { + fast_timer_t now = timer_read_fast(); + fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time); + + last_time = now; + updated_last = true; + if (elapsed_time > UINT8_MAX) { + elapsed_time = UINT8_MAX; + } + + if (elapsed_time > 0) { + update_debounce_counters_and_transfer_if_expired(raw, cooked, num_rows, elapsed_time); + } + } + + if (changed || matrix_need_update) { + if (!updated_last) { + last_time = timer_read_fast(); + } + + transfer_matrix_values(raw, cooked, num_rows); + } +} + +static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time) { + debounce_counter_t *debounce_pointer = debounce_counters; + + counters_need_update = false; + matrix_need_update = false; + + for (uint8_t row = 0; row < num_rows; row++) { + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + matrix_row_t col_mask = (ROW_SHIFTER << col); + + if (debounce_pointer->time != DEBOUNCE_ELAPSED) { + if (debounce_pointer->time <= elapsed_time) { + debounce_pointer->time = DEBOUNCE_ELAPSED; + + if (debounce_pointer->pressed) { + // key-down: eager + matrix_need_update = true; + } else { + // key-up: defer + cooked[row] = (cooked[row] & ~col_mask) | (raw[row] & col_mask); + } + } else { + debounce_pointer->time -= elapsed_time; + counters_need_update = true; + } + } + debounce_pointer++; + } + } +} + +static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) { + debounce_counter_t *debounce_pointer = debounce_counters; + + for (uint8_t row = 0; row < num_rows; row++) { + matrix_row_t delta = raw[row] ^ cooked[row]; + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + matrix_row_t col_mask = (ROW_SHIFTER << col); + + if (delta & col_mask) { + if (debounce_pointer->time == DEBOUNCE_ELAPSED) { + debounce_pointer->pressed = (raw[row] & col_mask); + debounce_pointer->time = DEBOUNCE; + counters_need_update = true; + + if (debounce_pointer->pressed) { + // key-down: eager + cooked[row] ^= col_mask; + } + } + } else if (debounce_pointer->time != DEBOUNCE_ELAPSED) { + if (!debounce_pointer->pressed) { + // key-up: defer + debounce_pointer->time = DEBOUNCE_ELAPSED; + } + } + debounce_pointer++; + } + } +} + +bool debounce_active(void) { return true; } +#else +# include "none.c" +#endif diff --git a/quantum/debounce/none.c b/quantum/debounce/none.c new file mode 100644 index 000000000..b03892bc5 --- /dev/null +++ b/quantum/debounce/none.c @@ -0,0 +1,31 @@ +/* Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "matrix.h" +#include "quantum.h" +#include + +void debounce_init(uint8_t num_rows) {} + +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { + for (int i = 0; i < num_rows; i++) { + cooked[i] = raw[i]; + } +} + +bool debounce_active(void) { return false; } + +void debounce_free(void) {} diff --git a/quantum/debounce/sym_defer_g.c b/quantum/debounce/sym_defer_g.c index 3ed9055d2..fbefd55ed 100644 --- a/quantum/debounce/sym_defer_g.c +++ b/quantum/debounce/sym_defer_g.c @@ -1,5 +1,6 @@ /* Copyright 2017 Alex Ong +Copyright 2021 Simon Arlott This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or @@ -23,30 +24,29 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state. # define DEBOUNCE 5 #endif -void debounce_init(uint8_t num_rows) {} -static bool debouncing = false; - #if DEBOUNCE > 0 -static uint16_t debouncing_time; -void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { +static bool debouncing = false; +static fast_timer_t debouncing_time; + +void debounce_init(uint8_t num_rows) {} + +void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { if (changed) { debouncing = true; - debouncing_time = timer_read(); + debouncing_time = timer_read_fast(); } - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { + if (debouncing && timer_elapsed_fast(debouncing_time) >= DEBOUNCE) { for (int i = 0; i < num_rows; i++) { cooked[i] = raw[i]; } debouncing = false; } } -#else // no debouncing. -void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - for (int i = 0; i < num_rows; i++) { - cooked[i] = raw[i]; - } -} -#endif bool debounce_active(void) { return debouncing; } + +void debounce_free(void) {} +#else // no debouncing. +# include "none.c" +#endif diff --git a/quantum/debounce/sym_defer_pk.c b/quantum/debounce/sym_defer_pk.c index 60513f98e..626a9be84 100644 --- a/quantum/debounce/sym_defer_pk.c +++ b/quantum/debounce/sym_defer_pk.c @@ -1,6 +1,7 @@ /* Copyright 2017 Alex Ong Copyright 2020 Andrei Purdea +Copyright 2021 Simon Arlott This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or @@ -33,28 +34,25 @@ When no state changes have occured for DEBOUNCE milliseconds, we push the state. # define DEBOUNCE 5 #endif +// Maximum debounce: 255ms +#if DEBOUNCE > UINT8_MAX +# undef DEBOUNCE +# define DEBOUNCE UINT8_MAX +#endif + #define ROW_SHIFTER ((matrix_row_t)1) -#define debounce_counter_t uint8_t +typedef uint8_t debounce_counter_t; +#if DEBOUNCE > 0 static debounce_counter_t *debounce_counters; +static fast_timer_t last_time; static bool counters_need_update; -#define DEBOUNCE_ELAPSED 251 -#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) +#define DEBOUNCE_ELAPSED 0 -static uint8_t wrapping_timer_read(void) { - static uint16_t time = 0; - static uint8_t last_result = 0; - uint16_t new_time = timer_read(); - uint16_t diff = new_time - time; - time = new_time; - last_result = (last_result + diff) % (MAX_DEBOUNCE + 1); - return last_result; -} - -void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time); -void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time); +static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time); +static void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows); // we use num_rows rather than MATRIX_ROWS to support split keyboards void debounce_init(uint8_t num_rows) { @@ -67,27 +65,49 @@ void debounce_init(uint8_t num_rows) { } } +void debounce_free(void) { + free(debounce_counters); + debounce_counters = NULL; +} + void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - uint8_t current_time = wrapping_timer_read(); + bool updated_last = false; + if (counters_need_update) { - update_debounce_counters_and_transfer_if_expired(raw, cooked, num_rows, current_time); + fast_timer_t now = timer_read_fast(); + fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time); + + last_time = now; + updated_last = true; + if (elapsed_time > UINT8_MAX) { + elapsed_time = UINT8_MAX; + } + + if (elapsed_time > 0) { + update_debounce_counters_and_transfer_if_expired(raw, cooked, num_rows, elapsed_time); + } } if (changed) { - start_debounce_counters(raw, cooked, num_rows, current_time); + if (!updated_last) { + last_time = timer_read_fast(); + } + + start_debounce_counters(raw, cooked, num_rows); } } -void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) { +static void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t elapsed_time) { counters_need_update = false; debounce_counter_t *debounce_pointer = debounce_counters; for (uint8_t row = 0; row < num_rows; row++) { for (uint8_t col = 0; col < MATRIX_COLS; col++) { if (*debounce_pointer != DEBOUNCE_ELAPSED) { - if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) { + if (*debounce_pointer <= elapsed_time) { *debounce_pointer = DEBOUNCE_ELAPSED; cooked[row] = (cooked[row] & ~(ROW_SHIFTER << col)) | (raw[row] & (ROW_SHIFTER << col)); } else { + *debounce_pointer -= elapsed_time; counters_need_update = true; } } @@ -96,14 +116,14 @@ void update_debounce_counters_and_transfer_if_expired(matrix_row_t raw[], matrix } } -void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) { +static void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) { debounce_counter_t *debounce_pointer = debounce_counters; for (uint8_t row = 0; row < num_rows; row++) { matrix_row_t delta = raw[row] ^ cooked[row]; for (uint8_t col = 0; col < MATRIX_COLS; col++) { if (delta & (ROW_SHIFTER << col)) { if (*debounce_pointer == DEBOUNCE_ELAPSED) { - *debounce_pointer = current_time; + *debounce_pointer = DEBOUNCE; counters_need_update = true; } } else { @@ -115,3 +135,6 @@ void start_debounce_counters(matrix_row_t raw[], matrix_row_t cooked[], uint8_t } bool debounce_active(void) { return true; } +#else +# include "none.c" +#endif diff --git a/quantum/debounce/sym_eager_pk.c b/quantum/debounce/sym_eager_pk.c index e66cf92d7..15a3242e6 100644 --- a/quantum/debounce/sym_eager_pk.c +++ b/quantum/debounce/sym_eager_pk.c @@ -1,5 +1,6 @@ /* Copyright 2017 Alex Ong +Copyright 2021 Simon Arlott This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or @@ -33,29 +34,26 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred. # define DEBOUNCE 5 #endif +// Maximum debounce: 255ms +#if DEBOUNCE > UINT8_MAX +# undef DEBOUNCE +# define DEBOUNCE UINT8_MAX +#endif + #define ROW_SHIFTER ((matrix_row_t)1) -#define debounce_counter_t uint8_t +typedef uint8_t debounce_counter_t; +#if DEBOUNCE > 0 static debounce_counter_t *debounce_counters; +static fast_timer_t last_time; static bool counters_need_update; static bool matrix_need_update; -#define DEBOUNCE_ELAPSED 251 -#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) +#define DEBOUNCE_ELAPSED 0 -static uint8_t wrapping_timer_read(void) { - static uint16_t time = 0; - static uint8_t last_result = 0; - uint16_t new_time = timer_read(); - uint16_t diff = new_time - time; - time = new_time; - last_result = (last_result + diff) % (MAX_DEBOUNCE + 1); - return last_result; -} - -void update_debounce_counters(uint8_t num_rows, uint8_t current_time); -void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time); +static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time); +static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows); // we use num_rows rather than MATRIX_ROWS to support split keyboards void debounce_init(uint8_t num_rows) { @@ -68,27 +66,51 @@ void debounce_init(uint8_t num_rows) { } } +void debounce_free(void) { + free(debounce_counters); + debounce_counters = NULL; +} + void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - uint8_t current_time = wrapping_timer_read(); + bool updated_last = false; + if (counters_need_update) { - update_debounce_counters(num_rows, current_time); + fast_timer_t now = timer_read_fast(); + fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time); + + last_time = now; + updated_last = true; + if (elapsed_time > UINT8_MAX) { + elapsed_time = UINT8_MAX; + } + + if (elapsed_time > 0) { + update_debounce_counters(num_rows, elapsed_time); + } } if (changed || matrix_need_update) { - transfer_matrix_values(raw, cooked, num_rows, current_time); + if (!updated_last) { + last_time = timer_read_fast(); + } + + transfer_matrix_values(raw, cooked, num_rows); } } // If the current time is > debounce counter, set the counter to enable input. -void update_debounce_counters(uint8_t num_rows, uint8_t current_time) { +static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time) { counters_need_update = false; + matrix_need_update = false; debounce_counter_t *debounce_pointer = debounce_counters; for (uint8_t row = 0; row < num_rows; row++) { for (uint8_t col = 0; col < MATRIX_COLS; col++) { if (*debounce_pointer != DEBOUNCE_ELAPSED) { - if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) { + if (*debounce_pointer <= elapsed_time) { *debounce_pointer = DEBOUNCE_ELAPSED; + matrix_need_update = true; } else { + *debounce_pointer -= elapsed_time; counters_need_update = true; } } @@ -98,8 +120,7 @@ void update_debounce_counters(uint8_t num_rows, uint8_t current_time) { } // upload from raw_matrix to final matrix; -void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) { - matrix_need_update = false; +static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) { debounce_counter_t *debounce_pointer = debounce_counters; for (uint8_t row = 0; row < num_rows; row++) { matrix_row_t delta = raw[row] ^ cooked[row]; @@ -108,11 +129,9 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n matrix_row_t col_mask = (ROW_SHIFTER << col); if (delta & col_mask) { if (*debounce_pointer == DEBOUNCE_ELAPSED) { - *debounce_pointer = current_time; + *debounce_pointer = DEBOUNCE; counters_need_update = true; existing_row ^= col_mask; // flip the bit. - } else { - matrix_need_update = true; } } debounce_pointer++; @@ -122,3 +141,6 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n } bool debounce_active(void) { return true; } +#else +# include "none.c" +#endif diff --git a/quantum/debounce/sym_eager_pr.c b/quantum/debounce/sym_eager_pr.c index 20ccb46f1..2ad592c5a 100644 --- a/quantum/debounce/sym_eager_pr.c +++ b/quantum/debounce/sym_eager_pr.c @@ -1,5 +1,6 @@ /* Copyright 2019 Alex Ong +Copyright 2021 Simon Arlott This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or @@ -33,27 +34,25 @@ No further inputs are accepted until DEBOUNCE milliseconds have occurred. # define DEBOUNCE 5 #endif -#define debounce_counter_t uint8_t +// Maximum debounce: 255ms +#if DEBOUNCE > UINT8_MAX +# undef DEBOUNCE +# define DEBOUNCE UINT8_MAX +#endif + +typedef uint8_t debounce_counter_t; + +#if DEBOUNCE > 0 static bool matrix_need_update; static debounce_counter_t *debounce_counters; +static fast_timer_t last_time; static bool counters_need_update; -#define DEBOUNCE_ELAPSED 251 -#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) +#define DEBOUNCE_ELAPSED 0 -static uint8_t wrapping_timer_read(void) { - static uint16_t time = 0; - static uint8_t last_result = 0; - uint16_t new_time = timer_read(); - uint16_t diff = new_time - time; - time = new_time; - last_result = (last_result + diff) % (MAX_DEBOUNCE + 1); - return last_result; -} - -void update_debounce_counters(uint8_t num_rows, uint8_t current_time); -void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time); +static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time); +static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows); // we use num_rows rather than MATRIX_ROWS to support split keyboards void debounce_init(uint8_t num_rows) { @@ -63,27 +62,50 @@ void debounce_init(uint8_t num_rows) { } } +void debounce_free(void) { + free(debounce_counters); + debounce_counters = NULL; +} + void debounce(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, bool changed) { - uint8_t current_time = wrapping_timer_read(); - bool needed_update = counters_need_update; + bool updated_last = false; + if (counters_need_update) { - update_debounce_counters(num_rows, current_time); + fast_timer_t now = timer_read_fast(); + fast_timer_t elapsed_time = TIMER_DIFF_FAST(now, last_time); + + last_time = now; + updated_last = true; + if (elapsed_time > UINT8_MAX) { + elapsed_time = UINT8_MAX; + } + + if (elapsed_time > 0) { + update_debounce_counters(num_rows, elapsed_time); + } } - if (changed || (needed_update && !counters_need_update) || matrix_need_update) { - transfer_matrix_values(raw, cooked, num_rows, current_time); + if (changed || matrix_need_update) { + if (!updated_last) { + last_time = timer_read_fast(); + } + + transfer_matrix_values(raw, cooked, num_rows); } } // If the current time is > debounce counter, set the counter to enable input. -void update_debounce_counters(uint8_t num_rows, uint8_t current_time) { +static void update_debounce_counters(uint8_t num_rows, uint8_t elapsed_time) { counters_need_update = false; + matrix_need_update = false; debounce_counter_t *debounce_pointer = debounce_counters; for (uint8_t row = 0; row < num_rows; row++) { if (*debounce_pointer != DEBOUNCE_ELAPSED) { - if (TIMER_DIFF(current_time, *debounce_pointer, MAX_DEBOUNCE) >= DEBOUNCE) { + if (*debounce_pointer <= elapsed_time) { *debounce_pointer = DEBOUNCE_ELAPSED; + matrix_need_update = true; } else { + *debounce_pointer -= elapsed_time; counters_need_update = true; } } @@ -92,8 +114,7 @@ void update_debounce_counters(uint8_t num_rows, uint8_t current_time) { } // upload from raw_matrix to final matrix; -void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows, uint8_t current_time) { - matrix_need_update = false; +static void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t num_rows) { debounce_counter_t *debounce_pointer = debounce_counters; for (uint8_t row = 0; row < num_rows; row++) { matrix_row_t existing_row = cooked[row]; @@ -102,11 +123,9 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n // determine new value basd on debounce pointer + raw value if (existing_row != raw_row) { if (*debounce_pointer == DEBOUNCE_ELAPSED) { - *debounce_pointer = current_time; + *debounce_pointer = DEBOUNCE; cooked[row] = raw_row; counters_need_update = true; - } else { - matrix_need_update = true; } } debounce_pointer++; @@ -114,3 +133,6 @@ void transfer_matrix_values(matrix_row_t raw[], matrix_row_t cooked[], uint8_t n } bool debounce_active(void) { return true; } +#else +# include "none.c" +#endif diff --git a/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp b/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp new file mode 100644 index 000000000..fe374c3df --- /dev/null +++ b/quantum/debounce/tests/asym_eager_defer_pk_tests.cpp @@ -0,0 +1,374 @@ +/* Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "gtest/gtest.h" + +#include "debounce_test_common.h" + +TEST_F(DebounceTest, OneKeyShort1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + /* Release key after 1ms delay */ + {1, {{0, 1, UP}}, {}}, + + /* + * Until the eager timer on DOWN is observed to finish, the defer timer + * on UP can't start. There's no workaround for this because it's not + * possible to debounce an event that isn't being tracked. + * + * sym_defer_pk has the same problem but the test has to track that the + * key changed state so the DOWN timer is always allowed to finish + * before starting the UP timer. + */ + {5, {}, {}}, + + {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */ + /* Press key again after 1ms delay */ + {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + /* Release key after 2ms delay */ + {2, {{0, 1, UP}}, {}}, + + {5, {}, {}}, /* See OneKeyShort1 */ + + {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */ + /* Press key again after 1ms delay */ + {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort3) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + /* Release key after 3ms delay */ + {3, {{0, 1, UP}}, {}}, + + {5, {}, {}}, /* See OneKeyShort1 */ + + {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */ + /* Press key again after 1ms delay */ + {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort4) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + /* Release key after 4ms delay */ + {4, {{0, 1, UP}}, {}}, + + {5, {}, {}}, /* See OneKeyShort1 */ + + {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */ + /* Press key again after 1ms delay */ + {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort5) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Release key after 5ms delay */ + {5, {{0, 1, UP}}, {}}, + + {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */ + /* Press key again after 1ms delay */ + {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort6) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Release key after 6ms delay */ + {6, {{0, 1, UP}}, {}}, + + {11, {}, {{0, 1, UP}}}, /* 5ms after UP at time 6 */ + /* Press key again after 1ms delay */ + {12, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort7) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Release key after 7ms delay */ + {7, {{0, 1, UP}}, {}}, + + {12, {}, {{0, 1, UP}}}, /* 5ms after UP at time 7 */ + /* Press key again after 1ms delay */ + {13, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort8) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + /* Release key after 1ms delay */ + {1, {{0, 1, UP}}, {}}, + + {5, {}, {}}, /* See OneKeyShort1 */ + + {10, {}, {{0, 1, UP}}}, /* 5ms after UP at time 7 */ + /* Press key again after 0ms delay (scan 2) */ + {10, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort9) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + /* Release key after 1ms delay */ + {1, {{0, 1, UP}}, {}}, + + {5, {}, {}}, /* See OneKeyShort1 */ + + /* Press key again after 0ms delay (same scan) before debounce finishes */ + {10, {{0, 1, DOWN}}, {}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyBouncing1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + {2, {{0, 1, DOWN}}, {}}, + {3, {{0, 1, UP}}, {}}, + {4, {{0, 1, DOWN}}, {}}, + {5, {{0, 1, UP}}, {}}, + {6, {{0, 1, DOWN}}, {}}, + {7, {{0, 1, UP}}, {}}, + {8, {{0, 1, DOWN}}, {}}, + {9, {{0, 1, UP}}, {}}, + {10, {{0, 1, DOWN}}, {}}, + {11, {{0, 1, UP}}, {}}, + {12, {{0, 1, DOWN}}, {}}, + {13, {{0, 1, UP}}, {}}, + {14, {{0, 1, DOWN}}, {}}, + {15, {{0, 1, UP}}, {}}, + + {20, {}, {{0, 1, UP}}}, + /* Press key again after 1ms delay */ + {21, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyBouncing2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + /* Change twice in the same time period */ + {1, {{0, 1, UP}}, {}}, + {1, {{0, 1, DOWN}}, {}}, + /* Change three times in the same time period */ + {2, {{0, 1, UP}}, {}}, + {2, {{0, 1, DOWN}}, {}}, + {2, {{0, 1, UP}}, {}}, + /* Change twice in the same time period */ + {6, {{0, 1, DOWN}}, {}}, + {6, {{0, 1, UP}}, {}}, + /* Change three times in the same time period */ + {7, {{0, 1, DOWN}}, {}}, + {7, {{0, 1, UP}}, {}}, + {7, {{0, 1, DOWN}}, {}}, + /* Change twice in the same time period */ + {8, {{0, 1, UP}}, {}}, + {8, {{0, 1, DOWN}}, {}}, + /* Change three times in the same time period */ + {9, {{0, 1, UP}}, {}}, + {9, {{0, 1, DOWN}}, {}}, + {9, {{0, 1, UP}}, {}}, + + {14, {}, {{0, 1, UP}}}, + /* Press key again after 1ms delay */ + {15, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyLong) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + {25, {{0, 1, UP}}, {}}, + + {30, {}, {{0, 1, UP}}}, + + {50, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + {75, {{0, 1, UP}}, {}}, + + {80, {}, {{0, 1, UP}}}, + + {100, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, TwoKeysShort) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 2, DOWN}}, {{0, 2, DOWN}}}, + /* Release key after 2ms delay */ + {2, {{0, 1, UP}}, {}}, + {3, {{0, 2, UP}}, {}}, + + {5, {}, {}}, /* See OneKeyShort1 */ + {6, {}, {}}, /* See OneKeyShort1 */ + + {10, {}, {{0, 1, UP}}}, /* 5ms+5ms after DOWN at time 0 */ + /* Press key again after 1ms delay */ + {11, {{0, 1, DOWN}}, {{0, 1, DOWN}, {0, 2, UP}}}, /* 5ms+5ms after DOWN at time 0 */ + {12, {{0, 2, DOWN}}, {{0, 2, DOWN}}}, /* 5ms+5ms after DOWN at time 0 */ + }); + runEvents(); +} + + +TEST_F(DebounceTest, OneKeyDelayedScan1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late, immediately release key */ + {300, {{0, 1, UP}}, {}}, + + {305, {}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late, immediately release key */ + {300, {{0, 1, UP}}, {}}, + + /* Processing is very late again */ + {600, {}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan3) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late */ + {300, {}, {}}, + /* Release key after 1ms */ + {301, {{0, 1, UP}}, {}}, + + {306, {}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan4) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late */ + {300, {}, {}}, + /* Release key after 1ms */ + {301, {{0, 1, UP}}, {}}, + + /* Processing is very late again */ + {600, {}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan5) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + {5, {{0, 1, UP}}, {}}, + + /* Processing is very late */ + {300, {}, {{0, 1, UP}}}, + /* Immediately press key again */ + {300, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan6) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + {5, {{0, 1, UP}}, {}}, + + /* Processing is very late */ + {300, {}, {{0, 1, UP}}}, + + /* Press key again after 1ms */ + {301, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan7) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + {5, {{0, 1, UP}}, {}}, + + /* Press key again before debounce expires */ + {300, {{0, 1, DOWN}}, {}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan8) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is a bit late */ + {50, {}, {}}, + /* Release key after 1ms */ + {51, {{0, 1, UP}}, {}}, + + /* Processing is a bit late again */ + {100, {}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} diff --git a/quantum/debounce/tests/debounce_test_common.cpp b/quantum/debounce/tests/debounce_test_common.cpp new file mode 100644 index 000000000..1c5e7c9f4 --- /dev/null +++ b/quantum/debounce/tests/debounce_test_common.cpp @@ -0,0 +1,229 @@ +/* Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "gtest/gtest.h" + +#include "debounce_test_common.h" + +#include +#include +#include + +extern "C" { +#include "quantum.h" +#include "timer.h" +#include "debounce.h" + +void set_time(uint32_t t); +void advance_time(uint32_t ms); +} + +void DebounceTest::addEvents(std::initializer_list events) { + events_.insert(events_.end(), events.begin(), events.end()); +} + +void DebounceTest::runEvents() { + /* Run the test multiple times, from 1kHz to 10kHz scan rate */ + for (extra_iterations_ = 0; extra_iterations_ < 10; extra_iterations_++) { + if (time_jumps_) { + /* Don't advance time smoothly, jump to the next event (some tests require this) */ + auto_advance_time_ = false; + runEventsInternal(); + } else { + /* Run the test with both smooth and irregular time; it must produce the same result */ + auto_advance_time_ = true; + runEventsInternal(); + auto_advance_time_ = false; + runEventsInternal(); + } + } +} + +void DebounceTest::runEventsInternal() { + fast_timer_t previous = 0; + bool first = true; + + /* Initialise keyboard with start time (offset to avoid testing at 0) and all keys UP */ + debounce_init(MATRIX_ROWS); + set_time(time_offset_); + std::fill(std::begin(input_matrix_), std::end(input_matrix_), 0); + std::fill(std::begin(output_matrix_), std::end(output_matrix_), 0); + + for (auto &event : events_) { + if (!auto_advance_time_) { + /* Jump to the next event */ + set_time(time_offset_ + event.time_); + } else if (!first && event.time_ == previous + 1) { + /* This event immediately follows the previous one, don't make extra debounce() calls */ + advance_time(1); + } else { + /* Fast forward to the time for this event, calling debounce() with no changes */ + ASSERT_LT((time_offset_ + event.time_) - timer_read_fast(), 60000) << "Test tries to advance more than 1 minute of time"; + + while (timer_read_fast() != time_offset_ + event.time_) { + runDebounce(false); + checkCookedMatrix(false, "debounce() modified cooked matrix"); + advance_time(1); + } + } + + first = false; + previous = event.time_; + + /* Prepare input matrix */ + for (auto &input : event.inputs_) { + matrixUpdate(input_matrix_, "input", input); + } + + /* Call debounce */ + runDebounce(!event.inputs_.empty()); + + /* Prepare output matrix */ + for (auto &output : event.outputs_) { + matrixUpdate(output_matrix_, "output", output); + } + + /* Check output matrix has expected change events */ + for (auto &output : event.outputs_) { + EXPECT_EQ(!!(cooked_matrix_[output.row_] & (1U << output.col_)), directionValue(output.direction_)) + << "Missing event at " << strTime() + << " expected key " << output.row_ << "," << output.col_ << " " << directionLabel(output.direction_) + << "\ninput_matrix: changed=" << !event.inputs_.empty() << "\n" << strMatrix(input_matrix_) + << "\nexpected_matrix:\n" << strMatrix(output_matrix_) + << "\nactual_matrix:\n" << strMatrix(cooked_matrix_); + } + + /* Check output matrix has no other changes */ + checkCookedMatrix(!event.inputs_.empty(), "debounce() cooked matrix does not match expected output matrix"); + + /* Perform some extra iterations of the matrix scan with no changes */ + for (int i = 0; i < extra_iterations_; i++) { + runDebounce(false); + checkCookedMatrix(false, "debounce() modified cooked matrix"); + } + } + + /* Check that no further changes happen for 1 minute */ + for (int i = 0; i < 60000; i++) { + runDebounce(false); + checkCookedMatrix(false, "debounce() modified cooked matrix"); + advance_time(1); + } + + debounce_free(); +} + +void DebounceTest::runDebounce(bool changed) { + std::copy(std::begin(input_matrix_), std::end(input_matrix_), std::begin(raw_matrix_)); + std::copy(std::begin(output_matrix_), std::end(output_matrix_), std::begin(cooked_matrix_)); + + debounce(raw_matrix_, cooked_matrix_, MATRIX_ROWS, changed); + + if (!std::equal(std::begin(input_matrix_), std::end(input_matrix_), std::begin(raw_matrix_))) { + FAIL() << "Fatal error: debounce() modified raw matrix at " << strTime() + << "\ninput_matrix: changed=" << changed << "\n" << strMatrix(input_matrix_) + << "\nraw_matrix:\n" << strMatrix(raw_matrix_); + } +} + +void DebounceTest::checkCookedMatrix(bool changed, const std::string &error_message) { + if (!std::equal(std::begin(output_matrix_), std::end(output_matrix_), std::begin(cooked_matrix_))) { + FAIL() << "Unexpected event: " << error_message << " at " << strTime() + << "\ninput_matrix: changed=" << changed << "\n" << strMatrix(input_matrix_) + << "\nexpected_matrix:\n" << strMatrix(output_matrix_) + << "\nactual_matrix:\n" << strMatrix(cooked_matrix_); + } +} + +std::string DebounceTest::strTime() { + std::stringstream text; + + text << "time " << (timer_read_fast() - time_offset_) + << " (extra_iterations=" << extra_iterations_ + << ", auto_advance_time=" << auto_advance_time_ << ")"; + + return text.str(); +} + +std::string DebounceTest::strMatrix(matrix_row_t matrix[]) { + std::stringstream text; + + text << "\t" << std::setw(3) << ""; + for (int col = 0; col < MATRIX_COLS; col++) { + text << " " << std::setw(2) << col; + } + text << "\n"; + + for (int row = 0; row < MATRIX_ROWS; row++) { + text << "\t" << std::setw(2) << row << ":"; + for (int col = 0; col < MATRIX_COLS; col++) { + text << ((matrix[row] & (1U << col)) ? " XX" : " __"); + } + + text << "\n"; + } + + return text.str(); +} + +bool DebounceTest::directionValue(Direction direction) { + switch (direction) { + case DOWN: + return true; + + case UP: + return false; + } +} + +std::string DebounceTest::directionLabel(Direction direction) { + switch (direction) { + case DOWN: + return "DOWN"; + + case UP: + return "UP"; + } +} + +/* Modify a matrix and verify that events always specify a change */ +void DebounceTest::matrixUpdate(matrix_row_t matrix[], const std::string &name, const MatrixTestEvent &event) { + ASSERT_NE(!!(matrix[event.row_] & (1U << event.col_)), directionValue(event.direction_)) + << "Test " << name << " at " << strTime() + << " sets key " << event.row_ << "," << event.col_ << " " << directionLabel(event.direction_) + << " but it is already " << directionLabel(event.direction_) + << "\n" << name << "_matrix:\n" << strMatrix(matrix); + + switch (event.direction_) { + case DOWN: + matrix[event.row_] |= (1U << event.col_); + break; + + case UP: + matrix[event.row_] &= ~(1U << event.col_); + break; + } +} + +DebounceTestEvent::DebounceTestEvent(fast_timer_t time, + std::initializer_list inputs, + std::initializer_list outputs) + : time_(time), inputs_(inputs), outputs_(outputs) { +} + +MatrixTestEvent::MatrixTestEvent(int row, int col, Direction direction) + : row_(row), col_(col), direction_(direction) { +} diff --git a/quantum/debounce/tests/debounce_test_common.h b/quantum/debounce/tests/debounce_test_common.h new file mode 100644 index 000000000..d87e31059 --- /dev/null +++ b/quantum/debounce/tests/debounce_test_common.h @@ -0,0 +1,83 @@ +/* Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "gtest/gtest.h" + +#include +#include +#include + +extern "C" { +#include "quantum.h" +#include "timer.h" +} + +enum Direction { + DOWN, + UP, +}; + +class MatrixTestEvent { +public: + MatrixTestEvent(int row, int col, Direction direction); + + const int row_; + const int col_; + const Direction direction_; +}; + +class DebounceTestEvent { +public: + // 0, {{0, 1, DOWN}}, {{0, 1, DOWN}}) + DebounceTestEvent(fast_timer_t time, + std::initializer_list inputs, + std::initializer_list outputs); + + const fast_timer_t time_; + const std::list inputs_; + const std::list outputs_; +}; + +class DebounceTest : public ::testing::Test { +protected: + void addEvents(std::initializer_list events); + void runEvents(); + + fast_timer_t time_offset_ = 7777; + bool time_jumps_ = false; + +private: + static bool directionValue(Direction direction); + static std::string directionLabel(Direction direction); + + void runEventsInternal(); + void runDebounce(bool changed); + void checkCookedMatrix(bool changed, const std::string &error_message); + void matrixUpdate(matrix_row_t matrix[], const std::string &name, const MatrixTestEvent &event); + + std::string strTime(); + std::string strMatrix(matrix_row_t matrix[]); + + std::list events_; + + matrix_row_t input_matrix_[MATRIX_ROWS]; + matrix_row_t raw_matrix_[MATRIX_ROWS]; + matrix_row_t cooked_matrix_[MATRIX_ROWS]; + matrix_row_t output_matrix_[MATRIX_ROWS]; + + int extra_iterations_; + bool auto_advance_time_; +}; diff --git a/quantum/debounce/tests/rules.mk b/quantum/debounce/tests/rules.mk new file mode 100644 index 000000000..66928d7eb --- /dev/null +++ b/quantum/debounce/tests/rules.mk @@ -0,0 +1,44 @@ +# Copyright 2021 Simon Arlott +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +DEBOUNCE_COMMON_DEFS := -DMATRIX_ROWS=4 -DMATRIX_COLS=10 -DDEBOUNCE=5 + +DEBOUNCE_COMMON_SRC := $(QUANTUM_PATH)/debounce/tests/debounce_test_common.cpp \ + $(TMK_PATH)/common/test/timer.c + +debounce_sym_defer_g_DEFS := $(DEBOUNCE_COMMON_DEFS) +debounce_sym_defer_g_SRC := $(DEBOUNCE_COMMON_SRC) \ + $(QUANTUM_PATH)/debounce/sym_defer_g.c \ + $(QUANTUM_PATH)/debounce/tests/sym_defer_g_tests.cpp + +debounce_sym_defer_pk_DEFS := $(DEBOUNCE_COMMON_DEFS) +debounce_sym_defer_pk_SRC := $(DEBOUNCE_COMMON_SRC) \ + $(QUANTUM_PATH)/debounce/sym_defer_pk.c \ + $(QUANTUM_PATH)/debounce/tests/sym_defer_pk_tests.cpp + +debounce_sym_eager_pk_DEFS := $(DEBOUNCE_COMMON_DEFS) +debounce_sym_eager_pk_SRC := $(DEBOUNCE_COMMON_SRC) \ + $(QUANTUM_PATH)/debounce/sym_eager_pk.c \ + $(QUANTUM_PATH)/debounce/tests/sym_eager_pk_tests.cpp + +debounce_sym_eager_pr_DEFS := $(DEBOUNCE_COMMON_DEFS) +debounce_sym_eager_pr_SRC := $(DEBOUNCE_COMMON_SRC) \ + $(QUANTUM_PATH)/debounce/sym_eager_pr.c \ + $(QUANTUM_PATH)/debounce/tests/sym_eager_pr_tests.cpp + +debounce_asym_eager_defer_pk_DEFS := $(DEBOUNCE_COMMON_DEFS) +debounce_asym_eager_defer_pk_SRC := $(DEBOUNCE_COMMON_SRC) \ + $(QUANTUM_PATH)/debounce/asym_eager_defer_pk.c \ + $(QUANTUM_PATH)/debounce/tests/asym_eager_defer_pk_tests.cpp diff --git a/quantum/debounce/tests/sym_defer_g_tests.cpp b/quantum/debounce/tests/sym_defer_g_tests.cpp new file mode 100644 index 000000000..a56aecd8f --- /dev/null +++ b/quantum/debounce/tests/sym_defer_g_tests.cpp @@ -0,0 +1,223 @@ +/* Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "gtest/gtest.h" + +#include "debounce_test_common.h" + +TEST_F(DebounceTest, OneKeyShort1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}}}, + /* 0ms delay (fast scan rate) */ + {5, {{0, 1, UP}}, {}}, + + {10, {}, {{0, 1, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}}}, + /* 1ms delay */ + {6, {{0, 1, UP}}, {}}, + + {11, {}, {{0, 1, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort3) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}}}, + /* 2ms delay */ + {7, {{0, 1, UP}}, {}}, + + {12, {}, {{0, 1, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyTooQuick1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + /* Release key exactly on the debounce time */ + {5, {{0, 1, UP}}, {}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyTooQuick2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}}}, + {6, {{0, 1, UP}}, {}}, + + /* Press key exactly on the debounce time */ + {11, {{0, 1, DOWN}}, {}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyBouncing1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + {1, {{0, 1, UP}}, {}}, + {2, {{0, 1, DOWN}}, {}}, + {3, {{0, 1, UP}}, {}}, + {4, {{0, 1, DOWN}}, {}}, + {5, {{0, 1, UP}}, {}}, + {6, {{0, 1, DOWN}}, {}}, + {11, {}, {{0, 1, DOWN}}}, /* 5ms after DOWN at time 7 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyBouncing2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + {5, {}, {{0, 1, DOWN}}}, + {6, {{0, 1, UP}}, {}}, + {7, {{0, 1, DOWN}}, {}}, + {8, {{0, 1, UP}}, {}}, + {9, {{0, 1, DOWN}}, {}}, + {10, {{0, 1, UP}}, {}}, + {15, {}, {{0, 1, UP}}}, /* 5ms after UP at time 10 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyLong) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}}}, + + {25, {{0, 1, UP}}, {}}, + + {30, {}, {{0, 1, UP}}}, + + {50, {{0, 1, DOWN}}, {}}, + + {55, {}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, TwoKeysShort) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + {1, {{0, 2, DOWN}}, {}}, + + {6, {}, {{0, 1, DOWN}, {0, 2, DOWN}}}, + + {7, {{0, 1, UP}}, {}}, + {8, {{0, 2, UP}}, {}}, + + {13, {}, {{0, 1, UP}, {0, 2, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, TwoKeysSimultaneous1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}, {0, 2, DOWN}}}, + {6, {{0, 1, UP}, {0, 2, UP}}, {}}, + + {11, {}, {{0, 1, UP}, {0, 2, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, TwoKeysSimultaneous2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + {1, {{0, 2, DOWN}}, {}}, + + {5, {}, {}}, + {6, {}, {{0, 1, DOWN}, {0, 2, DOWN}}}, + {7, {{0, 1, UP}}, {}}, + {8, {{0, 2, UP}}, {}}, + + {13, {}, {{0, 1, UP}, {0, 2, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + /* Processing is very late */ + {300, {}, {{0, 1, DOWN}}}, + /* Immediately release key */ + {300, {{0, 1, UP}}, {}}, + + {305, {}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + /* Processing is very late */ + {300, {}, {{0, 1, DOWN}}}, + /* Release key after 1ms */ + {301, {{0, 1, UP}}, {}}, + + {306, {}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan3) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + /* Release key before debounce expires */ + {300, {{0, 1, UP}}, {}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan4) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + /* Processing is a bit late */ + {50, {}, {{0, 1, DOWN}}}, + /* Release key after 1ms */ + {51, {{0, 1, UP}}, {}}, + + {56, {}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} diff --git a/quantum/debounce/tests/sym_defer_pk_tests.cpp b/quantum/debounce/tests/sym_defer_pk_tests.cpp new file mode 100644 index 000000000..1f3061e59 --- /dev/null +++ b/quantum/debounce/tests/sym_defer_pk_tests.cpp @@ -0,0 +1,225 @@ +/* Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "gtest/gtest.h" + +#include "debounce_test_common.h" + +TEST_F(DebounceTest, OneKeyShort1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}}}, + /* 0ms delay (fast scan rate) */ + {5, {{0, 1, UP}}, {}}, + + {10, {}, {{0, 1, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}}}, + /* 1ms delay */ + {6, {{0, 1, UP}}, {}}, + + {11, {}, {{0, 1, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort3) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}}}, + /* 2ms delay */ + {7, {{0, 1, UP}}, {}}, + + {12, {}, {{0, 1, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyTooQuick1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + /* Release key exactly on the debounce time */ + {5, {{0, 1, UP}}, {}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyTooQuick2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}}}, + {6, {{0, 1, UP}}, {}}, + + /* Press key exactly on the debounce time */ + {11, {{0, 1, DOWN}}, {}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyBouncing1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + {1, {{0, 1, UP}}, {}}, + {2, {{0, 1, DOWN}}, {}}, + {3, {{0, 1, UP}}, {}}, + {4, {{0, 1, DOWN}}, {}}, + {5, {{0, 1, UP}}, {}}, + {6, {{0, 1, DOWN}}, {}}, + {11, {}, {{0, 1, DOWN}}}, /* 5ms after DOWN at time 7 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyBouncing2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + {5, {}, {{0, 1, DOWN}}}, + {6, {{0, 1, UP}}, {}}, + {7, {{0, 1, DOWN}}, {}}, + {8, {{0, 1, UP}}, {}}, + {9, {{0, 1, DOWN}}, {}}, + {10, {{0, 1, UP}}, {}}, + {15, {}, {{0, 1, UP}}}, /* 5ms after UP at time 10 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyLong) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}}}, + + {25, {{0, 1, UP}}, {}}, + + {30, {}, {{0, 1, UP}}}, + + {50, {{0, 1, DOWN}}, {}}, + + {55, {}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, TwoKeysShort) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + {1, {{0, 2, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}}}, + {6, {}, {{0, 2, DOWN}}}, + + {7, {{0, 1, UP}}, {}}, + {8, {{0, 2, UP}}, {}}, + + {12, {}, {{0, 1, UP}}}, + {13, {}, {{0, 2, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, TwoKeysSimultaneous1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}, {0, 2, DOWN}}}, + {6, {{0, 1, UP}, {0, 2, UP}}, {}}, + + {11, {}, {{0, 1, UP}, {0, 2, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, TwoKeysSimultaneous2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + {1, {{0, 2, DOWN}}, {}}, + + {5, {}, {{0, 1, DOWN}}}, + {6, {{0, 1, UP}}, {{0, 2, DOWN}}}, + {7, {{0, 2, UP}}, {}}, + + {11, {}, {{0, 1, UP}}}, + {12, {}, {{0, 2, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + /* Processing is very late */ + {300, {}, {{0, 1, DOWN}}}, + /* Immediately release key */ + {300, {{0, 1, UP}}, {}}, + + {305, {}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + /* Processing is very late */ + {300, {}, {{0, 1, DOWN}}}, + /* Release key after 1ms */ + {301, {{0, 1, UP}}, {}}, + + {306, {}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan3) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + /* Release key before debounce expires */ + {300, {{0, 1, UP}}, {}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan4) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {}}, + + /* Processing is a bit late */ + {50, {}, {{0, 1, DOWN}}}, + /* Release key after 1ms */ + {51, {{0, 1, UP}}, {}}, + + {56, {}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} diff --git a/quantum/debounce/tests/sym_eager_pk_tests.cpp b/quantum/debounce/tests/sym_eager_pk_tests.cpp new file mode 100644 index 000000000..e0fc205e3 --- /dev/null +++ b/quantum/debounce/tests/sym_eager_pk_tests.cpp @@ -0,0 +1,237 @@ +/* Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "gtest/gtest.h" + +#include "debounce_test_common.h" + +TEST_F(DebounceTest, OneKeyShort1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 1ms delay (debounce has not yet finished) */ + {6, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 2ms delay (debounce has not yet finished) */ + {7, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort3) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 3ms delay (debounce has not yet finished) */ + {8, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort4) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 4ms delay (debounce has not yet finished) */ + {9, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort5) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 5ms delay (debounce has finished) */ + {10, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort6) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key after after 6ms delay (debounce has finished) */ + {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyBouncing1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + {2, {{0, 1, DOWN}}, {}}, + {3, {{0, 1, UP}}, {}}, + {4, {{0, 1, DOWN}}, {}}, + {5, {{0, 1, UP}}, {{0, 1, UP}}}, + /* Press key again after 1ms delay (debounce has not yet finished) */ + {6, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyBouncing2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + /* Change twice in the same time period */ + {1, {{0, 1, UP}}, {}}, + {1, {{0, 1, DOWN}}, {}}, + /* Change three times in the same time period */ + {2, {{0, 1, UP}}, {}}, + {2, {{0, 1, DOWN}}, {}}, + {2, {{0, 1, UP}}, {}}, + /* Change three times in the same time period */ + {3, {{0, 1, DOWN}}, {}}, + {3, {{0, 1, UP}}, {}}, + {3, {{0, 1, DOWN}}, {}}, + /* Change twice in the same time period */ + {4, {{0, 1, UP}}, {}}, + {4, {{0, 1, DOWN}}, {}}, + {5, {{0, 1, UP}}, {{0, 1, UP}}}, + /* Press key again after 1ms delay (debounce has not yet finished) */ + {6, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyLong) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + {25, {{0, 1, UP}}, {{0, 1, UP}}}, + + {50, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, TwoKeysShort) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + {2, {{0, 2, DOWN}}, {{0, 2, DOWN}}}, + {3, {{0, 2, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 1ms delay (debounce has not yet finished) */ + {6, {{0, 1, DOWN}}, {}}, + {7, {}, {{0, 2, UP}}}, + + /* Press key again after 1ms delay (debounce has not yet finished) */ + {9, {{0, 2, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + + {12, {}, {{0, 2, DOWN}}}, /* 5ms after UP at time 7 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late but the change will now be accepted */ + {300, {{0, 1, UP}}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late but the change will now be accepted even with a 1 scan delay */ + {300, {}, {}}, + {300, {{0, 1, UP}}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan3) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late but the change will now be accepted even with a 1ms delay */ + {300, {}, {}}, + {301, {{0, 1, UP}}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan4) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is a bit late but the change will now be accepted */ + {50, {{0, 1, UP}}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan5) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late but the change will now be accepted even with a 1 scan delay */ + {50, {}, {}}, + {50, {{0, 1, UP}}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan6) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late but the change will now be accepted even with a 1ms delay */ + {50, {}, {}}, + {51, {{0, 1, UP}}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} diff --git a/quantum/debounce/tests/sym_eager_pr_tests.cpp b/quantum/debounce/tests/sym_eager_pr_tests.cpp new file mode 100644 index 000000000..2c4bca127 --- /dev/null +++ b/quantum/debounce/tests/sym_eager_pr_tests.cpp @@ -0,0 +1,280 @@ +/* Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "gtest/gtest.h" + +#include "debounce_test_common.h" + +TEST_F(DebounceTest, OneKeyShort1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 1ms delay (debounce has not yet finished) */ + {6, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 2ms delay (debounce has not yet finished) */ + {7, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort3) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 3ms delay (debounce has not yet finished) */ + {8, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort4) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 4ms delay (debounce has not yet finished) */ + {9, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort5) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 5ms delay (debounce has finished) */ + {10, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyShort6) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key after after 6ms delay (debounce has finished) */ + {11, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyBouncing1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + {2, {{0, 1, DOWN}}, {}}, + {3, {{0, 1, UP}}, {}}, + {4, {{0, 1, DOWN}}, {}}, + {5, {{0, 1, UP}}, {{0, 1, UP}}}, + /* Press key again after 1ms delay (debounce has not yet finished) */ + {6, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyBouncing2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + /* Change twice in the same time period */ + {1, {{0, 1, UP}}, {}}, + {1, {{0, 1, DOWN}}, {}}, + /* Change three times in the same time period */ + {2, {{0, 1, UP}}, {}}, + {2, {{0, 1, DOWN}}, {}}, + {2, {{0, 1, UP}}, {}}, + /* Change three times in the same time period */ + {3, {{0, 1, DOWN}}, {}}, + {3, {{0, 1, UP}}, {}}, + {3, {{0, 1, DOWN}}, {}}, + /* Change twice in the same time period */ + {4, {{0, 1, UP}}, {}}, + {4, {{0, 1, DOWN}}, {}}, + {5, {{0, 1, UP}}, {{0, 1, UP}}}, + /* Press key again after 1ms delay (debounce has not yet finished) */ + {6, {{0, 1, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyLong) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + {25, {{0, 1, UP}}, {{0, 1, UP}}}, + + {50, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, TwoRowsShort) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + {2, {{2, 0, DOWN}}, {{2, 0, DOWN}}}, + {3, {{2, 0, UP}}, {}}, + + {5, {}, {{0, 1, UP}}}, + /* Press key again after 1ms delay (debounce has not yet finished) */ + {6, {{0, 1, DOWN}}, {}}, + {7, {}, {{2, 0, UP}}}, + + /* Press key again after 1ms delay (debounce has not yet finished) */ + {9, {{2, 0, DOWN}}, {}}, + {10, {}, {{0, 1, DOWN}}}, /* 5ms after UP at time 5 */ + + {12, {}, {{2, 0, DOWN}}}, /* 5ms after UP at time 7 */ + }); + runEvents(); +} + +TEST_F(DebounceTest, TwoKeysOverlap) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + {1, {{0, 1, UP}}, {}}, + /* Press a second key during the first debounce */ + {2, {{0, 2, DOWN}}, {}}, + + /* Key registers as soon as debounce finishes, 5ms after time 0 */ + {5, {}, {{0, 1, UP}, {0, 2, DOWN}}}, + {6, {{0, 1, DOWN}}, {}}, + + /* Key registers as soon as debounce finishes, 5ms after time 5 */ + {10, {}, {{0, 1, DOWN}}}, + /* Release both keys */ + {11, {{0, 1, UP}}, {}}, + {12, {{0, 2, UP}}, {}}, + + /* Keys register as soon as debounce finishes, 5ms after time 10 */ + {15, {}, {{0, 1, UP}, {0, 2, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, TwoKeysSimultaneous1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {{0, 1, DOWN}, {0, 2, DOWN}}}, + {20, {{0, 1, UP}}, {{0, 1, UP}}}, + {21, {{0, 2, UP}}, {}}, + + /* Key registers as soon as debounce finishes, 5ms after time 20 */ + {25, {}, {{0, 2, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, TwoKeysSimultaneous2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}, {0, 2, DOWN}}, {{0, 1, DOWN}, {0, 2, DOWN}}}, + {20, {{0, 1, UP}, {0, 2, UP}}, {{0, 1, UP}, {0, 2, UP}}}, + }); + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan1) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late but the change will now be accepted */ + {300, {{0, 1, UP}}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan2) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late but the change will now be accepted even with a 1 scan delay */ + {300, {}, {}}, + {300, {{0, 1, UP}}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan3) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late but the change will now be accepted even with a 1ms delay */ + {300, {}, {}}, + {301, {{0, 1, UP}}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan4) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is a bit late but the change will now be accepted */ + {50, {{0, 1, UP}}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan5) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late but the change will now be accepted even with a 1 scan delay */ + {50, {}, {}}, + {50, {{0, 1, UP}}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} + +TEST_F(DebounceTest, OneKeyDelayedScan6) { + addEvents({ /* Time, Inputs, Outputs */ + {0, {{0, 1, DOWN}}, {{0, 1, DOWN}}}, + + /* Processing is very late but the change will now be accepted even with a 1ms delay */ + {50, {}, {}}, + {51, {{0, 1, UP}}, {{0, 1, UP}}}, + }); + time_jumps_ = true; + runEvents(); +} diff --git a/quantum/debounce/tests/testlist.mk b/quantum/debounce/tests/testlist.mk new file mode 100644 index 000000000..c54c45aa6 --- /dev/null +++ b/quantum/debounce/tests/testlist.mk @@ -0,0 +1,6 @@ +TEST_LIST += \ + debounce_sym_defer_g \ + debounce_sym_defer_pk \ + debounce_sym_eager_pk \ + debounce_sym_eager_pr \ + debounce_asym_eager_defer_pk diff --git a/quantum/digitizer.c b/quantum/digitizer.c new file mode 100644 index 000000000..e29986742 --- /dev/null +++ b/quantum/digitizer.c @@ -0,0 +1,34 @@ +/* Copyright 2021 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "digitizer.h" + +digitizer_t digitizerReport = {.tipswitch = 0, .inrange = 0, .id = 0, .x = 0, .y = 0, .status = DZ_INITIALIZED}; + +__attribute__((weak)) void digitizer_send(void) { + if (digitizerReport.status & DZ_UPDATED) { + host_digitizer_send(&digitizerReport); + digitizerReport.status &= ~DZ_UPDATED; + } +} + +__attribute__((weak)) void digitizer_task(void) { digitizer_send(); } + +digitizer_t digitizer_get_report(void) { return digitizerReport; } + +void digitizer_set_report(digitizer_t newDigitizerReport) { + digitizerReport = newDigitizerReport; + digitizerReport.status |= DZ_UPDATED; +} \ No newline at end of file diff --git a/quantum/digitizer.h b/quantum/digitizer.h new file mode 100644 index 000000000..cef551567 --- /dev/null +++ b/quantum/digitizer.h @@ -0,0 +1,41 @@ +/* Copyright 2021 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#include + +enum digitizer_status { DZ_INITIALIZED = 1, DZ_UPDATED = 2 }; + +typedef struct { + int8_t tipswitch; + int8_t inrange; + uint8_t id; + float x; + float y; + uint8_t status : 2; +} digitizer_t; + +extern digitizer_t digitizer; + +digitizer_t digitizer_get_report(void); + +void digitizer_set_report(digitizer_t newDigitizerReport); + +void digitizer_task(void); + +void host_digitizer_send(digitizer_t *digitizer); diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c index cda69bd0e..133ec8502 100644 --- a/quantum/dip_switch.c +++ b/quantum/dip_switch.c @@ -17,6 +17,9 @@ */ #include "dip_switch.h" +#ifdef SPLIT_KEYBOARD +# include "split_common/split_util.h" +#endif // for memcpy #include @@ -49,16 +52,24 @@ static uint16_t scan_count; static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; -__attribute__((weak)) void dip_switch_update_user(uint8_t index, bool active) {} +__attribute__((weak)) bool dip_switch_update_user(uint8_t index, bool active) { return true; } -__attribute__((weak)) void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); } +__attribute__((weak)) bool dip_switch_update_kb(uint8_t index, bool active) { return dip_switch_update_user(index, active); } -__attribute__((weak)) void dip_switch_update_mask_user(uint32_t state) {} +__attribute__((weak)) bool dip_switch_update_mask_user(uint32_t state) { return true; } -__attribute__((weak)) void dip_switch_update_mask_kb(uint32_t state) { dip_switch_update_mask_user(state); } +__attribute__((weak)) bool dip_switch_update_mask_kb(uint32_t state) { return dip_switch_update_mask_user(state); } void dip_switch_init(void) { #ifdef DIP_SWITCH_PINS +# if defined(SPLIT_KEYBOARD) && defined(DIP_SWITCH_PINS_RIGHT) + if (!isLeftHand) { + const pin_t dip_switch_pad_right[] = DIP_SWITCH_PINS_RIGHT; + for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) { + dip_switch_pad[i] = dip_switch_pad_right[i]; + } + } +# endif for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) { setPinInputHigh(dip_switch_pad[i]); } diff --git a/quantum/dip_switch.h b/quantum/dip_switch.h index 61ef1cc19..058a10f41 100644 --- a/quantum/dip_switch.h +++ b/quantum/dip_switch.h @@ -20,10 +20,10 @@ #include "quantum.h" -void dip_switch_update_kb(uint8_t index, bool active); -void dip_switch_update_user(uint8_t index, bool active); -void dip_switch_update_mask_user(uint32_t state); -void dip_switch_update_mask_kb(uint32_t state); +bool dip_switch_update_kb(uint8_t index, bool active); +bool dip_switch_update_user(uint8_t index, bool active); +bool dip_switch_update_mask_user(uint32_t state); +bool dip_switch_update_mask_kb(uint32_t state); void dip_switch_init(void); void dip_switch_read(bool forced); diff --git a/quantum/eeconfig.c b/quantum/eeconfig.c new file mode 100644 index 000000000..92f0ac443 --- /dev/null +++ b/quantum/eeconfig.c @@ -0,0 +1,240 @@ +#include +#include +#include "eeprom.h" +#include "eeconfig.h" +#include "action_layer.h" + +#ifdef STM32_EEPROM_ENABLE +# include +# include "eeprom_stm32.h" +#endif + +#if defined(EEPROM_DRIVER) +# include "eeprom_driver.h" +#endif + +#if defined(HAPTIC_ENABLE) +# include "haptic.h" +#endif + +#if defined(VIA_ENABLE) +bool via_eeprom_is_valid(void); +void via_eeprom_set_valid(bool valid); +void eeconfig_init_via(void); +#endif + +/** \brief eeconfig enable + * + * FIXME: needs doc + */ +__attribute__((weak)) void eeconfig_init_user(void) { + // Reset user EEPROM value to blank, rather than to a set value + eeconfig_update_user(0); +} + +__attribute__((weak)) void eeconfig_init_kb(void) { + // Reset Keyboard EEPROM value to blank, rather than to a set value + eeconfig_update_kb(0); + + eeconfig_init_user(); +} + +/* + * FIXME: needs doc + */ +void eeconfig_init_quantum(void) { +#ifdef STM32_EEPROM_ENABLE + EEPROM_Erase(); +#endif +#if defined(EEPROM_DRIVER) + eeprom_driver_erase(); +#endif + eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); + eeprom_update_byte(EECONFIG_DEBUG, 0); + eeprom_update_byte(EECONFIG_DEFAULT_LAYER, 0); + default_layer_state = 0; + eeprom_update_byte(EECONFIG_KEYMAP_LOWER_BYTE, 0); + eeprom_update_byte(EECONFIG_KEYMAP_UPPER_BYTE, 0); + eeprom_update_byte(EECONFIG_MOUSEKEY_ACCEL, 0); + eeprom_update_byte(EECONFIG_BACKLIGHT, 0); + eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default + eeprom_update_dword(EECONFIG_RGBLIGHT, 0); + eeprom_update_byte(EECONFIG_STENOMODE, 0); + eeprom_update_dword(EECONFIG_HAPTIC, 0); + eeprom_update_byte(EECONFIG_VELOCIKEY, 0); + eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); + eeprom_update_word(EECONFIG_RGB_MATRIX_EXTENDED, 0); + + // TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS + // within the emulated eeprom via dfu-util or another tool +#if defined INIT_EE_HANDS_LEFT +# pragma message "Faking EE_HANDS for left hand" + eeprom_update_byte(EECONFIG_HANDEDNESS, 1); +#elif defined INIT_EE_HANDS_RIGHT +# pragma message "Faking EE_HANDS for right hand" + eeprom_update_byte(EECONFIG_HANDEDNESS, 0); +#endif + +#if defined(HAPTIC_ENABLE) + haptic_reset(); +#else + // this is used in case haptic is disabled, but we still want sane defaults + // in the haptic configuration eeprom. All zero will trigger a haptic_reset + // when a haptic-enabled firmware is loaded onto the keyboard. + eeprom_update_dword(EECONFIG_HAPTIC, 0); +#endif +#if defined(VIA_ENABLE) + // Invalidate VIA eeprom config, and then reset. + // Just in case if power is lost mid init, this makes sure that it pets + // properly re-initialized. + via_eeprom_set_valid(false); + eeconfig_init_via(); +#endif + + eeconfig_init_kb(); +} + +/** \brief eeconfig initialization + * + * FIXME: needs doc + */ +void eeconfig_init(void) { eeconfig_init_quantum(); } + +/** \brief eeconfig enable + * + * FIXME: needs doc + */ +void eeconfig_enable(void) { eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); } + +/** \brief eeconfig disable + * + * FIXME: needs doc + */ +void eeconfig_disable(void) { +#ifdef STM32_EEPROM_ENABLE + EEPROM_Erase(); +#endif +#if defined(EEPROM_DRIVER) + eeprom_driver_erase(); +#endif + eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER_OFF); +} + +/** \brief eeconfig is enabled + * + * FIXME: needs doc + */ +bool eeconfig_is_enabled(void) { + bool is_eeprom_enabled = (eeprom_read_word(EECONFIG_MAGIC) == EECONFIG_MAGIC_NUMBER); +#ifdef VIA_ENABLE + if (is_eeprom_enabled) { + is_eeprom_enabled = via_eeprom_is_valid(); + } +#endif + return is_eeprom_enabled; +} + +/** \brief eeconfig is disabled + * + * FIXME: needs doc + */ +bool eeconfig_is_disabled(void) { + bool is_eeprom_disabled = (eeprom_read_word(EECONFIG_MAGIC) == EECONFIG_MAGIC_NUMBER_OFF); +#ifdef VIA_ENABLE + if (!is_eeprom_disabled) { + is_eeprom_disabled = !via_eeprom_is_valid(); + } +#endif + return is_eeprom_disabled; +} + +/** \brief eeconfig read debug + * + * FIXME: needs doc + */ +uint8_t eeconfig_read_debug(void) { return eeprom_read_byte(EECONFIG_DEBUG); } +/** \brief eeconfig update debug + * + * FIXME: needs doc + */ +void eeconfig_update_debug(uint8_t val) { eeprom_update_byte(EECONFIG_DEBUG, val); } + +/** \brief eeconfig read default layer + * + * FIXME: needs doc + */ +uint8_t eeconfig_read_default_layer(void) { return eeprom_read_byte(EECONFIG_DEFAULT_LAYER); } +/** \brief eeconfig update default layer + * + * FIXME: needs doc + */ +void eeconfig_update_default_layer(uint8_t val) { eeprom_update_byte(EECONFIG_DEFAULT_LAYER, val); } + +/** \brief eeconfig read keymap + * + * FIXME: needs doc + */ +uint16_t eeconfig_read_keymap(void) { return (eeprom_read_byte(EECONFIG_KEYMAP_LOWER_BYTE) | (eeprom_read_byte(EECONFIG_KEYMAP_UPPER_BYTE) << 8)); } +/** \brief eeconfig update keymap + * + * FIXME: needs doc + */ +void eeconfig_update_keymap(uint16_t val) { + eeprom_update_byte(EECONFIG_KEYMAP_LOWER_BYTE, val & 0xFF); + eeprom_update_byte(EECONFIG_KEYMAP_UPPER_BYTE, (val >> 8) & 0xFF); +} + +/** \brief eeconfig read audio + * + * FIXME: needs doc + */ +uint8_t eeconfig_read_audio(void) { return eeprom_read_byte(EECONFIG_AUDIO); } +/** \brief eeconfig update audio + * + * FIXME: needs doc + */ +void eeconfig_update_audio(uint8_t val) { eeprom_update_byte(EECONFIG_AUDIO, val); } + +/** \brief eeconfig read kb + * + * FIXME: needs doc + */ +uint32_t eeconfig_read_kb(void) { return eeprom_read_dword(EECONFIG_KEYBOARD); } +/** \brief eeconfig update kb + * + * FIXME: needs doc + */ +void eeconfig_update_kb(uint32_t val) { eeprom_update_dword(EECONFIG_KEYBOARD, val); } + +/** \brief eeconfig read user + * + * FIXME: needs doc + */ +uint32_t eeconfig_read_user(void) { return eeprom_read_dword(EECONFIG_USER); } +/** \brief eeconfig update user + * + * FIXME: needs doc + */ +void eeconfig_update_user(uint32_t val) { eeprom_update_dword(EECONFIG_USER, val); } + +/** \brief eeconfig read haptic + * + * FIXME: needs doc + */ +uint32_t eeconfig_read_haptic(void) { return eeprom_read_dword(EECONFIG_HAPTIC); } +/** \brief eeconfig update haptic + * + * FIXME: needs doc + */ +void eeconfig_update_haptic(uint32_t val) { eeprom_update_dword(EECONFIG_HAPTIC, val); } + +/** \brief eeconfig read split handedness + * + * FIXME: needs doc + */ +bool eeconfig_read_handedness(void) { return !!eeprom_read_byte(EECONFIG_HANDEDNESS); } +/** \brief eeconfig update split handedness + * + * FIXME: needs doc + */ +void eeconfig_update_handedness(bool val) { eeprom_update_byte(EECONFIG_HANDEDNESS, !!val); } diff --git a/quantum/eeconfig.h b/quantum/eeconfig.h new file mode 100644 index 000000000..bd39971b2 --- /dev/null +++ b/quantum/eeconfig.h @@ -0,0 +1,113 @@ +/* +Copyright 2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include +#include + +#ifndef EECONFIG_MAGIC_NUMBER +# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEE9 // When changing, decrement this value to avoid future re-init issues +#endif +#define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF + +/* EEPROM parameter address */ +#define EECONFIG_MAGIC (uint16_t *)0 +#define EECONFIG_DEBUG (uint8_t *)2 +#define EECONFIG_DEFAULT_LAYER (uint8_t *)3 +#define EECONFIG_KEYMAP (uint8_t *)4 +#define EECONFIG_MOUSEKEY_ACCEL (uint8_t *)5 +#define EECONFIG_BACKLIGHT (uint8_t *)6 +#define EECONFIG_AUDIO (uint8_t *)7 +#define EECONFIG_RGBLIGHT (uint32_t *)8 +#define EECONFIG_UNICODEMODE (uint8_t *)12 +#define EECONFIG_STENOMODE (uint8_t *)13 +// EEHANDS for two handed boards +#define EECONFIG_HANDEDNESS (uint8_t *)14 +#define EECONFIG_KEYBOARD (uint32_t *)15 +#define EECONFIG_USER (uint32_t *)19 +#define EECONFIG_VELOCIKEY (uint8_t *)23 + +#define EECONFIG_HAPTIC (uint32_t *)24 + +// Mutually exclusive +#define EECONFIG_LED_MATRIX (uint32_t *)28 +#define EECONFIG_RGB_MATRIX (uint32_t *)28 +// Speed & Flags +#define EECONFIG_LED_MATRIX_EXTENDED (uint16_t *)32 +#define EECONFIG_RGB_MATRIX_EXTENDED (uint16_t *)32 + +// TODO: Combine these into a single word and single block of EEPROM +#define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)34 +// Size of EEPROM being used, other code can refer to this for available EEPROM +#define EECONFIG_SIZE 35 +/* debug bit */ +#define EECONFIG_DEBUG_ENABLE (1 << 0) +#define EECONFIG_DEBUG_MATRIX (1 << 1) +#define EECONFIG_DEBUG_KEYBOARD (1 << 2) +#define EECONFIG_DEBUG_MOUSE (1 << 3) + +/* keyconf bit */ +#define EECONFIG_KEYMAP_SWAP_CONTROL_CAPSLOCK (1 << 0) +#define EECONFIG_KEYMAP_CAPSLOCK_TO_CONTROL (1 << 1) +#define EECONFIG_KEYMAP_SWAP_LALT_LGUI (1 << 2) +#define EECONFIG_KEYMAP_SWAP_RALT_RGUI (1 << 3) +#define EECONFIG_KEYMAP_NO_GUI (1 << 4) +#define EECONFIG_KEYMAP_SWAP_GRAVE_ESC (1 << 5) +#define EECONFIG_KEYMAP_SWAP_BACKSLASH_BACKSPACE (1 << 6) +#define EECONFIG_KEYMAP_NKRO (1 << 7) + +#define EECONFIG_KEYMAP_LOWER_BYTE EECONFIG_KEYMAP + +bool eeconfig_is_enabled(void); +bool eeconfig_is_disabled(void); + +void eeconfig_init(void); +void eeconfig_init_quantum(void); +void eeconfig_init_kb(void); +void eeconfig_init_user(void); + +void eeconfig_enable(void); + +void eeconfig_disable(void); + +uint8_t eeconfig_read_debug(void); +void eeconfig_update_debug(uint8_t val); + +uint8_t eeconfig_read_default_layer(void); +void eeconfig_update_default_layer(uint8_t val); + +uint16_t eeconfig_read_keymap(void); +void eeconfig_update_keymap(uint16_t val); + +#ifdef AUDIO_ENABLE +uint8_t eeconfig_read_audio(void); +void eeconfig_update_audio(uint8_t val); +#endif + +uint32_t eeconfig_read_kb(void); +void eeconfig_update_kb(uint32_t val); +uint32_t eeconfig_read_user(void); +void eeconfig_update_user(uint32_t val); + +#ifdef HAPTIC_ENABLE +uint32_t eeconfig_read_haptic(void); +void eeconfig_update_haptic(uint32_t val); +#endif + +bool eeconfig_read_handedness(void); +void eeconfig_update_handedness(bool val); diff --git a/quantum/encoder.c b/quantum/encoder.c index c30bf01cb..8fb87281c 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -119,6 +119,11 @@ static bool encoder_update(uint8_t index, uint8_t state) { encoder_update_kb(index, ENCODER_CLOCKWISE); } encoder_pulses[i] %= resolution; +#ifdef ENCODER_DEFAULT_POS + if ((state & 0x3) == ENCODER_DEFAULT_POS) { + encoder_pulses[i] = 0; + } +#endif return changed; } diff --git a/quantum/haptic.c b/quantum/haptic.c new file mode 100644 index 000000000..65abcc15f --- /dev/null +++ b/quantum/haptic.c @@ -0,0 +1,295 @@ +/* Copyright 2019 ishtob + * Driver for haptic feedback written for QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "haptic.h" +#include "eeconfig.h" +#include "debug.h" +#ifdef DRV2605L +# include "DRV2605L.h" +#endif +#ifdef SOLENOID_ENABLE +# include "solenoid.h" +#endif + +haptic_config_t haptic_config; + +void haptic_init(void) { + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + haptic_config.raw = eeconfig_read_haptic(); +#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 + solenoid_setup(); + dprintf("Solenoid driver initialized\n"); +#endif +#ifdef DRV2605L + DRV_init(); + dprintf("DRV2605 driver initialized\n"); +#endif + eeconfig_debug_haptic(); +} + +void haptic_task(void) { +#ifdef SOLENOID_ENABLE + solenoid_check(); +#endif +} + +void eeconfig_debug_haptic(void) { + dprintf("haptic_config eeprom\n"); + dprintf("haptic_config.enable = %d\n", haptic_config.enable); + dprintf("haptic_config.mode = %d\n", haptic_config.mode); +} + +void haptic_enable(void) { + haptic_config.enable = 1; + xprintf("haptic_config.enable = %u\n", haptic_config.enable); + eeconfig_update_haptic(haptic_config.raw); +} + +void haptic_disable(void) { + haptic_config.enable = 0; + xprintf("haptic_config.enable = %u\n", haptic_config.enable); + eeconfig_update_haptic(haptic_config.raw); +} + +void haptic_toggle(void) { + if (haptic_config.enable) { + haptic_disable(); + } else { + haptic_enable(); + } + eeconfig_update_haptic(haptic_config.raw); +} + +void haptic_feedback_toggle(void) { + haptic_config.feedback++; + if (haptic_config.feedback >= HAPTIC_FEEDBACK_MAX) haptic_config.feedback = KEY_PRESS; + xprintf("haptic_config.feedback = %u\n", !haptic_config.feedback); + eeconfig_update_haptic(haptic_config.raw); +} + +void haptic_buzz_toggle(void) { + bool buzz_stat = !haptic_config.buzz; + haptic_config.buzz = buzz_stat; + haptic_set_buzz(buzz_stat); +} + +void haptic_mode_increase(void) { + uint8_t mode = haptic_config.mode + 1; +#ifdef DRV2605L + if (haptic_config.mode >= drv_effect_max) { + mode = 1; + } +#endif + haptic_set_mode(mode); +} + +void haptic_mode_decrease(void) { + uint8_t mode = haptic_config.mode - 1; +#ifdef DRV2605L + if (haptic_config.mode < 1) { + mode = (drv_effect_max - 1); + } +#endif + haptic_set_mode(mode); +} + +void haptic_dwell_increase(void) { +#ifdef SOLENOID_ENABLE + int16_t next_dwell = ((int16_t)haptic_config.dwell) + SOLENOID_DWELL_STEP_SIZE; + if (haptic_config.dwell >= SOLENOID_MAX_DWELL) { + // 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(next_dwell); +#else + int16_t next_dwell = ((int16_t)haptic_config.dwell) + 1; +#endif + haptic_set_dwell(next_dwell); +} + +void haptic_dwell_decrease(void) { +#ifdef SOLENOID_ENABLE + 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(next_dwell); +#else + int16_t next_dwell = ((int16_t)haptic_config.dwell) - 1; +#endif + haptic_set_dwell(next_dwell); +} + +void haptic_reset(void) { + haptic_config.enable = true; + uint8_t feedback = HAPTIC_FEEDBACK_DEFAULT; + haptic_config.feedback = feedback; +#ifdef DRV2605L + uint8_t mode = HAPTIC_MODE_DEFAULT; + haptic_config.mode = mode; +#endif +#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); + xprintf("haptic_config.mode = %u\n", haptic_config.mode); +} + +void haptic_set_feedback(uint8_t feedback) { + haptic_config.feedback = feedback; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.feedback = %u\n", haptic_config.feedback); +} + +void haptic_set_mode(uint8_t mode) { + haptic_config.mode = mode; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.mode = %u\n", haptic_config.mode); +} + +void haptic_set_amplitude(uint8_t amp) { + haptic_config.amplitude = amp; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.amplitude = %u\n", haptic_config.amplitude); +#ifdef DRV2605L + DRV_amplitude(amp); +#endif +} + +void haptic_set_buzz(uint8_t buzz) { + haptic_config.buzz = buzz; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.buzz = %u\n", haptic_config.buzz); +} + +void haptic_set_dwell(uint8_t dwell) { + haptic_config.dwell = dwell; + eeconfig_update_haptic(haptic_config.raw); + xprintf("haptic_config.dwell = %u\n", haptic_config.dwell); +} + +uint8_t haptic_get_enable(void) { return haptic_config.enable; } + +uint8_t haptic_get_mode(void) { + if (!haptic_config.enable) { + return false; + } + return haptic_config.mode; +} + +uint8_t haptic_get_feedback(void) { + if (!haptic_config.enable) { + return false; + } + return haptic_config.feedback; +} + +uint8_t haptic_get_dwell(void) { + if (!haptic_config.enable) { + return false; + } + return haptic_config.dwell; +} + +void haptic_enable_continuous(void) { + haptic_config.cont = 1; + xprintf("haptic_config.cont = %u\n", haptic_config.cont); + eeconfig_update_haptic(haptic_config.raw); +#ifdef DRV2605L + DRV_rtp_init(); +#endif +} + +void haptic_disable_continuous(void) { + haptic_config.cont = 0; + xprintf("haptic_config.cont = %u\n", haptic_config.cont); + eeconfig_update_haptic(haptic_config.raw); +#ifdef DRV2605L + DRV_write(DRV_MODE, 0x00); +#endif +} + +void haptic_toggle_continuous(void) { + if (haptic_config.cont) { + haptic_disable_continuous(); + } else { + haptic_enable_continuous(); + } +} + +void haptic_cont_increase(void) { + uint8_t amp = haptic_config.amplitude + 10; + if (haptic_config.amplitude >= 120) { + amp = 120; + } + haptic_set_amplitude(amp); +} + +void haptic_cont_decrease(void) { + uint8_t amp = haptic_config.amplitude - 10; + if (haptic_config.amplitude < 20) { + amp = 20; + } + haptic_set_amplitude(amp); +} + +void haptic_play(void) { +#ifdef DRV2605L + uint8_t play_eff = 0; + play_eff = haptic_config.mode; + DRV_pulse(play_eff); +#endif +#ifdef SOLENOID_ENABLE + solenoid_fire(); +#endif +} + +void haptic_shutdown(void) { +#ifdef SOLENOID_ENABLE + solenoid_shutdown(); +#endif +} diff --git a/quantum/haptic.h b/quantum/haptic.h new file mode 100644 index 000000000..fc7ca2f3e --- /dev/null +++ b/quantum/haptic.h @@ -0,0 +1,77 @@ +/* Copyright 2019 ishtob + * Driver for haptic feedback written for QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +#include + +#ifndef HAPTIC_FEEDBACK_DEFAULT +# define HAPTIC_FEEDBACK_DEFAULT 0 +#endif +#ifndef HAPTIC_MODE_DEFAULT +# define HAPTIC_MODE_DEFAULT DRV_MODE_DEFAULT +#endif + +/* EEPROM config settings */ +typedef union { + uint32_t raw; + struct { + bool enable : 1; + uint8_t feedback : 2; + uint8_t mode : 7; + bool buzz : 1; + uint8_t dwell : 7; + bool cont : 1; + uint8_t amplitude : 8; + uint8_t reserved : 5; + }; +} haptic_config_t; + +typedef enum HAPTIC_FEEDBACK { + KEY_PRESS, + KEY_PRESS_RELEASE, + KEY_RELEASE, + HAPTIC_FEEDBACK_MAX, +} HAPTIC_FEEDBACK; + +void haptic_init(void); +void haptic_task(void); +void eeconfig_debug_haptic(void); +void haptic_enable(void); +void haptic_disable(void); +void haptic_toggle(void); +void haptic_feedback_toggle(void); +void haptic_mode_increase(void); +void haptic_mode_decrease(void); +void haptic_mode(uint8_t mode); +void haptic_reset(void); +void haptic_set_feedback(uint8_t feedback); +void haptic_set_mode(uint8_t mode); +void haptic_set_dwell(uint8_t dwell); +void haptic_set_buzz(uint8_t buzz); +void haptic_buzz_toggle(void); +uint8_t haptic_get_enable(void); +uint8_t haptic_get_mode(void); +uint8_t haptic_get_feedback(void); +void haptic_dwell_increase(void); +void haptic_dwell_decrease(void); +void haptic_toggle_continuous(void); +void haptic_cont_increase(void); +void haptic_cont_decrease(void); + +void haptic_play(void); +void haptic_shutdown(void); diff --git a/quantum/keyboard.c b/quantum/keyboard.c new file mode 100644 index 000000000..473306c65 --- /dev/null +++ b/quantum/keyboard.c @@ -0,0 +1,569 @@ +/* +Copyright 2011, 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 +#include "keyboard.h" +#include "matrix.h" +#include "keymap.h" +#include "host.h" +#include "led.h" +#include "keycode.h" +#include "timer.h" +#include "sync_timer.h" +#include "print.h" +#include "debug.h" +#include "command.h" +#include "util.h" +#include "sendchar.h" +#include "eeconfig.h" +#include "action_layer.h" +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +#endif +#ifdef MOUSEKEY_ENABLE +# include "mousekey.h" +#endif +#ifdef PS2_MOUSE_ENABLE +# include "ps2_mouse.h" +#endif +#ifdef SERIAL_MOUSE_ENABLE +# include "serial_mouse.h" +#endif +#ifdef ADB_MOUSE_ENABLE +# include "adb.h" +#endif +#ifdef RGBLIGHT_ENABLE +# include "rgblight.h" +#endif +#ifdef LED_MATRIX_ENABLE +# include "led_matrix.h" +#endif +#ifdef RGB_MATRIX_ENABLE +# include "rgb_matrix.h" +#endif +#ifdef ENCODER_ENABLE +# include "encoder.h" +#endif +#ifdef STENO_ENABLE +# include "process_steno.h" +#endif +#ifdef SERIAL_LINK_ENABLE +# include "serial_link/system/serial_link.h" +#endif +#ifdef VISUALIZER_ENABLE +# include "visualizer/visualizer.h" +#endif +#ifdef POINTING_DEVICE_ENABLE +# include "pointing_device.h" +#endif +#ifdef MIDI_ENABLE +# include "process_midi.h" +#endif +#ifdef JOYSTICK_ENABLE +# include "process_joystick.h" +#endif +#ifdef HD44780_ENABLE +# include "hd44780.h" +#endif +#ifdef QWIIC_ENABLE +# include "qwiic.h" +#endif +#ifdef OLED_ENABLE +# include "oled_driver.h" +#endif +#ifdef ST7565_ENABLE +# include "st7565.h" +#endif +#ifdef VELOCIKEY_ENABLE +# include "velocikey.h" +#endif +#ifdef VIA_ENABLE +# include "via.h" +#endif +#ifdef DIP_SWITCH_ENABLE +# include "dip_switch.h" +#endif +#ifdef STM32_EEPROM_ENABLE +# include "eeprom_stm32.h" +#endif +#ifdef EEPROM_DRIVER +# include "eeprom_driver.h" +#endif +#if defined(CRC_ENABLE) +# include "crc.h" +#endif +#ifdef DIGITIZER_ENABLE +# include "digitizer.h" +#endif + +static uint32_t last_input_modification_time = 0; +uint32_t last_input_activity_time(void) { return last_input_modification_time; } +uint32_t last_input_activity_elapsed(void) { return timer_elapsed32(last_input_modification_time); } + +static uint32_t last_matrix_modification_time = 0; +uint32_t last_matrix_activity_time(void) { return last_matrix_modification_time; } +uint32_t last_matrix_activity_elapsed(void) { return timer_elapsed32(last_matrix_modification_time); } +void last_matrix_activity_trigger(void) { last_matrix_modification_time = last_input_modification_time = timer_read32(); } + +static uint32_t last_encoder_modification_time = 0; +uint32_t last_encoder_activity_time(void) { return last_encoder_modification_time; } +uint32_t last_encoder_activity_elapsed(void) { return timer_elapsed32(last_encoder_modification_time); } +void last_encoder_activity_trigger(void) { last_encoder_modification_time = last_input_modification_time = timer_read32(); } + +// Only enable this if console is enabled to print to +#if defined(DEBUG_MATRIX_SCAN_RATE) +static uint32_t matrix_timer = 0; +static uint32_t matrix_scan_count = 0; +static uint32_t last_matrix_scan_count = 0; + +void matrix_scan_perf_task(void) { + matrix_scan_count++; + + uint32_t timer_now = timer_read32(); + if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) { +# if defined(CONSOLE_ENABLE) + dprintf("matrix scan frequency: %lu\n", matrix_scan_count); +# endif + last_matrix_scan_count = matrix_scan_count; + matrix_timer = timer_now; + matrix_scan_count = 0; + } +} + +uint32_t get_matrix_scan_rate(void) { return last_matrix_scan_count; } +#else +# define matrix_scan_perf_task() +#endif + +#ifdef MATRIX_HAS_GHOST +extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; +static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata) { + matrix_row_t out = 0; + for (uint8_t col = 0; col < MATRIX_COLS; col++) { + // read each key in the row data and check if the keymap defines it as a real key + if (pgm_read_byte(&keymaps[0][row][col]) && (rowdata & (1 << col))) { + // this creates new row data, if a key is defined in the keymap, it will be set here + out |= 1 << col; + } + } + return out; +} + +static inline bool popcount_more_than_one(matrix_row_t rowdata) { + rowdata &= rowdata - 1; // if there are less than two bits (keys) set, rowdata will become zero + return rowdata; +} + +static inline bool has_ghost_in_row(uint8_t row, matrix_row_t rowdata) { + /* No ghost exists when less than 2 keys are down on the row. + If there are "active" blanks in the matrix, the key can't be pressed by the user, + there is no doubt as to which keys are really being pressed. + The ghosts will be ignored, they are KC_NO. */ + rowdata = get_real_keys(row, rowdata); + if ((popcount_more_than_one(rowdata)) == 0) { + return false; + } + /* Ghost occurs when the row shares a column line with other row, + and two columns are read on each row. Blanks in the matrix don't matter, + so they are filtered out. + If there are two or more real keys pressed and they match columns with + at least two of another row's real keys, the row will be ignored. Keep in mind, + we are checking one row at a time, not all of them at once. + */ + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + if (i != row && popcount_more_than_one(get_real_keys(i, matrix_get_row(i)) & rowdata)) { + return true; + } + } + return false; +} + +#endif + +void disable_jtag(void) { +// To use PF4-7 (PC2-5 on ATmega32A), disable JTAG by writing JTD bit twice within four cycles. +#if (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) + MCUCR |= _BV(JTD); + MCUCR |= _BV(JTD); +#elif defined(__AVR_ATmega32A__) + MCUCSR |= _BV(JTD); + MCUCSR |= _BV(JTD); +#endif +} + +/** \brief matrix_setup + * + * FIXME: needs doc + */ +__attribute__((weak)) void matrix_setup(void) {} + +/** \brief keyboard_pre_init_user + * + * FIXME: needs doc + */ +__attribute__((weak)) void keyboard_pre_init_user(void) {} + +/** \brief keyboard_pre_init_kb + * + * FIXME: needs doc + */ +__attribute__((weak)) void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); } + +/** \brief keyboard_post_init_user + * + * FIXME: needs doc + */ + +__attribute__((weak)) void keyboard_post_init_user() {} + +/** \brief keyboard_post_init_kb + * + * FIXME: needs doc + */ + +__attribute__((weak)) void keyboard_post_init_kb(void) { keyboard_post_init_user(); } + +/** \brief keyboard_setup + * + * FIXME: needs doc + */ +void keyboard_setup(void) { +#ifndef NO_JTAG_DISABLE + disable_jtag(); +#endif + print_set_sendchar(sendchar); +#ifdef STM32_EEPROM_ENABLE + EEPROM_Init(); +#endif +#ifdef EEPROM_DRIVER + eeprom_driver_init(); +#endif + matrix_setup(); + keyboard_pre_init_kb(); +} + +#ifndef SPLIT_KEYBOARD + +/** \brief is_keyboard_master + * + * FIXME: needs doc + */ +__attribute__((weak)) bool is_keyboard_master(void) { return true; } + +/** \brief is_keyboard_left + * + * FIXME: needs doc + */ +__attribute__((weak)) bool is_keyboard_left(void) { return true; } + +#endif + +/** \brief should_process_keypress + * + * Override this function if you have a condition where keypresses processing should change: + * - splits where the slave side needs to process for rgb/oled functionality + */ +__attribute__((weak)) bool should_process_keypress(void) { return is_keyboard_master(); } + +/** \brief housekeeping_task_kb + * + * Override this function if you have a need to execute code for every keyboard main loop iteration. + * This is specific to keyboard-level functionality. + */ +__attribute__((weak)) void housekeeping_task_kb(void) {} + +/** \brief housekeeping_task_user + * + * Override this function if you have a need to execute code for every keyboard main loop iteration. + * This is specific to user/keymap-level functionality. + */ +__attribute__((weak)) void housekeeping_task_user(void) {} + +/** \brief housekeeping_task + * + * Invokes hooks for executing code after QMK is done after each loop iteration. + */ +void housekeeping_task(void) { + housekeeping_task_kb(); + housekeeping_task_user(); +} + +/** \brief keyboard_init + * + * FIXME: needs doc + */ +void keyboard_init(void) { + timer_init(); + sync_timer_init(); +#ifdef VIA_ENABLE + via_init(); +#endif + matrix_init(); +#if defined(CRC_ENABLE) + crc_init(); +#endif +#ifdef QWIIC_ENABLE + qwiic_init(); +#endif +#ifdef OLED_ENABLE + oled_init(OLED_ROTATION_0); +#endif +#ifdef ST7565_ENABLE + st7565_init(DISPLAY_ROTATION_0); +#endif +#ifdef PS2_MOUSE_ENABLE + ps2_mouse_init(); +#endif +#ifdef SERIAL_MOUSE_ENABLE + serial_mouse_init(); +#endif +#ifdef ADB_MOUSE_ENABLE + adb_mouse_init(); +#endif +#ifdef BACKLIGHT_ENABLE + backlight_init(); +#endif +#ifdef RGBLIGHT_ENABLE + rgblight_init(); +#endif +#ifdef ENCODER_ENABLE + encoder_init(); +#endif +#ifdef STENO_ENABLE + steno_init(); +#endif +#ifdef POINTING_DEVICE_ENABLE + pointing_device_init(); +#endif +#if defined(NKRO_ENABLE) && defined(FORCE_NKRO) + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); +#endif +#ifdef DIP_SWITCH_ENABLE + dip_switch_init(); +#endif + +#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) + debug_enable = true; +#endif + + keyboard_post_init_kb(); /* Always keep this last */ +} + +/** \brief key_event_task + * + * This function is responsible for calling into other systems when they need to respond to electrical switch press events. + * This is differnet than keycode events as no layer processing, or filtering occurs. + */ +void switch_events(uint8_t row, uint8_t col, bool pressed) { +#if defined(LED_MATRIX_ENABLE) + process_led_matrix(row, col, pressed); +#endif +#if defined(RGB_MATRIX_ENABLE) + process_rgb_matrix(row, col, pressed); +#endif +} + +/** \brief Keyboard task: Do keyboard routine jobs + * + * Do routine keyboard jobs: + * + * * scan matrix + * * handle mouse movements + * * run visualizer code + * * handle midi commands + * * light LEDs + * + * This is repeatedly called as fast as possible. + */ +void keyboard_task(void) { + static matrix_row_t matrix_prev[MATRIX_ROWS]; + static uint8_t led_status = 0; + matrix_row_t matrix_row = 0; + matrix_row_t matrix_change = 0; +#ifdef QMK_KEYS_PER_SCAN + uint8_t keys_processed = 0; +#endif +#ifdef ENCODER_ENABLE + bool encoders_changed = false; +#endif + + uint8_t matrix_changed = matrix_scan(); + if (matrix_changed) last_matrix_activity_trigger(); + + for (uint8_t r = 0; r < MATRIX_ROWS; r++) { + matrix_row = matrix_get_row(r); + matrix_change = matrix_row ^ matrix_prev[r]; + if (matrix_change) { +#ifdef MATRIX_HAS_GHOST + if (has_ghost_in_row(r, matrix_row)) { + continue; + } +#endif + if (debug_matrix) matrix_print(); + matrix_row_t col_mask = 1; + for (uint8_t c = 0; c < MATRIX_COLS; c++, col_mask <<= 1) { + if (matrix_change & col_mask) { + if (should_process_keypress()) { + action_exec((keyevent_t){ + .key = (keypos_t){.row = r, .col = c}, .pressed = (matrix_row & col_mask), .time = (timer_read() | 1) /* time should not be 0 */ + }); + } + // record a processed key + matrix_prev[r] ^= col_mask; + + switch_events(r, c, (matrix_row & col_mask)); + +#ifdef QMK_KEYS_PER_SCAN + // only jump out if we have processed "enough" keys. + if (++keys_processed >= QMK_KEYS_PER_SCAN) +#endif + // process a key per task call + goto MATRIX_LOOP_END; + } + } + } + } + // call with pseudo tick event when no real key event. +#ifdef QMK_KEYS_PER_SCAN + // we can get here with some keys processed now. + if (!keys_processed) +#endif + action_exec(TICK); + +MATRIX_LOOP_END: + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_scan_perf_task(); +#endif + +#if defined(RGBLIGHT_ENABLE) + rgblight_task(); +#endif + +#ifdef LED_MATRIX_ENABLE + led_matrix_task(); +#endif +#ifdef RGB_MATRIX_ENABLE + rgb_matrix_task(); +#endif + +#if defined(BACKLIGHT_ENABLE) +# if defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS) + backlight_task(); +# endif +#endif + +#ifdef ENCODER_ENABLE + encoders_changed = encoder_read(); + if (encoders_changed) last_encoder_activity_trigger(); +#endif + +#ifdef QWIIC_ENABLE + qwiic_task(); +#endif + +#ifdef OLED_ENABLE + oled_task(); +# ifndef OLED_DISABLE_TIMEOUT + // Wake up oled if user is using those fabulous keys or spinning those encoders! +# ifdef ENCODER_ENABLE + if (matrix_changed || encoders_changed) oled_on(); +# else + if (matrix_changed) oled_on(); +# endif +# endif +#endif + +#ifdef ST7565_ENABLE + st7565_task(); +# ifndef ST7565_DISABLE_TIMEOUT + // Wake up display if user is using those fabulous keys or spinning those encoders! +# ifdef ENCODER_ENABLE + if (matrix_changed || encoders_changed) st7565_on(); +# else + if (matrix_changed) st7565_on(); +# endif +# endif +#endif + +#ifdef MOUSEKEY_ENABLE + // mousekey repeat & acceleration + mousekey_task(); +#endif + +#ifdef PS2_MOUSE_ENABLE + ps2_mouse_task(); +#endif + +#ifdef SERIAL_MOUSE_ENABLE + serial_mouse_task(); +#endif + +#ifdef ADB_MOUSE_ENABLE + adb_mouse_task(); +#endif + +#ifdef SERIAL_LINK_ENABLE + serial_link_update(); +#endif + +#ifdef VISUALIZER_ENABLE + visualizer_update(default_layer_state, layer_state, visualizer_get_mods(), host_keyboard_leds()); +#endif + +#ifdef POINTING_DEVICE_ENABLE + pointing_device_task(); +#endif + +#ifdef MIDI_ENABLE + midi_task(); +#endif + +#ifdef VELOCIKEY_ENABLE + if (velocikey_enabled()) { + velocikey_decelerate(); + } +#endif + +#ifdef JOYSTICK_ENABLE + joystick_task(); +#endif + +#ifdef DIGITIZER_ENABLE + digitizer_task(); +#endif + + // update LED + if (led_status != host_keyboard_leds()) { + led_status = host_keyboard_leds(); + keyboard_set_leds(led_status); + } +} + +/** \brief keyboard set leds + * + * FIXME: needs doc + */ +void keyboard_set_leds(uint8_t leds) { + if (debug_keyboard) { + debug("keyboard_set_led: "); + debug_hex8(leds); + debug("\n"); + } + led_set(leds); +} diff --git a/tmk_core/common/keyboard.h b/quantum/keyboard.h similarity index 100% rename from tmk_core/common/keyboard.h rename to quantum/keyboard.h diff --git a/tmk_core/common/keycode.h b/quantum/keycode.h similarity index 100% rename from tmk_core/common/keycode.h rename to quantum/keycode.h diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index e0fd6d479..780c71ab9 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -40,7 +40,10 @@ extern keymap_config_t keymap_config; action_t action_for_key(uint8_t layer, keypos_t key) { // 16bit keycodes - important uint16_t keycode = keymap_key_to_keycode(layer, key); + return action_for_keycode(keycode); +}; +action_t action_for_keycode(uint16_t keycode) { // keycode remapping keycode = keycode_config(keycode); diff --git a/quantum/keymap_extras/keymap_belgian.h b/quantum/keymap_extras/keymap_belgian.h index 6aaadf978..207905b29 100644 --- a/quantum/keymap_extras/keymap_belgian.h +++ b/quantum/keymap_extras/keymap_belgian.h @@ -156,16 +156,3 @@ // Row 4 #define BE_BSLS ALGR(BE_LABK) // (backslash) #define BE_TILD ALGR(BE_EQL) // ~ - -// DEPRECATED -#define BE_AMP BE_AMPR -#define BE_APOS BE_QUOT -#define BE_PARA BE_SECT -#define BE_MU BE_MICR -#define BE_LESS BE_LABK -#define BE_OVRR BE_DEG -#define BE_UMLT BE_DIAE -#define BE_GRTR BE_RABK -#define BE_LSBR BE_LBRC -#define BE_RSBR BE_RBRC -#define BE_TILT BE_TILD diff --git a/quantum/keymap_extras/keymap_bepo.h b/quantum/keymap_extras/keymap_bepo.h index b6244898a..72d5b81f3 100644 --- a/quantum/keymap_extras/keymap_bepo.h +++ b/quantum/keymap_extras/keymap_bepo.h @@ -181,7 +181,7 @@ #define BP_RCBR ALGR(BP_X) // } #define BP_ELLP ALGR(BP_DOT) // … #define BP_TILD ALGR(BP_K) // ~ -#define BP_IQUE ALGR(BP_QEST) // ¿ +#define BP_IQUE ALGR(BP_QUES) // ¿ #define BP_RNGA ALGR(BP_Q) // ° (dead) #define BP_DGRK ALGR(BP_G) // µ (dead Greek key) #define BP_DAGG ALGR(BP_H) // † @@ -238,168 +238,3 @@ #define BP_FORD S(ALGR(BP_F)) // ª // Row 5 #define BP_NNBS S(ALGR(BP_)) //   (narrow non-breaking space) - -// DEPRECATED -#define BP_DOLLAR BP_DLR -#define BP_DOUBLE_QUOTE BP_DQUO -#define BP_DQOT BP_DQUO -#define BP_LEFT_GUILLEMET BP_LDAQ -#define BP_LGIL BP_LDAQ -#define BP_RIGHT_GUILLEMET BP_RDAQ -#define BP_RGIL BP_RDAQ -#define BP_LEFT_PAREN BP_LPRN -#define BP_RIGHT_PAREN BP_RPRN -#define BP_MINUS BP_MINS -#define BP_SLASH BP_SLSH -#define BP_ASTERISK BP_ASTR -#define BP_EQUAL BP_EQL -#define BP_PERCENT BP_PERC -#define BP_E_ACUTE BP_EACU -#define BP_ECUT BP_EACU -#define BP_E_GRAVE BP_EGRV -#define BP_DEAD_CIRCUMFLEX BP_DCIR -#define BP_DCRC BP_DCIR -#define BP_COMMA BP_COMM -#define BP_C_CEDILLA BP_CCED -#define BP_E_CIRCUMFLEX BP_ECIR -#define BP_ECRC BP_ECIR -#define BP_A_GRAVE BP_AGRV -#define BP_APOSTROPHE BP_QUOT -#define BP_APOS BP_QUOT -#define BP_DEGREE BP_DEG -#define BP_DEGR BP_DEG -#define BP_GRAVE BP_GRV -#define BP_EXCLAIM BP_EXLM -#define BP_SCOLON BP_SCLN -#define BP_COLON BP_COLN -#define BP_QUESTION BP_QUES -#define BP_QEST BP_QUES -#define BP_NON_BREAKING_SPACE BP_NBSP -#define BP_EN_DASH BP_NDSH -#define BP_EM_DASH BP_MDSH -#define BP_LESS BP_LABK -#define BP_GREATER BP_RABK -#define BP_GRTR BP_RABK -#define BP_LBRACKET BP_LBRC -#define BP_RBRACKET BP_RBRC -#define BP_CIRCUMFLEX CIRC -#define BP_PLUS_MINUS BP_PLMN -#define BP_PSMS BP_PLMN -#define BP_MATH_MINUS BP_MMNS -#define BP_OBELUS BP_DIV -#define BP_OBEL BP_DIV -#define BP_DIVISION_SIGN BP_DIV -#define BP_DVSN BP_DIV -#define BP_TIMES BP_MUL -#define BP_TIMS BP_MUL -#define BP_DIFFERENT BP_NEQL -#define BP_DIFF BP_NEQL -#define BP_PERMILLE BP_PERM -#define BP_PMIL BP_PERM -#define BP_DEAD_ACUTE BP_ACUT -#define BP_DACT BP_ACUT -#define BP_AMPERSAND BP_AMPR -#define BP_OE_LIGATURE BP_OE -#define BP_DEAD_GRAVE BP_DGRV -#define BP_INVERTED_EXCLAIM BP_IEXL -#define BP_IXLM BP_IEXL -#define BP_DEAD_CARON BP_CARN -#define BP_DCAR BP_CARN -#define BP_DEAD_SLASH BP_DSLS -#define BP_DSLH BP_DSLS -#define BP_IJ_LIGATURE BP_IJ -#define BP_SCHWA BP_SCHW -#define BP_SCWA BP_SCHW -#define BP_DEAD_BREVE BP_BREV -#define BP_DBRV BP_BREV -#define BP_AE_LIGATURE BP_AE -#define BP_U_GRAVE BP_UGRV -#define BP_DEAD_TREMA BP_DIAE -#define BP_DTRM BP_DIAE -#define BP_TYPOGRAPHICAL_APOSTROPHE BP_COMM -#define BP_TAPO BP_COMM -#define BP_COPYRIGHT BP_COPY -#define BP_CPRT BP_COPY -#define BP_THORN BP_THRN -#define BP_SHARP_S BP_SS -#define BP_SRPS BP_SS -#define BP_REGISTERED_TRADEMARK BP_REGD -#define BP_RTM BP_REGD -#define BP_DEAD_TILDE BP_DTIL -#define BP_DTLD BP_DTIL -#define BP_DEAD_MACRON BP_MACR -#define BP_DMCR BP_MACR -#define BP_DEAD_CEDILLA BP_CEDL -#define BP_DCED BP_CEDL -#define BP_NONUS_SLASH BP_SLSH -#define BP_NUSL BP_SLSH -#define BP_BACKSLASH BP_BSLS -#define BP_LEFT_CURLY_BRACE BP_LCBR -#define BP_RIGHT_CURLY_BRACE BP_RCBR -#define BP_ELLIPSIS BP_ELLP -#define BP_ELPS BP_ELLP -#define BP_TILDE BP_TILD -#define BP_INVERTED_QUESTION BP_IQUE -#define BP_IQST BP_IQUE -#define BP_DEAD_RING BP_RNGA -#define BP_DRNG BP_RNGA -#define BP_DEAD_GREEK BP_DGRK -#define BP_DAGGER BP_DAGG -#define BP_DAGR BP_DAGG -#define BP_DEAD_OGONEK BP_OGON -#define BP_DOGO BP_OGON -#define BP_UNDERSCORE BP_UNDS -#define BP_PARAGRAPH BP_PARA -#define BP_PARG BP_PARA -#define BP_LOW_DOUBLE_QUOTE BP_DLQU -#define BP_LWQT BP_DLQU -#define BP_LEFT_DOUBLE_QUOTE BP_RDQU -#define BP_RIGHT_DOUBLE_QUOTE BP_RDQU -#define BP_LESS_OR_EQUAL BP_LEQL -#define BP_GREATER_OR_EQUAL BP_GEQL -#define BP_NEGATION BP_NOT -#define BP_NEGT BP_NOT -#define BP_ONE_QUARTER BP_QRTR -#define BP_1QRT BP_QRTR -#define BP_ONE_HALF BP_HALF -#define BP_1HLF BP_HALF -#define BP_THREE_QUARTERS TQTR -#define BP_3QRT BP_TQTR -#define BP_MINUTES BP_PRIM -#define BP_MNUT BP_PRIM -#define BP_SECONDS BP_DPRM -#define BP_SCND BP_DPRM -#define BP_BROKEN_PIPE BP_BRKP -#define BP_BPIP BP_BRKP -#define BP_DEAD_DOUBLE_ACUTE BP_DACU -#define BP_DDCT BP_DACU -#define BP_SECTION BP_SECT -#define BP_GRAVE_BIS BP_GRV -#define BP_GRVB BP_GRV -#define BP_DEAD_DOT_ABOVE BP_DOTA -#define BP_DDTA BP_DOTA -#define BP_DEAD_CURRENCY BP_CURR -#define BP_DCUR BP_CURR -#define BP_DEAD_HORN BP_HORN -#define BP_DHRN BP_HORN -#define BP_LONG_S BP_LNGS -#define BP_TRADEMARK BP_TM -#define BP_ORDINAL_INDICATOR_O MORD -#define BP_ORDO BP_MORD -#define BP_DEAD_COMMA BP_DCMM -#define BP_DCOM BP_DCMM -#define BP_LEFT_QUOTE BP_LSQU -#define BP_LQOT BP_LSQU -#define BP_RIGHT_QUOTE BP_RSQU -#define BP_RQOT BP_RSQU -#define BP_INTERPUNCT BP_MDDT -#define BP_IPCT BP_MDDT -#define BP_DEAD_HOOK_ABOVE BP_HOKA -#define BP_DHKA BP_HOKA -#define BP_DEAD_UNDERDOT BP_DOTB -#define BP_DUDT BP_DOTB -#define BP_DOUBLE_DAGGER BP_DDAG -#define BP_DDGR BP_DDAG -#define BP_ORDINAL_INDICATOR_A BP_FORD -#define BP_ORDA BP_FORD -#define BP_NARROW_NON_BREAKING_SPACE BP_NNBS diff --git a/quantum/keymap_extras/keymap_br_abnt2.h b/quantum/keymap_extras/keymap_br_abnt2.h index 310950d49..e91718013 100644 --- a/quantum/keymap_extras/keymap_br_abnt2.h +++ b/quantum/keymap_extras/keymap_br_abnt2.h @@ -158,23 +158,3 @@ #define BR_MORD ALGR(BR_RBRC) // º // Row 4 #define BR_CRUZ ALGR(BR_C) // ₢ - -// DEPRECATED -#define BR_CCDL BR_CCED -#define BR_DQT BR_DQUO -#define BR_TRMA BR_DIAE -#define BR_GRAV BR_GRV -#define BR_KPDT BR_PDOT -#define BR_KPCM BR_PCMM -#define BR_1UP BR_SUP1 -#define BR_2UP BR_SUP2 -#define BR_3UP BR_SUP3 -#define BR_ASLS BR_SLSH -#define BR_AQST BR_QUES - -// Not present on Windows 10? -#define BR_NDTD ALGR(BR_TILD) // ~ -#define BR_NDAC ALGR(BR_ACUT) // ´ -#define BR_NDGV ALGR(BR_QUOT) // ` -#define BR_NDCR ALGR(BR_CIRC) // ^ -#define BR_NDTR ALGR(BR_DIAE) // ¨ diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index d72ea3979..e328cf65e 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -252,182 +252,3 @@ #define CA_MORD RCTL(S(CA_M)) // º #define CA_MUL RCTL(S(CA_COMM)) // × #define CA_DIV RCTL(S(CA_DOT)) // ÷ - -// DEPRECATED -#define GR2A(kc) RCTL(kc) -#define CSA_SLASH CA_SLSH -#define CSA_SLSH CA_SLSH -#define CSA_DEAD_CIRCUMFLEX CA_CIRC -#define CSA_DCRC CA_CIRC -#define CSA_C_CEDILLA CA_CCED -#define CSA_CCED CA_CCED -#define CSA_E_GRAVE CA_EGRV -#define CSA_EGRV CA_EGRV -#define CSA_A_GRAVE CA_AGRV -#define CSA_AGRV CA_AGRV -#define CSA_U_GRAVE CA_UGRV -#define CSA_UGRV CA_UGRV -#define CSA_E_ACUTE CA_EACU -#define CSA_ECUT CA_EACU -#define CSA_BACKSLASH CA_BSLS -#define CSA_BSLS CA_BSLS -#define CSA_QUESTION CA_QUES -#define CSA_QEST CA_QUES -#define CSA_DEAD_TREMA CA_DIAE -#define CSA_DTRM CA_DIAE -#define CSA_APOSTROPHE CA_QUOT -#define CSA_APOS CA_QUOT -#define CSA_DOUBLE_QUOTE CA_DQUO -#define CSA_DQOT CA_DQUO -#define CSA_PIPE CA_PIPE -#define CSA_CURRENCY CA_CURR -#define CSA_CURR CA_CURR -#define CSA_LEFT_CURLY_BRACE CA_LCBR -#define CSA_LCBR CA_LCBR -#define CSA_RIGHT_CURLY_BRACE CA_RCBR -#define CSA_RCBR CA_RCBR -#define CSA_LBRACKET CA_LBRC -#define CSA_LBRC CA_LBRC -#define CSA_RBRACKET CA_RBRC -#define CSA_RBRC CA_RBRC -#define CSA_NEGATION CA_NOT -#define CSA_NEGT CA_NOT -#define CSA_EURO CA_EURO -#define CSA_DEAD_GRAVE CA_GRV -#define CSA_DGRV CA_GRV -#define CSA_DEAD_TILDE CA_DTIL -#define CSA_DTLD CA_DTIL -#define CSA_DEGREE CA_DEG -#define CSA_DEGR CA_DEG -#define CSA_LEFT_GUILLEMET CA_LDAQ -#define CSA_LGIL CA_LDAQ -#define CSA_RIGHT_GUILLEMET CA_RDAQ -#define CSA_RGIL CA_RDAQ -#define CSA_LESS CA_LABK -#define CSA_GREATER CA_RABK -#define CSA_GRTR CA_RABK -#define CSA_NON_BREAKING_SPACE ALGR(KC_SPC) -#define CSA_NBSP ALGR(KC_SPC) -#define CSA_SUPERSCRIPT_ONE CA_SUP1 -#define CSA_SUP1 CA_SUP1 -#define CSA_SUPERSCRIPT_TWO CA_SUP2 -#define CSA_SUP2 CA_SUP2 -#define CSA_SUPERSCRIPT_THREE CA_SUP3 -#define CSA_SUP3 CA_SUP3 -#define CSA_ONE_QUARTER CA_QRTR -#define CSA_1QRT CA_QRTR -#define CSA_ONE_HALF CA_HALF -#define CSA_1HLF CA_HALF -#define CSA_THREE_QUARTERS CA_TQTR -#define CSA_3QRT CA_TQTR -#define CSA_DEAD_CEDILLA CA_CEDL -#define CSA_DCED CA_CEDL -#define CSA_OMEGA CA_OMEG -#define CSA_OMEG CA_OMEG -#define CSA_L_STROKE CA_LSTR -#define CSA_LSTK CA_LSTR -#define CSA_OE_LIGATURE CA_OE -#define CSA_OE CA_OE -#define CSA_PARAGRAPH CA_PARA -#define CSA_PARG CA_PARA -#define CSA_T_STROKE CA_TSTR -#define CSA_LEFT_ARROW CA_LARR -#define CSA_LARW CA_LARR -#define CSA_DOWN_ARROW CA_DARR -#define CSA_DARW CA_DARR -#define CSA_RIGHT_ARROW CA_RARR -#define CSA_RARW CA_RARR -#define CSA_O_STROKE CA_OSTR -#define CSA_OSTK CA_OSTR -#define CSA_THORN CA_THRN -#define CSA_THRN CA_THRN -#define CSA_TILDE CA_TILD -#define CSA_TILD CA_TILD -#define CSA_AE_LIGATURE CA_AE -#define CSA_AE CA_AE -#define CSA_SHARP_S CA_SS -#define CSA_SRPS CA_SS -#define CSA_ETH CA_ETH -#define CSA_ENG CA_ENG -#define CSA_H_SRTOKE CA_HSTR -#define CSA_HSTK CA_HSTR -#define CSA_IJ_LIGATURE CA_IJ -#define CSA_IJ CA_IJ -#define CSA_KRA CA_KRA -#define CSA_L_FLOWN_DOT CA_LMDT -#define CSA_LFLD CA_LMDT -#define CSA_DEAD_ACUTE CA_ACUT -#define CSA_DACT CA_ACUT -#define CSA_CENT CA_CENT -#define CSA_LEFT_DOUBLE_QUOTE CA_LDQU -#define CSA_LDQT CA_LDQU -#define CSA_RIGHT_DOUBLE_QUOTE CA_RDQU -#define CSA_RDQT CA_RDQU -#define CSA_N_APOSTROPHE CA_APSN -#define CSA_NAPO CA_APSN -#define CSA_MU CA_MICR -#define CSA_HORIZONTAL_BAR CA_HRZB -#define CSA_HZBR CA_HRZB -#define CSA_DEAD_DOT_ABOVE CA_DOTA -#define CSA_DDTA CA_DOTA -#define CSA_SOFT_HYPHEN CA_SHYP -#define CSA_SHYP CA_SHYP -#define CSA_INVERTED_EXCLAIM CA_IEXL -#define CSA_IXLM CA_IEXL -#define CSA_POUND CA_PND -#define CSA_GBP CA_PND -#define CSA_EURO_BIS CA_EURO -#define CSA_EURB CA_EURO -#define CSA_THREE_EIGHTHS CA_TEIG -#define CSA_3ON8 CA_TEIG -#define CSA_FIVE_EIGHTHS CA_FEIG -#define CSA_5ON8 CA_FEIG -#define CSA_SEVEN_EIGHTHS CA_SEIG -#define CSA_7ON8 CA_SEIG -#define CSA_TRADEMARK CA_TM -#define CSA_TM CA_TM -#define CSA_PLUS_MINUS CA_PLMN -#define CSA_PSMS CA_PLMN -#define CSA_INVERTED_QUESTION CA_IQUE -#define CSA_IQST CA_IQUE -#define CSA_DEAD_OGONEK CA_OGON -#define CSA_DOGO CA_OGON -#define CSA_REGISTERED_TRADEMARK CA_REGD -#define CSA_RTM CA_REGD -#define CSA_YEN CA_YEN -#define CSA_YUAN CA_YEN -#define CSA_UP_ARROW CA_UARR -#define CSA_DOTLESS_I CA_DLSI -#define CSA_DLSI CA_DLSI -#define CSA_DEAD_RING CA_RNGA -#define CSA_DRNG CA_RNGA -#define CSA_DEAD_MACRON CA_MACR -#define CSA_DMCR CA_MACR -#define CSA_SECTION CA_SECT -#define CSA_SECT CA_SECT -#define CSA_ORDINAL_INDICATOR_A CA_FORD -#define CSA_ORDA CA_FORD -#define CSA_DEAD_DOUBLE_ACUTE CA_DACU -#define CSA_DDCT CA_DACU -#define CSA_DEAD_CARON CA_CARN -#define CSA_DCAR CA_CARN -#define CSA_DEAD_BREVE CA_BREV -#define CSA_DBRV CA_BREV -#define CSA_BROKEN_PIPE CA_BRKP -#define CSA_BPIP CA_BRKP -#define CSA_COPYRIGHT CA_COPY -#define CSA_CPRT CA_COPY -#define CSA_LEFT_QUOTE CA_LSQU -#define CSA_LQOT CA_LSQU -#define CSA_RIGHT_QUOTE CA_RSQU -#define CSA_RQOT CA_RSQU -#define CSA_EIGHTH_NOTE CA_ENOT -#define CSA_8NOT CA_ENOT -#define CSA_ORDINAL_INDICATOR_O CA_MORD -#define CSA_ORDO CA_MORD -#define CSA_TIMES CA_MUL -#define CSA_TIMS CA_MUL -#define CSA_OBELUS CA_DIV -#define CSA_OBEL CA_DIV -#define CSA_DIVISION_SIGN CA_DIV -#define CSA_DVSN CA_DIV diff --git a/quantum/keymap_extras/keymap_colemak.h b/quantum/keymap_extras/keymap_colemak.h index a97be9ad5..6658cc130 100644 --- a/quantum/keymap_extras/keymap_colemak.h +++ b/quantum/keymap_extras/keymap_colemak.h @@ -123,35 +123,3 @@ #define CM_LABK S(CM_COMM) // < #define CM_RABK S(CM_DOT) // > #define CM_QUES S(CM_SLSH) // / - -// DEPRECATED -#define KC_CM_Q CM_Q -#define KC_CM_W CM_W -#define KC_CM_F CM_F -#define KC_CM_P CM_P -#define KC_CM_G CM_G -#define KC_CM_J CM_J -#define KC_CM_L CM_L -#define KC_CM_U CM_U -#define KC_CM_Y CM_Y -#define KC_CM_SCLN CM_SCLN -#define KC_CM_A CM_A -#define KC_CM_R CM_R -#define KC_CM_S CM_S -#define KC_CM_T CM_T -#define KC_CM_D CM_D -#define KC_CM_H CM_H -#define KC_CM_N CM_N -#define KC_CM_E CM_E -#define KC_CM_I CM_I -#define KC_CM_O CM_O -#define KC_CM_Z CM_Z -#define KC_CM_X CM_X -#define KC_CM_C CM_C -#define KC_CM_V CM_V -#define KC_CM_B CM_B -#define KC_CM_K CM_K -#define KC_CM_M CM_M -#define KC_CM_COMM CM_COMM -#define KC_CM_DOT CM_DOT -#define KC_CM_SLSH CM_SLSH diff --git a/quantum/keymap_extras/keymap_fr_ch.h b/quantum/keymap_extras/keymap_fr_ch.h index fea44324b..b1f2455a6 100644 --- a/quantum/keymap_extras/keymap_fr_ch.h +++ b/quantum/keymap_extras/keymap_fr_ch.h @@ -162,82 +162,3 @@ #define CH_RCBR ALGR(CH_DLR) // } // Row 4 #define CH_BSLS ALGR(CH_LABK) // (backslash) - -// DEPRECATED -#define FR_CH_Z CH_Z -#define FR_CH_Y CH_Y -#define FR_CH_A CH_A -#define FR_CH_B CH_B -#define FR_CH_C CH_C -#define FR_CH_D CH_D -#define FR_CH_E CH_E -#define FR_CH_F CH_F -#define FR_CH_G CH_G -#define FR_CH_H CH_H -#define FR_CH_I CH_I -#define FR_CH_J CH_J -#define FR_CH_K CH_K -#define FR_CH_L CH_L -#define FR_CH_M CH_M -#define FR_CH_N CH_N -#define FR_CH_O CH_O -#define FR_CH_P CH_P -#define FR_CH_Q CH_Q -#define FR_CH_R CH_R -#define FR_CH_S CH_S -#define FR_CH_T CH_T -#define FR_CH_U CH_U -#define FR_CH_V CH_V -#define FR_CH_W CH_W -#define FR_CH_X CH_X -#define FR_CH_0 CH_0 -#define FR_CH_1 CH_1 -#define FR_CH_2 CH_2 -#define FR_CH_3 CH_3 -#define FR_CH_4 CH_4 -#define FR_CH_5 CH_5 -#define FR_CH_6 CH_6 -#define FR_CH_7 CH_7 -#define FR_CH_8 CH_8 -#define FR_CH_9 CH_9 -#define FR_CH_DOT CH_DOT -#define FR_CH_COMM CH_COMM -#define FR_CH_QUOT CH_QUOT -#define FR_CH_AE CH_AGRV -#define FR_CH_UE CH_EGRV -#define FR_CH_OE CH_EACU -#define FR_CH_CIRC CH_CIRC -#define FR_CH_LESS CH_LABK -#define FR_CH_MINS CH_MINS -#define FR_CH_DLR CH_DLR -#define FR_CH_PARA CH_SECT -#define FR_CH_DIAE CH_DIAE -#define FR_CH_RING CH_DEG -#define FR_CH_EXLM CH_EXLM -#define FR_CH_PLUS CH_PLUS -#define FR_CH_DQOT CH_DQUO -#define FR_CH_ASTR CH_ASTR -#define FR_CH_PERC CH_PERC -#define FR_CH_AMPR CH_AMPR -#define FR_CH_SLSH CH_SLSH -#define FR_CH_LPRN CH_LPRN -#define FR_CH_RPRN CH_RPRN -#define FR_CH_EQL CH_EQL -#define FR_CH_QST CH_QUES -#define FR_CH_MORE CH_RABK -#define FR_CH_COLN CH_COLN -#define FR_CH_SCLN CH_SCLN -#define FR_CH_UNDS CH_UNDS -#define FR_CH_CCED CH_CCED -#define FR_CH_GRV CH_GRV -#define FR_CH_LCBR CH_LCBR -#define FR_CH_LBRC CH_LBRC -#define FR_CH_RBRC CH_RBRC -#define FR_CH_RCBR CH_RCBR -#define FR_CH_BSLS CH_BSLS -#define FR_CH_AT CH_AT -#define FR_CH_EURO CH_EURO -#define FR_CH_TILD CH_TILD -#define FR_CH_PIPE CH_PIPE -#define FR_CH_HASH CH_HASH -#define FR_CH_ACUT CH_ACUT diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h index c62f2c403..0be53f0a9 100644 --- a/quantum/keymap_extras/keymap_french.h +++ b/quantum/keymap_extras/keymap_french.h @@ -152,14 +152,3 @@ // Row 2 #define FR_EURO ALGR(KC_E) // € #define FR_CURR ALGR(FR_DLR) // ¤ - -// DEPRECATED -#define FR_AMP FR_AMPR -#define FR_APOS FR_QUOT -#define FR_LESS FR_LABK -#define FR_OVRR FR_DEG -#define FR_UMLT FR_DIAE -#define FR_MU FR_MICR -#define FR_GRTR FR_RABK -#define FR_CCIRC FR_CIRC -#define FR_BULT FR_CURR diff --git a/quantum/keymap_extras/keymap_french_osx.h b/quantum/keymap_extras/keymap_french_osx.h index 76eb22191..590a57e55 100644 --- a/quantum/keymap_extras/keymap_french_osx.h +++ b/quantum/keymap_extras/keymap_french_osx.h @@ -246,15 +246,3 @@ #define FR_IQUE S(A(FR_COMM)) // ¿ #define FR_BSLS S(A(FR_COLN)) // (backslash) #define FR_PLMN S(A(FR_EQL)) // ± - -// DEPRECATED -#define FR_AMP FR_AMPR -#define FR_EACU FR_LEAC -#define FR_APOS FR_QUOT -#define FR_EGRV FR_LEGR -#define FR_CCED FR_LCCE -#define FR_AGRV FR_LAGR -#define FR_UGRV FR_LUGR -#define FR_LESS FR_LABK -#define FR_UMLT FR_DIAE -#define FR_GRTR FR_RABK diff --git a/quantum/keymap_extras/keymap_german.h b/quantum/keymap_extras/keymap_german.h index 924bde6d3..085995b0c 100644 --- a/quantum/keymap_extras/keymap_german.h +++ b/quantum/keymap_extras/keymap_german.h @@ -151,16 +151,3 @@ // Row 4 #define DE_PIPE ALGR(DE_LABK) // | #define DE_MICR ALGR(DE_M) // µ - -// DEPRECATED -#define DE_UE DE_UDIA -#define DE_OE DE_ODIA -#define DE_AE DE_ADIA -#define DE_LESS DE_LABK -#define DE_RING DE_DEG -#define DE_DQOT DE_DQUO -#define DE_PARA DE_SECT -#define DE_QST DE_QUES -#define DE_MORE DE_RABK -#define DE_SQ2 DE_SUP2 -#define DE_SQ3 DE_SUP3 diff --git a/quantum/keymap_extras/keymap_german_ch.h b/quantum/keymap_extras/keymap_german_ch.h index fee37eabb..672383687 100644 --- a/quantum/keymap_extras/keymap_german_ch.h +++ b/quantum/keymap_extras/keymap_german_ch.h @@ -162,21 +162,3 @@ #define CH_RCBR ALGR(CH_DLR) // } // Row 4 #define CH_BSLS ALGR(CH_LABK) // (backslash) - -// DEPRECATED -#define CH_AE CH_ADIA -#define CH_UE CH_UDIA -#define CH_OE CH_ODIA -#define CH_PARA CH_SECT -#define CH_CARR CH_CIRC -#define CH_DIER CH_DIAE -#define CH_LESS CH_LABK -#define CH_RING CH_DEG -#define CH_DQOT CH_DQUO -#define CH_PAST CH_ASTR -#define CH_CELA CH_CCED -#define CH_QST CH_QUES -#define CH_POND CH_PND -#define CH_MORE CH_RABK -#define CH_BRBR CH_BRKP -#define CH_NOTL CH_NOT diff --git a/quantum/keymap_extras/keymap_german_osx.h b/quantum/keymap_extras/keymap_german_osx.h index be109a721..82404fa5f 100644 --- a/quantum/keymap_extras/keymap_german_osx.h +++ b/quantum/keymap_extras/keymap_german_osx.h @@ -241,83 +241,3 @@ #define DE_OGON S(A(DE_COMM)) // ˛ #define DE_DIV S(A(DE_DOT)) // ÷ #define DE_MDSH S(A(DE_MINS)) // — - -// DEPRECATED -#define DE_OSX_CIRC DE_CIRC -#define DE_OSX_1 DE_1 -#define DE_OSX_2 DE_2 -#define DE_OSX_3 DE_3 -#define DE_OSX_4 DE_4 -#define DE_OSX_5 DE_5 -#define DE_OSX_6 DE_6 -#define DE_OSX_7 DE_7 -#define DE_OSX_8 DE_8 -#define DE_OSX_9 DE_9 -#define DE_OSX_0 DE_0 -#define DE_OSX_SS DE_SS -#define DE_OSX_ACUT DE_ACUT -#define DE_OSX_Q DE_Q -#define DE_OSX_W DE_W -#define DE_OSX_E DE_E -#define DE_OSX_R DE_R -#define DE_OSX_T DE_T -#define DE_OSX_Z DE_Z -#define DE_OSX_U DE_U -#define DE_OSX_I DE_I -#define DE_OSX_O DE_O -#define DE_OSX_P DE_P -#define DE_OSX_UE DE_UDIA -#define DE_OSX_PLUS DE_PLUS -#define DE_OSX_A DE_A -#define DE_OSX_S DE_S -#define DE_OSX_D DE_D -#define DE_OSX_F DE_F -#define DE_OSX_G DE_G -#define DE_OSX_H DE_H -#define DE_OSX_J DE_J -#define DE_OSX_K DE_K -#define DE_OSX_L DE_L -#define DE_OSX_OE DE_ODIA -#define DE_OSX_AE DE_ADIA -#define DE_OSX_HASH DE_HASH -#define DE_OSX_LESS DE_LABK -#define DE_OSX_Y DE_Y -#define DE_OSX_X DE_X -#define DE_OSX_C DE_C -#define DE_OSX_V DE_V -#define DE_OSX_B DE_B -#define DE_OSX_N DE_N -#define DE_OSX_M DE_M -#define DE_OSX_COMM DE_COMM -#define DE_OSX_DOT DE_DOT -#define DE_OSX_MINS DE_MINS - -#define DE_OSX_RING DE_DEG -#define DE_OSX_EXLM DE_EXLM -#define DE_OSX_DQOT DE_DQUO -#define DE_OSX_PARA DE_SECT -#define DE_OSX_DLR DE_DLR -#define DE_OSX_PERC DE_PERC -#define DE_OSX_AMPR DE_AMPR -#define DE_OSX_SLSH DE_SLSH -#define DE_OSX_LPRN DE_LPRN -#define DE_OSX_RPRN DE_RPRN -#define DE_OSX_EQL DE_EQL -#define DE_OSX_QST DE_QUES -#define DE_OSX_GRV DE_GRV -#define DE_OSX_ASTR DE_ASTR -#define DE_OSX_QUOT DE_QUOT -#define DE_OSX_MORE DE_RABK -#define DE_OSX_COLN DE_COLN -#define DE_OSX_SCLN DE_SCLN -#define DE_OSX_UNDS DE_UNDS - -#define DE_OSX_LBRC DE_LBRC -#define DE_OSX_RBRC DE_RBRC -#define DE_OSX_PIPE DE_PIPE -#define DE_OSX_LCBR DE_LCBR -#define DE_OSX_RCBR DE_RCBR -#define DE_OSX_AT DE_AT -#define DE_OSX_EURO DE_EURO -#define DE_OSX_TILD DE_TILD -#define DE_OSX_BSLS DE_BSLS diff --git a/quantum/keymap_extras/keymap_hungarian.h b/quantum/keymap_extras/keymap_hungarian.h index 1b282a461..a4e4b1a52 100644 --- a/quantum/keymap_extras/keymap_hungarian.h +++ b/quantum/keymap_extras/keymap_hungarian.h @@ -169,22 +169,3 @@ #define HU_RCBR ALGR(HU_N) // } #define HU_SCLN ALGR(HU_COMM) // ; #define HU_ASTR ALGR(HU_MINS) // * - -// DEPRECATED -#define HU_OE HU_ODIA -#define HU_UE HU_UDIA -#define HU_OO HU_OACU -#define HU_OEE HU_ODAC -#define HU_UU HU_UACU -#define HU_EE HU_EACU -#define HU_AA HU_AACU -#define HU_UEE HU_UDAC -#define HU_II HU_IACU -#define HU_PARA HU_SECT -#define HU_DQOT HU_DQUO -#define HU_QST HU_QUES -#define HU_BRV HU_BREV -#define HU_RING HU_RNGA -#define HU_CRSS HU_MUL -#define HU_LESS HU_LABK -#define HU_MORE HU_RABK diff --git a/quantum/keymap_extras/keymap_italian.h b/quantum/keymap_extras/keymap_italian.h index 5d19e56d3..be495f85b 100644 --- a/quantum/keymap_extras/keymap_italian.h +++ b/quantum/keymap_extras/keymap_italian.h @@ -163,22 +163,3 @@ // Row 2 #define IT_LCBR S(ALGR(IT_EGRV)) // { #define IT_RCBR S(ALGR(IT_PLUS)) // } - -// DEPRECATED -#define IT_BKSL IT_BSLS -#define IT_APOS IT_QUOT -#define IT_IACC IT_IGRV -#define IT_EACC IT_EGRV -#define IT_OACC IT_OGRV -#define IT_AACC IT_AGRV -#define IT_UACC IT_UGRV -#define IT_LESS IT_LABK -#define IT_DQOT IT_DQUO -#define IT_STRL IT_PND -#define IT_QST IT_QUES -#define IT_CRC IT_CIRC -#define IT_MORE IT_RABK -#define IT_SHRP IT_HASH - -#define IT_X_PLUS X_RBRACKET -#define IT_ACUT diff --git a/quantum/keymap_extras/keymap_italian_osx_ansi.h b/quantum/keymap_extras/keymap_italian_osx_ansi.h index 488a6561e..c2b8e3cad 100644 --- a/quantum/keymap_extras/keymap_italian_osx_ansi.h +++ b/quantum/keymap_extras/keymap_italian_osx_ansi.h @@ -248,21 +248,3 @@ #define IT_CUAC S(A(IT_M)) // Ú #define IT_MDDT S(A(IT_DOT)) // · #define IT_MDSH S(A(IT_MINS)) // — - -// DEPRECATED -#define IT_LESS IT_LABK -#define IT_APOS IT_QUOT -#define IT_IACC IT_IGRV -#define IT_EACC IT_EGRV -#define IT_UACC IT_UGRV -#define IT_OACC IT_OGRV -#define IT_AACC IT_AGRV -#define IT_MORE IT_RABK -#define IT_DQOT IT_DQUO -#define IT_STRL IT_PND -#define IT_QST IT_QUES -#define IT_CRC IT_CIRC -#define IT_DEGR IT_DEG -#define IT_TILDE IT_TILD -#define IT_GRAVE IT_GRV -#define IT_SHRP IT_HASH diff --git a/quantum/keymap_extras/keymap_italian_osx_iso.h b/quantum/keymap_extras/keymap_italian_osx_iso.h index e4fb03acf..61f76ddba 100644 --- a/quantum/keymap_extras/keymap_italian_osx_iso.h +++ b/quantum/keymap_extras/keymap_italian_osx_iso.h @@ -249,21 +249,3 @@ #define IT_CUAC S(A(IT_M)) // Ú #define IT_MDDT S(A(IT_DOT)) // · #define IT_MDSH S(A(IT_MINS)) // — - -// DEPRECATED -#define IT_APOS IT_QUOT -#define IT_IACC IT_IGRV -#define IT_EACC IT_EGRV -#define IT_OACC IT_OGRV -#define IT_AACC IT_AGRV -#define IT_UACC IT_UGRV -#define IT_LESS IT_LABK -#define IT_DQOT IT_DQUO -#define IT_STRL IT_PND -#define IT_QST IT_QUES -#define IT_CRC IT_CIRC -#define IT_DEGR IT_DEG -#define IT_MORE IT_RABK -#define IT_TILDE IT_TILD -#define IT_GRAVE IT_GRV -#define IT_SHRP IT_HASH diff --git a/quantum/keymap_extras/keymap_jp.h b/quantum/keymap_extras/keymap_jp.h index cd3c08f9f..d10feb585 100644 --- a/quantum/keymap_extras/keymap_jp.h +++ b/quantum/keymap_extras/keymap_jp.h @@ -137,12 +137,3 @@ #define JP_RABK S(JP_DOT) // > #define JP_QUES S(JP_SLSH) // ? #define JP_UNDS S(JP_BSLS) // _ - -// DEPRECATED -#define JP_ZHTG JP_ZKHK -#define JP_DQT JP_DQUO -#define JP_LT JP_LABK -#define JP_GT JP_RABK - -#define JP_MEISU KC_LANG2 // Eisū (英数) on macOS -#define JP_MKANA KC_LANG1 // Kana (かな) on macOS diff --git a/quantum/keymap_extras/keymap_neo2.h b/quantum/keymap_extras/keymap_neo2.h index 8d5323c6a..f9fc00d79 100644 --- a/quantum/keymap_extras/keymap_neo2.h +++ b/quantum/keymap_extras/keymap_neo2.h @@ -88,55 +88,3 @@ #define NE_J KC_SLSH // J // Row 5 #define NE_L4R KC_ALGR // (layer 4) - -// DEPRECATED -#define NEO_A NE_A -#define NEO_B NE_B -#define NEO_C NE_C -#define NEO_D NE_D -#define NEO_E NE_E -#define NEO_F NE_F -#define NEO_G NE_G -#define NEO_H NE_H -#define NEO_I NE_I -#define NEO_J NE_J -#define NEO_K NE_K -#define NEO_L NE_L -#define NEO_M NE_M -#define NEO_N NE_N -#define NEO_O NE_O -#define NEO_P NE_P -#define NEO_Q NE_Q -#define NEO_R NE_R -#define NEO_S NE_S -#define NEO_T NE_T -#define NEO_U NE_U -#define NEO_V NE_V -#define NEO_W NE_W -#define NEO_X NE_X -#define NEO_Y NE_Y -#define NEO_Z NE_Z -#define NEO_AE NE_ADIA -#define NEO_OE NE_ODIA -#define NEO_UE NE_UDIA -#define NEO_SS NE_SS -#define NEO_DOT NE_DOT -#define NEO_COMM NE_COMM -#define NEO_1 NE_1 -#define NEO_2 NE_2 -#define NEO_3 NE_3 -#define NEO_4 NE_4 -#define NEO_5 NE_5 -#define NEO_6 NE_6 -#define NEO_7 NE_7 -#define NEO_8 NE_8 -#define NEO_9 NE_9 -#define NEO_0 NE_0 -#define NEO_MINS NE_MINS -#define NEO_ACUT NE_ACUT -#define NEO_GRV NE_GRV -#define NEO_CIRC NE_CIRC -#define NEO_L1_L NE_L3L -#define NEO_L1_R NE_L3R -#define NEO_L2_L NE_L4L -#define NEO_L2_R NE_L4R diff --git a/quantum/keymap_extras/keymap_norwegian.h b/quantum/keymap_extras/keymap_norwegian.h index 74c0c1ae2..b2499f4fd 100644 --- a/quantum/keymap_extras/keymap_norwegian.h +++ b/quantum/keymap_extras/keymap_norwegian.h @@ -150,26 +150,3 @@ #define NO_TILD ALGR(NO_DIAE) // ~ (dead) // Row 4 #define NO_MICR ALGR(NO_M) // µ - -// DEPRECATED -#define NO_AM NO_ARNG -#define NO_AA NO_ARNG -#define NO_OSLH NO_OSTR -#define NO_APOS NO_QUOT -#define NO_LESS NO_LABK -#define NO_QUO2 NO_DQUO -#define NO_BULT NO_CURR -#define NO_GRTR NO_RABK -#define NO_MU NO_MICR -// Norwegian macOS symbols -#define NO_ACUT_MAC NO_BSLS // ´ -#define NO_APOS_MAC NO_LABK // ' -#define NO_AT_MAC NO_QUOT // @ -#define NO_BSLS_MAC S(ALGR(NO_7)) // (backslash) -#define NO_DLR_MAC S(NO_4) // $ -#define NO_GRV_MAC ALGR(NO_BSLS) // ` -#define NO_GRTR_MAC S(NO_PIPE) // > -#define NO_LCBR_MAC S(ALGR(NO_8)) // { -#define NO_LESS_MAC NO_PIPE // < -#define NO_PIPE_MAC ALGR(NO_7) // | -#define NO_RCBR_MAC S(ALGR(NO_9)) // } diff --git a/quantum/keymap_extras/keymap_slovenian.h b/quantum/keymap_extras/keymap_slovenian.h index 06be62cf3..827fa06c2 100644 --- a/quantum/keymap_extras/keymap_slovenian.h +++ b/quantum/keymap_extras/keymap_slovenian.h @@ -161,11 +161,3 @@ #define SI_LCBR ALGR(SI_B) // { #define SI_RCBR ALGR(SI_N) // } #define SI_SECT ALGR(SI_M) // § - -// DEPRECATED -#define SI_QOT SI_QUOT -#define SI_SV SI_SCAR -#define SI_CV SI_CCAR -#define SI_ZV SI_ZCAR -#define SI_DQOT SI_DQUO -#define SI_QST SI_QUES diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h index 4e888c513..8432c56e9 100644 --- a/quantum/keymap_extras/keymap_spanish.h +++ b/quantum/keymap_extras/keymap_spanish.h @@ -151,12 +151,3 @@ // Row 3 #define ES_LCBR ALGR(ES_ACUT) // { #define ES_RCBR ALGR(ES_CCED) // } - -// DEPRECATED -#define ES_OVRR ES_MORD -#define ES_APOS ES_QUOT -#define ES_LESS ES_LABK -#define ES_ASML ES_FORD -#define ES_OVDT ES_BULT -#define ES_UMLT ES_DIAE -#define ES_GRTR ES_RABK diff --git a/quantum/keymap_extras/keymap_steno.h b/quantum/keymap_extras/keymap_steno.h index b9115fb8b..ab95b43fd 100644 --- a/quantum/keymap_extras/keymap_steno.h +++ b/quantum/keymap_extras/keymap_steno.h @@ -72,3 +72,21 @@ enum steno_keycodes { STN_ZR, STN__MAX = STN_ZR, // must be less than QK_STENO_BOLT }; + +#ifdef STENO_COMBINEDMAP +enum steno_combined_keycodes +{ + STN_S3 = QK_STENO_COMB, + STN_TKL, + STN_PWL, + STN_HRL, + STN_FRR, + STN_PBR, + STN_LGR, + STN_TSR, + STN_DZR, + STN_AO, + STN_EU, + STN_COMB_MAX = STN_EU, +}; +#endif diff --git a/quantum/keymap_extras/keymap_swedish.h b/quantum/keymap_extras/keymap_swedish.h index aef8d003d..cadb66d3b 100644 --- a/quantum/keymap_extras/keymap_swedish.h +++ b/quantum/keymap_extras/keymap_swedish.h @@ -154,26 +154,3 @@ // DEPRECATED #include "keymap_nordic.h" - -#define SE_OSLH SE_ODIA -#define SE_APOS SE_QUOT -#define SE_LESS SE_LABK -#define SE_QUO2 SE_DQUO -#define SE_BULT SE_CURR -#define SE_GRTR SE_RABK -#define SE_AA SE_ARNG -#define SE_AE SE_ADIA -#define SE_AM SE_ARNG -#define SE_MU SE_MICR -// Swedish macOS symbols (not vetted) -#define SE_ACUT_MAC SE_ACUT -#define SE_APOS_MAC SE_LABK -#define SE_AT_MAC SE_ADIA -#define SE_BSLS_MAC S(SE_LCBR) -#define SE_DLR_MAC SE_CURR -#define SE_GRV_MAC SE_BSLS -#define SE_GRTR_MAC SE_HALF -#define SE_LCBR_MAC S(SE_LBRC) -#define SE_LESS_MAC SE_SECT -#define SE_PIPE_MAC SE_LCBR -#define SE_RCBR_MAC S(SE_RBRC) diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h index 1eba0ed2f..03fe8149f 100644 --- a/quantum/keymap_extras/keymap_uk.h +++ b/quantum/keymap_extras/keymap_uk.h @@ -149,78 +149,3 @@ #define UK_OACU ALGR(KC_O) // Ó // Row 3 #define UK_AACU ALGR(KC_A) // Á - -// DEPRECATED -#define UK_ESC KC_ESC -#define UK_F1 KC_F1 -#define UK_F2 KC_F2 -#define UK_F3 KC_F3 -#define UK_F4 KC_F4 -#define UK_F5 KC_F5 -#define UK_F6 KC_F6 -#define UK_F7 KC_F7 -#define UK_F8 KC_F8 -#define UK_F9 KC_F9 -#define UK_F10 KC_F10 -#define UK_F11 KC_F11 -#define UK_F12 KC_F12 -#define UK_PSCR KC_PSCR -#define UK_SLCK KC_SLCK -#define UK_PAUS KC_PAUS -#define UK_BSPC KC_BSPC -#define UK_TAB KC_TAB -#define UK_ENT KC_ENT -#define UK_LSFT KC_LSFT -#define UK_RSFT KC_RSFT -#define UK_LCTL KC_LCTL -#define UK_LGUI KC_LGUI -#define UK_LALT KC_LALT -#define UK_SPC KC_SPC -#define UK_RALT KC_RALT -#define UK_RGUI KC_RGUI -#define UK_RCTL KC_RCTL -#define UK_INS KC_INS -#define UK_DEL KC_DEL -#define UK_HOME KC_HOME -#define UK_END KC_END -#define UK_PGUP KC_PGUP -#define UK_PGDN KC_PGDN -#define UK_UP KC_UP -#define UK_LEFT KC_LEFT -#define UK_DOWN KC_DOWN -#define UK_RGHT KC_RGHT -#define UK_PSLS KC_PSLS -#define UK_PAST KC_PAST -#define UK_PMNS KC_PMNS -#define UK_PPLS KC_PPLS -#define UK_PENT KC_PENT -#define UK_P1 KC_P1 -#define UK_P2 KC_P2 -#define UK_P3 KC_P3 -#define UK_P4 KC_P4 -#define UK_P5 KC_P5 -#define UK_P6 KC_P6 -#define UK_P7 KC_P7 -#define UK_P8 KC_P8 -#define UK_P9 KC_P9 -#define UK_P0 KC_P0 -#define UK_PDOT KC_PDOT -#define UK_PEQL KC_PEQL -#define UK_PCMM KC_PCMM -#define UK_F13 KC_F13 -#define UK_F14 KC_F14 -#define UK_F15 KC_F15 -#define UK_F16 KC_F16 -#define UK_F17 KC_F17 -#define UK_F18 KC_F18 -#define UK_F19 KC_F19 -#define UK_F20 KC_F20 -#define UK_F21 KC_F21 -#define UK_F22 KC_F22 -#define UK_F23 KC_F23 -#define UK_F24 KC_F24 -#define UK_EACT UK_EACU -#define UK_UACT UK_UACU -#define UK_IACT UK_IACU -#define UK_OACT UK_OACU -#define UK_AACT UK_OACU diff --git a/quantum/keymap_extras/keymap_workman.h b/quantum/keymap_extras/keymap_workman.h index 4c7530aa0..6367d6835 100644 --- a/quantum/keymap_extras/keymap_workman.h +++ b/quantum/keymap_extras/keymap_workman.h @@ -123,32 +123,3 @@ #define WK_LABK S(WK_COMM) // < #define WK_RABK S(WK_DOT) // > #define WK_QUES S(WK_SLSH) // ? - -// DEPRECATED -#define KC_WK_Q WK_Q -#define KC_WK_D WK_D -#define KC_WK_R WK_R -#define KC_WK_W WK_W -#define KC_WK_B WK_B -#define KC_WK_J WK_J -#define KC_WK_F WK_F -#define KC_WK_U WK_U -#define KC_WK_P WK_P -#define KC_WK_SCLN WK_SCLN -#define KC_WK_A WK_A -#define KC_WK_S WK_S -#define KC_WK_H WK_H -#define KC_WK_T WK_T -#define KC_WK_G WK_G -#define KC_WK_Y WK_Y -#define KC_WK_N WK_N -#define KC_WK_E WK_E -#define KC_WK_O WK_O -#define KC_WK_I WK_I -#define KC_WK_Z WK_Z -#define KC_WK_X WK_X -#define KC_WK_M WK_M -#define KC_WK_C WK_C -#define KC_WK_V WK_V -#define KC_WK_K WK_K -#define KC_WK_L WK_L diff --git a/quantum/led_matrix.c b/quantum/led_matrix.c deleted file mode 100644 index 7e0fdf896..000000000 --- a/quantum/led_matrix.c +++ /dev/null @@ -1,583 +0,0 @@ -/* Copyright 2017 Jason Williams - * Copyright 2017 Jack Humbert - * Copyright 2018 Yiancar - * Copyright 2019 Clueboard - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "led_matrix.h" -#include "progmem.h" -#include "config.h" -#include "eeprom.h" -#include -#include -#include "led_tables.h" - -#include - -#ifndef LED_MATRIX_CENTER -const led_point_t k_led_matrix_center = {112, 32}; -#else -const led_point_t k_led_matrix_center = LED_MATRIX_CENTER; -#endif - -// Generic effect runners -#include "led_matrix_runners/effect_runner_dx_dy_dist.h" -#include "led_matrix_runners/effect_runner_dx_dy.h" -#include "led_matrix_runners/effect_runner_i.h" -#include "led_matrix_runners/effect_runner_sin_cos_i.h" -#include "led_matrix_runners/effect_runner_reactive.h" -#include "led_matrix_runners/effect_runner_reactive_splash.h" - -// ------------------------------------------ -// -----Begin led effect includes macros----- -#define LED_MATRIX_EFFECT(name) -#define LED_MATRIX_CUSTOM_EFFECT_IMPLS - -#include "led_matrix_animations/led_matrix_effects.inc" -#ifdef LED_MATRIX_CUSTOM_KB -# include "led_matrix_kb.inc" -#endif -#ifdef LED_MATRIX_CUSTOM_USER -# include "led_matrix_user.inc" -#endif - -#undef LED_MATRIX_CUSTOM_EFFECT_IMPLS -#undef LED_MATRIX_EFFECT -// -----End led effect includes macros------- -// ------------------------------------------ - -#if defined(LED_DISABLE_AFTER_TIMEOUT) && !defined(LED_DISABLE_TIMEOUT) -# define LED_DISABLE_TIMEOUT (LED_DISABLE_AFTER_TIMEOUT * 1200UL) -#endif - -#ifndef LED_DISABLE_TIMEOUT -# define LED_DISABLE_TIMEOUT 0 -#endif - -#if LED_DISABLE_WHEN_USB_SUSPENDED != 1 -# undef LED_DISABLE_WHEN_USB_SUSPENDED -#endif - -#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX -# undef LED_MATRIX_MAXIMUM_BRIGHTNESS -# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX -#endif - -#if !defined(LED_MATRIX_VAL_STEP) -# define LED_MATRIX_VAL_STEP 8 -#endif - -#if !defined(LED_MATRIX_SPD_STEP) -# define LED_MATRIX_SPD_STEP 16 -#endif - -#if !defined(LED_MATRIX_STARTUP_MODE) -# define LED_MATRIX_STARTUP_MODE LED_MATRIX_SOLID -#endif - -#if !defined(LED_MATRIX_STARTUP_VAL) -# define LED_MATRIX_STARTUP_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS -#endif - -#if !defined(LED_MATRIX_STARTUP_SPD) -# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2 -#endif - -// globals -led_eeconfig_t led_matrix_eeconfig; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr -uint32_t g_led_timer; -#ifdef LED_MATRIX_FRAMEBUFFER_EFFECTS -uint8_t g_led_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}}; -#endif // LED_MATRIX_FRAMEBUFFER_EFFECTS -#ifdef LED_MATRIX_KEYREACTIVE_ENABLED -last_hit_t g_last_hit_tracker; -#endif // LED_MATRIX_KEYREACTIVE_ENABLED - -// internals -static bool suspend_state = false; -static uint8_t led_last_enable = UINT8_MAX; -static uint8_t led_last_effect = UINT8_MAX; -static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false}; -static led_task_states led_task_state = SYNCING; -#if LED_DISABLE_TIMEOUT > 0 -static uint32_t led_anykey_timer; -#endif // LED_DISABLE_TIMEOUT > 0 - -// double buffers -static uint32_t led_timer_buffer; -#ifdef LED_MATRIX_KEYREACTIVE_ENABLED -static last_hit_t last_hit_buffer; -#endif // LED_MATRIX_KEYREACTIVE_ENABLED - -// split led matrix -#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) -const uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; -#endif - -void eeconfig_read_led_matrix(void) { eeprom_read_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); } - -void eeconfig_update_led_matrix(void) { eeprom_update_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); } - -void eeconfig_update_led_matrix_default(void) { - dprintf("eeconfig_update_led_matrix_default\n"); - led_matrix_eeconfig.enable = 1; - led_matrix_eeconfig.mode = LED_MATRIX_STARTUP_MODE; - led_matrix_eeconfig.val = LED_MATRIX_STARTUP_VAL; - led_matrix_eeconfig.speed = LED_MATRIX_STARTUP_SPD; - led_matrix_eeconfig.flags = LED_FLAG_ALL; - eeconfig_update_led_matrix(); -} - -void eeconfig_debug_led_matrix(void) { - dprintf("led_matrix_eeconfig EEPROM\n"); - dprintf("led_matrix_eeconfig.enable = %d\n", led_matrix_eeconfig.enable); - dprintf("led_matrix_eeconfig.mode = %d\n", led_matrix_eeconfig.mode); - dprintf("led_matrix_eeconfig.val = %d\n", led_matrix_eeconfig.val); - dprintf("led_matrix_eeconfig.speed = %d\n", led_matrix_eeconfig.speed); - dprintf("led_matrix_eeconfig.flags = %d\n", led_matrix_eeconfig.flags); -} - -__attribute__((weak)) uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; } - -uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) { - uint8_t led_count = led_matrix_map_row_column_to_led_kb(row, column, led_i); - uint8_t led_index = g_led_config.matrix_co[row][column]; - if (led_index != NO_LED) { - led_i[led_count] = led_index; - led_count++; - } - return led_count; -} - -void led_matrix_update_pwm_buffers(void) { led_matrix_driver.flush(); } - -void led_matrix_set_value(int index, uint8_t value) { -#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - if (!is_keyboard_left() && index >= k_led_matrix_split[0]) -# ifdef USE_CIE1931_CURVE - led_matrix_driver.set_value(index - k_led_matrix_split[0], pgm_read_byte(&CIE1931_CURVE[value])); -# else - led_matrix_driver.set_value(index - k_led_matrix_split[0], value); -# endif - else if (is_keyboard_left() && index < k_led_matrix_split[0]) -#endif -#ifdef USE_CIE1931_CURVE - led_matrix_driver.set_value(index, pgm_read_byte(&CIE1931_CURVE[value])); -#else - led_matrix_driver.set_value(index, value); -#endif -} - -void led_matrix_set_value_all(uint8_t value) { -#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) led_matrix_set_value(i, value); -#else -# ifdef USE_CIE1931_CURVE - led_matrix_driver.set_value_all(pgm_read_byte(&CIE1931_CURVE[value])); -# else - led_matrix_driver.set_value_all(value); -# endif -#endif -} - -void process_led_matrix(uint8_t row, uint8_t col, bool pressed) { -#ifndef LED_MATRIX_SPLIT - if (!is_keyboard_master()) return; -#endif -#if LED_DISABLE_TIMEOUT > 0 - led_anykey_timer = 0; -#endif // LED_DISABLE_TIMEOUT > 0 - -#ifdef LED_MATRIX_KEYREACTIVE_ENABLED - uint8_t led[LED_HITS_TO_REMEMBER]; - uint8_t led_count = 0; - -# if defined(LED_MATRIX_KEYRELEASES) - if (!pressed) -# elif defined(LED_MATRIX_KEYPRESSES) - if (pressed) -# endif // defined(LED_MATRIX_KEYRELEASES) - { - led_count = led_matrix_map_row_column_to_led(row, col, led); - } - - if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) { - memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count); - memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count); - memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit - memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count); - last_hit_buffer.count--; - } - - for (uint8_t i = 0; i < led_count; i++) { - uint8_t index = last_hit_buffer.count; - last_hit_buffer.x[index] = g_led_config.point[led[i]].x; - last_hit_buffer.y[index] = g_led_config.point[led[i]].y; - last_hit_buffer.index[index] = led[i]; - last_hit_buffer.tick[index] = 0; - last_hit_buffer.count++; - } -#endif // LED_MATRIX_KEYREACTIVE_ENABLED - -#if defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_LED_MATRIX_TYPING_HEATMAP) - if (led_matrix_eeconfig.mode == LED_MATRIX_TYPING_HEATMAP) { - process_led_matrix_typing_heatmap(row, col); - } -#endif // defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_LED_MATRIX_TYPING_HEATMAP) -} - -static bool led_matrix_none(effect_params_t *params) { - if (!params->init) { - return false; - } - - led_matrix_set_value_all(0); - return false; -} - -static void led_task_timers(void) { -#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_DISABLE_TIMEOUT > 0 - uint32_t deltaTime = sync_timer_elapsed32(led_timer_buffer); -#endif // defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_DISABLE_TIMEOUT > 0 - led_timer_buffer = sync_timer_read32(); - - // Update double buffer timers -#if LED_DISABLE_TIMEOUT > 0 - if (led_anykey_timer < UINT32_MAX) { - if (UINT32_MAX - deltaTime < led_anykey_timer) { - led_anykey_timer = UINT32_MAX; - } else { - led_anykey_timer += deltaTime; - } - } -#endif // LED_DISABLE_TIMEOUT > 0 - - // Update double buffer last hit timers -#ifdef LED_MATRIX_KEYREACTIVE_ENABLED - uint8_t count = last_hit_buffer.count; - for (uint8_t i = 0; i < count; ++i) { - if (UINT16_MAX - deltaTime < last_hit_buffer.tick[i]) { - last_hit_buffer.count--; - continue; - } - last_hit_buffer.tick[i] += deltaTime; - } -#endif // LED_MATRIX_KEYREACTIVE_ENABLED -} - -static void led_task_sync(void) { - // next task - if (sync_timer_elapsed32(g_led_timer) >= LED_MATRIX_LED_FLUSH_LIMIT) led_task_state = STARTING; -} - -static void led_task_start(void) { - // reset iter - led_effect_params.iter = 0; - - // update double buffers - g_led_timer = led_timer_buffer; -#ifdef LED_MATRIX_KEYREACTIVE_ENABLED - g_last_hit_tracker = last_hit_buffer; -#endif // LED_MATRIX_KEYREACTIVE_ENABLED - - // next task - led_task_state = RENDERING; -} - -static void led_task_render(uint8_t effect) { - bool rendering = false; - led_effect_params.init = (effect != led_last_effect) || (led_matrix_eeconfig.enable != led_last_enable); - if (led_effect_params.flags != led_matrix_eeconfig.flags) { - led_effect_params.flags = led_matrix_eeconfig.flags; - led_matrix_set_value_all(0); - } - - // each effect can opt to do calculations - // and/or request PWM buffer updates. - switch (effect) { - case LED_MATRIX_NONE: - rendering = led_matrix_none(&led_effect_params); - break; - -// --------------------------------------------- -// -----Begin led effect switch case macros----- -#define LED_MATRIX_EFFECT(name, ...) \ - case LED_MATRIX_##name: \ - rendering = name(&led_effect_params); \ - break; -#include "led_matrix_animations/led_matrix_effects.inc" -#undef LED_MATRIX_EFFECT - -#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER) -# define LED_MATRIX_EFFECT(name, ...) \ - case LED_MATRIX_CUSTOM_##name: \ - rendering = name(&led_effect_params); \ - break; -# ifdef LED_MATRIX_CUSTOM_KB -# include "led_matrix_kb.inc" -# endif -# ifdef LED_MATRIX_CUSTOM_USER -# include "led_matrix_user.inc" -# endif -# undef LED_MATRIX_EFFECT -#endif - // -----End led effect switch case macros------- - // --------------------------------------------- - } - - led_effect_params.iter++; - - // next task - if (!rendering) { - led_task_state = FLUSHING; - if (!led_effect_params.init && effect == LED_MATRIX_NONE) { - // We only need to flush once if we are LED_MATRIX_NONE - led_task_state = SYNCING; - } - } -} - -static void led_task_flush(uint8_t effect) { - // update last trackers after the first full render so we can init over several frames - led_last_effect = effect; - led_last_enable = led_matrix_eeconfig.enable; - - // update pwm buffers - led_matrix_update_pwm_buffers(); - - // next task - led_task_state = SYNCING; -} - -void led_matrix_task(void) { - led_task_timers(); - - // Ideally we would also stop sending zeros to the LED driver PWM buffers - // while suspended and just do a software shutdown. This is a cheap hack for now. - bool suspend_backlight = suspend_state || -#if LED_DISABLE_TIMEOUT > 0 - (led_anykey_timer > (uint32_t)LED_DISABLE_TIMEOUT) || -#endif // LED_DISABLE_TIMEOUT > 0 - false; - - uint8_t effect = suspend_backlight || !led_matrix_eeconfig.enable ? 0 : led_matrix_eeconfig.mode; - - switch (led_task_state) { - case STARTING: - led_task_start(); - break; - case RENDERING: - led_task_render(effect); - if (effect) { - led_matrix_indicators(); - led_matrix_indicators_advanced(&led_effect_params); - } - break; - case FLUSHING: - led_task_flush(effect); - break; - case SYNCING: - led_task_sync(); - break; - } -} - -void led_matrix_indicators(void) { - led_matrix_indicators_kb(); - led_matrix_indicators_user(); -} - -__attribute__((weak)) void led_matrix_indicators_kb(void) {} - -__attribute__((weak)) void led_matrix_indicators_user(void) {} - -void led_matrix_indicators_advanced(effect_params_t *params) { - /* special handling is needed for "params->iter", since it's already been incremented. - * Could move the invocations to led_task_render, but then it's missing a few checks - * and not sure which would be better. Otherwise, this should be called from - * led_task_render, right before the iter++ line. - */ -#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL - uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * (params->iter - 1); - uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; - if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; -#else - uint8_t min = 0; - uint8_t max = DRIVER_LED_TOTAL; -#endif - led_matrix_indicators_advanced_kb(min, max); - led_matrix_indicators_advanced_user(min, max); -} - -__attribute__((weak)) void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {} - -__attribute__((weak)) void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {} - -void led_matrix_init(void) { - led_matrix_driver.init(); - -#ifdef LED_MATRIX_KEYREACTIVE_ENABLED - g_last_hit_tracker.count = 0; - for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) { - g_last_hit_tracker.tick[i] = UINT16_MAX; - } - - last_hit_buffer.count = 0; - for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) { - last_hit_buffer.tick[i] = UINT16_MAX; - } -#endif // LED_MATRIX_KEYREACTIVE_ENABLED - - if (!eeconfig_is_enabled()) { - dprintf("led_matrix_init_drivers eeconfig is not enabled.\n"); - eeconfig_init(); - eeconfig_update_led_matrix_default(); - } - - eeconfig_read_led_matrix(); - if (!led_matrix_eeconfig.mode) { - dprintf("led_matrix_init_drivers led_matrix_eeconfig.mode = 0. Write default values to EEPROM.\n"); - eeconfig_update_led_matrix_default(); - } - eeconfig_debug_led_matrix(); // display current eeprom values -} - -void led_matrix_set_suspend_state(bool state) { -#ifdef LED_DISABLE_WHEN_USB_SUSPENDED - if (state) { - led_matrix_set_value_all(0); // turn off all LEDs when suspending - } - suspend_state = state; -#endif -} - -bool led_matrix_get_suspend_state(void) { return suspend_state; } - -void led_matrix_toggle_eeprom_helper(bool write_to_eeprom) { - led_matrix_eeconfig.enable ^= 1; - led_task_state = STARTING; - if (write_to_eeprom) { - eeconfig_update_led_matrix(); - } - dprintf("led matrix toggle [%s]: led_matrix_eeconfig.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.enable); -} -void led_matrix_toggle_noeeprom(void) { led_matrix_toggle_eeprom_helper(false); } -void led_matrix_toggle(void) { led_matrix_toggle_eeprom_helper(true); } - -void led_matrix_enable(void) { - led_matrix_enable_noeeprom(); - eeconfig_update_led_matrix(); -} - -void led_matrix_enable_noeeprom(void) { - if (!led_matrix_eeconfig.enable) led_task_state = STARTING; - led_matrix_eeconfig.enable = 1; -} - -void led_matrix_disable(void) { - led_matrix_disable_noeeprom(); - eeconfig_update_led_matrix(); -} - -void led_matrix_disable_noeeprom(void) { - if (led_matrix_eeconfig.enable) led_task_state = STARTING; - led_matrix_eeconfig.enable = 0; -} - -uint8_t led_matrix_is_enabled(void) { return led_matrix_eeconfig.enable; } - -void led_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { - if (!led_matrix_eeconfig.enable) { - return; - } - if (mode < 1) { - led_matrix_eeconfig.mode = 1; - } else if (mode >= LED_MATRIX_EFFECT_MAX) { - led_matrix_eeconfig.mode = LED_MATRIX_EFFECT_MAX - 1; - } else { - led_matrix_eeconfig.mode = mode; - } - led_task_state = STARTING; - if (write_to_eeprom) { - eeconfig_update_led_matrix(); - } - dprintf("led matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.mode); -} -void led_matrix_mode_noeeprom(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, false); } -void led_matrix_mode(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, true); } - -uint8_t led_matrix_get_mode(void) { return led_matrix_eeconfig.mode; } - -void led_matrix_step_helper(bool write_to_eeprom) { - uint8_t mode = led_matrix_eeconfig.mode + 1; - led_matrix_mode_eeprom_helper((mode < LED_MATRIX_EFFECT_MAX) ? mode : 1, write_to_eeprom); -} -void led_matrix_step_noeeprom(void) { led_matrix_step_helper(false); } -void led_matrix_step(void) { led_matrix_step_helper(true); } - -void led_matrix_step_reverse_helper(bool write_to_eeprom) { - uint8_t mode = led_matrix_eeconfig.mode - 1; - led_matrix_mode_eeprom_helper((mode < 1) ? LED_MATRIX_EFFECT_MAX - 1 : mode, write_to_eeprom); -} -void led_matrix_step_reverse_noeeprom(void) { led_matrix_step_reverse_helper(false); } -void led_matrix_step_reverse(void) { led_matrix_step_reverse_helper(true); } - -void led_matrix_set_val_eeprom_helper(uint8_t val, bool write_to_eeprom) { - if (!led_matrix_eeconfig.enable) { - return; - } - led_matrix_eeconfig.val = (val > LED_MATRIX_MAXIMUM_BRIGHTNESS) ? LED_MATRIX_MAXIMUM_BRIGHTNESS : val; - if (write_to_eeprom) { - eeconfig_update_led_matrix(); - } - dprintf("led matrix set val [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.val); -} -void led_matrix_set_val_noeeprom(uint8_t val) { led_matrix_set_val_eeprom_helper(val, false); } -void led_matrix_set_val(uint8_t val) { led_matrix_set_val_eeprom_helper(val, true); } - -uint8_t led_matrix_get_val(void) { return led_matrix_eeconfig.val; } - -void led_matrix_increase_val_helper(bool write_to_eeprom) { led_matrix_set_val_eeprom_helper(qadd8(led_matrix_eeconfig.val, LED_MATRIX_VAL_STEP), write_to_eeprom); } -void led_matrix_increase_val_noeeprom(void) { led_matrix_increase_val_helper(false); } -void led_matrix_increase_val(void) { led_matrix_increase_val_helper(true); } - -void led_matrix_decrease_val_helper(bool write_to_eeprom) { led_matrix_set_val_eeprom_helper(qsub8(led_matrix_eeconfig.val, LED_MATRIX_VAL_STEP), write_to_eeprom); } -void led_matrix_decrease_val_noeeprom(void) { led_matrix_decrease_val_helper(false); } -void led_matrix_decrease_val(void) { led_matrix_decrease_val_helper(true); } - -void led_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { - led_matrix_eeconfig.speed = speed; - if (write_to_eeprom) { - eeconfig_update_led_matrix(); - } - dprintf("led matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.speed); -} -void led_matrix_set_speed_noeeprom(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, false); } -void led_matrix_set_speed(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, true); } - -uint8_t led_matrix_get_speed(void) { return led_matrix_eeconfig.speed; } - -void led_matrix_increase_speed_helper(bool write_to_eeprom) { led_matrix_set_speed_eeprom_helper(qadd8(led_matrix_eeconfig.speed, LED_MATRIX_SPD_STEP), write_to_eeprom); } -void led_matrix_increase_speed_noeeprom(void) { led_matrix_increase_speed_helper(false); } -void led_matrix_increase_speed(void) { led_matrix_increase_speed_helper(true); } - -void led_matrix_decrease_speed_helper(bool write_to_eeprom) { led_matrix_set_speed_eeprom_helper(qsub8(led_matrix_eeconfig.speed, LED_MATRIX_SPD_STEP), write_to_eeprom); } -void led_matrix_decrease_speed_noeeprom(void) { led_matrix_decrease_speed_helper(false); } -void led_matrix_decrease_speed(void) { led_matrix_decrease_speed_helper(true); } - -led_flags_t led_matrix_get_flags(void) { return led_matrix_eeconfig.flags; } - -void led_matrix_set_flags(led_flags_t flags) { led_matrix_eeconfig.flags = flags; } diff --git a/quantum/led_matrix.h b/quantum/led_matrix.h deleted file mode 100644 index 0984de73b..000000000 --- a/quantum/led_matrix.h +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright 2017 Jason Williams - * Copyright 2017 Jack Humbert - * Copyright 2018 Yiancar - * Copyright 2019 Clueboard - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License 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 -#include -#include "led_matrix_types.h" -#include "quantum.h" - -#ifdef IS31FL3731 -# include "is31fl3731-simple.h" -#endif - -#ifndef LED_MATRIX_LED_FLUSH_LIMIT -# define LED_MATRIX_LED_FLUSH_LIMIT 16 -#endif - -#ifndef LED_MATRIX_LED_PROCESS_LIMIT -# define LED_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 -#endif - -#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL -# define LED_MATRIX_USE_LIMITS(min, max) \ - uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \ - uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; \ - if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; -#else -# define LED_MATRIX_USE_LIMITS(min, max) \ - uint8_t min = 0; \ - uint8_t max = DRIVER_LED_TOTAL; -#endif - -#define LED_MATRIX_TEST_LED_FLAGS() \ - if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue - -enum led_matrix_effects { - LED_MATRIX_NONE = 0, - -// -------------------------------------- -// -----Begin led effect enum macros----- -#define LED_MATRIX_EFFECT(name, ...) LED_MATRIX_##name, -#include "led_matrix_animations/led_matrix_effects.inc" -#undef LED_MATRIX_EFFECT - -#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER) -# define LED_MATRIX_EFFECT(name, ...) LED_MATRIX_CUSTOM_##name, -# ifdef LED_MATRIX_CUSTOM_KB -# include "led_matrix_kb.inc" -# endif -# ifdef LED_MATRIX_CUSTOM_USER -# include "led_matrix_user.inc" -# endif -# undef LED_MATRIX_EFFECT -#endif - // -------------------------------------- - // -----End led effect enum macros------- - - LED_MATRIX_EFFECT_MAX -}; - -void eeconfig_update_led_matrix_default(void); -void eeconfig_update_led_matrix(void); -void eeconfig_debug_led_matrix(void); - -uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i); -uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i); - -void led_matrix_set_value(int index, uint8_t value); -void led_matrix_set_value_all(uint8_t value); - -void process_led_matrix(uint8_t row, uint8_t col, bool pressed); - -void led_matrix_task(void); - -// This runs after another backlight effect and replaces -// values already set -void led_matrix_indicators(void); -void led_matrix_indicators_kb(void); -void led_matrix_indicators_user(void); - -void led_matrix_indicators_advanced(effect_params_t *params); -void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max); -void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); - -void led_matrix_init(void); - -void led_matrix_set_suspend_state(bool state); -bool led_matrix_get_suspend_state(void); -void led_matrix_toggle(void); -void led_matrix_toggle_noeeprom(void); -void led_matrix_enable(void); -void led_matrix_enable_noeeprom(void); -void led_matrix_disable(void); -void led_matrix_disable_noeeprom(void); -uint8_t led_matrix_is_enabled(void); -void led_matrix_mode(uint8_t mode); -void led_matrix_mode_noeeprom(uint8_t mode); -uint8_t led_matrix_get_mode(void); -void led_matrix_step(void); -void led_matrix_step_noeeprom(void); -void led_matrix_step_reverse(void); -void led_matrix_step_reverse_noeeprom(void); -void led_matrix_set_val(uint8_t val); -void led_matrix_set_val_noeeprom(uint8_t val); -uint8_t led_matrix_get_val(void); -void led_matrix_increase_val(void); -void led_matrix_increase_val_noeeprom(void); -void led_matrix_decrease_val(void); -void led_matrix_decrease_val_noeeprom(void); -void led_matrix_set_speed(uint8_t speed); -void led_matrix_set_speed_noeeprom(uint8_t speed); -uint8_t led_matrix_get_speed(void); -void led_matrix_increase_speed(void); -void led_matrix_increase_speed_noeeprom(void); -void led_matrix_decrease_speed(void); -void led_matrix_decrease_speed_noeeprom(void); -led_flags_t led_matrix_get_flags(void); -void led_matrix_set_flags(led_flags_t flags); - -typedef struct { - /* Perform any initialisation required for the other driver functions to work. */ - void (*init)(void); - - /* Set the brightness of a single LED in the buffer. */ - void (*set_value)(int index, uint8_t value); - /* Set the brightness of all LEDS on the keyboard in the buffer. */ - void (*set_value_all)(uint8_t value); - /* Flush any buffered changes to the hardware. */ - void (*flush)(void); -} led_matrix_driver_t; - -extern const led_matrix_driver_t led_matrix_driver; - -extern led_eeconfig_t led_matrix_eeconfig; - -extern uint32_t g_led_timer; -extern led_config_t g_led_config; -#ifdef LED_MATRIX_KEYREACTIVE_ENABLED -extern last_hit_t g_last_hit_tracker; -#endif -#ifdef LED_MATRIX_FRAMEBUFFER_EFFECTS -extern uint8_t g_led_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; -#endif diff --git a/quantum/led_matrix/animations/alpha_mods_anim.h b/quantum/led_matrix/animations/alpha_mods_anim.h new file mode 100644 index 000000000..14038cd08 --- /dev/null +++ b/quantum/led_matrix/animations/alpha_mods_anim.h @@ -0,0 +1,24 @@ +#ifdef ENABLE_LED_MATRIX_ALPHAS_MODS +LED_MATRIX_EFFECT(ALPHAS_MODS) +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +// alphas = val1, mods = val2 +bool ALPHAS_MODS(effect_params_t* params) { + LED_MATRIX_USE_LIMITS(led_min, led_max); + + uint8_t val1 = led_matrix_eeconfig.val; + uint8_t val2 = val1 + led_matrix_eeconfig.speed; + + for (uint8_t i = led_min; i < led_max; i++) { + LED_MATRIX_TEST_LED_FLAGS(); + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + led_matrix_set_value(i, val2); + } else { + led_matrix_set_value(i, val1); + } + } + return led_max < DRIVER_LED_TOTAL; +} + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_LED_MATRIX_ALPHAS_MODS diff --git a/quantum/led_matrix/animations/band_anim.h b/quantum/led_matrix/animations/band_anim.h new file mode 100644 index 000000000..5548787b8 --- /dev/null +++ b/quantum/led_matrix/animations/band_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_LED_MATRIX_BAND +LED_MATRIX_EFFECT(BAND) +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t BAND_math(uint8_t val, uint8_t i, uint8_t time) { + int16_t v = val - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; + return scale8(v < 0 ? 0 : v, val); +} + +bool BAND(effect_params_t* params) { return effect_runner_i(params, &BAND_math); } + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_LED_MATRIX_BAND diff --git a/quantum/led_matrix/animations/band_pinwheel_anim.h b/quantum/led_matrix/animations/band_pinwheel_anim.h new file mode 100644 index 000000000..89651582d --- /dev/null +++ b/quantum/led_matrix/animations/band_pinwheel_anim.h @@ -0,0 +1,10 @@ +#ifdef ENABLE_LED_MATRIX_BAND_PINWHEEL +LED_MATRIX_EFFECT(BAND_PINWHEEL) +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t time) { return scale8(val - time - atan2_8(dy, dx) * 3, val); } + +bool BAND_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_math); } + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_LED_MATRIX_BAND_PINWHEEL diff --git a/quantum/led_matrix/animations/band_spiral_anim.h b/quantum/led_matrix/animations/band_spiral_anim.h new file mode 100644 index 000000000..70b0ffaea --- /dev/null +++ b/quantum/led_matrix/animations/band_spiral_anim.h @@ -0,0 +1,10 @@ +#ifdef ENABLE_LED_MATRIX_BAND_SPIRAL +LED_MATRIX_EFFECT(BAND_SPIRAL) +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(val + dist - time - atan2_8(dy, dx), val); } + +bool BAND_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math); } + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_LED_MATRIX_BAND_SPIRAL diff --git a/quantum/led_matrix/animations/breathing_anim.h b/quantum/led_matrix/animations/breathing_anim.h new file mode 100644 index 000000000..e3f600c45 --- /dev/null +++ b/quantum/led_matrix/animations/breathing_anim.h @@ -0,0 +1,19 @@ +#ifdef ENABLE_LED_MATRIX_BREATHING +LED_MATRIX_EFFECT(BREATHING) +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BREATHING(effect_params_t* params) { + LED_MATRIX_USE_LIMITS(led_min, led_max); + + uint8_t val = led_matrix_eeconfig.val; + uint16_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 8); + val = scale8(abs8(sin8(time) - 128) * 2, val); + for (uint8_t i = led_min; i < led_max; i++) { + LED_MATRIX_TEST_LED_FLAGS(); + led_matrix_set_value(i, val); + } + return led_max < DRIVER_LED_TOTAL; +} + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_LED_MATRIX_BREATHING diff --git a/quantum/led_matrix/animations/cycle_left_right_anim.h b/quantum/led_matrix/animations/cycle_left_right_anim.h new file mode 100644 index 000000000..769e6d794 --- /dev/null +++ b/quantum/led_matrix/animations/cycle_left_right_anim.h @@ -0,0 +1,10 @@ +#ifdef ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT +LED_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].x - time, val); } + +bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); } + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT diff --git a/quantum/led_matrix/animations/cycle_out_in_anim.h b/quantum/led_matrix/animations/cycle_out_in_anim.h new file mode 100644 index 000000000..6adf9c25f --- /dev/null +++ b/quantum/led_matrix/animations/cycle_out_in_anim.h @@ -0,0 +1,10 @@ +#ifdef ENABLE_LED_MATRIX_CYCLE_OUT_IN +LED_MATRIX_EFFECT(CYCLE_OUT_IN) +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(3 * dist / 2 + time, val); } + +bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); } + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN diff --git a/quantum/led_matrix/animations/cycle_up_down_anim.h b/quantum/led_matrix/animations/cycle_up_down_anim.h new file mode 100644 index 000000000..7a5868ac2 --- /dev/null +++ b/quantum/led_matrix/animations/cycle_up_down_anim.h @@ -0,0 +1,10 @@ +#ifdef ENABLE_LED_MATRIX_CYCLE_UP_DOWN +LED_MATRIX_EFFECT(CYCLE_UP_DOWN) +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].y - time, val); } + +bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); } + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_LED_MATRIX_CYCLE_UP_DOWN diff --git a/quantum/led_matrix/animations/dual_beacon_anim.h b/quantum/led_matrix/animations/dual_beacon_anim.h new file mode 100644 index 000000000..3552c9fc3 --- /dev/null +++ b/quantum/led_matrix/animations/dual_beacon_anim.h @@ -0,0 +1,10 @@ +#ifdef ENABLE_LED_MATRIX_DUAL_BEACON +LED_MATRIX_EFFECT(DUAL_BEACON) +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { return scale8(((g_led_config.point[i].y - k_led_matrix_center.y) * cos + (g_led_config.point[i].x - k_led_matrix_center.x) * sin) / 128, val); } + +bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); } + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_LED_MATRIX_DUAL_BEACON diff --git a/quantum/led_matrix/animations/led_matrix_effects.inc b/quantum/led_matrix/animations/led_matrix_effects.inc new file mode 100644 index 000000000..ad1f46b24 --- /dev/null +++ b/quantum/led_matrix/animations/led_matrix_effects.inc @@ -0,0 +1,18 @@ +// Add your new core led matrix effect here, order determines enum order +#include "solid_anim.h" +#include "alpha_mods_anim.h" +#include "breathing_anim.h" +#include "band_anim.h" +#include "band_pinwheel_anim.h" +#include "band_spiral_anim.h" +#include "cycle_left_right_anim.h" +#include "cycle_up_down_anim.h" +#include "cycle_out_in_anim.h" +#include "dual_beacon_anim.h" +#include "solid_reactive_simple_anim.h" +#include "solid_reactive_wide.h" +#include "solid_reactive_cross.h" +#include "solid_reactive_nexus.h" +#include "solid_splash_anim.h" +#include "wave_left_right_anim.h" +#include "wave_up_down_anim.h" diff --git a/quantum/led_matrix_runners/effect_runner_dx_dy.h b/quantum/led_matrix/animations/runners/effect_runner_dx_dy.h similarity index 100% rename from quantum/led_matrix_runners/effect_runner_dx_dy.h rename to quantum/led_matrix/animations/runners/effect_runner_dx_dy.h diff --git a/quantum/led_matrix_runners/effect_runner_dx_dy_dist.h b/quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h similarity index 100% rename from quantum/led_matrix_runners/effect_runner_dx_dy_dist.h rename to quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h diff --git a/quantum/led_matrix_runners/effect_runner_i.h b/quantum/led_matrix/animations/runners/effect_runner_i.h similarity index 100% rename from quantum/led_matrix_runners/effect_runner_i.h rename to quantum/led_matrix/animations/runners/effect_runner_i.h diff --git a/quantum/led_matrix_runners/effect_runner_reactive.h b/quantum/led_matrix/animations/runners/effect_runner_reactive.h similarity index 100% rename from quantum/led_matrix_runners/effect_runner_reactive.h rename to quantum/led_matrix/animations/runners/effect_runner_reactive.h diff --git a/quantum/led_matrix_runners/effect_runner_reactive_splash.h b/quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h similarity index 100% rename from quantum/led_matrix_runners/effect_runner_reactive_splash.h rename to quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h diff --git a/quantum/led_matrix_runners/effect_runner_sin_cos_i.h b/quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h similarity index 100% rename from quantum/led_matrix_runners/effect_runner_sin_cos_i.h rename to quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h diff --git a/quantum/led_matrix/animations/runners/led_matrix_runners.inc b/quantum/led_matrix/animations/runners/led_matrix_runners.inc new file mode 100644 index 000000000..c09022bb0 --- /dev/null +++ b/quantum/led_matrix/animations/runners/led_matrix_runners.inc @@ -0,0 +1,6 @@ +#include "effect_runner_dx_dy_dist.h" +#include "effect_runner_dx_dy.h" +#include "effect_runner_i.h" +#include "effect_runner_sin_cos_i.h" +#include "effect_runner_reactive.h" +#include "effect_runner_reactive_splash.h" diff --git a/quantum/led_matrix_animations/solid_anim.h b/quantum/led_matrix/animations/solid_anim.h similarity index 100% rename from quantum/led_matrix_animations/solid_anim.h rename to quantum/led_matrix/animations/solid_anim.h diff --git a/quantum/led_matrix/animations/solid_reactive_cross.h b/quantum/led_matrix/animations/solid_reactive_cross.h new file mode 100644 index 000000000..3a3c46be1 --- /dev/null +++ b/quantum/led_matrix/animations/solid_reactive_cross.h @@ -0,0 +1,35 @@ +#ifdef LED_MATRIX_KEYREACTIVE_ENABLED +# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS) + +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS +LED_MATRIX_EFFECT(SOLID_REACTIVE_CROSS) +# endif + +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS +LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS) +# endif + +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t SOLID_REACTIVE_CROSS_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick + dist; + dx = dx < 0 ? dx * -1 : dx; + dy = dy < 0 ? dy * -1 : dy; + dx = dx * 16 > 255 ? 255 : dx * 16; + dy = dy * 16 > 255 ? 255 : dy * 16; + effect += dx > dy ? dy : dx; + if (effect > 255) effect = 255; + return qadd8(val, 255 - effect); +} + +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS +bool SOLID_REACTIVE_CROSS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); } +# endif + +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS +bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); } +# endif + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS) +#endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix/animations/solid_reactive_nexus.h b/quantum/led_matrix/animations/solid_reactive_nexus.h new file mode 100644 index 000000000..2520b8e1d --- /dev/null +++ b/quantum/led_matrix/animations/solid_reactive_nexus.h @@ -0,0 +1,32 @@ +#ifdef LED_MATRIX_KEYREACTIVE_ENABLED +# if defined(ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || defined(ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS) + +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS +LED_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS) +# endif + +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS +LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS) +# endif + +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t SOLID_REACTIVE_NEXUS_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick - dist; + if (effect > 255) effect = 255; + if (dist > 72) effect = 255; + if ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) effect = 255; + return qadd8(val, 255 - effect); +} + +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS +bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); } +# endif + +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS +bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); } +# endif + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS) +#endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix/animations/solid_reactive_simple_anim.h b/quantum/led_matrix/animations/solid_reactive_simple_anim.h new file mode 100644 index 000000000..43f6ad9ab --- /dev/null +++ b/quantum/led_matrix/animations/solid_reactive_simple_anim.h @@ -0,0 +1,12 @@ +#ifdef LED_MATRIX_KEYREACTIVE_ENABLED +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE +LED_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) { return scale8(255 - offset, val); } + +bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); } + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +# endif // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE +#endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix/animations/solid_reactive_wide.h b/quantum/led_matrix/animations/solid_reactive_wide.h new file mode 100644 index 000000000..d683b0251 --- /dev/null +++ b/quantum/led_matrix/animations/solid_reactive_wide.h @@ -0,0 +1,30 @@ +#ifdef LED_MATRIX_KEYREACTIVE_ENABLED +# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE) + +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE +LED_MATRIX_EFFECT(SOLID_REACTIVE_WIDE) +# endif + +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE +LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE) +# endif + +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t SOLID_REACTIVE_WIDE_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick + dist * 5; + if (effect > 255) effect = 255; + return qadd8(val, 255 - effect); +} + +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE +bool SOLID_REACTIVE_WIDE(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); } +# endif + +# ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE +bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); } +# endif + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE) +#endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix/animations/solid_splash_anim.h b/quantum/led_matrix/animations/solid_splash_anim.h new file mode 100644 index 000000000..cf599c8fe --- /dev/null +++ b/quantum/led_matrix/animations/solid_splash_anim.h @@ -0,0 +1,30 @@ +#ifdef LED_MATRIX_KEYREACTIVE_ENABLED +# if !defined(DISABLE_LED_MATRIX_SOLID_SPLASH) || !defined(DISABLE_LED_MATRIX_SOLID_MULTISPLASH) + +# ifdef ENABLE_LED_MATRIX_SOLID_SPLASH +LED_MATRIX_EFFECT(SOLID_SPLASH) +# endif + +# ifdef ENABLE_LED_MATRIX_SOLID_MULTISPLASH +LED_MATRIX_EFFECT(SOLID_MULTISPLASH) +# endif + +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +uint8_t SOLID_SPLASH_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { + uint16_t effect = tick - dist; + if (effect > 255) effect = 255; + return qadd8(val, 255 - effect); +} + +# ifdef ENABLE_LED_MATRIX_SOLID_SPLASH +bool SOLID_SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); } +# endif + +# ifdef ENABLE_LED_MATRIX_SOLID_MULTISPLASH +bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); } +# endif + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +# endif // !defined(DISABLE_LED_MATRIX_SPLASH) && !defined(DISABLE_LED_MATRIX_MULTISPLASH) +#endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix/animations/wave_left_right_anim.h b/quantum/led_matrix/animations/wave_left_right_anim.h new file mode 100644 index 000000000..c062cf968 --- /dev/null +++ b/quantum/led_matrix/animations/wave_left_right_anim.h @@ -0,0 +1,10 @@ +#ifdef ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT +LED_MATRIX_EFFECT(WAVE_LEFT_RIGHT) +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].x - time), val); } + +bool WAVE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &WAVE_LEFT_RIGHT_math); } + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT diff --git a/quantum/led_matrix/animations/wave_up_down_anim.h b/quantum/led_matrix/animations/wave_up_down_anim.h new file mode 100644 index 000000000..5e612f6b6 --- /dev/null +++ b/quantum/led_matrix/animations/wave_up_down_anim.h @@ -0,0 +1,10 @@ +#ifdef ENABLE_LED_MATRIX_WAVE_UP_DOWN +LED_MATRIX_EFFECT(WAVE_UP_DOWN) +# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS + +static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].y - time), val); } + +bool WAVE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &WAVE_UP_DOWN_math); } + +# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_LED_MATRIX_WAVE_UP_DOWN diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c new file mode 100644 index 000000000..50510e49a --- /dev/null +++ b/quantum/led_matrix/led_matrix.c @@ -0,0 +1,578 @@ +/* Copyright 2017 Jason Williams + * Copyright 2017 Jack Humbert + * Copyright 2018 Yiancar + * Copyright 2019 Clueboard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "led_matrix.h" +#include "progmem.h" +#include "config.h" +#include "eeprom.h" +#include +#include +#include "led_tables.h" + +#include + +#ifndef LED_MATRIX_CENTER +const led_point_t k_led_matrix_center = {112, 32}; +#else +const led_point_t k_led_matrix_center = LED_MATRIX_CENTER; +#endif + +// clang-format off +#ifndef LED_MATRIX_IMMEDIATE_EEPROM +# define led_eeconfig_update(v) led_update_eeprom |= v +#else +# define led_eeconfig_update(v) if (v) eeconfig_update_led_matrix() +#endif +// clang-format on + +// Generic effect runners +#include "led_matrix_runners.inc" + +// ------------------------------------------ +// -----Begin led effect includes macros----- +#define LED_MATRIX_EFFECT(name) +#define LED_MATRIX_CUSTOM_EFFECT_IMPLS + +#include "led_matrix_effects.inc" +#ifdef LED_MATRIX_CUSTOM_KB +# include "led_matrix_kb.inc" +#endif +#ifdef LED_MATRIX_CUSTOM_USER +# include "led_matrix_user.inc" +#endif + +#undef LED_MATRIX_CUSTOM_EFFECT_IMPLS +#undef LED_MATRIX_EFFECT +// -----End led effect includes macros------- +// ------------------------------------------ + +#if defined(LED_DISABLE_AFTER_TIMEOUT) && !defined(LED_DISABLE_TIMEOUT) +# define LED_DISABLE_TIMEOUT (LED_DISABLE_AFTER_TIMEOUT * 1200UL) +#endif + +#ifndef LED_DISABLE_TIMEOUT +# define LED_DISABLE_TIMEOUT 0 +#endif + +#if !defined(LED_MATRIX_MAXIMUM_BRIGHTNESS) || LED_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX +# undef LED_MATRIX_MAXIMUM_BRIGHTNESS +# define LED_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX +#endif + +#if !defined(LED_MATRIX_VAL_STEP) +# define LED_MATRIX_VAL_STEP 8 +#endif + +#if !defined(LED_MATRIX_SPD_STEP) +# define LED_MATRIX_SPD_STEP 16 +#endif + +#if !defined(LED_MATRIX_STARTUP_MODE) +# define LED_MATRIX_STARTUP_MODE LED_MATRIX_SOLID +#endif + +#if !defined(LED_MATRIX_STARTUP_VAL) +# define LED_MATRIX_STARTUP_VAL LED_MATRIX_MAXIMUM_BRIGHTNESS +#endif + +#if !defined(LED_MATRIX_STARTUP_SPD) +# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2 +#endif + +// globals +led_eeconfig_t led_matrix_eeconfig; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr +uint32_t g_led_timer; +#ifdef LED_MATRIX_FRAMEBUFFER_EFFECTS +uint8_t g_led_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}}; +#endif // LED_MATRIX_FRAMEBUFFER_EFFECTS +#ifdef LED_MATRIX_KEYREACTIVE_ENABLED +last_hit_t g_last_hit_tracker; +#endif // LED_MATRIX_KEYREACTIVE_ENABLED + +// internals +static bool suspend_state = false; +static bool led_update_eeprom = false; +static uint8_t led_last_enable = UINT8_MAX; +static uint8_t led_last_effect = UINT8_MAX; +static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false}; +static led_task_states led_task_state = SYNCING; +#if LED_DISABLE_TIMEOUT > 0 +static uint32_t led_anykey_timer; +#endif // LED_DISABLE_TIMEOUT > 0 + +// double buffers +static uint32_t led_timer_buffer; +#ifdef LED_MATRIX_KEYREACTIVE_ENABLED +static last_hit_t last_hit_buffer; +#endif // LED_MATRIX_KEYREACTIVE_ENABLED + +// split led matrix +#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) +const uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; +#endif + +void eeconfig_read_led_matrix(void) { eeprom_read_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); } + +void eeconfig_update_led_matrix(void) { eeprom_update_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); } + +void eeconfig_update_led_matrix_default(void) { + dprintf("eeconfig_update_led_matrix_default\n"); + led_matrix_eeconfig.enable = 1; + led_matrix_eeconfig.mode = LED_MATRIX_STARTUP_MODE; + led_matrix_eeconfig.val = LED_MATRIX_STARTUP_VAL; + led_matrix_eeconfig.speed = LED_MATRIX_STARTUP_SPD; + led_matrix_eeconfig.flags = LED_FLAG_ALL; + eeconfig_update_led_matrix(); +} + +void eeconfig_debug_led_matrix(void) { + dprintf("led_matrix_eeconfig EEPROM\n"); + dprintf("led_matrix_eeconfig.enable = %d\n", led_matrix_eeconfig.enable); + dprintf("led_matrix_eeconfig.mode = %d\n", led_matrix_eeconfig.mode); + dprintf("led_matrix_eeconfig.val = %d\n", led_matrix_eeconfig.val); + dprintf("led_matrix_eeconfig.speed = %d\n", led_matrix_eeconfig.speed); + dprintf("led_matrix_eeconfig.flags = %d\n", led_matrix_eeconfig.flags); +} + +__attribute__((weak)) uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; } + +uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) { + uint8_t led_count = led_matrix_map_row_column_to_led_kb(row, column, led_i); + uint8_t led_index = g_led_config.matrix_co[row][column]; + if (led_index != NO_LED) { + led_i[led_count] = led_index; + led_count++; + } + return led_count; +} + +void led_matrix_update_pwm_buffers(void) { led_matrix_driver.flush(); } + +void led_matrix_set_value(int index, uint8_t value) { +#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) + if (!is_keyboard_left() && index >= k_led_matrix_split[0]) +# ifdef USE_CIE1931_CURVE + led_matrix_driver.set_value(index - k_led_matrix_split[0], pgm_read_byte(&CIE1931_CURVE[value])); +# else + led_matrix_driver.set_value(index - k_led_matrix_split[0], value); +# endif + else if (is_keyboard_left() && index < k_led_matrix_split[0]) +#endif +#ifdef USE_CIE1931_CURVE + led_matrix_driver.set_value(index, pgm_read_byte(&CIE1931_CURVE[value])); +#else + led_matrix_driver.set_value(index, value); +#endif +} + +void led_matrix_set_value_all(uint8_t value) { +#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) led_matrix_set_value(i, value); +#else +# ifdef USE_CIE1931_CURVE + led_matrix_driver.set_value_all(pgm_read_byte(&CIE1931_CURVE[value])); +# else + led_matrix_driver.set_value_all(value); +# endif +#endif +} + +void process_led_matrix(uint8_t row, uint8_t col, bool pressed) { +#ifndef LED_MATRIX_SPLIT + if (!is_keyboard_master()) return; +#endif +#if LED_DISABLE_TIMEOUT > 0 + led_anykey_timer = 0; +#endif // LED_DISABLE_TIMEOUT > 0 + +#ifdef LED_MATRIX_KEYREACTIVE_ENABLED + uint8_t led[LED_HITS_TO_REMEMBER]; + uint8_t led_count = 0; + +# if defined(LED_MATRIX_KEYRELEASES) + if (!pressed) +# elif defined(LED_MATRIX_KEYPRESSES) + if (pressed) +# endif // defined(LED_MATRIX_KEYRELEASES) + { + led_count = led_matrix_map_row_column_to_led(row, col, led); + } + + if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) { + memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count); + memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count); + memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit + memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count); + last_hit_buffer.count = LED_HITS_TO_REMEMBER - led_count; + } + + for (uint8_t i = 0; i < led_count; i++) { + uint8_t index = last_hit_buffer.count; + last_hit_buffer.x[index] = g_led_config.point[led[i]].x; + last_hit_buffer.y[index] = g_led_config.point[led[i]].y; + last_hit_buffer.index[index] = led[i]; + last_hit_buffer.tick[index] = 0; + last_hit_buffer.count++; + } +#endif // LED_MATRIX_KEYREACTIVE_ENABLED + +#if defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_LED_MATRIX_TYPING_HEATMAP) + if (led_matrix_eeconfig.mode == LED_MATRIX_TYPING_HEATMAP) { + process_led_matrix_typing_heatmap(row, col); + } +#endif // defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_LED_MATRIX_TYPING_HEATMAP) +} + +static bool led_matrix_none(effect_params_t *params) { + if (!params->init) { + return false; + } + + led_matrix_set_value_all(0); + return false; +} + +static void led_task_timers(void) { +#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_DISABLE_TIMEOUT > 0 + uint32_t deltaTime = sync_timer_elapsed32(led_timer_buffer); +#endif // defined(LED_MATRIX_KEYREACTIVE_ENABLED) || LED_DISABLE_TIMEOUT > 0 + led_timer_buffer = sync_timer_read32(); + + // Update double buffer timers +#if LED_DISABLE_TIMEOUT > 0 + if (led_anykey_timer < UINT32_MAX) { + if (UINT32_MAX - deltaTime < led_anykey_timer) { + led_anykey_timer = UINT32_MAX; + } else { + led_anykey_timer += deltaTime; + } + } +#endif // LED_DISABLE_TIMEOUT > 0 + + // Update double buffer last hit timers +#ifdef LED_MATRIX_KEYREACTIVE_ENABLED + uint8_t count = last_hit_buffer.count; + for (uint8_t i = 0; i < count; ++i) { + if (UINT16_MAX - deltaTime < last_hit_buffer.tick[i]) { + last_hit_buffer.count--; + continue; + } + last_hit_buffer.tick[i] += deltaTime; + } +#endif // LED_MATRIX_KEYREACTIVE_ENABLED +} + +static void led_task_sync(void) { + // next task + if (led_update_eeprom) eeconfig_update_led_matrix(); + led_update_eeprom = false; + if (sync_timer_elapsed32(g_led_timer) >= LED_MATRIX_LED_FLUSH_LIMIT) led_task_state = STARTING; +} + +static void led_task_start(void) { + // reset iter + led_effect_params.iter = 0; + + // update double buffers + g_led_timer = led_timer_buffer; +#ifdef LED_MATRIX_KEYREACTIVE_ENABLED + g_last_hit_tracker = last_hit_buffer; +#endif // LED_MATRIX_KEYREACTIVE_ENABLED + + // next task + led_task_state = RENDERING; +} + +static void led_task_render(uint8_t effect) { + bool rendering = false; + led_effect_params.init = (effect != led_last_effect) || (led_matrix_eeconfig.enable != led_last_enable); + if (led_effect_params.flags != led_matrix_eeconfig.flags) { + led_effect_params.flags = led_matrix_eeconfig.flags; + led_matrix_set_value_all(0); + } + + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch (effect) { + case LED_MATRIX_NONE: + rendering = led_matrix_none(&led_effect_params); + break; + +// --------------------------------------------- +// -----Begin led effect switch case macros----- +#define LED_MATRIX_EFFECT(name, ...) \ + case LED_MATRIX_##name: \ + rendering = name(&led_effect_params); \ + break; +#include "led_matrix_effects.inc" +#undef LED_MATRIX_EFFECT + +#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER) +# define LED_MATRIX_EFFECT(name, ...) \ + case LED_MATRIX_CUSTOM_##name: \ + rendering = name(&led_effect_params); \ + break; +# ifdef LED_MATRIX_CUSTOM_KB +# include "led_matrix_kb.inc" +# endif +# ifdef LED_MATRIX_CUSTOM_USER +# include "led_matrix_user.inc" +# endif +# undef LED_MATRIX_EFFECT +#endif + // -----End led effect switch case macros------- + // --------------------------------------------- + } + + led_effect_params.iter++; + + // next task + if (!rendering) { + led_task_state = FLUSHING; + if (!led_effect_params.init && effect == LED_MATRIX_NONE) { + // We only need to flush once if we are LED_MATRIX_NONE + led_task_state = SYNCING; + } + } +} + +static void led_task_flush(uint8_t effect) { + // update last trackers after the first full render so we can init over several frames + led_last_effect = effect; + led_last_enable = led_matrix_eeconfig.enable; + + // update pwm buffers + led_matrix_update_pwm_buffers(); + + // next task + led_task_state = SYNCING; +} + +void led_matrix_task(void) { + led_task_timers(); + + // Ideally we would also stop sending zeros to the LED driver PWM buffers + // while suspended and just do a software shutdown. This is a cheap hack for now. + bool suspend_backlight = suspend_state || +#if LED_DISABLE_TIMEOUT > 0 + (led_anykey_timer > (uint32_t)LED_DISABLE_TIMEOUT) || +#endif // LED_DISABLE_TIMEOUT > 0 + false; + + uint8_t effect = suspend_backlight || !led_matrix_eeconfig.enable ? 0 : led_matrix_eeconfig.mode; + + switch (led_task_state) { + case STARTING: + led_task_start(); + break; + case RENDERING: + led_task_render(effect); + if (effect) { + led_matrix_indicators(); + led_matrix_indicators_advanced(&led_effect_params); + } + break; + case FLUSHING: + led_task_flush(effect); + break; + case SYNCING: + led_task_sync(); + break; + } +} + +void led_matrix_indicators(void) { + led_matrix_indicators_kb(); + led_matrix_indicators_user(); +} + +__attribute__((weak)) void led_matrix_indicators_kb(void) {} + +__attribute__((weak)) void led_matrix_indicators_user(void) {} + +void led_matrix_indicators_advanced(effect_params_t *params) { + /* special handling is needed for "params->iter", since it's already been incremented. + * Could move the invocations to led_task_render, but then it's missing a few checks + * and not sure which would be better. Otherwise, this should be called from + * led_task_render, right before the iter++ line. + */ +#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL + uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * (params->iter - 1); + uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; + if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; +#else + uint8_t min = 0; + uint8_t max = DRIVER_LED_TOTAL; +#endif + led_matrix_indicators_advanced_kb(min, max); + led_matrix_indicators_advanced_user(min, max); +} + +__attribute__((weak)) void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {} + +__attribute__((weak)) void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {} + +void led_matrix_init(void) { + led_matrix_driver.init(); + +#ifdef LED_MATRIX_KEYREACTIVE_ENABLED + g_last_hit_tracker.count = 0; + for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) { + g_last_hit_tracker.tick[i] = UINT16_MAX; + } + + last_hit_buffer.count = 0; + for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) { + last_hit_buffer.tick[i] = UINT16_MAX; + } +#endif // LED_MATRIX_KEYREACTIVE_ENABLED + + if (!eeconfig_is_enabled()) { + dprintf("led_matrix_init_drivers eeconfig is not enabled.\n"); + eeconfig_init(); + eeconfig_update_led_matrix_default(); + } + + eeconfig_read_led_matrix(); + if (!led_matrix_eeconfig.mode) { + dprintf("led_matrix_init_drivers led_matrix_eeconfig.mode = 0. Write default values to EEPROM.\n"); + eeconfig_update_led_matrix_default(); + } + eeconfig_debug_led_matrix(); // display current eeprom values +} + +void led_matrix_set_suspend_state(bool state) { +#ifdef LED_DISABLE_WHEN_USB_SUSPENDED + if (state && !suspend_state && is_keyboard_master()) { // only run if turning off, and only once + led_task_render(0); // turn off all LEDs when suspending + led_task_flush(0); // and actually flash led state to LEDs + } + suspend_state = state; +#endif +} + +bool led_matrix_get_suspend_state(void) { return suspend_state; } + +void led_matrix_toggle_eeprom_helper(bool write_to_eeprom) { + led_matrix_eeconfig.enable ^= 1; + led_task_state = STARTING; + led_eeconfig_update(write_to_eeprom); + dprintf("led matrix toggle [%s]: led_matrix_eeconfig.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.enable); +} +void led_matrix_toggle_noeeprom(void) { led_matrix_toggle_eeprom_helper(false); } +void led_matrix_toggle(void) { led_matrix_toggle_eeprom_helper(true); } + +void led_matrix_enable(void) { + led_matrix_enable_noeeprom(); + led_eeconfig_update(true); +} + +void led_matrix_enable_noeeprom(void) { + if (!led_matrix_eeconfig.enable) led_task_state = STARTING; + led_matrix_eeconfig.enable = 1; +} + +void led_matrix_disable(void) { + led_matrix_disable_noeeprom(); + led_eeconfig_update(true); +} + +void led_matrix_disable_noeeprom(void) { + if (led_matrix_eeconfig.enable) led_task_state = STARTING; + led_matrix_eeconfig.enable = 0; +} + +uint8_t led_matrix_is_enabled(void) { return led_matrix_eeconfig.enable; } + +void led_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { + if (!led_matrix_eeconfig.enable) { + return; + } + if (mode < 1) { + led_matrix_eeconfig.mode = 1; + } else if (mode >= LED_MATRIX_EFFECT_MAX) { + led_matrix_eeconfig.mode = LED_MATRIX_EFFECT_MAX - 1; + } else { + led_matrix_eeconfig.mode = mode; + } + led_task_state = STARTING; + led_eeconfig_update(write_to_eeprom); + dprintf("led matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.mode); +} +void led_matrix_mode_noeeprom(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, false); } +void led_matrix_mode(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, true); } + +uint8_t led_matrix_get_mode(void) { return led_matrix_eeconfig.mode; } + +void led_matrix_step_helper(bool write_to_eeprom) { + uint8_t mode = led_matrix_eeconfig.mode + 1; + led_matrix_mode_eeprom_helper((mode < LED_MATRIX_EFFECT_MAX) ? mode : 1, write_to_eeprom); +} +void led_matrix_step_noeeprom(void) { led_matrix_step_helper(false); } +void led_matrix_step(void) { led_matrix_step_helper(true); } + +void led_matrix_step_reverse_helper(bool write_to_eeprom) { + uint8_t mode = led_matrix_eeconfig.mode - 1; + led_matrix_mode_eeprom_helper((mode < 1) ? LED_MATRIX_EFFECT_MAX - 1 : mode, write_to_eeprom); +} +void led_matrix_step_reverse_noeeprom(void) { led_matrix_step_reverse_helper(false); } +void led_matrix_step_reverse(void) { led_matrix_step_reverse_helper(true); } + +void led_matrix_set_val_eeprom_helper(uint8_t val, bool write_to_eeprom) { + if (!led_matrix_eeconfig.enable) { + return; + } + led_matrix_eeconfig.val = (val > LED_MATRIX_MAXIMUM_BRIGHTNESS) ? LED_MATRIX_MAXIMUM_BRIGHTNESS : val; + led_eeconfig_update(write_to_eeprom); + dprintf("led matrix set val [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.val); +} +void led_matrix_set_val_noeeprom(uint8_t val) { led_matrix_set_val_eeprom_helper(val, false); } +void led_matrix_set_val(uint8_t val) { led_matrix_set_val_eeprom_helper(val, true); } + +uint8_t led_matrix_get_val(void) { return led_matrix_eeconfig.val; } + +void led_matrix_increase_val_helper(bool write_to_eeprom) { led_matrix_set_val_eeprom_helper(qadd8(led_matrix_eeconfig.val, LED_MATRIX_VAL_STEP), write_to_eeprom); } +void led_matrix_increase_val_noeeprom(void) { led_matrix_increase_val_helper(false); } +void led_matrix_increase_val(void) { led_matrix_increase_val_helper(true); } + +void led_matrix_decrease_val_helper(bool write_to_eeprom) { led_matrix_set_val_eeprom_helper(qsub8(led_matrix_eeconfig.val, LED_MATRIX_VAL_STEP), write_to_eeprom); } +void led_matrix_decrease_val_noeeprom(void) { led_matrix_decrease_val_helper(false); } +void led_matrix_decrease_val(void) { led_matrix_decrease_val_helper(true); } + +void led_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { + led_matrix_eeconfig.speed = speed; + led_eeconfig_update(write_to_eeprom); + dprintf("led matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.speed); +} +void led_matrix_set_speed_noeeprom(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, false); } +void led_matrix_set_speed(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, true); } + +uint8_t led_matrix_get_speed(void) { return led_matrix_eeconfig.speed; } + +void led_matrix_increase_speed_helper(bool write_to_eeprom) { led_matrix_set_speed_eeprom_helper(qadd8(led_matrix_eeconfig.speed, LED_MATRIX_SPD_STEP), write_to_eeprom); } +void led_matrix_increase_speed_noeeprom(void) { led_matrix_increase_speed_helper(false); } +void led_matrix_increase_speed(void) { led_matrix_increase_speed_helper(true); } + +void led_matrix_decrease_speed_helper(bool write_to_eeprom) { led_matrix_set_speed_eeprom_helper(qsub8(led_matrix_eeconfig.speed, LED_MATRIX_SPD_STEP), write_to_eeprom); } +void led_matrix_decrease_speed_noeeprom(void) { led_matrix_decrease_speed_helper(false); } +void led_matrix_decrease_speed(void) { led_matrix_decrease_speed_helper(true); } + +led_flags_t led_matrix_get_flags(void) { return led_matrix_eeconfig.flags; } + +void led_matrix_set_flags(led_flags_t flags) { led_matrix_eeconfig.flags = flags; } diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h new file mode 100644 index 000000000..a7a1c983f --- /dev/null +++ b/quantum/led_matrix/led_matrix.h @@ -0,0 +1,161 @@ +/* Copyright 2017 Jason Williams + * Copyright 2017 Jack Humbert + * Copyright 2018 Yiancar + * Copyright 2019 Clueboard + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +#include +#include "led_matrix_types.h" +#include "quantum.h" +#include "led_matrix_legacy_enables.h" + +#ifdef IS31FL3731 +# include "is31fl3731-simple.h" +#endif + +#ifndef LED_MATRIX_LED_FLUSH_LIMIT +# define LED_MATRIX_LED_FLUSH_LIMIT 16 +#endif + +#ifndef LED_MATRIX_LED_PROCESS_LIMIT +# define LED_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 +#endif + +#if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL +# define LED_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \ + uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; \ + if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; +#else +# define LED_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = 0; \ + uint8_t max = DRIVER_LED_TOTAL; +#endif + +#define LED_MATRIX_TEST_LED_FLAGS() \ + if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue + +enum led_matrix_effects { + LED_MATRIX_NONE = 0, + +// -------------------------------------- +// -----Begin led effect enum macros----- +#define LED_MATRIX_EFFECT(name, ...) LED_MATRIX_##name, +#include "led_matrix_effects.inc" +#undef LED_MATRIX_EFFECT + +#if defined(LED_MATRIX_CUSTOM_KB) || defined(LED_MATRIX_CUSTOM_USER) +# define LED_MATRIX_EFFECT(name, ...) LED_MATRIX_CUSTOM_##name, +# ifdef LED_MATRIX_CUSTOM_KB +# include "led_matrix_kb.inc" +# endif +# ifdef LED_MATRIX_CUSTOM_USER +# include "led_matrix_user.inc" +# endif +# undef LED_MATRIX_EFFECT +#endif + // -------------------------------------- + // -----End led effect enum macros------- + + LED_MATRIX_EFFECT_MAX +}; + +void eeconfig_update_led_matrix_default(void); +void eeconfig_update_led_matrix(void); +void eeconfig_debug_led_matrix(void); + +uint8_t led_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i); +uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i); + +void led_matrix_set_value(int index, uint8_t value); +void led_matrix_set_value_all(uint8_t value); + +void process_led_matrix(uint8_t row, uint8_t col, bool pressed); + +void led_matrix_task(void); + +// This runs after another backlight effect and replaces +// values already set +void led_matrix_indicators(void); +void led_matrix_indicators_kb(void); +void led_matrix_indicators_user(void); + +void led_matrix_indicators_advanced(effect_params_t *params); +void led_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max); +void led_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); + +void led_matrix_init(void); + +void led_matrix_set_suspend_state(bool state); +bool led_matrix_get_suspend_state(void); +void led_matrix_toggle(void); +void led_matrix_toggle_noeeprom(void); +void led_matrix_enable(void); +void led_matrix_enable_noeeprom(void); +void led_matrix_disable(void); +void led_matrix_disable_noeeprom(void); +uint8_t led_matrix_is_enabled(void); +void led_matrix_mode(uint8_t mode); +void led_matrix_mode_noeeprom(uint8_t mode); +uint8_t led_matrix_get_mode(void); +void led_matrix_step(void); +void led_matrix_step_noeeprom(void); +void led_matrix_step_reverse(void); +void led_matrix_step_reverse_noeeprom(void); +void led_matrix_set_val(uint8_t val); +void led_matrix_set_val_noeeprom(uint8_t val); +uint8_t led_matrix_get_val(void); +void led_matrix_increase_val(void); +void led_matrix_increase_val_noeeprom(void); +void led_matrix_decrease_val(void); +void led_matrix_decrease_val_noeeprom(void); +void led_matrix_set_speed(uint8_t speed); +void led_matrix_set_speed_noeeprom(uint8_t speed); +uint8_t led_matrix_get_speed(void); +void led_matrix_increase_speed(void); +void led_matrix_increase_speed_noeeprom(void); +void led_matrix_decrease_speed(void); +void led_matrix_decrease_speed_noeeprom(void); +led_flags_t led_matrix_get_flags(void); +void led_matrix_set_flags(led_flags_t flags); + +typedef struct { + /* Perform any initialisation required for the other driver functions to work. */ + void (*init)(void); + + /* Set the brightness of a single LED in the buffer. */ + void (*set_value)(int index, uint8_t value); + /* Set the brightness of all LEDS on the keyboard in the buffer. */ + void (*set_value_all)(uint8_t value); + /* Flush any buffered changes to the hardware. */ + void (*flush)(void); +} led_matrix_driver_t; + +extern const led_matrix_driver_t led_matrix_driver; + +extern led_eeconfig_t led_matrix_eeconfig; + +extern uint32_t g_led_timer; +extern led_config_t g_led_config; +#ifdef LED_MATRIX_KEYREACTIVE_ENABLED +extern last_hit_t g_last_hit_tracker; +#endif +#ifdef LED_MATRIX_FRAMEBUFFER_EFFECTS +extern uint8_t g_led_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; +#endif diff --git a/quantum/led_matrix_drivers.c b/quantum/led_matrix/led_matrix_drivers.c similarity index 100% rename from quantum/led_matrix_drivers.c rename to quantum/led_matrix/led_matrix_drivers.c diff --git a/quantum/led_matrix/led_matrix_legacy_enables.h b/quantum/led_matrix/led_matrix_legacy_enables.h new file mode 100644 index 000000000..7738d2f34 --- /dev/null +++ b/quantum/led_matrix/led_matrix_legacy_enables.h @@ -0,0 +1,82 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// to-do: remove this + +#pragma once + +#ifndef DISABLE_LED_MATRIX_ALPHAS_MODS +# define ENABLE_LED_MATRIX_ALPHAS_MODS +#endif +#ifndef DISABLE_LED_MATRIX_BREATHING +# define ENABLE_LED_MATRIX_BREATHING +#endif +#ifndef DISABLE_LED_MATRIX_BAND +# define ENABLE_LED_MATRIX_BAND +#endif +#ifndef DISABLE_LED_MATRIX_BAND_PINWHEEL +# define ENABLE_LED_MATRIX_BAND_PINWHEEL +#endif +#ifndef DISABLE_LED_MATRIX_BAND_SPIRAL +# define ENABLE_LED_MATRIX_BAND_SPIRAL +#endif +#ifndef DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT +#endif +#ifndef DISABLE_LED_MATRIX_CYCLE_UP_DOWN +# define ENABLE_LED_MATRIX_CYCLE_UP_DOWN +#endif +#ifndef DISABLE_LED_MATRIX_CYCLE_OUT_IN +# define ENABLE_LED_MATRIX_CYCLE_OUT_IN +#endif +#ifndef DISABLE_LED_MATRIX_DUAL_BEACON +# define ENABLE_LED_MATRIX_DUAL_BEACON +#endif +#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) +# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE +# endif +# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE +# endif +# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE +# endif +# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS +# endif +# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS +# endif +# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS +# endif +# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS +# endif +# ifndef DISABLE_LED_MATRIX_SPLASH +# define ENABLE_LED_MATRIX_SPLASH +# endif +# ifndef DISABLE_LED_MATRIX_MULTISPLASH +# define ENABLE_LED_MATRIX_MULTISPLASH +# endif +#endif +#ifndef DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT +# define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT +#endif +#ifndef DISABLE_LED_MATRIX_WAVE_UP_DOWN +# define ENABLE_LED_MATRIX_WAVE_UP_DOWN +#endif diff --git a/quantum/led_matrix_types.h b/quantum/led_matrix/led_matrix_types.h similarity index 100% rename from quantum/led_matrix_types.h rename to quantum/led_matrix/led_matrix_types.h diff --git a/quantum/led_matrix_animations/alpha_mods_anim.h b/quantum/led_matrix_animations/alpha_mods_anim.h deleted file mode 100644 index 6f69f6892..000000000 --- a/quantum/led_matrix_animations/alpha_mods_anim.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef DISABLE_LED_MATRIX_ALPHAS_MODS -LED_MATRIX_EFFECT(ALPHAS_MODS) -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -// alphas = val1, mods = val2 -bool ALPHAS_MODS(effect_params_t* params) { - LED_MATRIX_USE_LIMITS(led_min, led_max); - - uint8_t val1 = led_matrix_eeconfig.val; - uint8_t val2 = val1 + led_matrix_eeconfig.speed; - - for (uint8_t i = led_min; i < led_max; i++) { - LED_MATRIX_TEST_LED_FLAGS(); - if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { - led_matrix_set_value(i, val2); - } else { - led_matrix_set_value(i, val1); - } - } - return led_max < DRIVER_LED_TOTAL; -} - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_ALPHAS_MODS diff --git a/quantum/led_matrix_animations/band_anim.h b/quantum/led_matrix_animations/band_anim.h deleted file mode 100644 index 523dba1b7..000000000 --- a/quantum/led_matrix_animations/band_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_LED_MATRIX_BAND -LED_MATRIX_EFFECT(BAND) -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t BAND_math(uint8_t val, uint8_t i, uint8_t time) { - int16_t v = val - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; - return scale8(v < 0 ? 0 : v, val); -} - -bool BAND(effect_params_t* params) { return effect_runner_i(params, &BAND_math); } - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_BAND diff --git a/quantum/led_matrix_animations/band_pinwheel_anim.h b/quantum/led_matrix_animations/band_pinwheel_anim.h deleted file mode 100644 index fb3b835ca..000000000 --- a/quantum/led_matrix_animations/band_pinwheel_anim.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef DISABLE_LED_MATRIX_BAND_PINWHEEL -LED_MATRIX_EFFECT(BAND_PINWHEEL) -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t time) { return scale8(val - time - atan2_8(dy, dx) * 3, val); } - -bool BAND_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_math); } - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_BAND_PINWHEEL diff --git a/quantum/led_matrix_animations/band_spiral_anim.h b/quantum/led_matrix_animations/band_spiral_anim.h deleted file mode 100644 index fca22aad9..000000000 --- a/quantum/led_matrix_animations/band_spiral_anim.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef DISABLE_LED_MATRIX_BAND_SPIRAL -LED_MATRIX_EFFECT(BAND_SPIRAL) -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(val + dist - time - atan2_8(dy, dx), val); } - -bool BAND_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math); } - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_BAND_SPIRAL diff --git a/quantum/led_matrix_animations/breathing_anim.h b/quantum/led_matrix_animations/breathing_anim.h deleted file mode 100644 index 00310e3f6..000000000 --- a/quantum/led_matrix_animations/breathing_anim.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef DISABLE_LED_MATRIX_BREATHING -LED_MATRIX_EFFECT(BREATHING) -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -bool BREATHING(effect_params_t* params) { - LED_MATRIX_USE_LIMITS(led_min, led_max); - - uint8_t val = led_matrix_eeconfig.val; - uint16_t time = scale16by8(g_led_timer, led_matrix_eeconfig.speed / 8); - val = scale8(abs8(sin8(time) - 128) * 2, val); - for (uint8_t i = led_min; i < led_max; i++) { - LED_MATRIX_TEST_LED_FLAGS(); - led_matrix_set_value(i, val); - } - return led_max < DRIVER_LED_TOTAL; -} - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_BREATHING diff --git a/quantum/led_matrix_animations/cycle_left_right_anim.h b/quantum/led_matrix_animations/cycle_left_right_anim.h deleted file mode 100644 index 51e81d57c..000000000 --- a/quantum/led_matrix_animations/cycle_left_right_anim.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT -LED_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].x - time, val); } - -bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); } - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT diff --git a/quantum/led_matrix_animations/cycle_out_in_anim.h b/quantum/led_matrix_animations/cycle_out_in_anim.h deleted file mode 100644 index f62061552..000000000 --- a/quantum/led_matrix_animations/cycle_out_in_anim.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef DISABLE_LED_MATRIX_CYCLE_OUT_IN -LED_MATRIX_EFFECT(CYCLE_OUT_IN) -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { return scale8(3 * dist / 2 + time, val); } - -bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); } - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN diff --git a/quantum/led_matrix_animations/cycle_up_down_anim.h b/quantum/led_matrix_animations/cycle_up_down_anim.h deleted file mode 100644 index bd1d12567..000000000 --- a/quantum/led_matrix_animations/cycle_up_down_anim.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef DISABLE_LED_MATRIX_CYCLE_UP_DOWN -LED_MATRIX_EFFECT(CYCLE_UP_DOWN) -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(g_led_config.point[i].y - time, val); } - -bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); } - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_CYCLE_UP_DOWN diff --git a/quantum/led_matrix_animations/dual_beacon_anim.h b/quantum/led_matrix_animations/dual_beacon_anim.h deleted file mode 100644 index 9b8a7877c..000000000 --- a/quantum/led_matrix_animations/dual_beacon_anim.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef DISABLE_LED_MATRIX_DUAL_BEACON -LED_MATRIX_EFFECT(DUAL_BEACON) -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { return scale8(((g_led_config.point[i].y - k_led_matrix_center.y) * cos + (g_led_config.point[i].x - k_led_matrix_center.x) * sin) / 128, val); } - -bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); } - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_DUAL_BEACON diff --git a/quantum/led_matrix_animations/led_matrix_effects.inc b/quantum/led_matrix_animations/led_matrix_effects.inc deleted file mode 100644 index 67237c568..000000000 --- a/quantum/led_matrix_animations/led_matrix_effects.inc +++ /dev/null @@ -1,18 +0,0 @@ -// Add your new core led matrix effect here, order determins enum order, requires "led_matrix_animations/ directory -#include "led_matrix_animations/solid_anim.h" -#include "led_matrix_animations/alpha_mods_anim.h" -#include "led_matrix_animations/breathing_anim.h" -#include "led_matrix_animations/band_anim.h" -#include "led_matrix_animations/band_pinwheel_anim.h" -#include "led_matrix_animations/band_spiral_anim.h" -#include "led_matrix_animations/cycle_left_right_anim.h" -#include "led_matrix_animations/cycle_up_down_anim.h" -#include "led_matrix_animations/cycle_out_in_anim.h" -#include "led_matrix_animations/dual_beacon_anim.h" -#include "led_matrix_animations/solid_reactive_simple_anim.h" -#include "led_matrix_animations/solid_reactive_wide.h" -#include "led_matrix_animations/solid_reactive_cross.h" -#include "led_matrix_animations/solid_reactive_nexus.h" -#include "led_matrix_animations/solid_splash_anim.h" -#include "led_matrix_animations/wave_left_right_anim.h" -#include "led_matrix_animations/wave_up_down_anim.h" diff --git a/quantum/led_matrix_animations/solid_reactive_cross.h b/quantum/led_matrix_animations/solid_reactive_cross.h deleted file mode 100644 index f402d99b3..000000000 --- a/quantum/led_matrix_animations/solid_reactive_cross.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifdef LED_MATRIX_KEYREACTIVE_ENABLED -# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS) - -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS -LED_MATRIX_EFFECT(SOLID_REACTIVE_CROSS) -# endif - -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS -LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS) -# endif - -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t SOLID_REACTIVE_CROSS_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { - uint16_t effect = tick + dist; - dx = dx < 0 ? dx * -1 : dx; - dy = dy < 0 ? dy * -1 : dy; - dx = dx * 16 > 255 ? 255 : dx * 16; - dy = dy * 16 > 255 ? 255 : dy * 16; - effect += dx > dy ? dy : dx; - if (effect > 255) effect = 255; - return qadd8(val, 255 - effect); -} - -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS -bool SOLID_REACTIVE_CROSS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); } -# endif - -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS -bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); } -# endif - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS) -#endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix_animations/solid_reactive_nexus.h b/quantum/led_matrix_animations/solid_reactive_nexus.h deleted file mode 100644 index 4d0d25226..000000000 --- a/quantum/led_matrix_animations/solid_reactive_nexus.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifdef LED_MATRIX_KEYREACTIVE_ENABLED -# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS) - -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS -LED_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS) -# endif - -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS -LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS) -# endif - -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t SOLID_REACTIVE_NEXUS_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { - uint16_t effect = tick - dist; - if (effect > 255) effect = 255; - if (dist > 72) effect = 255; - if ((dx > 8 || dx < -8) && (dy > 8 || dy < -8)) effect = 255; - return qadd8(val, 255 - effect); -} - -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS -bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); } -# endif - -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS -bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); } -# endif - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS) -#endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix_animations/solid_reactive_simple_anim.h b/quantum/led_matrix_animations/solid_reactive_simple_anim.h deleted file mode 100644 index 30e2527f6..000000000 --- a/quantum/led_matrix_animations/solid_reactive_simple_anim.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef LED_MATRIX_KEYREACTIVE_ENABLED -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE -LED_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) { return scale8(255 - offset, val); } - -bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); } - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE -#endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix_animations/solid_reactive_wide.h b/quantum/led_matrix_animations/solid_reactive_wide.h deleted file mode 100644 index 34a230c25..000000000 --- a/quantum/led_matrix_animations/solid_reactive_wide.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifdef LED_MATRIX_KEYREACTIVE_ENABLED -# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE) - -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE -LED_MATRIX_EFFECT(SOLID_REACTIVE_WIDE) -# endif - -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE -LED_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE) -# endif - -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t SOLID_REACTIVE_WIDE_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { - uint16_t effect = tick + dist * 5; - if (effect > 255) effect = 255; - return qadd8(val, 255 - effect); -} - -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE -bool SOLID_REACTIVE_WIDE(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); } -# endif - -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE -bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); } -# endif - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE) -#endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix_animations/solid_splash_anim.h b/quantum/led_matrix_animations/solid_splash_anim.h deleted file mode 100644 index 4f6ba3d34..000000000 --- a/quantum/led_matrix_animations/solid_splash_anim.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifdef LED_MATRIX_KEYREACTIVE_ENABLED -# if !defined(DISABLE_LED_MATRIX_SOLID_SPLASH) || !defined(DISABLE_LED_MATRIX_SOLID_MULTISPLASH) - -# ifndef DISABLE_LED_MATRIX_SOLID_SPLASH -LED_MATRIX_EFFECT(SOLID_SPLASH) -# endif - -# ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH -LED_MATRIX_EFFECT(SOLID_MULTISPLASH) -# endif - -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -uint8_t SOLID_SPLASH_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { - uint16_t effect = tick - dist; - if (effect > 255) effect = 255; - return qadd8(val, 255 - effect); -} - -# ifndef DISABLE_LED_MATRIX_SOLID_SPLASH -bool SOLID_SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); } -# endif - -# ifndef DISABLE_LED_MATRIX_SOLID_MULTISPLASH -bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); } -# endif - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_LED_MATRIX_SPLASH) && !defined(DISABLE_LED_MATRIX_MULTISPLASH) -#endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix_animations/wave_left_right_anim.h b/quantum/led_matrix_animations/wave_left_right_anim.h deleted file mode 100644 index 736f22ddc..000000000 --- a/quantum/led_matrix_animations/wave_left_right_anim.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT -LED_MATRIX_EFFECT(WAVE_LEFT_RIGHT) -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].x - time), val); } - -bool WAVE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &WAVE_LEFT_RIGHT_math); } - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT diff --git a/quantum/led_matrix_animations/wave_up_down_anim.h b/quantum/led_matrix_animations/wave_up_down_anim.h deleted file mode 100644 index 3cab0597d..000000000 --- a/quantum/led_matrix_animations/wave_up_down_anim.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef DISABLE_LED_MATRIX_WAVE_UP_DOWN -LED_MATRIX_EFFECT(WAVE_UP_DOWN) -# ifdef LED_MATRIX_CUSTOM_EFFECT_IMPLS - -static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return scale8(sin8(g_led_config.point[i].y - time), val); } - -bool WAVE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &WAVE_UP_DOWN_math); } - -# endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_WAVE_UP_DOWN diff --git a/tmk_core/common/debug.c b/quantum/logging/debug.c similarity index 100% rename from tmk_core/common/debug.c rename to quantum/logging/debug.c diff --git a/quantum/logging/debug.h b/quantum/logging/debug.h new file mode 100644 index 000000000..841531035 --- /dev/null +++ b/quantum/logging/debug.h @@ -0,0 +1,169 @@ +/* +Copyright 2011 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include +#include "print.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Debug output control + */ +typedef union { + struct { + bool enable : 1; + bool matrix : 1; + bool keyboard : 1; + bool mouse : 1; + uint8_t reserved : 4; + }; + uint8_t raw; +} debug_config_t; + +extern debug_config_t debug_config; + +#ifdef __cplusplus +} +#endif + +/* for backward compatibility */ +#define debug_enable (debug_config.enable) +#define debug_matrix (debug_config.matrix) +#define debug_keyboard (debug_config.keyboard) +#define debug_mouse (debug_config.mouse) + +/* + * Debug print utils + */ +#ifndef NO_DEBUG + +# define dprint(s) \ + do { \ + if (debug_enable) print(s); \ + } while (0) +# define dprintln(s) \ + do { \ + if (debug_enable) println(s); \ + } while (0) +# define dprintf(fmt, ...) \ + do { \ + if (debug_enable) xprintf(fmt, ##__VA_ARGS__); \ + } while (0) +# define dmsg(s) dprintf("%s at %d: %s\n", __FILE__, __LINE__, s) + +/* Deprecated. DO NOT USE these anymore, use dprintf instead. */ +# define debug(s) \ + do { \ + if (debug_enable) print(s); \ + } while (0) +# define debugln(s) \ + do { \ + if (debug_enable) println(s); \ + } while (0) +# define debug_msg(s) \ + do { \ + if (debug_enable) { \ + print(__FILE__); \ + print(" at "); \ + print_dec(__LINE__); \ + print(" in "); \ + print(": "); \ + print(s); \ + } \ + } while (0) +# define debug_dec(data) \ + do { \ + if (debug_enable) print_dec(data); \ + } while (0) +# define debug_decs(data) \ + do { \ + if (debug_enable) print_decs(data); \ + } while (0) +# define debug_hex4(data) \ + do { \ + if (debug_enable) print_hex4(data); \ + } while (0) +# define debug_hex8(data) \ + do { \ + if (debug_enable) print_hex8(data); \ + } while (0) +# define debug_hex16(data) \ + do { \ + if (debug_enable) print_hex16(data); \ + } while (0) +# define debug_hex32(data) \ + do { \ + if (debug_enable) print_hex32(data); \ + } while (0) +# define debug_bin8(data) \ + do { \ + if (debug_enable) print_bin8(data); \ + } while (0) +# define debug_bin16(data) \ + do { \ + if (debug_enable) print_bin16(data); \ + } while (0) +# define debug_bin32(data) \ + do { \ + if (debug_enable) print_bin32(data); \ + } while (0) +# define debug_bin_reverse8(data) \ + do { \ + if (debug_enable) print_bin_reverse8(data); \ + } while (0) +# define debug_bin_reverse16(data) \ + do { \ + if (debug_enable) print_bin_reverse16(data); \ + } while (0) +# define debug_bin_reverse32(data) \ + do { \ + if (debug_enable) print_bin_reverse32(data); \ + } while (0) +# define debug_hex(data) debug_hex8(data) +# define debug_bin(data) debug_bin8(data) +# define debug_bin_reverse(data) debug_bin8(data) + +#else /* NO_DEBUG */ + +# define dprint(s) +# define dprintln(s) +# define dprintf(fmt, ...) +# define dmsg(s) +# define debug(s) +# define debugln(s) +# define debug_msg(s) +# define debug_dec(data) +# define debug_decs(data) +# define debug_hex4(data) +# define debug_hex8(data) +# define debug_hex16(data) +# define debug_hex32(data) +# define debug_bin8(data) +# define debug_bin16(data) +# define debug_bin32(data) +# define debug_bin_reverse8(data) +# define debug_bin_reverse16(data) +# define debug_bin_reverse32(data) +# define debug_hex(data) +# define debug_bin(data) +# define debug_bin_reverse(data) + +#endif /* NO_DEBUG */ diff --git a/tmk_core/common/nodebug.h b/quantum/logging/nodebug.h similarity index 100% rename from tmk_core/common/nodebug.h rename to quantum/logging/nodebug.h diff --git a/tmk_core/common/printf.c b/quantum/logging/print.c similarity index 100% rename from tmk_core/common/printf.c rename to quantum/logging/print.c diff --git a/tmk_core/common/print.h b/quantum/logging/print.h similarity index 100% rename from tmk_core/common/print.h rename to quantum/logging/print.h diff --git a/quantum/logging/print.mk b/quantum/logging/print.mk new file mode 100644 index 000000000..67c004192 --- /dev/null +++ b/quantum/logging/print.mk @@ -0,0 +1,9 @@ +PRINTF_PATH = $(LIB_PATH)/printf + +VPATH += $(PRINTF_PATH) +SRC += $(PRINTF_PATH)/printf.c +QUANTUM_SRC +=$(QUANTUM_DIR)/logging/print.c +OPT_DEFS += -DPRINTF_DISABLE_SUPPORT_FLOAT +OPT_DEFS += -DPRINTF_DISABLE_SUPPORT_EXPONENTIAL +OPT_DEFS += -DPRINTF_DISABLE_SUPPORT_LONG_LONG +OPT_DEFS += -DPRINTF_DISABLE_SUPPORT_PTRDIFF_T diff --git a/quantum/logging/sendchar.c b/quantum/logging/sendchar.c new file mode 100644 index 000000000..9422382f6 --- /dev/null +++ b/quantum/logging/sendchar.c @@ -0,0 +1,20 @@ +/* +Copyright 2011 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 "sendchar.h" + +/* default noop "null" implementation */ +__attribute__((weak)) int8_t sendchar(uint8_t c) { return 0; } diff --git a/tmk_core/common/sendchar.h b/quantum/logging/sendchar.h similarity index 100% rename from tmk_core/common/sendchar.h rename to quantum/logging/sendchar.h diff --git a/quantum/main.c b/quantum/main.c new file mode 100644 index 000000000..2cbcd73d8 --- /dev/null +++ b/quantum/main.c @@ -0,0 +1,41 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "keyboard.h" + +void platform_setup(void); + +void protocol_setup(void); +void protocol_init(void); +void protocol_task(void); + +/** \brief Main + * + * FIXME: Needs doc + */ +int main(void) __attribute__((weak)); +int main(void) { + platform_setup(); + protocol_setup(); + + protocol_init(); + + /* Main loop */ + while (true) { + protocol_task(); + housekeeping_task(); + } +} diff --git a/quantum/matrix.c b/quantum/matrix.c index 34d6af2e6..33586c431 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -16,22 +16,65 @@ along with this program. If not, see . */ #include #include +#include #include "util.h" #include "matrix.h" #include "debounce.h" #include "quantum.h" +#ifdef SPLIT_KEYBOARD +# include "split_common/split_util.h" +# include "split_common/transactions.h" + +# define ROWS_PER_HAND (MATRIX_ROWS / 2) +#else +# define ROWS_PER_HAND (MATRIX_ROWS) +#endif + +#ifdef DIRECT_PINS_RIGHT +# define SPLIT_MUTABLE +#else +# define SPLIT_MUTABLE const +#endif +#ifdef MATRIX_ROW_PINS_RIGHT +# define SPLIT_MUTABLE_ROW +#else +# define SPLIT_MUTABLE_ROW const +#endif +#ifdef MATRIX_COL_PINS_RIGHT +# define SPLIT_MUTABLE_COL +#else +# define SPLIT_MUTABLE_COL const +#endif #ifdef DIRECT_PINS -static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +static SPLIT_MUTABLE pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; #elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) -static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +# ifdef MATRIX_ROW_PINS +static SPLIT_MUTABLE_ROW pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +# endif // MATRIX_ROW_PINS +# ifdef MATRIX_COL_PINS +static SPLIT_MUTABLE_COL pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +# endif // MATRIX_COL_PINS #endif /* matrix state(1:on, 0:off) */ extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values +#ifdef SPLIT_KEYBOARD +// row offsets for each hand +uint8_t thisHand, thatHand; +#endif + +// user-defined overridable functions +__attribute__((weak)) void matrix_init_pins(void); +__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); +__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); +#ifdef SPLIT_KEYBOARD +__attribute__((weak)) void matrix_slave_scan_kb(void) { matrix_slave_scan_user(); } +__attribute__((weak)) void matrix_slave_scan_user(void) {} +#endif + static inline void setPinOutput_writeLow(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinOutput(pin); @@ -43,11 +86,19 @@ static inline void setPinInputHigh_atomic(pin_t pin) { ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); } } +static inline uint8_t readMatrixPin(pin_t pin) { + if (pin != NO_PIN) { + return readPin(pin); + } else { + return 1; + } +} + // matrix code #ifdef DIRECT_PINS -static void init_pins(void) { +__attribute__((weak)) void matrix_init_pins(void) { for (int row = 0; row < MATRIX_ROWS; row++) { for (int col = 0; col < MATRIX_COLS; col++) { pin_t pin = direct_pins[row][col]; @@ -58,7 +109,7 @@ static void init_pins(void) { } } -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { +__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { // Start with a clear matrix row matrix_row_t current_row_value = 0; @@ -69,46 +120,57 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) } } - // If the row has changed, store the row and return the changed flag. - if (current_matrix[current_row] != current_row_value) { - current_matrix[current_row] = current_row_value; + // Update the matrix + current_matrix[current_row] = current_row_value; +} + +#elif defined(DIODE_DIRECTION) +# if defined(MATRIX_ROW_PINS) && defined(MATRIX_COL_PINS) +# if (DIODE_DIRECTION == COL2ROW) + +static bool select_row(uint8_t row) { + pin_t pin = row_pins[row]; + if (pin != NO_PIN) { + setPinOutput_writeLow(pin); return true; } return false; } -#elif defined(DIODE_DIRECTION) -# if (DIODE_DIRECTION == COL2ROW) - -static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); } - -static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); } +static void unselect_row(uint8_t row) { + pin_t pin = row_pins[row]; + if (pin != NO_PIN) { + setPinInputHigh_atomic(pin); + } +} static void unselect_rows(void) { - for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInputHigh_atomic(row_pins[x]); + for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { + unselect_row(x); } } -static void init_pins(void) { +__attribute__((weak)) void matrix_init_pins(void) { unselect_rows(); for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh_atomic(col_pins[x]); + if (col_pins[x] != NO_PIN) { + setPinInputHigh_atomic(col_pins[x]); + } } } -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { +__attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { // Start with a clear matrix row matrix_row_t current_row_value = 0; - // Select row - select_row(current_row); + if (!select_row(current_row)) { // Select row + return; // skip NO_PIN row + } matrix_output_select_delay(); // For each col... for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { - // Select the col pin to read (active low) - uint8_t pin_state = readPin(col_pins[col_index]); + uint8_t pin_state = readMatrixPin(col_pins[col_index]); // Populate the matrix row with the state of the col pin current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); @@ -116,81 +178,114 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // Unselect row unselect_row(current_row); - matrix_output_unselect_delay(); // wait for all Col signals to go HIGH + matrix_output_unselect_delay(current_row, current_row_value != 0); // wait for all Col signals to go HIGH - // If the row has changed, store the row and return the changed flag. - if (current_matrix[current_row] != current_row_value) { - current_matrix[current_row] = current_row_value; + // Update the matrix + current_matrix[current_row] = current_row_value; +} + +# elif (DIODE_DIRECTION == ROW2COL) + +static bool select_col(uint8_t col) { + pin_t pin = col_pins[col]; + if (pin != NO_PIN) { + setPinOutput_writeLow(pin); return true; } return false; } -# elif (DIODE_DIRECTION == ROW2COL) - -static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); } - -static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); } +static void unselect_col(uint8_t col) { + pin_t pin = col_pins[col]; + if (pin != NO_PIN) { + setPinInputHigh_atomic(pin); + } +} static void unselect_cols(void) { for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh_atomic(col_pins[x]); + unselect_col(x); } } -static void init_pins(void) { +__attribute__((weak)) void matrix_init_pins(void) { unselect_cols(); - for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - setPinInputHigh_atomic(row_pins[x]); + for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { + if (row_pins[x] != NO_PIN) { + setPinInputHigh_atomic(row_pins[x]); + } } } -static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { - bool matrix_changed = false; +__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + bool key_pressed = false; // Select col - select_col(current_col); + if (!select_col(current_col)) { // select col + return; // skip NO_PIN col + } matrix_output_select_delay(); // For each row... - for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[row_index]; - matrix_row_t current_row_value = last_row_value; - + for (uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) { // Check row pin state - if (readPin(row_pins[row_index]) == 0) { + if (readMatrixPin(row_pins[row_index]) == 0) { // Pin LO, set col bit - current_row_value |= (MATRIX_ROW_SHIFTER << current_col); + current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col); + key_pressed = true; } else { // Pin HI, clear col bit - current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col); - } - - // Determine if the matrix changed state - if ((last_row_value != current_row_value)) { - matrix_changed |= true; - current_matrix[row_index] = current_row_value; + current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); } } // Unselect col unselect_col(current_col); - matrix_output_unselect_delay(); // wait for all Row signals to go HIGH - - return matrix_changed; + matrix_output_unselect_delay(current_col, key_pressed); // wait for all Row signals to go HIGH } -# else -# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL! -# endif +# else +# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL! +# endif +# endif // defined(MATRIX_ROW_PINS) && defined(MATRIX_COL_PINS) #else # error DIODE_DIRECTION is not defined! #endif void matrix_init(void) { +#ifdef SPLIT_KEYBOARD + split_pre_init(); + + // Set pinout for right half if pinout for that half is defined + if (!isLeftHand) { +# ifdef DIRECT_PINS_RIGHT + const pin_t direct_pins_right[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS_RIGHT; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + for (uint8_t j = 0; j < MATRIX_COLS; j++) { + direct_pins[i][j] = direct_pins_right[i][j]; + } + } +# endif +# ifdef MATRIX_ROW_PINS_RIGHT + const pin_t row_pins_right[MATRIX_ROWS] = MATRIX_ROW_PINS_RIGHT; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + row_pins[i] = row_pins_right[i]; + } +# endif +# ifdef MATRIX_COL_PINS_RIGHT + const pin_t col_pins_right[MATRIX_COLS] = MATRIX_COL_PINS_RIGHT; + for (uint8_t i = 0; i < MATRIX_COLS; i++) { + col_pins[i] = col_pins_right[i]; + } +# endif + } + + thisHand = isLeftHand ? 0 : (ROWS_PER_HAND); + thatHand = ROWS_PER_HAND - thisHand; +#endif + // initialize key pins - init_pins(); + matrix_init_pins(); // initialize matrix state: all keys off for (uint8_t i = 0; i < MATRIX_ROWS; i++) { @@ -198,28 +293,78 @@ void matrix_init(void) { matrix[i] = 0; } - debounce_init(MATRIX_ROWS); + debounce_init(ROWS_PER_HAND); matrix_init_quantum(); + +#ifdef SPLIT_KEYBOARD + split_post_init(); +#endif } -uint8_t matrix_scan(void) { +#ifdef SPLIT_KEYBOARD +// Fallback implementation for keyboards not using the standard split_util.c +__attribute__((weak)) bool transport_master_if_connected(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + transport_master(master_matrix, slave_matrix); + return true; // Treat the transport as always connected +} + +bool matrix_post_scan(void) { bool changed = false; + if (is_keyboard_master()) { + matrix_row_t slave_matrix[ROWS_PER_HAND] = {0}; + if (transport_master_if_connected(matrix + thisHand, slave_matrix)) { + for (int i = 0; i < ROWS_PER_HAND; ++i) { + if (matrix[thatHand + i] != slave_matrix[i]) { + matrix[thatHand + i] = slave_matrix[i]; + changed = true; + } + } + } else { + // reset other half if disconnected + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[thatHand + i] = 0; + slave_matrix[i] = 0; + } + + changed = true; + } + + matrix_scan_quantum(); + } else { + transport_slave(matrix + thatHand, matrix + thisHand); + + matrix_slave_scan_kb(); + } + + return changed; +} +#endif + +uint8_t matrix_scan(void) { + matrix_row_t curr_matrix[MATRIX_ROWS] = {0}; #if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW) // Set row, read cols - for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { - changed |= read_cols_on_row(raw_matrix, current_row); + for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { + matrix_read_cols_on_row(curr_matrix, current_row); } #elif (DIODE_DIRECTION == ROW2COL) // Set col, read rows for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { - changed |= read_rows_on_col(raw_matrix, current_col); + matrix_read_rows_on_col(curr_matrix, current_col); } #endif - debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + bool changed = memcmp(raw_matrix, curr_matrix, sizeof(curr_matrix)) != 0; + if (changed) memcpy(raw_matrix, curr_matrix, sizeof(curr_matrix)); +#ifdef SPLIT_KEYBOARD + debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed); + changed = (changed || matrix_post_scan()); +#else + debounce(raw_matrix, matrix, ROWS_PER_HAND, changed); matrix_scan_quantum(); +#endif return (uint8_t)changed; } diff --git a/quantum/matrix.h b/quantum/matrix.h index 3fe691aae..5c696622f 100644 --- a/quantum/matrix.h +++ b/quantum/matrix.h @@ -56,7 +56,7 @@ matrix_row_t matrix_get_row(uint8_t row); void matrix_print(void); /* delay between changing matrix pin state and reading values */ void matrix_output_select_delay(void); -void matrix_output_unselect_delay(void); +void matrix_output_unselect_delay(uint8_t line, bool key_pressed); /* only for backwards compatibility. delay between changing matrix pin state and reading values */ void matrix_io_delay(void); diff --git a/quantum/matrix_common.c b/quantum/matrix_common.c index efbad6a5f..66c89970b 100644 --- a/quantum/matrix_common.c +++ b/quantum/matrix_common.c @@ -88,7 +88,7 @@ uint8_t matrix_key_count(void) { __attribute__((weak)) void matrix_io_delay(void) { wait_us(MATRIX_IO_DELAY); } __attribute__((weak)) void matrix_output_select_delay(void) { waitInputPinDelay(); } -__attribute__((weak)) void matrix_output_unselect_delay(void) { matrix_io_delay(); } +__attribute__((weak)) void matrix_output_unselect_delay(uint8_t line, bool key_pressed) { matrix_io_delay(); } // CUSTOM MATRIX 'LITE' __attribute__((weak)) void matrix_init_custom(void) {} diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk index 9268c4522..f7eaeec8a 100644 --- a/quantum/mcu_selection.mk +++ b/quantum/mcu_selection.mk @@ -136,10 +136,6 @@ ifneq ($(findstring STM32F042, $(MCU)),) USE_FPU ?= no - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32F0 endif @@ -172,10 +168,6 @@ ifneq ($(findstring STM32F072, $(MCU)),) USE_FPU ?= no - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32F0 endif @@ -208,10 +200,6 @@ ifneq ($(findstring STM32F103, $(MCU)),) USE_FPU ?= no - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32F1 endif @@ -244,10 +232,6 @@ ifneq ($(findstring STM32F303, $(MCU)),) USE_FPU ?= yes - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32F3 endif @@ -268,7 +252,12 @@ ifneq ($(findstring STM32F401, $(MCU)),) # Linker script to use # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ # or /ld/ - MCU_LDSCRIPT ?= STM32F401xC + ifeq ($(strip $(BOOTLOADER)), tinyuf2) + MCU_LDSCRIPT ?= STM32F401xC_tinyuf2 + FIRMWARE_FORMAT ?= uf2 + else + MCU_LDSCRIPT ?= STM32F401xC + endif # Startup code to use # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ @@ -280,9 +269,37 @@ ifneq ($(findstring STM32F401, $(MCU)),) USE_FPU ?= yes - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 + # UF2 settings + UF2_FAMILY ?= STM32F4 +endif + +ifneq ($(findstring STM32F407, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F4xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F407xE + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_F407XE + + USE_FPU ?= yes # UF2 settings UF2_FAMILY ?= STM32F4 @@ -321,10 +338,6 @@ ifneq ($(findstring STM32F411, $(MCU)),) USE_FPU ?= yes - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32F4 endif @@ -357,10 +370,6 @@ ifneq ($(findstring STM32F446, $(MCU)),) BOARD ?= GENERIC_STM32_F446XE USE_FPU ?= yes - - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 endif ifneq ($(findstring STM32G431, $(MCU)),) @@ -391,10 +400,6 @@ ifneq ($(findstring STM32G431, $(MCU)),) USE_FPU ?= yes - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32G4 endif @@ -427,10 +432,6 @@ ifneq ($(findstring STM32G474, $(MCU)),) USE_FPU ?= yes - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 - # UF2 settings UF2_FAMILY ?= STM32G4 endif @@ -465,9 +466,39 @@ ifneq (,$(filter $(MCU),STM32L433 STM32L443)) USE_FPU ?= yes - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 + # UF2 settings + UF2_FAMILY ?= STM32L4 +endif + +ifneq (,$(filter $(MCU),STM32L412 STM32L422)) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32L4xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32L412xB + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32l4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_L412XB + + PLATFORM_NAME ?= platform_l432 + + USE_FPU ?= yes # UF2 settings UF2_FAMILY ?= STM32L4 diff --git a/quantum/mousekey.c b/quantum/mousekey.c index 99bfd6b96..c2291fb39 100644 --- a/quantum/mousekey.c +++ b/quantum/mousekey.c @@ -486,3 +486,5 @@ static void mousekey_debug(void) { print_dec(mousekey_accel); print(")\n"); } + +report_mouse_t mousekey_get_report(void) { return mouse_report; } diff --git a/quantum/mousekey.h b/quantum/mousekey.h index 70dc4bb5c..56c91b5f1 100644 --- a/quantum/mousekey.h +++ b/quantum/mousekey.h @@ -168,11 +168,12 @@ extern uint8_t mk_time_to_max; extern uint8_t mk_wheel_max_speed; extern uint8_t mk_wheel_time_to_max; -void mousekey_task(void); -void mousekey_on(uint8_t code); -void mousekey_off(uint8_t code); -void mousekey_clear(void); -void mousekey_send(void); +void mousekey_task(void); +void mousekey_on(uint8_t code); +void mousekey_off(uint8_t code); +void mousekey_clear(void); +void mousekey_send(void); +report_mouse_t mousekey_get_report(void); #ifdef __cplusplus } diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index f38d7d47a..e8661839c 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -16,114 +16,449 @@ #include "print.h" #include "process_combo.h" +#include "action_tapping.h" -#ifndef COMBO_VARIABLE_LEN -__attribute__((weak)) combo_t key_combos[COMBO_COUNT] = {}; + +#ifdef COMBO_COUNT +__attribute__((weak)) combo_t key_combos[COMBO_COUNT]; +uint16_t COMBO_LEN = COMBO_COUNT; #else extern combo_t key_combos[]; -extern int COMBO_LEN; +extern uint16_t COMBO_LEN; #endif __attribute__((weak)) void process_combo_event(uint16_t combo_index, bool pressed) {} -static uint16_t timer = 0; -static uint16_t current_combo_index = 0; -static bool drop_buffer = false; -static bool is_active = false; -static bool b_combo_enable = true; // defaults to enabled - -static uint8_t buffer_size = 0; -#ifdef COMBO_ALLOW_ACTION_KEYS -static keyrecord_t key_buffer[MAX_COMBO_LENGTH]; -#else -static uint16_t key_buffer[MAX_COMBO_LENGTH]; +#ifdef COMBO_MUST_HOLD_PER_COMBO +__attribute__((weak)) bool get_combo_must_hold(uint16_t index, combo_t *combo) { return false; } #endif -static inline void send_combo(uint16_t action, bool pressed) { - if (action) { - if (pressed) { - register_code16(action); - } else { - unregister_code16(action); - } +#ifdef COMBO_MUST_TAP_PER_COMBO +__attribute__((weak)) bool get_combo_must_tap(uint16_t index, combo_t *combo) { return false; } +#endif + +#ifdef COMBO_TERM_PER_COMBO +__attribute__((weak)) uint16_t get_combo_term(uint16_t index, combo_t *combo) { return COMBO_TERM; } +#endif + +#ifdef COMBO_PROCESS_KEY_RELEASE +__attribute__((weak)) bool process_combo_key_release(uint16_t combo_index, combo_t *combo, uint8_t key_index, uint16_t keycode) { return false; } +#endif + +#ifndef COMBO_NO_TIMER +static uint16_t timer = 0; +#endif +static bool b_combo_enable = true; // defaults to enabled +static uint16_t longest_term = 0; + +typedef struct { + keyrecord_t record; + uint16_t combo_index; + uint16_t keycode; +} queued_record_t; +static uint8_t key_buffer_size = 0; +static queued_record_t key_buffer[COMBO_KEY_BUFFER_LENGTH]; + +typedef struct { + uint16_t combo_index; +} queued_combo_t; +static uint8_t combo_buffer_write= 0; +static uint8_t combo_buffer_read = 0; +static queued_combo_t combo_buffer[COMBO_BUFFER_LENGTH]; + +#define INCREMENT_MOD(i) i = (i + 1) % COMBO_BUFFER_LENGTH + +#define COMBO_KEY_POS ((keypos_t){.col=254, .row=254}) + + +#ifndef EXTRA_SHORT_COMBOS +/* flags are their own elements in combo_t struct. */ +# define COMBO_ACTIVE(combo) (combo->active) +# define COMBO_DISABLED(combo) (combo->disabled) +# define COMBO_STATE(combo) (combo->state) + +# define ACTIVATE_COMBO(combo) do {combo->active = true;}while(0) +# define DEACTIVATE_COMBO(combo) do {combo->active = false;}while(0) +# define DISABLE_COMBO(combo) do {combo->disabled = true;}while(0) +# define RESET_COMBO_STATE(combo) do { \ + combo->disabled = false; \ + combo->state = 0; \ +}while(0) +#else +/* flags are at the two high bits of state. */ +# define COMBO_ACTIVE(combo) (combo->state & 0x80) +# define COMBO_DISABLED(combo) (combo->state & 0x40) +# define COMBO_STATE(combo) (combo->state & 0x3F) + +# define ACTIVATE_COMBO(combo) do {combo->state |= 0x80;}while(0) +# define DEACTIVATE_COMBO(combo) do {combo->state &= ~0x80;}while(0) +# define DISABLE_COMBO(combo) do {combo->state |= 0x40;}while(0) +# define RESET_COMBO_STATE(combo) do {combo->state &= ~0x7F;}while(0) +#endif + +static inline void release_combo(uint16_t combo_index, combo_t *combo) { + if (combo->keycode) { + keyrecord_t record = { + .event = { + .key = COMBO_KEY_POS, + .time = timer_read()|1, + .pressed = false, + }, + .keycode = combo->keycode, + }; +#ifndef NO_ACTION_TAPPING + action_tapping_process(record); +#else + process_record(&record); +#endif } else { - process_combo_event(current_combo_index, pressed); + process_combo_event(combo_index, false); + } + DEACTIVATE_COMBO(combo); +} + +static inline bool _get_combo_must_hold(uint16_t combo_index, combo_t *combo) { +#ifdef COMBO_NO_TIMER + return false; +#elif defined(COMBO_MUST_HOLD_PER_COMBO) + return get_combo_must_hold(combo_index, combo); +#elif defined(COMBO_MUST_HOLD_MODS) + return (KEYCODE_IS_MOD(combo->keycode) || + (combo->keycode >= QK_MOMENTARY && combo->keycode <= QK_MOMENTARY_MAX)); +#endif + return false; +} + +static inline uint16_t _get_wait_time(uint16_t combo_index, combo_t *combo ) { + if (_get_combo_must_hold(combo_index, combo) +#ifdef COMBO_MUST_TAP_PER_COMBO + || get_combo_must_tap(combo_index, combo) +#endif + ) { + if (longest_term < COMBO_HOLD_TERM) { + return COMBO_HOLD_TERM; + } + } + + return longest_term; +} + +static inline uint16_t _get_combo_term(uint16_t combo_index, combo_t *combo) { + +#if defined(COMBO_TERM_PER_COMBO) + return get_combo_term(combo_index, combo); +#endif + + return COMBO_TERM; +} + +void clear_combos(void) { + uint16_t index = 0; + longest_term = 0; + for (index = 0; index < COMBO_LEN; ++index) { + combo_t *combo = &key_combos[index]; + if (!COMBO_ACTIVE(combo)) { + RESET_COMBO_STATE(combo); + } } } -static inline void dump_key_buffer(bool emit) { - if (buffer_size == 0) { +static inline void dump_key_buffer(void) { + /* First call start from 0 index; recursive calls need to start from i+1 index */ + static uint8_t key_buffer_next = 0; + + if (key_buffer_size == 0) { return; } - if (emit) { - for (uint8_t i = 0; i < buffer_size; i++) { -#ifdef COMBO_ALLOW_ACTION_KEYS - const action_t action = store_or_get_action(key_buffer[i].event.pressed, key_buffer[i].event.key); - process_action(&(key_buffer[i]), action); + for (uint8_t key_buffer_i = key_buffer_next; key_buffer_i < key_buffer_size; key_buffer_i++) { + key_buffer_next = key_buffer_i + 1; + + queued_record_t *qrecord = &key_buffer[key_buffer_i]; + keyrecord_t *record = &qrecord->record; + + if (IS_NOEVENT(record->event)) { + continue; + } + + if (!record->keycode && qrecord->combo_index != (uint16_t)-1) { + process_combo_event(qrecord->combo_index, true); + } else { +#ifndef NO_ACTION_TAPPING + action_tapping_process(*record); #else - register_code16(key_buffer[i]); - send_keyboard_report(); + process_record(record); #endif } + record->event.time = 0; } - buffer_size = 0; + key_buffer_next = key_buffer_size = 0; } -#define ALL_COMBO_KEYS_ARE_DOWN (((1 << count) - 1) == combo->state) -#define KEY_STATE_DOWN(key) \ - do { \ - combo->state |= (1 << key); \ +#define NO_COMBO_KEYS_ARE_DOWN (0 == COMBO_STATE(combo)) +#define ALL_COMBO_KEYS_ARE_DOWN(state, key_count) (((1 << key_count) - 1) == state) +#define ONLY_ONE_KEY_IS_DOWN(state) !(state & (state - 1)) +#define KEY_NOT_YET_RELEASED(state, key_index) ((1 << key_index) & state) +#define KEY_STATE_DOWN(state, key_index) \ + do { \ + state |= (1 << key_index); \ } while (0) -#define KEY_STATE_UP(key) \ - do { \ - combo->state &= ~(1 << key); \ +#define KEY_STATE_UP(state, key_index) \ + do { \ + state &= ~(1 << key_index); \ } while (0) -static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record) { - uint8_t count = 0; - uint16_t index = -1; - /* Find index of keycode and number of combo keys */ - for (const uint16_t *keys = combo->keys;; ++count) { - uint16_t key = pgm_read_word(&keys[count]); - if (keycode == key) index = count; +static inline void _find_key_index_and_count(const uint16_t *keys, uint16_t keycode, uint16_t *key_index, uint8_t *key_count) { + while (true) { + uint16_t key = pgm_read_word(&keys[*key_count]); + if (keycode == key) *key_index = *key_count; if (COMBO_END == key) break; + (*key_count)++; + } +} + +void drop_combo_from_buffer(uint16_t combo_index) { + /* Mark a combo as processed from the buffer. If the buffer is in the + * beginning of the buffer, drop it. */ + uint8_t i = combo_buffer_read; + while (i != combo_buffer_write) { + queued_combo_t *qcombo = &combo_buffer[i]; + + if (qcombo->combo_index == combo_index) { + combo_t *combo = &key_combos[combo_index]; + DISABLE_COMBO(combo); + + if (i == combo_buffer_read) { + INCREMENT_MOD(combo_buffer_read); + } + break; + } + INCREMENT_MOD(i); + } +} + +void apply_combo(uint16_t combo_index, combo_t *combo) { + /* Apply combo's result keycode to the last chord key of the combo and + * disable the other keys. */ + + if (COMBO_DISABLED(combo)) { return; } + + // state to check against so we find the last key of the combo from the buffer +#if defined(EXTRA_EXTRA_LONG_COMBOS) + uint32_t state = 0; +#elif defined(EXTRA_LONG_COMBOS) + uint16_t state = 0; +#else + uint8_t state = 0; +#endif + + for (uint8_t key_buffer_i = 0; key_buffer_i < key_buffer_size; key_buffer_i++) { + + queued_record_t *qrecord = &key_buffer[key_buffer_i]; + keyrecord_t *record = &qrecord->record; + uint16_t keycode = qrecord->keycode; + + uint8_t key_count = 0; + uint16_t key_index = -1; + _find_key_index_and_count(combo->keys, keycode, &key_index, &key_count); + + if (-1 == (int16_t)key_index) { + // key not part of this combo + continue; + } + + KEY_STATE_DOWN(state, key_index); + if (ALL_COMBO_KEYS_ARE_DOWN(state, key_count)) { + // this in the end executes the combo when the key_buffer is dumped. + record->keycode = combo->keycode; + record->event.key = COMBO_KEY_POS; + + qrecord->combo_index = combo_index; + ACTIVATE_COMBO(combo); + + break; + } else { + // key was part of the combo but not the last one, "disable" it + // by making it a TICK event. + record->event.time = 0; + } + + } + drop_combo_from_buffer(combo_index); +} + +static inline void apply_combos(void) { + // Apply all buffered normal combos. + for (uint8_t i = combo_buffer_read; + i != combo_buffer_write; + INCREMENT_MOD(i)) { + + queued_combo_t *buffered_combo = &combo_buffer[i]; + combo_t *combo = &key_combos[buffered_combo->combo_index]; + +#ifdef COMBO_MUST_TAP_PER_COMBO + if (get_combo_must_tap(buffered_combo->combo_index, combo)) { + // Tap-only combos are applied on key release only, so let's drop 'em here. + drop_combo_from_buffer(buffered_combo->combo_index); + continue; + } +#endif + apply_combo(buffered_combo->combo_index, combo); + } + dump_key_buffer(); + clear_combos(); +} + +combo_t* overlaps(combo_t *combo1, combo_t *combo2) { + /* Checks if the combos overlap and returns the combo that should be + * dropped from the combo buffer. + * The combo that has less keys will be dropped. If they have the same + * amount of keys, drop combo1. */ + + uint8_t idx1 = 0, idx2 = 0; + uint16_t key1, key2; + bool overlaps = false; + + while ((key1 = pgm_read_word(&combo1->keys[idx1])) != COMBO_END) { + idx2 = 0; + while ((key2 = pgm_read_word(&combo2->keys[idx2])) != COMBO_END) { + if (key1 == key2) overlaps = true; + idx2 += 1; + } + idx1 += 1; } - /* Continue processing if not a combo key */ - if (-1 == (int8_t)index) return false; + if (!overlaps) return NULL; + if (idx2 < idx1) return combo2; + return combo1; +} - bool is_combo_active = is_active; +static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t *record, uint16_t combo_index) { + uint8_t key_count = 0; + uint16_t key_index = -1; + _find_key_index_and_count(combo->keys, keycode, &key_index, &key_count); - if (record->event.pressed) { - KEY_STATE_DOWN(index); + /* Continue processing if key isn't part of current combo. */ + if (-1 == (int16_t)key_index) { + return false; + } - if (is_combo_active) { - if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was pressed */ - send_combo(combo->keycode, true); - drop_buffer = true; + bool key_is_part_of_combo = !COMBO_DISABLED(combo) && is_combo_enabled(); + + if (record->event.pressed && key_is_part_of_combo) { + uint16_t time = _get_combo_term(combo_index, combo); + if (!COMBO_ACTIVE(combo)) { + KEY_STATE_DOWN(combo->state, key_index); + if (longest_term < time) { + longest_term = time; } } + if (ALL_COMBO_KEYS_ARE_DOWN(COMBO_STATE(combo), key_count)) { + /* Combo was fully pressed */ + /* Buffer the combo so we can fire it after COMBO_TERM */ + +#ifndef COMBO_NO_TIMER + /* Don't buffer this combo if its combo term has passed. */ + if (timer && timer_elapsed(timer) > time) { + DISABLE_COMBO(combo); + return true; + } else +#endif + { + + // disable readied combos that overlap with this combo + combo_t *drop = NULL; + for (uint8_t combo_buffer_i = combo_buffer_read; + combo_buffer_i != combo_buffer_write; + INCREMENT_MOD(combo_buffer_i)) { + + queued_combo_t *qcombo = &combo_buffer[combo_buffer_i]; + combo_t *buffered_combo = &key_combos[qcombo->combo_index]; + + if ((drop = overlaps(buffered_combo, combo))) { + DISABLE_COMBO(drop); + if (drop == combo) { + // stop checking for overlaps if dropped combo was current combo. + break; + } else if (combo_buffer_i == combo_buffer_read && drop == buffered_combo) { + /* Drop the disabled buffered combo from the buffer if + * it is in the beginning of the buffer. */ + INCREMENT_MOD(combo_buffer_read); + } + } + + } + + if (drop != combo) { + // save this combo to buffer + combo_buffer[combo_buffer_write] = (queued_combo_t){ + .combo_index=combo_index, + }; + INCREMENT_MOD(combo_buffer_write); + + // get possible longer waiting time for tap-/hold-only combos. + longest_term = _get_wait_time(combo_index, combo); + } + } // if timer elapsed end + + } } else { - if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was released */ - send_combo(combo->keycode, false); + // chord releases + if (!COMBO_ACTIVE(combo) && ALL_COMBO_KEYS_ARE_DOWN(COMBO_STATE(combo), key_count)) { + /* First key quickly released */ + if (COMBO_DISABLED(combo) || _get_combo_must_hold(combo_index, combo)) { + // combo wasn't tappable, disable it and drop it from buffer. + drop_combo_from_buffer(combo_index); + key_is_part_of_combo = false; + } +#ifdef COMBO_MUST_TAP_PER_COMBO + else if (get_combo_must_tap(combo_index, combo)) { + // immediately apply tap-only combo + apply_combo(combo_index, combo); + apply_combos(); // also apply other prepared combos and dump key buffer +# ifdef COMBO_PROCESS_KEY_RELEASE + if (process_combo_key_release(combo_index, combo, key_index, keycode)) { + release_combo(combo_index, combo); + } +# endif + } +#endif + } else if (COMBO_ACTIVE(combo) + && ONLY_ONE_KEY_IS_DOWN(COMBO_STATE(combo)) + && KEY_NOT_YET_RELEASED(COMBO_STATE(combo), key_index) + ) { + /* last key released */ + release_combo(combo_index, combo); + key_is_part_of_combo = true; + +#ifdef COMBO_PROCESS_KEY_RELEASE + process_combo_key_release(combo_index, combo, key_index, keycode); +#endif + } else if (COMBO_ACTIVE(combo) + && KEY_NOT_YET_RELEASED(COMBO_STATE(combo), key_index) + ) { + /* first or middle key released */ + key_is_part_of_combo = true; + +#ifdef COMBO_PROCESS_KEY_RELEASE + if (process_combo_key_release(combo_index, combo, key_index, keycode)) { + release_combo(combo_index, combo); + } +#endif } else { - /* continue processing without immediately returning */ - is_combo_active = false; + /* The released key was part of an incomplete combo */ + key_is_part_of_combo = false; } - KEY_STATE_UP(index); + KEY_STATE_UP(combo->state, key_index); } - return is_combo_active; + return key_is_part_of_combo; } -#define NO_COMBO_KEYS_ARE_DOWN (0 == combo->state) - bool process_combo(uint16_t keycode, keyrecord_t *record) { bool is_combo_key = false; - drop_buffer = false; bool no_combo_keys_pressed = true; if (keycode == CMB_ON && record->event.pressed) { @@ -141,65 +476,82 @@ bool process_combo(uint16_t keycode, keyrecord_t *record) { return true; } - if (!is_combo_enabled()) { - return true; - } -#ifndef COMBO_VARIABLE_LEN - for (current_combo_index = 0; current_combo_index < COMBO_COUNT; ++current_combo_index) { -#else - for (current_combo_index = 0; current_combo_index < COMBO_LEN; ++current_combo_index) { +#ifdef COMBO_ONLY_FROM_LAYER + /* Only check keycodes from one layer. */ + keycode = keymap_key_to_keycode(COMBO_ONLY_FROM_LAYER, record->event.key); #endif - combo_t *combo = &key_combos[current_combo_index]; - is_combo_key |= process_single_combo(combo, keycode, record); - no_combo_keys_pressed = no_combo_keys_pressed && NO_COMBO_KEYS_ARE_DOWN; + + for (uint16_t idx = 0; idx < COMBO_LEN; ++idx) { + combo_t *combo = &key_combos[idx]; + is_combo_key |= process_single_combo(combo, keycode, record, idx); + no_combo_keys_pressed = no_combo_keys_pressed && (NO_COMBO_KEYS_ARE_DOWN || COMBO_ACTIVE(combo) || COMBO_DISABLED(combo)); } - if (drop_buffer) { - /* buffer is only dropped when we complete a combo, so we refresh the timer - * here */ - timer = timer_read(); - dump_key_buffer(false); - } else if (!is_combo_key) { - /* if no combos claim the key we need to emit the keybuffer */ - dump_key_buffer(true); - - // reset state if there are no combo keys pressed at all - if (no_combo_keys_pressed) { - timer = 0; - is_active = true; + if (record->event.pressed && is_combo_key) { +#ifndef COMBO_NO_TIMER +# ifdef COMBO_STRICT_TIMER + if (!timer) { + // timer is set only on the first key + timer = timer_read(); } - } else if (record->event.pressed && is_active) { - /* otherwise the key is consumed and placed in the buffer */ +# else timer = timer_read(); - - if (buffer_size < MAX_COMBO_LENGTH) { -#ifdef COMBO_ALLOW_ACTION_KEYS - key_buffer[buffer_size++] = *record; -#else - key_buffer[buffer_size++] = keycode; +# endif #endif + + if (key_buffer_size < COMBO_KEY_BUFFER_LENGTH) { + key_buffer[key_buffer_size++] = (queued_record_t){ + .record = *record, + .keycode = keycode, + .combo_index = -1, // this will be set when applying combos + }; + } + } else { + if (combo_buffer_read != combo_buffer_write) { + // some combo is prepared + apply_combos(); + } else { + // reset state if there are no combo keys pressed at all + dump_key_buffer(); +#ifndef COMBO_NO_TIMER + timer = 0; +#endif + clear_combos(); } } - return !is_combo_key; } -void matrix_scan_combo(void) { - if (b_combo_enable && is_active && timer && timer_elapsed(timer) > COMBO_TERM) { - /* This disables the combo, meaning key events for this - * combo will be handled by the next processors in the chain - */ - is_active = false; - dump_key_buffer(true); +void combo_task(void) { + if (!b_combo_enable) { + return; } + +#ifndef COMBO_NO_TIMER + if (timer && timer_elapsed(timer) > longest_term) { + if (combo_buffer_read != combo_buffer_write) { + apply_combos(); + longest_term = 0; + timer = 0; + } else { + dump_key_buffer(); + timer = 0; + clear_combos(); + } + } +#endif } void combo_enable(void) { b_combo_enable = true; } void combo_disable(void) { - b_combo_enable = is_active = false; +#ifndef COMBO_NO_TIMER timer = 0; - dump_key_buffer(true); +#endif + b_combo_enable = false; + combo_buffer_read = combo_buffer_write; + clear_combos(); + dump_key_buffer(); } void combo_toggle(void) { diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index e51a2f1f4..43c36d79e 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -20,23 +20,38 @@ #include "quantum.h" #include -#ifdef EXTRA_EXTRA_LONG_COMBOS +#ifdef EXTRA_SHORT_COMBOS +# define MAX_COMBO_LENGTH 6 +#elif defined(EXTRA_EXTRA_LONG_COMBOS) # define MAX_COMBO_LENGTH 32 -#elif EXTRA_LONG_COMBOS +#elif defined(EXTRA_LONG_COMBOS) # define MAX_COMBO_LENGTH 16 #else # define MAX_COMBO_LENGTH 8 #endif +#ifndef COMBO_KEY_BUFFER_LENGTH +# define COMBO_KEY_BUFFER_LENGTH MAX_COMBO_LENGTH +#endif +#ifndef COMBO_BUFFER_LENGTH +# define COMBO_BUFFER_LENGTH 4 +#endif + typedef struct { const uint16_t *keys; uint16_t keycode; -#ifdef EXTRA_EXTRA_LONG_COMBOS - uint32_t state; -#elif EXTRA_LONG_COMBOS - uint16_t state; -#else +#ifdef EXTRA_SHORT_COMBOS uint8_t state; +#else + bool disabled; + bool active; +# if defined(EXTRA_EXTRA_LONG_COMBOS) + uint32_t state; +# elif defined(EXTRA_LONG_COMBOS) + uint16_t state; +# else + uint8_t state; +# endif #endif } combo_t; @@ -46,15 +61,18 @@ typedef struct { { .keys = &(ck)[0] } #define COMBO_END 0 -#ifndef COMBO_COUNT -# define COMBO_COUNT 0 -#endif #ifndef COMBO_TERM -# define COMBO_TERM TAPPING_TERM +# define COMBO_TERM 50 +#endif +#ifndef COMBO_HOLD_TERM +# define COMBO_HOLD_TERM TAPPING_TERM #endif +/* check if keycode is only modifiers */ +#define KEYCODE_IS_MOD(code) (IS_MOD(code) || (code >= QK_MODS && code <= QK_MODS_MAX && !(code & QK_BASIC_MAX))) + bool process_combo(uint16_t keycode, keyrecord_t *record); -void matrix_scan_combo(void); +void combo_task(void); void process_combo_event(uint16_t combo_index, bool pressed); void combo_enable(void); diff --git a/quantum/process_keycode/process_haptic.c b/quantum/process_keycode/process_haptic.c new file mode 100644 index 000000000..29a4ffd10 --- /dev/null +++ b/quantum/process_keycode/process_haptic.c @@ -0,0 +1,147 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "haptic.h" +#include "process_haptic.h" +#include "quantum_keycodes.h" + +__attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { +#ifdef NO_HAPTIC_MOD + case QK_MOD_TAP ... QK_MOD_TAP_MAX: + if (record->tap.count == 0) return false; + break; + case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: + if (record->tap.count != TAPPING_TOGGLE) return false; + break; + case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: + if (record->tap.count == 0) return false; + break; + case KC_LCTRL ... KC_RGUI: + case QK_MOMENTARY ... QK_MOMENTARY_MAX: +#endif +#ifdef NO_HAPTIC_FN + case KC_FN0 ... KC_FN31: +#endif +#ifdef NO_HAPTIC_ALPHA + case KC_A ... KC_Z: +#endif +#ifdef NO_HAPTIC_PUNCTUATION + case KC_ENTER: + case KC_ESCAPE: + case KC_BSPACE: + case KC_SPACE: + case KC_MINUS: + case KC_EQUAL: + case KC_LBRACKET: + case KC_RBRACKET: + case KC_BSLASH: + case KC_NONUS_HASH: + case KC_SCOLON: + case KC_QUOTE: + case KC_GRAVE: + case KC_COMMA: + case KC_SLASH: + case KC_DOT: + case KC_NONUS_BSLASH: +#endif +#ifdef NO_HAPTIC_LOCKKEYS + case KC_CAPSLOCK: + case KC_SCROLLLOCK: + case KC_NUMLOCK: +#endif +#ifdef NO_HAPTIC_NAV + case KC_PSCREEN: + case KC_PAUSE: + case KC_INSERT: + case KC_DELETE: + case KC_PGDOWN: + case KC_PGUP: + case KC_LEFT: + case KC_UP: + case KC_RIGHT: + case KC_DOWN: + case KC_END: + case KC_HOME: +#endif +#ifdef NO_HAPTIC_NUMERIC + case KC_1 ... KC_0: +#endif + return false; + } + return true; +} + +bool process_haptic(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case HPT_ON: + haptic_enable(); + break; + case HPT_OFF: + haptic_disable(); + break; + case HPT_TOG: + haptic_toggle(); + break; + case HPT_RST: + haptic_reset(); + break; + case HPT_FBK: + haptic_feedback_toggle(); + break; + case HPT_BUZ: + haptic_buzz_toggle(); + break; + case HPT_MODI: + haptic_mode_increase(); + break; + case HPT_MODD: + haptic_mode_decrease(); + break; + case HPT_DWLI: + haptic_dwell_increase(); + break; + case HPT_DWLD: + haptic_dwell_decrease(); + break; + case HPT_CONT: + haptic_toggle_continuous(); + break; + case HPT_CONI: + haptic_cont_increase(); + break; + case HPT_COND: + haptic_cont_decrease(); + break; + } + } + + if (haptic_get_enable()) { + if (record->event.pressed) { + // keypress + if (haptic_get_feedback() < 2 && get_haptic_enabled_key(keycode, record)) { + haptic_play(); + } + } else { + // keyrelease + if (haptic_get_feedback() > 0 && get_haptic_enabled_key(keycode, record)) { + haptic_play(); + } + } + } + + return true; +} diff --git a/quantum/process_keycode/process_haptic.h b/quantum/process_keycode/process_haptic.h new file mode 100644 index 000000000..6dbb0f014 --- /dev/null +++ b/quantum/process_keycode/process_haptic.h @@ -0,0 +1,21 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +#include "action.h" + +bool process_haptic(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/process_keycode/process_key_override.c b/quantum/process_keycode/process_key_override.c new file mode 100644 index 000000000..09b272507 --- /dev/null +++ b/quantum/process_keycode/process_key_override.c @@ -0,0 +1,518 @@ +/* + * Copyright 2021 Jonas Gessner + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "quantum.h" +#include "report.h" +#include "timer.h" +#include "process_key_override.h" + +#include + +#ifndef KEY_OVERRIDE_REPEAT_DELAY +# define KEY_OVERRIDE_REPEAT_DELAY 500 +#endif + +// For benchmarking the time it takes to call process_key_override on every key press (needs keyboard debugging enabled as well) +// #define BENCH_KEY_OVERRIDE + +// For debug output (needs keyboard debugging enabled as well) +// #define DEBUG_KEY_OVERRIDE + +#ifdef DEBUG_KEY_OVERRIDE +# define key_override_printf dprintf +#else +# define key_override_printf(str, ...) \ + {} +#endif + +// Helpers + +// Private functions implemented elsewhere in qmk/tmk +extern uint8_t extract_mod_bits(uint16_t code); +extern void set_weak_override_mods(uint8_t mods); +extern void clear_weak_override_mods(void); +extern void set_suppressed_override_mods(uint8_t mods); +extern void clear_suppressed_override_mods(void); + +static uint16_t clear_mods_from(uint16_t keycode) { + switch (keycode) { + case QK_MODS ... QK_MODS_MAX: + break; + default: + return keycode; + } + + static const uint16_t all_mods = QK_LCTL | QK_LSFT | QK_LALT | QK_LGUI | QK_RCTL | QK_RSFT | QK_RALT | QK_RGUI; + + return (keycode & ~(all_mods)); +} + +// Internal variables +static const key_override_t *active_override = NULL; +static bool active_override_trigger_is_down = false; + +// Used to keep track of what non-modifier key was last pressed down. We never want to activate an override for a trigger key that is not the last non-mod key that was pressed down. OSes internally completely unregister a key that is held when a different key is held down after. We want to respect this here. +static uint16_t last_key_down = 0; +// When was the last key pressed down? +static uint32_t last_key_down_time = 0; + +// What timestamp are we comparing to when waiting to register a deferred key? +static uint32_t defer_reference_time = 0; +// What delay should pass until deferred key is registered? +static uint32_t defer_delay = 0; + +// Holds the keycode that should be registered at a later time, in order to not get false key presses +static uint16_t deferred_register = 0; + +// TODO: in future maybe save in EEPROM? +static bool enabled = true; + +// Public variables +__attribute__((weak)) const key_override_t **key_overrides = NULL; + +// Forward decls +static const key_override_t *clear_active_override(const bool allow_reregister); + +void key_override_on(void) { + enabled = true; + key_override_printf("Key override ON\n"); +} + +void key_override_off(void) { + enabled = false; + clear_active_override(false); + key_override_printf("Key override OFF\n"); +} + +void key_override_toggle(void) { + if (key_override_is_enabled()) { + key_override_off(); + } else { + key_override_on(); + } +} + +bool key_override_is_enabled(void) { return enabled; } + +// Returns whether the modifiers that are pressed are such that the override should activate +static bool key_override_matches_active_modifiers(const key_override_t *override, const uint8_t mods) { + // Check that negative keys pass + if ((override->negative_mod_mask & mods) != 0) { + return false; + } + + // Immediately return true if the override requires no mods down + if (override->trigger_mods == 0) { + return true; + } + + if ((override->options & ko_option_one_mod) != 0) { + // At least one of the trigger modifiers must be down + return (override->trigger_mods & mods) != 0; + } else { + // All trigger modifiers must be down, but each mod can be active on either side (if both sides are specified). + + // Which mods, regardless of side, are required? + uint8_t one_sided_required_mods = (override->trigger_mods & 0b1111) | (override->trigger_mods >> 4); + + // Which of the required modifiers are active? + uint8_t active_required_mods = override->trigger_mods & mods; + + // Move the active requird mods to one side + uint8_t one_sided_active_required_mods = (active_required_mods & 0b1111) | (active_required_mods >> 4); + + // Check that there is a full match between the required one-sided mods and active required one sided mods + return one_sided_active_required_mods == one_sided_required_mods; + } + + return false; +} + +static void schedule_deferred_register(const uint16_t keycode) { + if (timer_elapsed32(last_key_down_time) < KEY_OVERRIDE_REPEAT_DELAY) { + // Defer until KEY_OVERRIDE_REPEAT_DELAY has passed since the trigger key was pressed down. This emulates the behavior as holding down a key x, then holding down shift shortly after. Usually the shifted key X is not immediately produced, but rather a 'key repeat delay' passes before any repeated character is output. + defer_reference_time = last_key_down_time; + defer_delay = KEY_OVERRIDE_REPEAT_DELAY; + } else { + // Wait a very short time when a modifier event triggers the override to avoid false activations when e.g. a modifier is pressed just before a key is released (with the intention of pairing the modifier with a different key), or a modifier is lifted shortly before the trigger key is lifted. Operating systems by default reject modifier-events that happen very close to a non-modifier event. + defer_reference_time = timer_read32(); + defer_delay = 50; // 50ms + } + deferred_register = keycode; +} + +const key_override_t *clear_active_override(const bool allow_reregister) { + if (active_override == NULL) { + return NULL; + } + + key_override_printf("Deactivating override\n"); + + deferred_register = 0; + + // Clear the suppressed mods + clear_suppressed_override_mods(); + + // Unregister the replacement. First remove the weak override mods + clear_weak_override_mods(); + + const key_override_t *const old = active_override; + + const uint8_t mod_free_replacement = clear_mods_from(active_override->replacement); + + bool unregister_replacement = mod_free_replacement != KC_NO && // KC_NO is never registered + mod_free_replacement < SAFE_RANGE; // Custom keycodes are never registered + + // Try firing the custom handler + if (active_override->custom_action != NULL) { + unregister_replacement &= active_override->custom_action(false, active_override->context); + } + + // Then unregister the mod-free replacement key if desired + if (unregister_replacement) { + if (IS_KEY(mod_free_replacement)) { + del_key(mod_free_replacement); + } else { + key_override_printf("NOT KEY 1\n"); + send_keyboard_report(); + unregister_code(mod_free_replacement); + } + } + + const uint16_t trigger = active_override->trigger; + + const bool reregister_trigger = allow_reregister && // Check if allowed from caller + (active_override->options & ko_option_no_reregister_trigger) == 0 && // Check if override allows + active_override_trigger_is_down && // Check if trigger is even down + trigger != KC_NO && // KC_NO is never registered + trigger < SAFE_RANGE; // A custom keycode should not be registered + + // Optionally re-register the trigger if it is still down + if (reregister_trigger) { + key_override_printf("Re-registering trigger deferred: %u\n", trigger); + + // This will always be a modifier event, so defer always + schedule_deferred_register(trigger); + } + + send_keyboard_report(); + + active_override = NULL; + active_override_trigger_is_down = false; + + return old; +} + +/** Checks if the key event is an allowed activation event for the provided override. Does not check things like whether the correct mods or correct trigger key is down. */ +static bool check_activation_event(const key_override_t *override, const bool key_down, const bool is_mod) { + ko_option_t options = override->options; + + if ((options & ko_options_all_activations) == 0) { + // No activation option provided at all. This is wrong, but let's assume the default activations (ko_options_all_activations) were meant... + options = ko_options_all_activations; + } + + if (is_mod) { + if (key_down) { + return (options & ko_option_activation_required_mod_down) != 0; + } else { + return (options & ko_option_activation_negative_mod_up) != 0; + } + } else { + if (key_down) { + return (options & ko_option_activation_trigger_down) != 0; + } else { + return false; + } + } +} + +/** Iterates through the list of key overrides and tries activating each, until it finds one that activates or reaches the end of overrides. Returns true if the key action for `keycode` should be sent */ +static bool try_activating_override(const uint16_t keycode, const uint8_t layer, const bool key_down, const bool is_mod, const uint8_t active_mods, bool *activated) { + if (key_overrides == NULL) { + return true; + } + + for (uint8_t i = 0;; i++) { + const key_override_t *const override = key_overrides[i]; + + // End of array + if (override == NULL) { + break; + } + + // Fast, but not full mods check. Most key presses will not have any mods down, and most overrides will require mods. Hence here we filter overrides that require mods to be down while no mods are down + if (active_mods == 0 && override->trigger_mods != 0) { + key_override_printf("Not activating override: Modifiers don't match\n"); + continue; + } + + // Check layer + if ((override->layers & (1 << layer)) == 0) { + key_override_printf("Not activating override: Not set to activate on pressed layer\n"); + continue; + } + + // Check allowed activation events + if (!check_activation_event(override, key_down, is_mod)) { + key_override_printf("Not activating override: Activation event not allowed\n"); + continue; + } + + const bool is_trigger = override->trigger == keycode; + + // Check if trigger lifted. This is a small optimization in order to skip the remaining checks + if (is_trigger && !key_down) { + key_override_printf("Not activating override: Trigger lifted\n"); + continue; + } + + // If the trigger is KC_NO it means 'no key', so only the required modifiers need to be down. + const bool no_trigger = override->trigger == KC_NO; + + // Check if aleady active + if (override == active_override) { + key_override_printf("Not activating override: Alerady actived\n"); + continue; + } + + // Check if enabled + if (override->enabled != NULL && !((*(override->enabled) & 1))) { + key_override_printf("Not activating override: Not enabled\n"); + continue; + } + + // Check mods precisely + if (!key_override_matches_active_modifiers(override, active_mods)) { + key_override_printf("Not activating override: Modifiers don't match\n"); + continue; + } + + // Check if trigger key is down. + const bool trigger_down = is_trigger && key_down; + + // At this point, all requirements for activation are checked, except whether the trigger key is pressed. Now we check if the required trigger is down + // If no trigger key is required, yes. + // If the trigger was just pressed, yes. + // If the last non-mod key that was pressed down is the trigger key, yes. + bool should_activate = no_trigger || trigger_down || last_key_down == override->trigger; + + if (!should_activate) { + key_override_printf("Not activating override. Trigger not down\n"); + continue; + } + + key_override_printf("Activating override\n"); + + clear_active_override(false); + + active_override = override; + active_override_trigger_is_down = true; + + set_suppressed_override_mods(override->suppressed_mods); + + if (!trigger_down && !no_trigger) { + // When activating a key override the trigger is is always unregistered. In the case where the key that newly pressed is not the trigger key, we have to explicitly remove the trigger key from the keyboard report. If the trigger was just pressed down we simply suppress the event which also has the effect of the trigger key not being registered in the keyboard report. + if (IS_KEY(override->trigger)) { + del_key(override->trigger); + } else { + unregister_code(override->trigger); + } + } + + const uint16_t mod_free_replacement = clear_mods_from(override->replacement); + + bool register_replacement = mod_free_replacement != KC_NO && // KC_NO is never registered + mod_free_replacement < SAFE_RANGE; // Custom keycodes are never registered + + // Try firing the custom handler + if (override->custom_action != NULL) { + register_replacement &= override->custom_action(true, override->context); + } + + if (register_replacement) { + const uint8_t override_mods = extract_mod_bits(override->replacement); + set_weak_override_mods(override_mods); + + // If this is a modifier event that activates the key override we _always_ defer the actual full activation of the override + if (is_mod) { + key_override_printf("Deferring register replacement key\n"); + schedule_deferred_register(mod_free_replacement); + send_keyboard_report(); + } else { + if (IS_KEY(mod_free_replacement)) { + add_key(mod_free_replacement); + } else { + key_override_printf("NOT KEY 2\n"); + send_keyboard_report(); + // On macOS there seems to be a race condition when it comes to the keyboard report and consumer keycodes. It seems the OS may recognize a consumer keycode before an updated keyboard report, even if the keyboard report is actually sent before the consumer key. I assume it is some sort of race condition because it happens infrequently and very irregularly. Waiting for about at least 10ms between sending the keyboard report and sending the consumer code has shown to fix this. + wait_ms(10); + register_code(mod_free_replacement); + } + } + } else { + // If not registering the replacement key send keyboard report to update the unregistered keys. + send_keyboard_report(); + } + + *activated = true; + + // If the trigger is down, suppress the event so that it does not get added to the keyboard report. + return !trigger_down; + } + + *activated = false; + + return true; +} + +void key_override_task(void) { + if (deferred_register == 0) { + return; + } + + if (timer_elapsed32(defer_reference_time) >= defer_delay) { + key_override_printf("Registering deferred key\n"); + register_code16(deferred_register); + deferred_register = 0; + defer_reference_time = 0; + defer_delay = 0; + } +} + +bool process_key_override(const uint16_t keycode, const keyrecord_t *const record) { +#ifdef BENCH_KEY_OVERRIDE + uint16_t start = timer_read(); +#endif + + const bool key_down = record->event.pressed; + const bool is_mod = IS_MOD(keycode); + + if (key_down) { + switch (keycode) { + case KEY_OVERRIDE_TOGGLE: + key_override_toggle(); + return false; + + case KEY_OVERRIDE_ON: + key_override_on(); + return false; + + case KEY_OVERRIDE_OFF: + key_override_off(); + return false; + + default: + break; + } + } + + if (!enabled) { + return true; + } + + uint8_t effective_mods = get_mods(); + +#ifdef KEY_OVERRIDE_INCLUDE_WEAK_MODS + effective_mods |= get_weak_mods(); +#endif + +#ifndef NO_ACTION_ONESHOT + // Locked one shot mods are added to get_mods(), I think (why??) while oneshot mods are in get_oneshot_mods(). Still OR with get_locked_oneshot_mods because that's where those mods _should_ be saved. + effective_mods |= get_oneshot_locked_mods() | get_oneshot_mods(); +#endif + + if (is_mod) { + // The mods returned from get_mods() will be updated with this new event _after_ this code runs. Hence we manually update the effective mods here to really know the effective mods. + if (key_down) { + effective_mods |= MOD_BIT(keycode); + } else { + effective_mods &= ~MOD_BIT(keycode); + } + } else { + if (key_down) { + last_key_down = keycode; + last_key_down_time = timer_read32(); + deferred_register = 0; + } + + // The last key that was pressed was just released. No more keys are therefore sending input + if (!key_down && keycode == last_key_down) { + last_key_down = 0; + last_key_down_time = 0; + // We also cancel any deferred registers because, again, no keys are sending any input. Only the last key that is pressed creates an input – this key was just lifted. + deferred_register = 0; + } + } + + key_override_printf("key down: %u keycode: %u is mod: %u effective mods: %u\n", key_down, keycode, is_mod, effective_mods); + + bool send_key_action = true; + bool activated = false; + + // Non-mod key up events never activate a key override + if (is_mod || key_down) { + // Get the exact layer that was hit. It will be cached at this point + const uint8_t layer = read_source_layers_cache(record->event.key); + + // Use blocked to ensure the same override is not activated again immediately after it is deactivated + send_key_action = try_activating_override(keycode, layer, key_down, is_mod, effective_mods, &activated); + + if (!send_key_action) { + send_keyboard_report(); + } + } + + if (!activated && active_override != NULL) { + if (is_mod) { + // Check if necessary modifier of current override goes up or a negative mod goes down + if (!key_override_matches_active_modifiers(active_override, effective_mods)) { + key_override_printf("Deactivating override because necessary modifier lifted or negative mod pressed\n"); + clear_active_override(true); + } + } else { + // Check if trigger of current override goes up or if override does not allow additional keys to be down and another key goes down + const bool is_trigger = keycode == active_override->trigger; + bool should_deactivate = false; + + // Check if trigger key lifted + if (is_trigger && !key_down) { + should_deactivate = true; + active_override_trigger_is_down = false; + key_override_printf("Deactivating override because trigger key up\n"); + } + + // Check if another key was pressed + if (key_down && (active_override->options & ko_option_no_unregister_on_other_key_down) == 0) { + should_deactivate = true; + key_override_printf("Deactivating override because another key was pressed\n"); + } + + if (should_deactivate) { + clear_active_override(false); + } + } + } + +#ifdef BENCH_KEY_OVERRIDE + uint16_t elapsed = timer_elapsed(start); + + dprintf("Processing key overrides took: %u ms\n", elapsed); +#endif + + return send_key_action; +} diff --git a/quantum/process_keycode/process_key_override.h b/quantum/process_keycode/process_key_override.h new file mode 100644 index 000000000..fd76f297a --- /dev/null +++ b/quantum/process_keycode/process_key_override.h @@ -0,0 +1,153 @@ +/* + * Copyright 2021 Jonas Gessner + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 +#include +#include + +#include "action_layer.h" + +/** + * Key overrides allow you to send a different key-modifier combination or perform a custom action when a certain modifier-key combination is pressed. + * + * For example, you may configure a key override to send the delete key when shift + backspace are pressed together, or that your volume keys become screen brightness keys when holding ctrl. The possibilities are quite vast and the documentation contains a few examples for inspiration. + * + * See the documentation and examples here: https://docs.qmk.fm/#/feature_key_overrides + */ + +/** Bitfield with various options controlling the behavior of a key override. */ +typedef enum { + /** Allow activating when the trigger key is pressed down. */ + ko_option_activation_trigger_down = (1 << 0), + /** Allow activating when a necessary modifier is pressed down. */ + ko_option_activation_required_mod_down = (1 << 1), + /** Allow activating when a negative modifier is released. */ + ko_option_activation_negative_mod_up = (1 << 2), + + ko_options_all_activations = ko_option_activation_negative_mod_up | ko_option_activation_required_mod_down | ko_option_activation_trigger_down, + + /** If set, any of the modifiers in trigger_mods will be enough to activate the override (logical OR of modifiers). If not set, all the modifiers in trigger_mods have to be pressed (logical AND of modifiers). */ + ko_option_one_mod = (1 << 3), + + /** If set, the trigger key will never be registered again after the override is deactivated. */ + ko_option_no_reregister_trigger = (1 << 4), + + /** If set, the override will not deactivate when another key is pressed down. Use only if you really know you need this. */ + ko_option_no_unregister_on_other_key_down = (1 << 5), + + /** The default options used by the ko_make_xxx functions. */ + ko_options_default = ko_options_all_activations, +} ko_option_t; + +/** Defines a single key override */ +typedef struct { + // The non-modifier keycode that triggers the override. This keycode, and the necessary modifiers (trigger_mods) must be pressed to activate this override. Set this to the keycode of the key that should activate the override. Set to KC_NO to require only the necessary modifiers to be pressed and no non-modifier. + uint16_t trigger; + + // Which mods need to be down for activation. If both sides of a modifier are set (e.g. left ctrl and right ctrl) then only one is required to be pressed (e.g. left ctrl suffices). Use the MOD_MASK_XXX and MOD_BIT() macros for this. + uint8_t trigger_mods; + + // This is a BITMASK (!), defining which layers this override applies to. To use this override on layer i set the ith bit (1 << i). + layer_state_t layers; + + // Which modifiers cannot be down. It must hold that (active_mods & negative_mod_mask) == 0, otherwise the key override will not be activated. An active override will be deactivated once this is no longer true. + uint8_t negative_mod_mask; + + // Modifiers to 'suppress' while the override is active. To suppress a modifier means that even though the modifier key is held down, the host OS sees the modifier as not pressed. Can be used to suppress the trigger modifiers, as a trivial example. + uint8_t suppressed_mods; + + // The complex keycode to send as replacement when this override is triggered. This can be a simple keycode, a key-modifier combination (e.g. C(KC_A)), or KC_NO (to register no replacement keycode). Use in combination with suppressed_mods to get the correct modifiers to be sent. + uint16_t replacement; + + // Options controlling the behavior of the override, such as what actions are allowed to activate the override. + ko_option_t options; + + // If not NULL, this function will be called right before the replacement key is registered, along with the provided context and a flag indicating whether the override was activated or deactivated. This function allows you to run some custom actions for specific key overrides. If you return `false`, the replacement key is not registered/unregistered as it would normally. Return `true` to register and unregister the override normally. + bool (*custom_action)(bool activated, void *context); + + // A context that will be passed to the custom action function. + void *context; + + // If this points to false this override will not be used. Set to NULL to always have this override enabled. + bool *enabled; +} key_override_t; + +/** Define this as a null-terminated array of pointers to key overrides. These key overrides will be used by qmk. */ +extern const key_override_t **key_overrides; + +/** Turns key overrides on */ +void key_override_on(void); + +/** Turns key overrides off */ +void key_override_off(void); + +/** Toggles key overrides on */ +void key_override_toggle(void); + +/** Returns whether key overrides are enabled */ +bool key_override_is_enabled(void); + +/** Handling of key overrides and its implemented keycodes */ +bool process_key_override(const uint16_t keycode, const keyrecord_t *const record); + +/** Perform any deferred keys */ +void key_override_task(void); + +/** + * Preferrably use these macros to create key overrides. They fix many of the options to a standard setting that should satisfy most basic use-cases. Only directly create a key_override_t struct when you really need to. + */ + +// clang-format off + +/** + * Convenience initializer to create a basic key override. Activates the override on all layers. + */ +#define ko_make_basic(trigger_mods, trigger_key, replacement_key) \ + ko_make_with_layers(trigger_mods, trigger_key, replacement_key, ~0) + +/** + * Convenience initializer to create a basic key override. Provide a bitmap (of type layer_state_t) with the bits set for each layer on which the override should activate. + */ +#define ko_make_with_layers(trigger_mods, trigger_key, replacement_key, layers) \ + ko_make_with_layers_and_negmods(trigger_mods, trigger_key, replacement_key, layers, 0) + +/** + * Convenience initializer to create a basic key override. Provide a bitmap with the bits set for each layer on which the override should activate. Also provide a negative modifier mask, that is used to define which modifiers may not be pressed. + */ +#define ko_make_with_layers_and_negmods(trigger_mods, trigger_key, replacement_key, layers, negative_mask) \ + ko_make_with_layers_negmods_and_options(trigger_mods, trigger_key, replacement_key, layers, negative_mask, ko_options_default) + + /** + * Convenience initializer to create a basic key override. Provide a bitmap with the bits set for each layer on which the override should activate. Also provide a negative modifier mask, that is used to define which modifiers may not be pressed. Provide options for additional control of the behavior of the override. + */ +#define ko_make_with_layers_negmods_and_options(trigger_mods_, trigger_key, replacement_key, layer_mask, negative_mask, options_) \ + ((const key_override_t){ \ + .trigger_mods = (trigger_mods_), \ + .layers = (layer_mask), \ + .suppressed_mods = (trigger_mods_), \ + .options = (options_), \ + .negative_mod_mask = (negative_mask), \ + .custom_action = NULL, \ + .context = NULL, \ + .trigger = (trigger_key), \ + .replacement = (replacement_key), \ + .enabled = NULL \ + }) + +// clang-format on diff --git a/quantum/process_keycode/process_magic.c b/quantum/process_keycode/process_magic.c index 44dd5f057..01f2fb928 100644 --- a/quantum/process_keycode/process_magic.c +++ b/quantum/process_keycode/process_magic.c @@ -164,6 +164,9 @@ bool process_magic(uint16_t keycode, keyrecord_t *record) { case MAGIC_EE_HANDS_RIGHT: eeconfig_update_handedness(false); break; + case MAGIC_TOGGLE_GUI: + keymap_config.no_gui = !keymap_config.no_gui; + break; } eeconfig_update_keymap(keymap_config.raw); diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index eb06be96c..2beccbd8f 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -296,7 +296,7 @@ void music_mode_cycle(void) { # endif } -void matrix_scan_music(void) { +void music_task(void) { if (music_sequence_playing) { if ((music_sequence_timer == 0) || (timer_elapsed(music_sequence_timer) > music_sequence_interval)) { music_sequence_timer = timer_read(); diff --git a/quantum/process_keycode/process_music.h b/quantum/process_keycode/process_music.h index 01014aa6c..e275cd9d2 100644 --- a/quantum/process_keycode/process_music.h +++ b/quantum/process_keycode/process_music.h @@ -44,7 +44,7 @@ void music_scale_user(void); void music_all_notes_off(void); void music_mode_cycle(void); -void matrix_scan_music(void); +void music_task(void); bool music_mask(uint16_t keycode); bool music_mask_kb(uint16_t keycode); diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c index 167c0c03c..69853cd5c 100644 --- a/quantum/process_keycode/process_rgb.c +++ b/quantum/process_keycode/process_rgb.c @@ -14,7 +14,6 @@ * along with this program. If not, see . */ #include "process_rgb.h" -#include "rgb.h" typedef void (*rgb_func_pointer)(void); @@ -162,7 +161,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { #if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_BREATHING) handleKeycodeRGBMode(RGBLIGHT_MODE_BREATHING, RGBLIGHT_MODE_BREATHING_end); #endif -#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_BREATHING) +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && defined(ENABLE_RGB_MATRIX_BREATHING) rgb_matrix_mode(RGB_MATRIX_BREATHING); #endif return false; @@ -170,7 +169,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { #if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_MOOD, RGBLIGHT_MODE_RAINBOW_MOOD_end); #endif -#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT) +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && defined(ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT) rgb_matrix_mode(RGB_MATRIX_CYCLE_LEFT_RIGHT); #endif return false; @@ -178,7 +177,7 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { #if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) && defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) handleKeycodeRGBMode(RGBLIGHT_MODE_RAINBOW_SWIRL, RGBLIGHT_MODE_RAINBOW_SWIRL_end); #endif -#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && !defined(DISABLE_RGB_MATRIX_CYCLE_PINWHEEL) +#if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) && defined(ENABLE_RGB_MATRIX_CYCLE_PINWHEEL) rgb_matrix_mode(RGB_MATRIX_CYCLE_PINWHEEL); #endif return false; diff --git a/quantum/process_keycode/process_steno.c b/quantum/process_keycode/process_steno.c index 57e279f21..a964aead3 100644 --- a/quantum/process_keycode/process_steno.c +++ b/quantum/process_keycode/process_steno.c @@ -65,6 +65,12 @@ static steno_mode_t mode; static const uint8_t boltmap[64] PROGMEM = {TXB_NUL, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_S_L, TXB_S_L, TXB_T_L, TXB_K_L, TXB_P_L, TXB_W_L, TXB_H_L, TXB_R_L, TXB_A_L, TXB_O_L, TXB_STR, TXB_STR, TXB_NUL, TXB_NUL, TXB_NUL, TXB_STR, TXB_STR, TXB_E_R, TXB_U_R, TXB_F_R, TXB_R_R, TXB_P_R, TXB_B_R, TXB_L_R, TXB_G_R, TXB_T_R, TXB_S_R, TXB_D_R, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_NUM, TXB_Z_R}; +#ifdef STENO_COMBINEDMAP +/* Used to look up when pressing the middle row key to combine two consonant or vowel keys */ +static const uint16_t combinedmap_first[] PROGMEM = {STN_S1, STN_TL, STN_PL, STN_HL, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, STN_A, STN_E}; +static const uint16_t combinedmap_second[] PROGMEM = {STN_S2, STN_KL, STN_WL, STN_RL, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, STN_O, STN_U}; +#endif + static void steno_clear_state(void) { memset(state, 0, sizeof(state)); memset(chord, 0, sizeof(chord)); @@ -167,6 +173,15 @@ bool process_steno(uint16_t keycode, keyrecord_t *record) { } return false; +#ifdef STENO_COMBINEDMAP + case QK_STENO_COMB ... QK_STENO_COMB_MAX: + { + uint8_t result; + result = process_steno(combinedmap_first[keycode-QK_STENO_COMB], record); + result &= process_steno(combinedmap_second[keycode-QK_STENO_COMB], record); + return result; + } +#endif case STN__MIN ... STN__MAX: if (!process_steno_user(keycode, record)) { return false; diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index 17dc540a6..c8712d919 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -161,7 +161,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) { return true; } -void matrix_scan_tap_dance() { +void tap_dance_task() { if (highest_td == -1) return; uint16_t tap_user_defined; diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index a013c5cab..d9ffb1e73 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -85,7 +85,7 @@ extern qk_tap_dance_action_t tap_dance_actions[]; void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record); bool process_tap_dance(uint16_t keycode, keyrecord_t *record); -void matrix_scan_tap_dance(void); +void tap_dance_task(void); void reset_tap_dance(qk_tap_dance_state_t *state); void qk_tap_dance_pair_on_each_tap(qk_tap_dance_state_t *state, void *user_data); diff --git a/quantum/quantum.c b/quantum/quantum.c index 8ccdb774b..e60378afe 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -49,21 +49,18 @@ float goodbye_song[][2] = GOODBYE_SONG; # ifdef DEFAULT_LAYER_SONGS float default_layer_songs[][16][2] = DEFAULT_LAYER_SONGS; # endif -# ifdef SENDSTRING_BELL -float bell_song[][2] = SONG(TERMINAL_SOUND); -# endif #endif #ifdef AUTO_SHIFT_ENABLE # include "process_auto_shift.h" #endif -static void do_code16(uint16_t code, void (*f)(uint8_t)) { +uint8_t extract_mod_bits(uint16_t code) { switch (code) { case QK_MODS ... QK_MODS_MAX: break; default: - return; + return 0; } uint8_t mods_to_send = 0; @@ -80,9 +77,11 @@ static void do_code16(uint16_t code, void (*f)(uint8_t)) { if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_LGUI); } - f(mods_to_send); + return mods_to_send; } +static void do_code16(uint16_t code, void (*f)(uint8_t)) { f(extract_mod_bits(code)); } + void register_code16(uint16_t code) { if (IS_MOD(code) || code == KC_NO) { do_code16(code, register_mods); @@ -144,7 +143,13 @@ void reset_keyboard(void) { } /* Convert record into usable keycode via the contained event. */ -uint16_t get_record_keycode(keyrecord_t *record, bool update_layer_cache) { return get_event_keycode(record->event, update_layer_cache); } +uint16_t get_record_keycode(keyrecord_t *record, bool update_layer_cache) { +#ifdef COMBO_ENABLE + if (record->keycode) { return record->keycode; } +#endif + return get_event_keycode(record->event, update_layer_cache); +} + /* Convert event into usable keycode. Checks the layer cache to ensure that it * retains the correct keycode after a layer change, if the key is still pressed. @@ -170,6 +175,18 @@ uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache) { return keymap_key_to_keycode(layer_switch_get_layer(event.key), event.key); } +/* Get keycode, and then process pre tapping functionality */ +bool pre_process_record_quantum(keyrecord_t *record) { + if (!( +#ifdef COMBO_ENABLE + process_combo(get_record_keycode(record, true), record) && +#endif + true)) { + return false; + } + return true; // continue processing +} + /* Get keycode, and then call keyboard function */ void post_process_record_quantum(keyrecord_t *record) { uint16_t keycode = get_record_keycode(record, false); @@ -217,10 +234,10 @@ bool process_record_quantum(keyrecord_t *record) { #endif #if defined(AUDIO_ENABLE) && defined(AUDIO_CLICKY) process_clicky(keycode, record) && -#endif // AUDIO_CLICKY +#endif #ifdef HAPTIC_ENABLE process_haptic(keycode, record) && -#endif // HAPTIC_ENABLE +#endif #if defined(VIA_ENABLE) process_record_via(keycode, record) && #endif @@ -243,6 +260,9 @@ bool process_record_quantum(keyrecord_t *record) { #if (defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))) && !defined(NO_MUSIC_MODE) process_music(keycode, record) && #endif +#ifdef KEY_OVERRIDE_ENABLE + process_key_override(keycode, record) && +#endif #ifdef TAP_DANCE_ENABLE process_tap_dance(keycode, record) && #endif @@ -252,9 +272,6 @@ bool process_record_quantum(keyrecord_t *record) { #ifdef LEADER_ENABLE process_leader(keycode, record) && #endif -#ifdef COMBO_ENABLE - process_combo(keycode, record) && -#endif #ifdef PRINTING_ENABLE process_printer(keycode, record) && #endif @@ -340,13 +357,13 @@ void set_single_persistent_default_layer(uint8_t default_layer) { #if defined(AUDIO_ENABLE) && defined(DEFAULT_LAYER_SONGS) PLAY_SONG(default_layer_songs[default_layer]); #endif - eeconfig_update_default_layer(1U << default_layer); - default_layer_set(1U << default_layer); + eeconfig_update_default_layer((layer_state_t)1 << default_layer); + default_layer_set((layer_state_t)1 << default_layer); } layer_state_t update_tri_layer_state(layer_state_t state, uint8_t layer1, uint8_t layer2, uint8_t layer3) { - layer_state_t mask12 = (1UL << layer1) | (1UL << layer2); - layer_state_t mask3 = 1UL << layer3; + layer_state_t mask12 = ((layer_state_t)1 << layer1) | ((layer_state_t)1 << layer2); + layer_state_t mask3 = (layer_state_t)1 << layer3; return (state & mask12) == mask12 ? (state | mask3) : (state & ~mask3); } @@ -354,10 +371,7 @@ void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3) { layer_st void matrix_init_quantum() { magic(); -#if defined(LED_NUM_LOCK_PIN) || defined(LED_CAPS_LOCK_PIN) || defined(LED_SCROLL_LOCK_PIN) || defined(LED_COMPOSE_PIN) || defined(LED_KANA_PIN) - // TODO: remove calls to led_init_ports from keyboards and remove ifdef led_init_ports(); -#endif #ifdef BACKLIGHT_ENABLE backlight_init_ports(); #endif @@ -384,7 +398,7 @@ void matrix_init_quantum() { } void matrix_scan_quantum() { -#if defined(AUDIO_ENABLE) +#if defined(AUDIO_ENABLE) && defined(AUDIO_INIT_DELAY) // There are some tasks that need to be run a little bit // after keyboard startup, or else they will not work correctly // because of interaction with the USB device state, which @@ -405,19 +419,23 @@ void matrix_scan_quantum() { #endif #if defined(AUDIO_ENABLE) && !defined(NO_MUSIC_MODE) - matrix_scan_music(); + music_task(); +#endif + +#ifdef KEY_OVERRIDE_ENABLE + key_override_task(); #endif #ifdef SEQUENCER_ENABLE - matrix_scan_sequencer(); + sequencer_task(); #endif #ifdef TAP_DANCE_ENABLE - matrix_scan_tap_dance(); + tap_dance_task(); #endif #ifdef COMBO_ENABLE - matrix_scan_combo(); + combo_task(); #endif #ifdef LED_MATRIX_ENABLE diff --git a/quantum/quantum.h b/quantum/quantum.h index d87d14041..86b717e44 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -105,6 +105,10 @@ extern layer_state_t layer_state; # include "process_unicodemap.h" #endif +#ifdef KEY_OVERRIDE_ENABLE +# include "process_key_override.h" +#endif + #ifdef TAP_DANCE_ENABLE # include "process_tap_dance.h" #endif @@ -157,12 +161,17 @@ extern layer_state_t layer_state; #ifdef HAPTIC_ENABLE # include "haptic.h" +# include "process_haptic.h" #endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include "oled_driver.h" #endif +#ifdef ST7565_ENABLE +# include "st7565.h" +#endif + #ifdef DIP_SWITCH_ENABLE # include "dip_switch.h" #endif @@ -203,10 +212,6 @@ void set_single_persistent_default_layer(uint8_t default_layer); #define IS_LAYER_ON_STATE(state, layer) layer_state_cmp(state, layer) #define IS_LAYER_OFF_STATE(state, layer) !layer_state_cmp(state, layer) -void matrix_init_kb(void); -void matrix_scan_kb(void); -void matrix_init_user(void); -void matrix_scan_user(void); uint16_t get_record_keycode(keyrecord_t *record, bool update_layer_cache); uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache); bool process_action_kb(keyrecord_t *record); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index c361dd670..ef4b0f457 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -66,6 +66,8 @@ enum quantum_keycodes { QK_STENO = 0x5A00, QK_STENO_BOLT = 0x5A30, QK_STENO_GEMINI = 0x5A31, + QK_STENO_COMB = 0x5A32, + QK_STENO_COMB_MAX = 0x5A3C, QK_STENO_MAX = 0x5A3F, // 0x5C00 - 0x5FFF are reserved, see below QK_MOD_TAP = 0x6000, @@ -514,6 +516,14 @@ enum quantum_keycodes { // RGB underglow/matrix (continued) RGB_MODE_TWINKLE, + // Key Overrides + KEY_OVERRIDE_TOGGLE, + KEY_OVERRIDE_ON, + KEY_OVERRIDE_OFF, + + // Additional magic key + MAGIC_TOGGLE_GUI, + // Start of custom keycode range for keyboards and keymaps - always leave at the end SAFE_RANGE }; @@ -687,6 +697,7 @@ enum quantum_keycodes { #define GUI_OFF MAGIC_NO_GUI #define GUI_ON MAGIC_UNNO_GUI +#define GUI_TOG MAGIC_TOGGLE_GUI #define GE_SWAP MAGIC_SWAP_GRAVE_ESC #define GE_NORM MAGIC_UNSWAP_GRAVE_ESC diff --git a/quantum/rgb.h b/quantum/rgb.h deleted file mode 100644 index 2602fc0b2..000000000 --- a/quantum/rgb.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright 2017 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -__attribute__((weak)) void rgblight_toggle(void){}; - -__attribute__((weak)) void rgblight_step(void){}; - -__attribute__((weak)) void rgblight_step_reverse(void){}; - -__attribute__((weak)) void rgblight_increase_hue(void){}; - -__attribute__((weak)) void rgblight_decrease_hue(void){}; - -__attribute__((weak)) void rgblight_increase_sat(void){}; - -__attribute__((weak)) void rgblight_decrease_sat(void){}; - -__attribute__((weak)) void rgblight_increase_val(void){}; - -__attribute__((weak)) void rgblight_decrease_val(void){}; - -__attribute__((weak)) void rgblight_increase_speed(void){}; - -__attribute__((weak)) void rgblight_decrease_speed(void){}; diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c deleted file mode 100644 index ab8dbd849..000000000 --- a/quantum/rgb_matrix.c +++ /dev/null @@ -1,646 +0,0 @@ -/* Copyright 2017 Jason Williams - * Copyright 2017 Jack Humbert - * Copyright 2018 Yiancar - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "rgb_matrix.h" -#include "progmem.h" -#include "config.h" -#include "eeprom.h" -#include -#include - -#include - -#ifndef RGB_MATRIX_CENTER -const led_point_t k_rgb_matrix_center = {112, 32}; -#else -const led_point_t k_rgb_matrix_center = RGB_MATRIX_CENTER; -#endif - -__attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); } - -// Generic effect runners -#include "rgb_matrix_runners/effect_runner_dx_dy_dist.h" -#include "rgb_matrix_runners/effect_runner_dx_dy.h" -#include "rgb_matrix_runners/effect_runner_i.h" -#include "rgb_matrix_runners/effect_runner_sin_cos_i.h" -#include "rgb_matrix_runners/effect_runner_reactive.h" -#include "rgb_matrix_runners/effect_runner_reactive_splash.h" - -// ------------------------------------------ -// -----Begin rgb effect includes macros----- -#define RGB_MATRIX_EFFECT(name) -#define RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -#include "rgb_matrix_animations/rgb_matrix_effects.inc" -#ifdef RGB_MATRIX_CUSTOM_KB -# include "rgb_matrix_kb.inc" -#endif -#ifdef RGB_MATRIX_CUSTOM_USER -# include "rgb_matrix_user.inc" -#endif - -#undef RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#undef RGB_MATRIX_EFFECT -// -----End rgb effect includes macros------- -// ------------------------------------------ - -#if defined(RGB_DISABLE_AFTER_TIMEOUT) && !defined(RGB_DISABLE_TIMEOUT) -# define RGB_DISABLE_TIMEOUT (RGB_DISABLE_AFTER_TIMEOUT * 1200UL) -#endif - -#ifndef RGB_DISABLE_TIMEOUT -# define RGB_DISABLE_TIMEOUT 0 -#endif - -#if RGB_DISABLE_WHEN_USB_SUSPENDED != 1 -# undef RGB_DISABLE_WHEN_USB_SUSPENDED -#endif - -#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX -# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX -#endif - -#if !defined(RGB_MATRIX_HUE_STEP) -# define RGB_MATRIX_HUE_STEP 8 -#endif - -#if !defined(RGB_MATRIX_SAT_STEP) -# define RGB_MATRIX_SAT_STEP 16 -#endif - -#if !defined(RGB_MATRIX_VAL_STEP) -# define RGB_MATRIX_VAL_STEP 16 -#endif - -#if !defined(RGB_MATRIX_SPD_STEP) -# define RGB_MATRIX_SPD_STEP 16 -#endif - -#if !defined(RGB_MATRIX_STARTUP_MODE) -# ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT -# else -// fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace -# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR -# endif -#endif - -#if !defined(RGB_MATRIX_STARTUP_HUE) -# define RGB_MATRIX_STARTUP_HUE 0 -#endif - -#if !defined(RGB_MATRIX_STARTUP_SAT) -# define RGB_MATRIX_STARTUP_SAT UINT8_MAX -#endif - -#if !defined(RGB_MATRIX_STARTUP_VAL) -# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS -#endif - -#if !defined(RGB_MATRIX_STARTUP_SPD) -# define RGB_MATRIX_STARTUP_SPD UINT8_MAX / 2 -#endif - -// globals -rgb_config_t rgb_matrix_config; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr -uint32_t g_rgb_timer; -#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS -uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}}; -#endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS -#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -last_hit_t g_last_hit_tracker; -#endif // RGB_MATRIX_KEYREACTIVE_ENABLED - -// internals -static bool suspend_state = false; -static uint8_t rgb_last_enable = UINT8_MAX; -static uint8_t rgb_last_effect = UINT8_MAX; -static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false}; -static rgb_task_states rgb_task_state = SYNCING; -#if RGB_DISABLE_TIMEOUT > 0 -static uint32_t rgb_anykey_timer; -#endif // RGB_DISABLE_TIMEOUT > 0 - -// double buffers -static uint32_t rgb_timer_buffer; -#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -static last_hit_t last_hit_buffer; -#endif // RGB_MATRIX_KEYREACTIVE_ENABLED - -// split rgb matrix -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) -const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT; -#endif - -void eeconfig_read_rgb_matrix(void) { eeprom_read_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); } - -void eeconfig_update_rgb_matrix(void) { eeprom_update_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); } - -void eeconfig_update_rgb_matrix_default(void) { - dprintf("eeconfig_update_rgb_matrix_default\n"); - rgb_matrix_config.enable = 1; - rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE; - rgb_matrix_config.hsv = (HSV){RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL}; - rgb_matrix_config.speed = RGB_MATRIX_STARTUP_SPD; - rgb_matrix_config.flags = LED_FLAG_ALL; - eeconfig_update_rgb_matrix(); -} - -void eeconfig_debug_rgb_matrix(void) { - dprintf("rgb_matrix_config EEPROM\n"); - dprintf("rgb_matrix_config.enable = %d\n", rgb_matrix_config.enable); - dprintf("rgb_matrix_config.mode = %d\n", rgb_matrix_config.mode); - dprintf("rgb_matrix_config.hsv.h = %d\n", rgb_matrix_config.hsv.h); - dprintf("rgb_matrix_config.hsv.s = %d\n", rgb_matrix_config.hsv.s); - dprintf("rgb_matrix_config.hsv.v = %d\n", rgb_matrix_config.hsv.v); - dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed); - dprintf("rgb_matrix_config.flags = %d\n", rgb_matrix_config.flags); -} - -__attribute__((weak)) uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; } - -uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) { - uint8_t led_count = rgb_matrix_map_row_column_to_led_kb(row, column, led_i); - uint8_t led_index = g_led_config.matrix_co[row][column]; - if (led_index != NO_LED) { - led_i[led_count] = led_index; - led_count++; - } - return led_count; -} - -void rgb_matrix_update_pwm_buffers(void) { rgb_matrix_driver.flush(); } - -void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - if (!is_keyboard_left() && index >= k_rgb_matrix_split[0]) - rgb_matrix_driver.set_color(index - k_rgb_matrix_split[0], red, green, blue); - else if (is_keyboard_left() && index < k_rgb_matrix_split[0]) -#endif - rgb_matrix_driver.set_color(index, red, green, blue); -} - -void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) rgb_matrix_set_color(i, red, green, blue); -#else - rgb_matrix_driver.set_color_all(red, green, blue); -#endif -} - -void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) { -#ifndef RGB_MATRIX_SPLIT - if (!is_keyboard_master()) return; -#endif -#if RGB_DISABLE_TIMEOUT > 0 - rgb_anykey_timer = 0; -#endif // RGB_DISABLE_TIMEOUT > 0 - -#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED - uint8_t led[LED_HITS_TO_REMEMBER]; - uint8_t led_count = 0; - -# if defined(RGB_MATRIX_KEYRELEASES) - if (!pressed) -# elif defined(RGB_MATRIX_KEYPRESSES) - if (pressed) -# endif // defined(RGB_MATRIX_KEYRELEASES) - { - led_count = rgb_matrix_map_row_column_to_led(row, col, led); - } - - if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) { - memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count); - memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count); - memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit - memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count); - last_hit_buffer.count--; - } - - for (uint8_t i = 0; i < led_count; i++) { - uint8_t index = last_hit_buffer.count; - last_hit_buffer.x[index] = g_led_config.point[led[i]].x; - last_hit_buffer.y[index] = g_led_config.point[led[i]].y; - last_hit_buffer.index[index] = led[i]; - last_hit_buffer.tick[index] = 0; - last_hit_buffer.count++; - } -#endif // RGB_MATRIX_KEYREACTIVE_ENABLED - -#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) - if (rgb_matrix_config.mode == RGB_MATRIX_TYPING_HEATMAP) { - process_rgb_matrix_typing_heatmap(row, col); - } -#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) -} - -void rgb_matrix_test(void) { - // Mask out bits 4 and 5 - // Increase the factor to make the test animation slower (and reduce to make it faster) - uint8_t factor = 10; - switch ((g_rgb_timer & (0b11 << factor)) >> factor) { - case 0: { - rgb_matrix_set_color_all(20, 0, 0); - break; - } - case 1: { - rgb_matrix_set_color_all(0, 20, 0); - break; - } - case 2: { - rgb_matrix_set_color_all(0, 0, 20); - break; - } - case 3: { - rgb_matrix_set_color_all(20, 20, 20); - break; - } - } -} - -static bool rgb_matrix_none(effect_params_t *params) { - if (!params->init) { - return false; - } - - rgb_matrix_set_color_all(0, 0, 0); - return false; -} - -static void rgb_task_timers(void) { -#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_DISABLE_TIMEOUT > 0 - uint32_t deltaTime = sync_timer_elapsed32(rgb_timer_buffer); -#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_DISABLE_TIMEOUT > 0 - rgb_timer_buffer = sync_timer_read32(); - - // Update double buffer timers -#if RGB_DISABLE_TIMEOUT > 0 - if (rgb_anykey_timer < UINT32_MAX) { - if (UINT32_MAX - deltaTime < rgb_anykey_timer) { - rgb_anykey_timer = UINT32_MAX; - } else { - rgb_anykey_timer += deltaTime; - } - } -#endif // RGB_DISABLE_TIMEOUT > 0 - - // Update double buffer last hit timers -#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED - uint8_t count = last_hit_buffer.count; - for (uint8_t i = 0; i < count; ++i) { - if (UINT16_MAX - deltaTime < last_hit_buffer.tick[i]) { - last_hit_buffer.count--; - continue; - } - last_hit_buffer.tick[i] += deltaTime; - } -#endif // RGB_MATRIX_KEYREACTIVE_ENABLED -} - -static void rgb_task_sync(void) { - // next task - if (sync_timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING; -} - -static void rgb_task_start(void) { - // reset iter - rgb_effect_params.iter = 0; - - // update double buffers - g_rgb_timer = rgb_timer_buffer; -#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED - g_last_hit_tracker = last_hit_buffer; -#endif // RGB_MATRIX_KEYREACTIVE_ENABLED - - // next task - rgb_task_state = RENDERING; -} - -static void rgb_task_render(uint8_t effect) { - bool rendering = false; - rgb_effect_params.init = (effect != rgb_last_effect) || (rgb_matrix_config.enable != rgb_last_enable); - if (rgb_effect_params.flags != rgb_matrix_config.flags) { - rgb_effect_params.flags = rgb_matrix_config.flags; - rgb_matrix_set_color_all(0, 0, 0); - } - - // each effect can opt to do calculations - // and/or request PWM buffer updates. - switch (effect) { - case RGB_MATRIX_NONE: - rendering = rgb_matrix_none(&rgb_effect_params); - break; - -// --------------------------------------------- -// -----Begin rgb effect switch case macros----- -#define RGB_MATRIX_EFFECT(name, ...) \ - case RGB_MATRIX_##name: \ - rendering = name(&rgb_effect_params); \ - break; -#include "rgb_matrix_animations/rgb_matrix_effects.inc" -#undef RGB_MATRIX_EFFECT - -#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER) -# define RGB_MATRIX_EFFECT(name, ...) \ - case RGB_MATRIX_CUSTOM_##name: \ - rendering = name(&rgb_effect_params); \ - break; -# ifdef RGB_MATRIX_CUSTOM_KB -# include "rgb_matrix_kb.inc" -# endif -# ifdef RGB_MATRIX_CUSTOM_USER -# include "rgb_matrix_user.inc" -# endif -# undef RGB_MATRIX_EFFECT -#endif - // -----End rgb effect switch case macros------- - // --------------------------------------------- - - // Factory default magic value - case UINT8_MAX: { - rgb_matrix_test(); - rgb_task_state = FLUSHING; - } - return; - } - - rgb_effect_params.iter++; - - // next task - if (!rendering) { - rgb_task_state = FLUSHING; - if (!rgb_effect_params.init && effect == RGB_MATRIX_NONE) { - // We only need to flush once if we are RGB_MATRIX_NONE - rgb_task_state = SYNCING; - } - } -} - -static void rgb_task_flush(uint8_t effect) { - // update last trackers after the first full render so we can init over several frames - rgb_last_effect = effect; - rgb_last_enable = rgb_matrix_config.enable; - - // update pwm buffers - rgb_matrix_update_pwm_buffers(); - - // next task - rgb_task_state = SYNCING; -} - -void rgb_matrix_task(void) { - rgb_task_timers(); - - // Ideally we would also stop sending zeros to the LED driver PWM buffers - // while suspended and just do a software shutdown. This is a cheap hack for now. - bool suspend_backlight = suspend_state || -#if RGB_DISABLE_TIMEOUT > 0 - (rgb_anykey_timer > (uint32_t)RGB_DISABLE_TIMEOUT) || -#endif // RGB_DISABLE_TIMEOUT > 0 - false; - - uint8_t effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode; - - switch (rgb_task_state) { - case STARTING: - rgb_task_start(); - break; - case RENDERING: - rgb_task_render(effect); - if (effect) { - rgb_matrix_indicators(); - rgb_matrix_indicators_advanced(&rgb_effect_params); - } - break; - case FLUSHING: - rgb_task_flush(effect); - break; - case SYNCING: - rgb_task_sync(); - break; - } -} - -void rgb_matrix_indicators(void) { - rgb_matrix_indicators_kb(); - rgb_matrix_indicators_user(); -} - -__attribute__((weak)) void rgb_matrix_indicators_kb(void) {} - -__attribute__((weak)) void rgb_matrix_indicators_user(void) {} - -void rgb_matrix_indicators_advanced(effect_params_t *params) { - /* special handling is needed for "params->iter", since it's already been incremented. - * Could move the invocations to rgb_task_render, but then it's missing a few checks - * and not sure which would be better. Otherwise, this should be called from - * rgb_task_render, right before the iter++ line. - */ -#if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL - uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * (params->iter - 1); - uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT; - if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; -#else - uint8_t min = 0; - uint8_t max = DRIVER_LED_TOTAL; -#endif - rgb_matrix_indicators_advanced_kb(min, max); - rgb_matrix_indicators_advanced_user(min, max); -} - -__attribute__((weak)) void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {} - -__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {} - -void rgb_matrix_init(void) { - rgb_matrix_driver.init(); - -#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED - g_last_hit_tracker.count = 0; - for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) { - g_last_hit_tracker.tick[i] = UINT16_MAX; - } - - last_hit_buffer.count = 0; - for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) { - last_hit_buffer.tick[i] = UINT16_MAX; - } -#endif // RGB_MATRIX_KEYREACTIVE_ENABLED - - if (!eeconfig_is_enabled()) { - dprintf("rgb_matrix_init_drivers eeconfig is not enabled.\n"); - eeconfig_init(); - eeconfig_update_rgb_matrix_default(); - } - - eeconfig_read_rgb_matrix(); - if (!rgb_matrix_config.mode) { - dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n"); - eeconfig_update_rgb_matrix_default(); - } - eeconfig_debug_rgb_matrix(); // display current eeprom values -} - -void rgb_matrix_set_suspend_state(bool state) { -#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED - if (state) { - rgb_matrix_set_color_all(0, 0, 0); // turn off all LEDs when suspending - } - suspend_state = state; -#endif -} - -bool rgb_matrix_get_suspend_state(void) { return suspend_state; } - -void rgb_matrix_toggle_eeprom_helper(bool write_to_eeprom) { - rgb_matrix_config.enable ^= 1; - rgb_task_state = STARTING; - if (write_to_eeprom) { - eeconfig_update_rgb_matrix(); - } - dprintf("rgb matrix toggle [%s]: rgb_matrix_config.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.enable); -} -void rgb_matrix_toggle_noeeprom(void) { rgb_matrix_toggle_eeprom_helper(false); } -void rgb_matrix_toggle(void) { rgb_matrix_toggle_eeprom_helper(true); } - -void rgb_matrix_enable(void) { - rgb_matrix_enable_noeeprom(); - eeconfig_update_rgb_matrix(); -} - -void rgb_matrix_enable_noeeprom(void) { - if (!rgb_matrix_config.enable) rgb_task_state = STARTING; - rgb_matrix_config.enable = 1; -} - -void rgb_matrix_disable(void) { - rgb_matrix_disable_noeeprom(); - eeconfig_update_rgb_matrix(); -} - -void rgb_matrix_disable_noeeprom(void) { - if (rgb_matrix_config.enable) rgb_task_state = STARTING; - rgb_matrix_config.enable = 0; -} - -uint8_t rgb_matrix_is_enabled(void) { return rgb_matrix_config.enable; } - -void rgb_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { - if (!rgb_matrix_config.enable) { - return; - } - if (mode < 1) { - rgb_matrix_config.mode = 1; - } else if (mode >= RGB_MATRIX_EFFECT_MAX) { - rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; - } else { - rgb_matrix_config.mode = mode; - } - rgb_task_state = STARTING; - if (write_to_eeprom) { - eeconfig_update_rgb_matrix(); - } - dprintf("rgb matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.mode); -} -void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, false); } -void rgb_matrix_mode(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, true); } - -uint8_t rgb_matrix_get_mode(void) { return rgb_matrix_config.mode; } - -void rgb_matrix_step_helper(bool write_to_eeprom) { - uint8_t mode = rgb_matrix_config.mode + 1; - rgb_matrix_mode_eeprom_helper((mode < RGB_MATRIX_EFFECT_MAX) ? mode : 1, write_to_eeprom); -} -void rgb_matrix_step_noeeprom(void) { rgb_matrix_step_helper(false); } -void rgb_matrix_step(void) { rgb_matrix_step_helper(true); } - -void rgb_matrix_step_reverse_helper(bool write_to_eeprom) { - uint8_t mode = rgb_matrix_config.mode - 1; - rgb_matrix_mode_eeprom_helper((mode < 1) ? RGB_MATRIX_EFFECT_MAX - 1 : mode, write_to_eeprom); -} -void rgb_matrix_step_reverse_noeeprom(void) { rgb_matrix_step_reverse_helper(false); } -void rgb_matrix_step_reverse(void) { rgb_matrix_step_reverse_helper(true); } - -void rgb_matrix_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) { - if (!rgb_matrix_config.enable) { - return; - } - rgb_matrix_config.hsv.h = hue; - rgb_matrix_config.hsv.s = sat; - rgb_matrix_config.hsv.v = (val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) ? RGB_MATRIX_MAXIMUM_BRIGHTNESS : val; - if (write_to_eeprom) { - eeconfig_update_rgb_matrix(); - } - dprintf("rgb matrix set hsv [%s]: %u,%u,%u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v); -} -void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, false); } -void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, true); } - -HSV rgb_matrix_get_hsv(void) { return rgb_matrix_config.hsv; } -uint8_t rgb_matrix_get_hue(void) { return rgb_matrix_config.hsv.h; } -uint8_t rgb_matrix_get_sat(void) { return rgb_matrix_config.hsv.s; } -uint8_t rgb_matrix_get_val(void) { return rgb_matrix_config.hsv.v; } - -void rgb_matrix_increase_hue_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h + RGB_MATRIX_HUE_STEP, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, write_to_eeprom); } -void rgb_matrix_increase_hue_noeeprom(void) { rgb_matrix_increase_hue_helper(false); } -void rgb_matrix_increase_hue(void) { rgb_matrix_increase_hue_helper(true); } - -void rgb_matrix_decrease_hue_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h - RGB_MATRIX_HUE_STEP, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, write_to_eeprom); } -void rgb_matrix_decrease_hue_noeeprom(void) { rgb_matrix_decrease_hue_helper(false); } -void rgb_matrix_decrease_hue(void) { rgb_matrix_decrease_hue_helper(true); } - -void rgb_matrix_increase_sat_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, qadd8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP), rgb_matrix_config.hsv.v, write_to_eeprom); } -void rgb_matrix_increase_sat_noeeprom(void) { rgb_matrix_increase_sat_helper(false); } -void rgb_matrix_increase_sat(void) { rgb_matrix_increase_sat_helper(true); } - -void rgb_matrix_decrease_sat_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, qsub8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP), rgb_matrix_config.hsv.v, write_to_eeprom); } -void rgb_matrix_decrease_sat_noeeprom(void) { rgb_matrix_decrease_sat_helper(false); } -void rgb_matrix_decrease_sat(void) { rgb_matrix_decrease_sat_helper(true); } - -void rgb_matrix_increase_val_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, qadd8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP), write_to_eeprom); } -void rgb_matrix_increase_val_noeeprom(void) { rgb_matrix_increase_val_helper(false); } -void rgb_matrix_increase_val(void) { rgb_matrix_increase_val_helper(true); } - -void rgb_matrix_decrease_val_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, qsub8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP), write_to_eeprom); } -void rgb_matrix_decrease_val_noeeprom(void) { rgb_matrix_decrease_val_helper(false); } -void rgb_matrix_decrease_val(void) { rgb_matrix_decrease_val_helper(true); } - -void rgb_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { - rgb_matrix_config.speed = speed; - if (write_to_eeprom) { - eeconfig_update_rgb_matrix(); - } - dprintf("rgb matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.speed); -} -void rgb_matrix_set_speed_noeeprom(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, false); } -void rgb_matrix_set_speed(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, true); } - -uint8_t rgb_matrix_get_speed(void) { return rgb_matrix_config.speed; } - -void rgb_matrix_increase_speed_helper(bool write_to_eeprom) { rgb_matrix_set_speed_eeprom_helper(qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP), write_to_eeprom); } -void rgb_matrix_increase_speed_noeeprom(void) { rgb_matrix_increase_speed_helper(false); } -void rgb_matrix_increase_speed(void) { rgb_matrix_increase_speed_helper(true); } - -void rgb_matrix_decrease_speed_helper(bool write_to_eeprom) { rgb_matrix_set_speed_eeprom_helper(qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP), write_to_eeprom); } -void rgb_matrix_decrease_speed_noeeprom(void) { rgb_matrix_decrease_speed_helper(false); } -void rgb_matrix_decrease_speed(void) { rgb_matrix_decrease_speed_helper(true); } - -led_flags_t rgb_matrix_get_flags(void) { return rgb_matrix_config.flags; } - -void rgb_matrix_set_flags(led_flags_t flags) { rgb_matrix_config.flags = flags; } diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h deleted file mode 100644 index a615b8422..000000000 --- a/quantum/rgb_matrix.h +++ /dev/null @@ -1,226 +0,0 @@ -/* Copyright 2017 Jason Williams - * Copyright 2017 Jack Humbert - * Copyright 2018 Yiancar - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -#include -#include -#include "rgb_matrix_types.h" -#include "color.h" -#include "quantum.h" -#include "rgblight_list.h" - -#ifdef IS31FL3731 -# include "is31fl3731.h" -#elif defined(IS31FL3733) -# include "is31fl3733.h" -#elif defined(IS31FL3737) -# include "is31fl3737.h" -#elif defined(IS31FL3741) -# include "is31fl3741.h" -#elif defined(WS2812) -# include "ws2812.h" -#endif - -#ifndef RGB_MATRIX_LED_FLUSH_LIMIT -# define RGB_MATRIX_LED_FLUSH_LIMIT 16 -#endif - -#ifndef RGB_MATRIX_LED_PROCESS_LIMIT -# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 -#endif - -#if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL -# define RGB_MATRIX_USE_LIMITS(min, max) \ - uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; \ - uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT; \ - if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; -#else -# define RGB_MATRIX_USE_LIMITS(min, max) \ - uint8_t min = 0; \ - uint8_t max = DRIVER_LED_TOTAL; -#endif - -#define RGB_MATRIX_INDICATOR_SET_COLOR(i, r, g, b) \ - if (i >= led_min && i <= led_max) { \ - rgb_matrix_set_color(i, r, g, b); \ - } - -#define RGB_MATRIX_TEST_LED_FLAGS() \ - if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue - -enum rgb_matrix_effects { - RGB_MATRIX_NONE = 0, - -// -------------------------------------- -// -----Begin rgb effect enum macros----- -#define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_##name, -#include "rgb_matrix_animations/rgb_matrix_effects.inc" -#undef RGB_MATRIX_EFFECT - -#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER) -# define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_CUSTOM_##name, -# ifdef RGB_MATRIX_CUSTOM_KB -# include "rgb_matrix_kb.inc" -# endif -# ifdef RGB_MATRIX_CUSTOM_USER -# include "rgb_matrix_user.inc" -# endif -# undef RGB_MATRIX_EFFECT -#endif - // -------------------------------------- - // -----End rgb effect enum macros------- - - RGB_MATRIX_EFFECT_MAX -}; - -void eeconfig_update_rgb_matrix_default(void); -void eeconfig_update_rgb_matrix(void); - -uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i); -uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i); - -void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); -void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); - -void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed); - -void rgb_matrix_task(void); - -// This runs after another backlight effect and replaces -// colors already set -void rgb_matrix_indicators(void); -void rgb_matrix_indicators_kb(void); -void rgb_matrix_indicators_user(void); - -void rgb_matrix_indicators_advanced(effect_params_t *params); -void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max); -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); - -void rgb_matrix_init(void); - -void rgb_matrix_set_suspend_state(bool state); -bool rgb_matrix_get_suspend_state(void); -void rgb_matrix_toggle(void); -void rgb_matrix_toggle_noeeprom(void); -void rgb_matrix_enable(void); -void rgb_matrix_enable_noeeprom(void); -void rgb_matrix_disable(void); -void rgb_matrix_disable_noeeprom(void); -uint8_t rgb_matrix_is_enabled(void); -void rgb_matrix_mode(uint8_t mode); -void rgb_matrix_mode_noeeprom(uint8_t mode); -uint8_t rgb_matrix_get_mode(void); -void rgb_matrix_step(void); -void rgb_matrix_step_noeeprom(void); -void rgb_matrix_step_reverse(void); -void rgb_matrix_step_reverse_noeeprom(void); -void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val); -void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); -HSV rgb_matrix_get_hsv(void); -uint8_t rgb_matrix_get_hue(void); -uint8_t rgb_matrix_get_sat(void); -uint8_t rgb_matrix_get_val(void); -void rgb_matrix_increase_hue(void); -void rgb_matrix_increase_hue_noeeprom(void); -void rgb_matrix_decrease_hue(void); -void rgb_matrix_decrease_hue_noeeprom(void); -void rgb_matrix_increase_sat(void); -void rgb_matrix_increase_sat_noeeprom(void); -void rgb_matrix_decrease_sat(void); -void rgb_matrix_decrease_sat_noeeprom(void); -void rgb_matrix_increase_val(void); -void rgb_matrix_increase_val_noeeprom(void); -void rgb_matrix_decrease_val(void); -void rgb_matrix_decrease_val_noeeprom(void); -void rgb_matrix_set_speed(uint8_t speed); -void rgb_matrix_set_speed_noeeprom(uint8_t speed); -uint8_t rgb_matrix_get_speed(void); -void rgb_matrix_increase_speed(void); -void rgb_matrix_increase_speed_noeeprom(void); -void rgb_matrix_decrease_speed(void); -void rgb_matrix_decrease_speed_noeeprom(void); -led_flags_t rgb_matrix_get_flags(void); -void rgb_matrix_set_flags(led_flags_t flags); - -#ifndef RGBLIGHT_ENABLE -# define eeconfig_update_rgblight_current eeconfig_update_rgb_matrix -# define rgblight_toggle rgb_matrix_toggle -# define rgblight_toggle_noeeprom rgb_matrix_toggle_noeeprom -# define rgblight_enable rgb_matrix_enable -# define rgblight_enable_noeeprom rgb_matrix_enable_noeeprom -# define rgblight_disable rgb_matrix_disable -# define rgblight_disable_noeeprom rgb_matrix_disable_noeeprom -# define rgblight_is_enabled rgb_matrix_is_enabled -# define rgblight_mode rgb_matrix_mode -# define rgblight_mode_noeeprom rgb_matrix_mode_noeeprom -# define rgblight_get_mode rgb_matrix_get_mode -# define rgblight_get_hue rgb_matrix_get_hue -# define rgblight_get_sat rgb_matrix_get_sat -# define rgblight_get_val rgb_matrix_get_val -# define rgblight_get_hsv rgb_matrix_get_hsv -# define rgblight_step rgb_matrix_step -# define rgblight_step_noeeprom rgb_matrix_step_noeeprom -# define rgblight_step_reverse rgb_matrix_step_reverse -# define rgblight_step_reverse_noeeprom rgb_matrix_step_reverse_noeeprom -# define rgblight_sethsv rgb_matrix_sethsv -# define rgblight_sethsv_noeeprom rgb_matrix_sethsv_noeeprom -# define rgblight_increase_hue rgb_matrix_increase_hue -# define rgblight_increase_hue_noeeprom rgb_matrix_increase_hue_noeeprom -# define rgblight_decrease_hue rgb_matrix_decrease_hue -# define rgblight_decrease_hue_noeeprom rgb_matrix_decrease_hue_noeeprom -# define rgblight_increase_sat rgb_matrix_increase_sat -# define rgblight_increase_sat_noeeprom rgb_matrix_increase_sat_noeeprom -# define rgblight_decrease_sat rgb_matrix_decrease_sat -# define rgblight_decrease_sat_noeeprom rgb_matrix_decrease_sat_noeeprom -# define rgblight_increase_val rgb_matrix_increase_val -# define rgblight_increase_val_noeeprom rgb_matrix_increase_val_noeeprom -# define rgblight_decrease_val rgb_matrix_decrease_val -# define rgblight_decrease_val_noeeprom rgb_matrix_decrease_val_noeeprom -# define rgblight_set_speed rgb_matrix_set_speed -# define rgblight_set_speed_noeeprom rgb_matrix_set_speed_noeeprom -# define rgblight_get_speed rgb_matrix_get_speed -# define rgblight_increase_speed rgb_matrix_increase_speed -# define rgblight_increase_speed_noeeprom rgb_matrix_increase_speed_noeeprom -# define rgblight_decrease_speed rgb_matrix_decrease_speed -# define rgblight_decrease_speed_noeeprom rgb_matrix_decrease_speed_noeeprom -#endif - -typedef struct { - /* Perform any initialisation required for the other driver functions to work. */ - void (*init)(void); - /* Set the colour of a single LED in the buffer. */ - void (*set_color)(int index, uint8_t r, uint8_t g, uint8_t b); - /* Set the colour of all LEDS on the keyboard in the buffer. */ - void (*set_color_all)(uint8_t r, uint8_t g, uint8_t b); - /* Flush any buffered changes to the hardware. */ - void (*flush)(void); -} rgb_matrix_driver_t; - -extern const rgb_matrix_driver_t rgb_matrix_driver; - -extern rgb_config_t rgb_matrix_config; - -extern uint32_t g_rgb_timer; -extern led_config_t g_led_config; -#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -extern last_hit_t g_last_hit_tracker; -#endif -#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS -extern uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; -#endif diff --git a/quantum/rgb_matrix/animations/alpha_mods_anim.h b/quantum/rgb_matrix/animations/alpha_mods_anim.h new file mode 100644 index 000000000..3f2c9b799 --- /dev/null +++ b/quantum/rgb_matrix/animations/alpha_mods_anim.h @@ -0,0 +1,26 @@ +#ifdef ENABLE_RGB_MATRIX_ALPHAS_MODS +RGB_MATRIX_EFFECT(ALPHAS_MODS) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +// alphas = color1, mods = color2 +bool ALPHAS_MODS(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = rgb_matrix_config.hsv; + RGB rgb1 = rgb_matrix_hsv_to_rgb(hsv); + hsv.h += rgb_matrix_config.speed; + RGB rgb2 = rgb_matrix_hsv_to_rgb(hsv); + + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { + rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b); + } else { + rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b); + } + } + return led_max < DRIVER_LED_TOTAL; +} + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS diff --git a/quantum/rgb_matrix/animations/breathing_anim.h b/quantum/rgb_matrix/animations/breathing_anim.h new file mode 100644 index 000000000..a00ccb83a --- /dev/null +++ b/quantum/rgb_matrix/animations/breathing_anim.h @@ -0,0 +1,20 @@ +#ifdef ENABLE_RGB_MATRIX_BREATHING +RGB_MATRIX_EFFECT(BREATHING) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool BREATHING(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = rgb_matrix_config.hsv; + uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); + hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); + RGB rgb = rgb_matrix_hsv_to_rgb(hsv); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BREATHING diff --git a/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h new file mode 100644 index 000000000..ac9578922 --- /dev/null +++ b/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV BAND_PINWHEEL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { + hsv.s = scale8(hsv.s - time - atan2_8(dy, dx) * 3, hsv.s); + return hsv; +} + +bool BAND_PINWHEEL_SAT(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_SAT_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT diff --git a/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h new file mode 100644 index 000000000..f7fe4b76e --- /dev/null +++ b/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV BAND_PINWHEEL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { + hsv.v = scale8(hsv.v - time - atan2_8(dy, dx) * 3, hsv.v); + return hsv; +} + +bool BAND_PINWHEEL_VAL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_VAL_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL diff --git a/quantum/rgb_matrix/animations/colorband_sat_anim.h b/quantum/rgb_matrix/animations/colorband_sat_anim.h new file mode 100644 index 000000000..96a6cbf5c --- /dev/null +++ b/quantum/rgb_matrix/animations/colorband_sat_anim.h @@ -0,0 +1,14 @@ +#ifdef ENABLE_RGB_MATRIX_BAND_SAT +RGB_MATRIX_EFFECT(BAND_SAT) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV BAND_SAT_math(HSV hsv, uint8_t i, uint8_t time) { + int16_t s = hsv.s - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; + hsv.s = scale8(s < 0 ? 0 : s, hsv.s); + return hsv; +} + +bool BAND_SAT(effect_params_t* params) { return effect_runner_i(params, &BAND_SAT_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_SAT diff --git a/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h new file mode 100644 index 000000000..52f6040d8 --- /dev/null +++ b/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV BAND_SPIRAL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv.s = scale8(hsv.s + dist - time - atan2_8(dy, dx), hsv.s); + return hsv; +} + +bool BAND_SPIRAL_SAT(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_SAT_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h new file mode 100644 index 000000000..d5752e27f --- /dev/null +++ b/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV BAND_SPIRAL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv.v = scale8(hsv.v + dist - time - atan2_8(dy, dx), hsv.v); + return hsv; +} + +bool BAND_SPIRAL_VAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_VAL_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL diff --git a/quantum/rgb_matrix/animations/colorband_val_anim.h b/quantum/rgb_matrix/animations/colorband_val_anim.h new file mode 100644 index 000000000..32bc6f52a --- /dev/null +++ b/quantum/rgb_matrix/animations/colorband_val_anim.h @@ -0,0 +1,14 @@ +#ifdef ENABLE_RGB_MATRIX_BAND_VAL +RGB_MATRIX_EFFECT(BAND_VAL) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV BAND_VAL_math(HSV hsv, uint8_t i, uint8_t time) { + int16_t v = hsv.v - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; + hsv.v = scale8(v < 0 ? 0 : v, hsv.v); + return hsv; +} + +bool BAND_VAL(effect_params_t* params) { return effect_runner_i(params, &BAND_VAL_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_BAND_VAL diff --git a/quantum/rgb_matrix/animations/cycle_all_anim.h b/quantum/rgb_matrix/animations/cycle_all_anim.h new file mode 100644 index 000000000..20af94b6b --- /dev/null +++ b/quantum/rgb_matrix/animations/cycle_all_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_CYCLE_ALL +RGB_MATRIX_EFFECT(CYCLE_ALL) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV CYCLE_ALL_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h = time; + return hsv; +} + +bool CYCLE_ALL(effect_params_t* params) { return effect_runner_i(params, &CYCLE_ALL_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_ALL diff --git a/quantum/rgb_matrix/animations/cycle_left_right_anim.h b/quantum/rgb_matrix/animations/cycle_left_right_anim.h new file mode 100644 index 000000000..7f84f4bd5 --- /dev/null +++ b/quantum/rgb_matrix/animations/cycle_left_right_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +RGB_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV CYCLE_LEFT_RIGHT_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h = g_led_config.point[i].x - time; + return hsv; +} + +bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT diff --git a/quantum/rgb_matrix/animations/cycle_out_in_anim.h b/quantum/rgb_matrix/animations/cycle_out_in_anim.h new file mode 100644 index 000000000..2277f16a2 --- /dev/null +++ b/quantum/rgb_matrix/animations/cycle_out_in_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +RGB_MATRIX_EFFECT(CYCLE_OUT_IN) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV CYCLE_OUT_IN_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv.h = 3 * dist / 2 + time; + return hsv; +} + +bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN diff --git a/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h new file mode 100644 index 000000000..981c0afd0 --- /dev/null +++ b/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h @@ -0,0 +1,15 @@ +#ifdef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +RGB_MATRIX_EFFECT(CYCLE_OUT_IN_DUAL) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV CYCLE_OUT_IN_DUAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { + dx = (k_rgb_matrix_center.x / 2) - abs8(dx); + uint8_t dist = sqrt16(dx * dx + dy * dy); + hsv.h = 3 * dist + time; + return hsv; +} + +bool CYCLE_OUT_IN_DUAL(effect_params_t* params) { return effect_runner_dx_dy(params, &CYCLE_OUT_IN_DUAL_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL diff --git a/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h new file mode 100644 index 000000000..1a7db4a4c --- /dev/null +++ b/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +RGB_MATRIX_EFFECT(CYCLE_PINWHEEL) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV CYCLE_PINWHEEL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { + hsv.h = atan2_8(dy, dx) + time; + return hsv; +} + +bool CYCLE_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &CYCLE_PINWHEEL_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_PINWHEEL diff --git a/quantum/rgb_matrix/animations/cycle_spiral_anim.h b/quantum/rgb_matrix/animations/cycle_spiral_anim.h new file mode 100644 index 000000000..245cdc237 --- /dev/null +++ b/quantum/rgb_matrix/animations/cycle_spiral_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +RGB_MATRIX_EFFECT(CYCLE_SPIRAL) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV CYCLE_SPIRAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { + hsv.h = dist - time - atan2_8(dy, dx); + return hsv; +} + +bool CYCLE_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_SPIRAL_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_SPIRAL diff --git a/quantum/rgb_matrix/animations/cycle_up_down_anim.h b/quantum/rgb_matrix/animations/cycle_up_down_anim.h new file mode 100644 index 000000000..c9b5a5413 --- /dev/null +++ b/quantum/rgb_matrix/animations/cycle_up_down_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +RGB_MATRIX_EFFECT(CYCLE_UP_DOWN) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV CYCLE_UP_DOWN_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h = g_led_config.point[i].y - time; + return hsv; +} + +bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN diff --git a/quantum/rgb_matrix_animations/digital_rain_anim.h b/quantum/rgb_matrix/animations/digital_rain_anim.h similarity index 100% rename from quantum/rgb_matrix_animations/digital_rain_anim.h rename to quantum/rgb_matrix/animations/digital_rain_anim.h diff --git a/quantum/rgb_matrix/animations/dual_beacon_anim.h b/quantum/rgb_matrix/animations/dual_beacon_anim.h new file mode 100644 index 000000000..5c06080a2 --- /dev/null +++ b/quantum/rgb_matrix/animations/dual_beacon_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_DUAL_BEACON +RGB_MATRIX_EFFECT(DUAL_BEACON) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV DUAL_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { + hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin) / 128; + return hsv; +} + +bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_DUAL_BEACON diff --git a/quantum/rgb_matrix/animations/gradient_left_right_anim.h b/quantum/rgb_matrix/animations/gradient_left_right_anim.h new file mode 100644 index 000000000..b4f2752ff --- /dev/null +++ b/quantum/rgb_matrix/animations/gradient_left_right_anim.h @@ -0,0 +1,22 @@ +#ifdef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +RGB_MATRIX_EFFECT(GRADIENT_LEFT_RIGHT) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool GRADIENT_LEFT_RIGHT(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = rgb_matrix_config.hsv; + uint8_t scale = scale8(64, rgb_matrix_config.speed); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + // The x range will be 0..224, map this to 0..7 + // Relies on hue being 8-bit and wrapping + hsv.h = rgb_matrix_config.hsv.h + (scale * g_led_config.point[i].x >> 5); + RGB rgb = rgb_matrix_hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT diff --git a/quantum/rgb_matrix/animations/gradient_up_down_anim.h b/quantum/rgb_matrix/animations/gradient_up_down_anim.h new file mode 100644 index 000000000..3fd45cf99 --- /dev/null +++ b/quantum/rgb_matrix/animations/gradient_up_down_anim.h @@ -0,0 +1,22 @@ +#ifdef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +RGB_MATRIX_EFFECT(GRADIENT_UP_DOWN) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +bool GRADIENT_UP_DOWN(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + + HSV hsv = rgb_matrix_config.hsv; + uint8_t scale = scale8(64, rgb_matrix_config.speed); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + // The y range will be 0..64, map this to 0..4 + // Relies on hue being 8-bit and wrapping + hsv.h = rgb_matrix_config.hsv.h + scale * (g_led_config.point[i].y >> 4); + RGB rgb = rgb_matrix_hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/quantum/rgb_matrix/animations/hue_breathing_anim.h b/quantum/rgb_matrix/animations/hue_breathing_anim.h new file mode 100644 index 000000000..6d974b8c3 --- /dev/null +++ b/quantum/rgb_matrix/animations/hue_breathing_anim.h @@ -0,0 +1,22 @@ +#ifdef ENABLE_RGB_MATRIX_HUE_BREATHING +RGB_MATRIX_EFFECT(HUE_BREATHING) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +// Change huedelta to adjust range of hue change. 0-255. +// Hue Breathing - All LED's light up +bool HUE_BREATHING(effect_params_t* params) { + RGB_MATRIX_USE_LIMITS(led_min, led_max); + uint8_t huedelta = 12; + HSV hsv = rgb_matrix_config.hsv; + uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); + hsv.h = hsv.h + scale8(abs8(sin8(time) - 128) * 2, huedelta); + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = led_min; i < led_max; i++) { + RGB_MATRIX_TEST_LED_FLAGS(); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + return led_max < DRIVER_LED_TOTAL; +} + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_HUE_BREATHING diff --git a/quantum/rgb_matrix/animations/hue_pendulum_anim.h b/quantum/rgb_matrix/animations/hue_pendulum_anim.h new file mode 100644 index 000000000..a6e1c1074 --- /dev/null +++ b/quantum/rgb_matrix/animations/hue_pendulum_anim.h @@ -0,0 +1,17 @@ +#ifdef ENABLE_RGB_MATRIX_HUE_PENDULUM +RGB_MATRIX_EFFECT(HUE_PENDULUM) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +// Change huedelta to adjust range of hue change. 0-255. +// Looks better with a low value and slow speed for subtle change. +// Hue Pendulum - color changes in a wave to the right before reversing direction +static HSV HUE_PENDULUM_math(HSV hsv, uint8_t i, uint8_t time) { + uint8_t huedelta = 12; + hsv.h = hsv.h + scale8(abs8(sin8(time) + (g_led_config.point[i].x) - 128) * 2, huedelta); + return hsv; +} + +bool HUE_PENDULUM(effect_params_t* params) { return effect_runner_i(params, &HUE_PENDULUM_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_HUE_PENDULUM diff --git a/quantum/rgb_matrix/animations/hue_wave_anim.h b/quantum/rgb_matrix/animations/hue_wave_anim.h new file mode 100644 index 000000000..b1c72b733 --- /dev/null +++ b/quantum/rgb_matrix/animations/hue_wave_anim.h @@ -0,0 +1,17 @@ +#ifdef ENABLE_RGB_MATRIX_HUE_WAVE +RGB_MATRIX_EFFECT(HUE_WAVE) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +// Change huedelta to adjust range of hue change. 0-255. +// Looks better with a low value and slow speed for subtle change. +// Hue Wave - color changes in a wave to the right +static HSV HUE_WAVE_math(HSV hsv, uint8_t i, uint8_t time) { + uint8_t huedelta = 24; + hsv.h = hsv.h + scale8(abs8(g_led_config.point[i].x - time), huedelta); + return hsv; +} + +bool HUE_WAVE(effect_params_t* params) { return effect_runner_i(params, &HUE_WAVE_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_HUE_WAVE diff --git a/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h new file mode 100644 index 000000000..7d8eafffb --- /dev/null +++ b/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h @@ -0,0 +1,29 @@ +#ifdef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void jellybean_raindrops_set_color(int i, effect_params_t* params) { + if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; + HSV hsv = {rand() & 0xFF, qadd8(rand() & 0x7F, 0x80), rgb_matrix_config.hsv.v}; + RGB rgb = rgb_matrix_hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); +} + +bool JELLYBEAN_RAINDROPS(effect_params_t* params) { + if (!params->init) { + // Change one LED every tick, make sure speed is not 0 + if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) { + jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL, params); + } + return false; + } + + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (int i = led_min; i < led_max; i++) { + jellybean_raindrops_set_color(i, params); + } + return led_max < DRIVER_LED_TOTAL; +} + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS diff --git a/quantum/rgb_matrix/animations/rainbow_beacon_anim.h b/quantum/rgb_matrix/animations/rainbow_beacon_anim.h new file mode 100644 index 000000000..b54d997f6 --- /dev/null +++ b/quantum/rgb_matrix/animations/rainbow_beacon_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_RAINBOW_BEACON +RGB_MATRIX_EFFECT(RAINBOW_BEACON) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV RAINBOW_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { + hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 2 * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * 2 * sin) / 128; + return hsv; +} + +bool RAINBOW_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &RAINBOW_BEACON_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON diff --git a/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h new file mode 100644 index 000000000..50db92201 --- /dev/null +++ b/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +RGB_MATRIX_EFFECT(RAINBOW_MOVING_CHEVRON) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV RAINBOW_MOVING_CHEVRON_math(HSV hsv, uint8_t i, uint8_t time) { + hsv.h += abs8(g_led_config.point[i].y - k_rgb_matrix_center.y) + (g_led_config.point[i].x - time); + return hsv; +} + +bool RAINBOW_MOVING_CHEVRON(effect_params_t* params) { return effect_runner_i(params, &RAINBOW_MOVING_CHEVRON_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON diff --git a/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h new file mode 100644 index 000000000..3299f15df --- /dev/null +++ b/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h @@ -0,0 +1,13 @@ +#ifdef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +RGB_MATRIX_EFFECT(RAINBOW_PINWHEELS) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static HSV RAINBOW_PINWHEELS_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { + hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 3 * cos + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * 3 * sin) / 128; + return hsv; +} + +bool RAINBOW_PINWHEELS(effect_params_t* params) { return effect_runner_sin_cos_i(params, &RAINBOW_PINWHEELS_math); } + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS diff --git a/quantum/rgb_matrix/animations/raindrops_anim.h b/quantum/rgb_matrix/animations/raindrops_anim.h new file mode 100644 index 000000000..c01688e2c --- /dev/null +++ b/quantum/rgb_matrix/animations/raindrops_anim.h @@ -0,0 +1,39 @@ +#ifdef ENABLE_RGB_MATRIX_RAINDROPS +RGB_MATRIX_EFFECT(RAINDROPS) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static void raindrops_set_color(int i, effect_params_t* params) { + if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; + HSV hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v}; + + // Take the shortest path between hues + int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4; + if (deltaH > 127) { + deltaH -= 256; + } else if (deltaH < -127) { + deltaH += 256; + } + + hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03)); + RGB rgb = rgb_matrix_hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); +} + +bool RAINDROPS(effect_params_t* params) { + if (!params->init) { + // Change one LED every tick, make sure speed is not 0 + if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) { + raindrops_set_color(rand() % DRIVER_LED_TOTAL, params); + } + return false; + } + + RGB_MATRIX_USE_LIMITS(led_min, led_max); + for (int i = led_min; i < led_max; i++) { + raindrops_set_color(i, params); + } + return led_max < DRIVER_LED_TOTAL; +} + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // DISABLE_RGB_MATRIX_RAINDROPS diff --git a/quantum/rgb_matrix/animations/rgb_matrix_effects.inc b/quantum/rgb_matrix/animations/rgb_matrix_effects.inc new file mode 100644 index 000000000..302ad79c0 --- /dev/null +++ b/quantum/rgb_matrix/animations/rgb_matrix_effects.inc @@ -0,0 +1,37 @@ +// Add your new core rgb matrix effect here, order determines enum order +#include "solid_color_anim.h" +#include "alpha_mods_anim.h" +#include "gradient_up_down_anim.h" +#include "gradient_left_right_anim.h" +#include "breathing_anim.h" +#include "colorband_sat_anim.h" +#include "colorband_val_anim.h" +#include "colorband_pinwheel_sat_anim.h" +#include "colorband_pinwheel_val_anim.h" +#include "colorband_spiral_sat_anim.h" +#include "colorband_spiral_val_anim.h" +#include "cycle_all_anim.h" +#include "cycle_left_right_anim.h" +#include "cycle_up_down_anim.h" +#include "rainbow_moving_chevron_anim.h" +#include "cycle_out_in_anim.h" +#include "cycle_out_in_dual_anim.h" +#include "cycle_pinwheel_anim.h" +#include "cycle_spiral_anim.h" +#include "dual_beacon_anim.h" +#include "rainbow_beacon_anim.h" +#include "rainbow_pinwheels_anim.h" +#include "raindrops_anim.h" +#include "jellybean_raindrops_anim.h" +#include "hue_breathing_anim.h" +#include "hue_pendulum_anim.h" +#include "hue_wave_anim.h" +#include "typing_heatmap_anim.h" +#include "digital_rain_anim.h" +#include "solid_reactive_simple_anim.h" +#include "solid_reactive_anim.h" +#include "solid_reactive_wide.h" +#include "solid_reactive_cross.h" +#include "solid_reactive_nexus.h" +#include "splash_anim.h" +#include "solid_splash_anim.h" diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy.h b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h similarity index 100% rename from quantum/rgb_matrix_runners/effect_runner_dx_dy.h rename to quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h diff --git a/quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h similarity index 100% rename from quantum/rgb_matrix_runners/effect_runner_dx_dy_dist.h rename to quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h diff --git a/quantum/rgb_matrix_runners/effect_runner_i.h b/quantum/rgb_matrix/animations/runners/effect_runner_i.h similarity index 100% rename from quantum/rgb_matrix_runners/effect_runner_i.h rename to quantum/rgb_matrix/animations/runners/effect_runner_i.h diff --git a/quantum/rgb_matrix_runners/effect_runner_reactive.h b/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h similarity index 100% rename from quantum/rgb_matrix_runners/effect_runner_reactive.h rename to quantum/rgb_matrix/animations/runners/effect_runner_reactive.h diff --git a/quantum/rgb_matrix_runners/effect_runner_reactive_splash.h b/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h similarity index 100% rename from quantum/rgb_matrix_runners/effect_runner_reactive_splash.h rename to quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h diff --git a/quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h b/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h similarity index 100% rename from quantum/rgb_matrix_runners/effect_runner_sin_cos_i.h rename to quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h diff --git a/quantum/rgb_matrix/animations/runners/rgb_matrix_runners.inc b/quantum/rgb_matrix/animations/runners/rgb_matrix_runners.inc new file mode 100644 index 000000000..c09022bb0 --- /dev/null +++ b/quantum/rgb_matrix/animations/runners/rgb_matrix_runners.inc @@ -0,0 +1,6 @@ +#include "effect_runner_dx_dy_dist.h" +#include "effect_runner_dx_dy.h" +#include "effect_runner_i.h" +#include "effect_runner_sin_cos_i.h" +#include "effect_runner_reactive.h" +#include "effect_runner_reactive_splash.h" diff --git a/quantum/rgb_matrix_animations/solid_color_anim.h b/quantum/rgb_matrix/animations/solid_color_anim.h similarity index 100% rename from quantum/rgb_matrix_animations/solid_color_anim.h rename to quantum/rgb_matrix/animations/solid_color_anim.h diff --git a/quantum/rgb_matrix_animations/solid_reactive_anim.h b/quantum/rgb_matrix/animations/solid_reactive_anim.h similarity index 100% rename from quantum/rgb_matrix_animations/solid_reactive_anim.h rename to quantum/rgb_matrix/animations/solid_reactive_anim.h diff --git a/quantum/rgb_matrix_animations/solid_reactive_cross.h b/quantum/rgb_matrix/animations/solid_reactive_cross.h similarity index 100% rename from quantum/rgb_matrix_animations/solid_reactive_cross.h rename to quantum/rgb_matrix/animations/solid_reactive_cross.h diff --git a/quantum/rgb_matrix_animations/solid_reactive_nexus.h b/quantum/rgb_matrix/animations/solid_reactive_nexus.h similarity index 100% rename from quantum/rgb_matrix_animations/solid_reactive_nexus.h rename to quantum/rgb_matrix/animations/solid_reactive_nexus.h diff --git a/quantum/rgb_matrix_animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h similarity index 100% rename from quantum/rgb_matrix_animations/solid_reactive_simple_anim.h rename to quantum/rgb_matrix/animations/solid_reactive_simple_anim.h diff --git a/quantum/rgb_matrix_animations/solid_reactive_wide.h b/quantum/rgb_matrix/animations/solid_reactive_wide.h similarity index 100% rename from quantum/rgb_matrix_animations/solid_reactive_wide.h rename to quantum/rgb_matrix/animations/solid_reactive_wide.h diff --git a/quantum/rgb_matrix_animations/solid_splash_anim.h b/quantum/rgb_matrix/animations/solid_splash_anim.h similarity index 100% rename from quantum/rgb_matrix_animations/solid_splash_anim.h rename to quantum/rgb_matrix/animations/solid_splash_anim.h diff --git a/quantum/rgb_matrix_animations/splash_anim.h b/quantum/rgb_matrix/animations/splash_anim.h similarity index 100% rename from quantum/rgb_matrix_animations/splash_anim.h rename to quantum/rgb_matrix/animations/splash_anim.h diff --git a/quantum/rgb_matrix/animations/typing_heatmap_anim.h b/quantum/rgb_matrix/animations/typing_heatmap_anim.h new file mode 100644 index 000000000..28f040109 --- /dev/null +++ b/quantum/rgb_matrix/animations/typing_heatmap_anim.h @@ -0,0 +1,86 @@ +#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && defined(ENABLE_RGB_MATRIX_TYPING_HEATMAP) +RGB_MATRIX_EFFECT(TYPING_HEATMAP) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +# ifndef RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS +# define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 25 +# endif + +void process_rgb_matrix_typing_heatmap(uint8_t row, uint8_t col) { + uint8_t m_row = row - 1; + uint8_t p_row = row + 1; + uint8_t m_col = col - 1; + uint8_t p_col = col + 1; + + if (m_col < col) g_rgb_frame_buffer[row][m_col] = qadd8(g_rgb_frame_buffer[row][m_col], 16); + g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], 32); + if (p_col < MATRIX_COLS) g_rgb_frame_buffer[row][p_col] = qadd8(g_rgb_frame_buffer[row][p_col], 16); + + if (p_row < MATRIX_ROWS) { + if (m_col < col) g_rgb_frame_buffer[p_row][m_col] = qadd8(g_rgb_frame_buffer[p_row][m_col], 13); + g_rgb_frame_buffer[p_row][col] = qadd8(g_rgb_frame_buffer[p_row][col], 16); + if (p_col < MATRIX_COLS) g_rgb_frame_buffer[p_row][p_col] = qadd8(g_rgb_frame_buffer[p_row][p_col], 13); + } + + if (m_row < row) { + if (m_col < col) g_rgb_frame_buffer[m_row][m_col] = qadd8(g_rgb_frame_buffer[m_row][m_col], 13); + g_rgb_frame_buffer[m_row][col] = qadd8(g_rgb_frame_buffer[m_row][col], 16); + if (p_col < MATRIX_COLS) g_rgb_frame_buffer[m_row][p_col] = qadd8(g_rgb_frame_buffer[m_row][p_col], 13); + } +} + +// A timer to track the last time we decremented all heatmap values. +static uint16_t heatmap_decrease_timer; +// Whether we should decrement the heatmap values during the next update. +static bool decrease_heatmap_values; + +bool TYPING_HEATMAP(effect_params_t* params) { + // Modified version of RGB_MATRIX_USE_LIMITS to work off of matrix row / col size + uint8_t led_min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; + uint8_t led_max = led_min + RGB_MATRIX_LED_PROCESS_LIMIT; + if (led_max > sizeof(g_rgb_frame_buffer)) led_max = sizeof(g_rgb_frame_buffer); + + if (params->init) { + rgb_matrix_set_color_all(0, 0, 0); + memset(g_rgb_frame_buffer, 0, sizeof g_rgb_frame_buffer); + } + + // The heatmap animation might run in several iterations depending on + // `RGB_MATRIX_LED_PROCESS_LIMIT`, therefore we only want to update the + // timer when the animation starts. + if (params->iter == 0) { + decrease_heatmap_values = timer_elapsed(heatmap_decrease_timer) >= RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS; + + // Restart the timer if we are going to decrease the heatmap this frame. + if (decrease_heatmap_values) { + heatmap_decrease_timer = timer_read(); + } + } + + // Render heatmap & decrease + for (int i = led_min; i < led_max; i++) { + uint8_t row = i % MATRIX_ROWS; + uint8_t col = i / MATRIX_ROWS; + uint8_t val = g_rgb_frame_buffer[row][col]; + + // set the pixel colour + uint8_t led[LED_HITS_TO_REMEMBER]; + uint8_t led_count = rgb_matrix_map_row_column_to_led(row, col, led); + for (uint8_t j = 0; j < led_count; ++j) { + if (!HAS_ANY_FLAGS(g_led_config.flags[led[j]], params->flags)) continue; + + HSV hsv = {170 - qsub8(val, 85), rgb_matrix_config.hsv.s, scale8((qadd8(170, val) - 170) * 3, rgb_matrix_config.hsv.v)}; + RGB rgb = rgb_matrix_hsv_to_rgb(hsv); + rgb_matrix_set_color(led[j], rgb.r, rgb.g, rgb.b); + } + + if (decrease_heatmap_values) { + g_rgb_frame_buffer[row][col] = qsub8(val, 1); + } + } + + return led_max < sizeof(g_rgb_frame_buffer); +} + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c new file mode 100644 index 000000000..8f00b4087 --- /dev/null +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -0,0 +1,641 @@ +/* Copyright 2017 Jason Williams + * Copyright 2017 Jack Humbert + * Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "rgb_matrix.h" +#include "progmem.h" +#include "config.h" +#include "eeprom.h" +#include +#include + +#include + +#ifndef RGB_MATRIX_CENTER +const led_point_t k_rgb_matrix_center = {112, 32}; +#else +const led_point_t k_rgb_matrix_center = RGB_MATRIX_CENTER; +#endif + +// clang-format off +#ifndef RGB_MATRIX_IMMEDIATE_EEPROM +# define rgb_eeconfig_update(v) rgb_update_eeprom |= v +#else +# define rgb_eeconfig_update(v) if (v) eeconfig_update_rgb_matrix() +#endif +// clang-format on + +__attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); } + +// Generic effect runners +#include "rgb_matrix_runners.inc" + +// ------------------------------------------ +// -----Begin rgb effect includes macros----- +#define RGB_MATRIX_EFFECT(name) +#define RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +#include "rgb_matrix_effects.inc" +#ifdef RGB_MATRIX_CUSTOM_KB +# include "rgb_matrix_kb.inc" +#endif +#ifdef RGB_MATRIX_CUSTOM_USER +# include "rgb_matrix_user.inc" +#endif + +#undef RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#undef RGB_MATRIX_EFFECT +// -----End rgb effect includes macros------- +// ------------------------------------------ + +#if defined(RGB_DISABLE_AFTER_TIMEOUT) && !defined(RGB_DISABLE_TIMEOUT) +# define RGB_DISABLE_TIMEOUT (RGB_DISABLE_AFTER_TIMEOUT * 1200UL) +#endif + +#ifndef RGB_DISABLE_TIMEOUT +# define RGB_DISABLE_TIMEOUT 0 +#endif + +#if !defined(RGB_MATRIX_MAXIMUM_BRIGHTNESS) || RGB_MATRIX_MAXIMUM_BRIGHTNESS > UINT8_MAX +# undef RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS UINT8_MAX +#endif + +#if !defined(RGB_MATRIX_HUE_STEP) +# define RGB_MATRIX_HUE_STEP 8 +#endif + +#if !defined(RGB_MATRIX_SAT_STEP) +# define RGB_MATRIX_SAT_STEP 16 +#endif + +#if !defined(RGB_MATRIX_VAL_STEP) +# define RGB_MATRIX_VAL_STEP 16 +#endif + +#if !defined(RGB_MATRIX_SPD_STEP) +# define RGB_MATRIX_SPD_STEP 16 +#endif + +#if !defined(RGB_MATRIX_STARTUP_MODE) +# ifdef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT +# else +// fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR +# endif +#endif + +#if !defined(RGB_MATRIX_STARTUP_HUE) +# define RGB_MATRIX_STARTUP_HUE 0 +#endif + +#if !defined(RGB_MATRIX_STARTUP_SAT) +# define RGB_MATRIX_STARTUP_SAT UINT8_MAX +#endif + +#if !defined(RGB_MATRIX_STARTUP_VAL) +# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS +#endif + +#if !defined(RGB_MATRIX_STARTUP_SPD) +# define RGB_MATRIX_STARTUP_SPD UINT8_MAX / 2 +#endif + +// globals +rgb_config_t rgb_matrix_config; // TODO: would like to prefix this with g_ for global consistancy, do this in another pr +uint32_t g_rgb_timer; +#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS +uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}}; +#endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +last_hit_t g_last_hit_tracker; +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + +// internals +static bool suspend_state = false; +static bool rgb_update_eeprom = false; +static uint8_t rgb_last_enable = UINT8_MAX; +static uint8_t rgb_last_effect = UINT8_MAX; +static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false}; +static rgb_task_states rgb_task_state = SYNCING; +#if RGB_DISABLE_TIMEOUT > 0 +static uint32_t rgb_anykey_timer; +#endif // RGB_DISABLE_TIMEOUT > 0 + +// double buffers +static uint32_t rgb_timer_buffer; +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +static last_hit_t last_hit_buffer; +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + +// split rgb matrix +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) +const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT; +#endif + +void eeconfig_read_rgb_matrix(void) { eeprom_read_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); } + +void eeconfig_update_rgb_matrix(void) { eeprom_update_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); } + +void eeconfig_update_rgb_matrix_default(void) { + dprintf("eeconfig_update_rgb_matrix_default\n"); + rgb_matrix_config.enable = 1; + rgb_matrix_config.mode = RGB_MATRIX_STARTUP_MODE; + rgb_matrix_config.hsv = (HSV){RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL}; + rgb_matrix_config.speed = RGB_MATRIX_STARTUP_SPD; + rgb_matrix_config.flags = LED_FLAG_ALL; + eeconfig_update_rgb_matrix(); +} + +void eeconfig_debug_rgb_matrix(void) { + dprintf("rgb_matrix_config EEPROM\n"); + dprintf("rgb_matrix_config.enable = %d\n", rgb_matrix_config.enable); + dprintf("rgb_matrix_config.mode = %d\n", rgb_matrix_config.mode); + dprintf("rgb_matrix_config.hsv.h = %d\n", rgb_matrix_config.hsv.h); + dprintf("rgb_matrix_config.hsv.s = %d\n", rgb_matrix_config.hsv.s); + dprintf("rgb_matrix_config.hsv.v = %d\n", rgb_matrix_config.hsv.v); + dprintf("rgb_matrix_config.speed = %d\n", rgb_matrix_config.speed); + dprintf("rgb_matrix_config.flags = %d\n", rgb_matrix_config.flags); +} + +__attribute__((weak)) uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) { return 0; } + +uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) { + uint8_t led_count = rgb_matrix_map_row_column_to_led_kb(row, column, led_i); + uint8_t led_index = g_led_config.matrix_co[row][column]; + if (led_index != NO_LED) { + led_i[led_count] = led_index; + led_count++; + } + return led_count; +} + +void rgb_matrix_update_pwm_buffers(void) { rgb_matrix_driver.flush(); } + +void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) + if (!is_keyboard_left() && index >= k_rgb_matrix_split[0]) + rgb_matrix_driver.set_color(index - k_rgb_matrix_split[0], red, green, blue); + else if (is_keyboard_left() && index < k_rgb_matrix_split[0]) +#endif + rgb_matrix_driver.set_color(index, red, green, blue); +} + +void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) rgb_matrix_set_color(i, red, green, blue); +#else + rgb_matrix_driver.set_color_all(red, green, blue); +#endif +} + +void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed) { +#ifndef RGB_MATRIX_SPLIT + if (!is_keyboard_master()) return; +#endif +#if RGB_DISABLE_TIMEOUT > 0 + rgb_anykey_timer = 0; +#endif // RGB_DISABLE_TIMEOUT > 0 + +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + uint8_t led[LED_HITS_TO_REMEMBER]; + uint8_t led_count = 0; + +# if defined(RGB_MATRIX_KEYRELEASES) + if (!pressed) +# elif defined(RGB_MATRIX_KEYPRESSES) + if (pressed) +# endif // defined(RGB_MATRIX_KEYRELEASES) + { + led_count = rgb_matrix_map_row_column_to_led(row, col, led); + } + + if (last_hit_buffer.count + led_count > LED_HITS_TO_REMEMBER) { + memcpy(&last_hit_buffer.x[0], &last_hit_buffer.x[led_count], LED_HITS_TO_REMEMBER - led_count); + memcpy(&last_hit_buffer.y[0], &last_hit_buffer.y[led_count], LED_HITS_TO_REMEMBER - led_count); + memcpy(&last_hit_buffer.tick[0], &last_hit_buffer.tick[led_count], (LED_HITS_TO_REMEMBER - led_count) * 2); // 16 bit + memcpy(&last_hit_buffer.index[0], &last_hit_buffer.index[led_count], LED_HITS_TO_REMEMBER - led_count); + last_hit_buffer.count = LED_HITS_TO_REMEMBER - led_count; + } + + for (uint8_t i = 0; i < led_count; i++) { + uint8_t index = last_hit_buffer.count; + last_hit_buffer.x[index] = g_led_config.point[led[i]].x; + last_hit_buffer.y[index] = g_led_config.point[led[i]].y; + last_hit_buffer.index[index] = led[i]; + last_hit_buffer.tick[index] = 0; + last_hit_buffer.count++; + } +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + +#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && defined(ENABLE_RGB_MATRIX_TYPING_HEATMAP) + if (rgb_matrix_config.mode == RGB_MATRIX_TYPING_HEATMAP) { + process_rgb_matrix_typing_heatmap(row, col); + } +#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && defined(ENABLE_RGB_MATRIX_TYPING_HEATMAP) +} + +void rgb_matrix_test(void) { + // Mask out bits 4 and 5 + // Increase the factor to make the test animation slower (and reduce to make it faster) + uint8_t factor = 10; + switch ((g_rgb_timer & (0b11 << factor)) >> factor) { + case 0: { + rgb_matrix_set_color_all(20, 0, 0); + break; + } + case 1: { + rgb_matrix_set_color_all(0, 20, 0); + break; + } + case 2: { + rgb_matrix_set_color_all(0, 0, 20); + break; + } + case 3: { + rgb_matrix_set_color_all(20, 20, 20); + break; + } + } +} + +static bool rgb_matrix_none(effect_params_t *params) { + if (!params->init) { + return false; + } + + rgb_matrix_set_color_all(0, 0, 0); + return false; +} + +static void rgb_task_timers(void) { +#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_DISABLE_TIMEOUT > 0 + uint32_t deltaTime = sync_timer_elapsed32(rgb_timer_buffer); +#endif // defined(RGB_MATRIX_KEYREACTIVE_ENABLED) || RGB_DISABLE_TIMEOUT > 0 + rgb_timer_buffer = sync_timer_read32(); + + // Update double buffer timers +#if RGB_DISABLE_TIMEOUT > 0 + if (rgb_anykey_timer < UINT32_MAX) { + if (UINT32_MAX - deltaTime < rgb_anykey_timer) { + rgb_anykey_timer = UINT32_MAX; + } else { + rgb_anykey_timer += deltaTime; + } + } +#endif // RGB_DISABLE_TIMEOUT > 0 + + // Update double buffer last hit timers +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + uint8_t count = last_hit_buffer.count; + for (uint8_t i = 0; i < count; ++i) { + if (UINT16_MAX - deltaTime < last_hit_buffer.tick[i]) { + last_hit_buffer.count--; + continue; + } + last_hit_buffer.tick[i] += deltaTime; + } +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED +} + +static void rgb_task_sync(void) { + // next task + if (rgb_update_eeprom) eeconfig_update_rgb_matrix(); + rgb_update_eeprom = false; + if (sync_timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING; +} + +static void rgb_task_start(void) { + // reset iter + rgb_effect_params.iter = 0; + + // update double buffers + g_rgb_timer = rgb_timer_buffer; +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + g_last_hit_tracker = last_hit_buffer; +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + + // next task + rgb_task_state = RENDERING; +} + +static void rgb_task_render(uint8_t effect) { + bool rendering = false; + rgb_effect_params.init = (effect != rgb_last_effect) || (rgb_matrix_config.enable != rgb_last_enable); + if (rgb_effect_params.flags != rgb_matrix_config.flags) { + rgb_effect_params.flags = rgb_matrix_config.flags; + rgb_matrix_set_color_all(0, 0, 0); + } + + // each effect can opt to do calculations + // and/or request PWM buffer updates. + switch (effect) { + case RGB_MATRIX_NONE: + rendering = rgb_matrix_none(&rgb_effect_params); + break; + +// --------------------------------------------- +// -----Begin rgb effect switch case macros----- +#define RGB_MATRIX_EFFECT(name, ...) \ + case RGB_MATRIX_##name: \ + rendering = name(&rgb_effect_params); \ + break; +#include "rgb_matrix_effects.inc" +#undef RGB_MATRIX_EFFECT + +#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER) +# define RGB_MATRIX_EFFECT(name, ...) \ + case RGB_MATRIX_CUSTOM_##name: \ + rendering = name(&rgb_effect_params); \ + break; +# ifdef RGB_MATRIX_CUSTOM_KB +# include "rgb_matrix_kb.inc" +# endif +# ifdef RGB_MATRIX_CUSTOM_USER +# include "rgb_matrix_user.inc" +# endif +# undef RGB_MATRIX_EFFECT +#endif + // -----End rgb effect switch case macros------- + // --------------------------------------------- + + // Factory default magic value + case UINT8_MAX: { + rgb_matrix_test(); + rgb_task_state = FLUSHING; + } + return; + } + + rgb_effect_params.iter++; + + // next task + if (!rendering) { + rgb_task_state = FLUSHING; + if (!rgb_effect_params.init && effect == RGB_MATRIX_NONE) { + // We only need to flush once if we are RGB_MATRIX_NONE + rgb_task_state = SYNCING; + } + } +} + +static void rgb_task_flush(uint8_t effect) { + // update last trackers after the first full render so we can init over several frames + rgb_last_effect = effect; + rgb_last_enable = rgb_matrix_config.enable; + + // update pwm buffers + rgb_matrix_update_pwm_buffers(); + + // next task + rgb_task_state = SYNCING; +} + +void rgb_matrix_task(void) { + rgb_task_timers(); + + // Ideally we would also stop sending zeros to the LED driver PWM buffers + // while suspended and just do a software shutdown. This is a cheap hack for now. + bool suspend_backlight = suspend_state || +#if RGB_DISABLE_TIMEOUT > 0 + (rgb_anykey_timer > (uint32_t)RGB_DISABLE_TIMEOUT) || +#endif // RGB_DISABLE_TIMEOUT > 0 + false; + + uint8_t effect = suspend_backlight || !rgb_matrix_config.enable ? 0 : rgb_matrix_config.mode; + + switch (rgb_task_state) { + case STARTING: + rgb_task_start(); + break; + case RENDERING: + rgb_task_render(effect); + if (effect) { + rgb_matrix_indicators(); + rgb_matrix_indicators_advanced(&rgb_effect_params); + } + break; + case FLUSHING: + rgb_task_flush(effect); + break; + case SYNCING: + rgb_task_sync(); + break; + } +} + +void rgb_matrix_indicators(void) { + rgb_matrix_indicators_kb(); + rgb_matrix_indicators_user(); +} + +__attribute__((weak)) void rgb_matrix_indicators_kb(void) {} + +__attribute__((weak)) void rgb_matrix_indicators_user(void) {} + +void rgb_matrix_indicators_advanced(effect_params_t *params) { + /* special handling is needed for "params->iter", since it's already been incremented. + * Could move the invocations to rgb_task_render, but then it's missing a few checks + * and not sure which would be better. Otherwise, this should be called from + * rgb_task_render, right before the iter++ line. + */ +#if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL + uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * (params->iter - 1); + uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT; + if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; +#else + uint8_t min = 0; + uint8_t max = DRIVER_LED_TOTAL; +#endif + rgb_matrix_indicators_advanced_kb(min, max); + rgb_matrix_indicators_advanced_user(min, max); +} + +__attribute__((weak)) void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) {} + +__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {} + +void rgb_matrix_init(void) { + rgb_matrix_driver.init(); + +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED + g_last_hit_tracker.count = 0; + for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) { + g_last_hit_tracker.tick[i] = UINT16_MAX; + } + + last_hit_buffer.count = 0; + for (uint8_t i = 0; i < LED_HITS_TO_REMEMBER; ++i) { + last_hit_buffer.tick[i] = UINT16_MAX; + } +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED + + if (!eeconfig_is_enabled()) { + dprintf("rgb_matrix_init_drivers eeconfig is not enabled.\n"); + eeconfig_init(); + eeconfig_update_rgb_matrix_default(); + } + + eeconfig_read_rgb_matrix(); + if (!rgb_matrix_config.mode) { + dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n"); + eeconfig_update_rgb_matrix_default(); + } + eeconfig_debug_rgb_matrix(); // display current eeprom values +} + +void rgb_matrix_set_suspend_state(bool state) { +#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED + if (state && !suspend_state) { // only run if turning off, and only once + rgb_task_render(0); // turn off all LEDs when suspending + rgb_task_flush(0); // and actually flash led state to LEDs + } + suspend_state = state; +#endif +} + +bool rgb_matrix_get_suspend_state(void) { return suspend_state; } + +void rgb_matrix_toggle_eeprom_helper(bool write_to_eeprom) { + rgb_matrix_config.enable ^= 1; + rgb_task_state = STARTING; + rgb_eeconfig_update(write_to_eeprom); + dprintf("rgb matrix toggle [%s]: rgb_matrix_config.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.enable); +} +void rgb_matrix_toggle_noeeprom(void) { rgb_matrix_toggle_eeprom_helper(false); } +void rgb_matrix_toggle(void) { rgb_matrix_toggle_eeprom_helper(true); } + +void rgb_matrix_enable(void) { + rgb_matrix_enable_noeeprom(); + rgb_eeconfig_update(true); +} + +void rgb_matrix_enable_noeeprom(void) { + if (!rgb_matrix_config.enable) rgb_task_state = STARTING; + rgb_matrix_config.enable = 1; +} + +void rgb_matrix_disable(void) { + rgb_matrix_disable_noeeprom(); + rgb_eeconfig_update(true); +} + +void rgb_matrix_disable_noeeprom(void) { + if (rgb_matrix_config.enable) rgb_task_state = STARTING; + rgb_matrix_config.enable = 0; +} + +uint8_t rgb_matrix_is_enabled(void) { return rgb_matrix_config.enable; } + +void rgb_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { + if (!rgb_matrix_config.enable) { + return; + } + if (mode < 1) { + rgb_matrix_config.mode = 1; + } else if (mode >= RGB_MATRIX_EFFECT_MAX) { + rgb_matrix_config.mode = RGB_MATRIX_EFFECT_MAX - 1; + } else { + rgb_matrix_config.mode = mode; + } + rgb_task_state = STARTING; + rgb_eeconfig_update(write_to_eeprom); + dprintf("rgb matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.mode); +} +void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, false); } +void rgb_matrix_mode(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, true); } + +uint8_t rgb_matrix_get_mode(void) { return rgb_matrix_config.mode; } + +void rgb_matrix_step_helper(bool write_to_eeprom) { + uint8_t mode = rgb_matrix_config.mode + 1; + rgb_matrix_mode_eeprom_helper((mode < RGB_MATRIX_EFFECT_MAX) ? mode : 1, write_to_eeprom); +} +void rgb_matrix_step_noeeprom(void) { rgb_matrix_step_helper(false); } +void rgb_matrix_step(void) { rgb_matrix_step_helper(true); } + +void rgb_matrix_step_reverse_helper(bool write_to_eeprom) { + uint8_t mode = rgb_matrix_config.mode - 1; + rgb_matrix_mode_eeprom_helper((mode < 1) ? RGB_MATRIX_EFFECT_MAX - 1 : mode, write_to_eeprom); +} +void rgb_matrix_step_reverse_noeeprom(void) { rgb_matrix_step_reverse_helper(false); } +void rgb_matrix_step_reverse(void) { rgb_matrix_step_reverse_helper(true); } + +void rgb_matrix_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) { + if (!rgb_matrix_config.enable) { + return; + } + rgb_matrix_config.hsv.h = hue; + rgb_matrix_config.hsv.s = sat; + rgb_matrix_config.hsv.v = (val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) ? RGB_MATRIX_MAXIMUM_BRIGHTNESS : val; + rgb_eeconfig_update(write_to_eeprom); + dprintf("rgb matrix set hsv [%s]: %u,%u,%u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v); +} +void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, false); } +void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, true); } + +HSV rgb_matrix_get_hsv(void) { return rgb_matrix_config.hsv; } +uint8_t rgb_matrix_get_hue(void) { return rgb_matrix_config.hsv.h; } +uint8_t rgb_matrix_get_sat(void) { return rgb_matrix_config.hsv.s; } +uint8_t rgb_matrix_get_val(void) { return rgb_matrix_config.hsv.v; } + +void rgb_matrix_increase_hue_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h + RGB_MATRIX_HUE_STEP, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, write_to_eeprom); } +void rgb_matrix_increase_hue_noeeprom(void) { rgb_matrix_increase_hue_helper(false); } +void rgb_matrix_increase_hue(void) { rgb_matrix_increase_hue_helper(true); } + +void rgb_matrix_decrease_hue_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h - RGB_MATRIX_HUE_STEP, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v, write_to_eeprom); } +void rgb_matrix_decrease_hue_noeeprom(void) { rgb_matrix_decrease_hue_helper(false); } +void rgb_matrix_decrease_hue(void) { rgb_matrix_decrease_hue_helper(true); } + +void rgb_matrix_increase_sat_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, qadd8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP), rgb_matrix_config.hsv.v, write_to_eeprom); } +void rgb_matrix_increase_sat_noeeprom(void) { rgb_matrix_increase_sat_helper(false); } +void rgb_matrix_increase_sat(void) { rgb_matrix_increase_sat_helper(true); } + +void rgb_matrix_decrease_sat_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, qsub8(rgb_matrix_config.hsv.s, RGB_MATRIX_SAT_STEP), rgb_matrix_config.hsv.v, write_to_eeprom); } +void rgb_matrix_decrease_sat_noeeprom(void) { rgb_matrix_decrease_sat_helper(false); } +void rgb_matrix_decrease_sat(void) { rgb_matrix_decrease_sat_helper(true); } + +void rgb_matrix_increase_val_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, qadd8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP), write_to_eeprom); } +void rgb_matrix_increase_val_noeeprom(void) { rgb_matrix_increase_val_helper(false); } +void rgb_matrix_increase_val(void) { rgb_matrix_increase_val_helper(true); } + +void rgb_matrix_decrease_val_helper(bool write_to_eeprom) { rgb_matrix_sethsv_eeprom_helper(rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, qsub8(rgb_matrix_config.hsv.v, RGB_MATRIX_VAL_STEP), write_to_eeprom); } +void rgb_matrix_decrease_val_noeeprom(void) { rgb_matrix_decrease_val_helper(false); } +void rgb_matrix_decrease_val(void) { rgb_matrix_decrease_val_helper(true); } + +void rgb_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { + rgb_matrix_config.speed = speed; + rgb_eeconfig_update(write_to_eeprom); + dprintf("rgb matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.speed); +} +void rgb_matrix_set_speed_noeeprom(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, false); } +void rgb_matrix_set_speed(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, true); } + +uint8_t rgb_matrix_get_speed(void) { return rgb_matrix_config.speed; } + +void rgb_matrix_increase_speed_helper(bool write_to_eeprom) { rgb_matrix_set_speed_eeprom_helper(qadd8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP), write_to_eeprom); } +void rgb_matrix_increase_speed_noeeprom(void) { rgb_matrix_increase_speed_helper(false); } +void rgb_matrix_increase_speed(void) { rgb_matrix_increase_speed_helper(true); } + +void rgb_matrix_decrease_speed_helper(bool write_to_eeprom) { rgb_matrix_set_speed_eeprom_helper(qsub8(rgb_matrix_config.speed, RGB_MATRIX_SPD_STEP), write_to_eeprom); } +void rgb_matrix_decrease_speed_noeeprom(void) { rgb_matrix_decrease_speed_helper(false); } +void rgb_matrix_decrease_speed(void) { rgb_matrix_decrease_speed_helper(true); } + +led_flags_t rgb_matrix_get_flags(void) { return rgb_matrix_config.flags; } + +void rgb_matrix_set_flags(led_flags_t flags) { rgb_matrix_config.flags = flags; } diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h new file mode 100644 index 000000000..f53e011c1 --- /dev/null +++ b/quantum/rgb_matrix/rgb_matrix.h @@ -0,0 +1,228 @@ +/* Copyright 2017 Jason Williams + * Copyright 2017 Jack Humbert + * Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include +#include +#include "rgb_matrix_types.h" +#include "color.h" +#include "quantum.h" +#include "rgb_matrix_legacy_enables.h" + +#ifdef IS31FL3731 +# include "is31fl3731.h" +#elif defined(IS31FL3733) +# include "is31fl3733.h" +#elif defined(IS31FL3737) +# include "is31fl3737.h" +#elif defined(IS31FL3741) +# include "is31fl3741.h" +#elif defined(AW20216) +# include "aw20216.h" +#elif defined(WS2812) +# include "ws2812.h" +#endif + +#ifndef RGB_MATRIX_LED_FLUSH_LIMIT +# define RGB_MATRIX_LED_FLUSH_LIMIT 16 +#endif + +#ifndef RGB_MATRIX_LED_PROCESS_LIMIT +# define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 +#endif + +#if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL +# define RGB_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; \ + uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT; \ + if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; +#else +# define RGB_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = 0; \ + uint8_t max = DRIVER_LED_TOTAL; +#endif + +#define RGB_MATRIX_INDICATOR_SET_COLOR(i, r, g, b) \ + if (i >= led_min && i <= led_max) { \ + rgb_matrix_set_color(i, r, g, b); \ + } + +#define RGB_MATRIX_TEST_LED_FLAGS() \ + if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue + +enum rgb_matrix_effects { + RGB_MATRIX_NONE = 0, + +// -------------------------------------- +// -----Begin rgb effect enum macros----- +#define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_##name, +#include "rgb_matrix_effects.inc" +#undef RGB_MATRIX_EFFECT + +#if defined(RGB_MATRIX_CUSTOM_KB) || defined(RGB_MATRIX_CUSTOM_USER) +# define RGB_MATRIX_EFFECT(name, ...) RGB_MATRIX_CUSTOM_##name, +# ifdef RGB_MATRIX_CUSTOM_KB +# include "rgb_matrix_kb.inc" +# endif +# ifdef RGB_MATRIX_CUSTOM_USER +# include "rgb_matrix_user.inc" +# endif +# undef RGB_MATRIX_EFFECT +#endif + // -------------------------------------- + // -----End rgb effect enum macros------- + + RGB_MATRIX_EFFECT_MAX +}; + +void eeconfig_update_rgb_matrix_default(void); +void eeconfig_update_rgb_matrix(void); + +uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i); +uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i); + +void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); + +void process_rgb_matrix(uint8_t row, uint8_t col, bool pressed); + +void rgb_matrix_task(void); + +// This runs after another backlight effect and replaces +// colors already set +void rgb_matrix_indicators(void); +void rgb_matrix_indicators_kb(void); +void rgb_matrix_indicators_user(void); + +void rgb_matrix_indicators_advanced(effect_params_t *params); +void rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max); +void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max); + +void rgb_matrix_init(void); + +void rgb_matrix_set_suspend_state(bool state); +bool rgb_matrix_get_suspend_state(void); +void rgb_matrix_toggle(void); +void rgb_matrix_toggle_noeeprom(void); +void rgb_matrix_enable(void); +void rgb_matrix_enable_noeeprom(void); +void rgb_matrix_disable(void); +void rgb_matrix_disable_noeeprom(void); +uint8_t rgb_matrix_is_enabled(void); +void rgb_matrix_mode(uint8_t mode); +void rgb_matrix_mode_noeeprom(uint8_t mode); +uint8_t rgb_matrix_get_mode(void); +void rgb_matrix_step(void); +void rgb_matrix_step_noeeprom(void); +void rgb_matrix_step_reverse(void); +void rgb_matrix_step_reverse_noeeprom(void); +void rgb_matrix_sethsv(uint16_t hue, uint8_t sat, uint8_t val); +void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); +HSV rgb_matrix_get_hsv(void); +uint8_t rgb_matrix_get_hue(void); +uint8_t rgb_matrix_get_sat(void); +uint8_t rgb_matrix_get_val(void); +void rgb_matrix_increase_hue(void); +void rgb_matrix_increase_hue_noeeprom(void); +void rgb_matrix_decrease_hue(void); +void rgb_matrix_decrease_hue_noeeprom(void); +void rgb_matrix_increase_sat(void); +void rgb_matrix_increase_sat_noeeprom(void); +void rgb_matrix_decrease_sat(void); +void rgb_matrix_decrease_sat_noeeprom(void); +void rgb_matrix_increase_val(void); +void rgb_matrix_increase_val_noeeprom(void); +void rgb_matrix_decrease_val(void); +void rgb_matrix_decrease_val_noeeprom(void); +void rgb_matrix_set_speed(uint8_t speed); +void rgb_matrix_set_speed_noeeprom(uint8_t speed); +uint8_t rgb_matrix_get_speed(void); +void rgb_matrix_increase_speed(void); +void rgb_matrix_increase_speed_noeeprom(void); +void rgb_matrix_decrease_speed(void); +void rgb_matrix_decrease_speed_noeeprom(void); +led_flags_t rgb_matrix_get_flags(void); +void rgb_matrix_set_flags(led_flags_t flags); + +#ifndef RGBLIGHT_ENABLE +# define eeconfig_update_rgblight_current eeconfig_update_rgb_matrix +# define rgblight_toggle rgb_matrix_toggle +# define rgblight_toggle_noeeprom rgb_matrix_toggle_noeeprom +# define rgblight_enable rgb_matrix_enable +# define rgblight_enable_noeeprom rgb_matrix_enable_noeeprom +# define rgblight_disable rgb_matrix_disable +# define rgblight_disable_noeeprom rgb_matrix_disable_noeeprom +# define rgblight_is_enabled rgb_matrix_is_enabled +# define rgblight_mode rgb_matrix_mode +# define rgblight_mode_noeeprom rgb_matrix_mode_noeeprom +# define rgblight_get_mode rgb_matrix_get_mode +# define rgblight_get_hue rgb_matrix_get_hue +# define rgblight_get_sat rgb_matrix_get_sat +# define rgblight_get_val rgb_matrix_get_val +# define rgblight_get_hsv rgb_matrix_get_hsv +# define rgblight_step rgb_matrix_step +# define rgblight_step_noeeprom rgb_matrix_step_noeeprom +# define rgblight_step_reverse rgb_matrix_step_reverse +# define rgblight_step_reverse_noeeprom rgb_matrix_step_reverse_noeeprom +# define rgblight_sethsv rgb_matrix_sethsv +# define rgblight_sethsv_noeeprom rgb_matrix_sethsv_noeeprom +# define rgblight_increase_hue rgb_matrix_increase_hue +# define rgblight_increase_hue_noeeprom rgb_matrix_increase_hue_noeeprom +# define rgblight_decrease_hue rgb_matrix_decrease_hue +# define rgblight_decrease_hue_noeeprom rgb_matrix_decrease_hue_noeeprom +# define rgblight_increase_sat rgb_matrix_increase_sat +# define rgblight_increase_sat_noeeprom rgb_matrix_increase_sat_noeeprom +# define rgblight_decrease_sat rgb_matrix_decrease_sat +# define rgblight_decrease_sat_noeeprom rgb_matrix_decrease_sat_noeeprom +# define rgblight_increase_val rgb_matrix_increase_val +# define rgblight_increase_val_noeeprom rgb_matrix_increase_val_noeeprom +# define rgblight_decrease_val rgb_matrix_decrease_val +# define rgblight_decrease_val_noeeprom rgb_matrix_decrease_val_noeeprom +# define rgblight_set_speed rgb_matrix_set_speed +# define rgblight_set_speed_noeeprom rgb_matrix_set_speed_noeeprom +# define rgblight_get_speed rgb_matrix_get_speed +# define rgblight_increase_speed rgb_matrix_increase_speed +# define rgblight_increase_speed_noeeprom rgb_matrix_increase_speed_noeeprom +# define rgblight_decrease_speed rgb_matrix_decrease_speed +# define rgblight_decrease_speed_noeeprom rgb_matrix_decrease_speed_noeeprom +#endif + +typedef struct { + /* Perform any initialisation required for the other driver functions to work. */ + void (*init)(void); + /* Set the colour of a single LED in the buffer. */ + void (*set_color)(int index, uint8_t r, uint8_t g, uint8_t b); + /* Set the colour of all LEDS on the keyboard in the buffer. */ + void (*set_color_all)(uint8_t r, uint8_t g, uint8_t b); + /* Flush any buffered changes to the hardware. */ + void (*flush)(void); +} rgb_matrix_driver_t; + +extern const rgb_matrix_driver_t rgb_matrix_driver; + +extern rgb_config_t rgb_matrix_config; + +extern uint32_t g_rgb_timer; +extern led_config_t g_led_config; +#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED +extern last_hit_t g_last_hit_tracker; +#endif +#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS +extern uint8_t g_rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS]; +#endif diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c new file mode 100644 index 000000000..bfaedaa4a --- /dev/null +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -0,0 +1,247 @@ +/* Copyright 2018 James Laird-Wah + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "rgb_matrix.h" + +/* Each driver needs to define the struct + * const rgb_matrix_driver_t rgb_matrix_driver; + * All members must be provided. + * Keyboard custom drivers can define this in their own files, it should only + * be here if shared between boards. + */ + +#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741) + +# include "i2c_master.h" + +static void init(void) { + i2c_init(); +# ifdef IS31FL3731 + IS31FL3731_init(DRIVER_ADDR_1); +# ifdef DRIVER_ADDR_2 + IS31FL3731_init(DRIVER_ADDR_2); +# endif +# ifdef DRIVER_ADDR_3 + IS31FL3731_init(DRIVER_ADDR_3); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3731_init(DRIVER_ADDR_4); +# endif +# elif defined(IS31FL3733) +# ifndef DRIVER_SYNC_1 +# define DRIVER_SYNC_1 0 +# endif + IS31FL3733_init(DRIVER_ADDR_1, DRIVER_SYNC_1); +# if defined DRIVER_ADDR_2 && (DRIVER_ADDR_1 != DRIVER_ADDR_2) +# ifndef DRIVER_SYNC_2 +# define DRIVER_SYNC_2 0 +# endif + IS31FL3733_init(DRIVER_ADDR_2, DRIVER_SYNC_2); +# endif +# ifdef DRIVER_ADDR_3 +# ifndef DRIVER_SYNC_3 +# define DRIVER_SYNC_3 0 +# endif + IS31FL3733_init(DRIVER_ADDR_3, DRIVER_SYNC_3); +# endif +# ifdef DRIVER_ADDR_4 +# ifndef DRIVER_SYNC_4 +# define DRIVER_SYNC_4 0 +# endif + IS31FL3733_init(DRIVER_ADDR_4, DRIVER_SYNC_4); +# endif +# elif defined(IS31FL3737) + IS31FL3737_init(DRIVER_ADDR_1); +# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility + IS31FL3737_init(DRIVER_ADDR_2); +# endif +# else + IS31FL3741_init(DRIVER_ADDR_1); +# endif + for (int index = 0; index < DRIVER_LED_TOTAL; index++) { + bool enabled = true; + // This only caches it for later +# ifdef IS31FL3731 + IS31FL3731_set_led_control_register(index, enabled, enabled, enabled); +# elif defined(IS31FL3733) + IS31FL3733_set_led_control_register(index, enabled, enabled, enabled); +# elif defined(IS31FL3737) + IS31FL3737_set_led_control_register(index, enabled, enabled, enabled); +# else + IS31FL3741_set_led_control_register(index, enabled, enabled, enabled); +# endif + } + // This actually updates the LED drivers +# ifdef IS31FL3731 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0); +# ifdef DRIVER_ADDR_2 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1); +# endif +# ifdef DRIVER_ADDR_3 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3); +# endif +# elif defined(IS31FL3733) + IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); +# ifdef DRIVER_ADDR_2 + IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1); +# endif +# ifdef DRIVER_ADDR_3 + IS31FL3733_update_led_control_registers(DRIVER_ADDR_3, 2); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3); +# endif +# elif defined(IS31FL3737) + IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, 0); +# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility + IS31FL3737_update_led_control_registers(DRIVER_ADDR_2, 1); +# endif +# else + IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); +# endif +} + +# ifdef IS31FL3731 +static void flush(void) { + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0); +# ifdef DRIVER_ADDR_2 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1); +# endif +# ifdef DRIVER_ADDR_3 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3); +# endif +} + +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = IS31FL3731_set_color, + .set_color_all = IS31FL3731_set_color_all, +}; +# elif defined(IS31FL3733) +static void flush(void) { + IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1, 0); +# ifdef DRIVER_ADDR_2 + IS31FL3733_update_pwm_buffers(DRIVER_ADDR_2, 1); +# endif +# ifdef DRIVER_ADDR_3 + IS31FL3733_update_pwm_buffers(DRIVER_ADDR_3, 2); +# endif +# ifdef DRIVER_ADDR_4 + IS31FL3733_update_pwm_buffers(DRIVER_ADDR_4, 3); +# endif +} + +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = IS31FL3733_set_color, + .set_color_all = IS31FL3733_set_color_all, +}; +# elif defined(IS31FL3737) +static void flush(void) { + IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, 0); +# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility + IS31FL3737_update_pwm_buffers(DRIVER_ADDR_2, 1); +# endif +} + +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = IS31FL3737_set_color, + .set_color_all = IS31FL3737_set_color_all, +}; +# else +static void flush(void) { IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); } + +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = IS31FL3741_set_color, + .set_color_all = IS31FL3741_set_color_all, +}; +# endif + +#elif defined(AW20216) +# include "spi_master.h" +static void init(void) { + spi_init(); + AW20216_init(DRIVER_1_CS, DRIVER_1_EN); +# ifdef DRIVER_2_CS + AW20216_init(DRIVER_2_CS, DRIVER_2_EN); +# endif +} + +static void flush(void) { + AW20216_update_pwm_buffers(DRIVER_1_CS, 0); +# ifdef DRIVER_2_CS + AW20216_update_pwm_buffers(DRIVER_2_CS, 1); +# endif +} + +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = AW20216_set_color, + .set_color_all = AW20216_set_color_all, +}; + +#elif defined(WS2812) +# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_CUSTOM_DRIVER) +# pragma message "Cannot use RGBLIGHT and RGB Matrix using WS2812 at the same time." +# pragma message "You need to use a custom driver, or re-implement the WS2812 driver to use a different configuration." +# endif + +// LED color buffer +LED_TYPE rgb_matrix_ws2812_array[DRIVER_LED_TOTAL]; + +static void init(void) {} + +static void flush(void) { + // Assumes use of RGB_DI_PIN + ws2812_setleds(rgb_matrix_ws2812_array, DRIVER_LED_TOTAL); +} + +// Set an led in the buffer to a color +static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { + rgb_matrix_ws2812_array[i].r = r; + rgb_matrix_ws2812_array[i].g = g; + rgb_matrix_ws2812_array[i].b = b; +# ifdef RGBW + convert_rgb_to_rgbw(&rgb_matrix_ws2812_array[i]); +# endif +} + +static void setled_all(uint8_t r, uint8_t g, uint8_t b) { + for (int i = 0; i < sizeof(rgb_matrix_ws2812_array) / sizeof(rgb_matrix_ws2812_array[0]); i++) { + setled(i, r, g, b); + } +} + +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = setled, + .set_color_all = setled_all, +}; +#endif diff --git a/quantum/rgb_matrix/rgb_matrix_legacy_enables.h b/quantum/rgb_matrix/rgb_matrix_legacy_enables.h new file mode 100644 index 000000000..398858ebc --- /dev/null +++ b/quantum/rgb_matrix/rgb_matrix_legacy_enables.h @@ -0,0 +1,153 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// to-do: remove this + +#pragma once + +#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +#endif +#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#endif +#ifndef DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#endif +#ifndef DISABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BREATHING +#endif +#ifndef DISABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_SAT +#endif +#ifndef DISABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_VAL +#endif +#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#endif +#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#endif +#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#endif +#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#endif +#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +#endif +#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#endif +#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#endif +#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#endif +#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#endif +#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#endif +#ifndef DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#endif +#ifndef DISABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#endif +#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_DUAL_BEACON +#endif +#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#endif +#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#endif +#ifndef DISABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_RAINDROPS +#endif +#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#endif +#ifndef DISABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_BREATHING +#endif +#ifndef DISABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +#endif +#ifndef DISABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_HUE_WAVE +#endif +#ifndef DISABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +#endif +#ifndef DISABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +#endif +#ifndef DISABLE_RGB_MATRIX_PIXEL_FRACTAL +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +#endif +#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) +# ifndef DISABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# endif +# ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +# endif +#endif +#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) +# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# endif +# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# endif +# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# endif +# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# endif +# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# endif +# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# endif +# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# endif +# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# endif +# ifndef DISABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_SPLASH +# endif +# ifndef DISABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# endif +# ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# endif +# ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +# endif +#endif diff --git a/quantum/rgb_matrix_types.h b/quantum/rgb_matrix/rgb_matrix_types.h similarity index 100% rename from quantum/rgb_matrix_types.h rename to quantum/rgb_matrix/rgb_matrix_types.h diff --git a/quantum/rgb_matrix_animations/alpha_mods_anim.h b/quantum/rgb_matrix_animations/alpha_mods_anim.h deleted file mode 100644 index 426d88ef3..000000000 --- a/quantum/rgb_matrix_animations/alpha_mods_anim.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS -RGB_MATRIX_EFFECT(ALPHAS_MODS) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -// alphas = color1, mods = color2 -bool ALPHAS_MODS(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = rgb_matrix_config.hsv; - RGB rgb1 = rgb_matrix_hsv_to_rgb(hsv); - hsv.h += rgb_matrix_config.speed; - RGB rgb2 = rgb_matrix_hsv_to_rgb(hsv); - - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) { - rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b); - } else { - rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b); - } - } - return led_max < DRIVER_LED_TOTAL; -} - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS diff --git a/quantum/rgb_matrix_animations/breathing_anim.h b/quantum/rgb_matrix_animations/breathing_anim.h deleted file mode 100644 index 340bd93e5..000000000 --- a/quantum/rgb_matrix_animations/breathing_anim.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_BREATHING -RGB_MATRIX_EFFECT(BREATHING) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -bool BREATHING(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = rgb_matrix_config.hsv; - uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); - hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); - RGB rgb = rgb_matrix_hsv_to_rgb(hsv); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; -} - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BREATHING diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h deleted file mode 100644 index 3df3cfda7..000000000 --- a/quantum/rgb_matrix_animations/colorband_pinwheel_sat_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -RGB_MATRIX_EFFECT(BAND_PINWHEEL_SAT) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV BAND_PINWHEEL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { - hsv.s = scale8(hsv.s - time - atan2_8(dy, dx) * 3, hsv.s); - return hsv; -} - -bool BAND_PINWHEEL_SAT(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_SAT_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT diff --git a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h deleted file mode 100644 index 7d80074fd..000000000 --- a/quantum/rgb_matrix_animations/colorband_pinwheel_val_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -RGB_MATRIX_EFFECT(BAND_PINWHEEL_VAL) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV BAND_PINWHEEL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { - hsv.v = scale8(hsv.v - time - atan2_8(dy, dx) * 3, hsv.v); - return hsv; -} - -bool BAND_PINWHEEL_VAL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_VAL_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL diff --git a/quantum/rgb_matrix_animations/colorband_sat_anim.h b/quantum/rgb_matrix_animations/colorband_sat_anim.h deleted file mode 100644 index 35b830af6..000000000 --- a/quantum/rgb_matrix_animations/colorband_sat_anim.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_BAND_SAT -RGB_MATRIX_EFFECT(BAND_SAT) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV BAND_SAT_math(HSV hsv, uint8_t i, uint8_t time) { - int16_t s = hsv.s - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; - hsv.s = scale8(s < 0 ? 0 : s, hsv.s); - return hsv; -} - -bool BAND_SAT(effect_params_t* params) { return effect_runner_i(params, &BAND_SAT_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BAND_SAT diff --git a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h deleted file mode 100644 index 048157aa1..000000000 --- a/quantum/rgb_matrix_animations/colorband_spiral_sat_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -RGB_MATRIX_EFFECT(BAND_SPIRAL_SAT) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV BAND_SPIRAL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { - hsv.s = scale8(hsv.s + dist - time - atan2_8(dy, dx), hsv.s); - return hsv; -} - -bool BAND_SPIRAL_SAT(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_SAT_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h deleted file mode 100644 index bff2da161..000000000 --- a/quantum/rgb_matrix_animations/colorband_spiral_val_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -RGB_MATRIX_EFFECT(BAND_SPIRAL_VAL) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV BAND_SPIRAL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { - hsv.v = scale8(hsv.v + dist - time - atan2_8(dy, dx), hsv.v); - return hsv; -} - -bool BAND_SPIRAL_VAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_VAL_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL diff --git a/quantum/rgb_matrix_animations/colorband_val_anim.h b/quantum/rgb_matrix_animations/colorband_val_anim.h deleted file mode 100644 index f1aaf1d06..000000000 --- a/quantum/rgb_matrix_animations/colorband_val_anim.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_BAND_VAL -RGB_MATRIX_EFFECT(BAND_VAL) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV BAND_VAL_math(HSV hsv, uint8_t i, uint8_t time) { - int16_t v = hsv.v - abs(scale8(g_led_config.point[i].x, 228) + 28 - time) * 8; - hsv.v = scale8(v < 0 ? 0 : v, hsv.v); - return hsv; -} - -bool BAND_VAL(effect_params_t* params) { return effect_runner_i(params, &BAND_VAL_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BAND_VAL diff --git a/quantum/rgb_matrix_animations/cycle_all_anim.h b/quantum/rgb_matrix_animations/cycle_all_anim.h deleted file mode 100644 index faf8598a3..000000000 --- a/quantum/rgb_matrix_animations/cycle_all_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL -RGB_MATRIX_EFFECT(CYCLE_ALL) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV CYCLE_ALL_math(HSV hsv, uint8_t i, uint8_t time) { - hsv.h = time; - return hsv; -} - -bool CYCLE_ALL(effect_params_t* params) { return effect_runner_i(params, &CYCLE_ALL_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_ALL diff --git a/quantum/rgb_matrix_animations/cycle_left_right_anim.h b/quantum/rgb_matrix_animations/cycle_left_right_anim.h deleted file mode 100644 index cf911eb93..000000000 --- a/quantum/rgb_matrix_animations/cycle_left_right_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -RGB_MATRIX_EFFECT(CYCLE_LEFT_RIGHT) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV CYCLE_LEFT_RIGHT_math(HSV hsv, uint8_t i, uint8_t time) { - hsv.h = g_led_config.point[i].x - time; - return hsv; -} - -bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT diff --git a/quantum/rgb_matrix_animations/cycle_out_in_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_anim.h deleted file mode 100644 index d66acd4b2..000000000 --- a/quantum/rgb_matrix_animations/cycle_out_in_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN -RGB_MATRIX_EFFECT(CYCLE_OUT_IN) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV CYCLE_OUT_IN_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { - hsv.h = 3 * dist / 2 + time; - return hsv; -} - -bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN diff --git a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h deleted file mode 100644 index fe8396140..000000000 --- a/quantum/rgb_matrix_animations/cycle_out_in_dual_anim.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -RGB_MATRIX_EFFECT(CYCLE_OUT_IN_DUAL) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV CYCLE_OUT_IN_DUAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { - dx = (k_rgb_matrix_center.x / 2) - abs8(dx); - uint8_t dist = sqrt16(dx * dx + dy * dy); - hsv.h = 3 * dist + time; - return hsv; -} - -bool CYCLE_OUT_IN_DUAL(effect_params_t* params) { return effect_runner_dx_dy(params, &CYCLE_OUT_IN_DUAL_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL diff --git a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h deleted file mode 100644 index 779988709..000000000 --- a/quantum/rgb_matrix_animations/cycle_pinwheel_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -RGB_MATRIX_EFFECT(CYCLE_PINWHEEL) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV CYCLE_PINWHEEL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { - hsv.h = atan2_8(dy, dx) + time; - return hsv; -} - -bool CYCLE_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &CYCLE_PINWHEEL_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_PINWHEEL diff --git a/quantum/rgb_matrix_animations/cycle_spiral_anim.h b/quantum/rgb_matrix_animations/cycle_spiral_anim.h deleted file mode 100644 index 80cfb0dbc..000000000 --- a/quantum/rgb_matrix_animations/cycle_spiral_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_CYCLE_SPIRAL -RGB_MATRIX_EFFECT(CYCLE_SPIRAL) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV CYCLE_SPIRAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint8_t time) { - hsv.h = dist - time - atan2_8(dy, dx); - return hsv; -} - -bool CYCLE_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_SPIRAL_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_SPIRAL diff --git a/quantum/rgb_matrix_animations/cycle_up_down_anim.h b/quantum/rgb_matrix_animations/cycle_up_down_anim.h deleted file mode 100644 index 5016f739d..000000000 --- a/quantum/rgb_matrix_animations/cycle_up_down_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -RGB_MATRIX_EFFECT(CYCLE_UP_DOWN) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV CYCLE_UP_DOWN_math(HSV hsv, uint8_t i, uint8_t time) { - hsv.h = g_led_config.point[i].y - time; - return hsv; -} - -bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN diff --git a/quantum/rgb_matrix_animations/dual_beacon_anim.h b/quantum/rgb_matrix_animations/dual_beacon_anim.h deleted file mode 100644 index ce9487168..000000000 --- a/quantum/rgb_matrix_animations/dual_beacon_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON -RGB_MATRIX_EFFECT(DUAL_BEACON) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV DUAL_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { - hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * sin) / 128; - return hsv; -} - -bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_DUAL_BEACON diff --git a/quantum/rgb_matrix_animations/gradient_left_right_anim.h b/quantum/rgb_matrix_animations/gradient_left_right_anim.h deleted file mode 100644 index 53dfd04e2..000000000 --- a/quantum/rgb_matrix_animations/gradient_left_right_anim.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -RGB_MATRIX_EFFECT(GRADIENT_LEFT_RIGHT) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -bool GRADIENT_LEFT_RIGHT(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = rgb_matrix_config.hsv; - uint8_t scale = scale8(64, rgb_matrix_config.speed); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - // The x range will be 0..224, map this to 0..7 - // Relies on hue being 8-bit and wrapping - hsv.h = rgb_matrix_config.hsv.h + (scale * g_led_config.point[i].x >> 5); - RGB rgb = rgb_matrix_hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; -} - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT diff --git a/quantum/rgb_matrix_animations/gradient_up_down_anim.h b/quantum/rgb_matrix_animations/gradient_up_down_anim.h deleted file mode 100644 index 7e0d2898c..000000000 --- a/quantum/rgb_matrix_animations/gradient_up_down_anim.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -RGB_MATRIX_EFFECT(GRADIENT_UP_DOWN) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -bool GRADIENT_UP_DOWN(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - - HSV hsv = rgb_matrix_config.hsv; - uint8_t scale = scale8(64, rgb_matrix_config.speed); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - // The y range will be 0..64, map this to 0..4 - // Relies on hue being 8-bit and wrapping - hsv.h = rgb_matrix_config.hsv.h + scale * (g_led_config.point[i].y >> 4); - RGB rgb = rgb_matrix_hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; -} - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/quantum/rgb_matrix_animations/hue_breathing_anim.h b/quantum/rgb_matrix_animations/hue_breathing_anim.h deleted file mode 100644 index 54dea958a..000000000 --- a/quantum/rgb_matrix_animations/hue_breathing_anim.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_HUE_BREATHING -RGB_MATRIX_EFFECT(HUE_BREATHING) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -// Change huedelta to adjust range of hue change. 0-255. -// Hue Breathing - All LED's light up -bool HUE_BREATHING(effect_params_t* params) { - RGB_MATRIX_USE_LIMITS(led_min, led_max); - uint8_t huedelta = 12; - HSV hsv = rgb_matrix_config.hsv; - uint16_t time = scale16by8(g_rgb_timer, rgb_matrix_config.speed / 8); - hsv.h = hsv.h + scale8(abs8(sin8(time) - 128) * 2, huedelta); - RGB rgb = hsv_to_rgb(hsv); - for (uint8_t i = led_min; i < led_max; i++) { - RGB_MATRIX_TEST_LED_FLAGS(); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); - } - return led_max < DRIVER_LED_TOTAL; -} - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_HUE_BREATHING diff --git a/quantum/rgb_matrix_animations/hue_pendulum_anim.h b/quantum/rgb_matrix_animations/hue_pendulum_anim.h deleted file mode 100644 index 2d8d36174..000000000 --- a/quantum/rgb_matrix_animations/hue_pendulum_anim.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_HUE_PENDULUM -RGB_MATRIX_EFFECT(HUE_PENDULUM) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -// Change huedelta to adjust range of hue change. 0-255. -// Looks better with a low value and slow speed for subtle change. -// Hue Pendulum - color changes in a wave to the right before reversing direction -static HSV HUE_PENDULUM_math(HSV hsv, uint8_t i, uint8_t time) { - uint8_t huedelta = 12; - hsv.h = hsv.h + scale8(abs8(sin8(time) + (g_led_config.point[i].x) - 128) * 2, huedelta); - return hsv; -} - -bool HUE_PENDULUM(effect_params_t* params) { return effect_runner_i(params, &HUE_PENDULUM_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_HUE_PENDULUM diff --git a/quantum/rgb_matrix_animations/hue_wave_anim.h b/quantum/rgb_matrix_animations/hue_wave_anim.h deleted file mode 100644 index fd9026fc9..000000000 --- a/quantum/rgb_matrix_animations/hue_wave_anim.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_HUE_WAVE -RGB_MATRIX_EFFECT(HUE_WAVE) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -// Change huedelta to adjust range of hue change. 0-255. -// Looks better with a low value and slow speed for subtle change. -// Hue Wave - color changes in a wave to the right -static HSV HUE_WAVE_math(HSV hsv, uint8_t i, uint8_t time) { - uint8_t huedelta = 24; - hsv.h = hsv.h + scale8(abs8(g_led_config.point[i].x - time), huedelta); - return hsv; -} - -bool HUE_WAVE(effect_params_t* params) { return effect_runner_i(params, &HUE_WAVE_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_HUE_WAVE diff --git a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h deleted file mode 100644 index 9493b3850..000000000 --- a/quantum/rgb_matrix_animations/jellybean_raindrops_anim.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -RGB_MATRIX_EFFECT(JELLYBEAN_RAINDROPS) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static void jellybean_raindrops_set_color(int i, effect_params_t* params) { - if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; - HSV hsv = {rand() & 0xFF, rand() & 0xFF, rgb_matrix_config.hsv.v}; - RGB rgb = rgb_matrix_hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); -} - -bool JELLYBEAN_RAINDROPS(effect_params_t* params) { - if (!params->init) { - // Change one LED every tick, make sure speed is not 0 - if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 5 == 0) { - jellybean_raindrops_set_color(rand() % DRIVER_LED_TOTAL, params); - } - return false; - } - - RGB_MATRIX_USE_LIMITS(led_min, led_max); - for (int i = led_min; i < led_max; i++) { - jellybean_raindrops_set_color(i, params); - } - return led_max < DRIVER_LED_TOTAL; -} - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS diff --git a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h b/quantum/rgb_matrix_animations/rainbow_beacon_anim.h deleted file mode 100644 index 977261182..000000000 --- a/quantum/rgb_matrix_animations/rainbow_beacon_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON -RGB_MATRIX_EFFECT(RAINBOW_BEACON) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV RAINBOW_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { - hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 2 * cos + (g_led_config.point[i].x - k_rgb_matrix_center.x) * 2 * sin) / 128; - return hsv; -} - -bool RAINBOW_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &RAINBOW_BEACON_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON diff --git a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h deleted file mode 100644 index e51e7b251..000000000 --- a/quantum/rgb_matrix_animations/rainbow_moving_chevron_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -RGB_MATRIX_EFFECT(RAINBOW_MOVING_CHEVRON) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV RAINBOW_MOVING_CHEVRON_math(HSV hsv, uint8_t i, uint8_t time) { - hsv.h += abs8(g_led_config.point[i].y - k_rgb_matrix_center.y) + (g_led_config.point[i].x - time); - return hsv; -} - -bool RAINBOW_MOVING_CHEVRON(effect_params_t* params) { return effect_runner_i(params, &RAINBOW_MOVING_CHEVRON_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON diff --git a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h deleted file mode 100644 index 1cd4ed2ac..000000000 --- a/quantum/rgb_matrix_animations/rainbow_pinwheels_anim.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -RGB_MATRIX_EFFECT(RAINBOW_PINWHEELS) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static HSV RAINBOW_PINWHEELS_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t time) { - hsv.h += ((g_led_config.point[i].y - k_rgb_matrix_center.y) * 3 * cos + (56 - abs8(g_led_config.point[i].x - k_rgb_matrix_center.x)) * 3 * sin) / 128; - return hsv; -} - -bool RAINBOW_PINWHEELS(effect_params_t* params) { return effect_runner_sin_cos_i(params, &RAINBOW_PINWHEELS_math); } - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS diff --git a/quantum/rgb_matrix_animations/raindrops_anim.h b/quantum/rgb_matrix_animations/raindrops_anim.h deleted file mode 100644 index 38359cdca..000000000 --- a/quantum/rgb_matrix_animations/raindrops_anim.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef DISABLE_RGB_MATRIX_RAINDROPS -RGB_MATRIX_EFFECT(RAINDROPS) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -static void raindrops_set_color(int i, effect_params_t* params) { - if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return; - HSV hsv = {0, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v}; - - // Take the shortest path between hues - int16_t deltaH = ((rgb_matrix_config.hsv.h + 180) % 360 - rgb_matrix_config.hsv.h) / 4; - if (deltaH > 127) { - deltaH -= 256; - } else if (deltaH < -127) { - deltaH += 256; - } - - hsv.h = rgb_matrix_config.hsv.h + (deltaH * (rand() & 0x03)); - RGB rgb = rgb_matrix_hsv_to_rgb(hsv); - rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); -} - -bool RAINDROPS(effect_params_t* params) { - if (!params->init) { - // Change one LED every tick, make sure speed is not 0 - if (scale16by8(g_rgb_timer, qadd8(rgb_matrix_config.speed, 16)) % 10 == 0) { - raindrops_set_color(rand() % DRIVER_LED_TOTAL, params); - } - return false; - } - - RGB_MATRIX_USE_LIMITS(led_min, led_max); - for (int i = led_min; i < led_max; i++) { - raindrops_set_color(i, params); - } - return led_max < DRIVER_LED_TOTAL; -} - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_RAINDROPS diff --git a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc b/quantum/rgb_matrix_animations/rgb_matrix_effects.inc deleted file mode 100644 index 053d44150..000000000 --- a/quantum/rgb_matrix_animations/rgb_matrix_effects.inc +++ /dev/null @@ -1,37 +0,0 @@ -// Add your new core rgb matrix effect here, order determins enum order, requires "rgb_matrix_animations/ directory -#include "rgb_matrix_animations/solid_color_anim.h" -#include "rgb_matrix_animations/alpha_mods_anim.h" -#include "rgb_matrix_animations/gradient_up_down_anim.h" -#include "rgb_matrix_animations/gradient_left_right_anim.h" -#include "rgb_matrix_animations/breathing_anim.h" -#include "rgb_matrix_animations/colorband_sat_anim.h" -#include "rgb_matrix_animations/colorband_val_anim.h" -#include "rgb_matrix_animations/colorband_pinwheel_sat_anim.h" -#include "rgb_matrix_animations/colorband_pinwheel_val_anim.h" -#include "rgb_matrix_animations/colorband_spiral_sat_anim.h" -#include "rgb_matrix_animations/colorband_spiral_val_anim.h" -#include "rgb_matrix_animations/cycle_all_anim.h" -#include "rgb_matrix_animations/cycle_left_right_anim.h" -#include "rgb_matrix_animations/cycle_up_down_anim.h" -#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h" -#include "rgb_matrix_animations/cycle_out_in_anim.h" -#include "rgb_matrix_animations/cycle_out_in_dual_anim.h" -#include "rgb_matrix_animations/cycle_pinwheel_anim.h" -#include "rgb_matrix_animations/cycle_spiral_anim.h" -#include "rgb_matrix_animations/dual_beacon_anim.h" -#include "rgb_matrix_animations/rainbow_beacon_anim.h" -#include "rgb_matrix_animations/rainbow_pinwheels_anim.h" -#include "rgb_matrix_animations/raindrops_anim.h" -#include "rgb_matrix_animations/jellybean_raindrops_anim.h" -#include "rgb_matrix_animations/hue_breathing_anim.h" -#include "rgb_matrix_animations/hue_pendulum_anim.h" -#include "rgb_matrix_animations/hue_wave_anim.h" -#include "rgb_matrix_animations/typing_heatmap_anim.h" -#include "rgb_matrix_animations/digital_rain_anim.h" -#include "rgb_matrix_animations/solid_reactive_simple_anim.h" -#include "rgb_matrix_animations/solid_reactive_anim.h" -#include "rgb_matrix_animations/solid_reactive_wide.h" -#include "rgb_matrix_animations/solid_reactive_cross.h" -#include "rgb_matrix_animations/solid_reactive_nexus.h" -#include "rgb_matrix_animations/splash_anim.h" -#include "rgb_matrix_animations/solid_splash_anim.h" diff --git a/quantum/rgb_matrix_animations/typing_heatmap_anim.h b/quantum/rgb_matrix_animations/typing_heatmap_anim.h deleted file mode 100644 index e7dda11a2..000000000 --- a/quantum/rgb_matrix_animations/typing_heatmap_anim.h +++ /dev/null @@ -1,86 +0,0 @@ -#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) -RGB_MATRIX_EFFECT(TYPING_HEATMAP) -# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS - -# ifndef RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS -# define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 25 -# endif - -void process_rgb_matrix_typing_heatmap(uint8_t row, uint8_t col) { - uint8_t m_row = row - 1; - uint8_t p_row = row + 1; - uint8_t m_col = col - 1; - uint8_t p_col = col + 1; - - if (m_col < col) g_rgb_frame_buffer[row][m_col] = qadd8(g_rgb_frame_buffer[row][m_col], 16); - g_rgb_frame_buffer[row][col] = qadd8(g_rgb_frame_buffer[row][col], 32); - if (p_col < MATRIX_COLS) g_rgb_frame_buffer[row][p_col] = qadd8(g_rgb_frame_buffer[row][p_col], 16); - - if (p_row < MATRIX_ROWS) { - if (m_col < col) g_rgb_frame_buffer[p_row][m_col] = qadd8(g_rgb_frame_buffer[p_row][m_col], 13); - g_rgb_frame_buffer[p_row][col] = qadd8(g_rgb_frame_buffer[p_row][col], 16); - if (p_col < MATRIX_COLS) g_rgb_frame_buffer[p_row][p_col] = qadd8(g_rgb_frame_buffer[p_row][p_col], 13); - } - - if (m_row < row) { - if (m_col < col) g_rgb_frame_buffer[m_row][m_col] = qadd8(g_rgb_frame_buffer[m_row][m_col], 13); - g_rgb_frame_buffer[m_row][col] = qadd8(g_rgb_frame_buffer[m_row][col], 16); - if (p_col < MATRIX_COLS) g_rgb_frame_buffer[m_row][p_col] = qadd8(g_rgb_frame_buffer[m_row][p_col], 13); - } -} - -// A timer to track the last time we decremented all heatmap values. -static uint16_t heatmap_decrease_timer; -// Whether we should decrement the heatmap values during the next update. -static bool decrease_heatmap_values; - -bool TYPING_HEATMAP(effect_params_t* params) { - // Modified version of RGB_MATRIX_USE_LIMITS to work off of matrix row / col size - uint8_t led_min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; - uint8_t led_max = led_min + RGB_MATRIX_LED_PROCESS_LIMIT; - if (led_max > sizeof(g_rgb_frame_buffer)) led_max = sizeof(g_rgb_frame_buffer); - - if (params->init) { - rgb_matrix_set_color_all(0, 0, 0); - memset(g_rgb_frame_buffer, 0, sizeof g_rgb_frame_buffer); - } - - // The heatmap animation might run in several iterations depending on - // `RGB_MATRIX_LED_PROCESS_LIMIT`, therefore we only want to update the - // timer when the animation starts. - if (params->iter == 0) { - decrease_heatmap_values = timer_elapsed(heatmap_decrease_timer) >= RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS; - - // Restart the timer if we are going to decrease the heatmap this frame. - if (decrease_heatmap_values) { - heatmap_decrease_timer = timer_read(); - } - } - - // Render heatmap & decrease - for (int i = led_min; i < led_max; i++) { - uint8_t row = i % MATRIX_ROWS; - uint8_t col = i / MATRIX_ROWS; - uint8_t val = g_rgb_frame_buffer[row][col]; - - // set the pixel colour - uint8_t led[LED_HITS_TO_REMEMBER]; - uint8_t led_count = rgb_matrix_map_row_column_to_led(row, col, led); - for (uint8_t j = 0; j < led_count; ++j) { - if (!HAS_ANY_FLAGS(g_led_config.flags[led[j]], params->flags)) continue; - - HSV hsv = {170 - qsub8(val, 85), rgb_matrix_config.hsv.s, scale8((qadd8(170, val) - 170) * 3, rgb_matrix_config.hsv.v)}; - RGB rgb = rgb_matrix_hsv_to_rgb(hsv); - rgb_matrix_set_color(led[j], rgb.r, rgb.g, rgb.b); - } - - if (decrease_heatmap_values) { - g_rgb_frame_buffer[row][col] = qsub8(val, 1); - } - } - - return led_max < sizeof(g_rgb_frame_buffer); -} - -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) diff --git a/quantum/rgb_matrix_drivers.c b/quantum/rgb_matrix_drivers.c deleted file mode 100644 index 896fa6d0e..000000000 --- a/quantum/rgb_matrix_drivers.c +++ /dev/null @@ -1,212 +0,0 @@ -/* Copyright 2018 James Laird-Wah - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include "rgb_matrix.h" - -/* Each driver needs to define the struct - * const rgb_matrix_driver_t rgb_matrix_driver; - * All members must be provided. - * Keyboard custom drivers can define this in their own files, it should only - * be here if shared between boards. - */ - -#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741) - -# include "i2c_master.h" - -static void init(void) { - i2c_init(); -# ifdef IS31FL3731 - IS31FL3731_init(DRIVER_ADDR_1); -# ifdef DRIVER_ADDR_2 - IS31FL3731_init(DRIVER_ADDR_2); -# endif -# ifdef DRIVER_ADDR_3 - IS31FL3731_init(DRIVER_ADDR_3); -# endif -# ifdef DRIVER_ADDR_4 - IS31FL3731_init(DRIVER_ADDR_4); -# endif -# elif defined(IS31FL3733) -# ifndef DRIVER_SYNC_1 -# define DRIVER_SYNC_1 0 -# endif - IS31FL3733_init(DRIVER_ADDR_1, DRIVER_SYNC_1); -# if defined DRIVER_ADDR_2 && (DRIVER_ADDR_1 != DRIVER_ADDR_2) -# ifndef DRIVER_SYNC_2 -# define DRIVER_SYNC_2 0 -# endif - IS31FL3733_init(DRIVER_ADDR_2, DRIVER_SYNC_2); -# endif -# ifdef DRIVER_ADDR_3 -# ifndef DRIVER_SYNC_3 -# define DRIVER_SYNC_3 0 -# endif - IS31FL3733_init(DRIVER_ADDR_3, DRIVER_SYNC_3); -# endif -# ifdef DRIVER_ADDR_4 -# ifndef DRIVER_SYNC_4 -# define DRIVER_SYNC_4 0 -# endif - IS31FL3733_init(DRIVER_ADDR_4, DRIVER_SYNC_4); -# endif -# elif defined(IS31FL3737) - IS31FL3737_init(DRIVER_ADDR_1); -# else - IS31FL3741_init(DRIVER_ADDR_1); -# endif - for (int index = 0; index < DRIVER_LED_TOTAL; index++) { - bool enabled = true; - // This only caches it for later -# ifdef IS31FL3731 - IS31FL3731_set_led_control_register(index, enabled, enabled, enabled); -# elif defined(IS31FL3733) - IS31FL3733_set_led_control_register(index, enabled, enabled, enabled); -# elif defined(IS31FL3737) - IS31FL3737_set_led_control_register(index, enabled, enabled, enabled); -# else - IS31FL3741_set_led_control_register(index, enabled, enabled, enabled); -# endif - } - // This actually updates the LED drivers -# ifdef IS31FL3731 - IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0); -# ifdef DRIVER_ADDR_2 - IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1); -# endif -# ifdef DRIVER_ADDR_3 - IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2); -# endif -# ifdef DRIVER_ADDR_4 - IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3); -# endif -# elif defined(IS31FL3733) - IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); -# ifdef DRIVER_ADDR_2 - IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1); -# endif -# ifdef DRIVER_ADDR_3 - IS31FL3733_update_led_control_registers(DRIVER_ADDR_3, 2); -# endif -# ifdef DRIVER_ADDR_4 - IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3); -# endif -# elif defined(IS31FL3737) - IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, DRIVER_ADDR_2); -# else - IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); -# endif -} - -# ifdef IS31FL3731 -static void flush(void) { - IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0); -# ifdef DRIVER_ADDR_2 - IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1); -# endif -# ifdef DRIVER_ADDR_3 - IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2); -# endif -# ifdef DRIVER_ADDR_4 - IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3); -# endif -} - -const rgb_matrix_driver_t rgb_matrix_driver = { - .init = init, - .flush = flush, - .set_color = IS31FL3731_set_color, - .set_color_all = IS31FL3731_set_color_all, -}; -# elif defined(IS31FL3733) -static void flush(void) { - IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1, 0); -# ifdef DRIVER_ADDR_2 - IS31FL3733_update_pwm_buffers(DRIVER_ADDR_2, 1); -# endif -# ifdef DRIVER_ADDR_3 - IS31FL3733_update_pwm_buffers(DRIVER_ADDR_3, 2); -# endif -# ifdef DRIVER_ADDR_4 - IS31FL3733_update_pwm_buffers(DRIVER_ADDR_4, 3); -# endif -} - -const rgb_matrix_driver_t rgb_matrix_driver = { - .init = init, - .flush = flush, - .set_color = IS31FL3733_set_color, - .set_color_all = IS31FL3733_set_color_all, -}; -# elif defined(IS31FL3737) -static void flush(void) { IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); } - -const rgb_matrix_driver_t rgb_matrix_driver = { - .init = init, - .flush = flush, - .set_color = IS31FL3737_set_color, - .set_color_all = IS31FL3737_set_color_all, -}; -# else -static void flush(void) { IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, DRIVER_ADDR_2); } - -const rgb_matrix_driver_t rgb_matrix_driver = { - .init = init, - .flush = flush, - .set_color = IS31FL3741_set_color, - .set_color_all = IS31FL3741_set_color_all, -}; -# endif - -#elif defined(WS2812) -# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_CUSTOM_DRIVER) -# pragma message "Cannot use RGBLIGHT and RGB Matrix using WS2812 at the same time." -# pragma message "You need to use a custom driver, or re-implement the WS2812 driver to use a different configuration." -# endif - -// LED color buffer -LED_TYPE rgb_matrix_ws2812_array[DRIVER_LED_TOTAL]; - -static void init(void) {} - -static void flush(void) { - // Assumes use of RGB_DI_PIN - ws2812_setleds(rgb_matrix_ws2812_array, DRIVER_LED_TOTAL); -} - -// Set an led in the buffer to a color -static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { - rgb_matrix_ws2812_array[i].r = r; - rgb_matrix_ws2812_array[i].g = g; - rgb_matrix_ws2812_array[i].b = b; -# ifdef RGBW - convert_rgb_to_rgbw(&rgb_matrix_ws2812_array[i]); -# endif -} - -static void setled_all(uint8_t r, uint8_t g, uint8_t b) { - for (int i = 0; i < sizeof(rgb_matrix_ws2812_array) / sizeof(rgb_matrix_ws2812_array[0]); i++) { - setled(i, r, g, b); - } -} - -const rgb_matrix_driver_t rgb_matrix_driver = { - .init = init, - .flush = flush, - .set_color = setled, - .set_color_all = setled_all, -}; -#endif diff --git a/quantum/rgblight.c b/quantum/rgblight.c deleted file mode 100644 index 04bbb1283..000000000 --- a/quantum/rgblight.c +++ /dev/null @@ -1,1383 +0,0 @@ -/* Copyright 2016-2017 Yang Liu - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include -#include -#include -#include "wait.h" -#include "progmem.h" -#include "sync_timer.h" -#include "rgblight.h" -#include "color.h" -#include "debug.h" -#include "led_tables.h" -#include -#ifdef EEPROM_ENABLE -# include "eeprom.h" -#endif -#ifdef VELOCIKEY_ENABLE -# include "velocikey.h" -#endif - -#ifndef MIN -# define MIN(a, b) (((a) < (b)) ? (a) : (b)) -#endif -#ifndef MAX -# define MAX(a, b) (((a) > (b)) ? (a) : (b)) -#endif - -#ifdef RGBLIGHT_SPLIT -/* for split keyboard */ -# define RGBLIGHT_SPLIT_SET_CHANGE_MODE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_MODE -# define RGBLIGHT_SPLIT_SET_CHANGE_HSVS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_HSVS -# define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS rgblight_status.change_flags |= (RGBLIGHT_STATUS_CHANGE_MODE | RGBLIGHT_STATUS_CHANGE_HSVS) -# define RGBLIGHT_SPLIT_SET_CHANGE_LAYERS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_LAYERS -# define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_TIMER -# define RGBLIGHT_SPLIT_ANIMATION_TICK rgblight_status.change_flags |= RGBLIGHT_STATUS_ANIMATION_TICK -#else -# define RGBLIGHT_SPLIT_SET_CHANGE_MODE -# define RGBLIGHT_SPLIT_SET_CHANGE_HSVS -# define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS -# define RGBLIGHT_SPLIT_SET_CHANGE_LAYERS -# define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE -# define RGBLIGHT_SPLIT_ANIMATION_TICK -#endif - -#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym, -#define _RGBM_SINGLE_DYNAMIC(sym) -#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym, -#define _RGBM_MULTI_DYNAMIC(sym) -#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##sym, -#define _RGBM_TMP_DYNAMIC(sym, msym) -static uint8_t static_effect_table[] = { -#include "rgblight_modes.h" -}; - -#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym, -#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym, -#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym, -#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_##sym, -#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##msym, -#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_##msym, -static uint8_t mode_base_table[] = { - 0, // RGBLIGHT_MODE_zero -#include "rgblight_modes.h" -}; - -#if !defined(RGBLIGHT_DEFAULT_MODE) -# define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_LIGHT -#endif - -#if !defined(RGBLIGHT_DEFAULT_HUE) -# define RGBLIGHT_DEFAULT_HUE 0 -#endif - -#if !defined(RGBLIGHT_DEFAULT_SAT) -# define RGBLIGHT_DEFAULT_SAT UINT8_MAX -#endif - -#if !defined(RGBLIGHT_DEFAULT_VAL) -# define RGBLIGHT_DEFAULT_VAL RGBLIGHT_LIMIT_VAL -#endif - -#if !defined(RGBLIGHT_DEFAULT_SPD) -# define RGBLIGHT_DEFAULT_SPD 0 -#endif - -static inline int is_static_effect(uint8_t mode) { return memchr(static_effect_table, mode, sizeof(static_effect_table)) != NULL; } - -#ifdef RGBLIGHT_LED_MAP -const uint8_t led_map[] PROGMEM = RGBLIGHT_LED_MAP; -#endif - -#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT -__attribute__((weak)) const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64}; -#endif - -rgblight_config_t rgblight_config; -rgblight_status_t rgblight_status = {.timer_enabled = false}; -bool is_rgblight_initialized = false; - -#ifdef RGBLIGHT_SLEEP -static bool is_suspended; -static bool pre_suspend_enabled; -#endif - -#ifdef RGBLIGHT_USE_TIMER -animation_status_t animation_status = {}; -#endif - -#ifndef LED_ARRAY -LED_TYPE led[RGBLED_NUM]; -# define LED_ARRAY led -#endif - -#ifdef RGBLIGHT_LAYERS -rgblight_segment_t const *const *rgblight_layers = NULL; -#endif - -rgblight_ranges_t rgblight_ranges = {0, RGBLED_NUM, 0, RGBLED_NUM, RGBLED_NUM}; - -void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) { - rgblight_ranges.clipping_start_pos = start_pos; - rgblight_ranges.clipping_num_leds = num_leds; -} - -void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds) { - if (start_pos >= RGBLED_NUM) return; - if (start_pos + num_leds > RGBLED_NUM) return; - rgblight_ranges.effect_start_pos = start_pos; - rgblight_ranges.effect_end_pos = start_pos + num_leds; - rgblight_ranges.effect_num_leds = num_leds; -} - -__attribute__((weak)) RGB rgblight_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); } - -void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { - HSV hsv = {hue, sat, val}; - RGB rgb = rgblight_hsv_to_rgb(hsv); - setrgb(rgb.r, rgb.g, rgb.b, led1); -} - -void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); } - -void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { - led1->r = r; - led1->g = g; - led1->b = b; -#ifdef RGBW - led1->w = 0; -#endif -} - -void rgblight_check_config(void) { - /* Add some out of bound checks for RGB light config */ - - if (rgblight_config.mode < RGBLIGHT_MODE_STATIC_LIGHT) { - rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT; - } else if (rgblight_config.mode > RGBLIGHT_MODES) { - rgblight_config.mode = RGBLIGHT_MODES; - } - - if (rgblight_config.val > RGBLIGHT_LIMIT_VAL) { - rgblight_config.val = RGBLIGHT_LIMIT_VAL; - } -} - -uint32_t eeconfig_read_rgblight(void) { -#ifdef EEPROM_ENABLE - return eeprom_read_dword(EECONFIG_RGBLIGHT); -#else - return 0; -#endif -} - -void eeconfig_update_rgblight(uint32_t val) { -#ifdef EEPROM_ENABLE - rgblight_check_config(); - eeprom_update_dword(EECONFIG_RGBLIGHT, val); -#endif -} - -void eeconfig_update_rgblight_current(void) { eeconfig_update_rgblight(rgblight_config.raw); } - -void eeconfig_update_rgblight_default(void) { - rgblight_config.enable = 1; - rgblight_config.mode = RGBLIGHT_DEFAULT_MODE; - rgblight_config.hue = RGBLIGHT_DEFAULT_HUE; - rgblight_config.sat = RGBLIGHT_DEFAULT_SAT; - rgblight_config.val = RGBLIGHT_DEFAULT_VAL; - rgblight_config.speed = RGBLIGHT_DEFAULT_SPD; - RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; - eeconfig_update_rgblight(rgblight_config.raw); -} - -void eeconfig_debug_rgblight(void) { - dprintf("rgblight_config EEPROM:\n"); - dprintf("rgblight_config.enable = %d\n", rgblight_config.enable); - dprintf("rghlight_config.mode = %d\n", rgblight_config.mode); - dprintf("rgblight_config.hue = %d\n", rgblight_config.hue); - dprintf("rgblight_config.sat = %d\n", rgblight_config.sat); - dprintf("rgblight_config.val = %d\n", rgblight_config.val); - dprintf("rgblight_config.speed = %d\n", rgblight_config.speed); -} - -void rgblight_init(void) { - /* if already initialized, don't do it again. - If you must do it again, extern this and set to false, first. - This is a dirty, dirty hack until proper hooks can be added for keyboard startup. */ - if (is_rgblight_initialized) { - return; - } - - dprintf("rgblight_init called.\n"); - dprintf("rgblight_init start!\n"); - if (!eeconfig_is_enabled()) { - dprintf("rgblight_init eeconfig is not enabled.\n"); - eeconfig_init(); - eeconfig_update_rgblight_default(); - } - rgblight_config.raw = eeconfig_read_rgblight(); - RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; - if (!rgblight_config.mode) { - dprintf("rgblight_init rgblight_config.mode = 0. Write default values to EEPROM.\n"); - eeconfig_update_rgblight_default(); - rgblight_config.raw = eeconfig_read_rgblight(); - } - rgblight_check_config(); - - eeconfig_debug_rgblight(); // display current eeprom values - - rgblight_timer_init(); // setup the timer - - if (rgblight_config.enable) { - rgblight_mode_noeeprom(rgblight_config.mode); - } - - is_rgblight_initialized = true; -} - -void rgblight_reload_from_eeprom(void) { - /* Reset back to what we have in eeprom */ - rgblight_config.raw = eeconfig_read_rgblight(); - RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; - rgblight_check_config(); - eeconfig_debug_rgblight(); // display current eeprom values - if (rgblight_config.enable) { - rgblight_mode_noeeprom(rgblight_config.mode); - } -} - -uint32_t rgblight_read_dword(void) { return rgblight_config.raw; } - -void rgblight_update_dword(uint32_t dword) { - RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; - rgblight_config.raw = dword; - if (rgblight_config.enable) - rgblight_mode_noeeprom(rgblight_config.mode); - else { - rgblight_timer_disable(); - rgblight_set(); - } -} - -void rgblight_increase(void) { - uint8_t mode = 0; - if (rgblight_config.mode < RGBLIGHT_MODES) { - mode = rgblight_config.mode + 1; - } - rgblight_mode(mode); -} -void rgblight_decrease(void) { - uint8_t mode = 0; - // Mode will never be < 1. If it ever is, eeprom needs to be initialized. - if (rgblight_config.mode > RGBLIGHT_MODE_STATIC_LIGHT) { - mode = rgblight_config.mode - 1; - } - rgblight_mode(mode); -} -void rgblight_step_helper(bool write_to_eeprom) { - uint8_t mode = 0; - mode = rgblight_config.mode + 1; - if (mode > RGBLIGHT_MODES) { - mode = 1; - } - rgblight_mode_eeprom_helper(mode, write_to_eeprom); -} -void rgblight_step_noeeprom(void) { rgblight_step_helper(false); } -void rgblight_step(void) { rgblight_step_helper(true); } -void rgblight_step_reverse_helper(bool write_to_eeprom) { - uint8_t mode = 0; - mode = rgblight_config.mode - 1; - if (mode < 1) { - mode = RGBLIGHT_MODES; - } - rgblight_mode_eeprom_helper(mode, write_to_eeprom); -} -void rgblight_step_reverse_noeeprom(void) { rgblight_step_reverse_helper(false); } -void rgblight_step_reverse(void) { rgblight_step_reverse_helper(true); } - -uint8_t rgblight_get_mode(void) { - if (!rgblight_config.enable) { - return false; - } - - return rgblight_config.mode; -} - -void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { - if (!rgblight_config.enable) { - return; - } - if (mode < RGBLIGHT_MODE_STATIC_LIGHT) { - rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT; - } else if (mode > RGBLIGHT_MODES) { - rgblight_config.mode = RGBLIGHT_MODES; - } else { - rgblight_config.mode = mode; - } - RGBLIGHT_SPLIT_SET_CHANGE_MODE; - if (write_to_eeprom) { - eeconfig_update_rgblight(rgblight_config.raw); - dprintf("rgblight mode [EEPROM]: %u\n", rgblight_config.mode); - } else { - dprintf("rgblight mode [NOEEPROM]: %u\n", rgblight_config.mode); - } - if (is_static_effect(rgblight_config.mode)) { - rgblight_timer_disable(); - } else { - rgblight_timer_enable(); - } -#ifdef RGBLIGHT_USE_TIMER - animation_status.restart = true; -#endif - rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); -} - -void rgblight_mode(uint8_t mode) { rgblight_mode_eeprom_helper(mode, true); } - -void rgblight_mode_noeeprom(uint8_t mode) { rgblight_mode_eeprom_helper(mode, false); } - -void rgblight_toggle(void) { - dprintf("rgblight toggle [EEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); - if (rgblight_config.enable) { - rgblight_disable(); - } else { - rgblight_enable(); - } -} - -void rgblight_toggle_noeeprom(void) { - dprintf("rgblight toggle [NOEEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); - if (rgblight_config.enable) { - rgblight_disable_noeeprom(); - } else { - rgblight_enable_noeeprom(); - } -} - -void rgblight_enable(void) { - rgblight_config.enable = 1; - // No need to update EEPROM here. rgblight_mode() will do that, actually - // eeconfig_update_rgblight(rgblight_config.raw); - dprintf("rgblight enable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); - rgblight_mode(rgblight_config.mode); -} - -void rgblight_enable_noeeprom(void) { - rgblight_config.enable = 1; - dprintf("rgblight enable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); - rgblight_mode_noeeprom(rgblight_config.mode); -} - -void rgblight_disable(void) { - rgblight_config.enable = 0; - eeconfig_update_rgblight(rgblight_config.raw); - dprintf("rgblight disable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); - rgblight_timer_disable(); - RGBLIGHT_SPLIT_SET_CHANGE_MODE; - wait_ms(50); - rgblight_set(); -} - -void rgblight_disable_noeeprom(void) { - rgblight_config.enable = 0; - dprintf("rgblight disable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); - rgblight_timer_disable(); - RGBLIGHT_SPLIT_SET_CHANGE_MODE; - wait_ms(50); - rgblight_set(); -} - -bool rgblight_is_enabled(void) { return rgblight_config.enable; } - -void rgblight_increase_hue_helper(bool write_to_eeprom) { - uint8_t hue = rgblight_config.hue + RGBLIGHT_HUE_STEP; - rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom); -} -void rgblight_increase_hue_noeeprom(void) { rgblight_increase_hue_helper(false); } -void rgblight_increase_hue(void) { rgblight_increase_hue_helper(true); } -void rgblight_decrease_hue_helper(bool write_to_eeprom) { - uint8_t hue = rgblight_config.hue - RGBLIGHT_HUE_STEP; - rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom); -} -void rgblight_decrease_hue_noeeprom(void) { rgblight_decrease_hue_helper(false); } -void rgblight_decrease_hue(void) { rgblight_decrease_hue_helper(true); } -void rgblight_increase_sat_helper(bool write_to_eeprom) { - uint8_t sat = qadd8(rgblight_config.sat, RGBLIGHT_SAT_STEP); - rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom); -} -void rgblight_increase_sat_noeeprom(void) { rgblight_increase_sat_helper(false); } -void rgblight_increase_sat(void) { rgblight_increase_sat_helper(true); } -void rgblight_decrease_sat_helper(bool write_to_eeprom) { - uint8_t sat = qsub8(rgblight_config.sat, RGBLIGHT_SAT_STEP); - rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom); -} -void rgblight_decrease_sat_noeeprom(void) { rgblight_decrease_sat_helper(false); } -void rgblight_decrease_sat(void) { rgblight_decrease_sat_helper(true); } -void rgblight_increase_val_helper(bool write_to_eeprom) { - uint8_t val = qadd8(rgblight_config.val, RGBLIGHT_VAL_STEP); - rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom); -} -void rgblight_increase_val_noeeprom(void) { rgblight_increase_val_helper(false); } -void rgblight_increase_val(void) { rgblight_increase_val_helper(true); } -void rgblight_decrease_val_helper(bool write_to_eeprom) { - uint8_t val = qsub8(rgblight_config.val, RGBLIGHT_VAL_STEP); - rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom); -} -void rgblight_decrease_val_noeeprom(void) { rgblight_decrease_val_helper(false); } -void rgblight_decrease_val(void) { rgblight_decrease_val_helper(true); } - -void rgblight_increase_speed_helper(bool write_to_eeprom) { - if (rgblight_config.speed < 3) rgblight_config.speed++; - // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED? - if (write_to_eeprom) { - eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this - } -} -void rgblight_increase_speed(void) { rgblight_increase_speed_helper(true); } -void rgblight_increase_speed_noeeprom(void) { rgblight_increase_speed_helper(false); } - -void rgblight_decrease_speed_helper(bool write_to_eeprom) { - if (rgblight_config.speed > 0) rgblight_config.speed--; - // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED?? - if (write_to_eeprom) { - eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this - } -} -void rgblight_decrease_speed(void) { rgblight_decrease_speed_helper(true); } -void rgblight_decrease_speed_noeeprom(void) { rgblight_decrease_speed_helper(false); } - -void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) { - if (rgblight_config.enable) { - LED_TYPE tmp_led; - sethsv(hue, sat, val, &tmp_led); - rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); - } -} - -void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) { - if (rgblight_config.enable) { - rgblight_status.base_mode = mode_base_table[rgblight_config.mode]; - if (rgblight_config.mode == RGBLIGHT_MODE_STATIC_LIGHT) { - // same static color - LED_TYPE tmp_led; - sethsv(hue, sat, val, &tmp_led); - rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); - } else { - // all LEDs in same color - if (1 == 0) { // dummy - } -#ifdef RGBLIGHT_EFFECT_BREATHING - else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) { - // breathing mode, ignore the change of val, use in memory value instead - val = rgblight_config.val; - } -#endif -#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD - else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) { - // rainbow mood, ignore the change of hue - hue = rgblight_config.hue; - } -#endif -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) { - // rainbow swirl, ignore the change of hue - hue = rgblight_config.hue; - } -#endif -#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT - else if (rgblight_status.base_mode == RGBLIGHT_MODE_STATIC_GRADIENT) { - // static gradient - uint8_t delta = rgblight_config.mode - rgblight_status.base_mode; - bool direction = (delta % 2) == 0; -# ifdef __AVR__ - // probably due to how pgm_read_word is defined for ARM, but the ARM compiler really hates this line - uint8_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[delta / 2]); -# else - uint8_t range = RGBLED_GRADIENT_RANGES[delta / 2]; -# endif - for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) { - uint8_t _hue = ((uint16_t)i * (uint16_t)range) / rgblight_ranges.effect_num_leds; - if (direction) { - _hue = hue + _hue; - } else { - _hue = hue - _hue; - } - dprintf("rgblight rainbow set hsv: %d,%d,%d,%u\n", i, _hue, direction, range); - sethsv(_hue, sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]); - } - rgblight_set(); - } -#endif - } -#ifdef RGBLIGHT_SPLIT - if (rgblight_config.hue != hue || rgblight_config.sat != sat || rgblight_config.val != val) { - RGBLIGHT_SPLIT_SET_CHANGE_HSVS; - } -#endif - rgblight_config.hue = hue; - rgblight_config.sat = sat; - rgblight_config.val = val; - if (write_to_eeprom) { - eeconfig_update_rgblight(rgblight_config.raw); - dprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); - } else { - dprintf("rgblight set hsv [NOEEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); - } - } -} - -void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, true); } - -void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, false); } - -uint8_t rgblight_get_speed(void) { return rgblight_config.speed; } - -void rgblight_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { - rgblight_config.speed = speed; - if (write_to_eeprom) { - eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this - dprintf("rgblight set speed [EEPROM]: %u\n", rgblight_config.speed); - } else { - dprintf("rgblight set speed [NOEEPROM]: %u\n", rgblight_config.speed); - } -} - -void rgblight_set_speed(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, true); } - -void rgblight_set_speed_noeeprom(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, false); } - -uint8_t rgblight_get_hue(void) { return rgblight_config.hue; } - -uint8_t rgblight_get_sat(void) { return rgblight_config.sat; } - -uint8_t rgblight_get_val(void) { return rgblight_config.val; } - -HSV rgblight_get_hsv(void) { return (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; } - -void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) { - if (!rgblight_config.enable) { - return; - } - - for (uint8_t i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) { - led[i].r = r; - led[i].g = g; - led[i].b = b; -#ifdef RGBW - led[i].w = 0; -#endif - } - rgblight_set(); -} - -void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) { - if (!rgblight_config.enable || index >= RGBLED_NUM) { - return; - } - - led[index].r = r; - led[index].g = g; - led[index].b = b; -#ifdef RGBW - led[index].w = 0; -#endif - rgblight_set(); -} - -void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index) { - if (!rgblight_config.enable) { - return; - } - - LED_TYPE tmp_led; - sethsv(hue, sat, val, &tmp_led); - rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index); -} - -#if defined(RGBLIGHT_EFFECT_BREATHING) || defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) || defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) || defined(RGBLIGHT_EFFECT_SNAKE) || defined(RGBLIGHT_EFFECT_KNIGHT) || defined(RGBLIGHT_EFFECT_TWINKLE) - -static uint8_t get_interval_time(const uint8_t *default_interval_address, uint8_t velocikey_min, uint8_t velocikey_max) { - return -# ifdef VELOCIKEY_ENABLE - velocikey_enabled() ? velocikey_match_speed(velocikey_min, velocikey_max) : -# endif - pgm_read_byte(default_interval_address); -} - -#endif - -void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end) { - if (!rgblight_config.enable || start < 0 || start >= end || end > RGBLED_NUM) { - return; - } - - for (uint8_t i = start; i < end; i++) { - led[i].r = r; - led[i].g = g; - led[i].b = b; -#ifdef RGBW - led[i].w = 0; -#endif - } - rgblight_set(); - wait_ms(1); -} - -void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) { - if (!rgblight_config.enable) { - return; - } - - LED_TYPE tmp_led; - sethsv(hue, sat, val, &tmp_led); - rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end); -} - -#ifndef RGBLIGHT_SPLIT -void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, 0, (uint8_t)RGBLED_NUM / 2); } - -void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM); } - -void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, 0, (uint8_t)RGBLED_NUM / 2); } - -void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM); } -#endif // ifndef RGBLIGHT_SPLIT - -#ifdef RGBLIGHT_LAYERS -void rgblight_set_layer_state(uint8_t layer, bool enabled) { - rgblight_layer_mask_t mask = (rgblight_layer_mask_t)1 << layer; - if (enabled) { - rgblight_status.enabled_layer_mask |= mask; - } else { - rgblight_status.enabled_layer_mask &= ~mask; - } - RGBLIGHT_SPLIT_SET_CHANGE_LAYERS; - // Static modes don't have a ticker running to update the LEDs - if (rgblight_status.timer_enabled == false) { - rgblight_mode_noeeprom(rgblight_config.mode); - } - -# ifdef RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF - // If not enabled, then nothing else will actually set the LEDs... - if (!rgblight_config.enable) { - rgblight_set(); - } -# endif -} - -bool rgblight_get_layer_state(uint8_t layer) { - rgblight_layer_mask_t mask = (rgblight_layer_mask_t)1 << layer; - return (rgblight_status.enabled_layer_mask & mask) != 0; -} - -// Write any enabled LED layers into the buffer -static void rgblight_layers_write(void) { - uint8_t i = 0; - // For each layer - for (const rgblight_segment_t *const *layer_ptr = rgblight_layers; i < RGBLIGHT_MAX_LAYERS; layer_ptr++, i++) { - if (!rgblight_get_layer_state(i)) { - continue; // Layer is disabled - } - const rgblight_segment_t *segment_ptr = pgm_read_ptr(layer_ptr); - if (segment_ptr == NULL) { - break; // No more layers - } - // For each segment - while (1) { - rgblight_segment_t segment; - memcpy_P(&segment, segment_ptr, sizeof(rgblight_segment_t)); - if (segment.index == RGBLIGHT_END_SEGMENT_INDEX) { - break; // No more segments - } - // Write segment.count LEDs - LED_TYPE *const limit = &led[MIN(segment.index + segment.count, RGBLED_NUM)]; - for (LED_TYPE *led_ptr = &led[segment.index]; led_ptr < limit; led_ptr++) { - sethsv(segment.hue, segment.sat, segment.val, led_ptr); - } - segment_ptr++; - } - } -} - -# ifdef RGBLIGHT_LAYER_BLINK -rgblight_layer_mask_t _blinking_layer_mask = 0; -static uint16_t _repeat_timer; -static uint8_t _times_remaining; -static uint16_t _dur; - -void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) { rgblight_blink_layer_repeat(layer, duration_ms, 1); } - -void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times) { - _times_remaining = times * 2; - _dur = duration_ms; - - rgblight_set_layer_state(layer, true); - _times_remaining--; - _blinking_layer_mask |= (rgblight_layer_mask_t)1 << layer; - _repeat_timer = sync_timer_read() + duration_ms; -} - -void rgblight_blink_layer_repeat_helper(void) { - if (_blinking_layer_mask != 0 && timer_expired(sync_timer_read(), _repeat_timer)) { - for (uint8_t layer = 0; layer < RGBLIGHT_MAX_LAYERS; layer++) { - if ((_blinking_layer_mask & (rgblight_layer_mask_t)1 << layer) != 0 && _times_remaining > 0) { - if (_times_remaining % 2 == 1) { - rgblight_set_layer_state(layer, false); - } else { - rgblight_set_layer_state(layer, true); - } - _times_remaining--; - _repeat_timer = sync_timer_read() + _dur; - } - } - if (_times_remaining <= 0) { - _blinking_layer_mask = 0; - } - } -} -# endif - -#endif - -#ifdef RGBLIGHT_SLEEP - -void rgblight_suspend(void) { - rgblight_timer_disable(); - if (!is_suspended) { - is_suspended = true; - pre_suspend_enabled = rgblight_config.enable; - -# ifdef RGBLIGHT_LAYER_BLINK - // make sure any layer blinks don't come back after suspend - rgblight_status.enabled_layer_mask &= ~_blinking_layer_mask; - _blinking_layer_mask = 0; -# endif - - rgblight_disable_noeeprom(); - } -} - -void rgblight_wakeup(void) { - is_suspended = false; - - if (pre_suspend_enabled) { - rgblight_enable_noeeprom(); - } -# ifdef RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF - // Need this or else the LEDs won't be set - else if (rgblight_status.enabled_layer_mask != 0) { - rgblight_set(); - } -# endif - - rgblight_timer_enable(); -} - -#endif - -__attribute__((weak)) void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { ws2812_setleds(start_led, num_leds); } - -#ifndef RGBLIGHT_CUSTOM_DRIVER - -void rgblight_set(void) { - LED_TYPE *start_led; - uint8_t num_leds = rgblight_ranges.clipping_num_leds; - - if (!rgblight_config.enable) { - for (uint8_t i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; -# ifdef RGBW - led[i].w = 0; -# endif - } - } - -# ifdef RGBLIGHT_LAYERS - if (rgblight_layers != NULL -# if !defined(RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF) - && rgblight_config.enable -# elif defined(RGBLIGHT_SLEEP) - && !is_suspended -# endif - ) { - rgblight_layers_write(); - } -# endif - -# ifdef RGBLIGHT_LED_MAP - LED_TYPE led0[RGBLED_NUM]; - for (uint8_t i = 0; i < RGBLED_NUM; i++) { - led0[i] = led[pgm_read_byte(&led_map[i])]; - } - start_led = led0 + rgblight_ranges.clipping_start_pos; -# else - start_led = led + rgblight_ranges.clipping_start_pos; -# endif - -# ifdef RGBW - for (uint8_t i = 0; i < num_leds; i++) { - convert_rgb_to_rgbw(&start_led[i]); - } -# endif - rgblight_call_driver(start_led, num_leds); -} -#endif - -#ifdef RGBLIGHT_SPLIT -/* for split keyboard master side */ -uint8_t rgblight_get_change_flags(void) { return rgblight_status.change_flags; } - -void rgblight_clear_change_flags(void) { rgblight_status.change_flags = 0; } - -void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo) { - syncinfo->config = rgblight_config; - syncinfo->status = rgblight_status; -} - -/* for split keyboard slave side */ -void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) { -# ifdef RGBLIGHT_LAYERS - if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_LAYERS) { - rgblight_status.enabled_layer_mask = syncinfo->status.enabled_layer_mask; - } -# endif - if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_MODE) { - if (syncinfo->config.enable) { - rgblight_config.enable = 1; // == rgblight_enable_noeeprom(); - rgblight_mode_eeprom_helper(syncinfo->config.mode, write_to_eeprom); - } else { - rgblight_disable_noeeprom(); - } - } - if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_HSVS) { - rgblight_sethsv_eeprom_helper(syncinfo->config.hue, syncinfo->config.sat, syncinfo->config.val, write_to_eeprom); - // rgblight_config.speed = config->speed; // NEED??? - } -# ifdef RGBLIGHT_USE_TIMER - if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_TIMER) { - if (syncinfo->status.timer_enabled) { - rgblight_timer_enable(); - } else { - rgblight_timer_disable(); - } - } -# ifndef RGBLIGHT_SPLIT_NO_ANIMATION_SYNC - if (syncinfo->status.change_flags & RGBLIGHT_STATUS_ANIMATION_TICK) { - animation_status.restart = true; - } -# endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */ -# endif /* RGBLIGHT_USE_TIMER */ -} -#endif /* RGBLIGHT_SPLIT */ - -#ifdef RGBLIGHT_USE_TIMER - -typedef void (*effect_func_t)(animation_status_t *anim); - -// Animation timer -- use system timer (AVR Timer0) -void rgblight_timer_init(void) { - rgblight_status.timer_enabled = false; - RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE; -} -void rgblight_timer_enable(void) { - if (!is_static_effect(rgblight_config.mode)) { - rgblight_status.timer_enabled = true; - } - animation_status.last_timer = sync_timer_read(); - RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE; - dprintf("rgblight timer enabled.\n"); -} -void rgblight_timer_disable(void) { - rgblight_status.timer_enabled = false; - RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE; - dprintf("rgblight timer disable.\n"); -} -void rgblight_timer_toggle(void) { - dprintf("rgblight timer toggle.\n"); - if (rgblight_status.timer_enabled) { - rgblight_timer_disable(); - } else { - rgblight_timer_enable(); - } -} - -void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) { - rgblight_enable(); - rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); - rgblight_setrgb(r, g, b); -} - -static void rgblight_effect_dummy(animation_status_t *anim) { - // do nothing - /******** - dprintf("rgblight_task() what happened?\n"); - dprintf("is_static_effect %d\n", is_static_effect(rgblight_config.mode)); - dprintf("mode = %d, base_mode = %d, timer_enabled %d, ", - rgblight_config.mode, rgblight_status.base_mode, - rgblight_status.timer_enabled); - dprintf("last_timer = %d\n",anim->last_timer); - **/ -} - -void rgblight_task(void) { - if (rgblight_status.timer_enabled) { - effect_func_t effect_func = rgblight_effect_dummy; - uint16_t interval_time = 2000; // dummy interval - uint8_t delta = rgblight_config.mode - rgblight_status.base_mode; - animation_status.delta = delta; - - // static light mode, do nothing here - if (1 == 0) { // dummy - } -# ifdef RGBLIGHT_EFFECT_BREATHING - else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) { - // breathing mode - interval_time = get_interval_time(&RGBLED_BREATHING_INTERVALS[delta], 1, 100); - effect_func = rgblight_effect_breathing; - } -# endif -# ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD - else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) { - // rainbow mood mode - interval_time = get_interval_time(&RGBLED_RAINBOW_MOOD_INTERVALS[delta], 5, 100); - effect_func = rgblight_effect_rainbow_mood; - } -# endif -# ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL - else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) { - // rainbow swirl mode - interval_time = get_interval_time(&RGBLED_RAINBOW_SWIRL_INTERVALS[delta / 2], 1, 100); - effect_func = rgblight_effect_rainbow_swirl; - } -# endif -# ifdef RGBLIGHT_EFFECT_SNAKE - else if (rgblight_status.base_mode == RGBLIGHT_MODE_SNAKE) { - // snake mode - interval_time = get_interval_time(&RGBLED_SNAKE_INTERVALS[delta / 2], 1, 200); - effect_func = rgblight_effect_snake; - } -# endif -# ifdef RGBLIGHT_EFFECT_KNIGHT - else if (rgblight_status.base_mode == RGBLIGHT_MODE_KNIGHT) { - // knight mode - interval_time = get_interval_time(&RGBLED_KNIGHT_INTERVALS[delta], 5, 100); - effect_func = rgblight_effect_knight; - } -# endif -# ifdef RGBLIGHT_EFFECT_CHRISTMAS - else if (rgblight_status.base_mode == RGBLIGHT_MODE_CHRISTMAS) { - // christmas mode - interval_time = RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL; - effect_func = (effect_func_t)rgblight_effect_christmas; - } -# endif -# ifdef RGBLIGHT_EFFECT_RGB_TEST - else if (rgblight_status.base_mode == RGBLIGHT_MODE_RGB_TEST) { - // RGB test mode - interval_time = pgm_read_word(&RGBLED_RGBTEST_INTERVALS[0]); - effect_func = (effect_func_t)rgblight_effect_rgbtest; - } -# endif -# ifdef RGBLIGHT_EFFECT_ALTERNATING - else if (rgblight_status.base_mode == RGBLIGHT_MODE_ALTERNATING) { - interval_time = 500; - effect_func = (effect_func_t)rgblight_effect_alternating; - } -# endif -# ifdef RGBLIGHT_EFFECT_TWINKLE - else if (rgblight_status.base_mode == RGBLIGHT_MODE_TWINKLE) { - interval_time = get_interval_time(&RGBLED_TWINKLE_INTERVALS[delta % 3], 5, 30); - effect_func = (effect_func_t)rgblight_effect_twinkle; - } -# endif - if (animation_status.restart) { - animation_status.restart = false; - animation_status.last_timer = sync_timer_read(); - animation_status.pos16 = 0; // restart signal to local each effect - } - uint16_t now = sync_timer_read(); - if (timer_expired(now, animation_status.last_timer)) { -# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) - static uint16_t report_last_timer = 0; - static bool tick_flag = false; - uint16_t oldpos16; - if (tick_flag) { - tick_flag = false; - if (timer_expired(now, report_last_timer)) { - report_last_timer += 30000; - dprintf("rgblight animation tick report to slave\n"); - RGBLIGHT_SPLIT_ANIMATION_TICK; - } - } - oldpos16 = animation_status.pos16; -# endif - animation_status.last_timer += interval_time; - effect_func(&animation_status); -# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) - if (animation_status.pos16 == 0 && oldpos16 != 0) { - tick_flag = true; - } -# endif - } - } - -# ifdef RGBLIGHT_LAYER_BLINK - rgblight_blink_layer_repeat_helper(); -# endif -} - -#endif /* RGBLIGHT_USE_TIMER */ - -#if defined(RGBLIGHT_EFFECT_BREATHING) || defined(RGBLIGHT_EFFECT_TWINKLE) - -# ifndef RGBLIGHT_EFFECT_BREATHE_CENTER -# ifndef RGBLIGHT_BREATHE_TABLE_SIZE -# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256 or 128 or 64 -# endif -# include -# endif - -static uint8_t breathe_calc(uint8_t pos) { - // http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/ -# ifdef RGBLIGHT_EFFECT_BREATHE_TABLE - return pgm_read_byte(&rgblight_effect_breathe_table[pos / table_scale]); -# else - return (exp(sin((pos / 255.0) * M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER / M_E) * (RGBLIGHT_EFFECT_BREATHE_MAX / (M_E - 1 / M_E)); -# endif -} - -#endif - -// Effects -#ifdef RGBLIGHT_EFFECT_BREATHING - -__attribute__((weak)) const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; - -void rgblight_effect_breathing(animation_status_t *anim) { - uint8_t val = breathe_calc(anim->pos); - rgblight_sethsv_noeeprom_old(rgblight_config.hue, rgblight_config.sat, val); - anim->pos = (anim->pos + 1); -} -#endif - -#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD -__attribute__((weak)) const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30}; - -void rgblight_effect_rainbow_mood(animation_status_t *anim) { - rgblight_sethsv_noeeprom_old(anim->current_hue, rgblight_config.sat, rgblight_config.val); - anim->current_hue++; -} -#endif - -#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL -# ifndef RGBLIGHT_RAINBOW_SWIRL_RANGE -# define RGBLIGHT_RAINBOW_SWIRL_RANGE 255 -# endif - -__attribute__((weak)) const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20}; - -void rgblight_effect_rainbow_swirl(animation_status_t *anim) { - uint8_t hue; - uint8_t i; - - for (i = 0; i < rgblight_ranges.effect_num_leds; i++) { - hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / rgblight_ranges.effect_num_leds * i + anim->current_hue); - sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]); - } - rgblight_set(); - - if (anim->delta % 2) { - anim->current_hue++; - } else { - anim->current_hue--; - } -} -#endif - -#ifdef RGBLIGHT_EFFECT_SNAKE -__attribute__((weak)) const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; - -void rgblight_effect_snake(animation_status_t *anim) { - static uint8_t pos = 0; - uint8_t i, j; - int8_t k; - int8_t increment = 1; - - if (anim->delta % 2) { - increment = -1; - } - -# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) - if (anim->pos == 0) { // restart signal - if (increment == 1) { - pos = rgblight_ranges.effect_num_leds - 1; - } else { - pos = 0; - } - anim->pos = 1; - } -# endif - - for (i = 0; i < rgblight_ranges.effect_num_leds; i++) { - LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos; - ledp->r = 0; - ledp->g = 0; - ledp->b = 0; -# ifdef RGBW - ledp->w = 0; -# endif - for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { - k = pos + j * increment; - if (k > RGBLED_NUM) { - k = k % RGBLED_NUM; - } - if (k < 0) { - k = k + rgblight_ranges.effect_num_leds; - } - if (i == k) { - sethsv(rgblight_config.hue, rgblight_config.sat, (uint8_t)(rgblight_config.val * (RGBLIGHT_EFFECT_SNAKE_LENGTH - j) / RGBLIGHT_EFFECT_SNAKE_LENGTH), ledp); - } - } - } - rgblight_set(); - if (increment == 1) { - if (pos - 1 < 0) { - pos = rgblight_ranges.effect_num_leds - 1; -# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) - anim->pos = 0; -# endif - } else { - pos -= 1; -# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) - anim->pos = 1; -# endif - } - } else { - pos = (pos + 1) % rgblight_ranges.effect_num_leds; -# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) - anim->pos = pos; -# endif - } -} -#endif - -#ifdef RGBLIGHT_EFFECT_KNIGHT -__attribute__((weak)) const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31}; - -void rgblight_effect_knight(animation_status_t *anim) { - static int8_t low_bound = 0; - static int8_t high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1; - static int8_t increment = 1; - uint8_t i, cur; - -# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) - if (anim->pos == 0) { // restart signal - anim->pos = 1; - low_bound = 0; - high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1; - increment = 1; - } -# endif - // Set all the LEDs to 0 - for (i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) { - led[i].r = 0; - led[i].g = 0; - led[i].b = 0; -# ifdef RGBW - led[i].w = 0; -# endif - } - // Determine which LEDs should be lit up - for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) { - cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % rgblight_ranges.effect_num_leds + rgblight_ranges.effect_start_pos; - - if (i >= low_bound && i <= high_bound) { - sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]); - } else { - led[cur].r = 0; - led[cur].g = 0; - led[cur].b = 0; -# ifdef RGBW - led[cur].w = 0; -# endif - } - } - rgblight_set(); - - // Move from low_bound to high_bound changing the direction we increment each - // time a boundary is hit. - low_bound += increment; - high_bound += increment; - - if (high_bound <= 0 || low_bound >= RGBLIGHT_EFFECT_KNIGHT_LED_NUM - 1) { - increment = -increment; -# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) - if (increment == 1) { - anim->pos = 0; - } -# endif - } -} -#endif - -#ifdef RGBLIGHT_EFFECT_CHRISTMAS -# define CUBED(x) ((x) * (x) * (x)) - -/** - * Christmas lights effect, with a smooth animation between red & green. - */ -void rgblight_effect_christmas(animation_status_t *anim) { - static int8_t increment = 1; - const uint8_t max_pos = 32; - const uint8_t hue_green = 85; - - uint32_t xa; - uint8_t hue, val; - uint8_t i; - - // The effect works by animating anim->pos from 0 to 32 and back to 0. - // The pos is used in a cubic bezier formula to ease-in-out between red and green, leaving the interpolated colors visible as short as possible. - xa = CUBED((uint32_t)anim->pos); - hue = ((uint32_t)hue_green) * xa / (xa + CUBED((uint32_t)(max_pos - anim->pos))); - // Additionally, these interpolated colors get shown with a slightly darker value, to make them less prominent than the main colors. - val = 255 - (3 * (hue < hue_green / 2 ? hue : hue_green - hue) / 2); - - for (i = 0; i < rgblight_ranges.effect_num_leds; i++) { - uint8_t local_hue = (i / RGBLIGHT_EFFECT_CHRISTMAS_STEP) % 2 ? hue : hue_green - hue; - sethsv(local_hue, rgblight_config.sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]); - } - rgblight_set(); - - if (anim->pos == 0) { - increment = 1; - } else if (anim->pos == max_pos) { - increment = -1; - } - anim->pos += increment; -} -#endif - -#ifdef RGBLIGHT_EFFECT_RGB_TEST -__attribute__((weak)) const uint16_t RGBLED_RGBTEST_INTERVALS[] PROGMEM = {1024}; - -void rgblight_effect_rgbtest(animation_status_t *anim) { - static uint8_t maxval = 0; - uint8_t g; - uint8_t r; - uint8_t b; - - if (maxval == 0) { - LED_TYPE tmp_led; - sethsv(0, 255, RGBLIGHT_LIMIT_VAL, &tmp_led); - maxval = tmp_led.r; - } - g = r = b = 0; - switch (anim->pos) { - case 0: - r = maxval; - break; - case 1: - g = maxval; - break; - case 2: - b = maxval; - break; - } - rgblight_setrgb(r, g, b); - anim->pos = (anim->pos + 1) % 3; -} -#endif - -#ifdef RGBLIGHT_EFFECT_ALTERNATING -void rgblight_effect_alternating(animation_status_t *anim) { - for (int i = 0; i < rgblight_ranges.effect_num_leds; i++) { - LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos; - if (i < rgblight_ranges.effect_num_leds / 2 && anim->pos) { - sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp); - } else if (i >= rgblight_ranges.effect_num_leds / 2 && !anim->pos) { - sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp); - } else { - sethsv(rgblight_config.hue, rgblight_config.sat, 0, ledp); - } - } - rgblight_set(); - anim->pos = (anim->pos + 1) % 2; -} -#endif - -#ifdef RGBLIGHT_EFFECT_TWINKLE -__attribute__((weak)) const uint8_t RGBLED_TWINKLE_INTERVALS[] PROGMEM = {30, 15, 5}; - -typedef struct PACKED { - HSV hsv; - uint8_t life; - uint8_t max_life; -} TwinkleState; - -static TwinkleState led_twinkle_state[RGBLED_NUM]; - -void rgblight_effect_twinkle(animation_status_t *anim) { - const bool random_color = anim->delta / 3; - const bool restart = anim->pos == 0; - anim->pos = 1; - - const uint8_t bottom = breathe_calc(0); - const uint8_t top = breathe_calc(127); - - uint8_t frac(uint8_t n, uint8_t d) { return (uint16_t)255 * n / d; } - uint8_t scale(uint16_t v, uint8_t scale) { return (v * scale) >> 8; } - - for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) { - TwinkleState *t = &(led_twinkle_state[i]); - HSV * c = &(t->hsv); - - if (!random_color) { - c->h = rgblight_config.hue; - c->s = rgblight_config.sat; - } - - if (restart) { - // Restart - t->life = 0; - c->v = 0; - } else if (t->life) { - // This LED is already on, either brightening or dimming - t->life--; - uint8_t unscaled = frac(breathe_calc(frac(t->life, t->max_life)) - bottom, top - bottom); - c->v = scale(rgblight_config.val, unscaled); - } else if (rand() < scale((uint16_t)RAND_MAX * RGBLIGHT_EFFECT_TWINKLE_PROBABILITY, 127 + rgblight_config.val / 2)) { - // This LED is off, but was randomly selected to start brightening - if (random_color) { - c->h = rand() % 0xFF; - c->s = (rand() % (rgblight_config.sat / 2)) + (rgblight_config.sat / 2); - } - c->v = 0; - t->max_life = MAX(20, MIN(RGBLIGHT_EFFECT_TWINKLE_LIFE, rgblight_config.val)); - t->life = t->max_life; - } else { - // This LED is off, and was NOT selected to start brightening - } - - LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos; - sethsv(c->h, c->s, c->v, ledp); - } - - rgblight_set(); -} -#endif diff --git a/quantum/rgblight.h b/quantum/rgblight.h deleted file mode 100644 index c05870f49..000000000 --- a/quantum/rgblight.h +++ /dev/null @@ -1,435 +0,0 @@ -/* Copyright 2017 Yang Liu - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#pragma once - -/***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) **** - - old mode number (before 0.6.117) to new mode name table - -|-----------------|-----------------------------------| -| old mode number | new mode name | -|-----------------|-----------------------------------| -| 1 | RGBLIGHT_MODE_STATIC_LIGHT | -| 2 | RGBLIGHT_MODE_BREATHING | -| 3 | RGBLIGHT_MODE_BREATHING + 1 | -| 4 | RGBLIGHT_MODE_BREATHING + 2 | -| 5 | RGBLIGHT_MODE_BREATHING + 3 | -| 6 | RGBLIGHT_MODE_RAINBOW_MOOD | -| 7 | RGBLIGHT_MODE_RAINBOW_MOOD + 1 | -| 8 | RGBLIGHT_MODE_RAINBOW_MOOD + 2 | -| 9 | RGBLIGHT_MODE_RAINBOW_SWIRL | -| 10 | RGBLIGHT_MODE_RAINBOW_SWIRL + 1 | -| 11 | RGBLIGHT_MODE_RAINBOW_SWIRL + 2 | -| 12 | RGBLIGHT_MODE_RAINBOW_SWIRL + 3 | -| 13 | RGBLIGHT_MODE_RAINBOW_SWIRL + 4 | -| 14 | RGBLIGHT_MODE_RAINBOW_SWIRL + 5 | -| 15 | RGBLIGHT_MODE_SNAKE | -| 16 | RGBLIGHT_MODE_SNAKE + 1 | -| 17 | RGBLIGHT_MODE_SNAKE + 2 | -| 18 | RGBLIGHT_MODE_SNAKE + 3 | -| 19 | RGBLIGHT_MODE_SNAKE + 4 | -| 20 | RGBLIGHT_MODE_SNAKE + 5 | -| 21 | RGBLIGHT_MODE_KNIGHT | -| 22 | RGBLIGHT_MODE_KNIGHT + 1 | -| 23 | RGBLIGHT_MODE_KNIGHT + 2 | -| 24 | RGBLIGHT_MODE_CHRISTMAS | -| 25 | RGBLIGHT_MODE_STATIC_GRADIENT | -| 26 | RGBLIGHT_MODE_STATIC_GRADIENT + 1 | -| 27 | RGBLIGHT_MODE_STATIC_GRADIENT + 2 | -| 28 | RGBLIGHT_MODE_STATIC_GRADIENT + 3 | -| 29 | RGBLIGHT_MODE_STATIC_GRADIENT + 4 | -| 30 | RGBLIGHT_MODE_STATIC_GRADIENT + 5 | -| 31 | RGBLIGHT_MODE_STATIC_GRADIENT + 6 | -| 32 | RGBLIGHT_MODE_STATIC_GRADIENT + 7 | -| 33 | RGBLIGHT_MODE_STATIC_GRADIENT + 8 | -| 34 | RGBLIGHT_MODE_STATIC_GRADIENT + 9 | -| 35 | RGBLIGHT_MODE_RGB_TEST | -| 36 | RGBLIGHT_MODE_ALTERNATING | -| 37 | RGBLIGHT_MODE_TWINKLE | -| 38 | RGBLIGHT_MODE_TWINKLE + 1 | -| 39 | RGBLIGHT_MODE_TWINKLE + 2 | -| 40 | RGBLIGHT_MODE_TWINKLE + 3 | -| 41 | RGBLIGHT_MODE_TWINKLE + 4 | -| 42 | RGBLIGHT_MODE_TWINKLE + 5 | -|-----------------|-----------------------------------| - *****/ - -#ifdef RGBLIGHT_ANIMATIONS -// for backward compatibility -# 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 -# define RGBLIGHT_EFFECT_TWINKLE -#endif - -#ifdef RGBLIGHT_STATIC_PATTERNS -# define RGBLIGHT_EFFECT_STATIC_GRADIENT -#endif - -// clang-format off - -// check dynamic animation effects chose ? -#if defined(RGBLIGHT_EFFECT_BREATHING) \ - || defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) \ - || defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) \ - || defined(RGBLIGHT_EFFECT_SNAKE) \ - || defined(RGBLIGHT_EFFECT_KNIGHT) \ - || defined(RGBLIGHT_EFFECT_CHRISTMAS) \ - || defined(RGBLIGHT_EFFECT_RGB_TEST) \ - || defined(RGBLIGHT_EFFECT_ALTERNATING) \ - || defined(RGBLIGHT_EFFECT_TWINKLE) -# define RGBLIGHT_USE_TIMER -#endif - -// clang-format on - -#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym, -#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym, -#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym, -#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_##sym, -#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##sym, -#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_##sym, -enum RGBLIGHT_EFFECT_MODE { - RGBLIGHT_MODE_zero = 0, -#include "rgblight_modes.h" - RGBLIGHT_MODE_last -}; - -#define RGBLIGHT_MODES (RGBLIGHT_MODE_last - 1) - -// sample: #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 - -#ifndef RGBLIGHT_EFFECT_BREATHE_MAX -# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255 -#endif - -#ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH -# define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 -#endif - -#ifndef RGBLIGHT_EFFECT_KNIGHT_LENGTH -# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 -#endif - -#ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET -# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 -#endif - -#ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM -# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM (rgblight_ranges.effect_num_leds) -#endif - -#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL -# define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 40 -#endif - -#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP -# define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 -#endif - -#ifndef RGBLIGHT_EFFECT_TWINKLE_LIFE -# define RGBLIGHT_EFFECT_TWINKLE_LIFE 200 -#endif - -#ifndef RGBLIGHT_EFFECT_TWINKLE_PROBABILITY -# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 127 -#endif - -#ifndef RGBLIGHT_HUE_STEP -# define RGBLIGHT_HUE_STEP 8 -#endif -#ifndef RGBLIGHT_SAT_STEP -# define RGBLIGHT_SAT_STEP 17 -#endif -#ifndef RGBLIGHT_VAL_STEP -# define RGBLIGHT_VAL_STEP 17 -#endif -#ifndef RGBLIGHT_LIMIT_VAL -# define RGBLIGHT_LIMIT_VAL 255 -#endif - -#include -#include -#include "progmem.h" -#include "eeconfig.h" -#include "ws2812.h" -#include "color.h" -#include "rgblight_list.h" - -#ifdef RGBLIGHT_LAYERS -typedef struct { - uint8_t index; // The first LED to light - uint8_t count; // The number of LEDs to light - uint8_t hue; - uint8_t sat; - uint8_t val; -} rgblight_segment_t; - -# define RGBLIGHT_END_SEGMENT_INDEX (255) -# define RGBLIGHT_END_SEGMENTS \ - { RGBLIGHT_END_SEGMENT_INDEX, 0, 0, 0 } -# ifndef RGBLIGHT_MAX_LAYERS -# define RGBLIGHT_MAX_LAYERS 8 -# endif -# if RGBLIGHT_MAX_LAYERS <= 0 -# error invalid RGBLIGHT_MAX_LAYERS value (must be >= 1) -# elif RGBLIGHT_MAX_LAYERS <= 8 -typedef uint8_t rgblight_layer_mask_t; -# elif RGBLIGHT_MAX_LAYERS <= 16 -typedef uint16_t rgblight_layer_mask_t; -# elif RGBLIGHT_MAX_LAYERS <= 32 -typedef uint32_t rgblight_layer_mask_t; -# else -# error invalid RGBLIGHT_MAX_LAYERS value (must be <= 32) -# endif -# define RGBLIGHT_LAYER_SEGMENTS(...) \ - { __VA_ARGS__, RGBLIGHT_END_SEGMENTS } -# define RGBLIGHT_LAYERS_LIST(...) \ - { __VA_ARGS__, NULL } - -// Get/set enabled rgblight layers -void rgblight_set_layer_state(uint8_t layer, bool enabled); -bool rgblight_get_layer_state(uint8_t layer); - -// Point this to an array of rgblight_segment_t arrays in keyboard_post_init_user to use rgblight layers -extern const rgblight_segment_t *const *rgblight_layers; - -# ifdef RGBLIGHT_LAYER_BLINK -# define RGBLIGHT_USE_TIMER -void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms); -void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times); -# endif - -#endif - -extern LED_TYPE led[RGBLED_NUM]; - -extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM; -extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM; -extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; -extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; -extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; -extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM; -extern const uint8_t RGBLED_TWINKLE_INTERVALS[3] PROGMEM; -extern bool is_rgblight_initialized; - -// Should stay in sycn with rgb matrix config as we reuse eeprom storage for both (for now) -typedef union { - uint32_t raw; - struct { - bool enable : 1; - uint8_t mode : 7; - uint8_t hue : 8; - uint8_t sat : 8; - uint8_t val : 8; - uint8_t speed : 8; // EECONFIG needs to be increased to support this - }; -} rgblight_config_t; - -typedef struct _rgblight_status_t { - uint8_t base_mode; - bool timer_enabled; -#ifdef RGBLIGHT_SPLIT - uint8_t change_flags; -#endif -#ifdef RGBLIGHT_LAYERS - rgblight_layer_mask_t enabled_layer_mask; -#endif -} rgblight_status_t; - -/* - * Structure for RGB Light clipping ranges - */ -typedef struct _rgblight_ranges_t { - uint8_t clipping_start_pos; - uint8_t clipping_num_leds; - uint8_t effect_start_pos; - uint8_t effect_end_pos; - uint8_t effect_num_leds; -} rgblight_ranges_t; - -extern rgblight_ranges_t rgblight_ranges; - -/* === Utility Functions ===*/ -void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); -void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); // without RGBLIGHT_LIMIT_VAL check -void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); - -/* === Low level Functions === */ -void rgblight_set(void); -void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds); - -/* === Effects and Animations Functions === */ -/* effect range setting */ -void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds); - -/* direct operation */ -void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); -void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index); -void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end); -void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end); -void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); - -#ifndef RGBLIGHT_SPLIT -void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b); -void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b); -void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val); -void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val); -#endif - -/* effect mode change */ -void rgblight_mode(uint8_t mode); -void rgblight_mode_noeeprom(uint8_t mode); -void rgblight_increase(void); -void rgblight_decrease(void); -void rgblight_step(void); -void rgblight_step_noeeprom(void); -void rgblight_step_reverse(void); -void rgblight_step_reverse_noeeprom(void); - -/* effects mode disable/enable */ -void rgblight_toggle(void); -void rgblight_toggle_noeeprom(void); -void rgblight_enable(void); -void rgblight_enable_noeeprom(void); -void rgblight_disable(void); -void rgblight_disable_noeeprom(void); - -/* hue, sat, val change */ -void rgblight_increase_hue(void); -void rgblight_increase_hue_noeeprom(void); -void rgblight_decrease_hue(void); -void rgblight_decrease_hue_noeeprom(void); -void rgblight_increase_sat(void); -void rgblight_increase_sat_noeeprom(void); -void rgblight_decrease_sat(void); -void rgblight_decrease_sat_noeeprom(void); -void rgblight_increase_val(void); -void rgblight_increase_val_noeeprom(void); -void rgblight_decrease_val(void); -void rgblight_decrease_val_noeeprom(void); -void rgblight_increase_speed(void); -void rgblight_increase_speed_noeeprom(void); -void rgblight_decrease_speed(void); -void rgblight_decrease_speed_noeeprom(void); -void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val); -void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val); - -/* effect speed */ -uint8_t rgblight_get_speed(void); -void rgblight_set_speed(uint8_t speed); -void rgblight_set_speed_noeeprom(uint8_t speed); - -/* reset */ -void rgblight_reload_from_eeprom(void); - -/* query */ -uint8_t rgblight_get_mode(void); -uint8_t rgblight_get_hue(void); -uint8_t rgblight_get_sat(void); -uint8_t rgblight_get_val(void); -bool rgblight_is_enabled(void); -HSV rgblight_get_hsv(void); - -/* === qmk_firmware (core)internal Functions === */ -void rgblight_init(void); -void rgblight_suspend(void); -void rgblight_wakeup(void); -uint32_t rgblight_read_dword(void); -void rgblight_update_dword(uint32_t dword); -uint32_t eeconfig_read_rgblight(void); -void eeconfig_update_rgblight(uint32_t val); -void eeconfig_update_rgblight_current(void); -void eeconfig_update_rgblight_default(void); -void eeconfig_debug_rgblight(void); - -void rgb_matrix_increase(void); -void rgb_matrix_decrease(void); - -void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); -void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); - -#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) -void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); - -#ifdef RGBLIGHT_USE_TIMER -void rgblight_task(void); -void rgblight_timer_init(void); -void rgblight_timer_enable(void); -void rgblight_timer_disable(void); -void rgblight_timer_toggle(void); -#else -# define rgblight_task() -# define rgblight_timer_init() -# define rgblight_timer_enable() -# define rgblight_timer_disable() -# define rgblight_timer_toggle() -#endif - -#ifdef RGBLIGHT_SPLIT -# define RGBLIGHT_STATUS_CHANGE_MODE (1 << 0) -# define RGBLIGHT_STATUS_CHANGE_HSVS (1 << 1) -# define RGBLIGHT_STATUS_CHANGE_TIMER (1 << 2) -# define RGBLIGHT_STATUS_ANIMATION_TICK (1 << 3) -# define RGBLIGHT_STATUS_CHANGE_LAYERS (1 << 4) - -typedef struct _rgblight_syncinfo_t { - rgblight_config_t config; - rgblight_status_t status; -} rgblight_syncinfo_t; - -/* for split keyboard master side */ -uint8_t rgblight_get_change_flags(void); -void rgblight_clear_change_flags(void); -void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo); -/* for split keyboard slave side */ -void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom); -#endif - -#ifdef RGBLIGHT_USE_TIMER - -typedef struct _animation_status_t { - uint16_t last_timer; - uint8_t delta; /* mode - base_mode */ - bool restart; - union { - uint16_t pos16; - uint8_t pos; - int8_t current_hue; - uint16_t current_offset; - }; -} animation_status_t; - -extern animation_status_t animation_status; - -void rgblight_effect_breathing(animation_status_t *anim); -void rgblight_effect_rainbow_mood(animation_status_t *anim); -void rgblight_effect_rainbow_swirl(animation_status_t *anim); -void rgblight_effect_snake(animation_status_t *anim); -void rgblight_effect_knight(animation_status_t *anim); -void rgblight_effect_christmas(animation_status_t *anim); -void rgblight_effect_rgbtest(animation_status_t *anim); -void rgblight_effect_alternating(animation_status_t *anim); -void rgblight_effect_twinkle(animation_status_t *anim); - -#endif diff --git a/quantum/rgblight/rgblight.c b/quantum/rgblight/rgblight.c new file mode 100644 index 000000000..148dae78f --- /dev/null +++ b/quantum/rgblight/rgblight.c @@ -0,0 +1,1390 @@ +/* Copyright 2016-2017 Yang Liu + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include +#include +#include "wait.h" +#include "progmem.h" +#include "sync_timer.h" +#include "rgblight.h" +#include "color.h" +#include "debug.h" +#include "led_tables.h" +#include +#ifdef EEPROM_ENABLE +# include "eeprom.h" +#endif +#ifdef VELOCIKEY_ENABLE +# include "velocikey.h" +#endif + +#ifndef MIN +# define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif +#ifndef MAX +# define MAX(a, b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifdef RGBLIGHT_SPLIT +/* for split keyboard */ +# define RGBLIGHT_SPLIT_SET_CHANGE_MODE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_MODE +# define RGBLIGHT_SPLIT_SET_CHANGE_HSVS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_HSVS +# define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS rgblight_status.change_flags |= (RGBLIGHT_STATUS_CHANGE_MODE | RGBLIGHT_STATUS_CHANGE_HSVS) +# define RGBLIGHT_SPLIT_SET_CHANGE_LAYERS rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_LAYERS +# define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE rgblight_status.change_flags |= RGBLIGHT_STATUS_CHANGE_TIMER +# define RGBLIGHT_SPLIT_ANIMATION_TICK rgblight_status.change_flags |= RGBLIGHT_STATUS_ANIMATION_TICK +#else +# define RGBLIGHT_SPLIT_SET_CHANGE_MODE +# define RGBLIGHT_SPLIT_SET_CHANGE_HSVS +# define RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS +# define RGBLIGHT_SPLIT_SET_CHANGE_LAYERS +# define RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE +# define RGBLIGHT_SPLIT_ANIMATION_TICK +#endif + +#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_SINGLE_DYNAMIC(sym) +#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_MULTI_DYNAMIC(sym) +#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##sym, +#define _RGBM_TMP_DYNAMIC(sym, msym) +static uint8_t static_effect_table[] = { +#include "rgblight_modes.h" +}; + +#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##msym, +#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_##msym, +static uint8_t mode_base_table[] = { + 0, // RGBLIGHT_MODE_zero +#include "rgblight_modes.h" +}; + +#if !defined(RGBLIGHT_DEFAULT_MODE) +# define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_STATIC_LIGHT +#endif + +#if !defined(RGBLIGHT_DEFAULT_HUE) +# define RGBLIGHT_DEFAULT_HUE 0 +#endif + +#if !defined(RGBLIGHT_DEFAULT_SAT) +# define RGBLIGHT_DEFAULT_SAT UINT8_MAX +#endif + +#if !defined(RGBLIGHT_DEFAULT_VAL) +# define RGBLIGHT_DEFAULT_VAL RGBLIGHT_LIMIT_VAL +#endif + +#if !defined(RGBLIGHT_DEFAULT_SPD) +# define RGBLIGHT_DEFAULT_SPD 0 +#endif + +static inline int is_static_effect(uint8_t mode) { return memchr(static_effect_table, mode, sizeof(static_effect_table)) != NULL; } + +#ifdef RGBLIGHT_LED_MAP +const uint8_t led_map[] PROGMEM = RGBLIGHT_LED_MAP; +#endif + +#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT +__attribute__((weak)) const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64}; +#endif + +rgblight_config_t rgblight_config; +rgblight_status_t rgblight_status = {.timer_enabled = false}; +bool is_rgblight_initialized = false; + +#ifdef RGBLIGHT_SLEEP +static bool is_suspended; +static bool pre_suspend_enabled; +#endif + +#ifdef RGBLIGHT_USE_TIMER +animation_status_t animation_status = {}; +#endif + +#ifndef LED_ARRAY +LED_TYPE led[RGBLED_NUM]; +# define LED_ARRAY led +#endif + +#ifdef RGBLIGHT_LAYERS +rgblight_segment_t const *const *rgblight_layers = NULL; +#endif + +rgblight_ranges_t rgblight_ranges = {0, RGBLED_NUM, 0, RGBLED_NUM, RGBLED_NUM}; + +void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds) { + rgblight_ranges.clipping_start_pos = start_pos; + rgblight_ranges.clipping_num_leds = num_leds; +} + +void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds) { + if (start_pos >= RGBLED_NUM) return; + if (start_pos + num_leds > RGBLED_NUM) return; + rgblight_ranges.effect_start_pos = start_pos; + rgblight_ranges.effect_end_pos = start_pos + num_leds; + rgblight_ranges.effect_num_leds = num_leds; +} + +__attribute__((weak)) RGB rgblight_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); } + +void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { + HSV hsv = {hue, sat, val}; + RGB rgb = rgblight_hsv_to_rgb(hsv); + setrgb(rgb.r, rgb.g, rgb.b, led1); +} + +void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { sethsv_raw(hue, sat, val > RGBLIGHT_LIMIT_VAL ? RGBLIGHT_LIMIT_VAL : val, led1); } + +void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { + led1->r = r; + led1->g = g; + led1->b = b; +#ifdef RGBW + led1->w = 0; +#endif +} + +void rgblight_check_config(void) { + /* Add some out of bound checks for RGB light config */ + + if (rgblight_config.mode < RGBLIGHT_MODE_STATIC_LIGHT) { + rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT; + } else if (rgblight_config.mode > RGBLIGHT_MODES) { + rgblight_config.mode = RGBLIGHT_MODES; + } + + if (rgblight_config.val > RGBLIGHT_LIMIT_VAL) { + rgblight_config.val = RGBLIGHT_LIMIT_VAL; + } +} + +uint32_t eeconfig_read_rgblight(void) { +#ifdef EEPROM_ENABLE + return eeprom_read_dword(EECONFIG_RGBLIGHT); +#else + return 0; +#endif +} + +void eeconfig_update_rgblight(uint32_t val) { +#ifdef EEPROM_ENABLE + rgblight_check_config(); + eeprom_update_dword(EECONFIG_RGBLIGHT, val); +#endif +} + +void eeconfig_update_rgblight_current(void) { eeconfig_update_rgblight(rgblight_config.raw); } + +void eeconfig_update_rgblight_default(void) { + rgblight_config.enable = 1; + rgblight_config.mode = RGBLIGHT_DEFAULT_MODE; + rgblight_config.hue = RGBLIGHT_DEFAULT_HUE; + rgblight_config.sat = RGBLIGHT_DEFAULT_SAT; + rgblight_config.val = RGBLIGHT_DEFAULT_VAL; + rgblight_config.speed = RGBLIGHT_DEFAULT_SPD; + RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; + eeconfig_update_rgblight(rgblight_config.raw); +} + +void eeconfig_debug_rgblight(void) { + dprintf("rgblight_config EEPROM:\n"); + dprintf("rgblight_config.enable = %d\n", rgblight_config.enable); + dprintf("rghlight_config.mode = %d\n", rgblight_config.mode); + dprintf("rgblight_config.hue = %d\n", rgblight_config.hue); + dprintf("rgblight_config.sat = %d\n", rgblight_config.sat); + dprintf("rgblight_config.val = %d\n", rgblight_config.val); + dprintf("rgblight_config.speed = %d\n", rgblight_config.speed); +} + +void rgblight_init(void) { + /* if already initialized, don't do it again. + If you must do it again, extern this and set to false, first. + This is a dirty, dirty hack until proper hooks can be added for keyboard startup. */ + if (is_rgblight_initialized) { + return; + } + + dprintf("rgblight_init called.\n"); + dprintf("rgblight_init start!\n"); + if (!eeconfig_is_enabled()) { + dprintf("rgblight_init eeconfig is not enabled.\n"); + eeconfig_init(); + eeconfig_update_rgblight_default(); + } + rgblight_config.raw = eeconfig_read_rgblight(); + RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; + if (!rgblight_config.mode) { + dprintf("rgblight_init rgblight_config.mode = 0. Write default values to EEPROM.\n"); + eeconfig_update_rgblight_default(); + rgblight_config.raw = eeconfig_read_rgblight(); + } + rgblight_check_config(); + + eeconfig_debug_rgblight(); // display current eeprom values + + rgblight_timer_init(); // setup the timer + + if (rgblight_config.enable) { + rgblight_mode_noeeprom(rgblight_config.mode); + } + + is_rgblight_initialized = true; +} + +void rgblight_reload_from_eeprom(void) { + /* Reset back to what we have in eeprom */ + rgblight_config.raw = eeconfig_read_rgblight(); + RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; + rgblight_check_config(); + eeconfig_debug_rgblight(); // display current eeprom values + if (rgblight_config.enable) { + rgblight_mode_noeeprom(rgblight_config.mode); + } +} + +uint32_t rgblight_read_dword(void) { return rgblight_config.raw; } + +void rgblight_update_dword(uint32_t dword) { + RGBLIGHT_SPLIT_SET_CHANGE_MODEHSVS; + rgblight_config.raw = dword; + if (rgblight_config.enable) + rgblight_mode_noeeprom(rgblight_config.mode); + else { + rgblight_timer_disable(); + rgblight_set(); + } +} + +void rgblight_increase(void) { + uint8_t mode = 0; + if (rgblight_config.mode < RGBLIGHT_MODES) { + mode = rgblight_config.mode + 1; + } + rgblight_mode(mode); +} +void rgblight_decrease(void) { + uint8_t mode = 0; + // Mode will never be < 1. If it ever is, eeprom needs to be initialized. + if (rgblight_config.mode > RGBLIGHT_MODE_STATIC_LIGHT) { + mode = rgblight_config.mode - 1; + } + rgblight_mode(mode); +} +void rgblight_step_helper(bool write_to_eeprom) { + uint8_t mode = 0; + mode = rgblight_config.mode + 1; + if (mode > RGBLIGHT_MODES) { + mode = 1; + } + rgblight_mode_eeprom_helper(mode, write_to_eeprom); +} +void rgblight_step_noeeprom(void) { rgblight_step_helper(false); } +void rgblight_step(void) { rgblight_step_helper(true); } +void rgblight_step_reverse_helper(bool write_to_eeprom) { + uint8_t mode = 0; + mode = rgblight_config.mode - 1; + if (mode < 1) { + mode = RGBLIGHT_MODES; + } + rgblight_mode_eeprom_helper(mode, write_to_eeprom); +} +void rgblight_step_reverse_noeeprom(void) { rgblight_step_reverse_helper(false); } +void rgblight_step_reverse(void) { rgblight_step_reverse_helper(true); } + +uint8_t rgblight_get_mode(void) { + if (!rgblight_config.enable) { + return false; + } + + return rgblight_config.mode; +} + +void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { + if (!rgblight_config.enable) { + return; + } + if (mode < RGBLIGHT_MODE_STATIC_LIGHT) { + rgblight_config.mode = RGBLIGHT_MODE_STATIC_LIGHT; + } else if (mode > RGBLIGHT_MODES) { + rgblight_config.mode = RGBLIGHT_MODES; + } else { + rgblight_config.mode = mode; + } + RGBLIGHT_SPLIT_SET_CHANGE_MODE; + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); + dprintf("rgblight mode [EEPROM]: %u\n", rgblight_config.mode); + } else { + dprintf("rgblight mode [NOEEPROM]: %u\n", rgblight_config.mode); + } + if (is_static_effect(rgblight_config.mode)) { + rgblight_timer_disable(); + } else { + rgblight_timer_enable(); + } +#ifdef RGBLIGHT_USE_TIMER + animation_status.restart = true; +#endif + rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); +} + +void rgblight_mode(uint8_t mode) { rgblight_mode_eeprom_helper(mode, true); } + +void rgblight_mode_noeeprom(uint8_t mode) { rgblight_mode_eeprom_helper(mode, false); } + +void rgblight_toggle(void) { + dprintf("rgblight toggle [EEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); + if (rgblight_config.enable) { + rgblight_disable(); + } else { + rgblight_enable(); + } +} + +void rgblight_toggle_noeeprom(void) { + dprintf("rgblight toggle [NOEEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); + if (rgblight_config.enable) { + rgblight_disable_noeeprom(); + } else { + rgblight_enable_noeeprom(); + } +} + +void rgblight_enable(void) { + rgblight_config.enable = 1; + // No need to update EEPROM here. rgblight_mode() will do that, actually + // eeconfig_update_rgblight(rgblight_config.raw); + dprintf("rgblight enable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); + rgblight_mode(rgblight_config.mode); +} + +void rgblight_enable_noeeprom(void) { + rgblight_config.enable = 1; + dprintf("rgblight enable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); + rgblight_mode_noeeprom(rgblight_config.mode); +} + +void rgblight_disable(void) { + rgblight_config.enable = 0; + eeconfig_update_rgblight(rgblight_config.raw); + dprintf("rgblight disable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); + rgblight_timer_disable(); + RGBLIGHT_SPLIT_SET_CHANGE_MODE; + wait_ms(50); + rgblight_set(); +} + +void rgblight_disable_noeeprom(void) { + rgblight_config.enable = 0; + dprintf("rgblight disable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); + rgblight_timer_disable(); + RGBLIGHT_SPLIT_SET_CHANGE_MODE; + wait_ms(50); + rgblight_set(); +} + +bool rgblight_is_enabled(void) { return rgblight_config.enable; } + +void rgblight_increase_hue_helper(bool write_to_eeprom) { + uint8_t hue = rgblight_config.hue + RGBLIGHT_HUE_STEP; + rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom); +} +void rgblight_increase_hue_noeeprom(void) { rgblight_increase_hue_helper(false); } +void rgblight_increase_hue(void) { rgblight_increase_hue_helper(true); } +void rgblight_decrease_hue_helper(bool write_to_eeprom) { + uint8_t hue = rgblight_config.hue - RGBLIGHT_HUE_STEP; + rgblight_sethsv_eeprom_helper(hue, rgblight_config.sat, rgblight_config.val, write_to_eeprom); +} +void rgblight_decrease_hue_noeeprom(void) { rgblight_decrease_hue_helper(false); } +void rgblight_decrease_hue(void) { rgblight_decrease_hue_helper(true); } +void rgblight_increase_sat_helper(bool write_to_eeprom) { + uint8_t sat = qadd8(rgblight_config.sat, RGBLIGHT_SAT_STEP); + rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom); +} +void rgblight_increase_sat_noeeprom(void) { rgblight_increase_sat_helper(false); } +void rgblight_increase_sat(void) { rgblight_increase_sat_helper(true); } +void rgblight_decrease_sat_helper(bool write_to_eeprom) { + uint8_t sat = qsub8(rgblight_config.sat, RGBLIGHT_SAT_STEP); + rgblight_sethsv_eeprom_helper(rgblight_config.hue, sat, rgblight_config.val, write_to_eeprom); +} +void rgblight_decrease_sat_noeeprom(void) { rgblight_decrease_sat_helper(false); } +void rgblight_decrease_sat(void) { rgblight_decrease_sat_helper(true); } +void rgblight_increase_val_helper(bool write_to_eeprom) { + uint8_t val = qadd8(rgblight_config.val, RGBLIGHT_VAL_STEP); + rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom); +} +void rgblight_increase_val_noeeprom(void) { rgblight_increase_val_helper(false); } +void rgblight_increase_val(void) { rgblight_increase_val_helper(true); } +void rgblight_decrease_val_helper(bool write_to_eeprom) { + uint8_t val = qsub8(rgblight_config.val, RGBLIGHT_VAL_STEP); + rgblight_sethsv_eeprom_helper(rgblight_config.hue, rgblight_config.sat, val, write_to_eeprom); +} +void rgblight_decrease_val_noeeprom(void) { rgblight_decrease_val_helper(false); } +void rgblight_decrease_val(void) { rgblight_decrease_val_helper(true); } + +void rgblight_increase_speed_helper(bool write_to_eeprom) { + if (rgblight_config.speed < 3) rgblight_config.speed++; + // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED? + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this + } +} +void rgblight_increase_speed(void) { rgblight_increase_speed_helper(true); } +void rgblight_increase_speed_noeeprom(void) { rgblight_increase_speed_helper(false); } + +void rgblight_decrease_speed_helper(bool write_to_eeprom) { + if (rgblight_config.speed > 0) rgblight_config.speed--; + // RGBLIGHT_SPLIT_SET_CHANGE_HSVS; // NEED?? + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this + } +} +void rgblight_decrease_speed(void) { rgblight_decrease_speed_helper(true); } +void rgblight_decrease_speed_noeeprom(void) { rgblight_decrease_speed_helper(false); } + +void rgblight_sethsv_noeeprom_old(uint8_t hue, uint8_t sat, uint8_t val) { + if (rgblight_config.enable) { + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); + } +} + +void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) { + if (rgblight_config.enable) { + rgblight_status.base_mode = mode_base_table[rgblight_config.mode]; + if (rgblight_config.mode == RGBLIGHT_MODE_STATIC_LIGHT) { + // same static color + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); + } else { + // all LEDs in same color + if (1 == 0) { // dummy + } +#ifdef RGBLIGHT_EFFECT_BREATHING + else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) { + // breathing mode, ignore the change of val, use in memory value instead + val = rgblight_config.val; + } +#endif +#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) { + // rainbow mood, ignore the change of hue + hue = rgblight_config.hue; + } +#endif +#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) { + // rainbow swirl, ignore the change of hue + hue = rgblight_config.hue; + } +#endif +#ifdef RGBLIGHT_EFFECT_STATIC_GRADIENT + else if (rgblight_status.base_mode == RGBLIGHT_MODE_STATIC_GRADIENT) { + // static gradient + uint8_t delta = rgblight_config.mode - rgblight_status.base_mode; + bool direction = (delta % 2) == 0; +# ifdef __AVR__ + // probably due to how pgm_read_word is defined for ARM, but the ARM compiler really hates this line + uint8_t range = pgm_read_word(&RGBLED_GRADIENT_RANGES[delta / 2]); +# else + uint8_t range = RGBLED_GRADIENT_RANGES[delta / 2]; +# endif + for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) { + uint8_t _hue = ((uint16_t)i * (uint16_t)range) / rgblight_ranges.effect_num_leds; + if (direction) { + _hue = hue + _hue; + } else { + _hue = hue - _hue; + } + dprintf("rgblight rainbow set hsv: %d,%d,%d,%u\n", i, _hue, direction, range); + sethsv(_hue, sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]); + } + rgblight_set(); + } +#endif + } +#ifdef RGBLIGHT_SPLIT + if (rgblight_config.hue != hue || rgblight_config.sat != sat || rgblight_config.val != val) { + RGBLIGHT_SPLIT_SET_CHANGE_HSVS; + } +#endif + rgblight_config.hue = hue; + rgblight_config.sat = sat; + rgblight_config.val = val; + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); + dprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + } else { + dprintf("rgblight set hsv [NOEEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + } + } +} + +void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, true); } + +void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_eeprom_helper(hue, sat, val, false); } + +uint8_t rgblight_get_speed(void) { return rgblight_config.speed; } + +void rgblight_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { + rgblight_config.speed = speed; + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); // EECONFIG needs to be increased to support this + dprintf("rgblight set speed [EEPROM]: %u\n", rgblight_config.speed); + } else { + dprintf("rgblight set speed [NOEEPROM]: %u\n", rgblight_config.speed); + } +} + +void rgblight_set_speed(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, true); } + +void rgblight_set_speed_noeeprom(uint8_t speed) { rgblight_set_speed_eeprom_helper(speed, false); } + +uint8_t rgblight_get_hue(void) { return rgblight_config.hue; } + +uint8_t rgblight_get_sat(void) { return rgblight_config.sat; } + +uint8_t rgblight_get_val(void) { return rgblight_config.val; } + +HSV rgblight_get_hsv(void) { return (HSV){rgblight_config.hue, rgblight_config.sat, rgblight_config.val}; } + +void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b) { + if (!rgblight_config.enable) { + return; + } + + for (uint8_t i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) { + led[i].r = r; + led[i].g = g; + led[i].b = b; +#ifdef RGBW + led[i].w = 0; +#endif + } + rgblight_set(); +} + +void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index) { + if (!rgblight_config.enable || index >= RGBLED_NUM) { + return; + } + + led[index].r = r; + led[index].g = g; + led[index].b = b; +#ifdef RGBW + led[index].w = 0; +#endif + rgblight_set(); +} + +void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index) { + if (!rgblight_config.enable) { + return; + } + + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + rgblight_setrgb_at(tmp_led.r, tmp_led.g, tmp_led.b, index); +} + +#if defined(RGBLIGHT_EFFECT_BREATHING) || defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) || defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) || defined(RGBLIGHT_EFFECT_SNAKE) || defined(RGBLIGHT_EFFECT_KNIGHT) || defined(RGBLIGHT_EFFECT_TWINKLE) + +static uint8_t get_interval_time(const uint8_t *default_interval_address, uint8_t velocikey_min, uint8_t velocikey_max) { + return +# ifdef VELOCIKEY_ENABLE + velocikey_enabled() ? velocikey_match_speed(velocikey_min, velocikey_max) : +# endif + pgm_read_byte(default_interval_address); +} + +#endif + +void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end) { + if (!rgblight_config.enable || start < 0 || start >= end || end > RGBLED_NUM) { + return; + } + + for (uint8_t i = start; i < end; i++) { + led[i].r = r; + led[i].g = g; + led[i].b = b; +#ifdef RGBW + led[i].w = 0; +#endif + } + rgblight_set(); + wait_ms(1); +} + +void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end) { + if (!rgblight_config.enable) { + return; + } + + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + rgblight_setrgb_range(tmp_led.r, tmp_led.g, tmp_led.b, start, end); +} + +#ifndef RGBLIGHT_SPLIT +void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, 0, (uint8_t)RGBLED_NUM / 2); } + +void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b) { rgblight_setrgb_range(r, g, b, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM); } + +void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, 0, (uint8_t)RGBLED_NUM / 2); } + +void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val) { rgblight_sethsv_range(hue, sat, val, (uint8_t)RGBLED_NUM / 2, (uint8_t)RGBLED_NUM); } +#endif // ifndef RGBLIGHT_SPLIT + +#ifdef RGBLIGHT_LAYERS +void rgblight_set_layer_state(uint8_t layer, bool enabled) { + rgblight_layer_mask_t mask = (rgblight_layer_mask_t)1 << layer; + if (enabled) { + rgblight_status.enabled_layer_mask |= mask; + } else { + rgblight_status.enabled_layer_mask &= ~mask; + } + RGBLIGHT_SPLIT_SET_CHANGE_LAYERS; + // Static modes don't have a ticker running to update the LEDs + if (rgblight_status.timer_enabled == false) { + rgblight_mode_noeeprom(rgblight_config.mode); + } + +# ifdef RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF + // If not enabled, then nothing else will actually set the LEDs... + if (!rgblight_config.enable) { + rgblight_set(); + } +# endif +} + +bool rgblight_get_layer_state(uint8_t layer) { + rgblight_layer_mask_t mask = (rgblight_layer_mask_t)1 << layer; + return (rgblight_status.enabled_layer_mask & mask) != 0; +} + +// Write any enabled LED layers into the buffer +static void rgblight_layers_write(void) { +# ifdef RGBLIGHT_LAYERS_RETAIN_VAL + uint8_t current_val = rgblight_get_val(); +# endif + uint8_t i = 0; + // For each layer + for (const rgblight_segment_t *const *layer_ptr = rgblight_layers; i < RGBLIGHT_MAX_LAYERS; layer_ptr++, i++) { + if (!rgblight_get_layer_state(i)) { + continue; // Layer is disabled + } + const rgblight_segment_t *segment_ptr = pgm_read_ptr(layer_ptr); + if (segment_ptr == NULL) { + break; // No more layers + } + // For each segment + while (1) { + rgblight_segment_t segment; + memcpy_P(&segment, segment_ptr, sizeof(rgblight_segment_t)); + if (segment.index == RGBLIGHT_END_SEGMENT_INDEX) { + break; // No more segments + } + // Write segment.count LEDs + LED_TYPE *const limit = &led[MIN(segment.index + segment.count, RGBLED_NUM)]; + for (LED_TYPE *led_ptr = &led[segment.index]; led_ptr < limit; led_ptr++) { +# ifdef RGBLIGHT_LAYERS_RETAIN_VAL + sethsv(segment.hue, segment.sat, current_val, led_ptr); +# else + sethsv(segment.hue, segment.sat, segment.val, led_ptr); +# endif + } + segment_ptr++; + } + } +} + +# ifdef RGBLIGHT_LAYER_BLINK +rgblight_layer_mask_t _blinking_layer_mask = 0; +static uint16_t _repeat_timer; +static uint8_t _times_remaining; +static uint16_t _dur; + +void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms) { rgblight_blink_layer_repeat(layer, duration_ms, 1); } + +void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times) { + _times_remaining = times * 2; + _dur = duration_ms; + + rgblight_set_layer_state(layer, true); + _times_remaining--; + _blinking_layer_mask |= (rgblight_layer_mask_t)1 << layer; + _repeat_timer = sync_timer_read() + duration_ms; +} + +void rgblight_blink_layer_repeat_helper(void) { + if (_blinking_layer_mask != 0 && timer_expired(sync_timer_read(), _repeat_timer)) { + for (uint8_t layer = 0; layer < RGBLIGHT_MAX_LAYERS; layer++) { + if ((_blinking_layer_mask & (rgblight_layer_mask_t)1 << layer) != 0 && _times_remaining > 0) { + if (_times_remaining % 2 == 1) { + rgblight_set_layer_state(layer, false); + } else { + rgblight_set_layer_state(layer, true); + } + _times_remaining--; + _repeat_timer = sync_timer_read() + _dur; + } + } + if (_times_remaining <= 0) { + _blinking_layer_mask = 0; + } + } +} +# endif + +#endif + +#ifdef RGBLIGHT_SLEEP + +void rgblight_suspend(void) { + rgblight_timer_disable(); + if (!is_suspended) { + is_suspended = true; + pre_suspend_enabled = rgblight_config.enable; + +# ifdef RGBLIGHT_LAYER_BLINK + // make sure any layer blinks don't come back after suspend + rgblight_status.enabled_layer_mask &= ~_blinking_layer_mask; + _blinking_layer_mask = 0; +# endif + + rgblight_disable_noeeprom(); + } +} + +void rgblight_wakeup(void) { + is_suspended = false; + + if (pre_suspend_enabled) { + rgblight_enable_noeeprom(); + } +# ifdef RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF + // Need this or else the LEDs won't be set + else if (rgblight_status.enabled_layer_mask != 0) { + rgblight_set(); + } +# endif + + rgblight_timer_enable(); +} + +#endif + +__attribute__((weak)) void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) { ws2812_setleds(start_led, num_leds); } + +#ifndef RGBLIGHT_CUSTOM_DRIVER + +void rgblight_set(void) { + LED_TYPE *start_led; + uint8_t num_leds = rgblight_ranges.clipping_num_leds; + + if (!rgblight_config.enable) { + for (uint8_t i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; +# ifdef RGBW + led[i].w = 0; +# endif + } + } + +# ifdef RGBLIGHT_LAYERS + if (rgblight_layers != NULL +# if !defined(RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF) + && rgblight_config.enable +# elif defined(RGBLIGHT_SLEEP) + && !is_suspended +# endif + ) { + rgblight_layers_write(); + } +# endif + +# ifdef RGBLIGHT_LED_MAP + LED_TYPE led0[RGBLED_NUM]; + for (uint8_t i = 0; i < RGBLED_NUM; i++) { + led0[i] = led[pgm_read_byte(&led_map[i])]; + } + start_led = led0 + rgblight_ranges.clipping_start_pos; +# else + start_led = led + rgblight_ranges.clipping_start_pos; +# endif + +# ifdef RGBW + for (uint8_t i = 0; i < num_leds; i++) { + convert_rgb_to_rgbw(&start_led[i]); + } +# endif + rgblight_call_driver(start_led, num_leds); +} +#endif + +#ifdef RGBLIGHT_SPLIT +/* for split keyboard master side */ +uint8_t rgblight_get_change_flags(void) { return rgblight_status.change_flags; } + +void rgblight_clear_change_flags(void) { rgblight_status.change_flags = 0; } + +void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo) { + syncinfo->config = rgblight_config; + syncinfo->status = rgblight_status; +} + +/* for split keyboard slave side */ +void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom) { +# ifdef RGBLIGHT_LAYERS + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_LAYERS) { + rgblight_status.enabled_layer_mask = syncinfo->status.enabled_layer_mask; + } +# endif + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_MODE) { + if (syncinfo->config.enable) { + rgblight_config.enable = 1; // == rgblight_enable_noeeprom(); + rgblight_mode_eeprom_helper(syncinfo->config.mode, write_to_eeprom); + } else { + rgblight_disable_noeeprom(); + } + } + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_HSVS) { + rgblight_sethsv_eeprom_helper(syncinfo->config.hue, syncinfo->config.sat, syncinfo->config.val, write_to_eeprom); + // rgblight_config.speed = config->speed; // NEED??? + } +# ifdef RGBLIGHT_USE_TIMER + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_CHANGE_TIMER) { + if (syncinfo->status.timer_enabled) { + rgblight_timer_enable(); + } else { + rgblight_timer_disable(); + } + } +# ifndef RGBLIGHT_SPLIT_NO_ANIMATION_SYNC + if (syncinfo->status.change_flags & RGBLIGHT_STATUS_ANIMATION_TICK) { + animation_status.restart = true; + } +# endif /* RGBLIGHT_SPLIT_NO_ANIMATION_SYNC */ +# endif /* RGBLIGHT_USE_TIMER */ +} +#endif /* RGBLIGHT_SPLIT */ + +#ifdef RGBLIGHT_USE_TIMER + +typedef void (*effect_func_t)(animation_status_t *anim); + +// Animation timer -- use system timer (AVR Timer0) +void rgblight_timer_init(void) { + rgblight_status.timer_enabled = false; + RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE; +} +void rgblight_timer_enable(void) { + if (!is_static_effect(rgblight_config.mode)) { + rgblight_status.timer_enabled = true; + } + animation_status.last_timer = sync_timer_read(); + RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE; + dprintf("rgblight timer enabled.\n"); +} +void rgblight_timer_disable(void) { + rgblight_status.timer_enabled = false; + RGBLIGHT_SPLIT_SET_CHANGE_TIMER_ENABLE; + dprintf("rgblight timer disable.\n"); +} +void rgblight_timer_toggle(void) { + dprintf("rgblight timer toggle.\n"); + if (rgblight_status.timer_enabled) { + rgblight_timer_disable(); + } else { + rgblight_timer_enable(); + } +} + +void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) { + rgblight_enable(); + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); + rgblight_setrgb(r, g, b); +} + +static void rgblight_effect_dummy(animation_status_t *anim) { + // do nothing + /******** + dprintf("rgblight_task() what happened?\n"); + dprintf("is_static_effect %d\n", is_static_effect(rgblight_config.mode)); + dprintf("mode = %d, base_mode = %d, timer_enabled %d, ", + rgblight_config.mode, rgblight_status.base_mode, + rgblight_status.timer_enabled); + dprintf("last_timer = %d\n",anim->last_timer); + **/ +} + +void rgblight_task(void) { + if (rgblight_status.timer_enabled) { + effect_func_t effect_func = rgblight_effect_dummy; + uint16_t interval_time = 2000; // dummy interval + uint8_t delta = rgblight_config.mode - rgblight_status.base_mode; + animation_status.delta = delta; + + // static light mode, do nothing here + if (1 == 0) { // dummy + } +# ifdef RGBLIGHT_EFFECT_BREATHING + else if (rgblight_status.base_mode == RGBLIGHT_MODE_BREATHING) { + // breathing mode + interval_time = get_interval_time(&RGBLED_BREATHING_INTERVALS[delta], 1, 100); + effect_func = rgblight_effect_breathing; + } +# endif +# ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_MOOD) { + // rainbow mood mode + interval_time = get_interval_time(&RGBLED_RAINBOW_MOOD_INTERVALS[delta], 5, 100); + effect_func = rgblight_effect_rainbow_mood; + } +# endif +# ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RAINBOW_SWIRL) { + // rainbow swirl mode + interval_time = get_interval_time(&RGBLED_RAINBOW_SWIRL_INTERVALS[delta / 2], 1, 100); + effect_func = rgblight_effect_rainbow_swirl; + } +# endif +# ifdef RGBLIGHT_EFFECT_SNAKE + else if (rgblight_status.base_mode == RGBLIGHT_MODE_SNAKE) { + // snake mode + interval_time = get_interval_time(&RGBLED_SNAKE_INTERVALS[delta / 2], 1, 200); + effect_func = rgblight_effect_snake; + } +# endif +# ifdef RGBLIGHT_EFFECT_KNIGHT + else if (rgblight_status.base_mode == RGBLIGHT_MODE_KNIGHT) { + // knight mode + interval_time = get_interval_time(&RGBLED_KNIGHT_INTERVALS[delta], 5, 100); + effect_func = rgblight_effect_knight; + } +# endif +# ifdef RGBLIGHT_EFFECT_CHRISTMAS + else if (rgblight_status.base_mode == RGBLIGHT_MODE_CHRISTMAS) { + // christmas mode + interval_time = RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL; + effect_func = (effect_func_t)rgblight_effect_christmas; + } +# endif +# ifdef RGBLIGHT_EFFECT_RGB_TEST + else if (rgblight_status.base_mode == RGBLIGHT_MODE_RGB_TEST) { + // RGB test mode + interval_time = pgm_read_word(&RGBLED_RGBTEST_INTERVALS[0]); + effect_func = (effect_func_t)rgblight_effect_rgbtest; + } +# endif +# ifdef RGBLIGHT_EFFECT_ALTERNATING + else if (rgblight_status.base_mode == RGBLIGHT_MODE_ALTERNATING) { + interval_time = 500; + effect_func = (effect_func_t)rgblight_effect_alternating; + } +# endif +# ifdef RGBLIGHT_EFFECT_TWINKLE + else if (rgblight_status.base_mode == RGBLIGHT_MODE_TWINKLE) { + interval_time = get_interval_time(&RGBLED_TWINKLE_INTERVALS[delta % 3], 5, 30); + effect_func = (effect_func_t)rgblight_effect_twinkle; + } +# endif + if (animation_status.restart) { + animation_status.restart = false; + animation_status.last_timer = sync_timer_read(); + animation_status.pos16 = 0; // restart signal to local each effect + } + uint16_t now = sync_timer_read(); + if (timer_expired(now, animation_status.last_timer)) { +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + static uint16_t report_last_timer = 0; + static bool tick_flag = false; + uint16_t oldpos16; + if (tick_flag) { + tick_flag = false; + if (timer_expired(now, report_last_timer)) { + report_last_timer += 30000; + dprintf("rgblight animation tick report to slave\n"); + RGBLIGHT_SPLIT_ANIMATION_TICK; + } + } + oldpos16 = animation_status.pos16; +# endif + animation_status.last_timer += interval_time; + effect_func(&animation_status); +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + if (animation_status.pos16 == 0 && oldpos16 != 0) { + tick_flag = true; + } +# endif + } + } + +# ifdef RGBLIGHT_LAYER_BLINK + rgblight_blink_layer_repeat_helper(); +# endif +} + +#endif /* RGBLIGHT_USE_TIMER */ + +#if defined(RGBLIGHT_EFFECT_BREATHING) || defined(RGBLIGHT_EFFECT_TWINKLE) + +# ifndef RGBLIGHT_EFFECT_BREATHE_CENTER +# ifndef RGBLIGHT_BREATHE_TABLE_SIZE +# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256 or 128 or 64 +# endif +# include +# endif + +static uint8_t breathe_calc(uint8_t pos) { + // http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/ +# ifdef RGBLIGHT_EFFECT_BREATHE_TABLE + return pgm_read_byte(&rgblight_effect_breathe_table[pos / table_scale]); +# else + return (exp(sin((pos / 255.0) * M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER / M_E) * (RGBLIGHT_EFFECT_BREATHE_MAX / (M_E - 1 / M_E)); +# endif +} + +#endif + +// Effects +#ifdef RGBLIGHT_EFFECT_BREATHING + +__attribute__((weak)) const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; + +void rgblight_effect_breathing(animation_status_t *anim) { + uint8_t val = breathe_calc(anim->pos); + rgblight_sethsv_noeeprom_old(rgblight_config.hue, rgblight_config.sat, val); + anim->pos = (anim->pos + 1); +} +#endif + +#ifdef RGBLIGHT_EFFECT_RAINBOW_MOOD +__attribute__((weak)) const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30}; + +void rgblight_effect_rainbow_mood(animation_status_t *anim) { + rgblight_sethsv_noeeprom_old(anim->current_hue, rgblight_config.sat, rgblight_config.val); + anim->current_hue++; +} +#endif + +#ifdef RGBLIGHT_EFFECT_RAINBOW_SWIRL +# ifndef RGBLIGHT_RAINBOW_SWIRL_RANGE +# define RGBLIGHT_RAINBOW_SWIRL_RANGE 255 +# endif + +__attribute__((weak)) const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[] PROGMEM = {100, 50, 20}; + +void rgblight_effect_rainbow_swirl(animation_status_t *anim) { + uint8_t hue; + uint8_t i; + + for (i = 0; i < rgblight_ranges.effect_num_leds; i++) { + hue = (RGBLIGHT_RAINBOW_SWIRL_RANGE / rgblight_ranges.effect_num_leds * i + anim->current_hue); + sethsv(hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]); + } + rgblight_set(); + + if (anim->delta % 2) { + anim->current_hue++; + } else { + anim->current_hue--; + } +} +#endif + +#ifdef RGBLIGHT_EFFECT_SNAKE +__attribute__((weak)) const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20}; + +void rgblight_effect_snake(animation_status_t *anim) { + static uint8_t pos = 0; + uint8_t i, j; + int8_t k; + int8_t increment = 1; + + if (anim->delta % 2) { + increment = -1; + } + +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + if (anim->pos == 0) { // restart signal + if (increment == 1) { + pos = rgblight_ranges.effect_num_leds - 1; + } else { + pos = 0; + } + anim->pos = 1; + } +# endif + + for (i = 0; i < rgblight_ranges.effect_num_leds; i++) { + LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos; + ledp->r = 0; + ledp->g = 0; + ledp->b = 0; +# ifdef RGBW + ledp->w = 0; +# endif + for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { + k = pos + j * increment; + if (k > RGBLED_NUM) { + k = k % RGBLED_NUM; + } + if (k < 0) { + k = k + rgblight_ranges.effect_num_leds; + } + if (i == k) { + sethsv(rgblight_config.hue, rgblight_config.sat, (uint8_t)(rgblight_config.val * (RGBLIGHT_EFFECT_SNAKE_LENGTH - j) / RGBLIGHT_EFFECT_SNAKE_LENGTH), ledp); + } + } + } + rgblight_set(); + if (increment == 1) { + if (pos - 1 < 0) { + pos = rgblight_ranges.effect_num_leds - 1; +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + anim->pos = 0; +# endif + } else { + pos -= 1; +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + anim->pos = 1; +# endif + } + } else { + pos = (pos + 1) % rgblight_ranges.effect_num_leds; +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + anim->pos = pos; +# endif + } +} +#endif + +#ifdef RGBLIGHT_EFFECT_KNIGHT +__attribute__((weak)) const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31}; + +void rgblight_effect_knight(animation_status_t *anim) { + static int8_t low_bound = 0; + static int8_t high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1; + static int8_t increment = 1; + uint8_t i, cur; + +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + if (anim->pos == 0) { // restart signal + anim->pos = 1; + low_bound = 0; + high_bound = RGBLIGHT_EFFECT_KNIGHT_LENGTH - 1; + increment = 1; + } +# endif + // Set all the LEDs to 0 + for (i = rgblight_ranges.effect_start_pos; i < rgblight_ranges.effect_end_pos; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; +# ifdef RGBW + led[i].w = 0; +# endif + } + // Determine which LEDs should be lit up + for (i = 0; i < RGBLIGHT_EFFECT_KNIGHT_LED_NUM; i++) { + cur = (i + RGBLIGHT_EFFECT_KNIGHT_OFFSET) % rgblight_ranges.effect_num_leds + rgblight_ranges.effect_start_pos; + + if (i >= low_bound && i <= high_bound) { + sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, (LED_TYPE *)&led[cur]); + } else { + led[cur].r = 0; + led[cur].g = 0; + led[cur].b = 0; +# ifdef RGBW + led[cur].w = 0; +# endif + } + } + rgblight_set(); + + // Move from low_bound to high_bound changing the direction we increment each + // time a boundary is hit. + low_bound += increment; + high_bound += increment; + + if (high_bound <= 0 || low_bound >= RGBLIGHT_EFFECT_KNIGHT_LED_NUM - 1) { + increment = -increment; +# if defined(RGBLIGHT_SPLIT) && !defined(RGBLIGHT_SPLIT_NO_ANIMATION_SYNC) + if (increment == 1) { + anim->pos = 0; + } +# endif + } +} +#endif + +#ifdef RGBLIGHT_EFFECT_CHRISTMAS +# define CUBED(x) ((x) * (x) * (x)) + +/** + * Christmas lights effect, with a smooth animation between red & green. + */ +void rgblight_effect_christmas(animation_status_t *anim) { + static int8_t increment = 1; + const uint8_t max_pos = 32; + const uint8_t hue_green = 85; + + uint32_t xa; + uint8_t hue, val; + uint8_t i; + + // The effect works by animating anim->pos from 0 to 32 and back to 0. + // The pos is used in a cubic bezier formula to ease-in-out between red and green, leaving the interpolated colors visible as short as possible. + xa = CUBED((uint32_t)anim->pos); + hue = ((uint32_t)hue_green) * xa / (xa + CUBED((uint32_t)(max_pos - anim->pos))); + // Additionally, these interpolated colors get shown with a slightly darker value, to make them less prominent than the main colors. + val = 255 - (3 * (hue < hue_green / 2 ? hue : hue_green - hue) / 2); + + for (i = 0; i < rgblight_ranges.effect_num_leds; i++) { + uint8_t local_hue = (i / RGBLIGHT_EFFECT_CHRISTMAS_STEP) % 2 ? hue : hue_green - hue; + sethsv(local_hue, rgblight_config.sat, val, (LED_TYPE *)&led[i + rgblight_ranges.effect_start_pos]); + } + rgblight_set(); + + if (anim->pos == 0) { + increment = 1; + } else if (anim->pos == max_pos) { + increment = -1; + } + anim->pos += increment; +} +#endif + +#ifdef RGBLIGHT_EFFECT_RGB_TEST +__attribute__((weak)) const uint16_t RGBLED_RGBTEST_INTERVALS[] PROGMEM = {1024}; + +void rgblight_effect_rgbtest(animation_status_t *anim) { + static uint8_t maxval = 0; + uint8_t g; + uint8_t r; + uint8_t b; + + if (maxval == 0) { + LED_TYPE tmp_led; + sethsv(0, 255, RGBLIGHT_LIMIT_VAL, &tmp_led); + maxval = tmp_led.r; + } + g = r = b = 0; + switch (anim->pos) { + case 0: + r = maxval; + break; + case 1: + g = maxval; + break; + case 2: + b = maxval; + break; + } + rgblight_setrgb(r, g, b); + anim->pos = (anim->pos + 1) % 3; +} +#endif + +#ifdef RGBLIGHT_EFFECT_ALTERNATING +void rgblight_effect_alternating(animation_status_t *anim) { + for (int i = 0; i < rgblight_ranges.effect_num_leds; i++) { + LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos; + if (i < rgblight_ranges.effect_num_leds / 2 && anim->pos) { + sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp); + } else if (i >= rgblight_ranges.effect_num_leds / 2 && !anim->pos) { + sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, ledp); + } else { + sethsv(rgblight_config.hue, rgblight_config.sat, 0, ledp); + } + } + rgblight_set(); + anim->pos = (anim->pos + 1) % 2; +} +#endif + +#ifdef RGBLIGHT_EFFECT_TWINKLE +__attribute__((weak)) const uint8_t RGBLED_TWINKLE_INTERVALS[] PROGMEM = {30, 15, 5}; + +typedef struct PACKED { + HSV hsv; + uint8_t life; + uint8_t max_life; +} TwinkleState; + +static TwinkleState led_twinkle_state[RGBLED_NUM]; + +void rgblight_effect_twinkle(animation_status_t *anim) { + const bool random_color = anim->delta / 3; + const bool restart = anim->pos == 0; + anim->pos = 1; + + const uint8_t bottom = breathe_calc(0); + const uint8_t top = breathe_calc(127); + + uint8_t frac(uint8_t n, uint8_t d) { return (uint16_t)255 * n / d; } + uint8_t scale(uint16_t v, uint8_t scale) { return (v * scale) >> 8; } + + for (uint8_t i = 0; i < rgblight_ranges.effect_num_leds; i++) { + TwinkleState *t = &(led_twinkle_state[i]); + HSV * c = &(t->hsv); + + if (!random_color) { + c->h = rgblight_config.hue; + c->s = rgblight_config.sat; + } + + if (restart) { + // Restart + t->life = 0; + c->v = 0; + } else if (t->life) { + // This LED is already on, either brightening or dimming + t->life--; + uint8_t unscaled = frac(breathe_calc(frac(t->life, t->max_life)) - bottom, top - bottom); + c->v = scale(rgblight_config.val, unscaled); + } else if (rand() < scale((uint16_t)RAND_MAX * RGBLIGHT_EFFECT_TWINKLE_PROBABILITY, 127 + rgblight_config.val / 2)) { + // This LED is off, but was randomly selected to start brightening + if (random_color) { + c->h = rand() % 0xFF; + c->s = (rand() % (rgblight_config.sat / 2)) + (rgblight_config.sat / 2); + } + c->v = 0; + t->max_life = MAX(20, MIN(RGBLIGHT_EFFECT_TWINKLE_LIFE, rgblight_config.val)); + t->life = t->max_life; + } else { + // This LED is off, and was NOT selected to start brightening + } + + LED_TYPE *ledp = led + i + rgblight_ranges.effect_start_pos; + sethsv(c->h, c->s, c->v, ledp); + } + + rgblight_set(); +} +#endif diff --git a/quantum/rgblight/rgblight.h b/quantum/rgblight/rgblight.h new file mode 100644 index 000000000..5b90b8f49 --- /dev/null +++ b/quantum/rgblight/rgblight.h @@ -0,0 +1,434 @@ +/* Copyright 2017 Yang Liu + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/***** rgblight_mode(mode)/rgblight_mode_noeeprom(mode) **** + + old mode number (before 0.6.117) to new mode name table + +|-----------------|-----------------------------------| +| old mode number | new mode name | +|-----------------|-----------------------------------| +| 1 | RGBLIGHT_MODE_STATIC_LIGHT | +| 2 | RGBLIGHT_MODE_BREATHING | +| 3 | RGBLIGHT_MODE_BREATHING + 1 | +| 4 | RGBLIGHT_MODE_BREATHING + 2 | +| 5 | RGBLIGHT_MODE_BREATHING + 3 | +| 6 | RGBLIGHT_MODE_RAINBOW_MOOD | +| 7 | RGBLIGHT_MODE_RAINBOW_MOOD + 1 | +| 8 | RGBLIGHT_MODE_RAINBOW_MOOD + 2 | +| 9 | RGBLIGHT_MODE_RAINBOW_SWIRL | +| 10 | RGBLIGHT_MODE_RAINBOW_SWIRL + 1 | +| 11 | RGBLIGHT_MODE_RAINBOW_SWIRL + 2 | +| 12 | RGBLIGHT_MODE_RAINBOW_SWIRL + 3 | +| 13 | RGBLIGHT_MODE_RAINBOW_SWIRL + 4 | +| 14 | RGBLIGHT_MODE_RAINBOW_SWIRL + 5 | +| 15 | RGBLIGHT_MODE_SNAKE | +| 16 | RGBLIGHT_MODE_SNAKE + 1 | +| 17 | RGBLIGHT_MODE_SNAKE + 2 | +| 18 | RGBLIGHT_MODE_SNAKE + 3 | +| 19 | RGBLIGHT_MODE_SNAKE + 4 | +| 20 | RGBLIGHT_MODE_SNAKE + 5 | +| 21 | RGBLIGHT_MODE_KNIGHT | +| 22 | RGBLIGHT_MODE_KNIGHT + 1 | +| 23 | RGBLIGHT_MODE_KNIGHT + 2 | +| 24 | RGBLIGHT_MODE_CHRISTMAS | +| 25 | RGBLIGHT_MODE_STATIC_GRADIENT | +| 26 | RGBLIGHT_MODE_STATIC_GRADIENT + 1 | +| 27 | RGBLIGHT_MODE_STATIC_GRADIENT + 2 | +| 28 | RGBLIGHT_MODE_STATIC_GRADIENT + 3 | +| 29 | RGBLIGHT_MODE_STATIC_GRADIENT + 4 | +| 30 | RGBLIGHT_MODE_STATIC_GRADIENT + 5 | +| 31 | RGBLIGHT_MODE_STATIC_GRADIENT + 6 | +| 32 | RGBLIGHT_MODE_STATIC_GRADIENT + 7 | +| 33 | RGBLIGHT_MODE_STATIC_GRADIENT + 8 | +| 34 | RGBLIGHT_MODE_STATIC_GRADIENT + 9 | +| 35 | RGBLIGHT_MODE_RGB_TEST | +| 36 | RGBLIGHT_MODE_ALTERNATING | +| 37 | RGBLIGHT_MODE_TWINKLE | +| 38 | RGBLIGHT_MODE_TWINKLE + 1 | +| 39 | RGBLIGHT_MODE_TWINKLE + 2 | +| 40 | RGBLIGHT_MODE_TWINKLE + 3 | +| 41 | RGBLIGHT_MODE_TWINKLE + 4 | +| 42 | RGBLIGHT_MODE_TWINKLE + 5 | +|-----------------|-----------------------------------| + *****/ + +#ifdef RGBLIGHT_ANIMATIONS +// for backward compatibility +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_KNIGHT +# define RGBLIGHT_EFFECT_CHRISTMAS +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +# define RGBLIGHT_EFFECT_RGB_TEST +# define RGBLIGHT_EFFECT_ALTERNATING +#endif + +#ifdef RGBLIGHT_STATIC_PATTERNS +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +#endif + +// clang-format off + +// check dynamic animation effects chose ? +#if defined(RGBLIGHT_EFFECT_BREATHING) \ + || defined(RGBLIGHT_EFFECT_RAINBOW_MOOD) \ + || defined(RGBLIGHT_EFFECT_RAINBOW_SWIRL) \ + || defined(RGBLIGHT_EFFECT_SNAKE) \ + || defined(RGBLIGHT_EFFECT_KNIGHT) \ + || defined(RGBLIGHT_EFFECT_CHRISTMAS) \ + || defined(RGBLIGHT_EFFECT_RGB_TEST) \ + || defined(RGBLIGHT_EFFECT_ALTERNATING) \ + || defined(RGBLIGHT_EFFECT_TWINKLE) +# define RGBLIGHT_USE_TIMER +#endif + +// clang-format on + +#define _RGBM_SINGLE_STATIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_SINGLE_DYNAMIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_MULTI_STATIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_MULTI_DYNAMIC(sym) RGBLIGHT_MODE_##sym, +#define _RGBM_TMP_STATIC(sym, msym) RGBLIGHT_MODE_##sym, +#define _RGBM_TMP_DYNAMIC(sym, msym) RGBLIGHT_MODE_##sym, +enum RGBLIGHT_EFFECT_MODE { + RGBLIGHT_MODE_zero = 0, +#include "rgblight_modes.h" + RGBLIGHT_MODE_last +}; + +#define RGBLIGHT_MODES (RGBLIGHT_MODE_last - 1) + +// sample: #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 + +#ifndef RGBLIGHT_EFFECT_BREATHE_MAX +# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0-255 +#endif + +#ifndef RGBLIGHT_EFFECT_SNAKE_LENGTH +# define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 +#endif + +#ifndef RGBLIGHT_EFFECT_KNIGHT_LENGTH +# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 +#endif + +#ifndef RGBLIGHT_EFFECT_KNIGHT_OFFSET +# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 +#endif + +#ifndef RGBLIGHT_EFFECT_KNIGHT_LED_NUM +# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM (rgblight_ranges.effect_num_leds) +#endif + +#ifndef RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL +# define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 40 +#endif + +#ifndef RGBLIGHT_EFFECT_CHRISTMAS_STEP +# define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 +#endif + +#ifndef RGBLIGHT_EFFECT_TWINKLE_LIFE +# define RGBLIGHT_EFFECT_TWINKLE_LIFE 200 +#endif + +#ifndef RGBLIGHT_EFFECT_TWINKLE_PROBABILITY +# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 127 +#endif + +#ifndef RGBLIGHT_HUE_STEP +# define RGBLIGHT_HUE_STEP 8 +#endif +#ifndef RGBLIGHT_SAT_STEP +# define RGBLIGHT_SAT_STEP 17 +#endif +#ifndef RGBLIGHT_VAL_STEP +# define RGBLIGHT_VAL_STEP 17 +#endif +#ifndef RGBLIGHT_LIMIT_VAL +# define RGBLIGHT_LIMIT_VAL 255 +#endif + +#include +#include +#include "progmem.h" +#include "eeconfig.h" +#include "ws2812.h" +#include "color.h" +#include "rgblight_list.h" + +#ifdef RGBLIGHT_LAYERS +typedef struct { + uint8_t index; // The first LED to light + uint8_t count; // The number of LEDs to light + uint8_t hue; + uint8_t sat; + uint8_t val; +} rgblight_segment_t; + +# define RGBLIGHT_END_SEGMENT_INDEX (255) +# define RGBLIGHT_END_SEGMENTS \ + { RGBLIGHT_END_SEGMENT_INDEX, 0, 0, 0 } +# ifndef RGBLIGHT_MAX_LAYERS +# define RGBLIGHT_MAX_LAYERS 8 +# endif +# if RGBLIGHT_MAX_LAYERS <= 0 +# error invalid RGBLIGHT_MAX_LAYERS value (must be >= 1) +# elif RGBLIGHT_MAX_LAYERS <= 8 +typedef uint8_t rgblight_layer_mask_t; +# elif RGBLIGHT_MAX_LAYERS <= 16 +typedef uint16_t rgblight_layer_mask_t; +# elif RGBLIGHT_MAX_LAYERS <= 32 +typedef uint32_t rgblight_layer_mask_t; +# else +# error invalid RGBLIGHT_MAX_LAYERS value (must be <= 32) +# endif +# define RGBLIGHT_LAYER_SEGMENTS(...) \ + { __VA_ARGS__, RGBLIGHT_END_SEGMENTS } +# define RGBLIGHT_LAYERS_LIST(...) \ + { __VA_ARGS__, NULL } + +// Get/set enabled rgblight layers +void rgblight_set_layer_state(uint8_t layer, bool enabled); +bool rgblight_get_layer_state(uint8_t layer); + +// Point this to an array of rgblight_segment_t arrays in keyboard_post_init_user to use rgblight layers +extern const rgblight_segment_t *const *rgblight_layers; + +# ifdef RGBLIGHT_LAYER_BLINK +# define RGBLIGHT_USE_TIMER +void rgblight_blink_layer(uint8_t layer, uint16_t duration_ms); +void rgblight_blink_layer_repeat(uint8_t layer, uint16_t duration_ms, uint8_t times); +# endif + +#endif + +extern LED_TYPE led[RGBLED_NUM]; + +extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM; +extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; +extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; +extern const uint16_t RGBLED_RGBTEST_INTERVALS[1] PROGMEM; +extern const uint8_t RGBLED_TWINKLE_INTERVALS[3] PROGMEM; +extern bool is_rgblight_initialized; + +// Should stay in sycn with rgb matrix config as we reuse eeprom storage for both (for now) +typedef union { + uint32_t raw; + struct { + bool enable : 1; + uint8_t mode : 7; + uint8_t hue : 8; + uint8_t sat : 8; + uint8_t val : 8; + uint8_t speed : 8; // EECONFIG needs to be increased to support this + }; +} rgblight_config_t; + +typedef struct _rgblight_status_t { + uint8_t base_mode; + bool timer_enabled; +#ifdef RGBLIGHT_SPLIT + uint8_t change_flags; +#endif +#ifdef RGBLIGHT_LAYERS + rgblight_layer_mask_t enabled_layer_mask; +#endif +} rgblight_status_t; + +/* + * Structure for RGB Light clipping ranges + */ +typedef struct _rgblight_ranges_t { + uint8_t clipping_start_pos; + uint8_t clipping_num_leds; + uint8_t effect_start_pos; + uint8_t effect_end_pos; + uint8_t effect_num_leds; +} rgblight_ranges_t; + +extern rgblight_ranges_t rgblight_ranges; + +/* === Utility Functions ===*/ +void sethsv(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); +void sethsv_raw(uint8_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); // without RGBLIGHT_LIMIT_VAL check +void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); + +/* === Low level Functions === */ +void rgblight_set(void); +void rgblight_set_clipping_range(uint8_t start_pos, uint8_t num_leds); + +/* === Effects and Animations Functions === */ +/* effect range setting */ +void rgblight_set_effect_range(uint8_t start_pos, uint8_t num_leds); + +/* direct operation */ +void rgblight_setrgb_at(uint8_t r, uint8_t g, uint8_t b, uint8_t index); +void rgblight_sethsv_at(uint8_t hue, uint8_t sat, uint8_t val, uint8_t index); +void rgblight_setrgb_range(uint8_t r, uint8_t g, uint8_t b, uint8_t start, uint8_t end); +void rgblight_sethsv_range(uint8_t hue, uint8_t sat, uint8_t val, uint8_t start, uint8_t end); +void rgblight_setrgb(uint8_t r, uint8_t g, uint8_t b); + +#ifndef RGBLIGHT_SPLIT +void rgblight_setrgb_master(uint8_t r, uint8_t g, uint8_t b); +void rgblight_setrgb_slave(uint8_t r, uint8_t g, uint8_t b); +void rgblight_sethsv_master(uint8_t hue, uint8_t sat, uint8_t val); +void rgblight_sethsv_slave(uint8_t hue, uint8_t sat, uint8_t val); +#endif + +/* effect mode change */ +void rgblight_mode(uint8_t mode); +void rgblight_mode_noeeprom(uint8_t mode); +void rgblight_increase(void); +void rgblight_decrease(void); +void rgblight_step(void); +void rgblight_step_noeeprom(void); +void rgblight_step_reverse(void); +void rgblight_step_reverse_noeeprom(void); + +/* effects mode disable/enable */ +void rgblight_toggle(void); +void rgblight_toggle_noeeprom(void); +void rgblight_enable(void); +void rgblight_enable_noeeprom(void); +void rgblight_disable(void); +void rgblight_disable_noeeprom(void); + +/* hue, sat, val change */ +void rgblight_increase_hue(void); +void rgblight_increase_hue_noeeprom(void); +void rgblight_decrease_hue(void); +void rgblight_decrease_hue_noeeprom(void); +void rgblight_increase_sat(void); +void rgblight_increase_sat_noeeprom(void); +void rgblight_decrease_sat(void); +void rgblight_decrease_sat_noeeprom(void); +void rgblight_increase_val(void); +void rgblight_increase_val_noeeprom(void); +void rgblight_decrease_val(void); +void rgblight_decrease_val_noeeprom(void); +void rgblight_increase_speed(void); +void rgblight_increase_speed_noeeprom(void); +void rgblight_decrease_speed(void); +void rgblight_decrease_speed_noeeprom(void); +void rgblight_sethsv(uint8_t hue, uint8_t sat, uint8_t val); +void rgblight_sethsv_noeeprom(uint8_t hue, uint8_t sat, uint8_t val); + +/* effect speed */ +uint8_t rgblight_get_speed(void); +void rgblight_set_speed(uint8_t speed); +void rgblight_set_speed_noeeprom(uint8_t speed); + +/* reset */ +void rgblight_reload_from_eeprom(void); + +/* query */ +uint8_t rgblight_get_mode(void); +uint8_t rgblight_get_hue(void); +uint8_t rgblight_get_sat(void); +uint8_t rgblight_get_val(void); +bool rgblight_is_enabled(void); +HSV rgblight_get_hsv(void); + +/* === qmk_firmware (core)internal Functions === */ +void rgblight_init(void); +void rgblight_suspend(void); +void rgblight_wakeup(void); +uint32_t rgblight_read_dword(void); +void rgblight_update_dword(uint32_t dword); +uint32_t eeconfig_read_rgblight(void); +void eeconfig_update_rgblight(uint32_t val); +void eeconfig_update_rgblight_current(void); +void eeconfig_update_rgblight_default(void); +void eeconfig_debug_rgblight(void); + +void rgb_matrix_increase(void); +void rgb_matrix_decrease(void); + +void rgblight_sethsv_eeprom_helper(uint8_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); +void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); + +#define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) +void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); + +#ifdef RGBLIGHT_USE_TIMER +void rgblight_task(void); +void rgblight_timer_init(void); +void rgblight_timer_enable(void); +void rgblight_timer_disable(void); +void rgblight_timer_toggle(void); +#else +# define rgblight_task() +# define rgblight_timer_init() +# define rgblight_timer_enable() +# define rgblight_timer_disable() +# define rgblight_timer_toggle() +#endif + +#ifdef RGBLIGHT_SPLIT +# define RGBLIGHT_STATUS_CHANGE_MODE (1 << 0) +# define RGBLIGHT_STATUS_CHANGE_HSVS (1 << 1) +# define RGBLIGHT_STATUS_CHANGE_TIMER (1 << 2) +# define RGBLIGHT_STATUS_ANIMATION_TICK (1 << 3) +# define RGBLIGHT_STATUS_CHANGE_LAYERS (1 << 4) + +typedef struct _rgblight_syncinfo_t { + rgblight_config_t config; + rgblight_status_t status; +} rgblight_syncinfo_t; + +/* for split keyboard master side */ +uint8_t rgblight_get_change_flags(void); +void rgblight_clear_change_flags(void); +void rgblight_get_syncinfo(rgblight_syncinfo_t *syncinfo); +/* for split keyboard slave side */ +void rgblight_update_sync(rgblight_syncinfo_t *syncinfo, bool write_to_eeprom); +#endif + +#ifdef RGBLIGHT_USE_TIMER + +typedef struct _animation_status_t { + uint16_t last_timer; + uint8_t delta; /* mode - base_mode */ + bool restart; + union { + uint16_t pos16; + uint8_t pos; + int8_t current_hue; + uint16_t current_offset; + }; +} animation_status_t; + +extern animation_status_t animation_status; + +void rgblight_effect_breathing(animation_status_t *anim); +void rgblight_effect_rainbow_mood(animation_status_t *anim); +void rgblight_effect_rainbow_swirl(animation_status_t *anim); +void rgblight_effect_snake(animation_status_t *anim); +void rgblight_effect_knight(animation_status_t *anim); +void rgblight_effect_christmas(animation_status_t *anim); +void rgblight_effect_rgbtest(animation_status_t *anim); +void rgblight_effect_alternating(animation_status_t *anim); +void rgblight_effect_twinkle(animation_status_t *anim); + +#endif diff --git a/quantum/rgblight_breathe_table.h b/quantum/rgblight/rgblight_breathe_table.h similarity index 100% rename from quantum/rgblight_breathe_table.h rename to quantum/rgblight/rgblight_breathe_table.h diff --git a/quantum/rgblight/rgblight_list.h b/quantum/rgblight/rgblight_list.h new file mode 100644 index 000000000..0fd68b75f --- /dev/null +++ b/quantum/rgblight/rgblight_list.h @@ -0,0 +1,136 @@ +/* Copyright 2018 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "color.h" + +/* +######################################################################################## +## ## +## ## +## ## +## The functions below have been deprecated and may be removed in a future release. ## +## ## +## Please use the values in color.h with the RGB functions. ## +## ## +## ## +## ## +######################################################################################## +*/ + +/* SET RGB List */ +#define rgblight_setrgb_white() rgblight_setrgb(RGB_WHITE) +#define rgblight_setrgb_red() rgblight_setrgb(RGB_RED) +#define rgblight_setrgb_coral() rgblight_setrgb(RGB_CORAL) +#define rgblight_setrgb_orange() rgblight_setrgb(RGB_ORANGE) +#define rgblight_setrgb_goldenrod() rgblight_setrgb(RGB_GOLDENROD) +#define rgblight_setrgb_gold() rgblight_setrgb(RGB_GOLD) +#define rgblight_setrgb_yellow() rgblight_setrgb(RGB_YELLOW) +#define rgblight_setrgb_chartreuse() rgblight_setrgb(RGB_CHARTREUSE) +#define rgblight_setrgb_green() rgblight_setrgb(RGB_GREEN) +#define rgblight_setrgb_springgreen() rgblight_setrgb(RGB_SPRINGGREEN) +#define rgblight_setrgb_turquoise() rgblight_setrgb(RGB_TURQUOISE) +#define rgblight_setrgb_teal() rgblight_setrgb(RGB_TEAL) +#define rgblight_setrgb_cyan() rgblight_setrgb(RGB_CYAN) +#define rgblight_setrgb_azure() rgblight_setrgb(RGB_AZURE) +#define rgblight_setrgb_blue() rgblight_setrgb(RGB_BLUE) +#define rgblight_setrgb_purple() rgblight_setrgb(RGB_PURPLE) +#define rgblight_setrgb_magenta() rgblight_setrgb(RGB_MAGENTA) +#define rgblight_setrgb_pink() rgblight_setrgb(RGB_PINK) + +/* SET RGB List */ +#define rgblight_setrgb_white_at(at) rgblight_setrgb_at(RGB_WHITE, at) +#define rgblight_setrgb_red_at(at) rgblight_setrgb_at(RGB_RED, at) +#define rgblight_setrgb_coral_at(at) rgblight_setrgb_at(RGB_CORAL, at) +#define rgblight_setrgb_orange_at(at) rgblight_setrgb_at(RGB_ORANGE at) +#define rgblight_setrgb_goldenrod_at(at) rgblight_setrgb_at(RGB_GOLDENROD, at) +#define rgblight_setrgb_gold_at(at) rgblight_setrgb_at(RGB_GOLD, at) +#define rgblight_setrgb_yellow_at(at) rgblight_setrgb_at(RGB_YELLOW, at) +#define rgblight_setrgb_chartreuse_at(at) rgblight_setrgb_at(RGB_CHARTREUSE, at) +#define rgblight_setrgb_green_at(at) rgblight_setrgb_at(RGB_GREEN, at) +#define rgblight_setrgb_springgreen_at(at) rgblight_setrgb_at(RGB_SPRINGGREEN, at) +#define rgblight_setrgb_turquoise_at(at) rgblight_setrgb_at(RGB_TURQUOISE, at) +#define rgblight_setrgb_teal_at(at) rgblight_setrgb_at(RGB_TEAL, at) +#define rgblight_setrgb_cyan_at(at) rgblight_setrgb_at(RGB_CYAN, at) +#define rgblight_setrgb_azure_at(at) rgblight_setrgb_at(RGB_AZURE, at) +#define rgblight_setrgb_blue_at(at) rgblight_setrgb_at(RGB_BLUE, at) +#define rgblight_setrgb_purple_at(at) rgblight_setrgb_at(RGB_PURPLE, at) +#define rgblight_setrgb_magenta_at(at) rgblight_setrgb_at(RGB_MAGENTA, at) +#define rgblight_setrgb_pink_at(at) rgblight_setrgb_at(RGB_PINK, at) + +/* SET HSV List */ +#define rgblight_sethsv_white() rgblight_sethsv(HSV_WHITE) +#define rgblight_sethsv_red() rgblight_sethsv(HSV_RED) +#define rgblight_sethsv_coral() rgblight_sethsv(HSV_CORAL) +#define rgblight_sethsv_orange() rgblight_sethsv(HSV_ORANGE) +#define rgblight_sethsv_goldenrod() rgblight_sethsv(HSV_GOLDENROD) +#define rgblight_sethsv_gold() rgblight_sethsv(HSV_GOLD) +#define rgblight_sethsv_yellow() rgblight_sethsv(HSV_YELLOW) +#define rgblight_sethsv_chartreuse() rgblight_sethsv(HSV_CHARTREUSE) +#define rgblight_sethsv_green() rgblight_sethsv(HSV_GREEN) +#define rgblight_sethsv_springgreen() rgblight_sethsv(HSV_SPRINGGREEN) +#define rgblight_sethsv_turquoise() rgblight_sethsv(HSV_TURQUOISE) +#define rgblight_sethsv_teal() rgblight_sethsv(HSV_TEAL) +#define rgblight_sethsv_cyan() rgblight_sethsv(HSV_CYAN) +#define rgblight_sethsv_azure() rgblight_sethsv(HSV_AZURE) +#define rgblight_sethsv_blue() rgblight_sethsv(HSV_BLUE) +#define rgblight_sethsv_purple() rgblight_sethsv(HSV_PURPLE) +#define rgblight_sethsv_magenta() rgblight_sethsv(HSV_MAGENTA) +#define rgblight_sethsv_pink() rgblight_sethsv(HSV_PINK) + +/* SET HSV List */ +/* If you're doing layer indication, this is best, as it won't */ +/* write to the eeprom, since it's limited (very high value). */ +/* If you want to use modes with this (since you can), then you */ +/* want to use rgblight_mode_noeeprom(x) instead. */ +#define rgblight_sethsv_noeeprom_white() rgblight_sethsv_noeeprom(HSV_WHITE) +#define rgblight_sethsv_noeeprom_red() rgblight_sethsv_noeeprom(HSV_RED) +#define rgblight_sethsv_noeeprom_coral() rgblight_sethsv_noeeprom(HSV_CORAL) +#define rgblight_sethsv_noeeprom_orange() rgblight_sethsv_noeeprom(HSV_ORANGE) +#define rgblight_sethsv_noeeprom_goldenrod() rgblight_sethsv_noeeprom(HSV_GOLDENROD) +#define rgblight_sethsv_noeeprom_gold() rgblight_sethsv_noeeprom(HSV_GOLD) +#define rgblight_sethsv_noeeprom_yellow() rgblight_sethsv_noeeprom(HSV_YELLOW) +#define rgblight_sethsv_noeeprom_chartreuse() rgblight_sethsv_noeeprom(HSV_CHARTREUSE) +#define rgblight_sethsv_noeeprom_green() rgblight_sethsv_noeeprom(HSV_GREEN) +#define rgblight_sethsv_noeeprom_springgreen() rgblight_sethsv_noeeprom(HSV_SPRINGGREEN) +#define rgblight_sethsv_noeeprom_turquoise() rgblight_sethsv_noeeprom(HSV_TURQUOISE) +#define rgblight_sethsv_noeeprom_teal() rgblight_sethsv_noeeprom(HSV_TEAL) +#define rgblight_sethsv_noeeprom_cyan() rgblight_sethsv_noeeprom(HSV_CYAN) +#define rgblight_sethsv_noeeprom_azure() rgblight_sethsv_noeeprom(HSV_AZURE) +#define rgblight_sethsv_noeeprom_blue() rgblight_sethsv_noeeprom(HSV_BLUE) +#define rgblight_sethsv_noeeprom_purple() rgblight_sethsv_noeeprom(HSV_PURPLE) +#define rgblight_sethsv_noeeprom_magenta() rgblight_sethsv_noeeprom(HSV_MAGENTA) +#define rgblight_sethsv_noeeprom_pink() rgblight_sethsv_noeeprom(HSV_PINK) + +/* SET HSV List */ +#define rgblight_sethsv_white_at(at) rgblight_sethsv_at(HSV_WHITE, at) +#define rgblight_sethsv_red_at(at) rgblight_sethsv_at(HSV_RED, at) +#define rgblight_sethsv_coral_at(at) rgblight_sethsv_at(HSV_CORAL, at) +#define rgblight_sethsv_orange_at(at) rgblight_sethsv_at(HSV_ORANGE, at) +#define rgblight_sethsv_goldenrod_at(at) rgblight_sethsv_at(HSV_GOLDENROD, at) +#define rgblight_sethsv_gold_at(at) rgblight_sethsv_at(HSV_GOLD, at) +#define rgblight_sethsv_yellow_at(at) rgblight_sethsv_at(HSV_YELLOW, at) +#define rgblight_sethsv_chartreuse_at(at) rgblight_sethsv_at(HSV_CHARTREUSE, at) +#define rgblight_sethsv_green_at(at) rgblight_sethsv_at(HSV_GREEN, at) +#define rgblight_sethsv_springgreen_at(at) rgblight_sethsv_at(HSV_SPRINGGREEN, at) +#define rgblight_sethsv_turquoise_at(at) rgblight_sethsv_at(HSV_TURQUOISE, at) +#define rgblight_sethsv_teal_at(at) rgblight_sethsv_at(HSV_TEAL, at) +#define rgblight_sethsv_cyan_at(at) rgblight_sethsv_at(HSV_CYAN, at) +#define rgblight_sethsv_azure_at(at) rgblight_sethsv_at(HSV_AZURE, at) +#define rgblight_sethsv_blue_at(at) rgblight_sethsv_at(HSV_BLUE, at) +#define rgblight_sethsv_purple_at(at) rgblight_sethsv_at(HSV_PURPLE, at) +#define rgblight_sethsv_magenta_at(at) rgblight_sethsv_at(HSV_MAGENTA, at) +#define rgblight_sethsv_pink_at(at) rgblight_sethsv_at(HSV_PINK, at) diff --git a/quantum/rgblight_modes.h b/quantum/rgblight/rgblight_modes.h similarity index 100% rename from quantum/rgblight_modes.h rename to quantum/rgblight/rgblight_modes.h diff --git a/quantum/rgblight_post_config.h b/quantum/rgblight/rgblight_post_config.h similarity index 100% rename from quantum/rgblight_post_config.h rename to quantum/rgblight/rgblight_post_config.h diff --git a/quantum/rgblight_list.h b/quantum/rgblight_list.h deleted file mode 100644 index f29a646b6..000000000 --- a/quantum/rgblight_list.h +++ /dev/null @@ -1,178 +0,0 @@ -/* Copyright 2018 Jack Humbert - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#pragma once - -/* RGB COLORS */ -#define RGB_WHITE 0xFF, 0xFF, 0xFF -#define RGB_RED 0xFF, 0x00, 0x00 -#define RGB_CORAL 0xFF, 0x7C, 0x4D -#define RGB_ORANGE 0xFF, 0x80, 0x00 -#define RGB_GOLDENROD 0xD9, 0xA5, 0x21 -#define RGB_GOLD 0xFF, 0xD9, 0x00 -#define RGB_YELLOW 0xFF, 0xFF, 0x00 -#define RGB_CHARTREUSE 0x80, 0xFF, 0x00 -#define RGB_GREEN 0x00, 0xFF, 0x00 -#define RGB_SPRINGGREEN 0x00, 0xFF, 0x80 -#define RGB_TURQUOISE 0x47, 0x6E, 0x6A -#define RGB_TEAL 0x00, 0x80, 0x80 -#define RGB_CYAN 0x00, 0xFF, 0xFF -#define RGB_AZURE 0x99, 0xf5, 0xFF -#define RGB_BLUE 0x00, 0x00, 0xFF -#define RGB_PURPLE 0x7A, 0x00, 0xFF -#define RGB_MAGENTA 0xFF, 0x00, 0xFF -#define RGB_PINK 0xFF, 0x80, 0xBF -#define RGB_BLACK 0x00, 0x00, 0x00 -#define RGB_OFF RGB_BLACK - -/* HSV COLORS */ -#define HSV_WHITE 0, 0, 255 -#define HSV_RED 0, 255, 255 -#define HSV_CORAL 11, 176, 255 -#define HSV_ORANGE 28, 255, 255 -#define HSV_GOLDENROD 30, 218, 218 -#define HSV_GOLD 36, 255, 255 -#define HSV_YELLOW 43, 255, 255 -#define HSV_CHARTREUSE 64, 255, 255 -#define HSV_GREEN 85, 255, 255 -#define HSV_SPRINGGREEN 106, 255, 255 -#define HSV_TURQUOISE 123, 90, 112 -#define HSV_TEAL 128, 255, 128 -#define HSV_CYAN 128, 255, 255 -#define HSV_AZURE 132, 102, 255 -#define HSV_BLUE 170, 255, 255 -#define HSV_PURPLE 191, 255, 255 -#define HSV_MAGENTA 213, 255, 255 -#define HSV_PINK 234, 128, 255 -#define HSV_BLACK 0, 0, 0 -#define HSV_OFF HSV_BLACK - -/* -######################################################################################## -## ## -## ## -## ## -## The functions below have been deprecated and may be removed in a future release. ## -## ## -## Please use the values above with the RGB functions. ## -## ## -## ## -## ## -######################################################################################## -*/ - -/* SET RGB List */ -#define rgblight_setrgb_white() rgblight_setrgb(RGB_WHITE) -#define rgblight_setrgb_red() rgblight_setrgb(RGB_RED) -#define rgblight_setrgb_coral() rgblight_setrgb(RGB_CORAL) -#define rgblight_setrgb_orange() rgblight_setrgb(RGB_ORANGE) -#define rgblight_setrgb_goldenrod() rgblight_setrgb(RGB_GOLDENROD) -#define rgblight_setrgb_gold() rgblight_setrgb(RGB_GOLD) -#define rgblight_setrgb_yellow() rgblight_setrgb(RGB_YELLOW) -#define rgblight_setrgb_chartreuse() rgblight_setrgb(RGB_CHARTREUSE) -#define rgblight_setrgb_green() rgblight_setrgb(RGB_GREEN) -#define rgblight_setrgb_springgreen() rgblight_setrgb(RGB_SPRINGGREEN) -#define rgblight_setrgb_turquoise() rgblight_setrgb(RGB_TURQUOISE) -#define rgblight_setrgb_teal() rgblight_setrgb(RGB_TEAL) -#define rgblight_setrgb_cyan() rgblight_setrgb(RGB_CYAN) -#define rgblight_setrgb_azure() rgblight_setrgb(RGB_AZURE) -#define rgblight_setrgb_blue() rgblight_setrgb(RGB_BLUE) -#define rgblight_setrgb_purple() rgblight_setrgb(RGB_PURPLE) -#define rgblight_setrgb_magenta() rgblight_setrgb(RGB_MAGENTA) -#define rgblight_setrgb_pink() rgblight_setrgb(RGB_PINK) - -/* SET RGB List */ -#define rgblight_setrgb_white_at(at) rgblight_setrgb_at(RGB_WHITE, at) -#define rgblight_setrgb_red_at(at) rgblight_setrgb_at(RGB_RED, at) -#define rgblight_setrgb_coral_at(at) rgblight_setrgb_at(RGB_CORAL, at) -#define rgblight_setrgb_orange_at(at) rgblight_setrgb_at(RGB_ORANGE at) -#define rgblight_setrgb_goldenrod_at(at) rgblight_setrgb_at(RGB_GOLDENROD, at) -#define rgblight_setrgb_gold_at(at) rgblight_setrgb_at(RGB_GOLD, at) -#define rgblight_setrgb_yellow_at(at) rgblight_setrgb_at(RGB_YELLOW, at) -#define rgblight_setrgb_chartreuse_at(at) rgblight_setrgb_at(RGB_CHARTREUSE, at) -#define rgblight_setrgb_green_at(at) rgblight_setrgb_at(RGB_GREEN, at) -#define rgblight_setrgb_springgreen_at(at) rgblight_setrgb_at(RGB_SPRINGGREEN, at) -#define rgblight_setrgb_turquoise_at(at) rgblight_setrgb_at(RGB_TURQUOISE, at) -#define rgblight_setrgb_teal_at(at) rgblight_setrgb_at(RGB_TEAL, at) -#define rgblight_setrgb_cyan_at(at) rgblight_setrgb_at(RGB_CYAN, at) -#define rgblight_setrgb_azure_at(at) rgblight_setrgb_at(RGB_AZURE, at) -#define rgblight_setrgb_blue_at(at) rgblight_setrgb_at(RGB_BLUE, at) -#define rgblight_setrgb_purple_at(at) rgblight_setrgb_at(RGB_PURPLE, at) -#define rgblight_setrgb_magenta_at(at) rgblight_setrgb_at(RGB_MAGENTA, at) -#define rgblight_setrgb_pink_at(at) rgblight_setrgb_at(RGB_PINK, at) - -/* SET HSV List */ -#define rgblight_sethsv_white() rgblight_sethsv(HSV_WHITE) -#define rgblight_sethsv_red() rgblight_sethsv(HSV_RED) -#define rgblight_sethsv_coral() rgblight_sethsv(HSV_CORAL) -#define rgblight_sethsv_orange() rgblight_sethsv(HSV_ORANGE) -#define rgblight_sethsv_goldenrod() rgblight_sethsv(HSV_GOLDENROD) -#define rgblight_sethsv_gold() rgblight_sethsv(HSV_GOLD) -#define rgblight_sethsv_yellow() rgblight_sethsv(HSV_YELLOW) -#define rgblight_sethsv_chartreuse() rgblight_sethsv(HSV_CHARTREUSE) -#define rgblight_sethsv_green() rgblight_sethsv(HSV_GREEN) -#define rgblight_sethsv_springgreen() rgblight_sethsv(HSV_SPRINGGREEN) -#define rgblight_sethsv_turquoise() rgblight_sethsv(HSV_TURQUOISE) -#define rgblight_sethsv_teal() rgblight_sethsv(HSV_TEAL) -#define rgblight_sethsv_cyan() rgblight_sethsv(HSV_CYAN) -#define rgblight_sethsv_azure() rgblight_sethsv(HSV_AZURE) -#define rgblight_sethsv_blue() rgblight_sethsv(HSV_BLUE) -#define rgblight_sethsv_purple() rgblight_sethsv(HSV_PURPLE) -#define rgblight_sethsv_magenta() rgblight_sethsv(HSV_MAGENTA) -#define rgblight_sethsv_pink() rgblight_sethsv(HSV_PINK) - -/* SET HSV List */ -/* If you're doing layer indication, this is best, as it won't */ -/* write to the eeprom, since it's limited (very high value). */ -/* If you want to use modes with this (since you can), then you */ -/* want to use rgblight_mode_noeeprom(x) instead. */ -#define rgblight_sethsv_noeeprom_white() rgblight_sethsv_noeeprom(HSV_WHITE) -#define rgblight_sethsv_noeeprom_red() rgblight_sethsv_noeeprom(HSV_RED) -#define rgblight_sethsv_noeeprom_coral() rgblight_sethsv_noeeprom(HSV_CORAL) -#define rgblight_sethsv_noeeprom_orange() rgblight_sethsv_noeeprom(HSV_ORANGE) -#define rgblight_sethsv_noeeprom_goldenrod() rgblight_sethsv_noeeprom(HSV_GOLDENROD) -#define rgblight_sethsv_noeeprom_gold() rgblight_sethsv_noeeprom(HSV_GOLD) -#define rgblight_sethsv_noeeprom_yellow() rgblight_sethsv_noeeprom(HSV_YELLOW) -#define rgblight_sethsv_noeeprom_chartreuse() rgblight_sethsv_noeeprom(HSV_CHARTREUSE) -#define rgblight_sethsv_noeeprom_green() rgblight_sethsv_noeeprom(HSV_GREEN) -#define rgblight_sethsv_noeeprom_springgreen() rgblight_sethsv_noeeprom(HSV_SPRINGGREEN) -#define rgblight_sethsv_noeeprom_turquoise() rgblight_sethsv_noeeprom(HSV_TURQUOISE) -#define rgblight_sethsv_noeeprom_teal() rgblight_sethsv_noeeprom(HSV_TEAL) -#define rgblight_sethsv_noeeprom_cyan() rgblight_sethsv_noeeprom(HSV_CYAN) -#define rgblight_sethsv_noeeprom_azure() rgblight_sethsv_noeeprom(HSV_AZURE) -#define rgblight_sethsv_noeeprom_blue() rgblight_sethsv_noeeprom(HSV_BLUE) -#define rgblight_sethsv_noeeprom_purple() rgblight_sethsv_noeeprom(HSV_PURPLE) -#define rgblight_sethsv_noeeprom_magenta() rgblight_sethsv_noeeprom(HSV_MAGENTA) -#define rgblight_sethsv_noeeprom_pink() rgblight_sethsv_noeeprom(HSV_PINK) - -/* SET HSV List */ -#define rgblight_sethsv_white_at(at) rgblight_sethsv_at(HSV_WHITE, at) -#define rgblight_sethsv_red_at(at) rgblight_sethsv_at(HSV_RED, at) -#define rgblight_sethsv_coral_at(at) rgblight_sethsv_at(HSV_CORAL, at) -#define rgblight_sethsv_orange_at(at) rgblight_sethsv_at(HSV_ORANGE, at) -#define rgblight_sethsv_goldenrod_at(at) rgblight_sethsv_at(HSV_GOLDENROD, at) -#define rgblight_sethsv_gold_at(at) rgblight_sethsv_at(HSV_GOLD, at) -#define rgblight_sethsv_yellow_at(at) rgblight_sethsv_at(HSV_YELLOW, at) -#define rgblight_sethsv_chartreuse_at(at) rgblight_sethsv_at(HSV_CHARTREUSE, at) -#define rgblight_sethsv_green_at(at) rgblight_sethsv_at(HSV_GREEN, at) -#define rgblight_sethsv_springgreen_at(at) rgblight_sethsv_at(HSV_SPRINGGREEN, at) -#define rgblight_sethsv_turquoise_at(at) rgblight_sethsv_at(HSV_TURQUOISE, at) -#define rgblight_sethsv_teal_at(at) rgblight_sethsv_at(HSV_TEAL, at) -#define rgblight_sethsv_cyan_at(at) rgblight_sethsv_at(HSV_CYAN, at) -#define rgblight_sethsv_azure_at(at) rgblight_sethsv_at(HSV_AZURE, at) -#define rgblight_sethsv_blue_at(at) rgblight_sethsv_at(HSV_BLUE, at) -#define rgblight_sethsv_purple_at(at) rgblight_sethsv_at(HSV_PURPLE, at) -#define rgblight_sethsv_magenta_at(at) rgblight_sethsv_at(HSV_MAGENTA, at) -#define rgblight_sethsv_pink_at(at) rgblight_sethsv_at(HSV_PINK, at) diff --git a/quantum/send_string.c b/quantum/send_string.c index 7d096b427..1a7f7a131 100644 --- a/quantum/send_string.c +++ b/quantum/send_string.c @@ -20,6 +20,14 @@ #include "send_string.h" +#if defined(AUDIO_ENABLE) && defined(SENDSTRING_BELL) +# include "audio.h" +# ifndef BELL_SOUND +# define BELL_SOUND TERMINAL_SOUND +# endif +float bell_song[][2] = SONG(BELL_SOUND); +#endif + // clang-format off /* Bit-Packed look-up table to convert an ASCII character to whether diff --git a/quantum/sequencer/sequencer.c b/quantum/sequencer/sequencer.c index 0eaf3a17a..18a83661e 100644 --- a/quantum/sequencer/sequencer.c +++ b/quantum/sequencer/sequencer.c @@ -211,7 +211,7 @@ void sequencer_phase_pause(void) { sequencer_internal_state.phase = SEQUENCER_PHASE_ATTACK; } -void matrix_scan_sequencer(void) { +void sequencer_task(void) { if (!sequencer_config.enabled) { return; } diff --git a/quantum/sequencer/sequencer.h b/quantum/sequencer/sequencer.h index aeca7a1e9..4017ae764 100644 --- a/quantum/sequencer/sequencer.h +++ b/quantum/sequencer/sequencer.h @@ -119,4 +119,4 @@ uint16_t sequencer_get_step_duration(void); uint16_t get_beat_duration(uint8_t tempo); uint16_t get_step_duration(uint8_t tempo, sequencer_resolution_t resolution); -void matrix_scan_sequencer(void); +void sequencer_task(void); diff --git a/quantum/sequencer/tests/sequencer_tests.cpp b/quantum/sequencer/tests/sequencer_tests.cpp index e81984e5b..290605a52 100644 --- a/quantum/sequencer/tests/sequencer_tests.cpp +++ b/quantum/sequencer/tests/sequencer_tests.cpp @@ -386,7 +386,7 @@ void setUpMatrixScanSequencerTest(void) { TEST_F(SequencerTest, TestMatrixScanSequencerShouldAttackFirstTrackOfFirstStep) { setUpMatrixScanSequencerTest(); - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(last_noteon, MI_C); EXPECT_EQ(last_noteoff, 0); } @@ -394,7 +394,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldAttackFirstTrackOfFirstStep) TEST_F(SequencerTest, TestMatrixScanSequencerShouldAttackSecondTrackAfterFirstTrackOfFirstStep) { setUpMatrixScanSequencerTest(); - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(sequencer_internal_state.current_step, 0); EXPECT_EQ(sequencer_internal_state.current_track, 1); EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_ATTACK); @@ -409,7 +409,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldNotAttackInactiveTrackFirstSt // Wait some time after the first track has been attacked advance_time(SEQUENCER_TRACK_THROTTLE); - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(last_noteon, 0); EXPECT_EQ(last_noteoff, 0); } @@ -423,7 +423,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldAttackThirdTrackAfterSecondTr // Wait some time after the second track has been attacked advance_time(2 * SEQUENCER_TRACK_THROTTLE); - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(sequencer_internal_state.current_step, 0); EXPECT_EQ(sequencer_internal_state.current_track, 2); EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_ATTACK); @@ -438,7 +438,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldEnterReleasePhaseAfterLastTra // Wait until all notes have been attacked advance_time((SEQUENCER_TRACKS - 1) * SEQUENCER_TRACK_THROTTLE); - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(last_noteon, 0); EXPECT_EQ(last_noteoff, 0); EXPECT_EQ(sequencer_internal_state.current_step, 0); @@ -458,7 +458,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldReleaseBackwards) { // + the release timeout advance_time(SEQUENCER_PHASE_RELEASE_TIMEOUT); - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(sequencer_internal_state.current_step, 0); EXPECT_EQ(sequencer_internal_state.current_track, SEQUENCER_TRACKS - 2); EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_RELEASE); @@ -476,7 +476,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldNotReleaseInactiveTrackFirstS // + the release timeout advance_time(SEQUENCER_PHASE_RELEASE_TIMEOUT); - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(last_noteon, 0); EXPECT_EQ(last_noteoff, 0); } @@ -495,7 +495,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldReleaseFirstTrackFirstStep) { // + all the other notes have been released advance_time((SEQUENCER_TRACKS - 1) * SEQUENCER_TRACK_THROTTLE); - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(last_noteon, 0); EXPECT_EQ(last_noteoff, MI_C); } @@ -514,7 +514,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldEnterPausePhaseAfterRelease) // + all the other notes have been released advance_time((SEQUENCER_TRACKS - 1) * SEQUENCER_TRACK_THROTTLE); - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(sequencer_internal_state.current_step, 0); EXPECT_EQ(sequencer_internal_state.current_track, 0); EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_PAUSE); @@ -536,7 +536,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldProcessFirstTrackOfSecondStep // + the step duration (one 16th at tempo=120 lasts 125ms) advance_time(125); - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(sequencer_internal_state.current_step, 1); EXPECT_EQ(sequencer_internal_state.current_track, 1); EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_ATTACK); @@ -548,7 +548,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldProcessSecondTrackTooEarly) { sequencer_internal_state.current_step = 2; sequencer_internal_state.current_track = 1; - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(last_noteon, 0); EXPECT_EQ(last_noteoff, 0); } @@ -562,7 +562,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldProcessSecondTrackOnTime) { // Wait until first track has been attacked advance_time(SEQUENCER_TRACK_THROTTLE); - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(last_noteon, MI_D); EXPECT_EQ(last_noteoff, 0); } @@ -583,7 +583,7 @@ TEST_F(SequencerTest, TestMatrixScanSequencerShouldLoopOnceSequenceIsOver) { // + the step duration (one 16th at tempo=120 lasts 125ms) advance_time(125); - matrix_scan_sequencer(); + sequencer_task(); EXPECT_EQ(sequencer_internal_state.current_step, 0); EXPECT_EQ(sequencer_internal_state.current_track, 1); EXPECT_EQ(sequencer_internal_state.phase, SEQUENCER_PHASE_ATTACK); diff --git a/quantum/serial_link/system/serial_link.c b/quantum/serial_link/system/serial_link.c index f77483ad8..6363f8ff3 100644 --- a/quantum/serial_link/system/serial_link.c +++ b/quantum/serial_link/system/serial_link.c @@ -29,10 +29,13 @@ SOFTWARE. #include "serial_link/protocol/transport.h" #include "serial_link/protocol/frame_router.h" #include "matrix.h" +#include "sync_timer.h" #include #include "print.h" #include "config.h" +#define SYNC_TIMER_OFFSET 2 + static event_source_t new_data_event; static bool serial_link_connected; static bool is_master = false; @@ -159,10 +162,16 @@ static matrix_object_t last_matrix = {}; SLAVE_TO_MASTER_OBJECT(keyboard_matrix, matrix_object_t); MASTER_TO_ALL_SLAVES_OBJECT(serial_link_connected, bool); +#ifndef DISABLE_SYNC_TIMER +MASTER_TO_ALL_SLAVES_OBJECT(sync_timer, uint32_t); +#endif static remote_object_t* remote_objects[] = { REMOTE_OBJECT(serial_link_connected), REMOTE_OBJECT(keyboard_matrix), +#ifndef DISABLE_SYNC_TIMER + REMOTE_OBJECT(sync_timer), +#endif }; void init_serial_link(void) { @@ -200,14 +209,27 @@ void serial_link_update(void) { m->rows[i] = matrix.rows[i]; } end_write_keyboard_matrix(); + *begin_write_serial_link_connected() = true; end_write_serial_link_connected(); + +#ifndef DISABLE_SYNC_TIMER + *begin_write_sync_timer() = sync_timer_read32() + SYNC_TIMER_OFFSET; + end_write_sync_timer(); +#endif } matrix_object_t* m = read_keyboard_matrix(0); if (m) { matrix_set_remote(m->rows, 0); } + +#ifndef DISABLE_SYNC_TIMER + uint32_t* t = read_sync_timer(); + if (t) { + sync_timer_update(*t); + } +#endif } void signal_data_written(void) { chEvtBroadcast(&new_data_event); } diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c deleted file mode 100644 index 039e7d977..000000000 --- a/quantum/split_common/matrix.c +++ /dev/null @@ -1,309 +0,0 @@ -/* -Copyright 2012 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#include -#include -#include "util.h" -#include "matrix.h" -#include "debounce.h" -#include "quantum.h" -#include "split_util.h" -#include "config.h" -#include "transport.h" - -#define ERROR_DISCONNECT_COUNT 5 - -#define ROWS_PER_HAND (MATRIX_ROWS / 2) - -#ifdef DIRECT_PINS -static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; -#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) -static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; -#endif - -/* matrix state(1:on, 0:off) */ -extern matrix_row_t raw_matrix[MATRIX_ROWS]; // raw values -extern matrix_row_t matrix[MATRIX_ROWS]; // debounced values - -// row offsets for each hand -uint8_t thisHand, thatHand; - -// user-defined overridable functions -__attribute__((weak)) void matrix_slave_scan_kb(void) { matrix_slave_scan_user(); } -__attribute__((weak)) void matrix_slave_scan_user(void) {} - -static inline void setPinOutput_writeLow(pin_t pin) { - ATOMIC_BLOCK_FORCEON { - setPinOutput(pin); - writePinLow(pin); - } -} - -static inline void setPinInputHigh_atomic(pin_t pin) { - ATOMIC_BLOCK_FORCEON { setPinInputHigh(pin); } -} - -// matrix code - -#ifdef DIRECT_PINS - -static void init_pins(void) { - for (int row = 0; row < MATRIX_ROWS; row++) { - for (int col = 0; col < MATRIX_COLS; col++) { - pin_t pin = direct_pins[row][col]; - if (pin != NO_PIN) { - setPinInputHigh(pin); - } - } - } -} - -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { - // Start with a clear matrix row - matrix_row_t current_row_value = 0; - - for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { - pin_t pin = direct_pins[current_row][col_index]; - if (pin != NO_PIN) { - current_row_value |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index); - } - } - - // If the row has changed, store the row and return the changed flag. - if (current_matrix[current_row] != current_row_value) { - current_matrix[current_row] = current_row_value; - return true; - } - return false; -} - -#elif defined(DIODE_DIRECTION) -# if (DIODE_DIRECTION == COL2ROW) - -static void select_row(uint8_t row) { setPinOutput_writeLow(row_pins[row]); } - -static void unselect_row(uint8_t row) { setPinInputHigh_atomic(row_pins[row]); } - -static void unselect_rows(void) { - for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { - setPinInputHigh_atomic(row_pins[x]); - } -} - -static void init_pins(void) { - unselect_rows(); - for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh_atomic(col_pins[x]); - } -} - -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { - // Start with a clear matrix row - matrix_row_t current_row_value = 0; - - // Select row - select_row(current_row); - matrix_output_select_delay(); - - // For each col... - for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { - // Select the col pin to read (active low) - uint8_t pin_state = readPin(col_pins[col_index]); - - // Populate the matrix row with the state of the col pin - current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); - } - - // Unselect row - unselect_row(current_row); - matrix_output_unselect_delay(); // wait for all Col signals to go HIGH - - // If the row has changed, store the row and return the changed flag. - if (current_matrix[current_row] != current_row_value) { - current_matrix[current_row] = current_row_value; - return true; - } - return false; -} - -# elif (DIODE_DIRECTION == ROW2COL) - -static void select_col(uint8_t col) { setPinOutput_writeLow(col_pins[col]); } - -static void unselect_col(uint8_t col) { setPinInputHigh_atomic(col_pins[col]); } - -static void unselect_cols(void) { - for (uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh_atomic(col_pins[x]); - } -} - -static void init_pins(void) { - unselect_cols(); - for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { - setPinInputHigh_atomic(row_pins[x]); - } -} - -static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { - bool matrix_changed = false; - - // Select col - select_col(current_col); - matrix_output_select_delay(); - - // For each row... - for (uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) { - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[row_index]; - matrix_row_t current_row_value = last_row_value; - - // Check row pin state - if (readPin(row_pins[row_index]) == 0) { - // Pin LO, set col bit - current_row_value |= (MATRIX_ROW_SHIFTER << current_col); - } else { - // Pin HI, clear col bit - current_row_value &= ~(MATRIX_ROW_SHIFTER << current_col); - } - - // Determine if the matrix changed state - if ((last_row_value != current_row_value)) { - matrix_changed |= true; - current_matrix[row_index] = current_row_value; - } - } - - // Unselect col - unselect_col(current_col); - matrix_output_unselect_delay(); // wait for all Row signals to go HIGH - - return matrix_changed; -} - -# else -# error DIODE_DIRECTION must be one of COL2ROW or ROW2COL! -# endif -#else -# error DIODE_DIRECTION is not defined! -#endif - -void matrix_init(void) { - split_pre_init(); - - // Set pinout for right half if pinout for that half is defined - if (!isLeftHand) { -#ifdef DIRECT_PINS_RIGHT - const pin_t direct_pins_right[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS_RIGHT; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - for (uint8_t j = 0; j < MATRIX_COLS; j++) { - direct_pins[i][j] = direct_pins_right[i][j]; - } - } -#endif -#ifdef MATRIX_ROW_PINS_RIGHT - const pin_t row_pins_right[MATRIX_ROWS] = MATRIX_ROW_PINS_RIGHT; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - row_pins[i] = row_pins_right[i]; - } -#endif -#ifdef MATRIX_COL_PINS_RIGHT - const pin_t col_pins_right[MATRIX_COLS] = MATRIX_COL_PINS_RIGHT; - for (uint8_t i = 0; i < MATRIX_COLS; i++) { - col_pins[i] = col_pins_right[i]; - } -#endif - } - - thisHand = isLeftHand ? 0 : (ROWS_PER_HAND); - thatHand = ROWS_PER_HAND - thisHand; - - // initialize key pins - init_pins(); - - // initialize matrix state: all keys off - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - raw_matrix[i] = 0; - matrix[i] = 0; - } - - debounce_init(ROWS_PER_HAND); - - matrix_init_quantum(); - - split_post_init(); -} - -bool matrix_post_scan(void) { - bool changed = false; - if (is_keyboard_master()) { - static uint8_t error_count; - - matrix_row_t slave_matrix[ROWS_PER_HAND] = {0}; - if (!transport_master(matrix + thisHand, slave_matrix)) { - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[thatHand + i] = 0; - slave_matrix[i] = 0; - } - - changed = true; - } - } else { - error_count = 0; - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - if (matrix[thatHand + i] != slave_matrix[i]) { - matrix[thatHand + i] = slave_matrix[i]; - changed = true; - } - } - } - - matrix_scan_quantum(); - } else { - transport_slave(matrix + thatHand, matrix + thisHand); - - matrix_slave_scan_kb(); - } - - return changed; -} - -uint8_t matrix_scan(void) { - bool local_changed = false; - -#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW) - // Set row, read cols - for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { - local_changed |= read_cols_on_row(raw_matrix, current_row); - } -#elif (DIODE_DIRECTION == ROW2COL) - // Set col, read rows - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { - local_changed |= read_rows_on_col(raw_matrix, current_col); - } -#endif - - debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, local_changed); - - bool remote_changed = matrix_post_scan(); - return (uint8_t)(local_changed || remote_changed); -} diff --git a/quantum/split_common/post_config.h b/quantum/split_common/post_config.h index 4ae1d5273..a4c0a1956 100644 --- a/quantum/split_common/post_config.h +++ b/quantum/split_common/post_config.h @@ -7,13 +7,4 @@ # ifndef F_SCL # define F_SCL 100000UL // SCL frequency # endif - -#else // use serial -// When using serial, the user must define RGBLIGHT_SPLIT explicitly -// in config.h as needed. -// see quantum/rgblight_post_config.h -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) -// When using serial and RGBLIGHT_SPLIT need separate transaction -# define SERIAL_USE_MULTI_TRANSACTION -# endif #endif diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 9e75e19ce..35f0a9d18 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -39,6 +39,21 @@ # define SPLIT_USB_TIMEOUT_POLL 10 #endif +// Max number of consecutive failed communications (one per scan cycle) before the communication is seen as disconnected. +// Set to 0 to disable the disconnection check altogether. +#ifndef SPLIT_MAX_CONNECTION_ERRORS +# define SPLIT_MAX_CONNECTION_ERRORS 10 +#endif // SPLIT_MAX_CONNECTION_ERRORS + +// How long (in milliseconds) to block all connection attempts after the communication has been flagged as disconnected. +// One communication attempt will be allowed everytime this amount of time has passed since the last attempt. If that attempt succeeds, the communication is seen as working again. +// Set to 0 to disable communication throttling while disconnected +#ifndef SPLIT_CONNECTION_CHECK_TIMEOUT +# define SPLIT_CONNECTION_CHECK_TIMEOUT 500 +#endif // SPLIT_CONNECTION_CHECK_TIMEOUT + +static uint8_t connection_errors = 0; + volatile bool isLeftHand = true; #if defined(SPLIT_USB_DETECT) @@ -77,7 +92,11 @@ __attribute__((weak)) bool is_keyboard_left(void) { #if defined(SPLIT_HAND_PIN) // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand setPinInput(SPLIT_HAND_PIN); +# ifdef SPLIT_HAND_PIN_LOW_IS_LEFT + return !readPin(SPLIT_HAND_PIN); +# else return readPin(SPLIT_HAND_PIN); +# endif #elif defined(SPLIT_HAND_MATRIX_GRID) # ifdef SPLIT_HAND_MATRIX_GRID_LOW_IS_RIGHT return peek_matrix_intersection(SPLIT_HAND_MATRIX_GRID); @@ -102,7 +121,7 @@ __attribute__((weak)) bool is_keyboard_master(void) { // Avoid NO_USB_STARTUP_CHECK - Disable USB as the previous checks seem to enable it somehow if (usbstate == SLAVE) { - usb_disable(); + usb_disconnect(); } } @@ -138,3 +157,39 @@ void split_post_init(void) { transport_slave_init(); } } + +bool is_transport_connected(void) { return connection_errors < SPLIT_MAX_CONNECTION_ERRORS; } + +bool transport_master_if_connected(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { +#if SPLIT_MAX_CONNECTION_ERRORS > 0 && SPLIT_CONNECTION_CHECK_TIMEOUT > 0 + // Throttle transaction attempts if target doesn't seem to be connected + // Without this, a solo half becomes unusable due to constant read timeouts + static uint16_t connection_check_timer = 0; + const bool is_disconnected = !is_transport_connected(); + if (is_disconnected && timer_elapsed(connection_check_timer) < SPLIT_CONNECTION_CHECK_TIMEOUT) { + return false; + } +#endif // SPLIT_MAX_CONNECTION_ERRORS > 0 && SPLIT_CONNECTION_CHECK_TIMEOUT > 0 + + __attribute__((unused)) bool okay = transport_master(master_matrix, slave_matrix); +#if SPLIT_MAX_CONNECTION_ERRORS > 0 + if (!okay) { + if (connection_errors < UINT8_MAX) { + connection_errors++; + } +# if SPLIT_CONNECTION_CHECK_TIMEOUT > 0 + bool connected = is_transport_connected(); + if (!connected) { + connection_check_timer = timer_read(); + dprintln("Target disconnected, throttling connection attempts"); + } + return connected; + } else if (is_disconnected) { + dprintln("Target connected"); +# endif // SPLIT_CONNECTION_CHECK_TIMEOUT > 0 + } + + connection_errors = 0; +#endif // SPLIT_MAX_CONNECTION_ERRORS > 0 + return true; +} diff --git a/quantum/split_common/split_util.h b/quantum/split_common/split_util.h index a4c12519e..ef72043bb 100644 --- a/quantum/split_common/split_util.h +++ b/quantum/split_common/split_util.h @@ -5,8 +5,13 @@ #include #include +#include "matrix.h" + extern volatile bool isLeftHand; void matrix_master_OLED_init(void); void split_pre_init(void); void split_post_init(void); + +bool transport_master_if_connected(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]); +bool is_transport_connected(void); diff --git a/quantum/split_common/transaction_id_define.h b/quantum/split_common/transaction_id_define.h new file mode 100644 index 000000000..535bc21ae --- /dev/null +++ b/quantum/split_common/transaction_id_define.h @@ -0,0 +1,102 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +enum serial_transaction_id { +#ifdef USE_I2C + I2C_EXECUTE_CALLBACK, +#endif // USE_I2C + + GET_SLAVE_MATRIX_CHECKSUM, + GET_SLAVE_MATRIX_DATA, + +#ifdef SPLIT_TRANSPORT_MIRROR + PUT_MASTER_MATRIX, +#endif // SPLIT_TRANSPORT_MIRROR + +#ifdef ENCODER_ENABLE + GET_ENCODERS_CHECKSUM, + GET_ENCODERS_DATA, +#endif // ENCODER_ENABLE + +#ifndef DISABLE_SYNC_TIMER + PUT_SYNC_TIMER, +#endif // DISABLE_SYNC_TIMER + +#if !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE) + PUT_LAYER_STATE, + PUT_DEFAULT_LAYER_STATE, +#endif // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE) + +#ifdef SPLIT_LED_STATE_ENABLE + PUT_LED_STATE, +#endif // SPLIT_LED_STATE_ENABLE + +#ifdef SPLIT_MODS_ENABLE + PUT_MODS, +#endif // SPLIT_MODS_ENABLE + +#ifdef BACKLIGHT_ENABLE + PUT_BACKLIGHT, +#endif // BACKLIGHT_ENABLE + +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + PUT_RGBLIGHT, +#endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + +#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) + PUT_LED_MATRIX, +#endif // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) + +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) + PUT_RGB_MATRIX, +#endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + +#if defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE) + PUT_WPM, +#endif // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE) + +#if defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) + PUT_OLED, +#endif // defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) + +#if defined(ST7565_ENABLE) && defined(SPLIT_ST7565_ENABLE) + PUT_ST7565, +#endif // defined(ST7565_ENABLE) && defined(SPLIT_ST7565_ENABLE) + +#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) + PUT_RPC_INFO, + PUT_RPC_REQ_DATA, + EXECUTE_RPC, + GET_RPC_RESP_DATA, +#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) + +// keyboard-specific +#ifdef SPLIT_TRANSACTION_IDS_KB + SPLIT_TRANSACTION_IDS_KB, +#endif // SPLIT_TRANSACTION_IDS_KB + +// user/keymap-specific +#ifdef SPLIT_TRANSACTION_IDS_USER + SPLIT_TRANSACTION_IDS_USER, +#endif // SPLIT_TRANSACTION_IDS_USER + + NUM_TOTAL_TRANSACTIONS +}; + +// Ensure we only use 5 bits for transaction +_Static_assert(NUM_TOTAL_TRANSACTIONS <= (1 << 5), "Max number of usable transactions exceeded"); diff --git a/quantum/split_common/transactions.c b/quantum/split_common/transactions.c new file mode 100644 index 000000000..fd676f072 --- /dev/null +++ b/quantum/split_common/transactions.c @@ -0,0 +1,723 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include + +#include "crc.h" +#include "debug.h" +#include "matrix.h" +#include "quantum.h" +#include "transactions.h" +#include "transport.h" +#include "split_util.h" +#include "transaction_id_define.h" + +#define SYNC_TIMER_OFFSET 2 + +#ifndef FORCED_SYNC_THROTTLE_MS +# define FORCED_SYNC_THROTTLE_MS 100 +#endif // FORCED_SYNC_THROTTLE_MS + +#define sizeof_member(type, member) sizeof(((type *)NULL)->member) + +#define trans_initiator2target_initializer_cb(member, cb) \ + { &dummy, sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), 0, 0, cb } +#define trans_initiator2target_initializer(member) trans_initiator2target_initializer_cb(member, NULL) + +#define trans_target2initiator_initializer_cb(member, cb) \ + { &dummy, 0, 0, sizeof_member(split_shared_memory_t, member), offsetof(split_shared_memory_t, member), cb } +#define trans_target2initiator_initializer(member) trans_target2initiator_initializer_cb(member, NULL) + +#define transport_write(id, data, length) transport_execute_transaction(id, data, length, NULL, 0) +#define transport_read(id, data, length) transport_execute_transaction(id, NULL, 0, data, length) + +#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) +// Forward-declare the RPC callback handlers +void slave_rpc_info_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer); +void slave_rpc_exec_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer); +#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) + +//////////////////////////////////////////////////// +// Helpers + +static bool transaction_handler_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[], const char *prefix, bool (*handler)(matrix_row_t master_matrix[], matrix_row_t slave_matrix[])) { + int num_retries = is_transport_connected() ? 10 : 1; + for (int iter = 1; iter <= num_retries; ++iter) { + if (iter > 1) { + for (int i = 0; i < iter * iter; ++i) { + wait_us(10); + } + } + bool this_okay = true; + ATOMIC_BLOCK_FORCEON { this_okay = handler(master_matrix, slave_matrix); }; + if (this_okay) return true; + } + dprintf("Failed to execute %s\n", prefix); + return false; +} + +#define TRANSACTION_HANDLER_MASTER(prefix) \ + do { \ + if (!transaction_handler_master(master_matrix, slave_matrix, #prefix, &prefix##_handlers_master)) return false; \ + } while (0) + +#define TRANSACTION_HANDLER_SLAVE(prefix) \ + do { \ + ATOMIC_BLOCK_FORCEON { prefix##_handlers_slave(master_matrix, slave_matrix); }; \ + } while (0) + +inline static bool read_if_checksum_mismatch(int8_t trans_id_checksum, int8_t trans_id_retrieve, uint32_t *last_update, void *destination, const void *equiv_shmem, size_t length) { + uint8_t curr_checksum; + bool okay = transport_read(trans_id_checksum, &curr_checksum, sizeof(curr_checksum)); + if (okay && (timer_elapsed32(*last_update) >= FORCED_SYNC_THROTTLE_MS || curr_checksum != crc8(equiv_shmem, length))) { + okay &= transport_read(trans_id_retrieve, destination, length); + okay &= curr_checksum == crc8(equiv_shmem, length); + if (okay) { + *last_update = timer_read32(); + } + } else { + memcpy(destination, equiv_shmem, length); + } + return okay; +} + +inline static bool send_if_condition(int8_t trans_id, uint32_t *last_update, bool condition, void *source, size_t length) { + bool okay = true; + if (timer_elapsed32(*last_update) >= FORCED_SYNC_THROTTLE_MS || condition) { + okay &= transport_write(trans_id, source, length); + if (okay) { + *last_update = timer_read32(); + } + } + return okay; +} + +inline static bool send_if_data_mismatch(int8_t trans_id, uint32_t *last_update, void *source, const void *equiv_shmem, size_t length) { + // Just run a memcmp to compare the source and equivalent shmem location + return send_if_condition(trans_id, last_update, (memcmp(source, equiv_shmem, length) != 0), source, length); +} + +//////////////////////////////////////////////////// +// Slave matrix + +static bool slave_matrix_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + static matrix_row_t last_matrix[(MATRIX_ROWS) / 2] = {0}; // last successfully-read matrix, so we can replicate if there are checksum errors + matrix_row_t temp_matrix[(MATRIX_ROWS) / 2]; // holding area while we test whether or not checksum is correct + + bool okay = read_if_checksum_mismatch(GET_SLAVE_MATRIX_CHECKSUM, GET_SLAVE_MATRIX_DATA, &last_update, temp_matrix, split_shmem->smatrix.matrix, sizeof(split_shmem->smatrix.matrix)); + if (okay) { + // Checksum matches the received data, save as the last matrix state + memcpy(last_matrix, temp_matrix, sizeof(temp_matrix)); + } + // Copy out the last-known-good matrix state to the slave matrix + memcpy(slave_matrix, last_matrix, sizeof(last_matrix)); + return okay; +} + +static void slave_matrix_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + memcpy(split_shmem->smatrix.matrix, slave_matrix, sizeof(split_shmem->smatrix.matrix)); + split_shmem->smatrix.checksum = crc8(split_shmem->smatrix.matrix, sizeof(split_shmem->smatrix.matrix)); +} + +// clang-format off +#define TRANSACTIONS_SLAVE_MATRIX_MASTER() TRANSACTION_HANDLER_MASTER(slave_matrix) +#define TRANSACTIONS_SLAVE_MATRIX_SLAVE() TRANSACTION_HANDLER_SLAVE(slave_matrix) +#define TRANSACTIONS_SLAVE_MATRIX_REGISTRATIONS \ + [GET_SLAVE_MATRIX_CHECKSUM] = trans_target2initiator_initializer(smatrix.checksum), \ + [GET_SLAVE_MATRIX_DATA] = trans_target2initiator_initializer(smatrix.matrix), +// clang-format on + +//////////////////////////////////////////////////// +// Master matrix + +#ifdef SPLIT_TRANSPORT_MIRROR + +static bool master_matrix_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + return send_if_data_mismatch(PUT_MASTER_MATRIX, &last_update, master_matrix, split_shmem->mmatrix.matrix, sizeof(split_shmem->mmatrix.matrix)); +} + +static void master_matrix_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + // Always copy to the master matrix + memcpy(master_matrix, split_shmem->mmatrix.matrix, sizeof(split_shmem->mmatrix.matrix)); +} + +# define TRANSACTIONS_MASTER_MATRIX_MASTER() TRANSACTION_HANDLER_MASTER(master_matrix) +# define TRANSACTIONS_MASTER_MATRIX_SLAVE() TRANSACTION_HANDLER_SLAVE(master_matrix) +# define TRANSACTIONS_MASTER_MATRIX_REGISTRATIONS [PUT_MASTER_MATRIX] = trans_initiator2target_initializer(mmatrix.matrix), + +#else // SPLIT_TRANSPORT_MIRROR + +# define TRANSACTIONS_MASTER_MATRIX_MASTER() +# define TRANSACTIONS_MASTER_MATRIX_SLAVE() +# define TRANSACTIONS_MASTER_MATRIX_REGISTRATIONS + +#endif // SPLIT_TRANSPORT_MIRROR + +//////////////////////////////////////////////////// +// Encoders + +#ifdef ENCODER_ENABLE + +static bool encoder_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + uint8_t temp_state[NUMBER_OF_ENCODERS]; + + bool okay = read_if_checksum_mismatch(GET_ENCODERS_CHECKSUM, GET_ENCODERS_DATA, &last_update, temp_state, split_shmem->encoders.state, sizeof(temp_state)); + if (okay) encoder_update_raw(temp_state); + return okay; +} + +static void encoder_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + uint8_t encoder_state[NUMBER_OF_ENCODERS]; + encoder_state_raw(encoder_state); + // Always prepare the encoder state for read. + memcpy(split_shmem->encoders.state, encoder_state, sizeof(encoder_state)); + // Now update the checksum given that the encoders has been written to + split_shmem->encoders.checksum = crc8(encoder_state, sizeof(encoder_state)); +} + +// clang-format off +# define TRANSACTIONS_ENCODERS_MASTER() TRANSACTION_HANDLER_MASTER(encoder) +# define TRANSACTIONS_ENCODERS_SLAVE() TRANSACTION_HANDLER_SLAVE(encoder) +# define TRANSACTIONS_ENCODERS_REGISTRATIONS \ + [GET_ENCODERS_CHECKSUM] = trans_target2initiator_initializer(encoders.checksum), \ + [GET_ENCODERS_DATA] = trans_target2initiator_initializer(encoders.state), +// clang-format on + +#else // ENCODER_ENABLE + +# define TRANSACTIONS_ENCODERS_MASTER() +# define TRANSACTIONS_ENCODERS_SLAVE() +# define TRANSACTIONS_ENCODERS_REGISTRATIONS + +#endif // ENCODER_ENABLE + +//////////////////////////////////////////////////// +// Sync timer + +#ifndef DISABLE_SYNC_TIMER + +static bool sync_timer_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + + bool okay = true; + if (timer_elapsed32(last_update) >= FORCED_SYNC_THROTTLE_MS) { + uint32_t sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; + okay &= transport_write(PUT_SYNC_TIMER, &sync_timer, sizeof(sync_timer)); + if (okay) { + last_update = timer_read32(); + } + } + return okay; +} + +static void sync_timer_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_sync_timer = 0; + if (last_sync_timer != split_shmem->sync_timer) { + last_sync_timer = split_shmem->sync_timer; + sync_timer_update(last_sync_timer); + } +} + +# define TRANSACTIONS_SYNC_TIMER_MASTER() TRANSACTION_HANDLER_MASTER(sync_timer) +# define TRANSACTIONS_SYNC_TIMER_SLAVE() TRANSACTION_HANDLER_SLAVE(sync_timer) +# define TRANSACTIONS_SYNC_TIMER_REGISTRATIONS [PUT_SYNC_TIMER] = trans_initiator2target_initializer(sync_timer), + +#else // DISABLE_SYNC_TIMER + +# define TRANSACTIONS_SYNC_TIMER_MASTER() +# define TRANSACTIONS_SYNC_TIMER_SLAVE() +# define TRANSACTIONS_SYNC_TIMER_REGISTRATIONS + +#endif // DISABLE_SYNC_TIMER + +//////////////////////////////////////////////////// +// Layer state + +#if !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE) + +static bool layer_state_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_layer_state_update = 0; + static uint32_t last_default_layer_state_update = 0; + + bool okay = send_if_condition(PUT_LAYER_STATE, &last_layer_state_update, (layer_state != split_shmem->layers.layer_state), &layer_state, sizeof(layer_state)); + if (okay) { + okay &= send_if_condition(PUT_DEFAULT_LAYER_STATE, &last_default_layer_state_update, (default_layer_state != split_shmem->layers.default_layer_state), &default_layer_state, sizeof(default_layer_state)); + } + return okay; +} + +static void layer_state_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + layer_state = split_shmem->layers.layer_state; + default_layer_state = split_shmem->layers.default_layer_state; +} + +// clang-format off +# define TRANSACTIONS_LAYER_STATE_MASTER() TRANSACTION_HANDLER_MASTER(layer_state) +# define TRANSACTIONS_LAYER_STATE_SLAVE() TRANSACTION_HANDLER_SLAVE(layer_state) +# define TRANSACTIONS_LAYER_STATE_REGISTRATIONS \ + [PUT_LAYER_STATE] = trans_initiator2target_initializer(layers.layer_state), \ + [PUT_DEFAULT_LAYER_STATE] = trans_initiator2target_initializer(layers.default_layer_state), +// clang-format on + +#else // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE) + +# define TRANSACTIONS_LAYER_STATE_MASTER() +# define TRANSACTIONS_LAYER_STATE_SLAVE() +# define TRANSACTIONS_LAYER_STATE_REGISTRATIONS + +#endif // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE) + +//////////////////////////////////////////////////// +// LED state + +#ifdef SPLIT_LED_STATE_ENABLE + +static bool led_state_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + uint8_t led_state = host_keyboard_leds(); + return send_if_data_mismatch(PUT_LED_STATE, &last_update, &led_state, &split_shmem->led_state, sizeof(led_state)); +} + +static void led_state_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + void set_split_host_keyboard_leds(uint8_t led_state); + set_split_host_keyboard_leds(split_shmem->led_state); +} + +# define TRANSACTIONS_LED_STATE_MASTER() TRANSACTION_HANDLER_MASTER(led_state) +# define TRANSACTIONS_LED_STATE_SLAVE() TRANSACTION_HANDLER_SLAVE(led_state) +# define TRANSACTIONS_LED_STATE_REGISTRATIONS [PUT_LED_STATE] = trans_initiator2target_initializer(led_state), + +#else // SPLIT_LED_STATE_ENABLE + +# define TRANSACTIONS_LED_STATE_MASTER() +# define TRANSACTIONS_LED_STATE_SLAVE() +# define TRANSACTIONS_LED_STATE_REGISTRATIONS + +#endif // SPLIT_LED_STATE_ENABLE + +//////////////////////////////////////////////////// +// Mods + +#ifdef SPLIT_MODS_ENABLE + +static bool mods_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + bool mods_need_sync = timer_elapsed32(last_update) >= FORCED_SYNC_THROTTLE_MS; + split_mods_sync_t new_mods; + new_mods.real_mods = get_mods(); + if (!mods_need_sync && new_mods.real_mods != split_shmem->mods.real_mods) { + mods_need_sync = true; + } + + new_mods.weak_mods = get_weak_mods(); + if (!mods_need_sync && new_mods.weak_mods != split_shmem->mods.weak_mods) { + mods_need_sync = true; + } + +# ifndef NO_ACTION_ONESHOT + new_mods.oneshot_mods = get_oneshot_mods(); + if (!mods_need_sync && new_mods.oneshot_mods != split_shmem->mods.oneshot_mods) { + mods_need_sync = true; + } +# endif // NO_ACTION_ONESHOT + + bool okay = true; + if (mods_need_sync) { + okay &= transport_write(PUT_MODS, &new_mods, sizeof(new_mods)); + if (okay) { + last_update = timer_read32(); + } + } + + return okay; +} + +static void mods_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + set_mods(split_shmem->mods.real_mods); + set_weak_mods(split_shmem->mods.weak_mods); +# ifndef NO_ACTION_ONESHOT + set_oneshot_mods(split_shmem->mods.oneshot_mods); +# endif +} + +# define TRANSACTIONS_MODS_MASTER() TRANSACTION_HANDLER_MASTER(mods) +# define TRANSACTIONS_MODS_SLAVE() TRANSACTION_HANDLER_SLAVE(mods) +# define TRANSACTIONS_MODS_REGISTRATIONS [PUT_MODS] = trans_initiator2target_initializer(mods), + +#else // SPLIT_MODS_ENABLE + +# define TRANSACTIONS_MODS_MASTER() +# define TRANSACTIONS_MODS_SLAVE() +# define TRANSACTIONS_MODS_REGISTRATIONS + +#endif // SPLIT_MODS_ENABLE + +//////////////////////////////////////////////////// +// Backlight + +#ifdef BACKLIGHT_ENABLE + +static bool backlight_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0; + return send_if_condition(PUT_BACKLIGHT, &last_update, (level != split_shmem->backlight_level), &level, sizeof(level)); +} + +static void backlight_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { backlight_set(split_shmem->backlight_level); } + +# define TRANSACTIONS_BACKLIGHT_MASTER() TRANSACTION_HANDLER_MASTER(backlight) +# define TRANSACTIONS_BACKLIGHT_SLAVE() TRANSACTION_HANDLER_SLAVE(backlight) +# define TRANSACTIONS_BACKLIGHT_REGISTRATIONS [PUT_BACKLIGHT] = trans_initiator2target_initializer(backlight_level), + +#else // BACKLIGHT_ENABLE + +# define TRANSACTIONS_BACKLIGHT_MASTER() +# define TRANSACTIONS_BACKLIGHT_SLAVE() +# define TRANSACTIONS_BACKLIGHT_REGISTRATIONS + +#endif // BACKLIGHT_ENABLE + +//////////////////////////////////////////////////// +// RGBLIGHT + +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + +static bool rgblight_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + rgblight_syncinfo_t rgblight_sync; + rgblight_get_syncinfo(&rgblight_sync); + if (send_if_condition(PUT_RGBLIGHT, &last_update, (rgblight_sync.status.change_flags != 0), &rgblight_sync, sizeof(rgblight_sync))) { + rgblight_clear_change_flags(); + } else { + return false; + } + return true; +} + +static void rgblight_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + // Update the RGB with the new data + if (split_shmem->rgblight_sync.status.change_flags != 0) { + rgblight_update_sync(&split_shmem->rgblight_sync, false); + split_shmem->rgblight_sync.status.change_flags = 0; + } +} + +# define TRANSACTIONS_RGBLIGHT_MASTER() TRANSACTION_HANDLER_MASTER(rgblight) +# define TRANSACTIONS_RGBLIGHT_SLAVE() TRANSACTION_HANDLER_SLAVE(rgblight) +# define TRANSACTIONS_RGBLIGHT_REGISTRATIONS [PUT_RGBLIGHT] = trans_initiator2target_initializer(rgblight_sync), + +#else // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + +# define TRANSACTIONS_RGBLIGHT_MASTER() +# define TRANSACTIONS_RGBLIGHT_SLAVE() +# define TRANSACTIONS_RGBLIGHT_REGISTRATIONS + +#endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + +//////////////////////////////////////////////////// +// LED Matrix + +#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) + +static bool led_matrix_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + led_matrix_sync_t led_matrix_sync; + memcpy(&led_matrix_sync.led_matrix, &led_matrix_eeconfig, sizeof(led_eeconfig_t)); + led_matrix_sync.led_suspend_state = led_matrix_get_suspend_state(); + return send_if_data_mismatch(PUT_LED_MATRIX, &last_update, &led_matrix_sync, &split_shmem->led_matrix_sync, sizeof(led_matrix_sync)); +} + +static void led_matrix_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + memcpy(&led_matrix_eeconfig, &split_shmem->led_matrix_sync.led_matrix, sizeof(led_eeconfig_t)); + led_matrix_set_suspend_state(split_shmem->led_matrix_sync.led_suspend_state); +} + +# define TRANSACTIONS_LED_MATRIX_MASTER() TRANSACTION_HANDLER_MASTER(led_matrix) +# define TRANSACTIONS_LED_MATRIX_SLAVE() TRANSACTION_HANDLER_SLAVE(led_matrix) +# define TRANSACTIONS_LED_MATRIX_REGISTRATIONS [PUT_LED_MATRIX] = trans_initiator2target_initializer(led_matrix_sync), + +#else // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) + +# define TRANSACTIONS_LED_MATRIX_MASTER() +# define TRANSACTIONS_LED_MATRIX_SLAVE() +# define TRANSACTIONS_LED_MATRIX_REGISTRATIONS + +#endif // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) + +//////////////////////////////////////////////////// +// RGB Matrix + +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) + +static bool rgb_matrix_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + rgb_matrix_sync_t rgb_matrix_sync; + memcpy(&rgb_matrix_sync.rgb_matrix, &rgb_matrix_config, sizeof(rgb_config_t)); + rgb_matrix_sync.rgb_suspend_state = rgb_matrix_get_suspend_state(); + return send_if_data_mismatch(PUT_RGB_MATRIX, &last_update, &rgb_matrix_sync, &split_shmem->rgb_matrix_sync, sizeof(rgb_matrix_sync)); +} + +static void rgb_matrix_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + memcpy(&rgb_matrix_config, &split_shmem->rgb_matrix_sync.rgb_matrix, sizeof(rgb_config_t)); + rgb_matrix_set_suspend_state(split_shmem->rgb_matrix_sync.rgb_suspend_state); +} + +# define TRANSACTIONS_RGB_MATRIX_MASTER() TRANSACTION_HANDLER_MASTER(rgb_matrix) +# define TRANSACTIONS_RGB_MATRIX_SLAVE() TRANSACTION_HANDLER_SLAVE(rgb_matrix) +# define TRANSACTIONS_RGB_MATRIX_REGISTRATIONS [PUT_RGB_MATRIX] = trans_initiator2target_initializer(rgb_matrix_sync), + +#else // defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) + +# define TRANSACTIONS_RGB_MATRIX_MASTER() +# define TRANSACTIONS_RGB_MATRIX_SLAVE() +# define TRANSACTIONS_RGB_MATRIX_REGISTRATIONS + +#endif // defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) + +//////////////////////////////////////////////////// +// WPM + +#if defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE) + +static bool wpm_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + uint8_t current_wpm = get_current_wpm(); + return send_if_condition(PUT_WPM, &last_update, (current_wpm != split_shmem->current_wpm), ¤t_wpm, sizeof(current_wpm)); +} + +static void wpm_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { set_current_wpm(split_shmem->current_wpm); } + +# define TRANSACTIONS_WPM_MASTER() TRANSACTION_HANDLER_MASTER(wpm) +# define TRANSACTIONS_WPM_SLAVE() TRANSACTION_HANDLER_SLAVE(wpm) +# define TRANSACTIONS_WPM_REGISTRATIONS [PUT_WPM] = trans_initiator2target_initializer(current_wpm), + +#else // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE) + +# define TRANSACTIONS_WPM_MASTER() +# define TRANSACTIONS_WPM_SLAVE() +# define TRANSACTIONS_WPM_REGISTRATIONS + +#endif // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE) + +//////////////////////////////////////////////////// +// OLED + +#if defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) + +static bool oled_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + bool current_oled_state = is_oled_on(); + return send_if_condition(PUT_OLED, &last_update, (current_oled_state != split_shmem->current_oled_state), ¤t_oled_state, sizeof(current_oled_state)); +} + +static void oled_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + if (split_shmem->current_oled_state) { + oled_on(); + } else { + oled_off(); + } +} + +# define TRANSACTIONS_OLED_MASTER() TRANSACTION_HANDLER_MASTER(oled) +# define TRANSACTIONS_OLED_SLAVE() TRANSACTION_HANDLER_SLAVE(oled) +# define TRANSACTIONS_OLED_REGISTRATIONS [PUT_OLED] = trans_initiator2target_initializer(current_oled_state), + +#else // defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) + +# define TRANSACTIONS_OLED_MASTER() +# define TRANSACTIONS_OLED_SLAVE() +# define TRANSACTIONS_OLED_REGISTRATIONS + +#endif // defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) + +//////////////////////////////////////////////////// +// ST7565 + +#if defined(ST7565_ENABLE) && defined(SPLIT_ST7565_ENABLE) + +static bool st7565_handlers_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + static uint32_t last_update = 0; + bool current_st7565_state = st7565_is_on(); + return send_if_condition(PUT_ST7565, &last_update, (current_st7565_state != split_shmem->current_st7565_state), ¤t_st7565_state, sizeof(current_st7565_state)); +} + +static void st7565_handlers_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + if (split_shmem->current_st7565_state) { + st7565_on(); + } else { + st7565_off(); + } +} + +# define TRANSACTIONS_ST7565_MASTER() TRANSACTION_HANDLER_MASTER(st7565) +# define TRANSACTIONS_ST7565_SLAVE() TRANSACTION_HANDLER_SLAVE(st7565) +# define TRANSACTIONS_ST7565_REGISTRATIONS [PUT_ST7565] = trans_initiator2target_initializer(current_st7565_state), + +#else // defined(ST7565_ENABLE) && defined(SPLIT_ST7565_ENABLE) + +# define TRANSACTIONS_ST7565_MASTER() +# define TRANSACTIONS_ST7565_SLAVE() +# define TRANSACTIONS_ST7565_REGISTRATIONS + +#endif // defined(ST7565_ENABLE) && defined(SPLIT_ST7565_ENABLE) + +//////////////////////////////////////////////////// + +uint8_t dummy; +split_transaction_desc_t split_transaction_table[NUM_TOTAL_TRANSACTIONS] = { + // Set defaults + [0 ...(NUM_TOTAL_TRANSACTIONS - 1)] = {NULL, 0, 0, 0, 0, 0}, + +#ifdef USE_I2C + [I2C_EXECUTE_CALLBACK] = trans_initiator2target_initializer(transaction_id), +#endif // USE_I2C + + // clang-format off + TRANSACTIONS_SLAVE_MATRIX_REGISTRATIONS + TRANSACTIONS_MASTER_MATRIX_REGISTRATIONS + TRANSACTIONS_ENCODERS_REGISTRATIONS + TRANSACTIONS_SYNC_TIMER_REGISTRATIONS + TRANSACTIONS_LAYER_STATE_REGISTRATIONS + TRANSACTIONS_LED_STATE_REGISTRATIONS + TRANSACTIONS_MODS_REGISTRATIONS + TRANSACTIONS_BACKLIGHT_REGISTRATIONS + TRANSACTIONS_RGBLIGHT_REGISTRATIONS + TRANSACTIONS_LED_MATRIX_REGISTRATIONS + TRANSACTIONS_RGB_MATRIX_REGISTRATIONS + TRANSACTIONS_WPM_REGISTRATIONS + TRANSACTIONS_OLED_REGISTRATIONS + TRANSACTIONS_ST7565_REGISTRATIONS +// clang-format on + +#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) + [PUT_RPC_INFO] = trans_initiator2target_initializer_cb(rpc_info, slave_rpc_info_callback), + [PUT_RPC_REQ_DATA] = trans_initiator2target_initializer(rpc_m2s_buffer), + [EXECUTE_RPC] = trans_initiator2target_initializer_cb(rpc_info.transaction_id, slave_rpc_exec_callback), + [GET_RPC_RESP_DATA] = trans_target2initiator_initializer(rpc_s2m_buffer), +#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) +}; + +bool transactions_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + TRANSACTIONS_SLAVE_MATRIX_MASTER(); + TRANSACTIONS_MASTER_MATRIX_MASTER(); + TRANSACTIONS_ENCODERS_MASTER(); + TRANSACTIONS_SYNC_TIMER_MASTER(); + TRANSACTIONS_LAYER_STATE_MASTER(); + TRANSACTIONS_LED_STATE_MASTER(); + TRANSACTIONS_MODS_MASTER(); + TRANSACTIONS_BACKLIGHT_MASTER(); + TRANSACTIONS_RGBLIGHT_MASTER(); + TRANSACTIONS_LED_MATRIX_MASTER(); + TRANSACTIONS_RGB_MATRIX_MASTER(); + TRANSACTIONS_WPM_MASTER(); + TRANSACTIONS_OLED_MASTER(); + TRANSACTIONS_ST7565_MASTER(); + return true; +} + +void transactions_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { + TRANSACTIONS_SLAVE_MATRIX_SLAVE(); + TRANSACTIONS_MASTER_MATRIX_SLAVE(); + TRANSACTIONS_ENCODERS_SLAVE(); + TRANSACTIONS_SYNC_TIMER_SLAVE(); + TRANSACTIONS_LAYER_STATE_SLAVE(); + TRANSACTIONS_LED_STATE_SLAVE(); + TRANSACTIONS_MODS_SLAVE(); + TRANSACTIONS_BACKLIGHT_SLAVE(); + TRANSACTIONS_RGBLIGHT_SLAVE(); + TRANSACTIONS_LED_MATRIX_SLAVE(); + TRANSACTIONS_RGB_MATRIX_SLAVE(); + TRANSACTIONS_WPM_SLAVE(); + TRANSACTIONS_OLED_SLAVE(); + TRANSACTIONS_ST7565_SLAVE(); +} + +#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) + +void transaction_register_rpc(int8_t transaction_id, slave_callback_t callback) { + // Prevent invoking RPC on QMK core sync data + if (transaction_id <= GET_RPC_RESP_DATA) return; + + // Set the callback + split_transaction_table[transaction_id].slave_callback = callback; + split_transaction_table[transaction_id].initiator2target_offset = offsetof(split_shared_memory_t, rpc_m2s_buffer); + split_transaction_table[transaction_id].target2initiator_offset = offsetof(split_shared_memory_t, rpc_s2m_buffer); +} + +bool transaction_rpc_exec(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer) { + // Prevent transaction attempts while transport is disconnected + if (!is_transport_connected()) { + return false; + } + // Prevent invoking RPC on QMK core sync data + if (transaction_id <= GET_RPC_RESP_DATA) return false; + // Prevent sizing issues + if (initiator2target_buffer_size > RPC_M2S_BUFFER_SIZE) return false; + if (target2initiator_buffer_size > RPC_S2M_BUFFER_SIZE) return false; + + // Prepare the metadata block + rpc_sync_info_t info = {.transaction_id = transaction_id, .m2s_length = initiator2target_buffer_size, .s2m_length = target2initiator_buffer_size}; + + // Make sure the local side knows that we're not sending the full block of data + split_transaction_table[PUT_RPC_REQ_DATA].initiator2target_buffer_size = initiator2target_buffer_size; + split_transaction_table[GET_RPC_RESP_DATA].target2initiator_buffer_size = target2initiator_buffer_size; + + // Run through the sequence: + // * set the transaction ID and lengths + // * send the request data + // * execute RPC callback + // * retrieve the response data + if (!transport_write(PUT_RPC_INFO, &info, sizeof(info))) { + return false; + } + if (!transport_write(PUT_RPC_REQ_DATA, initiator2target_buffer, initiator2target_buffer_size)) { + return false; + } + if (!transport_write(EXECUTE_RPC, &transaction_id, sizeof(transaction_id))) { + return false; + } + if (!transport_read(GET_RPC_RESP_DATA, target2initiator_buffer, target2initiator_buffer_size)) { + return false; + } + return true; +} + +void slave_rpc_info_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer) { + // The RPC info block contains the intended transaction ID, as well as the sizes for both inbound and outbound data. + // Ignore the args -- the `split_shmem` already has the info, we just need to act upon it. + // We must keep the `split_transaction_table` non-const, so that it is able to be modified at runtime. + + split_transaction_table[PUT_RPC_REQ_DATA].initiator2target_buffer_size = split_shmem->rpc_info.m2s_length; + split_transaction_table[GET_RPC_RESP_DATA].target2initiator_buffer_size = split_shmem->rpc_info.s2m_length; +} + +void slave_rpc_exec_callback(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer) { + // We can assume that the buffer lengths are correctly set, now, given that sequentially the rpc_info callback was already executed. + // Go through the rpc_info and execute _that_ transaction's callback, with the scratch buffers as inputs. + int8_t transaction_id = split_shmem->rpc_info.transaction_id; + if (transaction_id < NUM_TOTAL_TRANSACTIONS) { + split_transaction_desc_t *trans = &split_transaction_table[transaction_id]; + if (trans->slave_callback) { + trans->slave_callback(split_shmem->rpc_info.m2s_length, split_shmem->rpc_m2s_buffer, split_shmem->rpc_info.s2m_length, split_shmem->rpc_s2m_buffer); + } + } +} + +#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) diff --git a/quantum/split_common/transactions.h b/quantum/split_common/transactions.h new file mode 100644 index 000000000..53610d6f8 --- /dev/null +++ b/quantum/split_common/transactions.h @@ -0,0 +1,54 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "stdint.h" +#include "stdbool.h" + +#include "matrix.h" +#include "transaction_id_define.h" +#include "transport.h" + +typedef void (*slave_callback_t)(uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer); + +// Split transaction Descriptor +typedef struct _split_transaction_desc_t { + uint8_t * status; + uint8_t initiator2target_buffer_size; + uint16_t initiator2target_offset; + uint8_t target2initiator_buffer_size; + uint16_t target2initiator_offset; + slave_callback_t slave_callback; +} split_transaction_desc_t; + +// Forward declaration for the split transactions +extern split_transaction_desc_t split_transaction_table[NUM_TOTAL_TRANSACTIONS]; + +#define split_shmem_offset_ptr(offset) (((uint8_t *)split_shmem) + (offset)) +#define split_trans_initiator2target_buffer(trans) (split_shmem_offset_ptr((trans)->initiator2target_offset)) +#define split_trans_target2initiator_buffer(trans) (split_shmem_offset_ptr((trans)->target2initiator_offset)) + +// returns false if valid data not received from slave +bool transactions_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]); +void transactions_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]); + +void transaction_register_rpc(int8_t transaction_id, slave_callback_t callback); + +bool transaction_rpc_exec(int8_t transaction_id, uint8_t initiator2target_buffer_size, const void *initiator2target_buffer, uint8_t target2initiator_buffer_size, void *target2initiator_buffer); + +#define transaction_rpc_send(transaction_id, initiator2target_buffer_size, initiator2target_buffer) transaction_rpc_exec(transaction_id, initiator2target_buffer_size, initiator2target_buffer, 0, NULL) +#define transaction_rpc_recv(transaction_id, target2initiator_buffer_size, target2initiator_buffer) transaction_rpc_exec(transaction_id, 0, NULL, target2initiator_buffer_size, target2initiator_buffer) diff --git a/quantum/split_common/transport.c b/quantum/split_common/transport.c index 9ed0f7591..bcc026141 100644 --- a/quantum/split_common/transport.c +++ b/quantum/split_common/transport.c @@ -1,452 +1,118 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include -#include +#include -#include "config.h" -#include "matrix.h" -#include "quantum.h" +#include "transactions.h" +#include "transport.h" +#include "transaction_id_define.h" +#include "atomic_util.h" -#define ROWS_PER_HAND (MATRIX_ROWS / 2) -#define SYNC_TIMER_OFFSET 2 +#ifdef USE_I2C -#ifdef RGBLIGHT_ENABLE -# include "rgblight.h" -#endif - -#ifdef BACKLIGHT_ENABLE -# include "backlight.h" -#endif - -#ifdef ENCODER_ENABLE -# include "encoder.h" -static pin_t encoders_pad[] = ENCODERS_PAD_A; -# define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t)) -#endif - -#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) -# include "led_matrix.h" -#endif -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) -# include "rgb_matrix.h" -#endif - -#if defined(USE_I2C) - -# include "i2c_master.h" -# include "i2c_slave.h" - -typedef struct _I2C_slave_buffer_t { -# ifndef DISABLE_SYNC_TIMER - uint32_t sync_timer; -# endif -# ifdef SPLIT_TRANSPORT_MIRROR - matrix_row_t mmatrix[ROWS_PER_HAND]; -# endif - matrix_row_t smatrix[ROWS_PER_HAND]; -# ifdef SPLIT_MODS_ENABLE - uint8_t real_mods; - uint8_t weak_mods; -# ifndef NO_ACTION_ONESHOT - uint8_t oneshot_mods; -# endif -# endif -# ifdef BACKLIGHT_ENABLE - uint8_t backlight_level; -# endif -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - rgblight_syncinfo_t rgblight_sync; -# endif -# ifdef ENCODER_ENABLE - uint8_t encoder_state[NUMBER_OF_ENCODERS]; -# endif -# ifdef WPM_ENABLE - uint8_t current_wpm; -# endif -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - led_eeconfig_t led_matrix; - bool led_suspend_state; -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - rgb_config_t rgb_matrix; - bool rgb_suspend_state; -# endif -} I2C_slave_buffer_t; - -static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg; - -# define I2C_SYNC_TIME_START offsetof(I2C_slave_buffer_t, sync_timer) -# define I2C_KEYMAP_MASTER_START offsetof(I2C_slave_buffer_t, mmatrix) -# define I2C_KEYMAP_SLAVE_START offsetof(I2C_slave_buffer_t, smatrix) -# define I2C_REAL_MODS_START offsetof(I2C_slave_buffer_t, real_mods) -# define I2C_WEAK_MODS_START offsetof(I2C_slave_buffer_t, weak_mods) -# define I2C_ONESHOT_MODS_START offsetof(I2C_slave_buffer_t, oneshot_mods) -# define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level) -# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync) -# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state) -# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm) -# define I2C_LED_MATRIX_START offsetof(I2C_slave_buffer_t, led_matrix) -# define I2C_LED_SUSPEND_START offsetof(I2C_slave_buffer_t, led_suspend_state) -# define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix) -# define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state) - -# define TIMEOUT 100 +# ifndef SLAVE_I2C_TIMEOUT +# define SLAVE_I2C_TIMEOUT 100 +# endif // SLAVE_I2C_TIMEOUT # ifndef SLAVE_I2C_ADDRESS # define SLAVE_I2C_ADDRESS 0x32 # endif -// Get rows from other half over i2c -bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_SLAVE_START, (void *)slave_matrix, sizeof(i2c_buffer->smatrix), TIMEOUT); -# ifdef SPLIT_TRANSPORT_MIRROR - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_MASTER_START, (void *)master_matrix, sizeof(i2c_buffer->mmatrix), TIMEOUT); -# endif +# include "i2c_master.h" +# include "i2c_slave.h" - // write backlight info -# ifdef BACKLIGHT_ENABLE - uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0; - if (level != i2c_buffer->backlight_level) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) { - i2c_buffer->backlight_level = level; - } +// Ensure the I2C buffer has enough space +_Static_assert(sizeof(split_shared_memory_t) <= I2C_SLAVE_REG_COUNT, "split_shared_memory_t too large for I2C_SLAVE_REG_COUNT"); + +split_shared_memory_t *const split_shmem = (split_shared_memory_t *)i2c_slave_reg; + +void transport_master_init(void) { i2c_init(); } +void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); } + +i2c_status_t transport_trigger_callback(int8_t id) { + // If there's no callback, indicate that we were successful + if (!split_transaction_table[id].slave_callback) { + return I2C_STATUS_SUCCESS; } -# endif -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - if (rgblight_get_change_flags()) { - rgblight_syncinfo_t rgblight_sync; - rgblight_get_syncinfo(&rgblight_sync); - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgblight_sync, sizeof(rgblight_sync), TIMEOUT) >= 0) { - rgblight_clear_change_flags(); - } - } -# endif + // Kick off the "callback executor", now that data has been written to the slave + split_shmem->transaction_id = id; + split_transaction_desc_t *trans = &split_transaction_table[I2C_EXECUTE_CALLBACK]; + return i2c_writeReg(SLAVE_I2C_ADDRESS, trans->initiator2target_offset, split_trans_initiator2target_buffer(trans), trans->initiator2target_buffer_size, SLAVE_I2C_TIMEOUT); +} -# ifdef ENCODER_ENABLE - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(i2c_buffer->encoder_state), TIMEOUT); - encoder_update_raw(i2c_buffer->encoder_state); -# endif - -# ifdef WPM_ENABLE - uint8_t current_wpm = get_current_wpm(); - if (current_wpm != i2c_buffer->current_wpm) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WPM_START, (void *)¤t_wpm, sizeof(current_wpm), TIMEOUT) >= 0) { - i2c_buffer->current_wpm = current_wpm; - } - } -# endif - -# ifdef SPLIT_MODS_ENABLE - uint8_t real_mods = get_mods(); - if (real_mods != i2c_buffer->real_mods) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_REAL_MODS_START, (void *)&real_mods, sizeof(real_mods), TIMEOUT) >= 0) { - i2c_buffer->real_mods = real_mods; +bool transport_execute_transaction(int8_t id, const void *initiator2target_buf, uint16_t initiator2target_length, void *target2initiator_buf, uint16_t target2initiator_length) { + i2c_status_t status; + split_transaction_desc_t *trans = &split_transaction_table[id]; + if (initiator2target_length > 0) { + size_t len = trans->initiator2target_buffer_size < initiator2target_length ? trans->initiator2target_buffer_size : initiator2target_length; + memcpy(split_trans_initiator2target_buffer(trans), initiator2target_buf, len); + if ((status = i2c_writeReg(SLAVE_I2C_ADDRESS, trans->initiator2target_offset, split_trans_initiator2target_buffer(trans), len, SLAVE_I2C_TIMEOUT)) < 0) { + return false; } } - uint8_t weak_mods = get_weak_mods(); - if (weak_mods != i2c_buffer->weak_mods) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WEAK_MODS_START, (void *)&weak_mods, sizeof(weak_mods), TIMEOUT) >= 0) { - i2c_buffer->weak_mods = weak_mods; - } + // If we need to execute a callback on the slave, do so + if ((status = transport_trigger_callback(id)) < 0) { + return false; } -# ifndef NO_ACTION_ONESHOT - uint8_t oneshot_mods = get_oneshot_mods(); - if (oneshot_mods != i2c_buffer->oneshot_mods) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_ONESHOT_MODS_START, (void *)&oneshot_mods, sizeof(oneshot_mods), TIMEOUT) >= 0) { - i2c_buffer->oneshot_mods = oneshot_mods; + if (target2initiator_length > 0) { + size_t len = trans->target2initiator_buffer_size < target2initiator_length ? trans->target2initiator_buffer_size : target2initiator_length; + if ((status = i2c_readReg(SLAVE_I2C_ADDRESS, trans->target2initiator_offset, split_trans_target2initiator_buffer(trans), len, SLAVE_I2C_TIMEOUT)) < 0) { + return false; } + memcpy(target2initiator_buf, split_trans_target2initiator_buffer(trans), len); } -# endif -# endif -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT); - bool suspend_state = led_matrix_get_suspend_state(); - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT); - bool suspend_state = rgb_matrix_get_suspend_state(); - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT); -# endif - -# ifndef DISABLE_SYNC_TIMER - i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT); -# endif return true; } -void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { -# ifndef DISABLE_SYNC_TIMER - sync_timer_update(i2c_buffer->sync_timer); -# endif - // Copy matrix to I2C buffer - memcpy((void *)i2c_buffer->smatrix, (void *)slave_matrix, sizeof(i2c_buffer->smatrix)); -# ifdef SPLIT_TRANSPORT_MIRROR - memcpy((void *)master_matrix, (void *)i2c_buffer->mmatrix, sizeof(i2c_buffer->mmatrix)); -# endif - -// Read Backlight Info -# ifdef BACKLIGHT_ENABLE - backlight_set(i2c_buffer->backlight_level); -# endif - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - // Update the RGB with the new data - if (i2c_buffer->rgblight_sync.status.change_flags != 0) { - rgblight_update_sync(&i2c_buffer->rgblight_sync, false); - i2c_buffer->rgblight_sync.status.change_flags = 0; - } -# endif - -# ifdef ENCODER_ENABLE - encoder_state_raw(i2c_buffer->encoder_state); -# endif - -# ifdef WPM_ENABLE - set_current_wpm(i2c_buffer->current_wpm); -# endif - -# ifdef SPLIT_MODS_ENABLE - set_mods(i2c_buffer->real_mods); - set_weak_mods(i2c_buffer->weak_mods); -# ifndef NO_ACTION_ONESHOT - set_oneshot_mods(i2c_buffer->oneshot_mods); -# endif -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - memcpy((void *)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix)); - led_matrix_set_suspend_state(i2c_buffer->led_suspend_state); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix)); - rgb_matrix_set_suspend_state(i2c_buffer->rgb_suspend_state); -# endif -} - -void transport_master_init(void) { i2c_init(); } - -void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); } - -#else // USE_SERIAL +#else // USE_I2C # include "serial.h" -typedef struct _Serial_s2m_buffer_t { - // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack - matrix_row_t smatrix[ROWS_PER_HAND]; +static split_shared_memory_t shared_memory; +split_shared_memory_t *const split_shmem = &shared_memory; -# ifdef ENCODER_ENABLE - uint8_t encoder_state[NUMBER_OF_ENCODERS]; -# endif +void transport_master_init(void) { soft_serial_initiator_init(); } +void transport_slave_init(void) { soft_serial_target_init(); } -} Serial_s2m_buffer_t; - -typedef struct _Serial_m2s_buffer_t { -# ifdef SPLIT_MODS_ENABLE - uint8_t real_mods; - uint8_t weak_mods; -# ifndef NO_ACTION_ONESHOT - uint8_t oneshot_mods; -# endif -# endif -# ifndef DISABLE_SYNC_TIMER - uint32_t sync_timer; -# endif -# ifdef SPLIT_TRANSPORT_MIRROR - matrix_row_t mmatrix[ROWS_PER_HAND]; -# endif -# ifdef BACKLIGHT_ENABLE - uint8_t backlight_level; -# endif -# ifdef WPM_ENABLE - uint8_t current_wpm; -# endif -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - led_eeconfig_t led_matrix; - bool led_suspend_state; -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - rgb_config_t rgb_matrix; - bool rgb_suspend_state; -# endif -} Serial_m2s_buffer_t; - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) -// When MCUs on both sides drive their respective RGB LED chains, -// it is necessary to synchronize, so it is necessary to communicate RGB -// information. In that case, define RGBLIGHT_SPLIT with info on the number -// of LEDs on each half. -// -// Otherwise, if the master side MCU drives both sides RGB LED chains, -// there is no need to communicate. - -typedef struct _Serial_rgblight_t { - rgblight_syncinfo_t rgblight_sync; -} Serial_rgblight_t; - -volatile Serial_rgblight_t serial_rgblight = {}; -uint8_t volatile status_rgblight = 0; -# endif - -volatile Serial_s2m_buffer_t serial_s2m_buffer = {}; -volatile Serial_m2s_buffer_t serial_m2s_buffer = {}; -uint8_t volatile status0 = 0; - -enum serial_transaction_id { - GET_SLAVE_MATRIX = 0, -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - PUT_RGBLIGHT, -# endif -}; - -SSTD_t transactions[] = { - [GET_SLAVE_MATRIX] = - { - (uint8_t *)&status0, - sizeof(serial_m2s_buffer), - (uint8_t *)&serial_m2s_buffer, - sizeof(serial_s2m_buffer), - (uint8_t *)&serial_s2m_buffer, - }, -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - [PUT_RGBLIGHT] = - { - (uint8_t *)&status_rgblight, sizeof(serial_rgblight), (uint8_t *)&serial_rgblight, 0, NULL // no slave to master transfer - }, -# endif -}; - -void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } - -void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); } - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - -// rgblight synchronization information communication. - -void transport_rgblight_master(void) { - if (rgblight_get_change_flags()) { - rgblight_get_syncinfo((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync); - if (soft_serial_transaction(PUT_RGBLIGHT) == TRANSACTION_END) { - rgblight_clear_change_flags(); - } +bool transport_execute_transaction(int8_t id, const void *initiator2target_buf, uint16_t initiator2target_length, void *target2initiator_buf, uint16_t target2initiator_length) { + split_transaction_desc_t *trans = &split_transaction_table[id]; + if (initiator2target_length > 0) { + size_t len = trans->initiator2target_buffer_size < initiator2target_length ? trans->initiator2target_buffer_size : initiator2target_length; + memcpy(split_trans_initiator2target_buffer(trans), initiator2target_buf, len); } -} -void transport_rgblight_slave(void) { - if (status_rgblight == TRANSACTION_ACCEPTED) { - rgblight_update_sync((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync, false); - status_rgblight = TRANSACTION_END; - } -} - -# else -# define transport_rgblight_master() -# define transport_rgblight_slave() -# endif - -bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { -# ifndef SERIAL_USE_MULTI_TRANSACTION - if (soft_serial_transaction() != TRANSACTION_END) { + if (soft_serial_transaction(id) != TRANSACTION_END) { return false; } -# else - transport_rgblight_master(); - if (soft_serial_transaction(GET_SLAVE_MATRIX) != TRANSACTION_END) { - return false; - } -# endif - // TODO: if MATRIX_COLS > 8 change to unpack() - for (int i = 0; i < ROWS_PER_HAND; ++i) { - slave_matrix[i] = serial_s2m_buffer.smatrix[i]; -# ifdef SPLIT_TRANSPORT_MIRROR - serial_m2s_buffer.mmatrix[i] = master_matrix[i]; -# endif + if (target2initiator_length > 0) { + size_t len = trans->target2initiator_buffer_size < target2initiator_length ? trans->target2initiator_buffer_size : target2initiator_length; + memcpy(target2initiator_buf, split_trans_target2initiator_buffer(trans), len); } -# ifdef BACKLIGHT_ENABLE - // Write backlight level for slave to read - serial_m2s_buffer.backlight_level = is_backlight_enabled() ? get_backlight_level() : 0; -# endif - -# ifdef ENCODER_ENABLE - encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state); -# endif - -# ifdef WPM_ENABLE - // Write wpm to slave - serial_m2s_buffer.current_wpm = get_current_wpm(); -# endif - -# ifdef SPLIT_MODS_ENABLE - serial_m2s_buffer.real_mods = get_mods(); - serial_m2s_buffer.weak_mods = get_weak_mods(); -# ifndef NO_ACTION_ONESHOT - serial_m2s_buffer.oneshot_mods = get_oneshot_mods(); -# endif -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - serial_m2s_buffer.led_matrix = led_matrix_eeconfig; - serial_m2s_buffer.led_suspend_state = led_matrix_get_suspend_state(); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - serial_m2s_buffer.rgb_matrix = rgb_matrix_config; - serial_m2s_buffer.rgb_suspend_state = rgb_matrix_get_suspend_state(); -# endif - -# ifndef DISABLE_SYNC_TIMER - serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; -# endif return true; } -void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { - transport_rgblight_slave(); -# ifndef DISABLE_SYNC_TIMER - sync_timer_update(serial_m2s_buffer.sync_timer); -# endif +#endif // USE_I2C - // TODO: if MATRIX_COLS > 8 change to pack() - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_s2m_buffer.smatrix[i] = slave_matrix[i]; -# ifdef SPLIT_TRANSPORT_MIRROR - master_matrix[i] = serial_m2s_buffer.mmatrix[i]; -# endif - } -# ifdef BACKLIGHT_ENABLE - backlight_set(serial_m2s_buffer.backlight_level); -# endif +bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { return transactions_master(master_matrix, slave_matrix); } -# ifdef ENCODER_ENABLE - encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state); -# endif - -# ifdef WPM_ENABLE - set_current_wpm(serial_m2s_buffer.current_wpm); -# endif - -# ifdef SPLIT_MODS_ENABLE - set_mods(serial_m2s_buffer.real_mods); - set_weak_mods(serial_m2s_buffer.weak_mods); -# ifndef NO_ACTION_ONESHOT - set_oneshot_mods(serial_m2s_buffer.oneshot_mods); -# endif -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - led_matrix_eeconfig = serial_m2s_buffer.led_matrix; - led_matrix_set_suspend_state(serial_m2s_buffer.led_suspend_state); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - rgb_matrix_config = serial_m2s_buffer.rgb_matrix; - rgb_matrix_set_suspend_state(serial_m2s_buffer.rgb_suspend_state); -# endif -} - -#endif +void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { transactions_slave(master_matrix, slave_matrix); } diff --git a/quantum/split_common/transport.h b/quantum/split_common/transport.h index a9f66301b..1d4f6ed0c 100644 --- a/quantum/split_common/transport.h +++ b/quantum/split_common/transport.h @@ -1,10 +1,183 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License 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 "stdint.h" +#include "stdbool.h" + +#include "progmem.h" +#include "action_layer.h" #include "matrix.h" +#ifndef RPC_M2S_BUFFER_SIZE +# define RPC_M2S_BUFFER_SIZE 32 +#endif // RPC_M2S_BUFFER_SIZE + +#ifndef RPC_S2M_BUFFER_SIZE +# define RPC_S2M_BUFFER_SIZE 32 +#endif // RPC_S2M_BUFFER_SIZE + void transport_master_init(void); void transport_slave_init(void); // returns false if valid data not received from slave bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]); void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]); + +bool transport_execute_transaction(int8_t id, const void *initiator2target_buf, uint16_t initiator2target_length, void *target2initiator_buf, uint16_t target2initiator_length); + +#ifdef ENCODER_ENABLE +# include "encoder.h" +# define NUMBER_OF_ENCODERS (sizeof((pin_t[])ENCODERS_PAD_A) / sizeof(pin_t)) +#endif // ENCODER_ENABLE + +#ifdef BACKLIGHT_ENABLE +# include "backlight.h" +#endif // BACKLIGHT_ENABLE + +#ifdef RGBLIGHT_ENABLE +# include "rgblight.h" +#endif // RGBLIGHT_ENABLE + +typedef struct _split_slave_matrix_sync_t { + uint8_t checksum; + matrix_row_t matrix[(MATRIX_ROWS) / 2]; +} split_slave_matrix_sync_t; + +#ifdef SPLIT_TRANSPORT_MIRROR +typedef struct _split_master_matrix_sync_t { + matrix_row_t matrix[(MATRIX_ROWS) / 2]; +} split_master_matrix_sync_t; +#endif // SPLIT_TRANSPORT_MIRROR + +#ifdef ENCODER_ENABLE +typedef struct _split_slave_encoder_sync_t { + uint8_t checksum; + uint8_t state[NUMBER_OF_ENCODERS]; +} split_slave_encoder_sync_t; +#endif // ENCODER_ENABLE + +#if !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE) +typedef struct _split_layers_sync_t { + layer_state_t layer_state; + layer_state_t default_layer_state; +} split_layers_sync_t; +#endif // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE) + +#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) +# include "led_matrix.h" + +typedef struct _led_matrix_sync_t { + led_eeconfig_t led_matrix; + bool led_suspend_state; +} led_matrix_sync_t; +#endif // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) + +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) +# include "rgb_matrix.h" + +typedef struct _rgb_matrix_sync_t { + rgb_config_t rgb_matrix; + bool rgb_suspend_state; +} rgb_matrix_sync_t; +#endif // defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) + +#ifdef SPLIT_MODS_ENABLE +typedef struct _split_mods_sync_t { + uint8_t real_mods; + uint8_t weak_mods; +# ifndef NO_ACTION_ONESHOT + uint8_t oneshot_mods; +# endif // NO_ACTION_ONESHOT +} split_mods_sync_t; +#endif // SPLIT_MODS_ENABLE + +#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) +typedef struct _rpc_sync_info_t { + int8_t transaction_id; + uint8_t m2s_length; + uint8_t s2m_length; +} rpc_sync_info_t; +#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) + +typedef struct _split_shared_memory_t { +#ifdef USE_I2C + int8_t transaction_id; +#endif // USE_I2C + + split_slave_matrix_sync_t smatrix; + +#ifdef SPLIT_TRANSPORT_MIRROR + split_master_matrix_sync_t mmatrix; +#endif // SPLIT_TRANSPORT_MIRROR + +#ifdef ENCODER_ENABLE + split_slave_encoder_sync_t encoders; +#endif // ENCODER_ENABLE + +#ifndef DISABLE_SYNC_TIMER + uint32_t sync_timer; +#endif // DISABLE_SYNC_TIMER + +#if !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE) + split_layers_sync_t layers; +#endif // !defined(NO_ACTION_LAYER) && defined(SPLIT_LAYER_STATE_ENABLE) + +#ifdef SPLIT_LED_STATE_ENABLE + uint8_t led_state; +#endif // SPLIT_LED_STATE_ENABLE + +#ifdef SPLIT_MODS_ENABLE + split_mods_sync_t mods; +#endif // SPLIT_MODS_ENABLE + +#ifdef BACKLIGHT_ENABLE + uint8_t backlight_level; +#endif // BACKLIGHT_ENABLE + +#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + rgblight_syncinfo_t rgblight_sync; +#endif // defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) + +#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) + led_matrix_sync_t led_matrix_sync; +#endif // defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) + +#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) + rgb_matrix_sync_t rgb_matrix_sync; +#endif // defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) + +#if defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE) + uint8_t current_wpm; +#endif // defined(WPM_ENABLE) && defined(SPLIT_WPM_ENABLE) + +#if defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) + uint8_t current_oled_state; +#endif // defined(OLED_ENABLE) && defined(SPLIT_OLED_ENABLE) + +#if defined(ST7565_ENABLE) && defined(SPLIT_ST7565_ENABLE) + uint8_t current_st7565_state; +#endif // ST7565_ENABLE(OLED_ENABLE) && defined(SPLIT_ST7565_ENABLE) + +#if defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) + rpc_sync_info_t rpc_info; + uint8_t rpc_m2s_buffer[RPC_M2S_BUFFER_SIZE]; + uint8_t rpc_s2m_buffer[RPC_S2M_BUFFER_SIZE]; +#endif // defined(SPLIT_TRANSACTION_IDS_KB) || defined(SPLIT_TRANSACTION_IDS_USER) +} split_shared_memory_t; + +extern split_shared_memory_t *const split_shmem; diff --git a/quantum/template/avr/rules.mk b/quantum/template/avr/rules.mk deleted file mode 100644 index 5c0d8f307..000000000 --- a/quantum/template/avr/rules.mk +++ /dev/null @@ -1,22 +0,0 @@ -# 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 = 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/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk deleted file mode 100644 index 1b61e9534..000000000 --- a/quantum/template/ps2avrgb/rules.mk +++ /dev/null @@ -1,19 +0,0 @@ -# MCU name -MCU = atmega32a - -# Bootloader selection -BOOTLOADER = bootloadHID - -# 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 -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -WS2812_DRIVER = i2c diff --git a/quantum/tools/readme.md b/quantum/tools/readme.md deleted file mode 100644 index 5f355256d..000000000 --- a/quantum/tools/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -`eeprom_reset.hex` is to reset the eeprom on the Atmega32u4, like this: - - dfu-programmer atmega32u4 erase - dfu-programmer atmega32u4 flash --eeprom eeprom_reset.hex - - You'll need to reflash afterwards, because DFU requires the flash to be erased before messing with the eeprom. diff --git a/quantum/via.c b/quantum/via.c index c89b663b9..1b2dbcf08 100644 --- a/quantum/via.c +++ b/quantum/via.c @@ -83,16 +83,6 @@ void via_eeprom_set_valid(bool valid) { eeprom_update_byte((void *)VIA_EEPROM_MAGIC_ADDR + 2, valid ? magic2 : 0xFF); } -// Flag QMK and VIA/keyboard level EEPROM as invalid. -// Used in bootmagic_lite() and VIA command handler. -// Keyboard level code should not need to call this. -void via_eeprom_reset(void) { - // Set the VIA specific EEPROM state as invalid. - via_eeprom_set_valid(false); - // Set the TMK/QMK EEPROM state as invalid. - eeconfig_disable(); -} - // Override this at the keyboard code level to check // VIA's EEPROM valid state and reset to defaults as needed. // Used by keyboards that store their own state in EEPROM, @@ -109,19 +99,24 @@ void via_init(void) { // If the EEPROM has the magic, the data is good. // OK to load from EEPROM. - if (via_eeprom_is_valid()) { - } else { - // This resets the layout options - via_set_layout_options(VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT); - // This resets the keymaps in EEPROM to what is in flash. - dynamic_keymap_reset(); - // This resets the macros in EEPROM to nothing. - dynamic_keymap_macro_reset(); - // Save the magic number last, in case saving was interrupted - via_eeprom_set_valid(true); + if (!via_eeprom_is_valid()) { + eeconfig_init_via(); } } +void eeconfig_init_via(void) { + // set the magic number to false, in case this gets interrupted + via_eeprom_set_valid(false); + // This resets the layout options + via_set_layout_options(VIA_EEPROM_LAYOUT_OPTIONS_DEFAULT); + // This resets the keymaps in EEPROM to what is in flash. + dynamic_keymap_reset(); + // This resets the macros in EEPROM to nothing. + dynamic_keymap_macro_reset(); + // Save the magic number last, in case saving was interrupted + via_eeprom_set_valid(true); +} + // This is generalized so the layout options EEPROM usage can be // variable, between 1 and 4 bytes. uint32_t via_get_layout_options(void) { @@ -329,6 +324,13 @@ void raw_hid_receive(uint8_t *data, uint8_t length) { #endif break; } +#ifdef VIA_EEPROM_ALLOW_RESET + case id_eeprom_reset: { + via_eeprom_set_valid(false); + eeconfig_init_via(); + break; + } +#endif case id_dynamic_keymap_macro_get_count: { command_data[0] = dynamic_keymap_macro_get_count(); break; diff --git a/quantum/via.h b/quantum/via.h index d0510fcab..3db318a45 100644 --- a/quantum/via.h +++ b/quantum/via.h @@ -16,7 +16,7 @@ #pragma once -#include "tmk_core/common/eeconfig.h" // for EECONFIG_SIZE +#include "eeconfig.h" // for EECONFIG_SIZE // Keyboard level code can change where VIA stores the magic. // The magic is the build date YYMMDD encoded as BCD in 3 bytes, @@ -152,12 +152,8 @@ bool via_eeprom_is_valid(void); // Keyboard level code (eg. via_init_kb()) should not call this void via_eeprom_set_valid(bool valid); -// Flag QMK and VIA/keyboard level EEPROM as invalid. -// Used in bootmagic_lite() and VIA command handler. -// Keyboard level code should not need to call this. -void via_eeprom_reset(void); - // Called by QMK core to initialize dynamic keymaps etc. +void eeconfig_init_via(void); void via_init(void); // Used by VIA to store and retrieve the layout options. diff --git a/shell.nix b/shell.nix index a04e251b5..74656032a 100644 --- a/shell.nix +++ b/shell.nix @@ -1,7 +1,7 @@ { avr ? true, arm ? true, teensy ? true }: let # We specify sources via Niv: use "niv update nixpkgs" to update nixpkgs, for example. - sources = import ./nix/sources.nix { }; + sources = import ./util/nix/sources.nix { }; pkgs = import sources.nixpkgs { }; poetry2nix = pkgs.callPackage (import sources.poetry2nix) { }; @@ -11,7 +11,7 @@ let # --lock" etc. in the nix folder to adjust the contents of those # files if the requirements*.txt files change pythonEnv = poetry2nix.mkPoetryEnv { - projectDir = ./nix; + projectDir = ./util/nix; }; in diff --git a/show_options.mk b/show_options.mk index cd04f6a0d..ce2f9c063 100644 --- a/show_options.mk +++ b/show_options.mk @@ -16,7 +16,7 @@ BUILD_OPTION_NAMES = \ HARDWARE_OPTION_NAMES = \ SLEEP_LED_ENABLE \ BACKLIGHT_ENABLE \ - BACKLIGHT_CUSTOM_DRIVER \ + BACKLIGHT_DRIVER \ RGBLIGHT_ENABLE \ RGBLIGHT_CUSTOM_DRIVER \ RGB_MATRIX_ENABLE \ @@ -44,13 +44,14 @@ OTHER_OPTION_NAMES = \ AUTO_SHIFT_MODIFIERS \ COMBO_ENABLE \ KEY_LOCK_ENABLE \ + KEY_OVERRIDE_ENABLE \ LEADER_ENABLE \ PRINTING_ENABLE \ STENO_ENABLE \ TAP_DANCE_ENABLE \ VIRTSER_ENABLE \ - OLED_DRIVER_ENABLE \ OLED_ENABLE \ + OLED_DRIVER \ LED_BACK_ENABLE \ LED_UNDERGLOW_ENABLE \ LED_ANIMATIONS \ @@ -68,7 +69,6 @@ OTHER_OPTION_NAMES = \ KEYLOGGER_ENABLE \ LCD_BACKLIGHT_ENABLE \ MACROS_ENABLED \ - ONEHAND_ENABLE \ PS2_MOUSE_ENABLE \ RAW_ENABLE \ SWAP_HANDS_ENABLE \ @@ -86,17 +86,23 @@ OTHER_OPTION_NAMES = \ LTO_ENABLE define NAME_ECHO - @echo " $1 = $($1) # $(origin $1)" + @printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)" + +endef + +define YAML_NAME_ECHO + @echo ' $1 : "$(strip $($1))"' endef .PHONY: show_build_options0 show_build_options show_build_options0: - @echo " KEYBOARD = $(KEYBOARD)" - @echo " KEYMAP = $(KEYMAP)" - @echo " MCU = $(MCU)" - @echo " MCU_SERIES = $(MCU_SERIES)" - @echo " PLATFORM = $(PLATFORM)" + @echo " KEYBOARD = $(KEYBOARD)" + @echo " KEYMAP = $(KEYMAP)" + @echo " MCU = $(MCU)" + @echo " MCU_SERIES = $(MCU_SERIES)" + @echo " PLATFORM = $(PLATFORM)" + @echo " BOOTLOADER = $(BOOTLOADER)" @echo " FIRMWARE_FORMAT = $(FIRMWARE_FORMAT)" @echo @echo "Build Options:" @@ -129,3 +135,18 @@ show_full_features: show_build_options0 @echo "Other Options:" $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ $(call NAME_ECHO,$(A_OPTION_NAME))) + +.PHONY: yaml_build_options +yaml_build_options: + @echo '- KEYBOARD : "$(KEYBOARD)"' + @echo ' KEYMAP : "$(KEYMAP)"' + @echo ' MCU : "$(MCU)"' + @echo ' MCU_SERIES : "$(MCU_SERIES)"' + @echo ' PLATFORM : "$(PLATFORM)"' + @echo ' FIRMWARE_FORMAT : "$(FIRMWARE_FORMAT)"' + $(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\ + $(call YAML_NAME_ECHO,$(A_OPTION_NAME))) + $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ + $(if $($(A_OPTION_NAME)),$(call YAML_NAME_ECHO,$(A_OPTION_NAME)))) + $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ + $(if $($(A_OPTION_NAME)),$(call YAML_NAME_ECHO,$(A_OPTION_NAME)))) diff --git a/testlist.mk b/testlist.mk index 0d7609b9f..b66b93d29 100644 --- a/testlist.mk +++ b/testlist.mk @@ -1,8 +1,10 @@ TEST_LIST = $(notdir $(patsubst %/rules.mk,%,$(wildcard $(ROOT_DIR)/tests/*/rules.mk))) FULL_TESTS := $(TEST_LIST) +include $(ROOT_DIR)/quantum/debounce/tests/testlist.mk include $(ROOT_DIR)/quantum/sequencer/tests/testlist.mk include $(ROOT_DIR)/quantum/serial_link/tests/testlist.mk +include $(ROOT_DIR)/tmk_core/common/test/testlist.mk define VALIDATE_TEST_LIST ifneq ($1,) diff --git a/tmk_core/arm_atsam.mk b/tmk_core/arm_atsam.mk index e4bf60e1a..b29de9132 100644 --- a/tmk_core/arm_atsam.mk +++ b/tmk_core/arm_atsam.mk @@ -50,14 +50,18 @@ MCUFLAGS += -D__$(ARM_ATSAM)__ # For a directory that has spaces, enclose it in quotes. EXTRALIBDIRS = +cpfirmware: warn-arm_atsam +.INTERMEDIATE: warn-arm_atsam +warn-arm_atsam: $(FIRMWARE_FORMAT) + $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) + $(info This MCU support package has a lack of support from the upstream provider (Massdrop).) + $(info There are currently questions about valid licensing, and at this stage it's likely) + $(info their boards and supporting code will be removed from QMK in the near future. Please) + $(info contact Massdrop for support, and encourage them to align their future board design) + $(info choices to gain proper license compatibility with QMK.) + $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) + # Convert hex to bin. bin: $(BUILD_DIR)/$(TARGET).hex $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; - -flash: bin -ifneq ($(strip $(PROGRAM_CMD)),) - $(PROGRAM_CMD) -else - $(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_ARCH)" -endif diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index d0a1b86ca..940e95397 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk @@ -12,8 +12,6 @@ HEX = $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature EEP = $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) BIN = -COMMON_VPATH += $(DRIVER_PATH)/avr - COMPILEFLAGS += -funsigned-char COMPILEFLAGS += -funsigned-bitfields COMPILEFLAGS += -ffunction-sections @@ -89,153 +87,6 @@ DEBUG_PORT = 4242 DEBUG_HOST = localhost #============================================================================ -# Autodetect teensy loader -ifndef TEENSY_LOADER_CLI - ifneq (, $(shell which teensy-loader-cli 2>/dev/null)) - TEENSY_LOADER_CLI ?= teensy-loader-cli - else - TEENSY_LOADER_CLI ?= teensy_loader_cli - endif -endif - -define EXEC_TEENSY - $(TEENSY_LOADER_CLI) -mmcu=$(MCU) -w -v $(BUILD_DIR)/$(TARGET).hex -endef - -teensy: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware - $(call EXEC_TEENSY) - -DFU_PROGRAMMER ?= dfu-programmer -GREP ?= grep - - -define EXEC_DFU - if [ "$(1)" ]; then \ - echo "Flashing '$(1)' for EE_HANDS split keyboard support." ;\ - fi; \ - if ! $(DFU_PROGRAMMER) $(MCU) get bootloader-version >/dev/null 2>/dev/null; then\ - printf "$(MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY)" ;\ - sleep $(BOOTLOADER_RETRY_TIME) ;\ - while ! $(DFU_PROGRAMMER) $(MCU) get bootloader-version >/dev/null 2>/dev/null; do\ - printf "." ;\ - sleep $(BOOTLOADER_RETRY_TIME) ;\ - done ;\ - printf "\n" ;\ - fi; \ - $(DFU_PROGRAMMER) $(MCU) get bootloader-version ;\ - if $(DFU_PROGRAMMER) --version 2>&1 | $(GREP) -q 0.7 ; then\ - $(DFU_PROGRAMMER) $(MCU) erase --force; \ - if [ "$(1)" ]; then \ - $(DFU_PROGRAMMER) $(MCU) flash --force --eeprom $(QUANTUM_PATH)/split_common/$(1);\ - fi; \ - $(DFU_PROGRAMMER) $(MCU) flash --force $(BUILD_DIR)/$(TARGET).hex;\ - else \ - $(DFU_PROGRAMMER) $(MCU) erase; \ - if [ "$(1)" ]; then \ - $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(QUANTUM_PATH)/split_common/$(1);\ - fi; \ - $(DFU_PROGRAMMER) $(MCU) flash $(BUILD_DIR)/$(TARGET).hex;\ - fi; \ - $(DFU_PROGRAMMER) $(MCU) reset -endef - -dfu: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size - $(call EXEC_DFU) - -dfu-start: - $(DFU_PROGRAMMER) $(MCU) reset - $(DFU_PROGRAMMER) $(MCU) start - -dfu-ee: $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).eep - if $(DFU_PROGRAMMER) --version 2>&1 | $(GREP) -q 0.7 ; then\ - $(DFU_PROGRAMMER) $(MCU) flash --force --eeprom $(BUILD_DIR)/$(TARGET).eep;\ - else\ - $(DFU_PROGRAMMER) $(MCU) flash-eeprom $(BUILD_DIR)/$(TARGET).eep;\ - fi - $(DFU_PROGRAMMER) $(MCU) reset - -dfu-split-left: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size - $(call EXEC_DFU,eeprom-lefthand.eep) - -dfu-split-right: $(BUILD_DIR)/$(TARGET).hex cpfirmware check-size - $(call EXEC_DFU,eeprom-righthand.eep) - -AVRDUDE_PROGRAMMER ?= avrdude - -define EXEC_AVRDUDE - list_devices() { \ - if $(GREP) -q -s icrosoft /proc/version; then \ - wmic.exe path Win32_SerialPort get DeviceID 2>/dev/null | LANG=C perl -pne 's/COM(\d+)/COM.($$1-1)/e' | sed 's!COM!/dev/ttyS!' | xargs echo -n | sort; \ - elif [ "`uname`" = "FreeBSD" ]; then \ - ls /dev/tty* | grep -v '\.lock$$' | grep -v '\.init$$'; \ - else \ - ls /dev/tty*; \ - fi; \ - }; \ - USB= ;\ - printf "Waiting for USB serial port - reset your controller now (Ctrl+C to cancel)"; \ - TMP1=`mktemp`; \ - TMP2=`mktemp`; \ - list_devices > $$TMP1; \ - while [ -z "$$USB" ]; do \ - sleep $(BOOTLOADER_RETRY_TIME); \ - printf "."; \ - list_devices > $$TMP2; \ - USB=`comm -13 $$TMP1 $$TMP2 | $(GREP) -o '/dev/tty.*'`; \ - mv $$TMP2 $$TMP1; \ - done; \ - rm $$TMP1; \ - echo ""; \ - echo "Device $$USB has appeared; assuming it is the controller."; \ - if $(GREP) -q -s 'MINGW\|MSYS\|icrosoft' /proc/version; then \ - USB=`echo "$$USB" | LANG=C perl -pne 's/\/dev\/ttyS(\d+)/COM.($$1+1)/e'`; \ - echo "Remapped USB port to $$USB"; \ - sleep 1; \ - else \ - printf "Waiting for $$USB to become writable."; \ - while [ ! -w "$$USB" ]; do sleep $(BOOTLOADER_RETRY_TIME); printf "."; done; echo ""; \ - fi; \ - if [ -z "$(1)" ]; then \ - $(AVRDUDE_PROGRAMMER) -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex; \ - else \ - $(AVRDUDE_PROGRAMMER) -p $(MCU) -c avr109 -P $$USB -U flash:w:$(BUILD_DIR)/$(TARGET).hex -U eeprom:w:$(QUANTUM_PATH)/split_common/$(1); \ - fi -endef - -avrdude: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware - $(call EXEC_AVRDUDE) - -avrdude-loop: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware - while true; do \ - $(call EXEC_AVRDUDE) ; \ - done - -avrdude-split-left: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware - $(call EXEC_AVRDUDE,eeprom-lefthand.eep) - -avrdude-split-right: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware - $(call EXEC_AVRDUDE,eeprom-righthand.eep) - -define EXEC_USBASP - $(AVRDUDE_PROGRAMMER) -p $(AVRDUDE_MCU) -c usbasp -U flash:w:$(BUILD_DIR)/$(TARGET).hex -endef - -usbasp: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware - $(call EXEC_USBASP) - -BOOTLOADHID_PROGRAMMER ?= bootloadHID - -define EXEC_BOOTLOADHID - # bootloadHid executable has no cross platform detect methods - # so keep running bootloadHid if the output contains "The specified device was not found" - until $(BOOTLOADHID_PROGRAMMER) -r $(BUILD_DIR)/$(TARGET).hex 2>&1 | tee /dev/stderr | grep -v "device was not found"; do\ - printf "$(MSG_BOOTLOADER_NOT_FOUND)" ;\ - sleep 5 ;\ - done -endef - -bootloadHID: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware - $(call EXEC_BOOTLOADHID) # Convert hex to bin. bin: $(BUILD_DIR)/$(TARGET).hex @@ -300,39 +151,29 @@ extcoff: $(BUILD_DIR)/$(TARGET).elf @$(SECHO) $(MSG_EXTENDED_COFF) $(BUILD_DIR)/$(TARGET).cof $(COFFCONVERT) -O coff-ext-avr $< $(BUILD_DIR)/$(TARGET).cof -bootloader: -ifneq ($(strip $(BOOTLOADER)), qmk-dfu) - $(error Please set BOOTLOADER = qmk-dfu first!) +ifeq ($(strip $(BOOTLOADER)), qmk-dfu) +QMK_BOOTLOADER_TYPE = DFU +else ifeq ($(strip $(BOOTLOADER)), qmk-hid) +QMK_BOOTLOADER_TYPE = HID endif - make -C lib/lufa/Bootloaders/DFU/ clean - $(QMK_BIN) generate-dfu-header --quiet --keyboard $(KEYBOARD) --output lib/lufa/Bootloaders/DFU/Keyboard.h - $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) + +bootloader: +ifeq ($(strip $(QMK_BOOTLOADER_TYPE)),) + $(error Please set BOOTLOADER to "qmk-dfu" or "qmk-hid" first!) +else + make -C lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/ clean + $(QMK_BIN) generate-dfu-header --quiet --keyboard $(KEYBOARD) --output lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/Keyboard.h + $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) $(eval PROGRAM_SIZE_KB=$(shell n=`expr $(MAX_SIZE) / 1024` && echo $$(($$n)) || echo 0)) $(eval BOOT_SECTION_SIZE_KB=$(shell n=`expr $(BOOTLOADER_SIZE) / 1024` && echo $$(($$n)) || echo 0)) $(eval FLASH_SIZE_KB=$(shell n=`expr $(PROGRAM_SIZE_KB) + $(BOOT_SECTION_SIZE_KB)` && echo $$(($$n)) || echo 0)) - make -C lib/lufa/Bootloaders/DFU/ MCU=$(MCU) ARCH=$(ARCH) F_CPU=$(F_CPU) FLASH_SIZE_KB=$(FLASH_SIZE_KB) BOOT_SECTION_SIZE_KB=$(BOOT_SECTION_SIZE_KB) - printf "BootloaderDFU.hex copied to $(TARGET)_bootloader.hex\n" - cp lib/lufa/Bootloaders/DFU/BootloaderDFU.hex $(TARGET)_bootloader.hex + make -C lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/ MCU=$(MCU) ARCH=$(ARCH) F_CPU=$(F_CPU) FLASH_SIZE_KB=$(FLASH_SIZE_KB) BOOT_SECTION_SIZE_KB=$(BOOT_SECTION_SIZE_KB) + printf "Bootloader$(QMK_BOOTLOADER_TYPE).hex copied to $(TARGET)_bootloader.hex\n" + cp lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/Bootloader$(QMK_BOOTLOADER_TYPE).hex $(TARGET)_bootloader.hex +endif production: $(BUILD_DIR)/$(TARGET).hex bootloader cpfirmware @cat $(BUILD_DIR)/$(TARGET).hex | awk '/^:00000001FF/ == 0' > $(TARGET)_production.hex @cat $(TARGET)_bootloader.hex >> $(TARGET)_production.hex echo "File sizes:" $(SIZE) $(TARGET).hex $(TARGET)_bootloader.hex $(TARGET)_production.hex - -flash: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware -ifneq ($(strip $(PROGRAM_CMD)),) - $(PROGRAM_CMD) -else ifeq ($(strip $(BOOTLOADER)), caterina) - $(call EXEC_AVRDUDE) -else ifeq ($(strip $(BOOTLOADER)), halfkay) - $(call EXEC_TEENSY) -else ifeq (dfu,$(findstring dfu,$(BOOTLOADER))) - $(call EXEC_DFU) -else ifeq ($(strip $(BOOTLOADER)), USBasp) - $(call EXEC_USBASP) -else ifeq ($(strip $(BOOTLOADER)), bootloadHID) - $(call EXEC_BOOTLOADHID) -else - $(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_BOOTLOADER)" -endif diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk index 97299b7d3..18839710b 100644 --- a/tmk_core/chibios.mk +++ b/tmk_core/chibios.mk @@ -67,9 +67,9 @@ else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk)","") else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk)","") BOARD_PATH = $(KEYBOARD_PATH_1) BOARD_MK += $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/board/board.mk)","") - BOARD_PATH = $(TOP_DIR)/platforms/chibios/$(BOARD) - BOARD_MK += $(TOP_DIR)/platforms/chibios/$(BOARD)/board/board.mk +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/board/board.mk)","") + BOARD_PATH = $(TOP_DIR)/platforms/chibios/boards/$(BOARD) + BOARD_MK += $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/board/board.mk KEYBOARD_PATHS += $(BOARD_PATH)/configs ifneq ("$(wildcard $(BOARD_PATH)/rules.mk)","") include $(BOARD_PATH)/rules.mk @@ -124,10 +124,10 @@ else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/chconf.h)","") CHCONFDIR = $(KEYBOARD_PATH_2) else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/chconf.h)","") CHCONFDIR = $(KEYBOARD_PATH_1) -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/configs/chconf.h)","") - CHCONFDIR = $(TOP_DIR)/platforms/chibios/$(BOARD)/configs -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/common/configs/chconf.h)","") - CHCONFDIR = $(TOP_DIR)/platforms/chibios/common/configs +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs/chconf.h)","") + CHCONFDIR = $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs +else ifneq ("$(wildcard $(TOP_DIR)/platforms/boards/chibios/common/configs/chconf.h)","") + CHCONFDIR = $(TOP_DIR)/platforms/chibios/boards/common/configs endif ifneq ("$(wildcard $(KEYBOARD_PATH_5)/halconf.h)","") @@ -140,10 +140,10 @@ else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/halconf.h)","") HALCONFDIR = $(KEYBOARD_PATH_2) else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/halconf.h)","") HALCONFDIR = $(KEYBOARD_PATH_1) -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/configs/halconf.h)","") - HALCONFDIR = $(TOP_DIR)/platforms/chibios/$(BOARD)/configs -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/common/configs/halconf.h)","") - HALCONFDIR = $(TOP_DIR)/platforms/chibios/common/configs +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs/halconf.h)","") + HALCONFDIR = $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/common/configs/halconf.h)","") + HALCONFDIR = $(TOP_DIR)/platforms/chibios/boards/common/configs endif # HAL-OSAL files (optional). @@ -190,10 +190,11 @@ else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/ld/$(MCU_LDSCRIPT).ld)","") LDSCRIPT = $(KEYBOARD_PATH_2)/ld/$(MCU_LDSCRIPT).ld else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/ld/$(MCU_LDSCRIPT).ld)","") LDSCRIPT = $(KEYBOARD_PATH_1)/ld/$(MCU_LDSCRIPT).ld -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/ld/$(MCU_LDSCRIPT).ld)","") - LDSCRIPT = $(TOP_DIR)/platforms/chibios/$(BOARD)/ld/$(MCU_LDSCRIPT).ld -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/common/ld/$(MCU_LDSCRIPT).ld)","") - LDSCRIPT = $(TOP_DIR)/platforms/chibios/common/ld/$(MCU_LDSCRIPT).ld +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/ld/$(MCU_LDSCRIPT).ld)","") + LDFLAGS += -L$(TOP_DIR)/platforms/chibios/boards/$(BOARD)/ld + LDSCRIPT = $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/ld/$(MCU_LDSCRIPT).ld +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/common/ld/$(MCU_LDSCRIPT).ld)","") + LDSCRIPT = $(TOP_DIR)/platforms/chibios/boards/common/ld/$(MCU_LDSCRIPT).ld else ifneq ("$(wildcard $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld)","") LDSCRIPT = $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld USE_CHIBIOS_CONTRIB = yes @@ -210,7 +211,8 @@ CHIBISRC = $(STARTUPSRC) \ $(BOARDSRC) \ $(STREAMSSRC) \ $(CHIBIOS)/os/various/syscalls.c \ - $(PLATFORM_COMMON_DIR)/syscall-fallbacks.c + $(PLATFORM_COMMON_DIR)/syscall-fallbacks.c \ + $(PLATFORM_COMMON_DIR)/wait.c # Ensure the ASM files are not subjected to LTO -- it'll strip out interrupt handlers otherwise. QUANTUM_LIB_SRC += $(STARTUPASM) $(PORTASM) $(OSALASM) $(PLATFORMASM) @@ -218,8 +220,8 @@ QUANTUM_LIB_SRC += $(STARTUPASM) $(PORTASM) $(OSALASM) $(PLATFORMASM) CHIBISRC := $(patsubst $(TOP_DIR)/%,%,$(CHIBISRC)) EXTRAINCDIRS += $(CHIBIOS)/os/license $(CHIBIOS)/os/oslib/include \ - $(TOP_DIR)/platforms/chibios/$(BOARD)/configs \ - $(TOP_DIR)/platforms/chibios/common/configs \ + $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs \ + $(TOP_DIR)/platforms/chibios/boards/common/configs \ $(HALCONFDIR) $(CHCONFDIR) \ $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ @@ -240,7 +242,7 @@ else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/halconf_community.h)","") USE_CHIBIOS_CONTRIB = yes else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/halconf_community.h)","") USE_CHIBIOS_CONTRIB = yes -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/$(BOARD)/configs/halconf_community.h)","") +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs/halconf_community.h)","") USE_CHIBIOS_CONTRIB = yes endif @@ -277,8 +279,6 @@ HEX = $(OBJCOPY) -O $(FORMAT) EEP = BIN = $(OBJCOPY) -O binary -COMMON_VPATH += $(DRIVER_PATH)/chibios - THUMBFLAGS = -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB COMPILEFLAGS += -fomit-frame-pointer @@ -325,91 +325,8 @@ MCUFLAGS = -mcpu=$(MCU) DEBUG = gdb -DFU_ARGS ?= -ifneq ("$(SERIAL)","") - DFU_ARGS += -S $(SERIAL) -endif - -ST_LINK_ARGS ?= -ST_FLASH_ARGS ?= - # List any extra directories to look for libraries here. EXTRALIBDIRS = $(RULESPATH)/ld -DFU_UTIL ?= dfu-util -ST_LINK_CLI ?= st-link_cli -ST_FLASH ?= st-flash - -define EXEC_DFU_UTIL - if ! $(DFU_UTIL) -l | grep -q "Found DFU"; then \ - printf "$(MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY)" ;\ - sleep $(BOOTLOADER_RETRY_TIME) ;\ - while ! $(DFU_UTIL) -l | grep -q "Found DFU"; do \ - printf "." ;\ - sleep $(BOOTLOADER_RETRY_TIME) ;\ - done ;\ - printf "\n" ;\ - fi - $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin -endef - -dfu-util: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter - $(call EXEC_DFU_UTIL) - -# Legacy alias -dfu-util-wait: dfu-util - -# TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS -# within the emulated eeprom via dfu-util or another tool -ifneq (,$(filter $(MAKECMDGOALS),dfu-util-split-left)) - OPT_DEFS += -DINIT_EE_HANDS_LEFT -endif - -ifneq (,$(filter $(MAKECMDGOALS),dfu-util-split-right)) - OPT_DEFS += -DINIT_EE_HANDS_RIGHT -endif - -dfu-util-split-left: dfu-util - -dfu-util-split-right: dfu-util - - -st-link-cli: $(BUILD_DIR)/$(TARGET).hex sizeafter - $(ST_LINK_CLI) $(ST_LINK_ARGS) -q -c SWD -p $(BUILD_DIR)/$(TARGET).hex -Rst - -st-flash: $(BUILD_DIR)/$(TARGET).hex sizeafter - $(ST_FLASH) $(ST_FLASH_ARGS) --reset --format ihex write $(BUILD_DIR)/$(TARGET).hex - - -# Autodetect teensy loader -ifndef TEENSY_LOADER_CLI - ifneq (, $(shell which teensy-loader-cli 2>/dev/null)) - TEENSY_LOADER_CLI ?= teensy-loader-cli - else - TEENSY_LOADER_CLI ?= teensy_loader_cli - endif -endif - -define EXEC_TEENSY - $(TEENSY_LOADER_CLI) -mmcu=$(MCU_LDSCRIPT) -w -v $(BUILD_DIR)/$(TARGET).hex -endef - -teensy: $(BUILD_DIR)/$(TARGET).hex cpfirmware sizeafter - $(call EXEC_TEENSY) - bin: $(BUILD_DIR)/$(TARGET).bin sizeafter $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; - - -flash: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter -ifneq ($(strip $(PROGRAM_CMD)),) - $(PROGRAM_CMD) -else ifeq ($(strip $(BOOTLOADER)),kiibohd) - $(call EXEC_DFU_UTIL) -else ifeq ($(strip $(MCU_FAMILY)),KINETIS) - $(call EXEC_TEENSY) -else ifeq ($(strip $(MCU_FAMILY)),STM32) - $(call EXEC_DFU_UTIL) -else - $(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_BOOTLOADER)" -endif diff --git a/tmk_core/common.mk b/tmk_core/common.mk index 2f8f81126..7f7420059 100644 --- a/tmk_core/common.mk +++ b/tmk_core/common.mk @@ -1,29 +1,18 @@ COMMON_DIR = common PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY) -TMK_COMMON_SRC += $(COMMON_DIR)/host.c \ - $(COMMON_DIR)/keyboard.c \ - $(COMMON_DIR)/action.c \ - $(COMMON_DIR)/action_tapping.c \ - $(COMMON_DIR)/action_macro.c \ - $(COMMON_DIR)/action_layer.c \ - $(COMMON_DIR)/action_util.c \ - $(COMMON_DIR)/debug.c \ - $(COMMON_DIR)/sendchar_null.c \ - $(COMMON_DIR)/eeconfig.c \ +TMK_COMMON_SRC += \ + $(COMMON_DIR)/host.c \ $(COMMON_DIR)/report.c \ + $(COMMON_DIR)/sync_timer.c \ $(COMMON_DIR)/usb_util.c \ + $(PLATFORM_COMMON_DIR)/platform.c \ $(PLATFORM_COMMON_DIR)/suspend.c \ $(PLATFORM_COMMON_DIR)/timer.c \ - $(COMMON_DIR)/sync_timer.c \ $(PLATFORM_COMMON_DIR)/bootloader.c \ -# Use platform provided print - fall back to lib/printf -ifneq ("$(wildcard $(TMK_PATH)/$(PLATFORM_COMMON_DIR)/printf.mk)","") - include $(TMK_PATH)/$(PLATFORM_COMMON_DIR)/printf.mk -else - include $(TMK_PATH)/$(COMMON_DIR)/lib_printf.mk -endif +# Use platform provided print if it exists +-include $(TMK_PATH)/$(PLATFORM_COMMON_DIR)/printf.mk SHARED_EP_ENABLE = no MOUSE_SHARED_EP ?= yes @@ -36,7 +25,8 @@ ifeq ($(strip $(KEYBOARD_SHARED_EP)), yes) MOUSE_SHARED_EP = yes endif -ifeq ($(strip $(MOUSEKEY_ENABLE)), yes) +ifeq ($(strip $(MOUSE_ENABLE)), yes) + OPT_DEFS += -DMOUSE_ENABLE ifeq ($(strip $(MOUSE_SHARED_EP)), yes) TMK_COMMON_DEFS += -DMOUSE_SHARED_EP SHARED_EP_ENABLE = yes @@ -55,6 +45,7 @@ endif ifeq ($(strip $(CONSOLE_ENABLE)), yes) TMK_COMMON_DEFS += -DCONSOLE_ENABLE else + # TODO: decouple this so other print backends can exist TMK_COMMON_DEFS += -DNO_PRINT TMK_COMMON_DEFS += -DNO_DEBUG endif @@ -103,9 +94,6 @@ ifeq ($(strip $(BLUETOOTH)), RN42) TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK endif -ifeq ($(strip $(ONEHAND_ENABLE)), yes) - SWAP_HANDS_ENABLE = yes # backwards compatibility -endif ifeq ($(strip $(SWAP_HANDS_ENABLE)), yes) TMK_COMMON_DEFS += -DSWAP_HANDS_ENABLE endif @@ -114,6 +102,19 @@ ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes) TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK endif +ifeq ($(strip $(DIGITIZER_SHARED_EP)), yes) + TMK_COMMON_DEFS += -DDIGITIZER_SHARED_EP + SHARED_EP_ENABLE = yes +endif + +ifeq ($(strip $(DIGITIZER_ENABLE)), yes) + TMK_COMMON_DEFS += -DDIGITIZER_ENABLE + ifeq ($(strip $(SHARED_EP_ENABLE)), yes) + TMK_COMMON_DEFS += -DDIGITIZER_SHARED_EP + SHARED_EP_ENABLE = yes + endif +endif + ifeq ($(strip $(SHARED_EP_ENABLE)), yes) TMK_COMMON_DEFS += -DSHARED_EP_ENABLE endif @@ -133,3 +134,4 @@ endif # Search Path VPATH += $(TMK_PATH)/$(COMMON_DIR) VPATH += $(TMK_PATH)/$(PLATFORM_COMMON_DIR) +VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c deleted file mode 100644 index bd41d28b6..000000000 --- a/tmk_core/common/action.c +++ /dev/null @@ -1,1093 +0,0 @@ -/* -Copyright 2012,2013 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#include "host.h" -#include "keycode.h" -#include "keyboard.h" -#include "mousekey.h" -#include "command.h" -#include "led.h" -#include "action_layer.h" -#include "action_tapping.h" -#include "action_macro.h" -#include "action_util.h" -#include "action.h" -#include "wait.h" - -#ifdef BACKLIGHT_ENABLE -# include "backlight.h" -#endif - -#ifdef DEBUG_ACTION -# include "debug.h" -#else -# include "nodebug.h" -#endif - -#ifdef POINTING_DEVICE_ENABLE -# include "pointing_device.h" -#endif - -int tp_buttons; - -#if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) -int retro_tapping_counter = 0; -#endif - -#ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY -__attribute__((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { return false; } -#endif - -#ifdef RETRO_TAPPING_PER_KEY -__attribute__((weak)) bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) { return false; } -#endif - -#ifndef TAP_CODE_DELAY -# define TAP_CODE_DELAY 0 -#endif -#ifndef TAP_HOLD_CAPS_DELAY -# define TAP_HOLD_CAPS_DELAY 80 -#endif -/** \brief Called to execute an action. - * - * FIXME: Needs documentation. - */ -void action_exec(keyevent_t event) { - if (!IS_NOEVENT(event)) { - dprint("\n---- action_exec: start -----\n"); - dprint("EVENT: "); - debug_event(event); - dprintln(); -#if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) - retro_tapping_counter++; -#endif - } - - if (event.pressed) { - // clear the potential weak mods left by previously pressed keys - clear_weak_mods(); - } - -#ifdef SWAP_HANDS_ENABLE - if (!IS_NOEVENT(event)) { - process_hand_swap(&event); - } -#endif - - keyrecord_t record = {.event = event}; - -#ifndef NO_ACTION_ONESHOT -# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - if (has_oneshot_layer_timed_out()) { - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } - if (has_oneshot_mods_timed_out()) { - clear_oneshot_mods(); - } -# ifdef SWAP_HANDS_ENABLE - if (has_oneshot_swaphands_timed_out()) { - clear_oneshot_swaphands(); - } -# endif -# endif -#endif - -#ifndef NO_ACTION_TAPPING - action_tapping_process(record); -#else - process_record(&record); - if (!IS_NOEVENT(record.event)) { - dprint("processed: "); - debug_record(record); - dprintln(); - } -#endif -} - -#ifdef SWAP_HANDS_ENABLE -bool swap_hands = false; -bool swap_held = false; - -/** \brief Process Hand Swap - * - * FIXME: Needs documentation. - */ -void process_hand_swap(keyevent_t *event) { - static swap_state_row_t swap_state[MATRIX_ROWS]; - - keypos_t pos = event->key; - swap_state_row_t col_bit = (swap_state_row_t)1 << pos.col; - bool do_swap = event->pressed ? swap_hands : swap_state[pos.row] & (col_bit); - - if (do_swap) { - event->key.row = pgm_read_byte(&hand_swap_config[pos.row][pos.col].row); - event->key.col = pgm_read_byte(&hand_swap_config[pos.row][pos.col].col); - swap_state[pos.row] |= col_bit; - } else { - swap_state[pos.row] &= ~(col_bit); - } -} -#endif - -#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) -bool disable_action_cache = false; - -void process_record_nocache(keyrecord_t *record) { - disable_action_cache = true; - process_record(record); - disable_action_cache = false; -} -#else -void process_record_nocache(keyrecord_t *record) { process_record(record); } -#endif - -__attribute__((weak)) bool process_record_quantum(keyrecord_t *record) { return true; } - -__attribute__((weak)) void post_process_record_quantum(keyrecord_t *record) {} - -#ifndef NO_ACTION_TAPPING -/** \brief Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress. - * - * FIXME: Needs documentation. - */ -void process_record_tap_hint(keyrecord_t *record) { - action_t action = layer_switch_get_action(record->event.key); - - switch (action.kind.id) { -# ifdef SWAP_HANDS_ENABLE - case ACT_SWAP_HANDS: - switch (action.swap.code) { - case OP_SH_ONESHOT: - break; - case OP_SH_TAP_TOGGLE: - default: - swap_hands = !swap_hands; - swap_held = true; - } - break; -# endif - } -} -#endif - -/** \brief Take a key event (key press or key release) and processes it. - * - * FIXME: Needs documentation. - */ -void process_record(keyrecord_t *record) { - if (IS_NOEVENT(record->event)) { - return; - } - - if (!process_record_quantum(record)) { -#ifndef NO_ACTION_ONESHOT - if (is_oneshot_layer_active() && record->event.pressed) { - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } -#endif - return; - } - - process_record_handler(record); - post_process_record_quantum(record); -} - -void process_record_handler(keyrecord_t *record) { - action_t action = store_or_get_action(record->event.pressed, record->event.key); - dprint("ACTION: "); - debug_action(action); -#ifndef NO_ACTION_LAYER - dprint(" layer_state: "); - layer_debug(); - dprint(" default_layer_state: "); - default_layer_debug(); -#endif - dprintln(); - - process_action(record, action); -} - -#if defined(PS2_MOUSE_ENABLE) || defined(POINTING_DEVICE_ENABLE) -void register_button(bool pressed, enum mouse_buttons button) { -# ifdef PS2_MOUSE_ENABLE - tp_buttons = pressed ? tp_buttons | button : tp_buttons & ~button; -# endif -# ifdef POINTING_DEVICE_ENABLE - report_mouse_t currentReport = pointing_device_get_report(); - currentReport.buttons = pressed ? currentReport.buttons | button : currentReport.buttons & ~button; - pointing_device_set_report(currentReport); -# endif -} -#endif - -/** \brief Take an action and processes it. - * - * FIXME: Needs documentation. - */ -void process_action(keyrecord_t *record, action_t action) { - keyevent_t event = record->event; -#ifndef NO_ACTION_TAPPING - uint8_t tap_count = record->tap.count; -#endif - -#ifndef NO_ACTION_ONESHOT - bool do_release_oneshot = false; - // notice we only clear the one shot layer if the pressed key is not a modifier. - if (is_oneshot_layer_active() && event.pressed && (action.kind.id == ACT_USAGE || !IS_MOD(action.key.code)) -# ifdef SWAP_HANDS_ENABLE - && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT) -# endif - ) { - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - do_release_oneshot = !is_oneshot_layer_active(); - } -#endif - - switch (action.kind.id) { - /* Key and Mods */ - case ACT_LMODS: - case ACT_RMODS: { - uint8_t mods = (action.kind.id == ACT_LMODS) ? action.key.mods : action.key.mods << 4; - if (event.pressed) { - if (mods) { - if (IS_MOD(action.key.code) || action.key.code == KC_NO) { - // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. - // This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT). - // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO). - add_mods(mods); - } else { - add_weak_mods(mods); - } - send_keyboard_report(); - } - register_code(action.key.code); - } else { - unregister_code(action.key.code); - if (mods) { - if (IS_MOD(action.key.code) || action.key.code == KC_NO) { - del_mods(mods); - } else { - del_weak_mods(mods); - } - send_keyboard_report(); - } - } - } break; -#ifndef NO_ACTION_TAPPING - case ACT_LMODS_TAP: - case ACT_RMODS_TAP: { - uint8_t mods = (action.kind.id == ACT_LMODS_TAP) ? action.key.mods : action.key.mods << 4; - switch (action.layer_tap.code) { -# ifndef NO_ACTION_ONESHOT - case MODS_ONESHOT: - // Oneshot modifier - if (event.pressed) { - if (tap_count == 0) { - dprint("MODS_TAP: Oneshot: 0\n"); - register_mods(mods | get_oneshot_mods()); - } else if (tap_count == 1) { - dprint("MODS_TAP: Oneshot: start\n"); - set_oneshot_mods(mods | get_oneshot_mods()); -# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 - } else if (tap_count == ONESHOT_TAP_TOGGLE) { - dprint("MODS_TAP: Toggling oneshot"); - clear_oneshot_mods(); - set_oneshot_locked_mods(mods); - register_mods(mods); -# endif - } else { - register_mods(mods | get_oneshot_mods()); - } - } else { - if (tap_count == 0) { - clear_oneshot_mods(); - unregister_mods(mods); - } else if (tap_count == 1) { - // Retain Oneshot mods -# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 - if (mods & get_mods()) { - clear_oneshot_locked_mods(); - clear_oneshot_mods(); - unregister_mods(mods); - } - } else if (tap_count == ONESHOT_TAP_TOGGLE) { - // Toggle Oneshot Layer -# endif - } else { - clear_oneshot_mods(); - unregister_mods(mods); - } - } - break; -# endif - case MODS_TAP_TOGGLE: - if (event.pressed) { - if (tap_count <= TAPPING_TOGGLE) { - register_mods(mods); - } - } else { - if (tap_count < TAPPING_TOGGLE) { - unregister_mods(mods); - } - } - break; - default: - if (event.pressed) { - if (tap_count > 0) { -# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) - if ( -# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY - !get_ignore_mod_tap_interrupt(get_event_keycode(record->event, false), record) && -# endif - record->tap.interrupted) { - dprint("mods_tap: tap: cancel: add_mods\n"); - // ad hoc: set 0 to cancel tap - record->tap.count = 0; - register_mods(mods); - } else -# endif - { - dprint("MODS_TAP: Tap: register_code\n"); - register_code(action.key.code); - } - } else { - dprint("MODS_TAP: No tap: add_mods\n"); - register_mods(mods); - } - } else { - if (tap_count > 0) { - dprint("MODS_TAP: Tap: unregister_code\n"); - if (action.layer_tap.code == KC_CAPS) { - wait_ms(TAP_HOLD_CAPS_DELAY); - } else { - wait_ms(TAP_CODE_DELAY); - } - unregister_code(action.key.code); - } else { - dprint("MODS_TAP: No tap: add_mods\n"); - unregister_mods(mods); - } - } - break; - } - } break; -#endif -#ifdef EXTRAKEY_ENABLE - /* other HID usage */ - case ACT_USAGE: - switch (action.usage.page) { - case PAGE_SYSTEM: - if (event.pressed) { - host_system_send(action.usage.code); - } else { - host_system_send(0); - } - break; - case PAGE_CONSUMER: - if (event.pressed) { - host_consumer_send(action.usage.code); - } else { - host_consumer_send(0); - } - break; - } - break; -#endif -#ifdef MOUSEKEY_ENABLE - /* Mouse key */ - case ACT_MOUSEKEY: - if (event.pressed) { - mousekey_on(action.key.code); - } else { - mousekey_off(action.key.code); - } - switch (action.key.code) { -# if defined(PS2_MOUSE_ENABLE) || defined(POINTING_DEVICE_ENABLE) -# ifdef POINTING_DEVICE_ENABLE - case KC_MS_BTN1 ... KC_MS_BTN8: -# else - case KC_MS_BTN1 ... KC_MS_BTN3: -# endif - register_button(event.pressed, MOUSE_BTN_MASK(action.key.code - KC_MS_BTN1)); - break; -# endif - default: - mousekey_send(); - break; - } - break; -#endif -#ifndef NO_ACTION_LAYER - case ACT_LAYER: - if (action.layer_bitop.on == 0) { - /* Default Layer Bitwise Operation */ - if (!event.pressed) { - uint8_t shift = action.layer_bitop.part * 4; - layer_state_t bits = ((layer_state_t)action.layer_bitop.bits) << shift; - layer_state_t mask = (action.layer_bitop.xbit) ? ~(((layer_state_t)0xf) << shift) : 0; - switch (action.layer_bitop.op) { - case OP_BIT_AND: - default_layer_and(bits | mask); - break; - case OP_BIT_OR: - default_layer_or(bits | mask); - break; - case OP_BIT_XOR: - default_layer_xor(bits | mask); - break; - case OP_BIT_SET: - default_layer_set(bits | mask); - break; - } - } - } else { - /* Layer Bitwise Operation */ - if (event.pressed ? (action.layer_bitop.on & ON_PRESS) : (action.layer_bitop.on & ON_RELEASE)) { - uint8_t shift = action.layer_bitop.part * 4; - layer_state_t bits = ((layer_state_t)action.layer_bitop.bits) << shift; - layer_state_t mask = (action.layer_bitop.xbit) ? ~(((layer_state_t)0xf) << shift) : 0; - switch (action.layer_bitop.op) { - case OP_BIT_AND: - layer_and(bits | mask); - break; - case OP_BIT_OR: - layer_or(bits | mask); - break; - case OP_BIT_XOR: - layer_xor(bits | mask); - break; - case OP_BIT_SET: - layer_state_set(bits | mask); - break; - } - } - } - break; - case ACT_LAYER_MODS: - if (event.pressed) { - layer_on(action.layer_mods.layer); - register_mods(action.layer_mods.mods); - } else { - unregister_mods(action.layer_mods.mods); - layer_off(action.layer_mods.layer); - } - break; -# ifndef NO_ACTION_TAPPING - case ACT_LAYER_TAP: - case ACT_LAYER_TAP_EXT: - switch (action.layer_tap.code) { - case OP_TAP_TOGGLE: - /* tap toggle */ - if (event.pressed) { - if (tap_count < TAPPING_TOGGLE) { - layer_invert(action.layer_tap.val); - } - } else { - if (tap_count <= TAPPING_TOGGLE) { - layer_invert(action.layer_tap.val); - } - } - break; - case OP_ON_OFF: - event.pressed ? layer_on(action.layer_tap.val) : layer_off(action.layer_tap.val); - break; - case OP_OFF_ON: - event.pressed ? layer_off(action.layer_tap.val) : layer_on(action.layer_tap.val); - break; - case OP_SET_CLEAR: - event.pressed ? layer_move(action.layer_tap.val) : layer_clear(); - break; -# ifndef NO_ACTION_ONESHOT - case OP_ONESHOT: - // Oneshot modifier -# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 - do_release_oneshot = false; - if (event.pressed) { - del_mods(get_oneshot_locked_mods()); - if (get_oneshot_layer_state() == ONESHOT_TOGGLED) { - reset_oneshot_layer(); - layer_off(action.layer_tap.val); - break; - } else if (tap_count < ONESHOT_TAP_TOGGLE) { - layer_on(action.layer_tap.val); - set_oneshot_layer(action.layer_tap.val, ONESHOT_START); - } - } else { - add_mods(get_oneshot_locked_mods()); - if (tap_count >= ONESHOT_TAP_TOGGLE) { - reset_oneshot_layer(); - clear_oneshot_locked_mods(); - set_oneshot_layer(action.layer_tap.val, ONESHOT_TOGGLED); - } else { - clear_oneshot_layer_state(ONESHOT_PRESSED); - } - } -# else - if (event.pressed) { - layer_on(action.layer_tap.val); - set_oneshot_layer(action.layer_tap.val, ONESHOT_START); - } else { - clear_oneshot_layer_state(ONESHOT_PRESSED); - if (tap_count > 1) { - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } - } -# endif - break; -# endif - default: - /* tap key */ - if (event.pressed) { - if (tap_count > 0) { - dprint("KEYMAP_TAP_KEY: Tap: register_code\n"); - register_code(action.layer_tap.code); - } else { - dprint("KEYMAP_TAP_KEY: No tap: On on press\n"); - layer_on(action.layer_tap.val); - } - } else { - if (tap_count > 0) { - dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n"); - if (action.layer_tap.code == KC_CAPS) { - wait_ms(TAP_HOLD_CAPS_DELAY); - } else { - wait_ms(TAP_CODE_DELAY); - } - unregister_code(action.layer_tap.code); - } else { - dprint("KEYMAP_TAP_KEY: No tap: Off on release\n"); - layer_off(action.layer_tap.val); - } - } - break; - } - break; -# endif -#endif - /* Extentions */ -#ifndef NO_ACTION_MACRO - case ACT_MACRO: - action_macro_play(action_get_macro(record, action.func.id, action.func.opt)); - break; -#endif -#ifdef SWAP_HANDS_ENABLE - case ACT_SWAP_HANDS: - switch (action.swap.code) { - case OP_SH_TOGGLE: - if (event.pressed) { - swap_hands = !swap_hands; - } - break; - case OP_SH_ON_OFF: - swap_hands = event.pressed; - break; - case OP_SH_OFF_ON: - swap_hands = !event.pressed; - break; - case OP_SH_ON: - if (!event.pressed) { - swap_hands = true; - } - break; - case OP_SH_OFF: - if (!event.pressed) { - swap_hands = false; - } - break; -# ifndef NO_ACTION_ONESHOT - case OP_SH_ONESHOT: - if (event.pressed) { - set_oneshot_swaphands(); - } else { - release_oneshot_swaphands(); - } - break; -# endif - -# ifndef NO_ACTION_TAPPING - case OP_SH_TAP_TOGGLE: - /* tap toggle */ - - if (event.pressed) { - if (swap_held) { - swap_held = false; - } else { - swap_hands = !swap_hands; - } - } else { - if (tap_count < TAPPING_TOGGLE) { - swap_hands = !swap_hands; - } - } - break; - default: - /* tap key */ - if (tap_count > 0) { - if (swap_held) { - swap_hands = !swap_hands; // undo hold set up in _tap_hint - swap_held = false; - } - if (event.pressed) { - register_code(action.swap.code); - } else { - wait_ms(TAP_CODE_DELAY); - unregister_code(action.swap.code); - *record = (keyrecord_t){}; // hack: reset tap mode - } - } else { - if (swap_held && !event.pressed) { - swap_hands = !swap_hands; // undo hold set up in _tap_hint - swap_held = false; - } - } -# endif - } -#endif -#ifndef NO_ACTION_FUNCTION - case ACT_FUNCTION: - action_function(record, action.func.id, action.func.opt); - break; -#endif - default: - break; - } - -#ifndef NO_ACTION_LAYER - // if this event is a layer action, update the leds - switch (action.kind.id) { - case ACT_LAYER: - case ACT_LAYER_MODS: -# ifndef NO_ACTION_TAPPING - case ACT_LAYER_TAP: - case ACT_LAYER_TAP_EXT: -# endif - led_set(host_keyboard_leds()); - break; - default: - break; - } -#endif - -#ifndef NO_ACTION_TAPPING -# if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) - if (!is_tap_action(action)) { - retro_tapping_counter = 0; - } else { - if (event.pressed) { - if (tap_count > 0) { - retro_tapping_counter = 0; - } - } else { - if (tap_count > 0) { - retro_tapping_counter = 0; - } else { - if ( -# ifdef RETRO_TAPPING_PER_KEY - get_retro_tapping(get_event_keycode(record->event, false), record) && -# endif - retro_tapping_counter == 2) { - tap_code(action.layer_tap.code); - } - retro_tapping_counter = 0; - } - } - } -# endif -#endif - -#ifdef SWAP_HANDS_ENABLE -# ifndef NO_ACTION_ONESHOT - if (event.pressed && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT)) { - use_oneshot_swaphands(); - } -# endif -#endif - -#ifndef NO_ACTION_ONESHOT - /* Because we switch layers after a oneshot event, we need to release the - * key before we leave the layer or no key up event will be generated. - */ - if (do_release_oneshot && !(get_oneshot_layer_state() & ONESHOT_PRESSED)) { - record->event.pressed = false; - layer_on(get_oneshot_layer()); - process_record(record); - layer_off(get_oneshot_layer()); - } -#endif -} - -/** \brief Utilities for actions. (FIXME: Needs better description) - * - * FIXME: Needs documentation. - */ -void register_code(uint8_t code) { - if (code == KC_NO) { - return; - } -#ifdef LOCKING_SUPPORT_ENABLE - else if (KC_LOCKING_CAPS == code) { -# ifdef LOCKING_RESYNC_ENABLE - // Resync: ignore if caps lock already is on - if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) return; -# endif - add_key(KC_CAPSLOCK); - send_keyboard_report(); - wait_ms(100); - del_key(KC_CAPSLOCK); - send_keyboard_report(); - } - - else if (KC_LOCKING_NUM == code) { -# ifdef LOCKING_RESYNC_ENABLE - if (host_keyboard_leds() & (1 << USB_LED_NUM_LOCK)) return; -# endif - add_key(KC_NUMLOCK); - send_keyboard_report(); - wait_ms(100); - del_key(KC_NUMLOCK); - send_keyboard_report(); - } - - else if (KC_LOCKING_SCROLL == code) { -# ifdef LOCKING_RESYNC_ENABLE - if (host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK)) return; -# endif - add_key(KC_SCROLLLOCK); - send_keyboard_report(); - wait_ms(100); - del_key(KC_SCROLLLOCK); - send_keyboard_report(); - } -#endif - - else if IS_KEY (code) { - // TODO: should push command_proc out of this block? - if (command_proc(code)) return; - -#ifndef NO_ACTION_ONESHOT -/* TODO: remove - if (oneshot_state.mods && !oneshot_state.disabled) { - uint8_t tmp_mods = get_mods(); - add_mods(oneshot_state.mods); - - add_key(code); - send_keyboard_report(); - - set_mods(tmp_mods); - send_keyboard_report(); - oneshot_cancel(); - } else -*/ -#endif - { - // Force a new key press if the key is already pressed - // without this, keys with the same keycode, but different - // modifiers will be reported incorrectly, see issue #1708 - if (is_key_pressed(keyboard_report, code)) { - del_key(code); - send_keyboard_report(); - } - add_key(code); - send_keyboard_report(); - } - } else if IS_MOD (code) { - add_mods(MOD_BIT(code)); - send_keyboard_report(); - } -#ifdef EXTRAKEY_ENABLE - else if IS_SYSTEM (code) { - host_system_send(KEYCODE2SYSTEM(code)); - } else if IS_CONSUMER (code) { - host_consumer_send(KEYCODE2CONSUMER(code)); - } -#endif -#ifdef MOUSEKEY_ENABLE - else if IS_MOUSEKEY (code) { - mousekey_on(code); - mousekey_send(); - } -#endif -} - -/** \brief Utilities for actions. (FIXME: Needs better description) - * - * FIXME: Needs documentation. - */ -void unregister_code(uint8_t code) { - if (code == KC_NO) { - return; - } -#ifdef LOCKING_SUPPORT_ENABLE - else if (KC_LOCKING_CAPS == code) { -# ifdef LOCKING_RESYNC_ENABLE - // Resync: ignore if caps lock already is off - if (!(host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK))) return; -# endif - add_key(KC_CAPSLOCK); - send_keyboard_report(); - del_key(KC_CAPSLOCK); - send_keyboard_report(); - } - - else if (KC_LOCKING_NUM == code) { -# ifdef LOCKING_RESYNC_ENABLE - if (!(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK))) return; -# endif - add_key(KC_NUMLOCK); - send_keyboard_report(); - del_key(KC_NUMLOCK); - send_keyboard_report(); - } - - else if (KC_LOCKING_SCROLL == code) { -# ifdef LOCKING_RESYNC_ENABLE - if (!(host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK))) return; -# endif - add_key(KC_SCROLLLOCK); - send_keyboard_report(); - del_key(KC_SCROLLLOCK); - send_keyboard_report(); - } -#endif - - else if IS_KEY (code) { - del_key(code); - send_keyboard_report(); - } else if IS_MOD (code) { - del_mods(MOD_BIT(code)); - send_keyboard_report(); - } else if IS_SYSTEM (code) { - host_system_send(0); - } else if IS_CONSUMER (code) { - host_consumer_send(0); - } -#ifdef MOUSEKEY_ENABLE - else if IS_MOUSEKEY (code) { - mousekey_off(code); - mousekey_send(); - } -#endif -} - -/** \brief Tap a keycode with a delay. - * - * \param code The basic keycode to tap. - * \param delay The amount of time in milliseconds to leave the keycode registered, before unregistering it. - */ -void tap_code_delay(uint8_t code, uint16_t delay) { - register_code(code); - for (uint16_t i = delay; i > 0; i--) { - wait_ms(1); - } - unregister_code(code); -} - -/** \brief Tap a keycode with the default delay. - * - * \param code The basic keycode to tap. If `code` is `KC_CAPS`, the delay will be `TAP_HOLD_CAPS_DELAY`, otherwise `TAP_CODE_DELAY`, if defined. - */ -void tap_code(uint8_t code) { tap_code_delay(code, code == KC_CAPS ? TAP_HOLD_CAPS_DELAY : TAP_CODE_DELAY); } - -/** \brief Adds the given physically pressed modifiers and sends a keyboard report immediately. - * - * \param mods A bitfield of modifiers to register. - */ -void register_mods(uint8_t mods) { - if (mods) { - add_mods(mods); - send_keyboard_report(); - } -} - -/** \brief Removes the given physically pressed modifiers and sends a keyboard report immediately. - * - * \param mods A bitfield of modifiers to unregister. - */ -void unregister_mods(uint8_t mods) { - if (mods) { - del_mods(mods); - send_keyboard_report(); - } -} - -/** \brief Adds the given weak modifiers and sends a keyboard report immediately. - * - * \param mods A bitfield of modifiers to register. - */ -void register_weak_mods(uint8_t mods) { - if (mods) { - add_weak_mods(mods); - send_keyboard_report(); - } -} - -/** \brief Removes the given weak modifiers and sends a keyboard report immediately. - * - * \param mods A bitfield of modifiers to unregister. - */ -void unregister_weak_mods(uint8_t mods) { - if (mods) { - del_weak_mods(mods); - send_keyboard_report(); - } -} - -/** \brief Utilities for actions. (FIXME: Needs better description) - * - * FIXME: Needs documentation. - */ -void clear_keyboard(void) { - clear_mods(); - clear_keyboard_but_mods(); -} - -/** \brief Utilities for actions. (FIXME: Needs better description) - * - * FIXME: Needs documentation. - */ -void clear_keyboard_but_mods(void) { - clear_keys(); - clear_keyboard_but_mods_and_keys(); -} - -/** \brief Utilities for actions. (FIXME: Needs better description) - * - * FIXME: Needs documentation. - */ -void clear_keyboard_but_mods_and_keys() { -#ifdef EXTRAKEY_ENABLE - host_system_send(0); - host_consumer_send(0); -#endif - clear_weak_mods(); - clear_macro_mods(); - send_keyboard_report(); -#ifdef MOUSEKEY_ENABLE - mousekey_clear(); - mousekey_send(); -#endif -} - -/** \brief Utilities for actions. (FIXME: Needs better description) - * - * FIXME: Needs documentation. - */ -bool is_tap_key(keypos_t key) { - action_t action = layer_switch_get_action(key); - return is_tap_action(action); -} - -/** \brief Utilities for actions. (FIXME: Needs better description) - * - * FIXME: Needs documentation. - */ -bool is_tap_action(action_t action) { - switch (action.kind.id) { - case ACT_LMODS_TAP: - case ACT_RMODS_TAP: - case ACT_LAYER_TAP: - case ACT_LAYER_TAP_EXT: - switch (action.layer_tap.code) { - case KC_NO ... KC_RGUI: - case OP_TAP_TOGGLE: - case OP_ONESHOT: - return true; - } - return false; - case ACT_SWAP_HANDS: - switch (action.swap.code) { - case KC_NO ... KC_RGUI: - case OP_SH_TAP_TOGGLE: - return true; - } - return false; - case ACT_MACRO: - case ACT_FUNCTION: - if (action.func.opt & FUNC_TAP) { - return true; - } - return false; - } - return false; -} - -/** \brief Debug print (FIXME: Needs better description) - * - * FIXME: Needs documentation. - */ -void debug_event(keyevent_t event) { dprintf("%04X%c(%u)", (event.key.row << 8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time); } -/** \brief Debug print (FIXME: Needs better description) - * - * FIXME: Needs documentation. - */ -void debug_record(keyrecord_t record) { - debug_event(record.event); -#ifndef NO_ACTION_TAPPING - dprintf(":%u%c", record.tap.count, (record.tap.interrupted ? '-' : ' ')); -#endif -} - -/** \brief Debug print (FIXME: Needs better description) - * - * FIXME: Needs documentation. - */ -void debug_action(action_t action) { - switch (action.kind.id) { - case ACT_LMODS: - dprint("ACT_LMODS"); - break; - case ACT_RMODS: - dprint("ACT_RMODS"); - break; - case ACT_LMODS_TAP: - dprint("ACT_LMODS_TAP"); - break; - case ACT_RMODS_TAP: - dprint("ACT_RMODS_TAP"); - break; - case ACT_USAGE: - dprint("ACT_USAGE"); - break; - case ACT_MOUSEKEY: - dprint("ACT_MOUSEKEY"); - break; - case ACT_LAYER: - dprint("ACT_LAYER"); - break; - case ACT_LAYER_MODS: - dprint("ACT_LAYER_MODS"); - break; - case ACT_LAYER_TAP: - dprint("ACT_LAYER_TAP"); - break; - case ACT_LAYER_TAP_EXT: - dprint("ACT_LAYER_TAP_EXT"); - break; - case ACT_MACRO: - dprint("ACT_MACRO"); - break; - case ACT_FUNCTION: - dprint("ACT_FUNCTION"); - break; - case ACT_SWAP_HANDS: - dprint("ACT_SWAP_HANDS"); - break; - default: - dprint("UNKNOWN"); - break; - } - dprintf("[%X:%02X]", action.kind.param >> 8, action.kind.param & 0xff); -} diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h deleted file mode 100644 index 8cb4722c6..000000000 --- a/tmk_core/common/action.h +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright 2012,2013 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include -#include -#include "keyboard.h" -#include "keycode.h" -#include "action_code.h" -#include "action_macro.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* Disable macro and function features when LTO is enabled, since they break */ -#ifdef LTO_ENABLE -# ifndef NO_ACTION_MACRO -# define NO_ACTION_MACRO -# endif -# ifndef NO_ACTION_FUNCTION -# define NO_ACTION_FUNCTION -# endif -#endif - -/* tapping count and state */ -typedef struct { - bool interrupted : 1; - bool reserved2 : 1; - bool reserved1 : 1; - bool reserved0 : 1; - uint8_t count : 4; -} tap_t; - -/* Key event container for recording */ -typedef struct { - keyevent_t event; -#ifndef NO_ACTION_TAPPING - tap_t tap; -#endif -} keyrecord_t; - -/* Execute action per keyevent */ -void action_exec(keyevent_t event); - -/* action for key */ -action_t action_for_key(uint8_t layer, keypos_t key); - -/* macro */ -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); - -/* user defined special function */ -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt); - -/* keyboard-specific key event (pre)processing */ -bool process_record_quantum(keyrecord_t *record); - -/* Utilities for actions. */ -#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) -extern bool disable_action_cache; -#endif - -/* Code for handling one-handed key modifiers. */ -#ifdef SWAP_HANDS_ENABLE -extern bool swap_hands; -extern const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS]; -# if (MATRIX_COLS <= 8) -typedef uint8_t swap_state_row_t; -# elif (MATRIX_COLS <= 16) -typedef uint16_t swap_state_row_t; -# elif (MATRIX_COLS <= 32) -typedef uint32_t swap_state_row_t; -# else -# error "MATRIX_COLS: invalid value" -# endif - -void process_hand_swap(keyevent_t *record); -#endif - -void process_record_nocache(keyrecord_t *record); -void process_record(keyrecord_t *record); -void process_record_handler(keyrecord_t *record); -void post_process_record_quantum(keyrecord_t *record); -void process_action(keyrecord_t *record, action_t action); -void register_code(uint8_t code); -void unregister_code(uint8_t code); -void tap_code(uint8_t code); -void tap_code_delay(uint8_t code, uint16_t delay); -void register_mods(uint8_t mods); -void unregister_mods(uint8_t mods); -void register_weak_mods(uint8_t mods); -void unregister_weak_mods(uint8_t mods); -// void set_mods(uint8_t mods); -void clear_keyboard(void); -void clear_keyboard_but_mods(void); -void clear_keyboard_but_mods_and_keys(void); -void layer_switch(uint8_t new_layer); -bool is_tap_key(keypos_t key); -bool is_tap_action(action_t action); - -#ifndef NO_ACTION_TAPPING -void process_record_tap_hint(keyrecord_t *record); -#endif - -/* debug */ -void debug_event(keyevent_t event); -void debug_record(keyrecord_t record); -void debug_action(action_t action); - -#ifdef __cplusplus -} -#endif diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c deleted file mode 100644 index af2d7d964..000000000 --- a/tmk_core/common/action_layer.c +++ /dev/null @@ -1,279 +0,0 @@ -#include -#include "keyboard.h" -#include "action.h" -#include "util.h" -#include "action_layer.h" - -#ifdef DEBUG_ACTION -# include "debug.h" -#else -# include "nodebug.h" -#endif - -/** \brief Default Layer State - */ -layer_state_t default_layer_state = 0; - -/** \brief Default Layer State Set At user Level - * - * Run user code on default layer state change - */ -__attribute__((weak)) layer_state_t default_layer_state_set_user(layer_state_t state) { return state; } - -/** \brief Default Layer State Set At Keyboard Level - * - * Run keyboard code on default layer state change - */ -__attribute__((weak)) layer_state_t default_layer_state_set_kb(layer_state_t state) { return default_layer_state_set_user(state); } - -/** \brief Default Layer State Set - * - * Static function to set the default layer state, prints debug info and clears keys - */ -static void default_layer_state_set(layer_state_t state) { - state = default_layer_state_set_kb(state); - debug("default_layer_state: "); - default_layer_debug(); - debug(" to "); - default_layer_state = state; - default_layer_debug(); - debug("\n"); -#ifdef STRICT_LAYER_RELEASE - clear_keyboard_but_mods(); // To avoid stuck keys -#else - clear_keyboard_but_mods_and_keys(); // Don't reset held keys -#endif -} - -/** \brief Default Layer Print - * - * Print out the hex value of the 32-bit default layer state, as well as the value of the highest bit. - */ -void default_layer_debug(void) { dprintf("%08lX(%u)", default_layer_state, get_highest_layer(default_layer_state)); } - -/** \brief Default Layer Set - * - * Sets the default layer state. - */ -void default_layer_set(layer_state_t state) { default_layer_state_set(state); } - -#ifndef NO_ACTION_LAYER -/** \brief Default Layer Or - * - * Turns on the default layer based on matching bits between specifed layer and existing layer state - */ -void default_layer_or(layer_state_t state) { default_layer_state_set(default_layer_state | state); } -/** \brief Default Layer And - * - * Turns on default layer based on matching enabled bits between specifed layer and existing layer state - */ -void default_layer_and(layer_state_t state) { default_layer_state_set(default_layer_state & state); } -/** \brief Default Layer Xor - * - * Turns on default layer based on non-matching bits between specifed layer and existing layer state - */ -void default_layer_xor(layer_state_t state) { default_layer_state_set(default_layer_state ^ state); } -#endif - -#ifndef NO_ACTION_LAYER -/** \brief Keymap Layer State - */ -layer_state_t layer_state = 0; - -/** \brief Layer state set user - * - * Runs user code on layer state change - */ -__attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) { return state; } - -/** \brief Layer state set keyboard - * - * Runs keyboard code on layer state change - */ -__attribute__((weak)) layer_state_t layer_state_set_kb(layer_state_t state) { return layer_state_set_user(state); } - -/** \brief Layer state set - * - * Sets the layer to match the specifed state (a bitmask) - */ -void layer_state_set(layer_state_t state) { - state = layer_state_set_kb(state); - dprint("layer_state: "); - layer_debug(); - dprint(" to "); - layer_state = state; - layer_debug(); - dprintln(); -# ifdef STRICT_LAYER_RELEASE - clear_keyboard_but_mods(); // To avoid stuck keys -# else - clear_keyboard_but_mods_and_keys(); // Don't reset held keys -# endif -} - -/** \brief Layer clear - * - * Turn off all layers - */ -void layer_clear(void) { layer_state_set(0); } - -/** \brief Layer state is - * - * Return whether the given state is on (it might still be shadowed by a higher state, though) - */ -bool layer_state_is(uint8_t layer) { return layer_state_cmp(layer_state, layer); } - -/** \brief Layer state compare - * - * Used for comparing layers {mostly used for unit testing} - */ -bool layer_state_cmp(layer_state_t cmp_layer_state, uint8_t layer) { - if (!cmp_layer_state) { - return layer == 0; - } - return (cmp_layer_state & (1UL << layer)) != 0; -} - -/** \brief Layer move - * - * Turns on the given layer and turn off all other layers - */ -void layer_move(uint8_t layer) { layer_state_set(1UL << layer); } - -/** \brief Layer on - * - * Turns on given layer - */ -void layer_on(uint8_t layer) { layer_state_set(layer_state | (1UL << layer)); } - -/** \brief Layer off - * - * Turns off given layer - */ -void layer_off(uint8_t layer) { layer_state_set(layer_state & ~(1UL << layer)); } - -/** \brief Layer invert - * - * Toggle the given layer (set it if it's unset, or unset it if it's set) - */ -void layer_invert(uint8_t layer) { layer_state_set(layer_state ^ (1UL << layer)); } - -/** \brief Layer or - * - * Turns on layers based on matching bits between specifed layer and existing layer state - */ -void layer_or(layer_state_t state) { layer_state_set(layer_state | state); } -/** \brief Layer and - * - * Turns on layers based on matching enabled bits between specifed layer and existing layer state - */ -void layer_and(layer_state_t state) { layer_state_set(layer_state & state); } -/** \brief Layer xor - * - * Turns on layers based on non-matching bits between specifed layer and existing layer state - */ -void layer_xor(layer_state_t state) { layer_state_set(layer_state ^ state); } - -/** \brief Layer debug printing - * - * Print out the hex value of the 32-bit layer state, as well as the value of the highest bit. - */ -void layer_debug(void) { dprintf("%08lX(%u)", layer_state, get_highest_layer(layer_state)); } -#endif - -#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) -/** \brief source layer cache - */ - -uint8_t source_layers_cache[(MATRIX_ROWS * MATRIX_COLS + 7) / 8][MAX_LAYER_BITS] = {{0}}; - -/** \brief update source layers cache - * - * Updates the cached keys when changing layers - */ -void update_source_layers_cache(keypos_t key, uint8_t layer) { - const uint8_t key_number = key.col + (key.row * MATRIX_COLS); - const uint8_t storage_row = key_number / 8; - const uint8_t storage_bit = key_number % 8; - - for (uint8_t bit_number = 0; bit_number < MAX_LAYER_BITS; bit_number++) { - source_layers_cache[storage_row][bit_number] ^= (-((layer & (1U << bit_number)) != 0) ^ source_layers_cache[storage_row][bit_number]) & (1U << storage_bit); - } -} - -/** \brief read source layers cache - * - * reads the cached keys stored when the layer was changed - */ -uint8_t read_source_layers_cache(keypos_t key) { - const uint8_t key_number = key.col + (key.row * MATRIX_COLS); - const uint8_t storage_row = key_number / 8; - const uint8_t storage_bit = key_number % 8; - uint8_t layer = 0; - - for (uint8_t bit_number = 0; bit_number < MAX_LAYER_BITS; bit_number++) { - layer |= ((source_layers_cache[storage_row][bit_number] & (1U << storage_bit)) != 0) << bit_number; - } - - return layer; -} -#endif - -/** \brief Store or get action (FIXME: Needs better summary) - * - * Make sure the action triggered when the key is released is the same - * one as the one triggered on press. It's important for the mod keys - * when the layer is switched after the down event but before the up - * event as they may get stuck otherwise. - */ -action_t store_or_get_action(bool pressed, keypos_t key) { -#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) - if (disable_action_cache) { - return layer_switch_get_action(key); - } - - uint8_t layer; - - if (pressed) { - layer = layer_switch_get_layer(key); - update_source_layers_cache(key, layer); - } else { - layer = read_source_layers_cache(key); - } - return action_for_key(layer, key); -#else - return layer_switch_get_action(key); -#endif -} - -/** \brief Layer switch get layer - * - * Gets the layer based on key info - */ -uint8_t layer_switch_get_layer(keypos_t key) { -#ifndef NO_ACTION_LAYER - action_t action; - action.code = ACTION_TRANSPARENT; - - layer_state_t layers = layer_state | default_layer_state; - /* check top layer first */ - for (int8_t i = MAX_LAYER - 1; i >= 0; i--) { - if (layers & (1UL << i)) { - action = action_for_key(i, key); - if (action.code != ACTION_TRANSPARENT) { - return i; - } - } - } - /* fall back to layer 0 */ - return 0; -#else - return get_highest_layer(default_layer_state); -#endif -} - -/** \brief Layer switch get layer - * - * Gets action code based on key position - */ -action_t layer_switch_get_action(keypos_t key) { return action_for_key(layer_switch_get_layer(key), key); } diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h deleted file mode 100644 index d72cd3e3a..000000000 --- a/tmk_core/common/action_layer.h +++ /dev/null @@ -1,122 +0,0 @@ -/* -Copyright 2013 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include -#include "keyboard.h" -#include "action.h" - -#if defined(LAYER_STATE_8BIT) -typedef uint8_t layer_state_t; -# define MAX_LAYER_BITS 3 -# ifndef MAX_LAYER -# define MAX_LAYER 8 -# endif -# define get_highest_layer(state) biton(state) -#elif defined(LAYER_STATE_16BIT) -typedef uint16_t layer_state_t; -# define MAX_LAYER_BITS 4 -# ifndef MAX_LAYER -# define MAX_LAYER 16 -# endif -# define get_highest_layer(state) biton16(state) -#else -typedef uint32_t layer_state_t; -# define MAX_LAYER_BITS 5 -# ifndef MAX_LAYER -# define MAX_LAYER 32 -# endif -# define get_highest_layer(state) biton32(state) -#endif - -/* - * Default Layer - */ -extern layer_state_t default_layer_state; -void default_layer_debug(void); -void default_layer_set(layer_state_t state); - -__attribute__((weak)) layer_state_t default_layer_state_set_kb(layer_state_t state); -__attribute__((weak)) layer_state_t default_layer_state_set_user(layer_state_t state); - -#ifndef NO_ACTION_LAYER -/* bitwise operation */ -void default_layer_or(layer_state_t state); -void default_layer_and(layer_state_t state); -void default_layer_xor(layer_state_t state); -#else -# define default_layer_or(state) -# define default_layer_and(state) -# define default_layer_xor(state) -#endif - -/* - * Keymap Layer - */ -#ifndef NO_ACTION_LAYER -extern layer_state_t layer_state; - -void layer_state_set(layer_state_t state); -bool layer_state_is(uint8_t layer); -bool layer_state_cmp(layer_state_t layer1, uint8_t layer2); - -void layer_debug(void); -void layer_clear(void); -void layer_move(uint8_t layer); -void layer_on(uint8_t layer); -void layer_off(uint8_t layer); -void layer_invert(uint8_t layer); -/* bitwise operation */ -void layer_or(layer_state_t state); -void layer_and(layer_state_t state); -void layer_xor(layer_state_t state); -layer_state_t layer_state_set_user(layer_state_t state); -layer_state_t layer_state_set_kb(layer_state_t state); -#else -# define layer_state 0 - -# define layer_state_set(layer) -# define layer_state_is(layer) (layer == 0) -# define layer_state_cmp(state, layer) (state == 0 ? layer == 0 : (state & 1UL << layer) != 0) - -# define layer_debug() -# define layer_clear() -# define layer_move(layer) (void)layer -# define layer_on(layer) (void)layer -# define layer_off(layer) (void)layer -# define layer_invert(layer) (void)layer -# define layer_or(state) (void)state -# define layer_and(state) (void)state -# define layer_xor(state) (void)state -# define layer_state_set_kb(state) (void)state -# define layer_state_set_user(state) (void)state -#endif - -/* pressed actions cache */ -#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE) - -void update_source_layers_cache(keypos_t key, uint8_t layer); -uint8_t read_source_layers_cache(keypos_t key); -#endif -action_t store_or_get_action(bool pressed, keypos_t key); - -/* return the topmost non-transparent layer currently associated with key */ -uint8_t layer_switch_get_layer(keypos_t key); - -/* return action depending on current layer status */ -action_t layer_switch_get_action(keypos_t key); diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c deleted file mode 100644 index 56044e096..000000000 --- a/tmk_core/common/action_tapping.c +++ /dev/null @@ -1,426 +0,0 @@ -#include -#include -#include "action.h" -#include "action_layer.h" -#include "action_tapping.h" -#include "keycode.h" -#include "timer.h" - -#ifdef DEBUG_ACTION -# include "debug.h" -#else -# include "nodebug.h" -#endif - -#ifndef NO_ACTION_TAPPING - -# define IS_TAPPING() !IS_NOEVENT(tapping_key.event) -# define IS_TAPPING_PRESSED() (IS_TAPPING() && tapping_key.event.pressed) -# define IS_TAPPING_RELEASED() (IS_TAPPING() && !tapping_key.event.pressed) -# define IS_TAPPING_KEY(k) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (k))) - -__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { return TAPPING_TERM; } - -# ifdef TAPPING_TERM_PER_KEY -# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < get_tapping_term(get_event_keycode(tapping_key.event, false), &tapping_key)) -# else -# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < TAPPING_TERM) -# endif - -# ifdef TAPPING_FORCE_HOLD_PER_KEY -__attribute__((weak)) bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { return false; } -# endif - -# ifdef PERMISSIVE_HOLD_PER_KEY -__attribute__((weak)) bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { return false; } -# endif - -static keyrecord_t tapping_key = {}; -static keyrecord_t waiting_buffer[WAITING_BUFFER_SIZE] = {}; -static uint8_t waiting_buffer_head = 0; -static uint8_t waiting_buffer_tail = 0; - -static bool process_tapping(keyrecord_t *record); -static bool waiting_buffer_enq(keyrecord_t record); -static void waiting_buffer_clear(void); -static bool waiting_buffer_typed(keyevent_t event); -static bool waiting_buffer_has_anykey_pressed(void); -static void waiting_buffer_scan_tap(void); -static void debug_tapping_key(void); -static void debug_waiting_buffer(void); - -/** \brief Action Tapping Process - * - * FIXME: Needs doc - */ -void action_tapping_process(keyrecord_t record) { - if (process_tapping(&record)) { - if (!IS_NOEVENT(record.event)) { - debug("processed: "); - debug_record(record); - debug("\n"); - } - } else { - if (!waiting_buffer_enq(record)) { - // clear all in case of overflow. - debug("OVERFLOW: CLEAR ALL STATES\n"); - clear_keyboard(); - waiting_buffer_clear(); - tapping_key = (keyrecord_t){}; - } - } - - // process waiting_buffer - if (!IS_NOEVENT(record.event) && waiting_buffer_head != waiting_buffer_tail) { - debug("---- action_exec: process waiting_buffer -----\n"); - } - for (; waiting_buffer_tail != waiting_buffer_head; waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE) { - if (process_tapping(&waiting_buffer[waiting_buffer_tail])) { - debug("processed: waiting_buffer["); - debug_dec(waiting_buffer_tail); - debug("] = "); - debug_record(waiting_buffer[waiting_buffer_tail]); - debug("\n\n"); - } else { - break; - } - } - if (!IS_NOEVENT(record.event)) { - debug("\n"); - } -} - -/** \brief Tapping - * - * Rule: Tap key is typed(pressed and released) within TAPPING_TERM. - * (without interfering by typing other key) - */ -/* return true when key event is processed or consumed. */ -bool process_tapping(keyrecord_t *keyp) { - keyevent_t event = keyp->event; - - // if tapping - if (IS_TAPPING_PRESSED()) { - if (WITHIN_TAPPING_TERM(event)) { - if (tapping_key.tap.count == 0) { - if (IS_TAPPING_KEY(event.key) && !event.pressed) { - // first tap! - debug("Tapping: First tap(0->1).\n"); - tapping_key.tap.count = 1; - debug_tapping_key(); - process_record(&tapping_key); - - // copy tapping state - keyp->tap = tapping_key.tap; - // enqueue - return false; - } - /* Process a key typed within TAPPING_TERM - * This can register the key before settlement of tapping, - * useful for long TAPPING_TERM but may prevent fast typing. - */ -# if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) - else if ((( -# ifdef TAPPING_TERM_PER_KEY - get_tapping_term(get_event_keycode(tapping_key.event, false), keyp) -# else - TAPPING_TERM -# endif - >= 500) - -# ifdef PERMISSIVE_HOLD_PER_KEY - || get_permissive_hold(get_event_keycode(tapping_key.event, false), keyp) -# elif defined(PERMISSIVE_HOLD) - || true -# endif - ) && - IS_RELEASED(event) && waiting_buffer_typed(event)) { - debug("Tapping: End. No tap. Interfered by typing key\n"); - process_record(&tapping_key); - tapping_key = (keyrecord_t){}; - debug_tapping_key(); - // enqueue - return false; - } -# endif - /* Process release event of a key pressed before tapping starts - * Without this unexpected repeating will occur with having fast repeating setting - * https://github.com/tmk/tmk_keyboard/issues/60 - */ - else if (IS_RELEASED(event) && !waiting_buffer_typed(event)) { - // Modifier should be retained till end of this tapping. - action_t action = layer_switch_get_action(event.key); - switch (action.kind.id) { - case ACT_LMODS: - case ACT_RMODS: - if (action.key.mods && !action.key.code) return false; - if (IS_MOD(action.key.code)) return false; - break; - case ACT_LMODS_TAP: - case ACT_RMODS_TAP: - if (action.key.mods && keyp->tap.count == 0) return false; - if (IS_MOD(action.key.code)) return false; - break; - } - // Release of key should be process immediately. - debug("Tapping: release event of a key pressed before tapping\n"); - process_record(keyp); - return true; - } else { - // set interrupted flag when other key preesed during tapping - if (event.pressed) { - tapping_key.tap.interrupted = true; - } - // enqueue - return false; - } - } - // tap_count > 0 - else { - if (IS_TAPPING_KEY(event.key) && !event.pressed) { - debug("Tapping: Tap release("); - debug_dec(tapping_key.tap.count); - debug(")\n"); - keyp->tap = tapping_key.tap; - process_record(keyp); - tapping_key = *keyp; - debug_tapping_key(); - return true; - } else if (is_tap_key(event.key) && event.pressed) { - if (tapping_key.tap.count > 1) { - debug("Tapping: Start new tap with releasing last tap(>1).\n"); - // unregister key - process_record(&(keyrecord_t){.tap = tapping_key.tap, .event.key = tapping_key.event.key, .event.time = event.time, .event.pressed = false}); - } else { - debug("Tapping: Start while last tap(1).\n"); - } - tapping_key = *keyp; - waiting_buffer_scan_tap(); - debug_tapping_key(); - return true; - } else { - if (!IS_NOEVENT(event)) { - debug("Tapping: key event while last tap(>0).\n"); - } - process_record(keyp); - return true; - } - } - } - // after TAPPING_TERM - else { - if (tapping_key.tap.count == 0) { - debug("Tapping: End. Timeout. Not tap(0): "); - debug_event(event); - debug("\n"); - process_record(&tapping_key); - tapping_key = (keyrecord_t){}; - debug_tapping_key(); - return false; - } else { - if (IS_TAPPING_KEY(event.key) && !event.pressed) { - debug("Tapping: End. last timeout tap release(>0)."); - keyp->tap = tapping_key.tap; - process_record(keyp); - tapping_key = (keyrecord_t){}; - return true; - } else if (is_tap_key(event.key) && event.pressed) { - if (tapping_key.tap.count > 1) { - debug("Tapping: Start new tap with releasing last timeout tap(>1).\n"); - // unregister key - process_record(&(keyrecord_t){.tap = tapping_key.tap, .event.key = tapping_key.event.key, .event.time = event.time, .event.pressed = false}); - } else { - debug("Tapping: Start while last timeout tap(1).\n"); - } - tapping_key = *keyp; - waiting_buffer_scan_tap(); - debug_tapping_key(); - return true; - } else { - if (!IS_NOEVENT(event)) { - debug("Tapping: key event while last timeout tap(>0).\n"); - } - process_record(keyp); - return true; - } - } - } - } else if (IS_TAPPING_RELEASED()) { - if (WITHIN_TAPPING_TERM(event)) { - if (event.pressed) { - if (IS_TAPPING_KEY(event.key)) { -//# ifndef TAPPING_FORCE_HOLD -# if !defined(TAPPING_FORCE_HOLD) || defined(TAPPING_FORCE_HOLD_PER_KEY) - if ( -# ifdef TAPPING_FORCE_HOLD_PER_KEY - !get_tapping_force_hold(get_event_keycode(tapping_key.event, false), keyp) && -# endif - !tapping_key.tap.interrupted && tapping_key.tap.count > 0) { - // sequential tap. - keyp->tap = tapping_key.tap; - if (keyp->tap.count < 15) keyp->tap.count += 1; - debug("Tapping: Tap press("); - debug_dec(keyp->tap.count); - debug(")\n"); - process_record(keyp); - tapping_key = *keyp; - debug_tapping_key(); - return true; - } -# endif - // FIX: start new tap again - tapping_key = *keyp; - return true; - } else if (is_tap_key(event.key)) { - // Sequential tap can be interfered with other tap key. - debug("Tapping: Start with interfering other tap.\n"); - tapping_key = *keyp; - waiting_buffer_scan_tap(); - debug_tapping_key(); - return true; - } else { - // should none in buffer - // FIX: interrupted when other key is pressed - tapping_key.tap.interrupted = true; - process_record(keyp); - return true; - } - } else { - if (!IS_NOEVENT(event)) debug("Tapping: other key just after tap.\n"); - process_record(keyp); - return true; - } - } else { - // FIX: process_action here? - // timeout. no sequential tap. - debug("Tapping: End(Timeout after releasing last tap): "); - debug_event(event); - debug("\n"); - tapping_key = (keyrecord_t){}; - debug_tapping_key(); - return false; - } - } - // not tapping state - else { - if (event.pressed && is_tap_key(event.key)) { - debug("Tapping: Start(Press tap key).\n"); - tapping_key = *keyp; - process_record_tap_hint(&tapping_key); - waiting_buffer_scan_tap(); - debug_tapping_key(); - return true; - } else { - process_record(keyp); - return true; - } - } -} - -/** \brief Waiting buffer enq - * - * FIXME: Needs docs - */ -bool waiting_buffer_enq(keyrecord_t record) { - if (IS_NOEVENT(record.event)) { - return true; - } - - if ((waiting_buffer_head + 1) % WAITING_BUFFER_SIZE == waiting_buffer_tail) { - debug("waiting_buffer_enq: Over flow.\n"); - return false; - } - - waiting_buffer[waiting_buffer_head] = record; - waiting_buffer_head = (waiting_buffer_head + 1) % WAITING_BUFFER_SIZE; - - debug("waiting_buffer_enq: "); - debug_waiting_buffer(); - return true; -} - -/** \brief Waiting buffer clear - * - * FIXME: Needs docs - */ -void waiting_buffer_clear(void) { - waiting_buffer_head = 0; - waiting_buffer_tail = 0; -} - -/** \brief Waiting buffer typed - * - * FIXME: Needs docs - */ -bool waiting_buffer_typed(keyevent_t event) { - for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { - if (KEYEQ(event.key, waiting_buffer[i].event.key) && event.pressed != waiting_buffer[i].event.pressed) { - return true; - } - } - return false; -} - -/** \brief Waiting buffer has anykey pressed - * - * FIXME: Needs docs - */ -__attribute__((unused)) bool waiting_buffer_has_anykey_pressed(void) { - for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { - if (waiting_buffer[i].event.pressed) return true; - } - return false; -} - -/** \brief Scan buffer for tapping - * - * FIXME: Needs docs - */ -void waiting_buffer_scan_tap(void) { - // tapping already is settled - if (tapping_key.tap.count > 0) return; - // invalid state: tapping_key released && tap.count == 0 - if (!tapping_key.event.pressed) return; - - for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { - if (IS_TAPPING_KEY(waiting_buffer[i].event.key) && !waiting_buffer[i].event.pressed && WITHIN_TAPPING_TERM(waiting_buffer[i].event)) { - tapping_key.tap.count = 1; - waiting_buffer[i].tap.count = 1; - process_record(&tapping_key); - - debug("waiting_buffer_scan_tap: found at ["); - debug_dec(i); - debug("]\n"); - debug_waiting_buffer(); - return; - } - } -} - -/** \brief Tapping key debug print - * - * FIXME: Needs docs - */ -static void debug_tapping_key(void) { - debug("TAPPING_KEY="); - debug_record(tapping_key); - debug("\n"); -} - -/** \brief Waiting buffer debug print - * - * FIXME: Needs docs - */ -static void debug_waiting_buffer(void) { - debug("{ "); - for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { - debug("["); - debug_dec(i); - debug("]="); - debug_record(waiting_buffer[i]); - debug(" "); - } - debug("}\n"); -} - -#endif diff --git a/tmk_core/common/action_tapping.h b/tmk_core/common/action_tapping.h deleted file mode 100644 index 893ccb1ce..000000000 --- a/tmk_core/common/action_tapping.h +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2013 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -/* period of tapping(ms) */ -#ifndef TAPPING_TERM -# define TAPPING_TERM 200 -#endif - -/* tap count needed for toggling a feature */ -#ifndef TAPPING_TOGGLE -# define TAPPING_TOGGLE 5 -#endif - -#define WAITING_BUFFER_SIZE 8 - -#ifndef NO_ACTION_TAPPING -uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache); -void action_tapping_process(keyrecord_t record); - -uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record); -bool get_permissive_hold(uint16_t keycode, keyrecord_t *record); -bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record); -bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record); -bool get_retro_tapping(uint16_t keycode, keyrecord_t *record); -#endif diff --git a/tmk_core/common/action_util.c b/tmk_core/common/action_util.c deleted file mode 100644 index a57c8bf66..000000000 --- a/tmk_core/common/action_util.c +++ /dev/null @@ -1,427 +0,0 @@ -/* -Copyright 2013 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ -#include "host.h" -#include "report.h" -#include "debug.h" -#include "action_util.h" -#include "action_layer.h" -#include "timer.h" -#include "keycode_config.h" - -extern keymap_config_t keymap_config; - -static uint8_t real_mods = 0; -static uint8_t weak_mods = 0; -static uint8_t macro_mods = 0; - -#ifdef USB_6KRO_ENABLE -# define RO_ADD(a, b) ((a + b) % KEYBOARD_REPORT_KEYS) -# define RO_SUB(a, b) ((a - b + KEYBOARD_REPORT_KEYS) % KEYBOARD_REPORT_KEYS) -# define RO_INC(a) RO_ADD(a, 1) -# define RO_DEC(a) RO_SUB(a, 1) -static int8_t cb_head = 0; -static int8_t cb_tail = 0; -static int8_t cb_count = 0; -#endif - -// TODO: pointer variable is not needed -// report_keyboard_t keyboard_report = {}; -report_keyboard_t *keyboard_report = &(report_keyboard_t){}; - -extern inline void add_key(uint8_t key); -extern inline void del_key(uint8_t key); -extern inline void clear_keys(void); - -#ifndef NO_ACTION_ONESHOT -static uint8_t oneshot_mods = 0; -static uint8_t oneshot_locked_mods = 0; -uint8_t get_oneshot_locked_mods(void) { return oneshot_locked_mods; } -void set_oneshot_locked_mods(uint8_t mods) { - if (mods != oneshot_locked_mods) { - oneshot_locked_mods = mods; - oneshot_locked_mods_changed_kb(oneshot_locked_mods); - } -} -void clear_oneshot_locked_mods(void) { - if (oneshot_locked_mods) { - oneshot_locked_mods = 0; - oneshot_locked_mods_changed_kb(oneshot_locked_mods); - } -} -# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) -static uint16_t oneshot_time = 0; -bool has_oneshot_mods_timed_out(void) { return TIMER_DIFF_16(timer_read(), oneshot_time) >= ONESHOT_TIMEOUT; } -# else -bool has_oneshot_mods_timed_out(void) { return false; } -# endif -#endif - -/* oneshot layer */ -#ifndef NO_ACTION_ONESHOT -/** \brief oneshot_layer_data bits - * LLLL LSSS - * where: - * L => are layer bits - * S => oneshot state bits - */ -static int8_t oneshot_layer_data = 0; - -inline uint8_t get_oneshot_layer(void) { return oneshot_layer_data >> 3; } -inline uint8_t get_oneshot_layer_state(void) { return oneshot_layer_data & 0b111; } - -# ifdef SWAP_HANDS_ENABLE -enum { - SHO_OFF, - SHO_ACTIVE, // Swap hands button was pressed, and we didn't send any swapped keys yet - SHO_PRESSED, // Swap hands button is currently pressed - SHO_USED, // Swap hands button is still pressed, and we already sent swapped keys -} swap_hands_oneshot = SHO_OFF; -# endif - -# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) -static uint16_t oneshot_layer_time = 0; -inline bool has_oneshot_layer_timed_out() { return TIMER_DIFF_16(timer_read(), oneshot_layer_time) >= ONESHOT_TIMEOUT && !(get_oneshot_layer_state() & ONESHOT_TOGGLED); } -# ifdef SWAP_HANDS_ENABLE -static uint16_t oneshot_swaphands_time = 0; -inline bool has_oneshot_swaphands_timed_out() { return TIMER_DIFF_16(timer_read(), oneshot_swaphands_time) >= ONESHOT_TIMEOUT && (swap_hands_oneshot == SHO_ACTIVE); } -# endif -# endif - -# ifdef SWAP_HANDS_ENABLE - -void set_oneshot_swaphands(void) { - swap_hands_oneshot = SHO_PRESSED; - swap_hands = true; -# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - oneshot_swaphands_time = timer_read(); - if (oneshot_layer_time != 0) { - oneshot_layer_time = oneshot_swaphands_time; - } -# endif -} - -void release_oneshot_swaphands(void) { - if (swap_hands_oneshot == SHO_PRESSED) { - swap_hands_oneshot = SHO_ACTIVE; - } - if (swap_hands_oneshot == SHO_USED) { - clear_oneshot_swaphands(); - } -} - -void use_oneshot_swaphands(void) { - if (swap_hands_oneshot == SHO_PRESSED) { - swap_hands_oneshot = SHO_USED; - } - if (swap_hands_oneshot == SHO_ACTIVE) { - clear_oneshot_swaphands(); - } -} - -void clear_oneshot_swaphands(void) { - swap_hands_oneshot = SHO_OFF; - swap_hands = false; -# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - oneshot_swaphands_time = 0; -# endif -} - -# endif - -/** \brief Set oneshot layer - * - * FIXME: needs doc - */ -void set_oneshot_layer(uint8_t layer, uint8_t state) { - if (!keymap_config.oneshot_disable) { - oneshot_layer_data = layer << 3 | state; - layer_on(layer); -# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - oneshot_layer_time = timer_read(); -# endif - oneshot_layer_changed_kb(get_oneshot_layer()); - } else { - layer_on(layer); - } -} -/** \brief Reset oneshot layer - * - * FIXME: needs doc - */ -void reset_oneshot_layer(void) { - oneshot_layer_data = 0; -# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - oneshot_layer_time = 0; -# endif - oneshot_layer_changed_kb(get_oneshot_layer()); -} -/** \brief Clear oneshot layer - * - * FIXME: needs doc - */ -void clear_oneshot_layer_state(oneshot_fullfillment_t state) { - uint8_t start_state = oneshot_layer_data; - oneshot_layer_data &= ~state; - if ((!get_oneshot_layer_state() && start_state != oneshot_layer_data) || keymap_config.oneshot_disable) { - layer_off(get_oneshot_layer()); - reset_oneshot_layer(); - } -} -/** \brief Is oneshot layer active - * - * FIXME: needs doc - */ -bool is_oneshot_layer_active(void) { return get_oneshot_layer_state(); } - -/** \brief set oneshot - * - * FIXME: needs doc - */ -void oneshot_set(bool active) { - if (keymap_config.oneshot_disable != active) { - keymap_config.oneshot_disable = active; - eeconfig_update_keymap(keymap_config.raw); - dprintf("Oneshot: active: %d\n", active); - } -} - -/** \brief toggle oneshot - * - * FIXME: needs doc - */ -void oneshot_toggle(void) { oneshot_set(!keymap_config.oneshot_disable); } - -/** \brief enable oneshot - * - * FIXME: needs doc - */ -void oneshot_enable(void) { oneshot_set(true); } - -/** \brief disable oneshot - * - * FIXME: needs doc - */ -void oneshot_disable(void) { oneshot_set(false); } - -bool is_oneshot_enabled(void) { return keymap_config.oneshot_disable; } - -#endif - -/** \brief Send keyboard report - * - * FIXME: needs doc - */ -void send_keyboard_report(void) { - keyboard_report->mods = real_mods; - keyboard_report->mods |= weak_mods; - keyboard_report->mods |= macro_mods; -#ifndef NO_ACTION_ONESHOT - if (oneshot_mods) { -# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - if (has_oneshot_mods_timed_out()) { - dprintf("Oneshot: timeout\n"); - clear_oneshot_mods(); - } -# endif - keyboard_report->mods |= oneshot_mods; - if (has_anykey(keyboard_report)) { - clear_oneshot_mods(); - } - } - -#endif - host_keyboard_send(keyboard_report); -} - -/** \brief Get mods - * - * FIXME: needs doc - */ -uint8_t get_mods(void) { return real_mods; } -/** \brief add mods - * - * FIXME: needs doc - */ -void add_mods(uint8_t mods) { real_mods |= mods; } -/** \brief del mods - * - * FIXME: needs doc - */ -void del_mods(uint8_t mods) { real_mods &= ~mods; } -/** \brief set mods - * - * FIXME: needs doc - */ -void set_mods(uint8_t mods) { real_mods = mods; } -/** \brief clear mods - * - * FIXME: needs doc - */ -void clear_mods(void) { real_mods = 0; } - -/** \brief get weak mods - * - * FIXME: needs doc - */ -uint8_t get_weak_mods(void) { return weak_mods; } -/** \brief add weak mods - * - * FIXME: needs doc - */ -void add_weak_mods(uint8_t mods) { weak_mods |= mods; } -/** \brief del weak mods - * - * FIXME: needs doc - */ -void del_weak_mods(uint8_t mods) { weak_mods &= ~mods; } -/** \brief set weak mods - * - * FIXME: needs doc - */ -void set_weak_mods(uint8_t mods) { weak_mods = mods; } -/** \brief clear weak mods - * - * FIXME: needs doc - */ -void clear_weak_mods(void) { weak_mods = 0; } - -/* macro modifier */ -/** \brief get macro mods - * - * FIXME: needs doc - */ -uint8_t get_macro_mods(void) { return macro_mods; } -/** \brief add macro mods - * - * FIXME: needs doc - */ -void add_macro_mods(uint8_t mods) { macro_mods |= mods; } -/** \brief del macro mods - * - * FIXME: needs doc - */ -void del_macro_mods(uint8_t mods) { macro_mods &= ~mods; } -/** \brief set macro mods - * - * FIXME: needs doc - */ -void set_macro_mods(uint8_t mods) { macro_mods = mods; } -/** \brief clear macro mods - * - * FIXME: needs doc - */ -void clear_macro_mods(void) { macro_mods = 0; } - -#ifndef NO_ACTION_ONESHOT -/** \brief get oneshot mods - * - * FIXME: needs doc - */ -uint8_t get_oneshot_mods(void) { return oneshot_mods; } - -void add_oneshot_mods(uint8_t mods) { - if ((oneshot_mods & mods) != mods) { -# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - oneshot_time = timer_read(); -# endif - oneshot_mods |= mods; - oneshot_mods_changed_kb(mods); - } -} - -void del_oneshot_mods(uint8_t mods) { - if (oneshot_mods & mods) { - oneshot_mods &= ~mods; -# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - oneshot_time = oneshot_mods ? timer_read() : 0; -# endif - oneshot_mods_changed_kb(oneshot_mods); - } -} - -/** \brief set oneshot mods - * - * FIXME: needs doc - */ -void set_oneshot_mods(uint8_t mods) { - if (!keymap_config.oneshot_disable) { - if (oneshot_mods != mods) { -# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - oneshot_time = timer_read(); -# endif - oneshot_mods = mods; - oneshot_mods_changed_kb(mods); - } - } -} - -/** \brief clear oneshot mods - * - * FIXME: needs doc - */ -void clear_oneshot_mods(void) { - if (oneshot_mods) { - oneshot_mods = 0; -# if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - oneshot_time = 0; -# endif - oneshot_mods_changed_kb(oneshot_mods); - } -} -#endif - -/** \brief Called when the one shot modifiers have been changed. - * - * \param mods Contains the active modifiers active after the change. - */ -__attribute__((weak)) void oneshot_locked_mods_changed_user(uint8_t mods) {} - -/** \brief Called when the locked one shot modifiers have been changed. - * - * \param mods Contains the active modifiers active after the change. - */ -__attribute__((weak)) void oneshot_locked_mods_changed_kb(uint8_t mods) { oneshot_locked_mods_changed_user(mods); } - -/** \brief Called when the one shot modifiers have been changed. - * - * \param mods Contains the active modifiers active after the change. - */ -__attribute__((weak)) void oneshot_mods_changed_user(uint8_t mods) {} - -/** \brief Called when the one shot modifiers have been changed. - * - * \param mods Contains the active modifiers active after the change. - */ -__attribute__((weak)) void oneshot_mods_changed_kb(uint8_t mods) { oneshot_mods_changed_user(mods); } - -/** \brief Called when the one shot layers have been changed. - * - * \param layer Contains the layer that is toggled on, or zero when toggled off. - */ -__attribute__((weak)) void oneshot_layer_changed_user(uint8_t layer) {} - -/** \brief Called when the one shot layers have been changed. - * - * \param layer Contains the layer that is toggled on, or zero when toggled off. - */ -__attribute__((weak)) void oneshot_layer_changed_kb(uint8_t layer) { oneshot_layer_changed_user(layer); } - -/** \brief inspect keyboard state - * - * FIXME: needs doc - */ -uint8_t has_anymod(void) { return bitpop(real_mods); } diff --git a/tmk_core/common/arm_atsam/_timer.h b/tmk_core/common/arm_atsam/_timer.h new file mode 100644 index 000000000..77402b612 --- /dev/null +++ b/tmk_core/common/arm_atsam/_timer.h @@ -0,0 +1,19 @@ +/* Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +// The platform is 32-bit, so prefer 32-bit timers to avoid overflow +#define FAST_TIMER_T_SIZE 32 diff --git a/tmk_core/common/arm_atsam/platform.c b/tmk_core/common/arm_atsam/platform.c new file mode 100644 index 000000000..3e35b4fe4 --- /dev/null +++ b/tmk_core/common/arm_atsam/platform.c @@ -0,0 +1,21 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "platform_deps.h" + +void platform_setup(void) { + // do nothing +} diff --git a/tmk_core/common/avr/_timer.h b/tmk_core/common/avr/_timer.h new file mode 100644 index 000000000..b81e0f68b --- /dev/null +++ b/tmk_core/common/avr/_timer.h @@ -0,0 +1,19 @@ +/* Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +// The platform is 8-bit, so prefer 16-bit timers to reduce code size +#define FAST_TIMER_T_SIZE 16 diff --git a/tmk_core/common/avr/_wait.h b/tmk_core/common/avr/_wait.h index 56eb316fa..683db6ae5 100644 --- a/tmk_core/common/avr/_wait.h +++ b/tmk_core/common/avr/_wait.h @@ -17,8 +17,28 @@ #include -#define wait_ms(ms) _delay_ms(ms) -#define wait_us(us) _delay_us(us) +#define wait_ms(ms) \ + do { \ + if (__builtin_constant_p(ms)) { \ + _delay_ms(ms); \ + } else { \ + for (uint16_t i = ms; i > 0; i--) { \ + _delay_ms(1); \ + } \ + } \ + } while (0) +#define wait_us(us) \ + do { \ + if (__builtin_constant_p(us)) { \ + _delay_us(us); \ + } else { \ + for (uint16_t i = us; i > 0; i--) { \ + _delay_us(1); \ + } \ + } \ + } while (0) +#define wait_cpuclock(n) __builtin_avr_delay_cycles(n) +#define CPU_CLOCK F_CPU /* The AVR series GPIOs have a one clock read delay for changes in the digital input signal. * But here's more margin to make it two clocks. */ @@ -26,4 +46,4 @@ # define GPIO_INPUT_PIN_DELAY 2 #endif -#define waitInputPinDelay() __builtin_avr_delay_cycles(GPIO_INPUT_PIN_DELAY) +#define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY) diff --git a/tmk_core/common/avr/gpio.h b/tmk_core/common/avr/gpio.h index 231556c29..e9be68491 100644 --- a/tmk_core/common/avr/gpio.h +++ b/tmk_core/common/avr/gpio.h @@ -20,6 +20,8 @@ typedef uint8_t pin_t; +/* Operation of GPIO by pin. */ + #define setPinInput(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF)) #define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF)) #define setPinInputLow(pin) _Static_assert(0, "AVR processors cannot implement an input as pull low") @@ -32,3 +34,16 @@ typedef uint8_t pin_t; #define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF))) #define togglePin(pin) (PORTx_ADDRESS(pin) ^= _BV((pin)&0xF)) + +/* Operation of GPIO by port. */ + +typedef uint8_t port_data_t; + +#define readPort(port) PINx_ADDRESS(port) + +#define setPortBitInput(port, bit) (DDRx_ADDRESS(port) &= ~_BV((bit)&0xF), PORTx_ADDRESS(port) &= ~_BV((bit)&0xF)) +#define setPortBitInputHigh(port, bit) (DDRx_ADDRESS(port) &= ~_BV((bit)&0xF), PORTx_ADDRESS(port) |= _BV((bit)&0xF)) +#define setPortBitOutput(port, bit) (DDRx_ADDRESS(port) |= _BV((bit)&0xF)) + +#define writePortBitLow(port, bit) (PORTx_ADDRESS(port) &= ~_BV((bit)&0xF)) +#define writePortBitHigh(port, bit) (PORTx_ADDRESS(port) |= _BV((bit)&0xF)) diff --git a/tmk_core/common/avr/platform.c b/tmk_core/common/avr/platform.c new file mode 100644 index 000000000..3e35b4fe4 --- /dev/null +++ b/tmk_core/common/avr/platform.c @@ -0,0 +1,21 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "platform_deps.h" + +void platform_setup(void) { + // do nothing +} diff --git a/tmk_core/common/chibios/_timer.h b/tmk_core/common/chibios/_timer.h new file mode 100644 index 000000000..77402b612 --- /dev/null +++ b/tmk_core/common/chibios/_timer.h @@ -0,0 +1,19 @@ +/* Copyright 2021 Simon Arlott + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +// The platform is 32-bit, so prefer 32-bit timers to avoid overflow +#define FAST_TIMER_T_SIZE 32 diff --git a/tmk_core/common/chibios/_wait.c b/tmk_core/common/chibios/_wait.c new file mode 100644 index 000000000..1fbea2dd5 --- /dev/null +++ b/tmk_core/common/chibios/_wait.c @@ -0,0 +1,89 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef __OPTIMIZE__ +# pragma message "Compiler optimizations disabled; wait_cpuclock() won't work as designed" +#endif + +#define CLOCK_DELAY_NOP8 "nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t" + +__attribute__((always_inline)) static inline void wait_cpuclock(unsigned int n) { /* n: 1..135 */ + /* The argument n must be a constant expression. + * That way, compiler optimization will remove unnecessary code. */ + if (n < 1) { + return; + } + if (n > 8) { + unsigned int n8 = n / 8; + n = n - n8 * 8; + switch (n8) { + case 16: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 15: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 14: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 13: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 12: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 11: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 10: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 9: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 8: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 7: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 6: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 5: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 4: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 3: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 2: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 1: + asm volatile(CLOCK_DELAY_NOP8::: "memory"); + case 0: + break; + } + } + switch (n) { + case 8: + asm volatile("nop" ::: "memory"); + case 7: + asm volatile("nop" ::: "memory"); + case 6: + asm volatile("nop" ::: "memory"); + case 5: + asm volatile("nop" ::: "memory"); + case 4: + asm volatile("nop" ::: "memory"); + case 3: + asm volatile("nop" ::: "memory"); + case 2: + asm volatile("nop" ::: "memory"); + case 1: + asm volatile("nop" ::: "memory"); + case 0: + break; + } +} diff --git a/tmk_core/common/chibios/_wait.h b/tmk_core/common/chibios/_wait.h index 5bface53e..b740afbd2 100644 --- a/tmk_core/common/chibios/_wait.h +++ b/tmk_core/common/chibios/_wait.h @@ -16,6 +16,7 @@ #pragma once #include +#include /* chThdSleepX of zero maps to infinite - so we map to a tiny delay to still yield */ #define wait_ms(ms) \ @@ -26,14 +27,23 @@ chThdSleepMicroseconds(1); \ } \ } while (0) -#define wait_us(us) \ - do { \ - if (us != 0) { \ - chThdSleepMicroseconds(us); \ - } else { \ - chThdSleepMicroseconds(1); \ - } \ - } while (0) + +#ifdef WAIT_US_TIMER +void wait_us(uint16_t duration); +#else +# define wait_us(us) \ + do { \ + if (us != 0) { \ + chThdSleepMicroseconds(us); \ + } else { \ + chThdSleepMicroseconds(1); \ + } \ + } while (0) +#endif + +#include "_wait.c" + +#define CPU_CLOCK STM32_SYSCLK /* For GPIOs on ARM-based MCUs, the input pins are sampled by the clock of the bus * to which the GPIO is connected. @@ -45,11 +55,8 @@ * If the GPIO_INPUT_PIN_DELAY macro is not defined, the following default values will be used. * (A fairly large value of 0.25 microseconds is set.) */ - -#include "wait.c" - #ifndef GPIO_INPUT_PIN_DELAY -# define GPIO_INPUT_PIN_DELAY (STM32_SYSCLK / 1000000L / 4) +# define GPIO_INPUT_PIN_DELAY (CPU_CLOCK / 1000000L / 4) #endif #define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY) diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c index 11f7abf43..f9514ee5f 100644 --- a/tmk_core/common/chibios/bootloader.c +++ b/tmk_core/common/chibios/bootloader.c @@ -95,7 +95,7 @@ void enter_bootloader_mode_if_requested(void) { } } -#elif defined(KL2x) || defined(K20x) || defined(MK66F18) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS +#elif defined(KL2x) || defined(K20x) || defined(MK66F18) || defined(MIMXRT1062) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS /* Kinetis */ # if defined(BOOTLOADER_KIIBOHD) @@ -103,7 +103,8 @@ void enter_bootloader_mode_if_requested(void) { # define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000 const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff"; __attribute__((weak)) void bootloader_jump(void) { - __builtin_memcpy((void *)VBAT, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic)); + void *volatile vbat = (void *)VBAT; + __builtin_memcpy(vbat, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic)); // request reset SCB->AIRCR = SCB_AIRCR_VECTKEY_WRITEMAGIC | SCB_AIRCR_SYSRESETREQ_Msk; } diff --git a/tmk_core/common/chibios/eeprom_stm32.c b/tmk_core/common/chibios/eeprom_stm32.c index ea5198972..5bf852fde 100644 --- a/tmk_core/common/chibios/eeprom_stm32.c +++ b/tmk_core/common/chibios/eeprom_stm32.c @@ -14,185 +14,751 @@ * Artur F. * * Modifications for QMK and STM32F303 by Yiancar + * Modifications to add flash wear leveling by Ilya Zhuravlev + * Modifications to increase flash density by Don Kjer */ #include -#include +#include +#include "debug.h" #include "eeprom_stm32.h" -/***************************************************************************** - * Allows to use the internal flash to store non volatile data. To initialize - * the functionality use the EEPROM_Init() function. Be sure that by reprogramming - * of the controller just affected pages will be deleted. In other case the non - * volatile data will be lost. - ******************************************************************************/ +#include "flash_stm32.h" -/* Private macro -------------------------------------------------------------*/ -/* Private variables ---------------------------------------------------------*/ -/* Functions -----------------------------------------------------------------*/ +/* + * We emulate eeprom by writing a snapshot compacted view of eeprom contents, + * followed by a write log of any change since that snapshot: + * + * === SIMULATED EEPROM CONTENTS === + * + * ┌─ Compacted ┬ Write Log ─┐ + * │............│[BYTE][BYTE]│ + * │FFFF....FFFF│[WRD0][WRD1]│ + * │FFFFFFFFFFFF│[WORD][NEXT]│ + * │....FFFFFFFF│[BYTE][WRD0]│ + * ├────────────┼────────────┤ + * └──PAGE_BASE │ │ + * PAGE_LAST─┴─WRITE_BASE │ + * WRITE_LAST ┘ + * + * Compacted contents are the 1's complement of the actual EEPROM contents. + * e.g. An 'FFFF' represents a '0000' value. + * + * The size of the 'compacted' area is equal to the size of the 'emulated' eeprom. + * The size of the compacted-area and write log are configurable, and the combined + * size of Compacted + WriteLog is a multiple FEE_PAGE_SIZE, which is MCU dependent. + * Simulated Eeprom contents are located at the end of available flash space. + * + * The following configuration defines can be set: + * + * FEE_DENSITY_PAGES # Total number of pages to use for eeprom simulation (Compact + Write log) + * FEE_DENSITY_BYTES # Size of simulated eeprom. (Defaults to half the space allocated by FEE_DENSITY_PAGES) + * NOTE: The current implementation does not include page swapping, + * and FEE_DENSITY_BYTES will consume that amount of RAM as a cached view of actual EEPROM contents. + * + * The maximum size of FEE_DENSITY_BYTES is currently 16384. The write log size equals + * FEE_DENSITY_PAGES * FEE_PAGE_SIZE - FEE_DENSITY_BYTES. + * The larger the write log, the less frequently the compacted area needs to be rewritten. + * + * + * *** General Algorithm *** + * + * During initialization: + * The contents of the Compacted-flash area are loaded and the 1's complement value + * is cached into memory (e.g. 0xFFFF in Flash represents 0x0000 in cache). + * Write log entries are processed until a 0xFFFF is reached. + * Each log entry updates a byte or word in the cache. + * + * During reads: + * EEPROM contents are given back directly from the cache in memory. + * + * During writes: + * The contents of the cache is updated first. + * If the Compacted-flash area corresponding to the write address is unprogrammed, the 1's complement of the value is written directly into Compacted-flash + * Otherwise: + * If the write log is full, erase both the Compacted-flash area and the Write log, then write cached contents to the Compacted-flash area. + * Otherwise a Write log entry is constructed and appended to the next free position in the Write log. + * + * + * *** Write Log Structure *** + * + * Write log entries allow for optimized byte writes to addresses below 128. Writing 0 or 1 words are also optimized when word-aligned. + * + * === WRITE LOG ENTRY FORMATS === + * + * ╔═══ Byte-Entry ══╗ + * ║0XXXXXXX║YYYYYYYY║ + * ║ └──┬──┘║└──┬───┘║ + * ║ Address║ Value ║ + * ╚════════╩════════╝ + * 0 <= Address < 0x80 (128) + * + * ╔ Word-Encoded 0 ╗ + * ║100XXXXXXXXXXXXX║ + * ║ │└─────┬─────┘║ + * ║ │Address >> 1 ║ + * ║ └── Value: 0 ║ + * ╚════════════════╝ + * 0 <= Address <= 0x3FFE (16382) + * + * ╔ Word-Encoded 1 ╗ + * ║101XXXXXXXXXXXXX║ + * ║ │└─────┬─────┘║ + * ║ │Address >> 1 ║ + * ║ └── Value: 1 ║ + * ╚════════════════╝ + * 0 <= Address <= 0x3FFE (16382) + * + * ╔═══ Reserved ═══╗ + * ║110XXXXXXXXXXXXX║ + * ╚════════════════╝ + * + * ╔═══════════ Word-Next ═══════════╗ + * ║111XXXXXXXXXXXXX║YYYYYYYYYYYYYYYY║ + * ║ └─────┬─────┘║└───────┬──────┘║ + * ║(Address-128)>>1║ ~Value ║ + * ╚════════════════╩════════════════╝ + * ( 0 <= Address < 0x0080 (128): Reserved) + * 0x80 <= Address <= 0x3FFE (16382) + * + * Write Log entry ranges: + * 0x0000 ... 0x7FFF - Byte-Entry; address is (Entry & 0x7F00) >> 4; value is (Entry & 0xFF) + * 0x8000 ... 0x9FFF - Word-Encoded 0; address is (Entry & 0x1FFF) << 1; value is 0 + * 0xA000 ... 0xBFFF - Word-Encoded 1; address is (Entry & 0x1FFF) << 1; value is 1 + * 0xC000 ... 0xDFFF - Reserved + * 0xE000 ... 0xFFBF - Word-Next; address is (Entry & 0x1FFF) << 1 + 0x80; value is ~(Next_Entry) + * 0xFFC0 ... 0xFFFE - Reserved + * 0xFFFF - Unprogrammed + * + */ + +/* These bits are used for optimizing encoding of bytes, 0 and 1 */ +#define FEE_WORD_ENCODING 0x8000 +#define FEE_VALUE_NEXT 0x6000 +#define FEE_VALUE_RESERVED 0x4000 +#define FEE_VALUE_ENCODED 0x2000 +#define FEE_BYTE_RANGE 0x80 + +// HACK ALERT. This definition may not match your processor +// To Do. Work out correct value for EEPROM_PAGE_SIZE on the STM32F103CT6 etc +#if defined(EEPROM_EMU_STM32F303xC) +# define MCU_STM32F303CC +#elif defined(EEPROM_EMU_STM32F103xB) +# define MCU_STM32F103RB +#elif defined(EEPROM_EMU_STM32F072xB) +# define MCU_STM32F072CB +#elif defined(EEPROM_EMU_STM32F042x6) +# define MCU_STM32F042K6 +#elif !defined(FEE_PAGE_SIZE) || !defined(FEE_DENSITY_PAGES) || !defined(FEE_MCU_FLASH_SIZE) +# error "not implemented." +#endif + +#if !defined(FEE_PAGE_SIZE) || !defined(FEE_DENSITY_PAGES) +# if defined(MCU_STM32F103RB) || defined(MCU_STM32F042K6) +# ifndef FEE_PAGE_SIZE +# define FEE_PAGE_SIZE 0x400 // Page size = 1KByte +# endif +# ifndef FEE_DENSITY_PAGES +# define FEE_DENSITY_PAGES 2 // How many pages are used +# endif +# elif defined(MCU_STM32F103ZE) || defined(MCU_STM32F103RE) || defined(MCU_STM32F103RD) || defined(MCU_STM32F303CC) || defined(MCU_STM32F072CB) +# ifndef FEE_PAGE_SIZE +# define FEE_PAGE_SIZE 0x800 // Page size = 2KByte +# endif +# ifndef FEE_DENSITY_PAGES +# define FEE_DENSITY_PAGES 4 // How many pages are used +# endif +# else +# error "No MCU type specified. Add something like -DMCU_STM32F103RB to your compiler arguments (probably in a Makefile)." +# endif +#endif + +#ifndef FEE_MCU_FLASH_SIZE +# if defined(MCU_STM32F103RB) || defined(MCU_STM32F072CB) +# define FEE_MCU_FLASH_SIZE 128 // Size in Kb +# elif defined(MCU_STM32F042K6) +# define FEE_MCU_FLASH_SIZE 32 // Size in Kb +# elif defined(MCU_STM32F103ZE) || defined(MCU_STM32F103RE) +# define FEE_MCU_FLASH_SIZE 512 // Size in Kb +# elif defined(MCU_STM32F103RD) +# define FEE_MCU_FLASH_SIZE 384 // Size in Kb +# elif defined(MCU_STM32F303CC) +# define FEE_MCU_FLASH_SIZE 256 // Size in Kb +# else +# error "No MCU type specified. Add something like -DMCU_STM32F103RB to your compiler arguments (probably in a Makefile)." +# endif +#endif + +#define FEE_XSTR(x) FEE_STR(x) +#define FEE_STR(x) #x + +/* Size of combined compacted eeprom and write log pages */ +#define FEE_DENSITY_MAX_SIZE (FEE_DENSITY_PAGES * FEE_PAGE_SIZE) +/* Addressable range 16KByte: 0 <-> (0x1FFF << 1) */ +#define FEE_ADDRESS_MAX_SIZE 0x4000 + +#ifndef EEPROM_START_ADDRESS /* *TODO: Get rid of this check */ +# if FEE_DENSITY_MAX_SIZE > (FEE_MCU_FLASH_SIZE * 1024) +# pragma message FEE_XSTR(FEE_DENSITY_MAX_SIZE) " > " FEE_XSTR(FEE_MCU_FLASH_SIZE * 1024) +# error emulated eeprom: FEE_DENSITY_PAGES is greater than available flash size +# endif +#endif + +/* Size of emulated eeprom */ +#ifdef FEE_DENSITY_BYTES +# if (FEE_DENSITY_BYTES > FEE_DENSITY_MAX_SIZE) +# pragma message FEE_XSTR(FEE_DENSITY_BYTES) " > " FEE_XSTR(FEE_DENSITY_MAX_SIZE) +# error emulated eeprom: FEE_DENSITY_BYTES exceeds FEE_DENSITY_MAX_SIZE +# endif +# if (FEE_DENSITY_BYTES == FEE_DENSITY_MAX_SIZE) +# pragma message FEE_XSTR(FEE_DENSITY_BYTES) " == " FEE_XSTR(FEE_DENSITY_MAX_SIZE) +# warning emulated eeprom: FEE_DENSITY_BYTES leaves no room for a write log. This will greatly increase the flash wear rate! +# endif +# if FEE_DENSITY_BYTES > FEE_ADDRESS_MAX_SIZE +# pragma message FEE_XSTR(FEE_DENSITY_BYTES) " > " FEE_XSTR(FEE_ADDRESS_MAX_SIZE) +# error emulated eeprom: FEE_DENSITY_BYTES is greater than FEE_ADDRESS_MAX_SIZE allows +# endif +# if ((FEE_DENSITY_BYTES) % 2) == 1 +# error emulated eeprom: FEE_DENSITY_BYTES must be even +# endif +#else +/* Default to half of allocated space used for emulated eeprom, half for write log */ +# define FEE_DENSITY_BYTES (FEE_DENSITY_PAGES * FEE_PAGE_SIZE / 2) +#endif + +/* Size of write log */ +#define FEE_WRITE_LOG_BYTES (FEE_DENSITY_PAGES * FEE_PAGE_SIZE - FEE_DENSITY_BYTES) + +/* Start of the emulated eeprom compacted flash area */ +#ifndef FEE_FLASH_BASE +# define FEE_FLASH_BASE 0x8000000 +#endif +#define FEE_PAGE_BASE_ADDRESS ((uintptr_t)(FEE_FLASH_BASE) + FEE_MCU_FLASH_SIZE * 1024 - FEE_WRITE_LOG_BYTES - FEE_DENSITY_BYTES) +/* End of the emulated eeprom compacted flash area */ +#define FEE_PAGE_LAST_ADDRESS (FEE_PAGE_BASE_ADDRESS + FEE_DENSITY_BYTES) +/* Start of the emulated eeprom write log */ +#define FEE_WRITE_LOG_BASE_ADDRESS FEE_PAGE_LAST_ADDRESS +/* End of the emulated eeprom write log */ +#define FEE_WRITE_LOG_LAST_ADDRESS (FEE_WRITE_LOG_BASE_ADDRESS + FEE_WRITE_LOG_BYTES) + +/* Flash word value after erase */ +#define FEE_EMPTY_WORD ((uint16_t)0xFFFF) + +#if defined(DYNAMIC_KEYMAP_EEPROM_MAX_ADDR) && (DYNAMIC_KEYMAP_EEPROM_MAX_ADDR >= FEE_DENSITY_BYTES) +# error emulated eeprom: DYNAMIC_KEYMAP_EEPROM_MAX_ADDR is greater than the FEE_DENSITY_BYTES available +#endif + +/* In-memory contents of emulated eeprom for faster access */ +/* *TODO: Implement page swapping */ +static uint16_t WordBuf[FEE_DENSITY_BYTES / 2]; +static uint8_t *DataBuf = (uint8_t *)WordBuf; + +/* Pointer to the first available slot within the write log */ +static uint16_t *empty_slot; + +// #define DEBUG_EEPROM_OUTPUT + +/* + * Debug print utils + */ + +#if defined(DEBUG_EEPROM_OUTPUT) + +# define debug_eeprom debug_enable +# define eeprom_println(s) println(s) +# define eeprom_printf(fmt, ...) xprintf(fmt, ##__VA_ARGS__); + +#else /* NO_DEBUG */ + +# define debug_eeprom false +# define eeprom_println(s) +# define eeprom_printf(fmt, ...) + +#endif /* NO_DEBUG */ + +void print_eeprom(void) { +#ifndef NO_DEBUG + int empty_rows = 0; + for (uint16_t i = 0; i < FEE_DENSITY_BYTES; i++) { + if (i % 16 == 0) { + if (i >= FEE_DENSITY_BYTES - 16) { + /* Make sure we display the last row */ + empty_rows = 0; + } + /* Check if this row is uninitialized */ + ++empty_rows; + for (uint16_t j = 0; j < 16; j++) { + if (DataBuf[i + j]) { + empty_rows = 0; + break; + } + } + if (empty_rows > 1) { + /* Repeat empty row */ + if (empty_rows == 2) { + /* Only display the first repeat empty row */ + println("*"); + } + i += 15; + continue; + } + xprintf("%04x", i); + } + if (i % 8 == 0) print(" "); + + xprintf(" %02x", DataBuf[i]); + if ((i + 1) % 16 == 0) { + println(""); + } + } +#endif +} -uint8_t DataBuf[FEE_PAGE_SIZE]; -/***************************************************************************** - * Delete Flash Space used for user Data, deletes the whole space between - * RW_PAGE_BASE_ADDRESS and the last uC Flash Page - ******************************************************************************/ uint16_t EEPROM_Init(void) { - // unlock flash - FLASH_Unlock(); - - // Clear Flags - // FLASH_ClearFlag(FLASH_SR_EOP|FLASH_SR_PGERR|FLASH_SR_WRPERR); - - return FEE_DENSITY_BYTES; -} -/***************************************************************************** - * Erase the whole reserved Flash Space used for user Data - ******************************************************************************/ -void EEPROM_Erase(void) { - int page_num = 0; - - // delete all pages from specified start page to the last page - do { - FLASH_ErasePage(FEE_PAGE_BASE_ADDRESS + (page_num * FEE_PAGE_SIZE)); - page_num++; - } while (page_num < FEE_DENSITY_PAGES); -} -/***************************************************************************** - * Writes once data byte to flash on specified address. If a byte is already - * written, the whole page must be copied to a buffer, the byte changed and - * the manipulated buffer written after PageErase. - *******************************************************************************/ -uint16_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte) { - FLASH_Status FlashStatus = FLASH_COMPLETE; - - uint32_t page; - int i; - - // exit if desired address is above the limit (e.G. under 2048 Bytes for 4 pages) - if (Address > FEE_DENSITY_BYTES) { - return 0; + /* Load emulated eeprom contents from compacted flash into memory */ + uint16_t *src = (uint16_t *)FEE_PAGE_BASE_ADDRESS; + uint16_t *dest = (uint16_t *)DataBuf; + for (; src < (uint16_t *)FEE_PAGE_LAST_ADDRESS; ++src, ++dest) { + *dest = ~*src; } - // calculate which page is affected (Pagenum1/Pagenum2...PagenumN) - page = FEE_ADDR_OFFSET(Address) / FEE_PAGE_SIZE; + if (debug_eeprom) { + println("EEPROM_Init Compacted Pages:"); + print_eeprom(); + println("EEPROM_Init Write Log:"); + } - // if current data is 0xFF, the byte is empty, just overwrite with the new one - if ((*(__IO uint16_t *)(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address))) == FEE_EMPTY_WORD) { - FlashStatus = FLASH_ProgramHalfWord(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address), (uint16_t)(0x00FF & DataByte)); - } else { - // Copy Page to a buffer - memcpy(DataBuf, (uint8_t *)FEE_PAGE_BASE_ADDRESS + (page * FEE_PAGE_SIZE), FEE_PAGE_SIZE); // !!! Calculate base address for the desired page - - // check if new data is differ to current data, return if not, proceed if yes - if (DataByte == *(__IO uint8_t *)(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address))) { - return 0; + /* Replay write log */ + uint16_t *log_addr; + for (log_addr = (uint16_t *)FEE_WRITE_LOG_BASE_ADDRESS; log_addr < (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS; ++log_addr) { + uint16_t address = *log_addr; + if (address == FEE_EMPTY_WORD) { + break; } - - // manipulate desired data byte in temp data array if new byte is differ to the current - DataBuf[FEE_ADDR_OFFSET(Address) % FEE_PAGE_SIZE] = DataByte; - - // Erase Page - FlashStatus = FLASH_ErasePage(FEE_PAGE_BASE_ADDRESS + (page * FEE_PAGE_SIZE)); - - // Write new data (whole page) to flash if data has been changed - for (i = 0; i < (FEE_PAGE_SIZE / 2); i++) { - if ((__IO uint16_t)(0xFF00 | DataBuf[FEE_ADDR_OFFSET(i)]) != 0xFFFF) { - FlashStatus = FLASH_ProgramHalfWord((FEE_PAGE_BASE_ADDRESS + (page * FEE_PAGE_SIZE)) + (i * 2), (uint16_t)(0xFF00 | DataBuf[FEE_ADDR_OFFSET(i)])); + /* Check for lowest 128-bytes optimization */ + if (!(address & FEE_WORD_ENCODING)) { + uint8_t bvalue = (uint8_t)address; + address >>= 8; + DataBuf[address] = bvalue; + eeprom_printf("DataBuf[0x%02x] = 0x%02x;\n", address, bvalue); + } else { + uint16_t wvalue; + /* Check if value is in next word */ + if ((address & FEE_VALUE_NEXT) == FEE_VALUE_NEXT) { + /* Read value from next word */ + if (++log_addr >= (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS) { + break; + } + wvalue = ~*log_addr; + if (!wvalue) { + eeprom_printf("Incomplete write at log_addr: 0x%04x;\n", (uint32_t)log_addr); + /* Possibly incomplete write. Ignore and continue */ + continue; + } + address &= 0x1FFF; + address <<= 1; + /* Writes to addresses less than 128 are byte log entries */ + address += FEE_BYTE_RANGE; + } else { + /* Reserved for future use */ + if (address & FEE_VALUE_RESERVED) { + eeprom_printf("Reserved encoded value at log_addr: 0x%04x;\n", (uint32_t)log_addr); + continue; + } + /* Optimization for 0 or 1 values. */ + wvalue = (address & FEE_VALUE_ENCODED) >> 13; + address &= 0x1FFF; + address <<= 1; + } + if (address < FEE_DENSITY_BYTES) { + eeprom_printf("DataBuf[0x%04x] = 0x%04x;\n", address, wvalue); + *(uint16_t *)(&DataBuf[address]) = wvalue; + } else { + eeprom_printf("DataBuf[0x%04x] cannot be set to 0x%04x [BAD ADDRESS]\n", address, wvalue); } } } - return FlashStatus; + + empty_slot = log_addr; + + if (debug_eeprom) { + println("EEPROM_Init Final DataBuf:"); + print_eeprom(); + } + + return FEE_DENSITY_BYTES; } -/***************************************************************************** - * Read once data byte from a specified address. - *******************************************************************************/ + +/* Clear flash contents (doesn't touch in-memory DataBuf) */ +static void eeprom_clear(void) { + FLASH_Unlock(); + + for (uint16_t page_num = 0; page_num < FEE_DENSITY_PAGES; ++page_num) { + eeprom_printf("FLASH_ErasePage(0x%04x)\n", (uint32_t)(FEE_PAGE_BASE_ADDRESS + (page_num * FEE_PAGE_SIZE))); + FLASH_ErasePage(FEE_PAGE_BASE_ADDRESS + (page_num * FEE_PAGE_SIZE)); + } + + FLASH_Lock(); + + empty_slot = (uint16_t *)FEE_WRITE_LOG_BASE_ADDRESS; + eeprom_printf("eeprom_clear empty_slot: 0x%08x\n", (uint32_t)empty_slot); +} + +/* Erase emulated eeprom */ +void EEPROM_Erase(void) { + eeprom_println("EEPROM_Erase"); + /* Erase compacted pages and write log */ + eeprom_clear(); + /* re-initialize to reset DataBuf */ + EEPROM_Init(); +} + +/* Compact write log */ +static uint8_t eeprom_compact(void) { + /* Erase compacted pages and write log */ + eeprom_clear(); + + FLASH_Unlock(); + + FLASH_Status final_status = FLASH_COMPLETE; + + /* Write emulated eeprom contents from memory to compacted flash */ + uint16_t *src = (uint16_t *)DataBuf; + uintptr_t dest = FEE_PAGE_BASE_ADDRESS; + uint16_t value; + for (; dest < FEE_PAGE_LAST_ADDRESS; ++src, dest += 2) { + value = *src; + if (value) { + eeprom_printf("FLASH_ProgramHalfWord(0x%04x, 0x%04x)\n", (uint32_t)dest, ~value); + FLASH_Status status = FLASH_ProgramHalfWord(dest, ~value); + if (status != FLASH_COMPLETE) final_status = status; + } + } + + FLASH_Lock(); + + if (debug_eeprom) { + println("eeprom_compacted:"); + print_eeprom(); + } + + return final_status; +} + +static uint8_t eeprom_write_direct_entry(uint16_t Address) { + /* Check if we can just write this directly to the compacted flash area */ + uintptr_t directAddress = FEE_PAGE_BASE_ADDRESS + (Address & 0xFFFE); + if (*(uint16_t *)directAddress == FEE_EMPTY_WORD) { + /* Write the value directly to the compacted area without a log entry */ + uint16_t value = ~*(uint16_t *)(&DataBuf[Address & 0xFFFE]); + /* Early exit if a write isn't needed */ + if (value == FEE_EMPTY_WORD) return FLASH_COMPLETE; + + FLASH_Unlock(); + + eeprom_printf("FLASH_ProgramHalfWord(0x%08x, 0x%04x) [DIRECT]\n", (uint32_t)directAddress, value); + FLASH_Status status = FLASH_ProgramHalfWord(directAddress, value); + + FLASH_Lock(); + return status; + } + return 0; +} + +static uint8_t eeprom_write_log_word_entry(uint16_t Address) { + FLASH_Status final_status = FLASH_COMPLETE; + + uint16_t value = *(uint16_t *)(&DataBuf[Address]); + eeprom_printf("eeprom_write_log_word_entry(0x%04x): 0x%04x\n", Address, value); + + /* MSB signifies the lowest 128-byte optimization is not in effect */ + uint16_t encoding = FEE_WORD_ENCODING; + uint8_t entry_size; + if (value <= 1) { + encoding |= value << 13; + entry_size = 2; + } else { + encoding |= FEE_VALUE_NEXT; + entry_size = 4; + /* Writes to addresses less than 128 are byte log entries */ + Address -= FEE_BYTE_RANGE; + } + + /* if we can't find an empty spot, we must compact emulated eeprom */ + if (empty_slot > (uint16_t *)(FEE_WRITE_LOG_LAST_ADDRESS - entry_size)) { + /* compact the write log into the compacted flash area */ + return eeprom_compact(); + } + + /* Word log writes should be word-aligned. Take back a bit */ + Address >>= 1; + Address |= encoding; + + /* ok we found a place let's write our data */ + FLASH_Unlock(); + + /* address */ + eeprom_printf("FLASH_ProgramHalfWord(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, Address); + final_status = FLASH_ProgramHalfWord((uintptr_t)empty_slot++, Address); + + /* value */ + if (encoding == (FEE_WORD_ENCODING | FEE_VALUE_NEXT)) { + eeprom_printf("FLASH_ProgramHalfWord(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, ~value); + FLASH_Status status = FLASH_ProgramHalfWord((uintptr_t)empty_slot++, ~value); + if (status != FLASH_COMPLETE) final_status = status; + } + + FLASH_Lock(); + + return final_status; +} + +static uint8_t eeprom_write_log_byte_entry(uint16_t Address) { + eeprom_printf("eeprom_write_log_byte_entry(0x%04x): 0x%02x\n", Address, DataBuf[Address]); + + /* if couldn't find an empty spot, we must compact emulated eeprom */ + if (empty_slot >= (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS) { + /* compact the write log into the compacted flash area */ + return eeprom_compact(); + } + + /* ok we found a place let's write our data */ + FLASH_Unlock(); + + /* Pack address and value into the same word */ + uint16_t value = (Address << 8) | DataBuf[Address]; + + /* write to flash */ + eeprom_printf("FLASH_ProgramHalfWord(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, value); + FLASH_Status status = FLASH_ProgramHalfWord((uintptr_t)empty_slot++, value); + + FLASH_Lock(); + + return status; +} + +uint8_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte) { + /* if the address is out-of-bounds, do nothing */ + if (Address >= FEE_DENSITY_BYTES) { + eeprom_printf("EEPROM_WriteDataByte(0x%04x, 0x%02x) [BAD ADDRESS]\n", Address, DataByte); + return FLASH_BAD_ADDRESS; + } + + /* if the value is the same, don't bother writing it */ + if (DataBuf[Address] == DataByte) { + eeprom_printf("EEPROM_WriteDataByte(0x%04x, 0x%02x) [SKIP SAME]\n", Address, DataByte); + return 0; + } + + /* keep DataBuf cache in sync */ + DataBuf[Address] = DataByte; + eeprom_printf("EEPROM_WriteDataByte DataBuf[0x%04x] = 0x%02x\n", Address, DataBuf[Address]); + + /* perform the write into flash memory */ + /* First, attempt to write directly into the compacted flash area */ + FLASH_Status status = eeprom_write_direct_entry(Address); + if (!status) { + /* Otherwise append to the write log */ + if (Address < FEE_BYTE_RANGE) { + status = eeprom_write_log_byte_entry(Address); + } else { + status = eeprom_write_log_word_entry(Address & 0xFFFE); + } + } + if (status != 0 && status != FLASH_COMPLETE) { + eeprom_printf("EEPROM_WriteDataByte [STATUS == %d]\n", status); + } + return status; +} + +uint8_t EEPROM_WriteDataWord(uint16_t Address, uint16_t DataWord) { + /* if the address is out-of-bounds, do nothing */ + if (Address >= FEE_DENSITY_BYTES) { + eeprom_printf("EEPROM_WriteDataWord(0x%04x, 0x%04x) [BAD ADDRESS]\n", Address, DataWord); + return FLASH_BAD_ADDRESS; + } + + /* Check for word alignment */ + FLASH_Status final_status = FLASH_COMPLETE; + if (Address % 2) { + final_status = EEPROM_WriteDataByte(Address, DataWord); + FLASH_Status status = EEPROM_WriteDataByte(Address + 1, DataWord >> 8); + if (status != FLASH_COMPLETE) final_status = status; + if (final_status != 0 && final_status != FLASH_COMPLETE) { + eeprom_printf("EEPROM_WriteDataWord [STATUS == %d]\n", final_status); + } + return final_status; + } + + /* if the value is the same, don't bother writing it */ + uint16_t oldValue = *(uint16_t *)(&DataBuf[Address]); + if (oldValue == DataWord) { + eeprom_printf("EEPROM_WriteDataWord(0x%04x, 0x%04x) [SKIP SAME]\n", Address, DataWord); + return 0; + } + + /* keep DataBuf cache in sync */ + *(uint16_t *)(&DataBuf[Address]) = DataWord; + eeprom_printf("EEPROM_WriteDataWord DataBuf[0x%04x] = 0x%04x\n", Address, *(uint16_t *)(&DataBuf[Address])); + + /* perform the write into flash memory */ + /* First, attempt to write directly into the compacted flash area */ + final_status = eeprom_write_direct_entry(Address); + if (!final_status) { + /* Otherwise append to the write log */ + /* Check if we need to fall back to byte write */ + if (Address < FEE_BYTE_RANGE) { + final_status = FLASH_COMPLETE; + /* Only write a byte if it has changed */ + if ((uint8_t)oldValue != (uint8_t)DataWord) { + final_status = eeprom_write_log_byte_entry(Address); + } + FLASH_Status status = FLASH_COMPLETE; + /* Only write a byte if it has changed */ + if ((oldValue >> 8) != (DataWord >> 8)) { + status = eeprom_write_log_byte_entry(Address + 1); + } + if (status != FLASH_COMPLETE) final_status = status; + } else { + final_status = eeprom_write_log_word_entry(Address); + } + } + if (final_status != 0 && final_status != FLASH_COMPLETE) { + eeprom_printf("EEPROM_WriteDataWord [STATUS == %d]\n", final_status); + } + return final_status; +} + uint8_t EEPROM_ReadDataByte(uint16_t Address) { uint8_t DataByte = 0xFF; - // Get Byte from specified address - DataByte = (*(__IO uint8_t *)(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address))); + if (Address < FEE_DENSITY_BYTES) { + DataByte = DataBuf[Address]; + } + + eeprom_printf("EEPROM_ReadDataByte(0x%04x): 0x%02x\n", Address, DataByte); return DataByte; } +uint16_t EEPROM_ReadDataWord(uint16_t Address) { + uint16_t DataWord = 0xFFFF; + + if (Address < FEE_DENSITY_BYTES - 1) { + /* Check word alignment */ + if (Address % 2) { + DataWord = DataBuf[Address] | (DataBuf[Address + 1] << 8); + } else { + DataWord = *(uint16_t *)(&DataBuf[Address]); + } + } + + eeprom_printf("EEPROM_ReadDataWord(0x%04x): 0x%04x\n", Address, DataWord); + + return DataWord; +} + /***************************************************************************** * Wrap library in AVR style functions. *******************************************************************************/ -uint8_t eeprom_read_byte(const uint8_t *Address) { - const uint16_t p = (const uint32_t)Address; - return EEPROM_ReadDataByte(p); -} +uint8_t eeprom_read_byte(const uint8_t *Address) { return EEPROM_ReadDataByte((const uintptr_t)Address); } -void eeprom_write_byte(uint8_t *Address, uint8_t Value) { - uint16_t p = (uint32_t)Address; - EEPROM_WriteDataByte(p, Value); -} +void eeprom_write_byte(uint8_t *Address, uint8_t Value) { EEPROM_WriteDataByte((uintptr_t)Address, Value); } -void eeprom_update_byte(uint8_t *Address, uint8_t Value) { - uint16_t p = (uint32_t)Address; - EEPROM_WriteDataByte(p, Value); -} +void eeprom_update_byte(uint8_t *Address, uint8_t Value) { EEPROM_WriteDataByte((uintptr_t)Address, Value); } -uint16_t eeprom_read_word(const uint16_t *Address) { - const uint16_t p = (const uint32_t)Address; - return EEPROM_ReadDataByte(p) | (EEPROM_ReadDataByte(p + 1) << 8); -} +uint16_t eeprom_read_word(const uint16_t *Address) { return EEPROM_ReadDataWord((const uintptr_t)Address); } -void eeprom_write_word(uint16_t *Address, uint16_t Value) { - uint16_t p = (uint32_t)Address; - EEPROM_WriteDataByte(p, (uint8_t)Value); - EEPROM_WriteDataByte(p + 1, (uint8_t)(Value >> 8)); -} +void eeprom_write_word(uint16_t *Address, uint16_t Value) { EEPROM_WriteDataWord((uintptr_t)Address, Value); } -void eeprom_update_word(uint16_t *Address, uint16_t Value) { - uint16_t p = (uint32_t)Address; - EEPROM_WriteDataByte(p, (uint8_t)Value); - EEPROM_WriteDataByte(p + 1, (uint8_t)(Value >> 8)); -} +void eeprom_update_word(uint16_t *Address, uint16_t Value) { EEPROM_WriteDataWord((uintptr_t)Address, Value); } uint32_t eeprom_read_dword(const uint32_t *Address) { - const uint16_t p = (const uint32_t)Address; - return EEPROM_ReadDataByte(p) | (EEPROM_ReadDataByte(p + 1) << 8) | (EEPROM_ReadDataByte(p + 2) << 16) | (EEPROM_ReadDataByte(p + 3) << 24); -} - -void eeprom_write_dword(uint32_t *Address, uint32_t Value) { - uint16_t p = (const uint32_t)Address; - EEPROM_WriteDataByte(p, (uint8_t)Value); - EEPROM_WriteDataByte(p + 1, (uint8_t)(Value >> 8)); - EEPROM_WriteDataByte(p + 2, (uint8_t)(Value >> 16)); - EEPROM_WriteDataByte(p + 3, (uint8_t)(Value >> 24)); -} - -void eeprom_update_dword(uint32_t *Address, uint32_t Value) { - uint16_t p = (const uint32_t)Address; - uint32_t existingValue = EEPROM_ReadDataByte(p) | (EEPROM_ReadDataByte(p + 1) << 8) | (EEPROM_ReadDataByte(p + 2) << 16) | (EEPROM_ReadDataByte(p + 3) << 24); - if (Value != existingValue) { - EEPROM_WriteDataByte(p, (uint8_t)Value); - EEPROM_WriteDataByte(p + 1, (uint8_t)(Value >> 8)); - EEPROM_WriteDataByte(p + 2, (uint8_t)(Value >> 16)); - EEPROM_WriteDataByte(p + 3, (uint8_t)(Value >> 24)); + const uint16_t p = (const uintptr_t)Address; + /* Check word alignment */ + if (p % 2) { + /* Not aligned */ + return (uint32_t)EEPROM_ReadDataByte(p) | (uint32_t)(EEPROM_ReadDataWord(p + 1) << 8) | (uint32_t)(EEPROM_ReadDataByte(p + 3) << 24); + } else { + /* Aligned */ + return EEPROM_ReadDataWord(p) | (EEPROM_ReadDataWord(p + 2) << 16); } } +void eeprom_write_dword(uint32_t *Address, uint32_t Value) { + uint16_t p = (const uintptr_t)Address; + /* Check word alignment */ + if (p % 2) { + /* Not aligned */ + EEPROM_WriteDataByte(p, (uint8_t)Value); + EEPROM_WriteDataWord(p + 1, (uint16_t)(Value >> 8)); + EEPROM_WriteDataByte(p + 3, (uint8_t)(Value >> 24)); + } else { + /* Aligned */ + EEPROM_WriteDataWord(p, (uint16_t)Value); + EEPROM_WriteDataWord(p + 2, (uint16_t)(Value >> 16)); + } +} + +void eeprom_update_dword(uint32_t *Address, uint32_t Value) { eeprom_write_dword(Address, Value); } + void eeprom_read_block(void *buf, const void *addr, size_t len) { - const uint8_t *p = (const uint8_t *)addr; + const uint8_t *src = (const uint8_t *)addr; uint8_t * dest = (uint8_t *)buf; - while (len--) { - *dest++ = eeprom_read_byte(p++); + + /* Check word alignment */ + if (len && (uintptr_t)src % 2) { + /* Read the unaligned first byte */ + *dest++ = eeprom_read_byte(src++); + --len; + } + + uint16_t value; + bool aligned = ((uintptr_t)dest % 2 == 0); + while (len > 1) { + value = eeprom_read_word((uint16_t *)src); + if (aligned) { + *(uint16_t *)dest = value; + dest += 2; + } else { + *dest++ = value; + *dest++ = value >> 8; + } + src += 2; + len -= 2; + } + if (len) { + *dest = eeprom_read_byte(src); } } void eeprom_write_block(const void *buf, void *addr, size_t len) { - uint8_t * p = (uint8_t *)addr; - const uint8_t *src = (const uint8_t *)buf; - while (len--) { - eeprom_write_byte(p++, *src++); + uint8_t * dest = (uint8_t *)addr; + const uint8_t *src = (const uint8_t *)buf; + + /* Check word alignment */ + if (len && (uintptr_t)dest % 2) { + /* Write the unaligned first byte */ + eeprom_write_byte(dest++, *src++); + --len; + } + + uint16_t value; + bool aligned = ((uintptr_t)src % 2 == 0); + while (len > 1) { + if (aligned) { + value = *(uint16_t *)src; + } else { + value = *(uint8_t *)src | (*(uint8_t *)(src + 1) << 8); + } + eeprom_write_word((uint16_t *)dest, value); + dest += 2; + src += 2; + len -= 2; + } + + if (len) { + eeprom_write_byte(dest, *src); } } -void eeprom_update_block(const void *buf, void *addr, size_t len) { - uint8_t * p = (uint8_t *)addr; - const uint8_t *src = (const uint8_t *)buf; - while (len--) { - eeprom_write_byte(p++, *src++); - } -} +void eeprom_update_block(const void *buf, void *addr, size_t len) { eeprom_write_block(buf, addr, len); } diff --git a/tmk_core/common/chibios/eeprom_stm32.h b/tmk_core/common/chibios/eeprom_stm32.h index 4dac7c1b5..8fcfb556b 100644 --- a/tmk_core/common/chibios/eeprom_stm32.h +++ b/tmk_core/common/chibios/eeprom_stm32.h @@ -23,62 +23,11 @@ #pragma once -#include -#include -#include "flash_stm32.h" - -// HACK ALERT. This definition may not match your processor -// To Do. Work out correct value for EEPROM_PAGE_SIZE on the STM32F103CT6 etc -#if defined(EEPROM_EMU_STM32F303xC) -# define MCU_STM32F303CC -#elif defined(EEPROM_EMU_STM32F103xB) -# define MCU_STM32F103RB -#elif defined(EEPROM_EMU_STM32F072xB) -# define MCU_STM32F072CB -#elif defined(EEPROM_EMU_STM32F042x6) -# define MCU_STM32F042K6 -#else -# error "not implemented." -#endif - -#ifndef EEPROM_PAGE_SIZE -# if defined(MCU_STM32F103RB) || defined(MCU_STM32F042K6) -# define FEE_PAGE_SIZE (uint16_t)0x400 // Page size = 1KByte -# define FEE_DENSITY_PAGES 2 // How many pages are used -# elif defined(MCU_STM32F103ZE) || defined(MCU_STM32F103RE) || defined(MCU_STM32F103RD) || defined(MCU_STM32F303CC) || defined(MCU_STM32F072CB) -# define FEE_PAGE_SIZE (uint16_t)0x800 // Page size = 2KByte -# define FEE_DENSITY_PAGES 4 // How many pages are used -# else -# error "No MCU type specified. Add something like -DMCU_STM32F103RB to your compiler arguments (probably in a Makefile)." -# endif -#endif - -#ifndef EEPROM_START_ADDRESS -# if defined(MCU_STM32F103RB) || defined(MCU_STM32F072CB) -# define FEE_MCU_FLASH_SIZE 128 // Size in Kb -# elif defined(MCU_STM32F042K6) -# define FEE_MCU_FLASH_SIZE 32 // Size in Kb -# elif defined(MCU_STM32F103ZE) || defined(MCU_STM32F103RE) -# define FEE_MCU_FLASH_SIZE 512 // Size in Kb -# elif defined(MCU_STM32F103RD) -# define FEE_MCU_FLASH_SIZE 384 // Size in Kb -# elif defined(MCU_STM32F303CC) -# define FEE_MCU_FLASH_SIZE 256 // Size in Kb -# else -# error "No MCU type specified. Add something like -DMCU_STM32F103RB to your compiler arguments (probably in a Makefile)." -# endif -#endif - -// DONT CHANGE -// Choose location for the first EEPROM Page address on the top of flash -#define FEE_PAGE_BASE_ADDRESS ((uint32_t)(0x8000000 + FEE_MCU_FLASH_SIZE * 1024 - FEE_DENSITY_PAGES * FEE_PAGE_SIZE)) -#define FEE_DENSITY_BYTES ((FEE_PAGE_SIZE / 2) * FEE_DENSITY_PAGES - 1) -#define FEE_LAST_PAGE_ADDRESS (FEE_PAGE_BASE_ADDRESS + (FEE_PAGE_SIZE * FEE_DENSITY_PAGES)) -#define FEE_EMPTY_WORD ((uint16_t)0xFFFF) -#define FEE_ADDR_OFFSET(Address) (Address * 2) // 1Byte per Word will be saved to preserve Flash - -// Use this function to initialize the functionality uint16_t EEPROM_Init(void); void EEPROM_Erase(void); -uint16_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte); +uint8_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte); +uint8_t EEPROM_WriteDataWord(uint16_t Address, uint16_t DataWord); uint8_t EEPROM_ReadDataByte(uint16_t Address); +uint16_t EEPROM_ReadDataWord(uint16_t Address); + +void print_eeprom(void); diff --git a/tmk_core/common/chibios/flash_stm32.h b/tmk_core/common/chibios/flash_stm32.h index 90d5bff47..9c6a7cc50 100644 --- a/tmk_core/common/chibios/flash_stm32.h +++ b/tmk_core/common/chibios/flash_stm32.h @@ -22,8 +22,11 @@ extern "C" { #endif -#include -#include +#include + +#ifdef FLASH_STM32_MOCKED +extern uint8_t FlashBuf[MOCK_FLASH_SIZE]; +#endif typedef enum { FLASH_BUSY = 1, FLASH_ERROR_PG, FLASH_ERROR_WRP, FLASH_ERROR_OPT, FLASH_COMPLETE, FLASH_TIMEOUT, FLASH_BAD_ADDRESS } FLASH_Status; diff --git a/tmk_core/common/chibios/gpio.h b/tmk_core/common/chibios/gpio.h index 5d0e142ab..4d057f1ca 100644 --- a/tmk_core/common/chibios/gpio.h +++ b/tmk_core/common/chibios/gpio.h @@ -20,6 +20,8 @@ typedef ioline_t pin_t; +/* Operation of GPIO by pin. */ + #define setPinInput(pin) palSetLineMode(pin, PAL_MODE_INPUT) #define setPinInputHigh(pin) palSetLineMode(pin, PAL_MODE_INPUT_PULLUP) #define setPinInputLow(pin) palSetLineMode(pin, PAL_MODE_INPUT_PULLDOWN) @@ -32,3 +34,17 @@ typedef ioline_t pin_t; #define readPin(pin) palReadLine(pin) #define togglePin(pin) palToggleLine(pin) + +/* Operation of GPIO by port. */ + +typedef uint16_t port_data_t; + +#define readPort(pin) palReadPort(PAL_PORT(pin)) + +#define setPortBitInput(pin, bit) palSetPadMode(PAL_PORT(pin), bit, PAL_MODE_INPUT) +#define setPortBitInputHigh(pin, bit) palSetPadMode(PAL_PORT(pin), bit, PAL_MODE_INPUT_PULLUP) +#define setPortBitInputLow(pin, bit) palSetPadMode(PAL_PORT(pin), bit, PAL_MODE_INPUT_PULLDOWN) +#define setPortBitOutput(pin, bit) palSetPadMode(PAL_PORT(pin), bit, PAL_MODE_OUTPUT_PUSHPULL) + +#define writePortBitLow(pin, bit) palClearLine(PAL_LINE(PAL_PORT(pin), bit)) +#define writePortBitHigh(pin, bit) palSetLine(PAL_LINE(PAL_PORT(pin), bit)) diff --git a/tmk_core/common/chibios/platform.c b/tmk_core/common/chibios/platform.c new file mode 100644 index 000000000..d4a229f27 --- /dev/null +++ b/tmk_core/common/chibios/platform.c @@ -0,0 +1,22 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "platform_deps.h" + +void platform_setup(void) { + halInit(); + chSysInit(); +} \ No newline at end of file diff --git a/tmk_core/common/chibios/wait.c b/tmk_core/common/chibios/wait.c index c6270fd95..56fd6ffce 100644 --- a/tmk_core/common/chibios/wait.c +++ b/tmk_core/common/chibios/wait.c @@ -14,76 +14,28 @@ * along with this program. If not, see . */ -#ifndef __OPTIMIZE__ -# pragma message "Compiler optimizations disabled; wait_cpuclock() won't work as designed" +#include +#include + +#include "_wait.h" + +#ifdef WAIT_US_TIMER +void wait_us(uint16_t duration) { + static const GPTConfig gpt_cfg = {1000000, NULL, 0, 0}; /* 1MHz timer, no callback */ + + if (duration == 0) { + duration = 1; + } + + /* + * Only use this timer on the main thread; + * other threads need to use their own timer. + */ + if (chThdGetSelfX() == &ch.mainthread && duration < (1ULL << (sizeof(gptcnt_t) * 8))) { + gptStart(&WAIT_US_TIMER, &gpt_cfg); + gptPolledDelay(&WAIT_US_TIMER, duration); + } else { + chThdSleepMicroseconds(duration); + } +} #endif - -#define CLOCK_DELAY_NOP8 "nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t nop\n\t" - -__attribute__((always_inline)) static inline void wait_cpuclock(unsigned int n) { /* n: 1..135 */ - /* The argument n must be a constant expression. - * That way, compiler optimization will remove unnecessary code. */ - if (n < 1) { - return; - } - if (n > 8) { - unsigned int n8 = n / 8; - n = n - n8 * 8; - switch (n8) { - case 16: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 15: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 14: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 13: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 12: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 11: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 10: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 9: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 8: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 7: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 6: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 5: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 4: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 3: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 2: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 1: - asm volatile(CLOCK_DELAY_NOP8::: "memory"); - case 0: - break; - } - } - switch (n) { - case 8: - asm volatile("nop" ::: "memory"); - case 7: - asm volatile("nop" ::: "memory"); - case 6: - asm volatile("nop" ::: "memory"); - case 5: - asm volatile("nop" ::: "memory"); - case 4: - asm volatile("nop" ::: "memory"); - case 3: - asm volatile("nop" ::: "memory"); - case 2: - asm volatile("nop" ::: "memory"); - case 1: - asm volatile("nop" ::: "memory"); - case 0: - break; - } -} \ No newline at end of file diff --git a/tmk_core/common/debug.h b/tmk_core/common/debug.h deleted file mode 100644 index 3d2e2315e..000000000 --- a/tmk_core/common/debug.h +++ /dev/null @@ -1,169 +0,0 @@ -/* -Copyright 2011 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include -#include "print.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Debug output control - */ -typedef union { - struct { - bool enable : 1; - bool matrix : 1; - bool keyboard : 1; - bool mouse : 1; - uint8_t reserved : 4; - }; - uint8_t raw; -} debug_config_t; - -extern debug_config_t debug_config; - -#ifdef __cplusplus -} -#endif - -/* for backward compatibility */ -#define debug_enable (debug_config.enable) -#define debug_matrix (debug_config.matrix) -#define debug_keyboard (debug_config.keyboard) -#define debug_mouse (debug_config.mouse) - -/* - * Debug print utils - */ -#ifndef NO_DEBUG - -# define dprint(s) \ - do { \ - if (debug_enable) print(s); \ - } while (0) -# define dprintln(s) \ - do { \ - if (debug_enable) println(s); \ - } while (0) -# define dprintf(fmt, ...) \ - do { \ - if (debug_enable) xprintf(fmt, ##__VA_ARGS__); \ - } while (0) -# define dmsg(s) dprintf("%s at %s: %S\n", __FILE__, __LINE__, PSTR(s)) - -/* Deprecated. DO NOT USE these anymore, use dprintf instead. */ -# define debug(s) \ - do { \ - if (debug_enable) print(s); \ - } while (0) -# define debugln(s) \ - do { \ - if (debug_enable) println(s); \ - } while (0) -# define debug_msg(s) \ - do { \ - if (debug_enable) { \ - print(__FILE__); \ - print(" at "); \ - print_dec(__LINE__); \ - print(" in "); \ - print(": "); \ - print(s); \ - } \ - } while (0) -# define debug_dec(data) \ - do { \ - if (debug_enable) print_dec(data); \ - } while (0) -# define debug_decs(data) \ - do { \ - if (debug_enable) print_decs(data); \ - } while (0) -# define debug_hex4(data) \ - do { \ - if (debug_enable) print_hex4(data); \ - } while (0) -# define debug_hex8(data) \ - do { \ - if (debug_enable) print_hex8(data); \ - } while (0) -# define debug_hex16(data) \ - do { \ - if (debug_enable) print_hex16(data); \ - } while (0) -# define debug_hex32(data) \ - do { \ - if (debug_enable) print_hex32(data); \ - } while (0) -# define debug_bin8(data) \ - do { \ - if (debug_enable) print_bin8(data); \ - } while (0) -# define debug_bin16(data) \ - do { \ - if (debug_enable) print_bin16(data); \ - } while (0) -# define debug_bin32(data) \ - do { \ - if (debug_enable) print_bin32(data); \ - } while (0) -# define debug_bin_reverse8(data) \ - do { \ - if (debug_enable) print_bin_reverse8(data); \ - } while (0) -# define debug_bin_reverse16(data) \ - do { \ - if (debug_enable) print_bin_reverse16(data); \ - } while (0) -# define debug_bin_reverse32(data) \ - do { \ - if (debug_enable) print_bin_reverse32(data); \ - } while (0) -# define debug_hex(data) debug_hex8(data) -# define debug_bin(data) debug_bin8(data) -# define debug_bin_reverse(data) debug_bin8(data) - -#else /* NO_DEBUG */ - -# define dprint(s) -# define dprintln(s) -# define dprintf(fmt, ...) -# define dmsg(s) -# define debug(s) -# define debugln(s) -# define debug_msg(s) -# define debug_dec(data) -# define debug_decs(data) -# define debug_hex4(data) -# define debug_hex8(data) -# define debug_hex16(data) -# define debug_hex32(data) -# define debug_bin8(data) -# define debug_bin16(data) -# define debug_bin32(data) -# define debug_bin_reverse8(data) -# define debug_bin_reverse16(data) -# define debug_bin_reverse32(data) -# define debug_hex(data) -# define debug_bin(data) -# define debug_bin_reverse(data) - -#endif /* NO_DEBUG */ diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c deleted file mode 100644 index ffa56ab56..000000000 --- a/tmk_core/common/eeconfig.c +++ /dev/null @@ -1,211 +0,0 @@ -#include -#include -#include "eeprom.h" -#include "eeconfig.h" -#include "action_layer.h" - -#ifdef STM32_EEPROM_ENABLE -# include -# include "eeprom_stm32.h" -#endif - -#if defined(EEPROM_DRIVER) -# include "eeprom_driver.h" -#endif - -#if defined(HAPTIC_ENABLE) -# include "haptic.h" -#endif - -/** \brief eeconfig enable - * - * FIXME: needs doc - */ -__attribute__((weak)) void eeconfig_init_user(void) { - // Reset user EEPROM value to blank, rather than to a set value - eeconfig_update_user(0); -} - -__attribute__((weak)) void eeconfig_init_kb(void) { - // Reset Keyboard EEPROM value to blank, rather than to a set value - eeconfig_update_kb(0); - - eeconfig_init_user(); -} - -/* - * FIXME: needs doc - */ -void eeconfig_init_quantum(void) { -#ifdef STM32_EEPROM_ENABLE - EEPROM_Erase(); -#endif -#if defined(EEPROM_DRIVER) - eeprom_driver_erase(); -#endif - eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); - eeprom_update_byte(EECONFIG_DEBUG, 0); - eeprom_update_byte(EECONFIG_DEFAULT_LAYER, 0); - default_layer_state = 0; - eeprom_update_byte(EECONFIG_KEYMAP_LOWER_BYTE, 0); - eeprom_update_byte(EECONFIG_KEYMAP_UPPER_BYTE, 0); - eeprom_update_byte(EECONFIG_MOUSEKEY_ACCEL, 0); - eeprom_update_byte(EECONFIG_BACKLIGHT, 0); - eeprom_update_byte(EECONFIG_AUDIO, 0xFF); // On by default - eeprom_update_dword(EECONFIG_RGBLIGHT, 0); - eeprom_update_byte(EECONFIG_STENOMODE, 0); - eeprom_update_dword(EECONFIG_HAPTIC, 0); - eeprom_update_byte(EECONFIG_VELOCIKEY, 0); - eeprom_update_dword(EECONFIG_RGB_MATRIX, 0); - eeprom_update_word(EECONFIG_RGB_MATRIX_EXTENDED, 0); - - // TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS - // within the emulated eeprom via dfu-util or another tool -#if defined INIT_EE_HANDS_LEFT -# pragma message "Faking EE_HANDS for left hand" - eeprom_update_byte(EECONFIG_HANDEDNESS, 1); -#elif defined INIT_EE_HANDS_RIGHT -# pragma message "Faking EE_HANDS for right hand" - eeprom_update_byte(EECONFIG_HANDEDNESS, 0); -#endif - -#if defined(HAPTIC_ENABLE) - haptic_reset(); -#else - // this is used in case haptic is disabled, but we still want sane defaults - // in the haptic configuration eeprom. All zero will trigger a haptic_reset - // when a haptic-enabled firmware is loaded onto the keyboard. - eeprom_update_dword(EECONFIG_HAPTIC, 0); -#endif - - eeconfig_init_kb(); -} - -/** \brief eeconfig initialization - * - * FIXME: needs doc - */ -void eeconfig_init(void) { eeconfig_init_quantum(); } - -/** \brief eeconfig enable - * - * FIXME: needs doc - */ -void eeconfig_enable(void) { eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); } - -/** \brief eeconfig disable - * - * FIXME: needs doc - */ -void eeconfig_disable(void) { -#ifdef STM32_EEPROM_ENABLE - EEPROM_Erase(); -#endif -#if defined(EEPROM_DRIVER) - eeprom_driver_erase(); -#endif - eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER_OFF); -} - -/** \brief eeconfig is enabled - * - * FIXME: needs doc - */ -bool eeconfig_is_enabled(void) { return (eeprom_read_word(EECONFIG_MAGIC) == EECONFIG_MAGIC_NUMBER); } - -/** \brief eeconfig is disabled - * - * FIXME: needs doc - */ -bool eeconfig_is_disabled(void) { return (eeprom_read_word(EECONFIG_MAGIC) == EECONFIG_MAGIC_NUMBER_OFF); } - -/** \brief eeconfig read debug - * - * FIXME: needs doc - */ -uint8_t eeconfig_read_debug(void) { return eeprom_read_byte(EECONFIG_DEBUG); } -/** \brief eeconfig update debug - * - * FIXME: needs doc - */ -void eeconfig_update_debug(uint8_t val) { eeprom_update_byte(EECONFIG_DEBUG, val); } - -/** \brief eeconfig read default layer - * - * FIXME: needs doc - */ -uint8_t eeconfig_read_default_layer(void) { return eeprom_read_byte(EECONFIG_DEFAULT_LAYER); } -/** \brief eeconfig update default layer - * - * FIXME: needs doc - */ -void eeconfig_update_default_layer(uint8_t val) { eeprom_update_byte(EECONFIG_DEFAULT_LAYER, val); } - -/** \brief eeconfig read keymap - * - * FIXME: needs doc - */ -uint16_t eeconfig_read_keymap(void) { return (eeprom_read_byte(EECONFIG_KEYMAP_LOWER_BYTE) | (eeprom_read_byte(EECONFIG_KEYMAP_UPPER_BYTE) << 8)); } -/** \brief eeconfig update keymap - * - * FIXME: needs doc - */ -void eeconfig_update_keymap(uint16_t val) { - eeprom_update_byte(EECONFIG_KEYMAP_LOWER_BYTE, val & 0xFF); - eeprom_update_byte(EECONFIG_KEYMAP_UPPER_BYTE, (val >> 8) & 0xFF); -} - -/** \brief eeconfig read audio - * - * FIXME: needs doc - */ -uint8_t eeconfig_read_audio(void) { return eeprom_read_byte(EECONFIG_AUDIO); } -/** \brief eeconfig update audio - * - * FIXME: needs doc - */ -void eeconfig_update_audio(uint8_t val) { eeprom_update_byte(EECONFIG_AUDIO, val); } - -/** \brief eeconfig read kb - * - * FIXME: needs doc - */ -uint32_t eeconfig_read_kb(void) { return eeprom_read_dword(EECONFIG_KEYBOARD); } -/** \brief eeconfig update kb - * - * FIXME: needs doc - */ -void eeconfig_update_kb(uint32_t val) { eeprom_update_dword(EECONFIG_KEYBOARD, val); } - -/** \brief eeconfig read user - * - * FIXME: needs doc - */ -uint32_t eeconfig_read_user(void) { return eeprom_read_dword(EECONFIG_USER); } -/** \brief eeconfig update user - * - * FIXME: needs doc - */ -void eeconfig_update_user(uint32_t val) { eeprom_update_dword(EECONFIG_USER, val); } - -/** \brief eeconfig read haptic - * - * FIXME: needs doc - */ -uint32_t eeconfig_read_haptic(void) { return eeprom_read_dword(EECONFIG_HAPTIC); } -/** \brief eeconfig update haptic - * - * FIXME: needs doc - */ -void eeconfig_update_haptic(uint32_t val) { eeprom_update_dword(EECONFIG_HAPTIC, val); } - -/** \brief eeconfig read split handedness - * - * FIXME: needs doc - */ -bool eeconfig_read_handedness(void) { return !!eeprom_read_byte(EECONFIG_HANDEDNESS); } -/** \brief eeconfig update split handedness - * - * FIXME: needs doc - */ -void eeconfig_update_handedness(bool val) { eeprom_update_byte(EECONFIG_HANDEDNESS, !!val); } diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h deleted file mode 100644 index a88071729..000000000 --- a/tmk_core/common/eeconfig.h +++ /dev/null @@ -1,113 +0,0 @@ -/* -Copyright 2013 Jun Wako - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ - -#pragma once - -#include -#include - -#ifndef EECONFIG_MAGIC_NUMBER -# define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEEA // When changing, decrement this value to avoid future re-init issues -#endif -#define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF - -/* EEPROM parameter address */ -#define EECONFIG_MAGIC (uint16_t *)0 -#define EECONFIG_DEBUG (uint8_t *)2 -#define EECONFIG_DEFAULT_LAYER (uint8_t *)3 -#define EECONFIG_KEYMAP (uint8_t *)4 -#define EECONFIG_MOUSEKEY_ACCEL (uint8_t *)5 -#define EECONFIG_BACKLIGHT (uint8_t *)6 -#define EECONFIG_AUDIO (uint8_t *)7 -#define EECONFIG_RGBLIGHT (uint32_t *)8 -#define EECONFIG_UNICODEMODE (uint8_t *)12 -#define EECONFIG_STENOMODE (uint8_t *)13 -// EEHANDS for two handed boards -#define EECONFIG_HANDEDNESS (uint8_t *)14 -#define EECONFIG_KEYBOARD (uint32_t *)15 -#define EECONFIG_USER (uint32_t *)19 -#define EECONFIG_VELOCIKEY (uint8_t *)23 - -#define EECONFIG_HAPTIC (uint32_t *)24 - -// Mutually exclusive -#define EECONFIG_LED_MATRIX (uint32_t *)28 -#define EECONFIG_RGB_MATRIX (uint32_t *)28 -// Speed & Flags -#define EECONFIG_LED_MATRIX_EXTENDED (uint16_t *)32 -#define EECONFIG_RGB_MATRIX_EXTENDED (uint16_t *)32 - -// TODO: Combine these into a single word and single block of EEPROM -#define EECONFIG_KEYMAP_UPPER_BYTE (uint8_t *)34 -// Size of EEPROM being used, other code can refer to this for available EEPROM -#define EECONFIG_SIZE 35 -/* debug bit */ -#define EECONFIG_DEBUG_ENABLE (1 << 0) -#define EECONFIG_DEBUG_MATRIX (1 << 1) -#define EECONFIG_DEBUG_KEYBOARD (1 << 2) -#define EECONFIG_DEBUG_MOUSE (1 << 3) - -/* keyconf bit */ -#define EECONFIG_KEYMAP_SWAP_CONTROL_CAPSLOCK (1 << 0) -#define EECONFIG_KEYMAP_CAPSLOCK_TO_CONTROL (1 << 1) -#define EECONFIG_KEYMAP_SWAP_LALT_LGUI (1 << 2) -#define EECONFIG_KEYMAP_SWAP_RALT_RGUI (1 << 3) -#define EECONFIG_KEYMAP_NO_GUI (1 << 4) -#define EECONFIG_KEYMAP_SWAP_GRAVE_ESC (1 << 5) -#define EECONFIG_KEYMAP_SWAP_BACKSLASH_BACKSPACE (1 << 6) -#define EECONFIG_KEYMAP_NKRO (1 << 7) - -#define EECONFIG_KEYMAP_LOWER_BYTE EECONFIG_KEYMAP - -bool eeconfig_is_enabled(void); -bool eeconfig_is_disabled(void); - -void eeconfig_init(void); -void eeconfig_init_quantum(void); -void eeconfig_init_kb(void); -void eeconfig_init_user(void); - -void eeconfig_enable(void); - -void eeconfig_disable(void); - -uint8_t eeconfig_read_debug(void); -void eeconfig_update_debug(uint8_t val); - -uint8_t eeconfig_read_default_layer(void); -void eeconfig_update_default_layer(uint8_t val); - -uint16_t eeconfig_read_keymap(void); -void eeconfig_update_keymap(uint16_t val); - -#ifdef AUDIO_ENABLE -uint8_t eeconfig_read_audio(void); -void eeconfig_update_audio(uint8_t val); -#endif - -uint32_t eeconfig_read_kb(void); -void eeconfig_update_kb(uint32_t val); -uint32_t eeconfig_read_user(void); -void eeconfig_update_user(uint32_t val); - -#ifdef HAPTIC_ENABLE -uint32_t eeconfig_read_haptic(void); -void eeconfig_update_haptic(uint32_t val); -#endif - -bool eeconfig_read_handedness(void); -void eeconfig_update_handedness(bool val); diff --git a/tmk_core/common/host.c b/tmk_core/common/host.c index e7d92cfac..f0c396b18 100644 --- a/tmk_core/common/host.c +++ b/tmk_core/common/host.c @@ -17,10 +17,12 @@ along with this program. If not, see . #include //#include +#include "keyboard.h" #include "keycode.h" #include "host.h" #include "util.h" #include "debug.h" +#include "digitizer.h" #ifdef NKRO_ENABLE # include "keycode_config.h" @@ -35,15 +37,20 @@ void host_set_driver(host_driver_t *d) { driver = d; } host_driver_t *host_get_driver(void) { return driver; } +#ifdef SPLIT_KEYBOARD +uint8_t split_led_state = 0; +void set_split_host_keyboard_leds(uint8_t led_state) { split_led_state = led_state; } +#endif + uint8_t host_keyboard_leds(void) { +#ifdef SPLIT_KEYBOARD + if (!is_keyboard_master()) return split_led_state; +#endif if (!driver) return 0; return (*driver->keyboard_leds)(); } -led_t host_keyboard_led_state(void) { - if (!driver) return (led_t){0}; - return (led_t)((*driver->keyboard_leds)()); -} +led_t host_keyboard_led_state(void) { return (led_t)host_keyboard_leds(); } /* send report */ void host_keyboard_send(report_keyboard_t *report) { @@ -97,6 +104,24 @@ void host_consumer_send(uint16_t report) { (*driver->send_consumer)(report); } +void host_digitizer_send(digitizer_t *digitizer) { + if (!driver) return; + + report_digitizer_t report = { +#ifdef DIGITIZER_SHARED_EP + .report_id = REPORT_ID_DIGITIZER, +#endif + .tip = digitizer->tipswitch & 0x1, + .inrange = digitizer->inrange & 0x1, + .x = (uint16_t)(digitizer->x * 0x7FFF), + .y = (uint16_t)(digitizer->y * 0x7FFF), + }; + + send_digitizer(&report); +} + +__attribute__((weak)) void send_digitizer(report_digitizer_t *report) {} + uint16_t host_last_system_report(void) { return last_system_report; } uint16_t host_last_consumer_report(void) { return last_consumer_report; } diff --git a/tmk_core/common/host_driver.h b/tmk_core/common/host_driver.h index f34a22053..2aebca043 100644 --- a/tmk_core/common/host_driver.h +++ b/tmk_core/common/host_driver.h @@ -30,3 +30,5 @@ typedef struct { void (*send_system)(uint16_t); void (*send_consumer)(uint16_t); } host_driver_t; + +void send_digitizer(report_digitizer_t *report); \ No newline at end of file diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c deleted file mode 100644 index 3d6092e71..000000000 --- a/tmk_core/common/keyboard.c +++ /dev/null @@ -1,534 +0,0 @@ -/* -Copyright 2011, 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 -#include "keyboard.h" -#include "matrix.h" -#include "keymap.h" -#include "host.h" -#include "led.h" -#include "keycode.h" -#include "timer.h" -#include "sync_timer.h" -#include "print.h" -#include "debug.h" -#include "command.h" -#include "util.h" -#include "sendchar.h" -#include "eeconfig.h" -#include "action_layer.h" -#ifdef BACKLIGHT_ENABLE -# include "backlight.h" -#endif -#ifdef MOUSEKEY_ENABLE -# include "mousekey.h" -#endif -#ifdef PS2_MOUSE_ENABLE -# include "ps2_mouse.h" -#endif -#ifdef SERIAL_MOUSE_ENABLE -# include "serial_mouse.h" -#endif -#ifdef ADB_MOUSE_ENABLE -# include "adb.h" -#endif -#ifdef RGBLIGHT_ENABLE -# include "rgblight.h" -#endif -#ifdef LED_MATRIX_ENABLE -# include "led_matrix.h" -#endif -#ifdef RGB_MATRIX_ENABLE -# include "rgb_matrix.h" -#endif -#ifdef ENCODER_ENABLE -# include "encoder.h" -#endif -#ifdef STENO_ENABLE -# include "process_steno.h" -#endif -#ifdef SERIAL_LINK_ENABLE -# include "serial_link/system/serial_link.h" -#endif -#ifdef VISUALIZER_ENABLE -# include "visualizer/visualizer.h" -#endif -#ifdef POINTING_DEVICE_ENABLE -# include "pointing_device.h" -#endif -#ifdef MIDI_ENABLE -# include "process_midi.h" -#endif -#ifdef JOYSTICK_ENABLE -# include "process_joystick.h" -#endif -#ifdef HD44780_ENABLE -# include "hd44780.h" -#endif -#ifdef QWIIC_ENABLE -# include "qwiic.h" -#endif -#ifdef OLED_DRIVER_ENABLE -# include "oled_driver.h" -#endif -#ifdef VELOCIKEY_ENABLE -# include "velocikey.h" -#endif -#ifdef VIA_ENABLE -# include "via.h" -#endif -#ifdef DIP_SWITCH_ENABLE -# include "dip_switch.h" -#endif -#ifdef STM32_EEPROM_ENABLE -# include "eeprom_stm32.h" -#endif -#ifdef EEPROM_DRIVER -# include "eeprom_driver.h" -#endif - -static uint32_t last_input_modification_time = 0; -uint32_t last_input_activity_time(void) { return last_input_modification_time; } -uint32_t last_input_activity_elapsed(void) { return timer_elapsed32(last_input_modification_time); } - -static uint32_t last_matrix_modification_time = 0; -uint32_t last_matrix_activity_time(void) { return last_matrix_modification_time; } -uint32_t last_matrix_activity_elapsed(void) { return timer_elapsed32(last_matrix_modification_time); } -void last_matrix_activity_trigger(void) { last_matrix_modification_time = last_input_modification_time = timer_read32(); } - -static uint32_t last_encoder_modification_time = 0; -uint32_t last_encoder_activity_time(void) { return last_encoder_modification_time; } -uint32_t last_encoder_activity_elapsed(void) { return timer_elapsed32(last_encoder_modification_time); } -void last_encoder_activity_trigger(void) { last_encoder_modification_time = last_input_modification_time = timer_read32(); } - -// Only enable this if console is enabled to print to -#if defined(DEBUG_MATRIX_SCAN_RATE) -static uint32_t matrix_timer = 0; -static uint32_t matrix_scan_count = 0; -static uint32_t last_matrix_scan_count = 0; - -void matrix_scan_perf_task(void) { - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer) > 1000) { -# if defined(CONSOLE_ENABLE) - dprintf("matrix scan frequency: %lu\n", matrix_scan_count); -# endif - last_matrix_scan_count = matrix_scan_count; - matrix_timer = timer_now; - matrix_scan_count = 0; - } -} - -uint32_t get_matrix_scan_rate(void) { return last_matrix_scan_count; } -#else -# define matrix_scan_perf_task() -#endif - -#ifdef MATRIX_HAS_GHOST -extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; -static matrix_row_t get_real_keys(uint8_t row, matrix_row_t rowdata) { - matrix_row_t out = 0; - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - // read each key in the row data and check if the keymap defines it as a real key - if (pgm_read_byte(&keymaps[0][row][col]) && (rowdata & (1 << col))) { - // this creates new row data, if a key is defined in the keymap, it will be set here - out |= 1 << col; - } - } - return out; -} - -static inline bool popcount_more_than_one(matrix_row_t rowdata) { - rowdata &= rowdata - 1; // if there are less than two bits (keys) set, rowdata will become zero - return rowdata; -} - -static inline bool has_ghost_in_row(uint8_t row, matrix_row_t rowdata) { - /* No ghost exists when less than 2 keys are down on the row. - If there are "active" blanks in the matrix, the key can't be pressed by the user, - there is no doubt as to which keys are really being pressed. - The ghosts will be ignored, they are KC_NO. */ - rowdata = get_real_keys(row, rowdata); - if ((popcount_more_than_one(rowdata)) == 0) { - return false; - } - /* Ghost occurs when the row shares a column line with other row, - and two columns are read on each row. Blanks in the matrix don't matter, - so they are filtered out. - If there are two or more real keys pressed and they match columns with - at least two of another row's real keys, the row will be ignored. Keep in mind, - we are checking one row at a time, not all of them at once. - */ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - if (i != row && popcount_more_than_one(get_real_keys(i, matrix_get_row(i)) & rowdata)) { - return true; - } - } - return false; -} - -#endif - -void disable_jtag(void) { -// To use PF4-7 (PC2-5 on ATmega32A), disable JTAG by writing JTD bit twice within four cycles. -#if (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) - MCUCR |= _BV(JTD); - MCUCR |= _BV(JTD); -#elif defined(__AVR_ATmega32A__) - MCUCSR |= _BV(JTD); - MCUCSR |= _BV(JTD); -#endif -} - -/** \brief matrix_setup - * - * FIXME: needs doc - */ -__attribute__((weak)) void matrix_setup(void) {} - -/** \brief keyboard_pre_init_user - * - * FIXME: needs doc - */ -__attribute__((weak)) void keyboard_pre_init_user(void) {} - -/** \brief keyboard_pre_init_kb - * - * FIXME: needs doc - */ -__attribute__((weak)) void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); } - -/** \brief keyboard_post_init_user - * - * FIXME: needs doc - */ - -__attribute__((weak)) void keyboard_post_init_user() {} - -/** \brief keyboard_post_init_kb - * - * FIXME: needs doc - */ - -__attribute__((weak)) void keyboard_post_init_kb(void) { keyboard_post_init_user(); } - -/** \brief keyboard_setup - * - * FIXME: needs doc - */ -void keyboard_setup(void) { -#ifndef NO_JTAG_DISABLE - disable_jtag(); -#endif - print_set_sendchar(sendchar); -#ifdef STM32_EEPROM_ENABLE - EEPROM_Init(); -#endif -#ifdef EEPROM_DRIVER - eeprom_driver_init(); -#endif - matrix_setup(); - keyboard_pre_init_kb(); -} - -/** \brief is_keyboard_master - * - * FIXME: needs doc - */ -__attribute__((weak)) bool is_keyboard_master(void) { return true; } - -/** \brief is_keyboard_left - * - * FIXME: needs doc - */ -__attribute__((weak)) bool is_keyboard_left(void) { return true; } - -/** \brief should_process_keypress - * - * Override this function if you have a condition where keypresses processing should change: - * - splits where the slave side needs to process for rgb/oled functionality - */ -__attribute__((weak)) bool should_process_keypress(void) { return is_keyboard_master(); } - -/** \brief housekeeping_task_kb - * - * Override this function if you have a need to execute code for every keyboard main loop iteration. - * This is specific to keyboard-level functionality. - */ -__attribute__((weak)) void housekeeping_task_kb(void) {} - -/** \brief housekeeping_task_user - * - * Override this function if you have a need to execute code for every keyboard main loop iteration. - * This is specific to user/keymap-level functionality. - */ -__attribute__((weak)) void housekeeping_task_user(void) {} - -/** \brief housekeeping_task - * - * Invokes hooks for executing code after QMK is done after each loop iteration. - */ -void housekeeping_task(void) { - housekeeping_task_kb(); - housekeeping_task_user(); -} - -/** \brief keyboard_init - * - * FIXME: needs doc - */ -void keyboard_init(void) { - timer_init(); - sync_timer_init(); - matrix_init(); -#ifdef VIA_ENABLE - via_init(); -#endif -#ifdef QWIIC_ENABLE - qwiic_init(); -#endif -#ifdef OLED_DRIVER_ENABLE - oled_init(OLED_ROTATION_0); -#endif -#ifdef PS2_MOUSE_ENABLE - ps2_mouse_init(); -#endif -#ifdef SERIAL_MOUSE_ENABLE - serial_mouse_init(); -#endif -#ifdef ADB_MOUSE_ENABLE - adb_mouse_init(); -#endif -#ifdef BACKLIGHT_ENABLE - backlight_init(); -#endif -#ifdef RGBLIGHT_ENABLE - rgblight_init(); -#endif -#ifdef ENCODER_ENABLE - encoder_init(); -#endif -#ifdef STENO_ENABLE - steno_init(); -#endif -#ifdef POINTING_DEVICE_ENABLE - pointing_device_init(); -#endif -#if defined(NKRO_ENABLE) && defined(FORCE_NKRO) - keymap_config.nkro = 1; - eeconfig_update_keymap(keymap_config.raw); -#endif -#ifdef DIP_SWITCH_ENABLE - dip_switch_init(); -#endif - -#if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) - debug_enable = true; -#endif - - keyboard_post_init_kb(); /* Always keep this last */ -} - -/** \brief key_event_task - * - * This function is responsible for calling into other systems when they need to respond to electrical switch press events. - * This is differnet than keycode events as no layer processing, or filtering occurs. - */ -void switch_events(uint8_t row, uint8_t col, bool pressed) { -#if defined(LED_MATRIX_ENABLE) - process_led_matrix(row, col, pressed); -#endif -#if defined(RGB_MATRIX_ENABLE) - process_rgb_matrix(row, col, pressed); -#endif -} - -/** \brief Keyboard task: Do keyboard routine jobs - * - * Do routine keyboard jobs: - * - * * scan matrix - * * handle mouse movements - * * run visualizer code - * * handle midi commands - * * light LEDs - * - * This is repeatedly called as fast as possible. - */ -void keyboard_task(void) { - static matrix_row_t matrix_prev[MATRIX_ROWS]; - static uint8_t led_status = 0; - matrix_row_t matrix_row = 0; - matrix_row_t matrix_change = 0; -#ifdef QMK_KEYS_PER_SCAN - uint8_t keys_processed = 0; -#endif -#ifdef ENCODER_ENABLE - bool encoders_changed = false; -#endif - - uint8_t matrix_changed = matrix_scan(); - if (matrix_changed) last_matrix_activity_trigger(); - - for (uint8_t r = 0; r < MATRIX_ROWS; r++) { - matrix_row = matrix_get_row(r); - matrix_change = matrix_row ^ matrix_prev[r]; - if (matrix_change) { -#ifdef MATRIX_HAS_GHOST - if (has_ghost_in_row(r, matrix_row)) { - continue; - } -#endif - if (debug_matrix) matrix_print(); - matrix_row_t col_mask = 1; - for (uint8_t c = 0; c < MATRIX_COLS; c++, col_mask <<= 1) { - if (matrix_change & col_mask) { - if (should_process_keypress()) { - action_exec((keyevent_t){ - .key = (keypos_t){.row = r, .col = c}, .pressed = (matrix_row & col_mask), .time = (timer_read() | 1) /* time should not be 0 */ - }); - } - // record a processed key - matrix_prev[r] ^= col_mask; - - switch_events(r, c, (matrix_row & col_mask)); - -#ifdef QMK_KEYS_PER_SCAN - // only jump out if we have processed "enough" keys. - if (++keys_processed >= QMK_KEYS_PER_SCAN) -#endif - // process a key per task call - goto MATRIX_LOOP_END; - } - } - } - } - // call with pseudo tick event when no real key event. -#ifdef QMK_KEYS_PER_SCAN - // we can get here with some keys processed now. - if (!keys_processed) -#endif - action_exec(TICK); - -MATRIX_LOOP_END: - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_perf_task(); -#endif - -#if defined(RGBLIGHT_ENABLE) - rgblight_task(); -#endif - -#ifdef LED_MATRIX_ENABLE - led_matrix_task(); -#endif -#ifdef RGB_MATRIX_ENABLE - rgb_matrix_task(); -#endif - -#if defined(BACKLIGHT_ENABLE) -# if defined(BACKLIGHT_PIN) || defined(BACKLIGHT_PINS) - backlight_task(); -# endif -#endif - -#ifdef ENCODER_ENABLE - encoders_changed = encoder_read(); - if (encoders_changed) last_encoder_activity_trigger(); -#endif - -#ifdef QWIIC_ENABLE - qwiic_task(); -#endif - -#ifdef OLED_DRIVER_ENABLE - oled_task(); -# ifndef OLED_DISABLE_TIMEOUT - // Wake up oled if user is using those fabulous keys or spinning those encoders! -# ifdef ENCODER_ENABLE - if (matrix_changed || encoders_changed) oled_on(); -# else - if (matrix_changed) oled_on(); -# endif -# endif -#endif - -#ifdef MOUSEKEY_ENABLE - // mousekey repeat & acceleration - mousekey_task(); -#endif - -#ifdef PS2_MOUSE_ENABLE - ps2_mouse_task(); -#endif - -#ifdef SERIAL_MOUSE_ENABLE - serial_mouse_task(); -#endif - -#ifdef ADB_MOUSE_ENABLE - adb_mouse_task(); -#endif - -#ifdef SERIAL_LINK_ENABLE - serial_link_update(); -#endif - -#ifdef VISUALIZER_ENABLE - visualizer_update(default_layer_state, layer_state, visualizer_get_mods(), host_keyboard_leds()); -#endif - -#ifdef POINTING_DEVICE_ENABLE - pointing_device_task(); -#endif - -#ifdef MIDI_ENABLE - midi_task(); -#endif - -#ifdef VELOCIKEY_ENABLE - if (velocikey_enabled()) { - velocikey_decelerate(); - } -#endif - -#ifdef JOYSTICK_ENABLE - joystick_task(); -#endif - - // update LED - if (led_status != host_keyboard_leds()) { - led_status = host_keyboard_leds(); - keyboard_set_leds(led_status); - } -} - -/** \brief keyboard set leds - * - * FIXME: needs doc - */ -void keyboard_set_leds(uint8_t leds) { - if (debug_keyboard) { - debug("keyboard_set_led: "); - debug_hex8(leds); - debug("\n"); - } - led_set(leds); -} diff --git a/tmk_core/common/lib_printf.mk b/tmk_core/common/lib_printf.mk deleted file mode 100644 index 10d2d8468..000000000 --- a/tmk_core/common/lib_printf.mk +++ /dev/null @@ -1,9 +0,0 @@ -PRINTF_PATH = $(LIB_PATH)/printf - -TMK_COMMON_SRC += $(PRINTF_PATH)/printf.c -TMK_COMMON_SRC += $(COMMON_DIR)/printf.c -TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_FLOAT -TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_EXPONENTIAL -TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_LONG_LONG -TMK_COMMON_DEFS += -DPRINTF_DISABLE_SUPPORT_PTRDIFF_T -VPATH += $(PRINTF_PATH) diff --git a/tmk_core/common/progmem.h b/tmk_core/common/progmem.h index 4e4771e52..a70d8e299 100644 --- a/tmk_core/common/progmem.h +++ b/tmk_core/common/progmem.h @@ -3,7 +3,9 @@ #if defined(__AVR__) # include #else +# include # define PROGMEM +# define __flash # define PSTR(x) x # define PGM_P const char* # define memcpy_P(dest, src, n) memcpy(dest, src, n) diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index db6370657..f2223e806 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h @@ -30,7 +30,8 @@ enum hid_report_ids { REPORT_ID_SYSTEM, REPORT_ID_CONSUMER, REPORT_ID_NKRO, - REPORT_ID_JOYSTICK + REPORT_ID_JOYSTICK, + REPORT_ID_DIGITIZER }; /* Mouse buttons */ @@ -205,6 +206,17 @@ typedef struct { int8_t h; } __attribute__((packed)) report_mouse_t; +typedef struct { +#ifdef DIGITIZER_SHARED_EP + uint8_t report_id; +#endif + uint8_t tip : 1; + uint8_t inrange : 1; + uint8_t pad2 : 6; + uint16_t x; + uint16_t y; +} __attribute__((packed)) report_digitizer_t; + typedef struct { #if JOYSTICK_AXES_COUNT > 0 # if JOYSTICK_AXES_RESOLUTION > 8 diff --git a/tmk_core/common/sendchar_null.c b/tmk_core/common/sendchar_null.c deleted file mode 100644 index fb67f7086..000000000 --- a/tmk_core/common/sendchar_null.c +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2011 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 "sendchar.h" - -__attribute__((weak)) int8_t sendchar(uint8_t c) { return 0; } diff --git a/tmk_core/common/sendchar_uart.c b/tmk_core/common/sendchar_uart.c deleted file mode 100644 index 2fc48baff..000000000 --- a/tmk_core/common/sendchar_uart.c +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2011 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 "uart.h" -#include "sendchar.h" - -int8_t sendchar(uint8_t c) { - uart_putchar(c); - return 0; -} diff --git a/tmk_core/common/sync_timer.c b/tmk_core/common/sync_timer.c index de24b463b..68b92d8b4 100644 --- a/tmk_core/common/sync_timer.c +++ b/tmk_core/common/sync_timer.c @@ -26,7 +26,7 @@ SOFTWARE. #include "sync_timer.h" #include "keyboard.h" -#if defined(SPLIT_KEYBOARD) && !defined(DISABLE_SYNC_TIMER) +#if (defined(SPLIT_KEYBOARD) || defined(SERIAL_LINK_ENABLE)) && !defined(DISABLE_SYNC_TIMER) volatile int32_t sync_timer_ms; void sync_timer_init(void) { sync_timer_ms = 0; } diff --git a/tmk_core/common/sync_timer.h b/tmk_core/common/sync_timer.h index 9ddef45bb..744e2b50d 100644 --- a/tmk_core/common/sync_timer.h +++ b/tmk_core/common/sync_timer.h @@ -32,7 +32,7 @@ SOFTWARE. extern "C" { #endif -#if defined(SPLIT_KEYBOARD) && !defined(DISABLE_SYNC_TIMER) +#if (defined(SPLIT_KEYBOARD) || defined(SERIAL_LINK_ENABLE)) && !defined(DISABLE_SYNC_TIMER) void sync_timer_init(void); void sync_timer_update(uint32_t time); uint16_t sync_timer_read(void); diff --git a/tmk_core/common/test/eeprom_stm32_tests.cpp b/tmk_core/common/test/eeprom_stm32_tests.cpp new file mode 100644 index 000000000..aa84492b8 --- /dev/null +++ b/tmk_core/common/test/eeprom_stm32_tests.cpp @@ -0,0 +1,438 @@ +/* Copyright 2021 by Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "gtest/gtest.h" + +extern "C" { +#include "flash_stm32.h" +#include "eeprom_stm32.h" +#include "eeprom.h" +} + +/* Mock Flash Parameters: + * + * === Large Layout === + * flash size: 65536 + * page size: 2048 + * density pages: 16 + * Simulated EEPROM size: 16384 + * + * FlashBuf Layout: + * [Unused | Compact | Write Log ] + * [0......|32768......|49152......65535] + * + * === Tiny Layout === + * flash size: 1024 + * page size: 512 + * density pages: 1 + * Simulated EEPROM size: 256 + * + * FlashBuf Layout: + * [Unused | Compact | Write Log ] + * [0......|512......|768......1023] + * + */ + +#define EEPROM_SIZE (FEE_PAGE_SIZE * FEE_DENSITY_PAGES / 2) +#define LOG_SIZE EEPROM_SIZE +#define LOG_BASE (MOCK_FLASH_SIZE - LOG_SIZE) +#define EEPROM_BASE (LOG_BASE - EEPROM_SIZE) + +/* Log encoding helpers */ +#define BYTE_VALUE(addr, value) (((addr) << 8) | (value)) +#define WORD_ZERO(addr) (0x8000 | ((addr) >> 1)) +#define WORD_ONE(addr) (0xA000 | ((addr) >> 1)) +#define WORD_NEXT(addr) (0xE000 | (((addr)-0x80) >> 1)) + +class EepromStm32Test : public testing::Test { + public: + EepromStm32Test() {} + ~EepromStm32Test() {} + + protected: + void SetUp() override { EEPROM_Erase(); } + + void TearDown() override { +#ifdef EEPROM_DEBUG + dumpEepromDataBuf(); +#endif + } +}; + +TEST_F(EepromStm32Test, TestErase) { + EEPROM_WriteDataByte(0, 0x42); + EEPROM_Erase(); + EXPECT_EQ(EEPROM_ReadDataByte(0), 0); + EXPECT_EQ(EEPROM_ReadDataByte(1), 0); +} + +TEST_F(EepromStm32Test, TestReadGarbage) { + uint8_t garbage = 0x3c; + for (int i = 0; i < MOCK_FLASH_SIZE; ++i) { + garbage ^= 0xa3; + garbage += i; + FlashBuf[i] = garbage; + } + EEPROM_Init(); // Just verify we don't crash +} + +TEST_F(EepromStm32Test, TestWriteBadAddress) { + EXPECT_EQ(EEPROM_WriteDataByte(EEPROM_SIZE, 0x42), FLASH_BAD_ADDRESS); + EXPECT_EQ(EEPROM_WriteDataWord(EEPROM_SIZE - 1, 0xbeef), FLASH_BAD_ADDRESS); + EXPECT_EQ(EEPROM_WriteDataWord(EEPROM_SIZE, 0xbeef), FLASH_BAD_ADDRESS); +} + +TEST_F(EepromStm32Test, TestReadBadAddress) { + EXPECT_EQ(EEPROM_ReadDataByte(EEPROM_SIZE), 0xFF); + EXPECT_EQ(EEPROM_ReadDataWord(EEPROM_SIZE - 1), 0xFFFF); + EXPECT_EQ(EEPROM_ReadDataWord(EEPROM_SIZE), 0xFFFF); + EXPECT_EQ(eeprom_read_dword((uint32_t*)(EEPROM_SIZE - 4)), 0); + EXPECT_EQ(eeprom_read_dword((uint32_t*)(EEPROM_SIZE - 3)), 0xFF000000); + EXPECT_EQ(eeprom_read_dword((uint32_t*)EEPROM_SIZE), 0xFFFFFFFF); +} + +TEST_F(EepromStm32Test, TestReadByte) { + /* Direct compacted-area baseline: Address < 0x80 */ + FlashBuf[EEPROM_BASE + 2] = ~0xef; + FlashBuf[EEPROM_BASE + 3] = ~0xbe; + /* Direct compacted-area baseline: Address >= 0x80 */ + FlashBuf[EEPROM_BASE + EEPROM_SIZE - 2] = ~0x78; + FlashBuf[EEPROM_BASE + EEPROM_SIZE - 1] = ~0x56; + /* Check values */ + EEPROM_Init(); + EXPECT_EQ(EEPROM_ReadDataByte(2), 0xef); + EXPECT_EQ(EEPROM_ReadDataByte(3), 0xbe); + EXPECT_EQ(EEPROM_ReadDataByte(EEPROM_SIZE - 2), 0x78); + EXPECT_EQ(EEPROM_ReadDataByte(EEPROM_SIZE - 1), 0x56); + /* Write Log byte value */ + FlashBuf[LOG_BASE] = 0x65; + FlashBuf[LOG_BASE + 1] = 3; + /* Write Log word value */ + *(uint16_t*)&FlashBuf[LOG_BASE + 2] = WORD_NEXT(EEPROM_SIZE - 2); + *(uint16_t*)&FlashBuf[LOG_BASE + 4] = ~0x9abc; + /* Check values */ + EEPROM_Init(); + EXPECT_EQ(EEPROM_ReadDataByte(2), 0xef); + EXPECT_EQ(EEPROM_ReadDataByte(3), 0x65); + EXPECT_EQ(EEPROM_ReadDataByte(EEPROM_SIZE - 2), 0xbc); + EXPECT_EQ(EEPROM_ReadDataByte(EEPROM_SIZE - 1), 0x9a); +} + +TEST_F(EepromStm32Test, TestWriteByte) { + /* Direct compacted-area baseline: Address < 0x80 */ + EEPROM_WriteDataByte(2, 0xef); + EEPROM_WriteDataByte(3, 0xbe); + /* Direct compacted-area baseline: Address >= 0x80 */ + EEPROM_WriteDataByte(EEPROM_SIZE - 2, 0x78); + EEPROM_WriteDataByte(EEPROM_SIZE - 1, 0x56); + /* Check values */ + /* First write in each aligned word should have been direct */ + EXPECT_EQ(FlashBuf[EEPROM_BASE + 2], (uint8_t)~0xef); + EXPECT_EQ(FlashBuf[EEPROM_BASE + EEPROM_SIZE - 2], (uint8_t)~0x78); + + /* Second write per aligned word requires a log entry */ + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE], BYTE_VALUE(3, 0xbe)); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 2], WORD_NEXT(EEPROM_SIZE - 1)); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 4], (uint16_t)~0x5678); +} + +TEST_F(EepromStm32Test, TestByteRoundTrip) { + /* Direct compacted-area: Address < 0x80 */ + EEPROM_WriteDataWord(0, 0xdead); + EEPROM_WriteDataByte(2, 0xef); + EEPROM_WriteDataByte(3, 0xbe); + /* Direct compacted-area: Address >= 0x80 */ + EEPROM_WriteDataByte(EEPROM_SIZE - 2, 0x78); + EEPROM_WriteDataByte(EEPROM_SIZE - 1, 0x56); + /* Check values */ + EEPROM_Init(); + EXPECT_EQ(EEPROM_ReadDataByte(0), 0xad); + EXPECT_EQ(EEPROM_ReadDataByte(1), 0xde); + EXPECT_EQ(EEPROM_ReadDataByte(2), 0xef); + EXPECT_EQ(EEPROM_ReadDataByte(3), 0xbe); + EXPECT_EQ(EEPROM_ReadDataByte(EEPROM_SIZE - 2), 0x78); + EXPECT_EQ(EEPROM_ReadDataByte(EEPROM_SIZE - 1), 0x56); + /* Write log entries */ + EEPROM_WriteDataByte(2, 0x80); + EEPROM_WriteDataByte(EEPROM_SIZE - 2, 0x3c); + /* Check values */ + EEPROM_Init(); + EXPECT_EQ(EEPROM_ReadDataByte(2), 0x80); + EXPECT_EQ(EEPROM_ReadDataByte(3), 0xbe); + EXPECT_EQ(EEPROM_ReadDataByte(EEPROM_SIZE - 2), 0x3c); + EXPECT_EQ(EEPROM_ReadDataByte(EEPROM_SIZE - 1), 0x56); +} + +TEST_F(EepromStm32Test, TestReadWord) { + /* Direct compacted-area baseline: Address < 0x80 */ + FlashBuf[EEPROM_BASE + 0] = ~0xad; + FlashBuf[EEPROM_BASE + 1] = ~0xde; + /* Direct compacted-area baseline: Address >= 0x80 */ + FlashBuf[EEPROM_BASE + 200] = ~0xcd; + FlashBuf[EEPROM_BASE + 201] = ~0xab; + FlashBuf[EEPROM_BASE + EEPROM_SIZE - 4] = ~0x34; + FlashBuf[EEPROM_BASE + EEPROM_SIZE - 3] = ~0x12; + FlashBuf[EEPROM_BASE + EEPROM_SIZE - 2] = ~0x78; + FlashBuf[EEPROM_BASE + EEPROM_SIZE - 1] = ~0x56; + /* Check values */ + EEPROM_Init(); + EXPECT_EQ(EEPROM_ReadDataWord(0), 0xdead); + EXPECT_EQ(EEPROM_ReadDataWord(200), 0xabcd); + EXPECT_EQ(EEPROM_ReadDataWord(EEPROM_SIZE - 4), 0x1234); + EXPECT_EQ(EEPROM_ReadDataWord(EEPROM_SIZE - 2), 0x5678); + /* Write Log word zero-encoded */ + *(uint16_t*)&FlashBuf[LOG_BASE] = WORD_ZERO(200); + /* Write Log word one-encoded */ + *(uint16_t*)&FlashBuf[LOG_BASE + 2] = WORD_ONE(EEPROM_SIZE - 4); + /* Write Log word value */ + *(uint16_t*)&FlashBuf[LOG_BASE + 4] = WORD_NEXT(EEPROM_SIZE - 2); + *(uint16_t*)&FlashBuf[LOG_BASE + 6] = ~0x9abc; + /* Check values */ + EEPROM_Init(); + EXPECT_EQ(EEPROM_ReadDataWord(200), 0); + EXPECT_EQ(EEPROM_ReadDataWord(EEPROM_SIZE - 4), 1); + EXPECT_EQ(EEPROM_ReadDataWord(EEPROM_SIZE - 2), 0x9abc); +} + +TEST_F(EepromStm32Test, TestWriteWord) { + /* Direct compacted-area: Address < 0x80 */ + EEPROM_WriteDataWord(0, 0xdead); // Aligned + EEPROM_WriteDataWord(3, 0xbeef); // Unaligned + /* Direct compacted-area: Address >= 0x80 */ + EEPROM_WriteDataWord(200, 0xabcd); // Aligned + EEPROM_WriteDataWord(203, 0x9876); // Unaligned + EEPROM_WriteDataWord(EEPROM_SIZE - 4, 0x1234); + EEPROM_WriteDataWord(EEPROM_SIZE - 2, 0x5678); + /* Write Log word zero-encoded */ + EEPROM_WriteDataWord(EEPROM_SIZE - 4, 0); + /* Write Log word one-encoded */ + EEPROM_WriteDataWord(EEPROM_SIZE - 2, 1); + /* Write Log word value aligned */ + EEPROM_WriteDataWord(200, 0x4321); // Aligned + /* Write Log word value unaligned */ + EEPROM_WriteDataByte(202, 0x3c); // Set neighboring byte + EEPROM_WriteDataWord(203, 0xcdef); // Unaligned + /* Check values */ + /* Direct compacted-area */ + EXPECT_EQ(*(uint16_t*)&FlashBuf[EEPROM_BASE], (uint16_t)~0xdead); + EXPECT_EQ(*(uint16_t*)&FlashBuf[EEPROM_BASE + 3], (uint16_t)~0xbeef); + EXPECT_EQ(*(uint16_t*)&FlashBuf[EEPROM_BASE + 200], (uint16_t)~0xabcd); + EXPECT_EQ(FlashBuf[EEPROM_BASE + 203], (uint8_t)~0x76); + EXPECT_EQ(FlashBuf[EEPROM_BASE + 204], (uint8_t)~0x98); + EXPECT_EQ(*(uint16_t*)&FlashBuf[EEPROM_BASE + EEPROM_SIZE - 4], (uint16_t)~0x1234); + EXPECT_EQ(*(uint16_t*)&FlashBuf[EEPROM_BASE + EEPROM_SIZE - 2], (uint16_t)~0x5678); + /* Write Log word zero-encoded */ + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE], WORD_ZERO(EEPROM_SIZE - 4)); + /* Write Log word one-encoded */ + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 2], WORD_ONE(EEPROM_SIZE - 2)); + /* Write Log word value aligned */ + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 4], WORD_NEXT(200)); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 6], (uint16_t)~0x4321); + /* Write Log word value unaligned */ + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 8], WORD_NEXT(202)); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 10], (uint16_t)~0x763c); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 12], WORD_NEXT(202)); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 14], (uint16_t)~0xef3c); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 16], WORD_NEXT(204)); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 18], (uint16_t)~0x00cd); +} + +TEST_F(EepromStm32Test, TestWordRoundTrip) { + /* Direct compacted-area: Address < 0x80 */ + EEPROM_WriteDataWord(0, 0xdead); // Aligned + EEPROM_WriteDataWord(3, 0xbeef); // Unaligned + /* Direct compacted-area: Address >= 0x80 */ + EEPROM_WriteDataWord(200, 0xabcd); // Aligned + EEPROM_WriteDataWord(203, 0x9876); // Unaligned + EEPROM_WriteDataWord(EEPROM_SIZE - 4, 0x1234); + EEPROM_WriteDataWord(EEPROM_SIZE - 2, 0x5678); + /* Check values */ + EEPROM_Init(); + EXPECT_EQ(EEPROM_ReadDataWord(0), 0xdead); + EXPECT_EQ(EEPROM_ReadDataWord(3), 0xbeef); + EXPECT_EQ(EEPROM_ReadDataWord(200), 0xabcd); + EXPECT_EQ(EEPROM_ReadDataWord(203), 0x9876); + EXPECT_EQ(EEPROM_ReadDataWord(EEPROM_SIZE - 4), 0x1234); + EXPECT_EQ(EEPROM_ReadDataWord(EEPROM_SIZE - 2), 0x5678); + + /* Write Log word zero-encoded */ + EEPROM_WriteDataWord(EEPROM_SIZE - 4, 0); + /* Write Log word one-encoded */ + EEPROM_WriteDataWord(EEPROM_SIZE - 2, 1); + /* Write Log word value aligned */ + EEPROM_WriteDataWord(200, 0x4321); // Aligned + /* Write Log word value unaligned */ + EEPROM_WriteDataByte(202, 0x3c); // Set neighboring byte + EEPROM_WriteDataWord(203, 0xcdef); // Unaligned + /* Check values */ + EEPROM_Init(); + EXPECT_EQ(EEPROM_ReadDataWord(200), 0x4321); + EXPECT_EQ(EEPROM_ReadDataByte(202), 0x3c); + EXPECT_EQ(EEPROM_ReadDataWord(203), 0xcdef); + EXPECT_EQ(EEPROM_ReadDataWord(EEPROM_SIZE - 4), 0); + EXPECT_EQ(EEPROM_ReadDataWord(EEPROM_SIZE - 2), 1); +} + +TEST_F(EepromStm32Test, TestByteWordBoundary) { + /* Direct compacted-area write */ + EEPROM_WriteDataWord(0x7e, 0xdead); + EEPROM_WriteDataWord(0x80, 0xbeef); + /* Byte log entry */ + EEPROM_WriteDataByte(0x7f, 0x3c); + /* Word log entry */ + EEPROM_WriteDataByte(0x80, 0x18); + /* Check values */ + EEPROM_Init(); + EXPECT_EQ(EEPROM_ReadDataWord(0x7e), 0x3cad); + EXPECT_EQ(EEPROM_ReadDataWord(0x80), 0xbe18); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE], BYTE_VALUE(0x7f, 0x3c)); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 2], WORD_NEXT(0x80)); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 4], (uint16_t)~0xbe18); + /* Byte log entries */ + EEPROM_WriteDataWord(0x7e, 0xcafe); + /* Check values */ + EEPROM_Init(); + EXPECT_EQ(EEPROM_ReadDataWord(0x7e), 0xcafe); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 6], BYTE_VALUE(0x7e, 0xfe)); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 8], BYTE_VALUE(0x7f, 0xca)); + /* Byte and Word log entries */ + EEPROM_WriteDataWord(0x7f, 0xba5e); + /* Check values */ + EEPROM_Init(); + EXPECT_EQ(EEPROM_ReadDataWord(0x7f), 0xba5e); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 10], BYTE_VALUE(0x7f, 0x5e)); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 12], WORD_NEXT(0x80)); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 14], (uint16_t)~0xbeba); + /* Word log entry */ + EEPROM_WriteDataWord(0x80, 0xf00d); + /* Check values */ + EEPROM_Init(); + EXPECT_EQ(EEPROM_ReadDataWord(0x80), 0xf00d); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 16], WORD_NEXT(0x80)); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + 18], (uint16_t)~0xf00d); +} + +TEST_F(EepromStm32Test, TestDWordRoundTrip) { + /* Direct compacted-area: Address < 0x80 */ + eeprom_write_dword((uint32_t*)0, 0xdeadbeef); // Aligned + eeprom_write_dword((uint32_t*)9, 0x12345678); // Unaligned + /* Direct compacted-area: Address >= 0x80 */ + eeprom_write_dword((uint32_t*)200, 0xfacef00d); + eeprom_write_dword((uint32_t*)(EEPROM_SIZE - 4), 0xba5eba11); // Aligned + eeprom_write_dword((uint32_t*)(EEPROM_SIZE - 9), 0xcafed00d); // Unaligned + /* Check direct values */ + EEPROM_Init(); + EXPECT_EQ(eeprom_read_dword((uint32_t*)0), 0xdeadbeef); + EXPECT_EQ(eeprom_read_dword((uint32_t*)9), 0x12345678); + EXPECT_EQ(eeprom_read_dword((uint32_t*)200), 0xfacef00d); + EXPECT_EQ(eeprom_read_dword((uint32_t*)(EEPROM_SIZE - 4)), 0xba5eba11); // Aligned + EXPECT_EQ(eeprom_read_dword((uint32_t*)(EEPROM_SIZE - 9)), 0xcafed00d); // Unaligned + /* Write Log byte encoded */ + eeprom_write_dword((uint32_t*)0, 0xdecafbad); + eeprom_write_dword((uint32_t*)9, 0x87654321); + /* Write Log word encoded */ + eeprom_write_dword((uint32_t*)200, 1); + /* Write Log word value aligned */ + eeprom_write_dword((uint32_t*)(EEPROM_SIZE - 4), 0xdeadc0de); // Aligned + eeprom_write_dword((uint32_t*)(EEPROM_SIZE - 9), 0x6789abcd); // Unaligned + /* Check log values */ + EEPROM_Init(); + EXPECT_EQ(eeprom_read_dword((uint32_t*)0), 0xdecafbad); + EXPECT_EQ(eeprom_read_dword((uint32_t*)9), 0x87654321); + EXPECT_EQ(eeprom_read_dword((uint32_t*)200), 1); + EXPECT_EQ(eeprom_read_dword((uint32_t*)(EEPROM_SIZE - 4)), 0xdeadc0de); // Aligned + EXPECT_EQ(eeprom_read_dword((uint32_t*)(EEPROM_SIZE - 9)), 0x6789abcd); // Unaligned +} + +TEST_F(EepromStm32Test, TestBlockRoundTrip) { + char src0[] = "0123456789abcdef"; + void* src1 = (void*)&src0[1]; + /* Various alignments of src & dst, Address < 0x80 */ + eeprom_write_block(src0, (void*)0, sizeof(src0)); + eeprom_write_block(src0, (void*)21, sizeof(src0)); + eeprom_write_block(src1, (void*)40, sizeof(src0) - 1); + eeprom_write_block(src1, (void*)61, sizeof(src0) - 1); + /* Various alignments of src & dst, Address >= 0x80 */ + eeprom_write_block(src0, (void*)140, sizeof(src0)); + eeprom_write_block(src0, (void*)161, sizeof(src0)); + eeprom_write_block(src1, (void*)180, sizeof(src0) - 1); + eeprom_write_block(src1, (void*)201, sizeof(src0) - 1); + + /* Check values */ + EEPROM_Init(); + + char dstBuf[256] = {0}; + char* dst0a = (char*)dstBuf; + char* dst0b = (char*)&dstBuf[20]; + char* dst1a = (char*)&dstBuf[41]; + char* dst1b = (char*)&dstBuf[61]; + char* dst0c = (char*)&dstBuf[80]; + char* dst0d = (char*)&dstBuf[100]; + char* dst1c = (char*)&dstBuf[121]; + char* dst1d = (char*)&dstBuf[141]; + eeprom_read_block((void*)dst0a, (void*)0, sizeof(src0)); + eeprom_read_block((void*)dst0b, (void*)21, sizeof(src0)); + eeprom_read_block((void*)dst1a, (void*)40, sizeof(src0) - 1); + eeprom_read_block((void*)dst1b, (void*)61, sizeof(src0) - 1); + eeprom_read_block((void*)dst0c, (void*)140, sizeof(src0)); + eeprom_read_block((void*)dst0d, (void*)161, sizeof(src0)); + eeprom_read_block((void*)dst1c, (void*)180, sizeof(src0) - 1); + eeprom_read_block((void*)dst1d, (void*)201, sizeof(src0) - 1); + EXPECT_EQ(strcmp((char*)src0, dst0a), 0); + EXPECT_EQ(strcmp((char*)src0, dst0b), 0); + EXPECT_EQ(strcmp((char*)src0, dst0c), 0); + EXPECT_EQ(strcmp((char*)src0, dst0d), 0); + EXPECT_EQ(strcmp((char*)src1, dst1a), 0); + EXPECT_EQ(strcmp((char*)src1, dst1b), 0); + EXPECT_EQ(strcmp((char*)src1, dst1c), 0); + EXPECT_EQ(strcmp((char*)src1, dst1d), 0); +} + +TEST_F(EepromStm32Test, TestCompaction) { + /* Direct writes */ + eeprom_write_dword((uint32_t*)0, 0xdeadbeef); + eeprom_write_byte((uint8_t*)4, 0x3c); + eeprom_write_word((uint16_t*)6, 0xd00d); + eeprom_write_dword((uint32_t*)150, 0xcafef00d); + eeprom_write_dword((uint32_t*)200, 0x12345678); + /* Fill write log entries */ + uint32_t i; + uint32_t val = 0xd8453c6b; + for (i = 0; i < (LOG_SIZE / (sizeof(uint32_t) * 2)); i++) { + val ^= 0x593ca5b3; + val += i; + eeprom_write_dword((uint32_t*)200, val); + } + /* Check values pre-compaction */ + EEPROM_Init(); + EXPECT_EQ(eeprom_read_dword((uint32_t*)0), 0xdeadbeef); + EXPECT_EQ(eeprom_read_byte((uint8_t*)4), 0x3c); + EXPECT_EQ(eeprom_read_word((uint16_t*)6), 0xd00d); + EXPECT_EQ(eeprom_read_dword((uint32_t*)150), 0xcafef00d); + EXPECT_EQ(eeprom_read_dword((uint32_t*)200), val); + EXPECT_NE(*(uint16_t*)&FlashBuf[LOG_BASE], 0xFFFF); + EXPECT_NE(*(uint16_t*)&FlashBuf[LOG_BASE + LOG_SIZE - 2], 0xFFFF); + /* Run compaction */ + eeprom_write_byte((uint8_t*)4, 0x1f); + EEPROM_Init(); + EXPECT_EQ(eeprom_read_dword((uint32_t*)0), 0xdeadbeef); + EXPECT_EQ(eeprom_read_byte((uint8_t*)4), 0x1f); + EXPECT_EQ(eeprom_read_word((uint16_t*)6), 0xd00d); + EXPECT_EQ(eeprom_read_dword((uint32_t*)150), 0xcafef00d); + EXPECT_EQ(eeprom_read_dword((uint32_t*)200), val); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE], 0xFFFF); + EXPECT_EQ(*(uint16_t*)&FlashBuf[LOG_BASE + LOG_SIZE - 2], 0xFFFF); +} diff --git a/tmk_core/common/test/flash_stm32_mock.c b/tmk_core/common/test/flash_stm32_mock.c new file mode 100644 index 000000000..1b81d81f9 --- /dev/null +++ b/tmk_core/common/test/flash_stm32_mock.c @@ -0,0 +1,50 @@ +/* Copyright 2021 by Don Kjer + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include +#include +#include "flash_stm32.h" + +uint8_t FlashBuf[MOCK_FLASH_SIZE] = {0}; + +static bool flash_locked = true; + +FLASH_Status FLASH_ErasePage(uint32_t Page_Address) { + if (flash_locked) return FLASH_ERROR_WRP; + Page_Address -= (uintptr_t)FlashBuf; + Page_Address -= (Page_Address % FEE_PAGE_SIZE); + if (Page_Address >= MOCK_FLASH_SIZE) return FLASH_BAD_ADDRESS; + memset(&FlashBuf[Page_Address], '\xff', FEE_PAGE_SIZE); + return FLASH_COMPLETE; +} + +FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data) { + if (flash_locked) return FLASH_ERROR_WRP; + Address -= (uintptr_t)FlashBuf; + if (Address >= MOCK_FLASH_SIZE) return FLASH_BAD_ADDRESS; + uint16_t oldData = *(uint16_t*)&FlashBuf[Address]; + if (oldData == 0xFFFF || Data == 0) { + *(uint16_t*)&FlashBuf[Address] = Data; + return FLASH_COMPLETE; + } else { + return FLASH_ERROR_PG; + } +} + +FLASH_Status FLASH_WaitForLastOperation(uint32_t Timeout) { return FLASH_COMPLETE; } +void FLASH_Unlock(void) { flash_locked = false; } +void FLASH_Lock(void) { flash_locked = true; } +void FLASH_ClearFlag(uint32_t FLASH_FLAG) {} diff --git a/tmk_core/common/test/platform.c b/tmk_core/common/test/platform.c new file mode 100644 index 000000000..8ddceeda8 --- /dev/null +++ b/tmk_core/common/test/platform.c @@ -0,0 +1,21 @@ +/* Copyright 2021 QMK + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "platform_deps.h" + +void platform_setup(void) { + // do nothing +} \ No newline at end of file diff --git a/tmk_core/common/test/rules.mk b/tmk_core/common/test/rules.mk new file mode 100644 index 000000000..e47e5880c --- /dev/null +++ b/tmk_core/common/test/rules.mk @@ -0,0 +1,23 @@ +eeprom_stm32_DEFS := -DFLASH_STM32_MOCKED -DNO_PRINT -DFEE_FLASH_BASE=FlashBuf +eeprom_stm32_tiny_DEFS := $(eeprom_stm32_DEFS) \ + -DFEE_MCU_FLASH_SIZE=1 \ + -DMOCK_FLASH_SIZE=1024 \ + -DFEE_PAGE_SIZE=512 \ + -DFEE_DENSITY_PAGES=1 +eeprom_stm32_large_DEFS := $(eeprom_stm32_DEFS) \ + -DFEE_MCU_FLASH_SIZE=64 \ + -DMOCK_FLASH_SIZE=65536 \ + -DFEE_PAGE_SIZE=2048 \ + -DFEE_DENSITY_PAGES=16 + +eeprom_stm32_INC := \ + $(TMK_PATH)/common/chibios/ +eeprom_stm32_tiny_INC := $(eeprom_stm32_INC) +eeprom_stm32_large_INC := $(eeprom_stm32_INC) + +eeprom_stm32_SRC := \ + $(TMK_PATH)/common/test/eeprom_stm32_tests.cpp \ + $(TMK_PATH)/common/test/flash_stm32_mock.c \ + $(TMK_PATH)/common/chibios/eeprom_stm32.c +eeprom_stm32_tiny_SRC := $(eeprom_stm32_SRC) +eeprom_stm32_large_SRC := $(eeprom_stm32_SRC) diff --git a/tmk_core/common/test/testlist.mk b/tmk_core/common/test/testlist.mk new file mode 100644 index 000000000..51a9638bb --- /dev/null +++ b/tmk_core/common/test/testlist.mk @@ -0,0 +1 @@ +TEST_LIST += eeprom_stm32_tiny eeprom_stm32_large diff --git a/tmk_core/common/timer.h b/tmk_core/common/timer.h index abddcea85..02e39e79e 100644 --- a/tmk_core/common/timer.h +++ b/tmk_core/common/timer.h @@ -1,5 +1,6 @@ /* Copyright 2011 Jun Wako +Copyright 2021 Simon Arlott This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,6 +18,10 @@ along with this program. If not, see . #pragma once +#if __has_include_next("_timer.h") +# include_next "_timer.h" /* Include the platform's _timer.h */ +#endif + #include #define TIMER_DIFF(a, b, max) ((max == UINT8_MAX) ? ((uint8_t)((a) - (b))) : ((max == UINT16_MAX) ? ((uint16_t)((a) - (b))) : ((max == UINT32_MAX) ? ((uint32_t)((a) - (b))) : ((a) >= (b) ? (a) - (b) : (max) + 1 - (b) + (a))))) @@ -42,6 +47,21 @@ uint32_t timer_elapsed32(uint32_t last); #define timer_expired(current, future) ((uint16_t)(current - future) < UINT16_MAX / 2) #define timer_expired32(current, future) ((uint32_t)(current - future) < UINT32_MAX / 2) +// Use an appropriate timer integer size based on architecture (16-bit will overflow sooner) +#if FAST_TIMER_T_SIZE < 32 +# define TIMER_DIFF_FAST(a, b) TIMER_DIFF_16(a, b) +# define timer_expired_fast(current, future) timer_expired(current, future) +typedef uint16_t fast_timer_t; +fast_timer_t inline timer_read_fast(void) { return timer_read(); } +fast_timer_t inline timer_elapsed_fast(fast_timer_t last) { return timer_elapsed(last); } +#else +# define TIMER_DIFF_FAST(a, b) TIMER_DIFF_32(a, b) +# define timer_expired_fast(current, future) timer_expired32(current, future) +typedef uint32_t fast_timer_t; +fast_timer_t inline timer_read_fast(void) { return timer_read32(); } +fast_timer_t inline timer_elapsed_fast(fast_timer_t last) { return timer_elapsed32(last); } +#endif + #ifdef __cplusplus } #endif diff --git a/tmk_core/common/usb_util.c b/tmk_core/common/usb_util.c index d4134a044..dd1deeaa1 100644 --- a/tmk_core/common/usb_util.c +++ b/tmk_core/common/usb_util.c @@ -16,7 +16,7 @@ #include "quantum.h" #include "usb_util.h" -__attribute__((weak)) void usb_disable(void) {} +__attribute__((weak)) void usb_disconnect(void) {} __attribute__((weak)) bool usb_connected_state(void) { return true; } __attribute__((weak)) bool usb_vbus_state(void) { #ifdef USB_VBUS_PIN diff --git a/tmk_core/common/usb_util.h b/tmk_core/common/usb_util.h index 4ebedb1e7..13db9fbfb 100644 --- a/tmk_core/common/usb_util.h +++ b/tmk_core/common/usb_util.h @@ -17,6 +17,6 @@ #include -void usb_disable(void); +void usb_disconnect(void); bool usb_connected_state(void); bool usb_vbus_state(void); diff --git a/tmk_core/native.mk b/tmk_core/native.mk index 3caf64454..f609fd0e6 100644 --- a/tmk_core/native.mk +++ b/tmk_core/native.mk @@ -1,4 +1,5 @@ SYSTEM_TYPE := $(shell gcc -dumpmachine) +GCC_VERSION := $(shell gcc --version 2>/dev/null) CC = gcc OBJCOPY = @@ -12,7 +13,9 @@ BIN = COMPILEFLAGS += -funsigned-char +ifeq ($(findstring clang, ${GCC_VERSION}),) COMPILEFLAGS += -funsigned-bitfields +endif COMPILEFLAGS += -ffunction-sections COMPILEFLAGS += -fdata-sections COMPILEFLAGS += -fshort-enums @@ -21,7 +24,9 @@ COMPILEFLAGS += -mno-ms-bitfields endif CFLAGS += $(COMPILEFLAGS) +ifeq ($(findstring clang, ${GCC_VERSION}),) CFLAGS += -fno-inline-small-functions +endif CFLAGS += -fno-strict-aliasing CXXFLAGS += $(COMPILEFLAGS) diff --git a/tmk_core/protocol.mk b/tmk_core/protocol.mk index cc87e8347..b61f2f546 100644 --- a/tmk_core/protocol.mk +++ b/tmk_core/protocol.mk @@ -14,13 +14,13 @@ endif ifeq ($(strip $(PS2_USE_INT)), yes) SRC += protocol/ps2_interrupt.c - SRC += protocol/ps2_io_avr.c + SRC += protocol/ps2_io_$(PLATFORM_KEY).c OPT_DEFS += -DPS2_USE_INT endif ifeq ($(strip $(PS2_USE_USART)), yes) SRC += protocol/ps2_usart.c - SRC += protocol/ps2_io_avr.c + SRC += protocol/ps2_io_$(PLATFORM_KEY).c OPT_DEFS += -DPS2_USE_USART endif diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index abea12134..858b4cd9f 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -16,7 +16,7 @@ along with this program. If not, see . */ #include "samd51j18a.h" -#include "tmk_core/common/keyboard.h" +#include "keyboard.h" #include "report.h" #include "host.h" diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c index 609ae047e..98967aac8 100644 --- a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c +++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c @@ -291,10 +291,10 @@ static void flush(void) { i2c_led_q_run(); } -void md_rgb_matrix_indicators(void) { +void md_rgb_matrix_indicators_advanced(uint8_t led_min, uint8_t led_max) { uint8_t kbled = keyboard_leds(); if (kbled && rgb_matrix_config.enable) { - for (uint8_t i = 0; i < ISSI3733_LED_COUNT; i++) { + for (uint8_t i = led_min; i < led_max; i++) { if ( # if USB_LED_NUM_LOCK_SCANCODE != 255 (led_map[i].scan == USB_LED_NUM_LOCK_SCANCODE && (kbled & (1 << USB_LED_NUM_LOCK))) || diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix.h b/tmk_core/protocol/arm_atsam/md_rgb_matrix.h index 322b0f99d..76ccaa678 100644 --- a/tmk_core/protocol/arm_atsam/md_rgb_matrix.h +++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix.h @@ -86,7 +86,7 @@ extern uint8_t gcr_actual_last; void gcr_compute(void); -void md_rgb_matrix_indicators(void); +void md_rgb_matrix_indicators_advanced(uint8_t led_min, uint8_t led_max); /*------------------------- Legacy Lighting Support ------------------------*/ diff --git a/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h b/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h index 9c9d94789..1c0983115 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h +++ b/tmk_core/protocol/arm_atsam/usb/udi_device_conf.h @@ -23,6 +23,10 @@ along with this program. If not, see . #include "compiler.h" #include "usb_protocol_hid.h" +#ifndef USB_POLLING_INTERVAL_MS +# define USB_POLLING_INTERVAL_MS 10 +#endif + #ifdef VIRTSER_ENABLE // because CDC uses IAD (interface association descriptor // per USB Interface Association Descriptor Device Class Code and Use Model 7/23/2003 Rev 1.0) @@ -118,7 +122,7 @@ along with this program. If not, see . #define UDI_HID_KBD_EP_IN KEYBOARD_IN_EPNUM #define NEXT_IN_EPNUM_1 (KEYBOARD_IN_EPNUM + 1) #define UDI_HID_KBD_EP_SIZE KEYBOARD_EPSIZE -#define KBD_POLLING_INTERVAL 10 +#define KBD_POLLING_INTERVAL USB_POLLING_INTERVAL_MS #ifndef UDI_HID_KBD_STRING_ID # define UDI_HID_KBD_STRING_ID 0 #endif @@ -128,7 +132,7 @@ along with this program. If not, see . # define NEXT_IN_EPNUM_2 (MOUSE_IN_EPNUM + 1) # define UDI_HID_MOU_EP_IN MOUSE_IN_EPNUM # define UDI_HID_MOU_EP_SIZE MOUSE_EPSIZE -# define MOU_POLLING_INTERVAL 10 +# define MOU_POLLING_INTERVAL USB_POLLING_INTERVAL_MS # ifndef UDI_HID_MOU_STRING_ID # define UDI_HID_MOU_STRING_ID 0 # endif @@ -141,7 +145,7 @@ along with this program. If not, see . # define UDI_HID_EXK_EP_IN EXTRAKEY_IN_EPNUM # define NEXT_IN_EPNUM_3 (EXTRAKEY_IN_EPNUM + 1) # define UDI_HID_EXK_EP_SIZE EXTRAKEY_EPSIZE -# define EXTRAKEY_POLLING_INTERVAL 10 +# define EXTRAKEY_POLLING_INTERVAL USB_POLLING_INTERVAL_MS # ifndef UDI_HID_EXK_STRING_ID # define UDI_HID_EXK_STRING_ID 0 # endif diff --git a/tmk_core/protocol/chibios.mk b/tmk_core/protocol/chibios.mk index d01697835..a7f2d8e93 100644 --- a/tmk_core/protocol/chibios.mk +++ b/tmk_core/protocol/chibios.mk @@ -3,7 +3,7 @@ CHIBIOS_DIR = $(PROTOCOL_DIR)/chibios SRC += $(CHIBIOS_DIR)/usb_main.c -SRC += $(CHIBIOS_DIR)/main.c +SRC += $(CHIBIOS_DIR)/chibios.c SRC += usb_descriptor.c SRC += $(CHIBIOS_DIR)/usb_driver.c SRC += $(CHIBIOS_DIR)/usb_util.c diff --git a/tmk_core/protocol/chibios/chibios.c b/tmk_core/protocol/chibios/chibios.c new file mode 100644 index 000000000..78a2e3fcb --- /dev/null +++ b/tmk_core/protocol/chibios/chibios.c @@ -0,0 +1,255 @@ +/* + * (c) 2015 flabberast + * + * Based on the following work: + * - Guillaume Duc's raw hid example (MIT License) + * https://github.com/guiduc/usb-hid-chibios-example + * - PJRC Teensy examples (MIT License) + * https://www.pjrc.com/teensy/usb_keyboard.html + * - hasu's TMK keyboard code (GPL v2 and some code Modified BSD) + * https://github.com/tmk/tmk_keyboard/ + * - ChibiOS demo code (Apache 2.0 License) + * http://www.chibios.org + * + * Since some GPL'd code is used, this work is licensed under + * GPL v2 or later. + */ + +#include +#include + +#include "usb_main.h" + +/* TMK includes */ +#include "report.h" +#include "host.h" +#include "host_driver.h" +#include "keyboard.h" +#include "action.h" +#include "action_util.h" +#include "mousekey.h" +#include "led.h" +#include "sendchar.h" +#include "debug.h" +#include "print.h" + +#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP +// Change this to be TRUE once we've migrated keyboards to the new init system +// Remember to change docs/platformdev_chibios_earlyinit.md as well. +# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE +#endif + +#ifdef SLEEP_LED_ENABLE +# include "sleep_led.h" +#endif +#ifdef SERIAL_LINK_ENABLE +# include "serial_link/system/serial_link.h" +#endif +#ifdef VISUALIZER_ENABLE +# include "visualizer/visualizer.h" +#endif +#ifdef MIDI_ENABLE +# include "qmk_midi.h" +#endif +#include "suspend.h" +#include "wait.h" + +/* ------------------------- + * TMK host driver defs + * ------------------------- + */ + +/* declarations */ +uint8_t keyboard_leds(void); +void send_keyboard(report_keyboard_t *report); +void send_mouse(report_mouse_t *report); +void send_system(uint16_t data); +void send_consumer(uint16_t data); +void send_digitizer(report_digitizer_t *report); + +/* host struct */ +host_driver_t chibios_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; + +#ifdef VIRTSER_ENABLE +void virtser_task(void); +#endif + +#ifdef RAW_ENABLE +void raw_hid_task(void); +#endif + +#ifdef CONSOLE_ENABLE +void console_task(void); +#endif +#ifdef MIDI_ENABLE +void midi_ep_task(void); +#endif + +/* TESTING + * Amber LED blinker thread, times are in milliseconds. + */ +/* set this variable to non-zero anywhere to blink once */ +// static THD_WORKING_AREA(waThread1, 128); +// static THD_FUNCTION(Thread1, arg) { + +// (void)arg; +// chRegSetThreadName("blinker"); +// while (true) { +// systime_t time; + +// time = USB_DRIVER.state == USB_ACTIVE ? 250 : 500; +// palClearLine(LINE_CAPS_LOCK); +// chSysPolledDelayX(MS2RTC(STM32_HCLK, time)); +// palSetLine(LINE_CAPS_LOCK); +// chSysPolledDelayX(MS2RTC(STM32_HCLK, time)); +// } +// } + +/* Early initialisation + */ +__attribute__((weak)) void early_hardware_init_pre(void) { +#if EARLY_INIT_PERFORM_BOOTLOADER_JUMP + void enter_bootloader_mode_if_requested(void); + enter_bootloader_mode_if_requested(); +#endif // EARLY_INIT_PERFORM_BOOTLOADER_JUMP +} + +__attribute__((weak)) void early_hardware_init_post(void) {} + +__attribute__((weak)) void board_init(void) {} + +// This overrides what's normally in ChibiOS board definitions +void __early_init(void) { + early_hardware_init_pre(); + + // This is the renamed equivalent of __early_init in the board.c file + void __chibios_override___early_init(void); + __chibios_override___early_init(); + + early_hardware_init_post(); +} + +// This overrides what's normally in ChibiOS board definitions +void boardInit(void) { + // This is the renamed equivalent of boardInit in the board.c file + void __chibios_override_boardInit(void); + __chibios_override_boardInit(); + + board_init(); +} + +void protocol_setup(void) { + // TESTING + // chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); + + keyboard_setup(); +} + +void protocol_init(void) { + /* Init USB */ + usb_event_queue_init(); + init_usb_driver(&USB_DRIVER); + +#ifdef MIDI_ENABLE + setup_midi(); +#endif + +#ifdef SERIAL_LINK_ENABLE + init_serial_link(); +#endif + +#ifdef VISUALIZER_ENABLE + visualizer_init(); +#endif + + host_driver_t *driver = NULL; + + /* Wait until the USB or serial link is active */ + while (true) { +#if defined(WAIT_FOR_USB) || defined(SERIAL_LINK_ENABLE) + if (USB_DRIVER.state == USB_ACTIVE) { + driver = &chibios_driver; + break; + } +#else + driver = &chibios_driver; + break; +#endif +#ifdef SERIAL_LINK_ENABLE + if (is_serial_link_connected()) { + driver = get_serial_link_driver(); + break; + } + serial_link_update(); +#endif + wait_ms(50); + } + + /* Do need to wait here! + * Otherwise the next print might start a transfer on console EP + * before the USB is completely ready, which sometimes causes + * HardFaults. + */ + wait_ms(50); + + print("USB configured.\n"); + + /* init TMK modules */ + keyboard_init(); + host_set_driver(driver); + +#ifdef SLEEP_LED_ENABLE + sleep_led_init(); +#endif + + print("Keyboard start.\n"); +} + +void protocol_task(void) { + usb_event_queue_task(); + +#if !defined(NO_USB_STARTUP_CHECK) + if (USB_DRIVER.state == USB_SUSPENDED) { + print("[s]"); +# ifdef VISUALIZER_ENABLE + visualizer_suspend(); +# endif + while (USB_DRIVER.state == USB_SUSPENDED) { + /* Do this in the suspended state */ +# ifdef SERIAL_LINK_ENABLE + serial_link_update(); +# endif + suspend_power_down(); // on AVR this deep sleeps for 15ms + /* Remote wakeup */ + if (suspend_wakeup_condition()) { + usbWakeupHost(&USB_DRIVER); + restart_usb_driver(&USB_DRIVER); + } + } + /* Woken up */ + // variables has been already cleared by the wakeup hook + send_keyboard_report(); +# ifdef MOUSEKEY_ENABLE + mousekey_send(); +# endif /* MOUSEKEY_ENABLE */ + +# ifdef VISUALIZER_ENABLE + visualizer_resume(); +# endif + } +#endif + + keyboard_task(); +#ifdef CONSOLE_ENABLE + console_task(); +#endif +#ifdef MIDI_ENABLE + midi_ep_task(); +#endif +#ifdef VIRTSER_ENABLE + virtser_task(); +#endif +#ifdef RAW_ENABLE + raw_hid_task(); +#endif +} diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c deleted file mode 100644 index 199741594..000000000 --- a/tmk_core/protocol/chibios/main.c +++ /dev/null @@ -1,262 +0,0 @@ -/* - * (c) 2015 flabberast - * - * Based on the following work: - * - Guillaume Duc's raw hid example (MIT License) - * https://github.com/guiduc/usb-hid-chibios-example - * - PJRC Teensy examples (MIT License) - * https://www.pjrc.com/teensy/usb_keyboard.html - * - hasu's TMK keyboard code (GPL v2 and some code Modified BSD) - * https://github.com/tmk/tmk_keyboard/ - * - ChibiOS demo code (Apache 2.0 License) - * http://www.chibios.org - * - * Since some GPL'd code is used, this work is licensed under - * GPL v2 or later. - */ - -#include -#include - -#include "usb_main.h" - -/* TMK includes */ -#include "report.h" -#include "host.h" -#include "host_driver.h" -#include "keyboard.h" -#include "action.h" -#include "action_util.h" -#include "mousekey.h" -#include "led.h" -#include "sendchar.h" -#include "debug.h" -#include "print.h" - -#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP -// Change this to be TRUE once we've migrated keyboards to the new init system -// Remember to change docs/platformdev_chibios_earlyinit.md as well. -# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE -#endif - -#ifdef SLEEP_LED_ENABLE -# include "sleep_led.h" -#endif -#ifdef SERIAL_LINK_ENABLE -# include "serial_link/system/serial_link.h" -#endif -#ifdef VISUALIZER_ENABLE -# include "visualizer/visualizer.h" -#endif -#ifdef MIDI_ENABLE -# include "qmk_midi.h" -#endif -#include "suspend.h" -#include "wait.h" - -/* ------------------------- - * TMK host driver defs - * ------------------------- - */ - -/* declarations */ -uint8_t keyboard_leds(void); -void send_keyboard(report_keyboard_t *report); -void send_mouse(report_mouse_t *report); -void send_system(uint16_t data); -void send_consumer(uint16_t data); - -/* host struct */ -host_driver_t chibios_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; - -#ifdef VIRTSER_ENABLE -void virtser_task(void); -#endif - -#ifdef RAW_ENABLE -void raw_hid_task(void); -#endif - -#ifdef CONSOLE_ENABLE -void console_task(void); -#endif -#ifdef MIDI_ENABLE -void midi_ep_task(void); -#endif - -/* TESTING - * Amber LED blinker thread, times are in milliseconds. - */ -/* set this variable to non-zero anywhere to blink once */ -// static THD_WORKING_AREA(waThread1, 128); -// static THD_FUNCTION(Thread1, arg) { - -// (void)arg; -// chRegSetThreadName("blinker"); -// while (true) { -// systime_t time; - -// time = USB_DRIVER.state == USB_ACTIVE ? 250 : 500; -// palClearLine(LINE_CAPS_LOCK); -// chSysPolledDelayX(MS2RTC(STM32_HCLK, time)); -// palSetLine(LINE_CAPS_LOCK); -// chSysPolledDelayX(MS2RTC(STM32_HCLK, time)); -// } -// } - -/* Early initialisation - */ -__attribute__((weak)) void early_hardware_init_pre(void) { -#if EARLY_INIT_PERFORM_BOOTLOADER_JUMP - void enter_bootloader_mode_if_requested(void); - enter_bootloader_mode_if_requested(); -#endif // EARLY_INIT_PERFORM_BOOTLOADER_JUMP -} - -__attribute__((weak)) void early_hardware_init_post(void) {} - -__attribute__((weak)) void board_init(void) {} - -// This overrides what's normally in ChibiOS board definitions -void __early_init(void) { - early_hardware_init_pre(); - - // This is the renamed equivalent of __early_init in the board.c file - void __chibios_override___early_init(void); - __chibios_override___early_init(); - - early_hardware_init_post(); -} - -// This overrides what's normally in ChibiOS board definitions -void boardInit(void) { - // This is the renamed equivalent of boardInit in the board.c file - void __chibios_override_boardInit(void); - __chibios_override_boardInit(); - - board_init(); -} - -/* Main thread - */ -int main(void) { - /* ChibiOS/RT init */ - halInit(); - chSysInit(); - - // TESTING - // chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); - - keyboard_setup(); - - /* Init USB */ - usb_event_queue_init(); - init_usb_driver(&USB_DRIVER); - -#ifdef MIDI_ENABLE - setup_midi(); -#endif - -#ifdef SERIAL_LINK_ENABLE - init_serial_link(); -#endif - -#ifdef VISUALIZER_ENABLE - visualizer_init(); -#endif - - host_driver_t *driver = NULL; - - /* Wait until the USB or serial link is active */ - while (true) { -#if defined(WAIT_FOR_USB) || defined(SERIAL_LINK_ENABLE) - if (USB_DRIVER.state == USB_ACTIVE) { - driver = &chibios_driver; - break; - } -#else - driver = &chibios_driver; - break; -#endif -#ifdef SERIAL_LINK_ENABLE - if (is_serial_link_connected()) { - driver = get_serial_link_driver(); - break; - } - serial_link_update(); -#endif - wait_ms(50); - } - - /* Do need to wait here! - * Otherwise the next print might start a transfer on console EP - * before the USB is completely ready, which sometimes causes - * HardFaults. - */ - wait_ms(50); - - print("USB configured.\n"); - - /* init TMK modules */ - keyboard_init(); - host_set_driver(driver); - -#ifdef SLEEP_LED_ENABLE - sleep_led_init(); -#endif - - print("Keyboard start.\n"); - - /* Main loop */ - while (true) { - usb_event_queue_task(); - -#if !defined(NO_USB_STARTUP_CHECK) - if (USB_DRIVER.state == USB_SUSPENDED) { - print("[s]"); -# ifdef VISUALIZER_ENABLE - visualizer_suspend(); -# endif - while (USB_DRIVER.state == USB_SUSPENDED) { - /* Do this in the suspended state */ -# ifdef SERIAL_LINK_ENABLE - serial_link_update(); -# endif - suspend_power_down(); // on AVR this deep sleeps for 15ms - /* Remote wakeup */ - if (suspend_wakeup_condition()) { - usbWakeupHost(&USB_DRIVER); - restart_usb_driver(&USB_DRIVER); - } - } - /* Woken up */ - // variables has been already cleared by the wakeup hook - send_keyboard_report(); -# ifdef MOUSEKEY_ENABLE - mousekey_send(); -# endif /* MOUSEKEY_ENABLE */ - -# ifdef VISUALIZER_ENABLE - visualizer_resume(); -# endif - } -#endif - - keyboard_task(); -#ifdef CONSOLE_ENABLE - console_task(); -#endif -#ifdef MIDI_ENABLE - midi_ep_task(); -#endif -#ifdef VIRTSER_ENABLE - virtser_task(); -#endif -#ifdef RAW_ENABLE - raw_hid_task(); -#endif - - // Run housekeeping - housekeeping_task(); - } -} diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index d04302aca..cc282e6a9 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -315,6 +315,9 @@ typedef struct { #endif #ifdef JOYSTICK_ENABLE usb_driver_config_t joystick_driver; +#endif +#if defined(DIGITIZER_ENABLE) && !defined(DIGITIZER_SHARED_EP) + usb_driver_config_t digitizer_driver; #endif }; usb_driver_config_t array[0]; @@ -360,6 +363,14 @@ static usb_driver_configs_t drivers = { # define JOYSTICK_OUT_MODE USB_EP_MODE_TYPE_BULK .joystick_driver = QMK_USB_DRIVER_CONFIG(JOYSTICK, 0, false), #endif + +#if defined(DIGITIZER_ENABLE) && !defined(DIGITIZER_SHARED_EP) +# define DIGITIZER_IN_CAPACITY 4 +# define DIGITIZER_OUT_CAPACITY 4 +# define DIGITIZER_IN_MODE USB_EP_MODE_TYPE_BULK +# define DIGITIZER_OUT_MODE USB_EP_MODE_TYPE_BULK + .digitizer_driver = QMK_USB_DRIVER_CONFIG(DIGITIZER, 0, false), +#endif }; #define NUM_USB_DRIVERS (sizeof(drivers) / sizeof(usb_driver_config_t)) @@ -415,14 +426,18 @@ static inline void usb_event_wakeup_handler(void) { #endif /* SLEEP_LED_ENABLE */ } +bool last_suspend_state = false; + void usb_event_queue_task(void) { usbevent_t event; while (usb_event_queue_dequeue(&event)) { switch (event) { case USB_EVENT_SUSPEND: + last_suspend_state = true; usb_event_suspend_handler(); break; case USB_EVENT_WAKEUP: + last_suspend_state = false; usb_event_wakeup_handler(); break; default: @@ -464,6 +479,9 @@ static void usb_event_cb(USBDriver *usbp, usbevent_t event) { qmkusbConfigureHookI(&drivers.array[i].driver); } osalSysUnlockFromISR(); + if (last_suspend_state) { + usb_event_queue_enqueue(USB_EVENT_WAKEUP); + } return; case USB_EVENT_SUSPEND: usb_event_queue_enqueue(USB_EVENT_SUSPEND); @@ -518,7 +536,7 @@ static uint16_t get_hword(uint8_t *p) { * Other Device Required Optional Optional Optional Optional Optional */ -static uint8_t set_report_buf[2] __attribute__((aligned(2))); +static uint8_t set_report_buf[2] __attribute__((aligned(4))); static void set_led_transfer_cb(USBDriver *usbp) { if (usbp->setup[6] == 2) { /* LSB(wLength) */ uint8_t report_id = set_report_buf[0]; @@ -705,7 +723,7 @@ void init_usb_driver(USBDriver *usbp) { chVTObjectInit(&keyboard_idle_timer); } -void restart_usb_driver(USBDriver *usbp) { +__attribute__((weak)) void restart_usb_driver(USBDriver *usbp) { usbStop(usbp); usbDisconnectBus(usbp); @@ -903,7 +921,8 @@ static void send_extra(uint8_t report_id, uint16_t data) { return; } - report_extra_t report = {.report_id = report_id, .usage = data}; + static report_extra_t report; + report = (report_extra_t){.report_id = report_id, .usage = data}; usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)&report, sizeof(report_extra_t)); osalSysUnlock(); @@ -922,6 +941,23 @@ void send_consumer(uint16_t data) { #endif } +void send_digitizer(report_digitizer_t *report) { +#ifdef DIGITIZER_ENABLE +# ifdef DIGITIZER_SHARED_EP + osalSysLock(); + if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { + osalSysUnlock(); + return; + } + + usbStartTransmitI(&USB_DRIVER, DIGITIZER_IN_EPNUM, (uint8_t *)report, sizeof(report_digitizer_t)); + osalSysUnlock(); +# else + chnWrite(&drivers.digitizer_driver.driver, (uint8_t *)report, sizeof(report_digitizer_t)); +# endif +#endif +} + /* --------------------------------------------------------- * Console functions * --------------------------------------------------------- @@ -1051,45 +1087,44 @@ void virtser_task(void) { #ifdef JOYSTICK_ENABLE void send_joystick_packet(joystick_t *joystick) { - joystick_report_t rep = { + static joystick_report_t rep; + rep = (joystick_report_t) { # if JOYSTICK_AXES_COUNT > 0 .axes = - { - joystick->axes[0], + { joystick->axes[0], # if JOYSTICK_AXES_COUNT >= 2 - joystick->axes[1], + joystick->axes[1], # endif # if JOYSTICK_AXES_COUNT >= 3 - joystick->axes[2], + joystick->axes[2], # endif # if JOYSTICK_AXES_COUNT >= 4 - joystick->axes[3], + joystick->axes[3], # endif # if JOYSTICK_AXES_COUNT >= 5 - joystick->axes[4], + joystick->axes[4], # endif # if JOYSTICK_AXES_COUNT >= 6 - joystick->axes[5], + joystick->axes[5], # endif - }, + }, # endif // JOYSTICK_AXES_COUNT>0 # if JOYSTICK_BUTTON_COUNT > 0 - .buttons = - { - joystick->buttons[0], + .buttons = { + joystick->buttons[0], # if JOYSTICK_BUTTON_COUNT > 8 - joystick->buttons[1], + joystick->buttons[1], # endif # if JOYSTICK_BUTTON_COUNT > 16 - joystick->buttons[2], + joystick->buttons[2], # endif # if JOYSTICK_BUTTON_COUNT > 24 - joystick->buttons[3], + joystick->buttons[3], # endif - } + } # endif // JOYSTICK_BUTTON_COUNT>0 }; diff --git a/tmk_core/protocol/chibios/usb_util.c b/tmk_core/protocol/chibios/usb_util.c index 5945e8a8d..e32d6ebfa 100644 --- a/tmk_core/protocol/chibios/usb_util.c +++ b/tmk_core/protocol/chibios/usb_util.c @@ -16,6 +16,6 @@ #include #include "usb_util.h" -void usb_disable(void) { usbStop(&USBD1); } +void usb_disconnect(void) { usbStop(&USBD1); } bool usb_connected_state(void) { return usbGetDriverStateI(&USBD1) == USB_ACTIVE; } diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index 514d5fac4..c8935dacb 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -49,7 +49,6 @@ SRC += $(LUFA_DIR)/usb_util.c # Search Path VPATH += $(TMK_PATH)/$(LUFA_DIR) VPATH += $(LUFA_PATH) -VPATH += $(DRIVER_PATH)/avr # Option modules #ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 63619fdb3..4e17834be 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -142,9 +142,7 @@ static void send_keyboard(report_keyboard_t *report); static void send_mouse(report_mouse_t *report); static void send_system(uint16_t data); static void send_consumer(uint16_t data); -host_driver_t lufa_driver = { - keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer, -}; +host_driver_t lufa_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; #ifdef VIRTSER_ENABLE // clang-format off @@ -314,45 +312,44 @@ static void Console_Task(void) { void send_joystick_packet(joystick_t *joystick) { uint8_t timeout = 255; - joystick_report_t r = { + static joystick_report_t r; + r = (joystick_report_t) { # if JOYSTICK_AXES_COUNT > 0 .axes = - { - joystick->axes[0], + { joystick->axes[0], # if JOYSTICK_AXES_COUNT >= 2 - joystick->axes[1], + joystick->axes[1], # endif # if JOYSTICK_AXES_COUNT >= 3 - joystick->axes[2], + joystick->axes[2], # endif # if JOYSTICK_AXES_COUNT >= 4 - joystick->axes[3], + joystick->axes[3], # endif # if JOYSTICK_AXES_COUNT >= 5 - joystick->axes[4], + joystick->axes[4], # endif # if JOYSTICK_AXES_COUNT >= 6 - joystick->axes[5], + joystick->axes[5], # endif - }, + }, # endif // JOYSTICK_AXES_COUNT>0 # if JOYSTICK_BUTTON_COUNT > 0 - .buttons = - { - joystick->buttons[0], + .buttons = { + joystick->buttons[0], # if JOYSTICK_BUTTON_COUNT > 8 - joystick->buttons[1], + joystick->buttons[1], # endif # if JOYSTICK_BUTTON_COUNT > 16 - joystick->buttons[2], + joystick->buttons[2], # endif # if JOYSTICK_BUTTON_COUNT > 24 - joystick->buttons[3], + joystick->buttons[3], # endif - } + } # endif // JOYSTICK_BUTTON_COUNT>0 }; @@ -526,6 +523,11 @@ void EVENT_USB_Device_ConfigurationChanged(void) { /* Setup joystick endpoint */ ConfigSuccess &= Endpoint_ConfigureEndpoint((JOYSTICK_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, JOYSTICK_EPSIZE, 1); #endif + +#if defined(DIGITIZER_ENABLE) && !defined(DIGITIZER_SHARED_EP) + /* Setup digitizer endpoint */ + ConfigSuccess &= Endpoint_ConfigureEndpoint((DIGITIZER_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, DIGITIZER_EPSIZE, 1); +#endif } /* FIXME: Expose this table in the docs somehow @@ -768,7 +770,8 @@ static void send_extra(uint8_t report_id, uint16_t data) { if (USB_DeviceState != DEVICE_STATE_Configured) return; - report_extra_t r = {.report_id = report_id, .usage = data}; + static report_extra_t r; + r = (report_extra_t){.report_id = report_id, .usage = data}; Endpoint_SelectEndpoint(SHARED_IN_EPNUM); /* Check if write ready for a polling interval around 10ms */ @@ -983,6 +986,23 @@ void virtser_send(const uint8_t byte) { } #endif +void send_digitizer(report_digitizer_t *report) { +#ifdef DIGITIZER_ENABLE + uint8_t timeout = 255; + + if (USB_DeviceState != DEVICE_STATE_Configured) return; + + Endpoint_SelectEndpoint(DIGITIZER_IN_EPNUM); + + /* Check if write ready for a polling interval around 10ms */ + while (timeout-- && !Endpoint_IsReadWriteAllowed()) _delay_us(40); + if (!Endpoint_IsReadWriteAllowed()) return; + + Endpoint_Write_Stream_LE(report, sizeof(report_digitizer_t), NULL); + Endpoint_ClearIN(); +#endif +} + /******************************************************************************* * main ******************************************************************************/ @@ -1013,18 +1033,16 @@ static void setup_usb(void) { USB_Device_EnableSOFEvents(); } -/** \brief Main - * - * FIXME: Needs doc - */ -int main(void) __attribute__((weak)); -int main(void) { +void protocol_setup(void) { #ifdef MIDI_ENABLE setup_midi(); #endif setup_mcu(); keyboard_setup(); +} + +void protocol_init(void) { setup_usb(); sei(); @@ -1058,57 +1076,55 @@ int main(void) { #endif print("Keyboard start.\n"); - while (1) { +} + +void protocol_task(void) { #if !defined(NO_USB_STARTUP_CHECK) - if (USB_DeviceState == DEVICE_STATE_Suspended) { - print("[s]"); - while (USB_DeviceState == DEVICE_STATE_Suspended) { - suspend_power_down(); - if (USB_Device_RemoteWakeupEnabled && suspend_wakeup_condition()) { - USB_Device_SendRemoteWakeup(); - clear_keyboard(); + if (USB_DeviceState == DEVICE_STATE_Suspended) { + print("[s]"); + while (USB_DeviceState == DEVICE_STATE_Suspended) { + suspend_power_down(); + if (USB_Device_RemoteWakeupEnabled && suspend_wakeup_condition()) { + USB_Device_SendRemoteWakeup(); + clear_keyboard(); # if USB_SUSPEND_WAKEUP_DELAY > 0 - // Some hubs, kvm switches, and monitors do - // weird things, with USB device state bouncing - // around wildly on wakeup, yielding race - // conditions that can corrupt the keyboard state. - // - // Pause for a while to let things settle... - wait_ms(USB_SUSPEND_WAKEUP_DELAY); + // Some hubs, kvm switches, and monitors do + // weird things, with USB device state bouncing + // around wildly on wakeup, yielding race + // conditions that can corrupt the keyboard state. + // + // Pause for a while to let things settle... + wait_ms(USB_SUSPEND_WAKEUP_DELAY); # endif - } } - suspend_wakeup_init(); } + suspend_wakeup_init(); + } #endif - keyboard_task(); + keyboard_task(); #ifdef MIDI_ENABLE - MIDI_Device_USBTask(&USB_MIDI_Interface); + MIDI_Device_USBTask(&USB_MIDI_Interface); #endif #ifdef MODULE_ADAFRUIT_BLE - adafruit_ble_task(); + adafruit_ble_task(); #endif #ifdef VIRTSER_ENABLE - virtser_task(); - CDC_Device_USBTask(&cdc_device); + virtser_task(); + CDC_Device_USBTask(&cdc_device); #endif #ifdef RAW_ENABLE - raw_hid_task(); + raw_hid_task(); #endif #if !defined(INTERRUPT_CONTROL_ENDPOINT) - USB_USBTask(); + USB_USBTask(); #endif - - // Run housekeeping - housekeeping_task(); - } } uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue, const uint16_t wIndex, const void **const DescriptorAddress) { return get_usb_descriptor(wValue, wIndex, DescriptorAddress); } diff --git a/tmk_core/protocol/lufa/usb_util.c b/tmk_core/protocol/lufa/usb_util.c index 9e943a21b..9691eff1e 100644 --- a/tmk_core/protocol/lufa/usb_util.c +++ b/tmk_core/protocol/lufa/usb_util.c @@ -17,7 +17,7 @@ #include "usb_util.h" #include "wait.h" -void usb_disable(void) { +void usb_disconnect(void) { USB_Disable(); USB_DeviceState = DEVICE_STATE_Unattached; } diff --git a/tmk_core/protocol/ps2_interrupt.c b/tmk_core/protocol/ps2_interrupt.c index 5afc8a82e..780040d15 100644 --- a/tmk_core/protocol/ps2_interrupt.c +++ b/tmk_core/protocol/ps2_interrupt.c @@ -40,11 +40,19 @@ POSSIBILITY OF SUCH DAMAGE. */ #include -#include -#include + +#if defined(__AVR__) +# include +#elif defined(PROTOCOL_CHIBIOS) // TODO: or STM32 ? +// chibiOS headers +# include "ch.h" +# include "hal.h" +#endif + #include "ps2.h" #include "ps2_io.h" #include "print.h" +#include "wait.h" #define WAIT(stat, us, err) \ do { \ @@ -61,12 +69,30 @@ static inline void pbuf_enqueue(uint8_t data); static inline bool pbuf_has_data(void); static inline void pbuf_clear(void); +#if defined(PROTOCOL_CHIBIOS) +void ps2_interrupt_service_routine(void); +void palCallback(void *arg) { ps2_interrupt_service_routine(); } + +# define PS2_INT_INIT() \ + { palSetLineMode(PS2_CLOCK, PAL_MODE_INPUT); } \ + while (0) +# define PS2_INT_ON() \ + { \ + palEnableLineEvent(PS2_CLOCK, PAL_EVENT_MODE_FALLING_EDGE); \ + palSetLineCallback(PS2_CLOCK, palCallback, NULL); \ + } \ + while (0) +# define PS2_INT_OFF() \ + { palDisableLineEvent(PS2_CLOCK); } \ + while (0) +#endif // PROTOCOL_CHIBIOS + void ps2_host_init(void) { idle(); PS2_INT_INIT(); PS2_INT_ON(); // POR(150-2000ms) plus BAT(300-500ms) may take 2.5sec([3]p.20) - //_delay_ms(2500); + // wait_ms(2500); } uint8_t ps2_host_send(uint8_t data) { @@ -77,7 +103,7 @@ uint8_t ps2_host_send(uint8_t data) { /* terminate a transmission if we have */ inhibit(); - _delay_us(100); // 100us [4]p.13, [5]p.50 + wait_us(100); // 100us [4]p.13, [5]p.50 /* 'Request to Send' and Start bit */ data_lo(); @@ -86,7 +112,6 @@ uint8_t ps2_host_send(uint8_t data) { /* Data bit[2-9] */ for (uint8_t i = 0; i < 8; i++) { - _delay_us(15); if (data & (1 << i)) { parity = !parity; data_hi(); @@ -98,7 +123,7 @@ uint8_t ps2_host_send(uint8_t data) { } /* Parity bit */ - _delay_us(15); + wait_us(15); if (parity) { data_hi(); } else { @@ -108,7 +133,7 @@ uint8_t ps2_host_send(uint8_t data) { WAIT(clock_lo, 50, 5); /* Stop bit */ - _delay_us(15); + wait_us(15); data_hi(); /* Ack */ @@ -132,7 +157,7 @@ uint8_t ps2_host_recv_response(void) { // Command may take 25ms/20ms at most([5]p.46, [3]p.21) uint8_t retry = 25; while (retry-- && !pbuf_has_data()) { - _delay_ms(1); + wait_ms(1); } return pbuf_dequeue(); } @@ -148,7 +173,7 @@ uint8_t ps2_host_recv(void) { } } -ISR(PS2_INT_VECT) { +void ps2_interrupt_service_routine(void) { static enum { INIT, START, @@ -218,6 +243,10 @@ RETURN: return; } +#if defined(__AVR__) +ISR(PS2_INT_VECT) { ps2_interrupt_service_routine(); } +#endif + /* send LED state to keyboard */ void ps2_host_set_led(uint8_t led) { ps2_host_send(0xED); @@ -232,8 +261,13 @@ static uint8_t pbuf[PBUF_SIZE]; static uint8_t pbuf_head = 0; static uint8_t pbuf_tail = 0; static inline void pbuf_enqueue(uint8_t data) { +#if defined(__AVR__) uint8_t sreg = SREG; cli(); +#elif defined(PROTOCOL_CHIBIOS) + chSysLockFromISR(); +#endif + uint8_t next = (pbuf_head + 1) % PBUF_SIZE; if (next != pbuf_tail) { pbuf[pbuf_head] = data; @@ -241,31 +275,66 @@ static inline void pbuf_enqueue(uint8_t data) { } else { print("pbuf: full\n"); } + +#if defined(__AVR__) SREG = sreg; +#elif defined(PROTOCOL_CHIBIOS) + chSysUnlockFromISR(); +#endif } static inline uint8_t pbuf_dequeue(void) { uint8_t val = 0; +#if defined(__AVR__) uint8_t sreg = SREG; cli(); +#elif defined(PROTOCOL_CHIBIOS) + chSysLock(); +#endif + if (pbuf_head != pbuf_tail) { val = pbuf[pbuf_tail]; pbuf_tail = (pbuf_tail + 1) % PBUF_SIZE; } + +#if defined(__AVR__) SREG = sreg; +#elif defined(PROTOCOL_CHIBIOS) + chSysUnlock(); +#endif return val; } static inline bool pbuf_has_data(void) { +#if defined(__AVR__) uint8_t sreg = SREG; cli(); +#elif defined(PROTOCOL_CHIBIOS) + chSysLock(); +#endif + bool has_data = (pbuf_head != pbuf_tail); - SREG = sreg; + +#if defined(__AVR__) + SREG = sreg; +#elif defined(PROTOCOL_CHIBIOS) + chSysUnlock(); +#endif return has_data; } static inline void pbuf_clear(void) { +#if defined(__AVR__) uint8_t sreg = SREG; cli(); +#elif defined(PROTOCOL_CHIBIOS) + chSysLock(); +#endif + pbuf_head = pbuf_tail = 0; - SREG = sreg; + +#if defined(__AVR__) + SREG = sreg; +#elif defined(PROTOCOL_CHIBIOS) + chSysUnlock(); +#endif } diff --git a/tmk_core/protocol/ps2_io_chibios.c b/tmk_core/protocol/ps2_io_chibios.c new file mode 100644 index 000000000..b672bd1f4 --- /dev/null +++ b/tmk_core/protocol/ps2_io_chibios.c @@ -0,0 +1,55 @@ +#include +#include "ps2_io.h" + +// chibiOS headers +#include "ch.h" +#include "hal.h" + +/* Check port settings for clock and data line */ +#if !(defined(PS2_CLOCK)) +# error "PS/2 clock setting is required in config.h" +#endif + +#if !(defined(PS2_DATA)) +# error "PS/2 data setting is required in config.h" +#endif + +/* + * Clock + */ +void clock_init(void) {} + +void clock_lo(void) { + palSetLineMode(PS2_CLOCK, PAL_MODE_OUTPUT_OPENDRAIN); + palWriteLine(PS2_CLOCK, PAL_LOW); +} + +void clock_hi(void) { + palSetLineMode(PS2_CLOCK, PAL_MODE_OUTPUT_OPENDRAIN); + palWriteLine(PS2_CLOCK, PAL_HIGH); +} + +bool clock_in(void) { + palSetLineMode(PS2_CLOCK, PAL_MODE_INPUT); + return palReadLine(PS2_CLOCK); +} + +/* + * Data + */ +void data_init(void) {} + +void data_lo(void) { + palSetLineMode(PS2_DATA, PAL_MODE_OUTPUT_OPENDRAIN); + palWriteLine(PS2_DATA, PAL_LOW); +} + +void data_hi(void) { + palSetLineMode(PS2_DATA, PAL_MODE_OUTPUT_OPENDRAIN); + palWriteLine(PS2_DATA, PAL_HIGH); +} + +bool data_in(void) { + palSetLineMode(PS2_DATA, PAL_MODE_INPUT); + return palReadLine(PS2_DATA); +} diff --git a/tmk_core/protocol/ps2_mouse.c b/tmk_core/protocol/ps2_mouse.c index 5415453a0..39251a643 100644 --- a/tmk_core/protocol/ps2_mouse.c +++ b/tmk_core/protocol/ps2_mouse.c @@ -16,9 +16,13 @@ along with this program. If not, see . */ #include -#include -#include + +#if defined(__AVR__) +# include +#endif + #include "ps2_mouse.h" +#include "wait.h" #include "host.h" #include "timer.h" #include "print.h" @@ -42,7 +46,7 @@ static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report); void ps2_mouse_init(void) { ps2_host_init(); - _delay_ms(PS2_MOUSE_INIT_DELAY); // wait for powering up + wait_ms(PS2_MOUSE_INIT_DELAY); // wait for powering up PS2_MOUSE_SEND(PS2_MOUSE_RESET, "ps2_mouse_init: sending reset"); @@ -152,8 +156,15 @@ static inline void ps2_mouse_convert_report_to_hid(report_mouse_t *mouse_report) mouse_report->x = X_IS_NEG ? ((!X_IS_OVF && -127 <= mouse_report->x && mouse_report->x <= -1) ? mouse_report->x : -127) : ((!X_IS_OVF && 0 <= mouse_report->x && mouse_report->x <= 127) ? mouse_report->x : 127); mouse_report->y = Y_IS_NEG ? ((!Y_IS_OVF && -127 <= mouse_report->y && mouse_report->y <= -1) ? mouse_report->y : -127) : ((!Y_IS_OVF && 0 <= mouse_report->y && mouse_report->y <= 127) ? mouse_report->y : 127); +#ifdef PS2_MOUSE_INVERT_BUTTONS + // swap left & right buttons + uint8_t needs_left = mouse_report->buttons & PS2_MOUSE_BTN_RIGHT; + uint8_t needs_right = mouse_report->buttons & PS2_MOUSE_BTN_LEFT; + mouse_report->buttons = (mouse_report->buttons & ~(PS2_MOUSE_BTN_MASK)) | (needs_left ? PS2_MOUSE_BTN_LEFT : 0) | (needs_right ? PS2_MOUSE_BTN_RIGHT : 0); +#else // remove sign and overflow flags mouse_report->buttons &= PS2_MOUSE_BTN_MASK; +#endif #ifdef PS2_MOUSE_INVERT_X mouse_report->x = -mouse_report->x; @@ -210,7 +221,7 @@ static inline void ps2_mouse_enable_scrolling(void) { PS2_MOUSE_SEND(PS2_MOUSE_SET_SAMPLE_RATE, "Set sample rate"); PS2_MOUSE_SEND(80, "80"); PS2_MOUSE_SEND(PS2_MOUSE_GET_DEVICE_ID, "Finished enabling scroll wheel"); - _delay_ms(20); + wait_ms(20); } #define PRESS_SCROLL_BUTTONS mouse_report->buttons |= (PS2_MOUSE_SCROLL_BTN_MASK) @@ -252,7 +263,7 @@ static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report) { if (scroll_state == SCROLL_BTN && timer_elapsed(scroll_button_time) < PS2_MOUSE_SCROLL_BTN_SEND) { PRESS_SCROLL_BUTTONS; host_mouse_send(mouse_report); - _delay_ms(100); + wait_ms(100); RELEASE_SCROLL_BUTTONS; } #endif diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index ba7760f28..099964ae5 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -158,6 +158,53 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { # endif #endif +#ifdef DIGITIZER_ENABLE +# ifndef DIGITIZER_SHARED_EP +const USB_Descriptor_HIDReport_Datatype_t PROGMEM DigitizerReport[] = { +# elif !defined(SHARED_REPORT_STARTED) +const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { +# define SHARED_REPORT_STARTED +# endif + HID_RI_USAGE_PAGE(8, 0x0D), // Digitizers + HID_RI_USAGE(8, 0x01), // Digitizer + HID_RI_COLLECTION(8, 0x01), // Application +# ifdef DIGITIZER_SHARED_EP + HID_RI_REPORT_ID(8, REPORT_ID_DIGITIZER), +# endif + HID_RI_USAGE(8, 0x20), // Stylus + HID_RI_COLLECTION(8, 0x00), // Physical + // Tip Switch (1 bit) + HID_RI_USAGE(8, 0x42), // Tip Switch + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(8, 0x01), + HID_RI_REPORT_SIZE(8, 0x01), + HID_RI_REPORT_COUNT(8, 0x01), + HID_RI_INPUT(8, HID_IOF_VARIABLE), + // In Range (1 bit) + HID_RI_USAGE(8, 0x32), // In Range + HID_RI_INPUT(8, HID_IOF_VARIABLE), + // Padding (6 bits) + HID_RI_REPORT_COUNT(8, 0x06), + HID_RI_INPUT(8, HID_IOF_CONSTANT | HID_IOF_VARIABLE), + + // X/Y Position (4 bytes) + HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop + HID_RI_LOGICAL_MAXIMUM(16, 0x7FFF), + HID_RI_REPORT_SIZE(8, 0x10), + HID_RI_REPORT_COUNT(8, 0x01), + HID_RI_UNIT(8, 0x33), // Inch, English Linear + HID_RI_UNIT_EXPONENT(8, 0x0E), // -2 + HID_RI_USAGE(8, 0x30), // X + HID_RI_INPUT(8, HID_IOF_VARIABLE), + HID_RI_USAGE(8, 0x31), // Y + HID_RI_INPUT(8, HID_IOF_VARIABLE), + HID_RI_END_COLLECTION(0), + HID_RI_END_COLLECTION(0), +# ifndef DIGITIZER_SHARED_EP +}; +# endif +#endif + #if defined(SHARED_EP_ENABLE) && !defined(SHARED_REPORT_STARTED) const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { #endif @@ -227,6 +274,7 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { HID_RI_OUTPUT(8, HID_IOF_CONSTANT), HID_RI_END_COLLECTION(0), #endif + #ifdef SHARED_EP_ENABLE }; #endif @@ -351,7 +399,7 @@ const USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { .Size = sizeof(USB_Descriptor_Device_t), .Type = DTYPE_Device }, - .USBSpecification = VERSION_BCD(1, 1, 0), + .USBSpecification = VERSION_BCD(2, 0, 0), #if VIRTSER_ENABLE .Class = USB_CSCP_IADDeviceClass, @@ -921,6 +969,46 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { .PollingIntervalMS = USB_POLLING_INTERVAL_MS } #endif + +#if defined(DIGITIZER_ENABLE) && !defined(DIGITIZER_SHARED_EP) + /* + * Digitizer + */ + .Digitizer_Interface = { + .Header = { + .Size = sizeof(USB_Descriptor_Interface_t), + .Type = DTYPE_Interface + }, + .InterfaceNumber = DIGITIZER_INTERFACE, + .AlternateSetting = 0x00, + .TotalEndpoints = 1, + .Class = HID_CSCP_HIDClass, + .SubClass = HID_CSCP_NonBootSubclass, + .Protocol = HID_CSCP_NonBootProtocol, + .InterfaceStrIndex = NO_DESCRIPTOR + }, + .Digitizer_HID = { + .Header = { + .Size = sizeof(USB_HID_Descriptor_HID_t), + .Type = HID_DTYPE_HID + }, + .HIDSpec = VERSION_BCD(1, 1, 1), + .CountryCode = 0x00, + .TotalReportDescriptors = 1, + .HIDReportType = HID_DTYPE_Report, + .HIDReportLength = sizeof(DigitizerReport) + }, + .Digitizer_INEndpoint = { + .Header = { + .Size = sizeof(USB_Descriptor_Endpoint_t), + .Type = DTYPE_Endpoint + }, + .EndpointAddress = (ENDPOINT_DIR_IN | DIGITIZER_IN_EPNUM), + .Attributes = (EP_TYPE_INTERRUPT | ENDPOINT_ATTR_NO_SYNC | ENDPOINT_USAGE_DATA), + .EndpointSize = DIGITIZER_EPSIZE, + .PollingIntervalMS = USB_POLLING_INTERVAL_MS + }, +#endif }; /* @@ -953,10 +1041,10 @@ const USB_Descriptor_String_t PROGMEM ProductString = { #if defined(SERIAL_NUMBER) const USB_Descriptor_String_t PROGMEM SerialNumberString = { .Header = { - .Size = USB_STRING_LEN(sizeof(STR(SERIAL_NUMBER)) - 1), // Subtract 1 for null terminator + .Size = USB_STRING_LEN(sizeof(SERIAL_NUMBER) - 1), // Subtract 1 for null terminator .Type = DTYPE_String }, - .UnicodeString = LSTR(SERIAL_NUMBER) + .UnicodeString = USBSTR(SERIAL_NUMBER) }; #endif @@ -1059,6 +1147,13 @@ uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const Size = sizeof(USB_HID_Descriptor_HID_t); break; #endif +#if defined(DIGITIZER_ENABLE) && !defined(DIGITIZER_SHARED_EP) + case DIGITIZER_INTERFACE: + Address = &ConfigurationDescriptor.Digitizer_HID; + Size = sizeof(USB_HID_Descriptor_HID_t); + + break; +#endif } break; @@ -1108,6 +1203,12 @@ uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const Address = &JoystickReport; Size = sizeof(JoystickReport); break; +#endif +#if defined(DIGITIZER_ENABLE) && !defined(DIGITIZER_SHARED_EP) + case DIGITIZER_INTERFACE: + Address = &DigitizerReport; + Size = sizeof(DigitizerReport); + break; #endif } diff --git a/tmk_core/protocol/usb_descriptor.h b/tmk_core/protocol/usb_descriptor.h index 867e549b4..0f0c78f66 100644 --- a/tmk_core/protocol/usb_descriptor.h +++ b/tmk_core/protocol/usb_descriptor.h @@ -135,6 +135,13 @@ typedef struct { USB_HID_Descriptor_HID_t Joystick_HID; USB_Descriptor_Endpoint_t Joystick_INEndpoint; #endif + +#if defined(DIGITIZER_ENABLE) && !defined(DIGITIZER_SHARED_EP) + // Digitizer HID Interface + USB_Descriptor_Interface_t Digitizer_Interface; + USB_HID_Descriptor_HID_t Digitizer_HID; + USB_Descriptor_Endpoint_t Digitizer_INEndpoint; +#endif } USB_Descriptor_Configuration_t; /* @@ -180,6 +187,10 @@ enum usb_interfaces { #if defined(JOYSTICK_ENABLE) JOYSTICK_INTERFACE, #endif + +#if defined(DIGITIZER_ENABLE) && !defined(DIGITIZER_SHARED_EP) + DIGITIZER_INTERFACE, +#endif TOTAL_INTERFACES }; @@ -226,7 +237,7 @@ enum usb_endpoints { # if STM32_USB_USE_OTG1 # define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM # else - CONSOLE_OUT_EPNUM = NEXT_EPNUM, + CONSOLE_OUT_EPNUM = NEXT_EPNUM, # endif # else # define CONSOLE_OUT_EPNUM CONSOLE_IN_EPNUM @@ -259,6 +270,19 @@ enum usb_endpoints { JOYSTICK_OUT_EPNUM = NEXT_EPNUM, # endif #endif + +#ifdef DIGITIZER_ENABLE +# if !defined(DIGITIZER_SHARED_EP) + DIGITIZER_IN_EPNUM = NEXT_EPNUM, +# if STM32_USB_USE_OTG1 + DIGITIZER_OUT_EPNUM = DIGITIZER_IN_EPNUM, +# else + DIGITIZER_OUT_EPNUM = NEXT_EPNUM, +# endif +# else +# define DIGITIZER_IN_EPNUM SHARED_IN_EPNUM +# endif +#endif }; #ifdef PROTOCOL_LUFA @@ -284,5 +308,6 @@ enum usb_endpoints { #define CDC_NOTIFICATION_EPSIZE 8 #define CDC_EPSIZE 16 #define JOYSTICK_EPSIZE 8 +#define DIGITIZER_EPSIZE 8 uint16_t get_usb_descriptor(const uint16_t wValue, const uint16_t wIndex, const void** const DescriptorAddress); diff --git a/tmk_core/protocol/usb_descriptor_common.h b/tmk_core/protocol/usb_descriptor_common.h index b1f602c82..ce0cf0976 100644 --- a/tmk_core/protocol/usb_descriptor_common.h +++ b/tmk_core/protocol/usb_descriptor_common.h @@ -16,6 +16,10 @@ #pragma once +// Prefix string literal with L for descriptors +#define USBCONCAT(a, b) a##b +#define USBSTR(s) USBCONCAT(L, s) + ///////////////////// // RAW Usage page and ID configuration diff --git a/tmk_core/protocol/usb_hid.mk b/tmk_core/protocol/usb_hid.mk index e72008097..c0c157c04 100644 --- a/tmk_core/protocol/usb_hid.mk +++ b/tmk_core/protocol/usb_hid.mk @@ -1,10 +1,10 @@ USB_HID_DIR = protocol/usb_hid - +USB_HOST_LIB_DIR = $(LIB_PATH)/usbhost # # USB Host Shield # -USB_HOST_SHIELD_DIR = $(USB_HID_DIR)/USB_Host_Shield_2.0 +USB_HOST_SHIELD_DIR = $(USB_HOST_LIB_DIR)/USB_Host_Shield_2.0 USB_HOST_SHIELD_SRC = \ $(USB_HOST_SHIELD_DIR)/Usb.cpp \ $(USB_HOST_SHIELD_DIR)/hid.cpp \ @@ -17,7 +17,7 @@ USB_HOST_SHIELD_SRC = \ # # Arduino # -ARDUINO_DIR = $(USB_HID_DIR)/arduino-1.0.1 +ARDUINO_DIR = $(USB_HOST_LIB_DIR)/arduino-1.0.1 ARDUINO_CORES_DIR = $(ARDUINO_DIR)/cores/arduino ARDUINO_CORES_SRC = \ $(ARDUINO_CORES_DIR)/Print.cpp \ @@ -58,13 +58,13 @@ OPT_DEFS += -DARDUINO=101 # Search Path # VPATH += $(TMK_DIR)/$(USB_HID_DIR) -VPATH += $(TMK_DIR)/$(USB_HOST_SHIELD_DIR) +VPATH += $(USB_HOST_SHIELD_DIR) # for #include "Arduino.h" -VPATH += $(TMK_DIR)/$(ARDUINO_CORES_DIR) +VPATH += $(ARDUINO_CORES_DIR) # for #include "pins_arduino.h" -VPATH += $(TMK_DIR)/$(ARDUINO_DIR)/variants/leonardo +VPATH += $(ARDUINO_DIR)/variants/leonardo # ad hoc workaround for compile problem on Windows: # Windows doesn't know difference between common/print.h and arduino/Print.h. diff --git a/tmk_core/protocol/vusb.mk b/tmk_core/protocol/vusb.mk index e4d013b38..5572597e2 100644 --- a/tmk_core/protocol/vusb.mk +++ b/tmk_core/protocol/vusb.mk @@ -3,7 +3,7 @@ VUSB_DIR = protocol/vusb # Path to the V-USB library VUSB_PATH = $(LIB_PATH)/vusb -SRC += $(VUSB_DIR)/main.c \ +SRC += $(VUSB_DIR)/protocol.c \ $(VUSB_DIR)/vusb.c \ $(VUSB_DIR)/usb_util.c \ $(VUSB_PATH)/usbdrv/usbdrv.c \ diff --git a/tmk_core/protocol/vusb/main.c b/tmk_core/protocol/vusb/main.c deleted file mode 100644 index 53926a749..000000000 --- a/tmk_core/protocol/vusb/main.c +++ /dev/null @@ -1,179 +0,0 @@ -/* Name: main.c - * Project: hid-mouse, a very simple HID example - * Author: Christian Starkjohann - * Creation Date: 2008-04-07 - * Tabsize: 4 - * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: main.c 790 2010-05-30 21:00:26Z cs $ - */ - -#include - -#include -#include -#include -#include - -#include - -#include "vusb.h" - -#include "keyboard.h" -#include "host.h" -#include "timer.h" -#include "print.h" -#include "suspend.h" -#include "wait.h" -#include "sendchar.h" - -#ifdef SLEEP_LED_ENABLE -# include "sleep_led.h" -#endif - -#ifdef CONSOLE_ENABLE -void console_task(void); -#endif - -#ifdef RAW_ENABLE -void raw_hid_task(void); -#endif - -/* This is from main.c of USBaspLoader */ -static void initForUsbConnectivity(void) { - uint8_t i = 0; - - usbInit(); - /* enforce USB re-enumerate: */ - usbDeviceDisconnect(); /* do this while interrupts are disabled */ - while (--i) { /* fake USB disconnect for > 250 ms */ - wdt_reset(); - wait_ms(1); - } - usbDeviceConnect(); -} - -static void vusb_send_remote_wakeup(void) { - cli(); - - uint8_t ddr_orig = USBDDR; - USBOUT |= (1 << USBMINUS); - USBDDR = ddr_orig | USBMASK; - USBOUT ^= USBMASK; - - wait_ms(25); - - USBOUT ^= USBMASK; - USBDDR = ddr_orig; - USBOUT &= ~(1 << USBMINUS); - - sei(); -} - -bool vusb_suspended = false; - -static void vusb_suspend(void) { - vusb_suspended = true; - -#ifdef SLEEP_LED_ENABLE - sleep_led_enable(); -#endif - - suspend_power_down(); -} - -#if USB_COUNT_SOF -static void vusb_wakeup(void) { - vusb_suspended = false; - suspend_wakeup_init(); - -# ifdef SLEEP_LED_ENABLE - sleep_led_disable(); -# endif -} -#endif - -/** \brief Setup USB - * - * FIXME: Needs doc - */ -static void setup_usb(void) { initForUsbConnectivity(); } - -/** \brief Main - * - * FIXME: Needs doc - */ -int main(void) __attribute__((weak)); -int main(void) { -#if USB_COUNT_SOF - uint16_t sof_timer = timer_read(); -#endif - -#ifdef CLKPR - // avoid unintentional changes of clock frequency in devices that have a - // clock prescaler - clock_prescale_set(clock_div_1); -#endif - keyboard_setup(); - setup_usb(); - sei(); - keyboard_init(); - host_set_driver(vusb_driver()); - - wait_ms(50); - -#ifdef SLEEP_LED_ENABLE - sleep_led_init(); -#endif - - while (1) { -#if USB_COUNT_SOF - if (usbSofCount != 0) { - usbSofCount = 0; - sof_timer = timer_read(); - if (vusb_suspended) { - vusb_wakeup(); - } - } else { - // Suspend when no SOF in 3ms-10ms(7.1.7.4 Suspending of USB1.1) - if (!vusb_suspended && timer_elapsed(sof_timer) > 5) { - vusb_suspend(); - } - } -#endif - if (vusb_suspended) { - vusb_suspend(); - if (suspend_wakeup_condition()) { - vusb_send_remote_wakeup(); - } - } else { - usbPoll(); - - // TODO: configuration process is inconsistent. it sometime fails. - // To prevent failing to configure NOT scan keyboard during configuration - if (usbConfiguration && usbInterruptIsReady()) { - keyboard_task(); - } - vusb_transfer_keyboard(); - -#ifdef RAW_ENABLE - usbPoll(); - - if (usbConfiguration && usbInterruptIsReady3()) { - raw_hid_task(); - } -#endif - -#ifdef CONSOLE_ENABLE - usbPoll(); - - if (usbConfiguration && usbInterruptIsReady3()) { - console_task(); - } -#endif - - // Run housekeeping - housekeeping_task(); - } - } -} diff --git a/tmk_core/protocol/vusb/protocol.c b/tmk_core/protocol/vusb/protocol.c new file mode 100644 index 000000000..89dc795b2 --- /dev/null +++ b/tmk_core/protocol/vusb/protocol.c @@ -0,0 +1,178 @@ +/* Name: main.c + * Project: hid-mouse, a very simple HID example + * Author: Christian Starkjohann + * Creation Date: 2008-04-07 + * Tabsize: 4 + * Copyright: (c) 2008 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: main.c 790 2010-05-30 21:00:26Z cs $ + */ + +#include + +#include +#include +#include +#include + +#include + +#include "vusb.h" + +#include "keyboard.h" +#include "host.h" +#include "timer.h" +#include "print.h" +#include "suspend.h" +#include "wait.h" +#include "sendchar.h" + +#ifdef SLEEP_LED_ENABLE +# include "sleep_led.h" +#endif + +#ifdef CONSOLE_ENABLE +void console_task(void); +#endif + +#ifdef RAW_ENABLE +void raw_hid_task(void); +#endif + +/* This is from main.c of USBaspLoader */ +static void initForUsbConnectivity(void) { + uint8_t i = 0; + + usbInit(); + /* enforce USB re-enumerate: */ + usbDeviceDisconnect(); /* do this while interrupts are disabled */ + while (--i) { /* fake USB disconnect for > 250 ms */ + wdt_reset(); + wait_ms(1); + } + usbDeviceConnect(); +} + +static void vusb_send_remote_wakeup(void) { + cli(); + + uint8_t ddr_orig = USBDDR; + USBOUT |= (1 << USBMINUS); + USBDDR = ddr_orig | USBMASK; + USBOUT ^= USBMASK; + + wait_ms(25); + + USBOUT ^= USBMASK; + USBDDR = ddr_orig; + USBOUT &= ~(1 << USBMINUS); + + sei(); +} + +bool vusb_suspended = false; + +static void vusb_suspend(void) { + vusb_suspended = true; + +#ifdef SLEEP_LED_ENABLE + sleep_led_enable(); +#endif + + suspend_power_down(); +} + +#if USB_COUNT_SOF +static void vusb_wakeup(void) { + vusb_suspended = false; + suspend_wakeup_init(); + +# ifdef SLEEP_LED_ENABLE + sleep_led_disable(); +# endif +} +#endif + +/** \brief Setup USB + * + * FIXME: Needs doc + */ +static void setup_usb(void) { initForUsbConnectivity(); } + +uint16_t sof_timer = 0; + +void protocol_setup(void) { +#if USB_COUNT_SOF + sof_timer = timer_read(); +#endif + +#ifdef CLKPR + // avoid unintentional changes of clock frequency in devices that have a + // clock prescaler + clock_prescale_set(clock_div_1); +#endif + keyboard_setup(); +} + +void protocol_init(void) { + setup_usb(); + sei(); + + keyboard_init(); + + host_set_driver(vusb_driver()); + + wait_ms(50); + +#ifdef SLEEP_LED_ENABLE + sleep_led_init(); +#endif +} + +void protocol_task(void) { +#if USB_COUNT_SOF + if (usbSofCount != 0) { + usbSofCount = 0; + sof_timer = timer_read(); + if (vusb_suspended) { + vusb_wakeup(); + } + } else { + // Suspend when no SOF in 3ms-10ms(7.1.7.4 Suspending of USB1.1) + if (!vusb_suspended && timer_elapsed(sof_timer) > 5) { + vusb_suspend(); + } + } +#endif + if (vusb_suspended) { + vusb_suspend(); + if (suspend_wakeup_condition()) { + vusb_send_remote_wakeup(); + } + } else { + usbPoll(); + + // TODO: configuration process is inconsistent. it sometime fails. + // To prevent failing to configure NOT scan keyboard during configuration + if (usbConfiguration && usbInterruptIsReady()) { + keyboard_task(); + } + vusb_transfer_keyboard(); + +#ifdef RAW_ENABLE + usbPoll(); + + if (usbConfiguration && usbInterruptIsReady3()) { + raw_hid_task(); + } +#endif + +#ifdef CONSOLE_ENABLE + usbPoll(); + + if (usbConfiguration && usbInterruptIsReady3()) { + console_task(); + } +#endif + } +} diff --git a/tmk_core/protocol/vusb/usb_util.c b/tmk_core/protocol/vusb/usb_util.c index 602854dbe..4ee2d3188 100644 --- a/tmk_core/protocol/vusb/usb_util.c +++ b/tmk_core/protocol/vusb/usb_util.c @@ -16,7 +16,7 @@ #include #include "usb_util.h" -void usb_disable(void) { usbDeviceDisconnect(); } +void usb_disconnect(void) { usbDeviceDisconnect(); } bool usb_connected_state(void) { usbPoll(); diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 9362fbde7..485b20c90 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -272,7 +272,8 @@ static void send_extra(uint8_t report_id, uint16_t data) { last_id = report_id; last_data = data; - report_extra_t report = {.report_id = report_id, .usage = data}; + static report_extra_t report; + report = (report_extra_t){.report_id = report_id, .usage = data}; if (usbInterruptIsReadyShared()) { usbSetInterruptShared((void *)&report, sizeof(report_extra_t)); } @@ -291,6 +292,14 @@ static void send_consumer(uint16_t data) { #endif } +void send_digitizer(report_digitizer_t *report) { +#ifdef DIGITIZER_ENABLE + if (usbInterruptIsReadyShared()) { + usbSetInterruptShared((void *)report, sizeof(report_digitizer_t)); + } +#endif +} + /*------------------------------------------------------------------* * Request from host * *------------------------------------------------------------------*/ @@ -509,8 +518,46 @@ const PROGMEM uchar shared_hid_report[] = { 0x95, 0x01, // Report Count (1) 0x75, 0x10, // Report Size (16) 0x81, 0x00, // Input (Data, Array, Absolute) - 0xC0 // End Collection + 0xC0, // End Collection #endif + +#ifdef DIGITIZER_ENABLE + // Digitizer report descriptor + 0x05, 0x0D, // Usage Page (Digitizers) + 0x09, 0x01, // Usage (Digitizer) + 0xA1, 0x01, // Collection (Application) + 0x85, REPORT_ID_DIGITIZER, // Report ID + 0x09, 0x22, // Usage (Finger) + 0xA1, 0x00, // Collection (Physical) + // Tip Switch (1 bit) + 0x09, 0x42, // Usage (Tip Switch) + 0x15, 0x00, // Logical Minimum + 0x25, 0x01, // Logical Maximum + 0x95, 0x01, // Report Count (1) + 0x75, 0x01, // Report Size (16) + 0x81, 0x02, // Input (Data, Variable, Absolute) + // In Range (1 bit) + 0x09, 0x32, // Usage (In Range) + 0x81, 0x02, // Input (Data, Variable, Absolute) + // Padding (6 bits) + 0x95, 0x06, // Report Count (6) + 0x81, 0x03, // Input (Constant) + + // X/Y Position (4 bytes) + 0x05, 0x01, // Usage Page (Generic Desktop) + 0x26, 0xFF, 0x7F, // Logical Maximum (32767) + 0x95, 0x01, // Report Count (1) + 0x75, 0x10, // Report Size (16) + 0x65, 0x33, // Unit (Inch, English Linear) + 0x55, 0x0E, // Unit Exponent (-2) + 0x09, 0x30, // Usage (X) + 0x81, 0x02, // Input (Data, Variable, Absolute) + 0x09, 0x31, // Usage (Y) + 0x81, 0x02, // Input (Data, Variable, Absolute) + 0xC0, // End Collection + 0xC0 // End Collection +#endif + #ifdef SHARED_EP_ENABLE }; #endif @@ -598,10 +645,10 @@ const PROGMEM usbStringDescriptor_t usbStringDescriptorProduct = { #if defined(SERIAL_NUMBER) const PROGMEM usbStringDescriptor_t usbStringDescriptorSerial = { .header = { - .bLength = USB_STRING_LEN(sizeof(STR(SERIAL_NUMBER)) - 1), + .bLength = USB_STRING_LEN(sizeof(SERIAL_NUMBER) - 1), .bDescriptorType = USBDESCR_STRING }, - .bString = LSTR(SERIAL_NUMBER) + .bString = USBSTR(SERIAL_NUMBER) }; #endif diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index fc2dc68be..5a7f29910 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -105,7 +105,10 @@ endif #CFLAGS += -Wundef #CFLAGS += -Wunreachable-code #CFLAGS += -Wsign-compare +GCC_VERSION := $(shell gcc --version 2>/dev/null) +ifeq ($(findstring clang, ${GCC_VERSION}),) CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) +endif CFLAGS += $(CSTANDARD) # This fixes lots of keyboards linking errors but SHOULDN'T BE A FINAL SOLUTION @@ -137,7 +140,9 @@ endif #CXXFLAGS += -Wstrict-prototypes #CXXFLAGS += -Wunreachable-code #CXXFLAGS += -Wsign-compare +ifeq ($(findstring clang, ${GCC_VERSION}),) CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) +endif #CXXFLAGS += $(CSTANDARD) #---------------- Assembler Options ---------------- @@ -150,11 +155,13 @@ CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) # -listing-cont-lines: Sets the maximum number of continuation lines of hex # dump that will be displayed for a given single line of source input. ASFLAGS += $(ADEFS) +ifeq ($(findstring clang, ${GCC_VERSION}),) ifeq ($(strip $(DEBUG_ENABLE)),yes) ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 else ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100 endif +endif ifeq ($(VERBOSE_AS_CMD),yes) ASFLAGS += -v endif @@ -458,7 +465,7 @@ ifeq ($(findstring avr-gcc,$(CC)),avr-gcc) SIZE_MARGIN = 1024 check-size: - $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) + $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) $(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi)) $(eval FREE_SIZE=$(shell expr $(MAX_SIZE) - $(CURRENT_SIZE))) $(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(MAX_SIZE))) diff --git a/users/333fred/333fred.c b/users/333fred/333fred.c index 621b9e664..99f4e0168 100644 --- a/users/333fred/333fred.c +++ b/users/333fred/333fred.c @@ -117,7 +117,7 @@ void tap_dance_process_keycode(uint16_t keycode) { __attribute__ ((weak)) void layer_state_set_rgb(uint32_t state) {} -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { layer_state_set_rgb(state); return state; } diff --git a/users/bbaserdem/bbaserdem.c b/users/bbaserdem/bbaserdem.c index ac7b1b62e..cdacda12e 100644 --- a/users/bbaserdem/bbaserdem.c +++ b/users/bbaserdem/bbaserdem.c @@ -87,7 +87,7 @@ void rgblight_saveBase(void) { base_sta = false; // If saving, that means base layer is being left } -// Load the base state back +// Load the base state back void rgblight_loadBase(void) { // Don't do anything if not enabled if ( !base_sta ) { @@ -248,7 +248,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; -#endif +#endif // If these keys are pressed, load base layer config, and mark saving #ifdef RGBLIGHT_ENABLE @@ -261,7 +261,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case RGB_HUI: case RGB_HUD: if ( !base_sta ) { - rgblight_loadBase(); + rgblight_loadBase(); } return true; break; @@ -301,7 +301,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - + // Layer switches with sound case K_GAMES: if (record->event.pressed) { @@ -622,7 +622,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { |*-----LAYER CHANGE-----*| \*----------------------*/ -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { state = layer_state_set_keymap (state); #ifdef RGBLIGHT_ENABLE diff --git a/users/bbaserdem/rules.mk b/users/bbaserdem/rules.mk index 94f01cdff..9c7e78e2f 100644 --- a/users/bbaserdem/rules.mk +++ b/users/bbaserdem/rules.mk @@ -10,14 +10,12 @@ ifndef BLUETOOTH_ENABLE BLUETOOTH_ENABLE = no # No bluetooth endif COMMAND_ENABLE = no # Some bootmagic thing i dont use -BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite CONSOLE_ENABLE = no # Allows console output with a command SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. NKRO_ENABLE = no # Default is 6KRO which is plenty MIDI_ENABLE = no # Untested feature KEY_LOCK_ENABLE = no # Allows locking any key. Not used -API_SYSEX_ENABLE = no # Allows OS to send signals. -KEY_LOCK_ENABLE = no # Allows locking any key. Not used # Disabling this makes it compile, i dont know why # VARIABLE_TRACE = no # Allows debugging variables diff --git a/users/bcat/config.h b/users/bcat/config.h index 16188950e..5bb93f383 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -33,7 +33,7 @@ #if defined(RGB_MATRIX_ENABLE) /* Turn off per-key RGB when the host goes to sleep. */ -# define RGB_DISABLE_WHEN_USB_SUSPENDED true +# define RGB_DISABLE_WHEN_USB_SUSPENDED /* Keep per-key RGB increments consistent across keyboards. */ # undef RGB_MATRIX_HUE_STEP diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index 3442a78ac..6d748875a 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk @@ -1,7 +1,7 @@ SRC += bcat.c # Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite # Enable media keys on all keyboards. EXTRAKEY_ENABLE = yes @@ -27,7 +27,6 @@ MIDI_ENABLE = no SLEEP_LED_ENABLE = no # Disable other unused options on all keyboards. -API_SYSEX_ENABLE = no AUTO_SHIFT_ENABLE = no COMBO_ENABLE = no KEYBOARD_LOCK_ENABLE = no diff --git a/users/billypython/billypython.c b/users/billypython/billypython.c index 7bdfe33a4..180b478d7 100644 --- a/users/billypython/billypython.c +++ b/users/billypython/billypython.c @@ -27,6 +27,6 @@ uint32_t layer_state_set_keymap(uint32_t state) { return state; } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { return layer_state_set_keymap(state); } diff --git a/users/curry/config.h b/users/curry/config.h index b982dab03..e3c0a103e 100644 --- a/users/curry/config.h +++ b/users/curry/config.h @@ -17,7 +17,7 @@ #if defined(RGB_MATRIX_ENABLE) # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define RGB_DISABLE_WHEN_USB_SUSPENDED true +# define RGB_DISABLE_WHEN_USB_SUSPENDED # define DISABLE_RGB_MATRIX_ALPHAS_MODS # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/users/curry/rules.mk b/users/curry/rules.mk index 87d3b38ea..724f97f5e 100644 --- a/users/curry/rules.mk +++ b/users/curry/rules.mk @@ -24,7 +24,7 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += tap_dances.c endif -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) SRC += oled.c endif diff --git a/users/cwebster2/rules.mk b/users/cwebster2/rules.mk index f39d4ebc9..3aa4d68f3 100644 --- a/users/cwebster2/rules.mk +++ b/users/cwebster2/rules.mk @@ -2,7 +2,7 @@ AUTO_SHIFT_ENABLE = no # Enable autoshift MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite GRAVE_ESC_ENABLE = no CONSOLE_ENABLE = no SPACE_CADET_ENABLE = no diff --git a/users/d4mation/rules.mk b/users/d4mation/rules.mk index 3d65a2242..f677721b4 100644 --- a/users/d4mation/rules.mk +++ b/users/d4mation/rules.mk @@ -2,7 +2,7 @@ SRC += d4mation.c \ tap-hold.c \ macros.c -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite LTO_ENABLE = yes MOUSEKEY_ENABLE = no diff --git a/users/danielo515/process_records.h b/users/danielo515/process_records.h index 490607686..caa85e629 100644 --- a/users/danielo515/process_records.h +++ b/users/danielo515/process_records.h @@ -78,8 +78,8 @@ enum layers { #define KC_E_GT S(KC_NUBS) #define KC_E_TILD ES_TILD #define KC_E_MINS ES_MINS -#define KC_E_OVRR ES_OVRR -#define KC_E_APOS ES_APOS +#define KC_E_OVRR ES_MORD +#define KC_E_APOS ES_QUOT #define KC_E_IEXL ES_IEXL //========== Short hand for complex key combinations #define WIN_LEFT_HALF LALT(LGUI(KC_LEFT)) diff --git a/users/doogle999/rules.mk b/users/doogle999/rules.mk index 12698a27e..aab01b243 100644 --- a/users/doogle999/rules.mk +++ b/users/doogle999/rules.mk @@ -2,7 +2,7 @@ SRC += doogle999.c CFLAGS += -fstrict-aliasing -ftree-vrp -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/users/draevin/rules.mk b/users/draevin/rules.mk index 7d6740493..1fc377e23 100644 --- a/users/draevin/rules.mk +++ b/users/draevin/rules.mk @@ -7,6 +7,6 @@ TAP_DANCE_ENABLE = yes AUDIO_ENABLE = no BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite CONSOLE_ENABLE = no SLEEP_LED_ENABLE = no \ No newline at end of file diff --git a/users/drashna/config.h b/users/drashna/config.h index 5f7c32ff3..75e1c11c6 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -17,57 +17,71 @@ #pragma once // Use custom magic number so that when switching branches, EEPROM always gets reset -#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339 +#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339 /* Set Polling rate to 1000Hz */ #define USB_POLLING_INTERVAL_MS 1 #if defined(SPLIT_KEYBOARD) +// # define SPLIT_TRANSPORT_MIRROR +# define SPLIT_LAYER_STATE_ENABLE +# define SPLIT_LED_STATE_ENABLE # define SPLIT_MODS_ENABLE -# define SPLIT_TRANSPORT_MIRROR -# define SERIAL_USE_MULTI_TRANSACTION -// # define SPLIT_NUM_TRANSACTIONS_KB 2 +# ifdef WPM_ENABLE +# define SPLIT_WPM_ENABLE +# endif +# ifdef OLED_DRIVER_ENABLE +# define SPLIT_OLED_ENABLE +# endif +# if defined(__AVR__) && !defined(SELECT_SOFT_SERIAL_SPEED) +# define SELECT_SOFT_SERIAL_SPEED 1 +# endif +# ifdef CUSTOM_SPLIT_TRANSPORT_SYNC +# define SPLIT_TRANSACTION_IDS_USER RPC_ID_USER_STATE_SYNC, RPC_ID_USER_KEYMAP_SYNC, RPC_ID_USER_CONFIG_SYNC +# endif #endif #ifdef AUDIO_ENABLE - # define AUDIO_CLICKY -# define STARTUP_SONG SONG(RICK_ROLL) -# define GOODBYE_SONG SONG(SONIC_RING) -# define DEFAULT_LAYER_SONGS \ - { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) } - # define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f -# define UNICODE_SONG_MAC SONG(RICK_ROLL) -# define UNICODE_SONG_LNX SONG(RICK_ROLL) -# define UNICODE_SONG_WIN SONG(RICK_ROLL) -# define UNICODE_SONG_BSD SONG(RICK_ROLL) -# define UNICODE_SONG_WINC SONG(RICK_ROLL) +# ifdef USER_SONG_LIST +# define STARTUP_SONG SONG(RICK_ROLL) +# define GOODBYE_SONG SONG(SONIC_RING) +# define DEFAULT_LAYER_SONGS \ + { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) } +# define UNICODE_SONG_MAC SONG(MARIO_THEME) +# define UNICODE_SONG_LNX SONG(MARIO_POWERUP) +# define UNICODE_SONG_WIN SONG(MARIO_ONEUP) +# define UNICODE_SONG_BSD SONG(RICK_ROLL) +# define UNICODE_SONG_WINC SONG(RICK_ROLL) +# else +# define STARTUP_SONG SONG(STARTUP_SOUND) +# define GOODBYE_SONG SONG(GOODBYE_SOUND) +# define DEFAULT_LAYER_SONGS \ + { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(WORKMAN_SOUND) } +# define UNICODE_SONG_MAC SONG(QWERTY_SOUND) +# define UNICODE_SONG_LNX SONG(COLEMAK_SOUND) +# define UNICODE_SONG_WIN SONG(DVORAK_SOUND) +# define UNICODE_SONG_BSD SONG(WORKMAN_SOUND) +# define UNICODE_SONG_WINC SONG(PLOVER_GOODBYE_SOUND) +# endif #endif // !AUDIO_ENABLE +#define UNICODE_SELECTED_MODES UC_WIN, UC_MAC + #ifdef RGBLIGHT_ENABLE # define RGBLIGHT_SLEEP -# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) -# undef RGBLIGHT_ANIMATIONS -# define RGBLIGHT_EFFECT_BREATHING -# define RGBLIGHT_EFFECT_SNAKE -# define RGBLIGHT_EFFECT_KNIGHT -# else -# define RGBLIGHT_ANIMATIONS -# endif -# define RGBLIGHT_EFFECT_TWINKLE_LIFE 250 -# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1/24 +# define RGBLIGHT_EFFECT_TWINKLE_LIFE 250 +# define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 24 #endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended -// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -// # define EECONFIG_RGB_MATRIX (uint32_t *)16 +// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +// # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) && !defined(KEYBOARD_launchpad) # define DISABLE_RGB_MATRIX_ALPHAS_MODS @@ -83,8 +97,10 @@ # define DISABLE_RGB_MATRIX_CYCLE_ALL # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN +# if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_moonlander) +# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# endif # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON # define DISABLE_RGB_MATRIX_DUAL_BEACON # define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL @@ -93,6 +109,12 @@ # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS # define DISABLE_RGB_MATRIX_RAINDROPS # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define DISABLE_RGB_MATRIX_HUE_BREATHING +# define DISABLE_RGB_MATRIX_HUE_PENDULUM +# define DISABLE_RGB_MATRIX_HUE_WAVE +# define DISABLE_RGB_MATRIX_PIXEL_RAIN +# define DISABLE_RGB_MATRIX_PIXEL_FLOW +# define DISABLE_RGB_MATRIX_PIXEL_FRACTAL // # define DISABLE_RGB_MATRIX_TYPING_HEATMAP # define DISABLE_RGB_MATRIX_DIGITAL_RAIN # define DISABLE_RGB_MATRIX_SOLID_REACTIVE @@ -108,9 +130,17 @@ # define DISABLE_RGB_MATRIX_SOLID_SPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH # endif // AVR -#endif // RGB_MATRIX_ENABLE +# ifndef RGB_MATRIX_REST_MODE +# if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_moonlander) +# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL +# else +# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN +# endif +# endif +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_REST_MODE +#endif // RGB_MATRIX_ENABLE -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # ifdef SPLIT_KEYBOARD # define OLED_UPDATE_INTERVAL 60 # else @@ -120,7 +150,7 @@ # ifdef OLED_FONT_H # undef OLED_FONT_H # endif -# define OLED_FONT_H "drashna_font.h" +# define OLED_FONT_H "drashna_font.h" # define OLED_FONT_END 255 // # define OLED_FONT_5X5 // # define OLED_FONT_AZTECH @@ -143,8 +173,8 @@ #ifdef QMK_KEYS_PER_SCAN # undef QMK_KEYS_PER_SCAN -# define QMK_KEYS_PER_SCAN 2 -#endif // !QMK_KEYS_PER_SCAN +#endif +#define QMK_KEYS_PER_SCAN 4 // this makes it possible to do rolling combos (zx) with keys that // convert to other keys on hold (z becomes ctrl when you hold it, @@ -152,14 +182,12 @@ // actually sends Ctrl-x. That's bad.) #define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD -//#define TAPPING_FORCE_HOLD -//#define RETRO_TAPPING -#ifndef KEYBOARD_kyria_rev1 +//#define TAPPING_FORCE_HOLD_PER_KEY +//#define RETRO_TAPPING_PER_KEY +#if !defined(KEYBOARD_kyria) && !defined(KEYBOARD_splitkb_kyria) # define TAPPING_TERM_PER_KEY #endif -#define FORCE_NKRO - #ifndef TAPPING_TOGGLE # define TAPPING_TOGGLE 1 #endif @@ -185,14 +213,21 @@ # undef LOCKING_RESYNC_ENABLE #endif +#if !defined(LAYER_STATE_16BIT) && !defined(LAYER_STATE_8BIT) && !defined(LAYER_STATE_32BIT) +# define LAYER_STATE_16BIT +#endif +#ifndef DYNAMIC_KEYMAP_LAYER_COUNT +# define DYNAMIC_KEYMAP_LAYER_COUNT 11 +#endif + #ifdef CONVERT_TO_PROTON_C // pins that are available but not present on Pro Micro -# define A3 PAL_LINE(GPIOA, 3) -# define A4 PAL_LINE(GPIOA, 4) -# define A5 PAL_LINE(GPIOA, 5) -# define A6 PAL_LINE(GPIOA, 6) -# define A7 PAL_LINE(GPIOA, 7) -# define A8 PAL_LINE(GPIOA, 8) +# define A3 PAL_LINE(GPIOA, 3) +# define A4 PAL_LINE(GPIOA, 4) +# define A5 PAL_LINE(GPIOA, 5) +# define A6 PAL_LINE(GPIOA, 6) +# define A7 PAL_LINE(GPIOA, 7) +# define A8 PAL_LINE(GPIOA, 8) # define A13 PAL_LINE(GPIOA, 13) # define A14 PAL_LINE(GPIOA, 14) # define A15 PAL_LINE(GPIOA, 15) @@ -203,3 +238,79 @@ # define C14 PAL_LINE(GPIOC, 14) # define C15 PAL_LINE(GPIOC, 15) #endif + +#ifdef MOUSEKEY_ENABLE +// mouse movement config +# ifdef MK_3_SPEED +# undef MK_3_SPEED +# endif +# define MK_KINETIC_SPEED +# ifdef MK_KINETIC_SPEED +# ifndef MOUSEKEY_DELAY +# define MOUSEKEY_DELAY 8 +# endif +# ifndef MOUSEKEY_INTERVAL +# define MOUSEKEY_INTERVAL 20 +# endif +# ifdef MOUSEKEY_MOVE_DELTA +# define MOUSEKEY_MOVE_DELTA 25 +# endif +# else +# ifndef MOUSEKEY_DELAY +# define MOUSEKEY_DELAY 300 +# endif +# ifndef MOUSEKEY_INTERVAL +# define MOUSEKEY_INTERVAL 50 +# endif +# ifndef MOUSEKEY_MOVE_DELTA +# define MOUSEKEY_MOVE_DELTA 5 +# endif +# endif +# ifndef MOUSEKEY_MAX_SPEED +# define MOUSEKEY_MAX_SPEED 7 +# endif +# ifndef MOUSEKEY_TIME_TO_MAX +# define MOUSEKEY_TIME_TO_MAX 60 +# endif +# ifndef MOUSEKEY_INITIAL_SPEED +# define MOUSEKEY_INITIAL_SPEED 100 +# endif +# ifndef MOUSEKEY_BASE_SPEED +# define MOUSEKEY_BASE_SPEED 1000 +# endif +# ifndef MOUSEKEY_DECELERATED_SPEED +# define MOUSEKEY_DECELERATED_SPEED 400 +# endif +# ifndef MOUSEKEY_ACCELERATED_SPEED +# define MOUSEKEY_ACCELERATED_SPEED 3000 +# endif +// mouse scroll config +# ifndef MOUSEKEY_WHEEL_DELAY +# define MOUSEKEY_WHEEL_DELAY 15 +# endif +# ifndef MOUSEKEY_WHEEL_DELTA +# define MOUSEKEY_WHEEL_DELTA 1 +# endif +# ifndef MOUSEKEY_WHEEL_INTERVAL +# define MOUSEKEY_WHEEL_INTERVAL 50 +# endif +# ifndef MOUSEKEY_WHEEL_MAX_SPEED +# define MOUSEKEY_WHEEL_MAX_SPEED 8 +# endif +# ifndef MOUSEKEY_WHEEL_TIME_TO_MAX +# define MOUSEKEY_WHEEL_TIME_TO_MAX 80 +# endif +// mouse scroll kinetic config +# ifndef MOUSEKEY_WHEEL_INITIAL_MOVEMENTS +# define MOUSEKEY_WHEEL_INITIAL_MOVEMENTS 8 +# endif +# ifndef MOUSEKEY_WHEEL_BASE_MOVEMENTS +# define MOUSEKEY_WHEEL_BASE_MOVEMENTS 48 +# endif +# ifndef MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS +# define MOUSEKEY_WHEEL_ACCELERATED_MOVEMENTS 48 +# endif +# ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS +# define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8 +# endif +#endif // MOUSEKEY_ENABLE diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index a49373726..3423e379a 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -50,8 +50,7 @@ bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this } __attribute__((weak)) void keyboard_pre_init_keymap(void) {} - -void keyboard_pre_init_user(void) { +void keyboard_pre_init_user(void) { userspace_config.raw = eeconfig_read_user(); keyboard_pre_init_keymap(); } @@ -59,12 +58,11 @@ void keyboard_pre_init_user(void) { // This allows for a global, userspace functions, and continued // customization of the keymap. Use _keymap instead of _user // functions in the keymaps -__attribute__((weak)) void matrix_init_keymap(void) {} -__attribute__((weak)) void matrix_init_secret(void) {} - // Call user matrix init, set default RGB colors and then // call the keymap's init function -void matrix_init_user(void) { +__attribute__((weak)) void matrix_init_keymap(void) {} +__attribute__((weak)) void matrix_init_secret(void) {} +void matrix_init_user(void) { #if defined(BOOTLOADER_CATERINA) && defined(__AVR__) DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); @@ -75,27 +73,33 @@ void matrix_init_user(void) { matrix_init_secret(); matrix_init_keymap(); +#if defined(AUDIO_ENABLE) && defined(SPLIT_KEYBOARD) + if (!is_keyboard_master()) { + stop_all_notes(); + } +#endif } __attribute__((weak)) void keyboard_post_init_keymap(void) {} - -void keyboard_post_init_user(void) { +void keyboard_post_init_user(void) { #if defined(RGBLIGHT_ENABLE) keyboard_post_init_rgb_light(); #endif #if defined(RGB_MATRIX_ENABLE) keyboard_post_init_rgb_matrix(); +#endif +#if defined(SPLIT_KEYBOARD) && defined(SPLIT_TRANSACTION_IDS_USER) + keyboard_post_init_transport_sync(); #endif keyboard_post_init_keymap(); } -__attribute__((weak)) void shutdown_keymap(void) {} - #ifdef RGB_MATRIX_ENABLE void rgb_matrix_update_pwm_buffers(void); #endif -void shutdown_user(void) { +__attribute__((weak)) void shutdown_keymap(void) {} +void shutdown_user(void) { #ifdef RGBLIGHT_ENABLE rgblight_enable_noeeprom(); rgblight_mode_noeeprom(1); @@ -112,23 +116,28 @@ void shutdown_user(void) { __attribute__((weak)) void suspend_power_down_keymap(void) {} void suspend_power_down_user(void) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_off(); #endif suspend_power_down_keymap(); } __attribute__((weak)) void suspend_wakeup_init_keymap(void) {} - -void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); } - -__attribute__((weak)) void matrix_scan_keymap(void) {} - -__attribute__((weak)) void matrix_scan_secret(void) {} +void suspend_wakeup_init_user(void) { + if (layer_state_is(_GAMEPAD)) { + layer_off(_GAMEPAD); + } + if (layer_state_is(_DIABLO)) { + layer_off(_DIABLO); + } + suspend_wakeup_init_keymap(); +} // No global matrix scan code, so just run keymap's matrix // scan function -void matrix_scan_user(void) { +__attribute__((weak)) void matrix_scan_keymap(void) {} +__attribute__((weak)) void matrix_scan_secret(void) {} +void matrix_scan_user(void) { static bool has_ran_yet; if (!has_ran_yet) { has_ran_yet = true; @@ -155,16 +164,14 @@ void matrix_scan_user(void) { float doom_song[][2] = SONG(E1M1_DOOM); #endif -__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } - // on layer change, no matter where the change was initiated // Then runs keymap's layer change check -layer_state_t layer_state_set_user(layer_state_t state) { +__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } +layer_state_t layer_state_set_user(layer_state_t state) { if (!is_keyboard_master()) { return state; } - state = layer_state_set_keymap(state); state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); #if defined(RGBLIGHT_ENABLE) state = layer_state_set_rgb_light(state); @@ -180,13 +187,13 @@ layer_state_t layer_state_set_user(layer_state_t state) { } } #endif + state = layer_state_set_keymap(state); return state; } -__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } - // Runs state check and changes underglow color and animation -layer_state_t default_layer_state_set_user(layer_state_t state) { +__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } +layer_state_t default_layer_state_set_user(layer_state_t state) { if (!is_keyboard_master()) { return state; } @@ -201,22 +208,14 @@ layer_state_t default_layer_state_set_user(layer_state_t state) { } __attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} - -// Any custom LED code goes here. -// So far, I only have keyboard specific code, -// So nothing goes here. -void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } +void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } __attribute__((weak)) void eeconfig_init_keymap(void) {} - -void eeconfig_init_user(void) { +void eeconfig_init_user(void) { userspace_config.raw = 0; userspace_config.rgb_layer_change = true; eeconfig_update_user(userspace_config.raw); eeconfig_init_keymap(); -#ifdef VIA_ENABLE - via_eeprom_reset(); -#endif keyboard_init(); } @@ -226,3 +225,39 @@ bool hasAllBitsInMask(uint8_t value, uint8_t mask) { return (value & mask) == mask; } + +#ifdef SPLIT_KEYBOARD +# if defined(AUDIO_ENABLE) +bool delayed_tasks_run = false; +# endif +__attribute__((weak)) void matrix_slave_scan_keymap(void) {} +void matrix_slave_scan_user(void) { +# if defined(AUDIO_ENABLE) +# if !defined(NO_MUSIC_MODE) + music_task(); +# endif + if (!is_keyboard_master()) { + static uint16_t delayed_task_timer = 0; + if (!delayed_tasks_run) { + if (!delayed_task_timer) { + delayed_task_timer = timer_read(); + } else if (timer_elapsed(delayed_task_timer) > 300) { + audio_startup(); + delayed_tasks_run = true; + } + } + } +# endif +# ifdef SEQUENCER_ENABLE + sequencer_task(); +# endif +# ifdef LED_MATRIX_ENABLE + led_matrix_task(); +# endif +# ifdef HAPTIC_ENABLE + haptic_task(); +# endif + + matrix_slave_scan_keymap(); +} +#endif diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index e66f10657..af26fdc43 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -29,34 +29,61 @@ #if defined(RGB_MATRIX_ENABLE) # include "rgb_matrix_stuff.h" #endif -#if defined(OLED_DRIVER_ENABLE) +#if defined(OLED_ENABLE) # include "oled_stuff.h" #endif #if defined(PIMORONI_TRACKBALL_ENABLE) -# include "pimoroni_trackball.h" +# include "drivers/sensors/pimoroni_trackball.h" +#endif +#ifdef SPLIT_KEYBOARD +# include "transport_sync.h" #endif /* Define layer names */ enum userspace_layers { - _QWERTY = 0, - _NUMLOCK = 0, + _QWERTY = 0, + _NUMLOCK = 0, + FIRST_DEFAULT_LAYER = 0, + _COLEMAK_DH, _COLEMAK, _DVORAK, - _WORKMAN, - _NORMAN, - _MALTRON, - _EUCALYN, - _CARPLAX, + LAST_DEFAULT_LAYER = _DVORAK, _GAMEPAD, _DIABLO, - _MACROS, + _MOUSE, _MEDIA, _LOWER, _RAISE, _ADJUST, }; -#define _MOUSE _MACROS +#define _MACROS _MOUSE +#define _DEFAULT_LAYER_1 FIRST_DEFAULT_LAYER +#define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 1) +#define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 2) +#define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 3) +#if LAST_DEFAULT_LAYER > (FIRST_DEFAULT_LAYER + 3) +# define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 4) +# define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 5) +# define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 6) +# define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 7) +# if LAST_DEFAULT_LAYER > (FIRST_DEFAULT_LAYER + 7) +# define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 8) +# define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 9) +# define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 10) +# define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 11) +# endif +#endif + +#define DEFAULT_LAYER_1_HSV HSV_CYAN +#define DEFAULT_LAYER_2_HSV HSV_CHARTREUSE +#define DEFAULT_LAYER_3_HSV HSV_MAGENTA +#define DEFAULT_LAYER_4_HSV HSV_GOLDENROD + +#define DEFAULT_LAYER_1_RGB RGB_CYAN +#define DEFAULT_LAYER_2_RGB RGB_CHARTREUSE +#define DEFAULT_LAYER_3_RGB RGB_MAGENTA +#define DEFAULT_LAYER_4_RGB RGB_GOLDENROD bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); @@ -72,6 +99,9 @@ layer_state_t default_layer_state_set_keymap(layer_state_t state); void led_set_keymap(uint8_t usb_led); void eeconfig_init_keymap(void); bool hasAllBitsInMask(uint8_t value, uint8_t mask); +#ifdef SPLIT_KEYBOARD +void matrix_slave_scan_keymap(void); +#endif // clang-format off typedef union { @@ -104,7 +134,3 @@ We use custom codes here, so we can substitute the right stuff # define KC_D3_3 KC_3 # define KC_D3_4 KC_4 #endif // TAP_DANCE_ENABLE - -#if defined(DRASHNA_CUSTOM_TRANSPORT) && defined(POINTING_DEVICE_ENABLE) -void master_mouse_send(int8_t x, int8_t y); -#endif diff --git a/users/drashna/drashna_font.h b/users/drashna/drashna_font.h index 6a3865a44..e9353e62a 100644 --- a/users/drashna/drashna_font.h +++ b/users/drashna/drashna_font.h @@ -3,10 +3,14 @@ // additional fonts from // https://github.com/datacute/TinyOLED-Fonts -#include "progmem.h" +#if __has_include("../../../../Documents/qmk/oled_font.h") +# include "../../../../Documents/qmk/oled_font.h" +#else +# include "progmem.h" +// clang-format off static const unsigned char font[] PROGMEM = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00 0 + 0x07, 0x08, 0x7F, 0x08, 0x07, 0x00, // 0x00 0 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, // 0x01 1 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, // 0x02 2 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, // 0x03 3 ♥ @@ -38,7 +42,7 @@ static const unsigned char font[] PROGMEM = { 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, // 0x1D 29 ↭ 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, // 0x1E 30 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, // 0x1F 31 -#if defined(OLED_FONT_5X5) +# if defined(OLED_FONT_5X5) 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 0x5c,0x00,0x00,0x00,0x00,0x00, // 0x21 33 ! 0x06,0x00,0x06,0x00,0x00,0x00, // 0x22 34 " @@ -135,7 +139,7 @@ static const unsigned char font[] PROGMEM = { 0x44,0x7c,0x10,0x00,0x00,0x00, // 0x7D 125 } 0x02,0x01,0x02,0x01,0x00,0x00, // 0x7E 126 ~ 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 -#elif defined(OLED_FONT_AZTECH) +# lif defined(OLED_FONT_AZTECH) 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 0x00,0x2e,0x00,0x00,0x00,0x00, // 0x21 33 ! 0x00,0x02,0x00,0x02,0x00,0x00, // 0x22 34 " @@ -232,7 +236,7 @@ static const unsigned char font[] PROGMEM = { 0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 } 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7E 126 ~ 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 -#elif defined(OLED_FONT_BMPLAIN) +# elif defined(OLED_FONT_BMPLAIN) 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 0x2e,0x00,0x00,0x00,0x00,0x00, // 0x21 33 ! 0x03,0x00,0x03,0x00,0x00,0x00, // 0x22 34 " @@ -329,7 +333,7 @@ static const unsigned char font[] PROGMEM = { 0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 } 0x01,0x01,0x01,0x00,0x00,0x00, // 0x7E 126 ~ 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 -#elif defined(OLED_FONT_SUPER_DIGG) +# elif defined(OLED_FONT_SUPER_DIGG) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32 0x58, 0x5C, 0x00, 0x00, 0x00, 0x00, // 0x21 33 ! 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, // 0x22 34 " @@ -426,7 +430,7 @@ static const unsigned char font[] PROGMEM = { 0xC2, 0xFE, 0x10, 0x00, 0x00, 0x00, // 0x7D 125 } 0x02, 0x01, 0x03, 0x04, 0x06, 0x02, // 0x7E 126 ~ 0x3C, 0x22, 0x21, 0x22, 0x3C, 0x00, // 0x7F 127 -#else // default font +# else // default font 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, // 0x21 33 ! 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, // 0x22 34 " @@ -523,9 +527,9 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, // 0x7D 125 } 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, // 0x7E 126 ~ 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, // 0x7F 127 -#endif +# endif -#if defined(OLED_LOGO_GMK_BAD) +# if defined(OLED_LOGO_GMK_BAD) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 0x80, 0xC0, 0xE0, 0xF0, 0xF0, 0x70, // 0x81 0x38, 0x38, 0x38, 0x78, 0x70, 0xF0, // 0x82 @@ -654,7 +658,7 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - #elif defined(OLED_LOGO_HUE_MANITEE) +# elif defined(OLED_LOGO_HUE_MANITEE) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x90, 0x70, 0xE8, 0xA8, 0xE4, 0xC4, @@ -783,7 +787,7 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - #elif defined(OLED_LOGO_CORNE) +# elif defined(OLED_LOGO_CORNE) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, @@ -913,7 +917,7 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -#elif defined(OLED_LOGO_GOTHAM) // see /keyboards/crkbd/keymaps/gotham/oled.c +# elif defined(OLED_LOGO_GOTHAM) // see /keyboards/crkbd/keymaps/gotham/oled.c 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 0x00, 0x00, 0xC0, 0x60, 0x30, 0x18, 0xF8, 0x18, 0x00, 0xC0, 0x70, 0x1C, @@ -1042,137 +1046,7 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - -#elif defined(OLED_LOGO_SCIFI) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0x60, - 0x70, 0x30, 0x38, 0x18, 0x0C, 0x0C, - 0x1E, 0x0C, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xC0, 0xE0, 0xF0, 0x38, 0x1C, 0x0E, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, - 0xC0, 0x60, 0x60, 0x30, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, - 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, - 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, - 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, - 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, - 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, - 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, - 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x30, 0x30, 0x70, 0x78, 0x78, 0x7C, - 0x7C, 0x7E, 0x3E, 0x3F, 0x3F, 0x3B, - 0x3B, 0x39, 0x39, 0x38, 0x38, 0x38, - 0x38, 0x38, 0x38, 0x38, 0x3C, 0x38, - 0x18, 0x8F, 0xDF, 0xF8, 0x7C, 0xBE, - 0xDF, 0xF7, 0xFB, 0xFD, 0xFE, 0xEF, - 0x73, 0x3B, 0x1B, 0x1F, 0xEF, 0xF7, - 0xFF, 0x7E, 0x6F, 0x6F, 0x6F, 0x6F, - 0x6D, 0xBD, 0xE1, 0xF9, 0x3F, 0x3F, - 0x39, 0x79, 0x79, 0x7D, 0xED, 0xED, - 0xCD, 0xC7, 0xC7, 0x87, 0xC7, 0xE3, - 0xE0, 0xF8, 0x7E, 0x3F, 0x37, 0x33, - 0x3B, 0x1B, 0x19, 0x19, 0x0D, 0xED, - 0xFF, 0xBF, 0xC7, 0xE7, 0xE3, 0xF0, - 0x7C, 0xDE, 0xE7, 0xFB, 0x3E, 0x3F, - 0xFC, 0xE0, 0xF8, 0x3E, 0xCF, 0xF3, - 0xFC, 0x3F, 0x1F, 0x1F, 0x3C, 0x7E, - 0x76, 0xF3, 0xE3, 0x81, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, - 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, - 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, - 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, - 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, - 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, - 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, - 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x30, 0x18, 0x1E, - 0x0F, 0x03, 0x01, 0x00, 0x00, 0x00, - 0x01, 0x03, 0x03, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0xE1, 0x79, 0x3E, 0x1F, - 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, - 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, - 0x02, 0x06, 0x04, 0x08, 0x18, 0x10, - 0x30, 0x20, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F, - 0x00, 0x14, 0x08, 0x14, 0x00, 0x00, - 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F, - 0x00, 0x22, 0x1C, 0x41, 0x3E, 0x00, - 0x00, 0x00, 0x00, 0x30, 0x18, 0x0C, - 0x06, 0x0C, 0x18, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x06, 0x06, 0x06, 0x0C, - 0x18, 0x30, 0x66, 0x66, 0x66, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x0C, 0x7E, - 0x7F, 0x7E, 0x0C, 0x08, 0x00, 0x00, - 0x00, 0x00, 0x77, 0x77, 0x77, 0x00, - 0x77, 0x77, 0x77, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xE7, 0xA5, 0xFF, 0x24, - 0x24, 0xFF, 0xA5, 0xE7, 0x00, 0x00, - 0x00, 0x00, 0x1C, 0x22, 0xC9, 0xD1, - 0xC9, 0x22, 0x1C, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x02, 0x38, 0xFC, 0xED, - 0xFC, 0x38, 0x02, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x3E, 0x4A, 0x4F, - 0x4A, 0x3E, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x60, 0x6A, 0x64, - 0x6A, 0x60, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x04, 0x42, 0x69, 0x65, 0x65, - 0x65, 0x69, 0x42, 0x04, 0x00, 0x00, - 0x00, 0x00, 0x1C, 0x14, 0x1C, 0x08, - 0x18, 0x08, 0x18, 0x00, 0x00, 0x00, - 0x00, 0x70, 0xC8, 0xEE, 0xF9, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#else +# else 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, @@ -1302,5 +1176,7 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -#endif +# endif }; +// clang-format on +#endif diff --git a/users/drashna/drashna_transport.c b/users/drashna/drashna_transport.c deleted file mode 100644 index 9df11c9bd..000000000 --- a/users/drashna/drashna_transport.c +++ /dev/null @@ -1,603 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 -#include - -#include "matrix.h" -#include QMK_KEYBOARD_H - -#define ROWS_PER_HAND (MATRIX_ROWS / 2) -#define SYNC_TIMER_OFFSET 2 - -#ifdef RGBLIGHT_ENABLE -# include "rgblight.h" -#endif - -#ifdef BACKLIGHT_ENABLE -# include "backlight.h" -#endif - -#ifdef ENCODER_ENABLE -# include "encoder.h" -static pin_t encoders_pad[] = ENCODERS_PAD_A; -# define NUMBER_OF_ENCODERS (sizeof(encoders_pad) / sizeof(pin_t)) -#endif - -#ifdef POINTING_DEVICE_ENABLE -static uint16_t device_cpi = 0; -static int8_t split_mouse_x = 0, split_mouse_y = 0; -#endif - -#ifdef OLED_DRIVER_ENABLE -# include "oled_driver.h" -#endif - -#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) -# include "led_matrix.h" -#endif -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) -# include "rgb_matrix.h" -#endif - -#if defined(USE_I2C) - -# include "i2c_master.h" -# include "i2c_slave.h" - -typedef struct _I2C_slave_buffer_t { -# ifndef DISABLE_SYNC_TIMER - uint32_t sync_timer; -# endif -# ifdef SPLIT_TRANSPORT_MIRROR - matrix_row_t mmatrix[ROWS_PER_HAND]; -# endif - matrix_row_t smatrix[ROWS_PER_HAND]; -# ifdef SPLIT_MODS_ENABLE - uint8_t real_mods; - uint8_t weak_mods; -# ifndef NO_ACTION_ONESHOT - uint8_t oneshot_mods; -# endif -# endif -# ifdef BACKLIGHT_ENABLE - uint8_t backlight_level; -# endif -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - rgblight_syncinfo_t rgblight_sync; -# endif -# ifdef ENCODER_ENABLE - uint8_t encoder_state[NUMBER_OF_ENCODERS]; -# endif -# ifdef WPM_ENABLE - uint8_t current_wpm; -# endif -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - led_eeconfig_t led_matrix; - bool led_suspend_state; -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - rgb_config_t rgb_matrix; - bool rgb_suspend_state; -# endif - int8_t mouse_x; - int8_t mouse_y; - uint16_t device_cpi; - bool oled_on; - layer_state_t t_layer_state; - layer_state_t t_default_layer_state; -} __attribute__((packed)) I2C_slave_buffer_t; - -static I2C_slave_buffer_t *const i2c_buffer = (I2C_slave_buffer_t *)i2c_slave_reg; - -# define I2C_BACKLIGHT_START offsetof(I2C_slave_buffer_t, backlight_level) -# define I2C_RGB_START offsetof(I2C_slave_buffer_t, rgblight_sync) -# define I2C_KEYMAP_MASTER_START offsetof(I2C_slave_buffer_t, mmatrix) -# define I2C_KEYMAP_SLAVE_START offsetof(I2C_slave_buffer_t, smatrix) -# define I2C_SYNC_TIME_START offsetof(I2C_slave_buffer_t, sync_timer) -# define I2C_REAL_MODS_START offsetof(I2C_slave_buffer_t, real_mods) -# define I2C_WEAK_MODS_START offsetof(I2C_slave_buffer_t, weak_mods) -# define I2C_ONESHOT_MODS_START offsetof(I2C_slave_buffer_t, oneshot_mods) -# define I2C_ENCODER_START offsetof(I2C_slave_buffer_t, encoder_state) -# define I2C_WPM_START offsetof(I2C_slave_buffer_t, current_wpm) -# define I2C_MOUSE_X_START offsetof(I2C_slave_buffer_t, mouse_x) -# define I2C_MOUSE_Y_START offsetof(I2C_slave_buffer_t, mouse_y) -# define I2C_MOUSE_DPI_START offsetof(I2C_slave_buffer_t, device_cpi) -# define I2C_OLED_ON_START offsetof(I2C_slave_buffer_t, oled_on) -# define I2C_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_layer_state) -# define I2C_DEFAULT_LAYER_STATE_START offsetof(I2C_slave_buffer_t, t_default_layer_state) -# define I2C_LED_MATRIX_START offsetof(I2C_slave_buffer_t, led_matrix) -# define I2C_LED_SUSPEND_START offsetof(I2C_slave_buffer_t, led_suspend_state) -# define I2C_RGB_MATRIX_START offsetof(I2C_slave_buffer_t, rgb_matrix) -# define I2C_RGB_SUSPEND_START offsetof(I2C_slave_buffer_t, rgb_suspend_state) - -# define TIMEOUT 100 - -# ifndef SLAVE_I2C_ADDRESS -# define SLAVE_I2C_ADDRESS 0x32 -# endif - -// Get rows from other half over i2c -bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_SLAVE_START, (void *)slave_matrix, sizeof(i2c_buffer->smatrix), TIMEOUT); -# ifdef SPLIT_TRANSPORT_MIRROR - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_KEYMAP_MASTER_START, (void *)master_matrix, sizeof(i2c_buffer->mmatrix), TIMEOUT); -# endif - // write backlight info -# ifdef BACKLIGHT_ENABLE - uint8_t level = is_backlight_enabled() ? get_backlight_level() : 0; - if (level != i2c_buffer->backlight_level) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_BACKLIGHT_START, (void *)&level, sizeof(level), TIMEOUT) >= 0) { - i2c_buffer->backlight_level = level; - } - } -# endif - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - if (rgblight_get_change_flags()) { - rgblight_syncinfo_t rgblight_sync; - rgblight_get_syncinfo(&rgblight_sync); - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_START, (void *)&rgblight_sync, sizeof(rgblight_sync), TIMEOUT) >= 0) { - rgblight_clear_change_flags(); - } - } -# endif - -# ifdef ENCODER_ENABLE - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_ENCODER_START, (void *)i2c_buffer->encoder_state, sizeof(i2c_buffer->encoder_state), TIMEOUT); - encoder_update_raw(i2c_buffer->encoder_state); -# endif - -# ifdef WPM_ENABLE - uint8_t current_wpm = get_current_wpm(); - if (current_wpm != i2c_buffer->current_wpm) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WPM_START, (void *)¤t_wpm, sizeof(current_wpm), TIMEOUT) >= 0) { - i2c_buffer->current_wpm = current_wpm; - } - } -# endif - -# ifdef POINTING_DEVICE_ENABLE - if (is_keyboard_left()) { - report_mouse_t temp_report = pointing_device_get_report(); - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT); - temp_report.x = i2c_buffer->mouse_x; - i2c_readReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT); - temp_report.y = i2c_buffer->mouse_y; - pointing_device_set_report(temp_report); - - if (device_cpi != i2c_buffer->device_cpi) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_DPI_START, (void *)&device_cpi, sizeof(device_cpi), TIMEOUT) >= 0) { - i2c_buffer->device_cpi = device_cpi - } - } - } -# endif - -# ifdef SPLIT_MODS_ENABLE - uint8_t real_mods = get_mods(); - if (real_mods != i2c_buffer->real_mods) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_REAL_MODS_START, (void *)&real_mods, sizeof(real_mods), TIMEOUT) >= 0) { - i2c_buffer->real_mods = real_mods; - } - } - - uint8_t weak_mods = get_weak_mods(); - if (weak_mods != i2c_buffer->weak_mods) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_WEAK_MODS_START, (void *)&weak_mods, sizeof(weak_mods), TIMEOUT) >= 0) { - i2c_buffer->weak_mods = weak_mods; - } - } - -# ifndef NO_ACTION_ONESHOT - uint8_t oneshot_mods = get_oneshot_mods(); - if (oneshot_mods != i2c_buffer->oneshot_mods) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_ONESHOT_MODS_START, (void *)&oneshot_mods, sizeof(oneshot_mods), TIMEOUT) >= 0) { - i2c_buffer->oneshot_mods = oneshot_mods; - } - } -# endif -# endif - - if (layer_state != i2c_buffer->t_layer_state) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&layer_state, sizeof(layer_state), TIMEOUT) >= 0) { - i2c_buffer->t_layer_state = layer_state; - } - } - - if (default_layer_state != i2c_buffer->t_default_layer_state) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_DEFAULT_LAYER_STATE_START, (void *)&default_layer_state, sizeof(default_layer_state), TIMEOUT) >= 0) { - i2c_buffer->t_default_layer_state = default_layer_state; - } - } - -# ifdef OLED_DRIVER_ENABLE - bool is_oled_on = is_oled_on(); - if (is_oled_on != i2c_buffer->oled_on) { - if (i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LAYER_STATE_START, (void *)&is_oled_on, sizeof(is_oled_on), TIMEOUT) >= 0) { - i2c_buffer->oled_on = is_oled_on; - } - } -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_MATRIX_START, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix), TIMEOUT); - bool suspend_state = led_matrix_get_suspend_state(); - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_LED_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->led_suspend_state), TIMEOUT); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_MATRIX_START, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix), TIMEOUT); - bool suspend_state = rgb_matrix_get_suspend_state(); - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_RGB_SUSPEND_START, (void *)suspend_state, sizeof(i2c_buffer->rgb_suspend_state), TIMEOUT); -# endif - -# ifndef DISABLE_SYNC_TIMER - i2c_buffer->sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_SYNC_TIME_START, (void *)&i2c_buffer->sync_timer, sizeof(i2c_buffer->sync_timer), TIMEOUT); -# endif - - return true; -} - -void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { -# ifndef DISABLE_SYNC_TIMER - sync_timer_update(i2c_buffer->sync_timer); -# endif - // Copy matrix to I2C buffer - memcpy((void *)i2c_buffer->smatrix, (void *)slave_matrix, sizeof(i2c_buffer->smatrix)); -# ifdef SPLIT_TRANSPORT_MIRROR - memcpy((void *)master_matrix, (void *)i2c_buffer->mmatrix, sizeof(i2c_buffer->mmatrix)); -# endif - -// Read Backlight Info -# ifdef BACKLIGHT_ENABLE - backlight_set(i2c_buffer->backlight_level); -# endif - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - // Update the RGB with the new data - if (i2c_buffer->rgblight_sync.status.change_flags != 0) { - rgblight_update_sync(&i2c_buffer->rgblight_sync, false); - i2c_buffer->rgblight_sync.status.change_flags = 0; - } -# endif - -# ifdef ENCODER_ENABLE - encoder_state_raw(i2c_buffer->encoder_state); -# endif - -# ifdef WPM_ENABLE - set_current_wpm(i2c_buffer->current_wpm); -# endif - -# ifdef POINTING_DEVICE_ENABLE - if (!is_keyboard_left()) { - static uint16_t cpi; - if (cpi != i2c_buffer->device_cpi) { - cpi = i2c_buffer->device_cpi; - pmw_set_cpi(cpi); - } - i2c_buffer->mouse_x = split_mouse_x; - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_X_START, (void *)&i2c_buffer->mouse_x, sizeof(i2c_buffer->mouse_x), TIMEOUT); - i2c_buffer->mouse_y = split_mouse_y; - i2c_writeReg(SLAVE_I2C_ADDRESS, I2C_MOUSE_Y_START, (void *)&i2c_buffer->mouse_y, sizeof(i2c_buffer->mouse_y), TIMEOUT); - } - -# endif - -# ifdef SPLIT_MODS_ENABLE - set_mods(i2c_buffer->real_mods); - set_weak_mods(i2c_buffer->weak_mods); -# ifndef NO_ACTION_ONESHOT - set_oneshot_mods(i2c_buffer->oneshot_mods); -# endif -# endif - - if (layer_state != i2c_buffer->t_layer_state) { - layer_state = i2c_buffer->t_layer_state; - } - if (default_layer_state != i2c_buffer->t_default_layer_state) { - default_layer_state = i2c_buffer->t_default_layer_state; - } - -# ifdef OLED_DRIVER_ENABLE - if (i2c_buffer->oled_on) { - oled_on(); - } else { - oled_off(); - } -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - memcpy((void *)i2c_buffer->led_matrix, (void *)led_matrix_eeconfig, sizeof(i2c_buffer->led_matrix)); - led_matrix_set_suspend_state(i2c_buffer->led_suspend_state); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - memcpy((void *)i2c_buffer->rgb_matrix, (void *)rgb_matrix_config, sizeof(i2c_buffer->rgb_matrix)); - rgb_matrix_set_suspend_state(i2c_buffer->rgb_suspend_state); -# endif -} - -void transport_master_init(void) { i2c_init(); } - -void transport_slave_init(void) { i2c_slave_init(SLAVE_I2C_ADDRESS); } - -#else // USE_SERIAL - -# include "serial.h" - -typedef struct _Serial_s2m_buffer_t { - // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack - matrix_row_t smatrix[ROWS_PER_HAND]; -# ifdef ENCODER_ENABLE - uint8_t encoder_state[NUMBER_OF_ENCODERS]; -# endif - int8_t mouse_x; - int8_t mouse_y; -} __attribute__((packed)) Serial_s2m_buffer_t; - -typedef struct _Serial_m2s_buffer_t { -# ifdef SPLIT_MODS_ENABLE - uint8_t real_mods; - uint8_t weak_mods; -# ifndef NO_ACTION_ONESHOT - uint8_t oneshot_mods; -# endif -# endif -# ifndef DISABLE_SYNC_TIMER - uint32_t sync_timer; -# endif -# ifdef SPLIT_TRANSPORT_MIRROR - matrix_row_t mmatrix[ROWS_PER_HAND]; -# endif -# ifdef BACKLIGHT_ENABLE - uint8_t backlight_level; -# endif -# ifdef WPM_ENABLE - uint8_t current_wpm; -# endif - uint16_t device_cpi; - bool oled_on; - layer_state_t t_layer_state; - layer_state_t t_default_layer_state; -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - led_eeconfig_t led_matrix; - bool led_suspend_state; -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - rgb_config_t rgb_matrix; - bool rgb_suspend_state; -# endif -} __attribute__((packed)) Serial_m2s_buffer_t; - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) -// When MCUs on both sides drive their respective RGB LED chains, -// it is necessary to synchronize, so it is necessary to communicate RGB -// information. In that case, define RGBLIGHT_SPLIT with info on the number -// of LEDs on each half. -// -// Otherwise, if the master side MCU drives both sides RGB LED chains, -// there is no need to communicate. - -typedef struct _Serial_rgblight_t { - rgblight_syncinfo_t rgblight_sync; -} Serial_rgblight_t; - -volatile Serial_rgblight_t serial_rgblight = {}; -uint8_t volatile status_rgblight = 0; -# endif - -volatile Serial_s2m_buffer_t serial_s2m_buffer = {}; -volatile Serial_m2s_buffer_t serial_m2s_buffer = {}; -uint8_t volatile status0 = 0; - -enum serial_transaction_id { - GET_SLAVE_MATRIX = 0, -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - PUT_RGBLIGHT, -# endif -}; - -SSTD_t transactions[] = { - [GET_SLAVE_MATRIX] = - { - (uint8_t *)&status0, - sizeof(serial_m2s_buffer), - (uint8_t *)&serial_m2s_buffer, - sizeof(serial_s2m_buffer), - (uint8_t *)&serial_s2m_buffer, - }, -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - [PUT_RGBLIGHT] = - { - (uint8_t *)&status_rgblight, sizeof(serial_rgblight), (uint8_t *)&serial_rgblight, 0, NULL // no slave to master transfer - }, -# endif -}; - -void transport_master_init(void) { soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } - -void transport_slave_init(void) { soft_serial_target_init(transactions, TID_LIMIT(transactions)); } - -# if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT) - -// rgblight synchronization information communication. - -void transport_rgblight_master(void) { - if (rgblight_get_change_flags()) { - rgblight_get_syncinfo((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync); - if (soft_serial_transaction(PUT_RGBLIGHT) == TRANSACTION_END) { - rgblight_clear_change_flags(); - } - } -} - -void transport_rgblight_slave(void) { - if (status_rgblight == TRANSACTION_ACCEPTED) { - rgblight_update_sync((rgblight_syncinfo_t *)&serial_rgblight.rgblight_sync, false); - status_rgblight = TRANSACTION_END; - } -} - -# else -# define transport_rgblight_master() -# define transport_rgblight_slave() -# endif - -bool transport_master(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { -# ifndef SERIAL_USE_MULTI_TRANSACTION - if (soft_serial_transaction() != TRANSACTION_END) { - return false; - } -# else - transport_rgblight_master(); - if (soft_serial_transaction(GET_SLAVE_MATRIX) != TRANSACTION_END) { - return false; - } -# endif - - // TODO: if MATRIX_COLS > 8 change to unpack() - for (int i = 0; i < ROWS_PER_HAND; ++i) { - slave_matrix[i] = serial_s2m_buffer.smatrix[i]; -# ifdef SPLIT_TRANSPORT_MIRROR - serial_m2s_buffer.mmatrix[i] = master_matrix[i]; -# endif - } - -# ifdef BACKLIGHT_ENABLE - // Write backlight level for slave to read - serial_m2s_buffer.backlight_level = is_backlight_enabled() ? get_backlight_level() : 0; -# endif - -# ifdef ENCODER_ENABLE - encoder_update_raw((uint8_t *)serial_s2m_buffer.encoder_state); -# endif - -# ifdef WPM_ENABLE - // Write wpm to slave - serial_m2s_buffer.current_wpm = get_current_wpm(); -# endif - -# ifdef SPLIT_MODS_ENABLE - serial_m2s_buffer.real_mods = get_mods(); - serial_m2s_buffer.weak_mods = get_weak_mods(); -# ifndef NO_ACTION_ONESHOT - serial_m2s_buffer.oneshot_mods = get_oneshot_mods(); -# endif -# endif - -# ifdef POINTING_DEVICE_ENABLE - if (is_keyboard_left()) { - report_mouse_t temp_report = pointing_device_get_report(); - temp_report.x = serial_s2m_buffer.mouse_x; - temp_report.y = serial_s2m_buffer.mouse_y; - pointing_device_set_report(temp_report); - serial_m2s_buffer.device_cpi = device_cpi; - } -# endif - - serial_m2s_buffer.t_layer_state = layer_state; - serial_m2s_buffer.t_default_layer_state = default_layer_state; -# ifdef OLED_DRIVER_ENABLE - serial_m2s_buffer.oled_on = is_oled_on(); -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - serial_m2s_buffer.led_matrix = led_matrix_eeconfig; - serial_m2s_buffer.led_suspend_state = led_matrix_get_suspend_state(); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - serial_m2s_buffer.rgb_matrix = rgb_matrix_config; - serial_m2s_buffer.rgb_suspend_state = rgb_matrix_get_suspend_state(); -# endif - -# ifndef DISABLE_SYNC_TIMER - serial_m2s_buffer.sync_timer = sync_timer_read32() + SYNC_TIMER_OFFSET; -# endif - return true; -} - -void transport_slave(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) { - transport_rgblight_slave(); -# ifndef DISABLE_SYNC_TIMER - sync_timer_update(serial_m2s_buffer.sync_timer); -# endif - - // TODO: if MATRIX_COLS > 8 change to pack() - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_s2m_buffer.smatrix[i] = slave_matrix[i]; -# ifdef SPLIT_TRANSPORT_MIRROR - master_matrix[i] = serial_m2s_buffer.mmatrix[i]; -# endif - } - -# ifdef BACKLIGHT_ENABLE - backlight_set(serial_m2s_buffer.backlight_level); -# endif - -# ifdef ENCODER_ENABLE - encoder_state_raw((uint8_t *)serial_s2m_buffer.encoder_state); -# endif - -# ifdef WPM_ENABLE - set_current_wpm(serial_m2s_buffer.current_wpm); -# endif - -# ifdef SPLIT_MODS_ENABLE - set_mods(serial_m2s_buffer.real_mods); - set_weak_mods(serial_m2s_buffer.weak_mods); -# ifndef NO_ACTION_ONESHOT - set_oneshot_mods(serial_m2s_buffer.oneshot_mods); -# endif -# endif - -# ifdef POINTING_DEVICE_ENABLE - if (!is_keyboard_left()) { - static uint16_t cpi; - if (cpi != serial_m2s_buffer.device_cpi) { - cpi = serial_m2s_buffer.device_cpi; - pmw_set_cpi(cpi); - } - serial_s2m_buffer.mouse_x = split_mouse_x; - serial_s2m_buffer.mouse_y = split_mouse_y; - } -# endif - - if (layer_state != serial_m2s_buffer.t_layer_state) { - layer_state = serial_m2s_buffer.t_layer_state; - } - if (default_layer_state != serial_m2s_buffer.t_default_layer_state) { - default_layer_state = serial_m2s_buffer.t_default_layer_state; - } -# ifdef OLED_DRIVER_ENABLE - if (serial_m2s_buffer.oled_on) { - oled_on(); - } else { - oled_off(); - } -# endif - -# if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - led_matrix_eeconfig = serial_m2s_buffer.led_matrix; - led_matrix_set_suspend_state(serial_m2s_buffer.led_suspend_state); -# endif -# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - rgb_matrix_config = serial_m2s_buffer.rgb_matrix; - rgb_matrix_set_suspend_state(serial_m2s_buffer.rgb_suspend_state); -# endif -} - -#endif diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c index 98e467d93..debcdcfbe 100644 --- a/users/drashna/oled_stuff.c +++ b/users/drashna/oled_stuff.c @@ -18,14 +18,14 @@ #ifndef KEYLOGGER_LENGTH // # ifdef OLED_DISPLAY_128X64 -# define KEYLOGGER_LENGTH ((int)(OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH)) +# define KEYLOGGER_LENGTH ((uint8_t)(OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH)) // # else // # define KEYLOGGER_LENGTH (uint8_t *(OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT)) // # endif #endif uint32_t oled_timer = 0; -static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; +static char keylog_str[KEYLOGGER_LENGTH + 1] = {0}; static uint16_t log_timer = 0; // clang-format off @@ -57,12 +57,12 @@ void add_keylog(uint16_t keycode) { keycode = 0; } - for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { - keylog_str[i] = keylog_str[i - 1]; + for (uint8_t i = 1; i < KEYLOGGER_LENGTH; i++) { + keylog_str[i - 1] = keylog_str[i]; } if (keycode < (sizeof(code_to_name) / sizeof(char))) { - keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); + keylog_str[(KEYLOGGER_LENGTH - 1)] = pgm_read_byte(&code_to_name[keycode]); } log_timer = timer_read(); @@ -70,7 +70,7 @@ void add_keylog(uint16_t keycode) { bool process_record_user_oled(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_timer = timer_read32(); add_keylog(keycode); #endif @@ -95,27 +95,15 @@ void render_default_layer_state(void) { case _QWERTY: oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false); break; + case _COLEMAK_DH: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK_DH), false); + break; case _COLEMAK: oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK), false); break; case _DVORAK: oled_write_P(PSTR(OLED_RENDER_LAYOUT_DVORAK), false); break; - case _WORKMAN: - oled_write_P(PSTR(OLED_RENDER_LAYOUT_WORKMAN), false); - break; - case _NORMAN: - oled_write_P(PSTR(OLED_RENDER_LAYOUT_NORMAN), false); - break; - case _MALTRON: - oled_write_P(PSTR(OLED_RENDER_LAYOUT_MALTRON), false); - break; - case _EUCALYN: - oled_write_P(PSTR(OLED_RENDER_LAYOUT_EUCALYN), false); - break; - case _CARPLAX: - oled_write_P(PSTR(OLED_RENDER_LAYOUT_CARPLAX), false); - break; } #ifdef OLED_DISPLAY_128X64 oled_advance_page(true); @@ -153,18 +141,16 @@ void render_keylock_status(uint8_t led_usb_state) { oled_write_P(PSTR(OLED_RENDER_LOCK_CAPS), led_usb_state & (1 << USB_LED_CAPS_LOCK)); oled_write_P(PSTR(" "), false); oled_write_P(PSTR(OLED_RENDER_LOCK_SCLK), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); -#ifndef OLED_DISPLAY_128X64 - oled_advance_page(true); -#endif } + void render_matrix_scan_rate(void) { #ifdef DEBUG_MATRIX_SCAN_RATE - char matrix_rate[5]; - uint16_t n = get_matrix_scan_rate(); + char matrix_rate[5]; + uint16_t n = get_matrix_scan_rate(); matrix_rate[4] = '\0'; matrix_rate[3] = '0' + n % 10; - matrix_rate[2] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; - matrix_rate[1] = n / 10 ? '0' + n / 10 : ' '; + matrix_rate[2] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; + matrix_rate[1] = n / 10 ? '0' + n / 10 : ' '; matrix_rate[0] = ' '; oled_write_P(PSTR("MS:"), false); oled_write(matrix_rate, false); @@ -174,17 +160,21 @@ void render_matrix_scan_rate(void) { void render_mod_status(uint8_t modifiers) { static const char PROGMEM mod_status[5][3] = {{0xE8, 0xE9, 0}, {0xE4, 0xE5, 0}, {0xE6, 0xE7, 0}, {0xEA, 0xEB, 0}, {0xEC, 0xED, 0}}; oled_write_P(PSTR(OLED_RENDER_MODS_NAME), false); +#if defined(OLED_DISPLAY_128X64) + oled_write_P(mod_status[0], (modifiers & MOD_BIT(KC_LSHIFT))); + oled_write_P(mod_status[!keymap_config.swap_lctl_lgui ? 3 : 4], (modifiers & MOD_BIT(KC_LGUI))); + oled_write_P(mod_status[2], (modifiers & MOD_BIT(KC_LALT))); + oled_write_P(mod_status[1], (modifiers & MOD_BIT(KC_LCTL))); + oled_write_P(mod_status[1], (modifiers & MOD_BIT(KC_RCTL))); + oled_write_P(mod_status[2], (modifiers & MOD_BIT(KC_RALT))); + oled_write_P(mod_status[!keymap_config.swap_lctl_lgui ? 3 : 4], (modifiers & MOD_BIT(KC_RGUI))); + oled_write_P(mod_status[0], (modifiers & MOD_BIT(KC_RSHIFT))); +#else oled_write_P(mod_status[0], (modifiers & MOD_MASK_SHIFT)); oled_write_P(mod_status[!keymap_config.swap_lctl_lgui ? 3 : 4], (modifiers & MOD_MASK_GUI)); -#if !defined(OLED_DISPLAY_128X64) oled_write_P(PSTR(" "), false); -#endif oled_write_P(mod_status[2], (modifiers & MOD_MASK_ALT)); oled_write_P(mod_status[1], (modifiers & MOD_MASK_CTRL)); - - render_matrix_scan_rate(); -#if defined(OLED_DISPLAY_128X64) - oled_advance_page(true); #endif } @@ -284,12 +274,16 @@ void render_user_status(void) { oled_write_P(rgb_layer_status[userspace_config.rgb_layer_change], false); static const char PROGMEM nukem_good[2][3] = {{0xF8, 0xF9, 0}, {0xF6, 0xF7, 0}}; oled_write_P(nukem_good[0], userspace_config.nuke_switch); +#if defined(UNICODE_ENABLE) + static const char PROGMEM uc_mod_status[5][3] = {{0xEA, 0xEB, 0}, {0xEC, 0xED, 0}}; + oled_write_P(uc_mod_status[get_unicode_input_mode() == UC_MAC], false); +#endif #if defined(OLED_DISPLAY_128X64) oled_advance_page(true); #endif } -__attribute__((weak)) void oled_driver_render_logo(void) { +void oled_driver_render_logo(void) { // clang-format off 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, @@ -299,80 +293,101 @@ __attribute__((weak)) void oled_driver_render_logo(void) { oled_write_P(qmk_logo, false); } -void render_wpm(void) { +void render_wpm(uint8_t padding) { #ifdef WPM_ENABLE uint8_t n = get_current_wpm(); -# ifdef OLED_DISPLAY_128X64 - char wpm_counter[4]; + char wpm_counter[4]; wpm_counter[3] = '\0'; wpm_counter[2] = '0' + n % 10; - wpm_counter[1] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; + wpm_counter[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; wpm_counter[0] = n / 10 ? '0' + n / 10 : ' '; -# else - char wpm_counter[6]; - wpm_counter[5] = '\0'; - wpm_counter[4] = '0' + n % 10; - wpm_counter[3] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; - wpm_counter[2] = n / 10 ? '0' + n / 10 : ' '; - wpm_counter[1] = ' '; - wpm_counter[0] = ' '; - # endif oled_write_P(PSTR(OLED_RENDER_WPM_COUNTER), false); + if (padding) { + for (uint8_t n = padding; n > 0; n--) { + oled_write_P(PSTR(" "), false); + } + } oled_write(wpm_counter, false); #endif } -#ifdef KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball -extern keyboard_config_t keyboard_config; -extern uint16_t dpi_array[]; - -void render_pointing_dpi_status(void) { - char dpi_status[6]; - uint16_t n = dpi_array[keyboard_config.dpi_config]; - dpi_status[5] = '\0'; - dpi_status[4] = '0' + n % 10; - dpi_status[3] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; - dpi_status[2] = ( n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; - dpi_status[1] = n / 10 ? '0' + n / 10 : ' '; - dpi_status[0] = ' '; - oled_write_P(PSTR(" DPI: "), false); +#if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right) +extern kb_config_data_t kb_config; +void render_pointing_dpi_status(uint8_t padding) { + char dpi_status[5]; + uint16_t n = kb_config.device_cpi; + dpi_status[4] = '\0'; + dpi_status[3] = '0' + n % 10; + dpi_status[2] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; + dpi_status[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; + dpi_status[0] = n / 10 ? '0' + n / 10 : ' '; + oled_write_P(PSTR("DPI: "), false); + if (padding) { + for (uint8_t n = padding; n > 0; n--) { + oled_write_P(PSTR(" "), false); + } + } oled_write(dpi_status, false); } #endif -void render_status_secondary(void) { +__attribute__((weak)) void oled_driver_render_logo_right(void) { #if defined(OLED_DISPLAY_128X64) oled_driver_render_logo(); -#endif - /* Show Keyboard Layout */ render_default_layer_state(); - render_layer_state(); - render_mod_status(get_mods() | get_oneshot_mods()); - // render_keylogger_status(); - render_keylock_status(host_keyboard_leds()); + oled_set_cursor(0, 4); +#else + render_default_layer_state(); +#endif } -void render_status_main(void) { +__attribute__((weak)) void oled_driver_render_logo_left(void) { #if defined(OLED_DISPLAY_128X64) oled_driver_render_logo(); # ifdef DEBUG_MATRIX_SCAN_RATE render_matrix_scan_rate(); -# else - render_wpm(); +# elif defined(WPM_ENABLE) + render_wpm(0); # endif -# ifdef KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball - render_pointing_dpi_status(); + oled_write_P(PSTR(" "), false); +# if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right) + render_pointing_dpi_status(1); # endif - oled_write_P(PSTR("\n"), false); + oled_set_cursor(0, 4); #else render_default_layer_state(); #endif +} + +void render_status_secondary(void) { + oled_driver_render_logo_right(); + /* Show Keyboard Layout */ + render_layer_state(); + render_mod_status(get_mods() | get_oneshot_mods()); +#if !defined(OLED_DISPLAY_128X64) && defined(WPM_ENABLE) + render_wpm(2); +#endif + // render_keylock_status(host_keyboard_leds()); +} + +void render_status_main(void) { + oled_driver_render_logo_left(); + /* Show Keyboard Layout */ // render_keylock_status(host_keyboard_leds()); render_bootmagic_status(); render_user_status(); - render_keylogger_status(); + // render_keylogger_status(); +} + +__attribute__((weak)) oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return rotation; } + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + for (uint8_t i = 0; i < (KEYLOGGER_LENGTH - 1); i++) { + add_keylog(0); + } + return oled_init_keymap(rotation); } void oled_task_user(void) { @@ -385,8 +400,15 @@ void oled_task_user(void) { } else { oled_on(); } + } + if (is_keyboard_left()) { render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_status_secondary(); } + if (is_keyboard_master()) { + render_keylogger_status(); + } else { + render_keylock_status(host_keyboard_leds()); + } } diff --git a/users/drashna/oled_stuff.h b/users/drashna/oled_stuff.h index 1f4440bd4..8795684d6 100644 --- a/users/drashna/oled_stuff.h +++ b/users/drashna/oled_stuff.h @@ -19,97 +19,113 @@ #include "quantum.h" #include "oled_driver.h" -void oled_driver_render_logo(void); -bool process_record_user_oled(uint16_t keycode, keyrecord_t *record); +void oled_driver_render_logo(void); +bool process_record_user_oled(uint16_t keycode, keyrecord_t *record); +oled_rotation_t oled_init_keymap(oled_rotation_t rotation); extern uint32_t oled_timer; +void render_keylogger_status(void); +void render_default_layer_state(void); +void render_layer_state(void); +void render_keylock_status(uint8_t led_usb_state); +void render_matrix_scan_rate(void); +void render_mod_status(uint8_t modifiers); +void render_bootmagic_status(void); +void render_user_status(void); +void oled_driver_render_logo(void); +void render_wpm(uint8_t padding); +void render_pointing_dpi_status(uint8_t padding); +void oled_driver_render_logo_left(void); +void oled_driver_render_logo_right(void); #ifdef OLED_DISPLAY_128X64 -# define OLED_RENDER_KEYLOGGER "Keylogger: " +# define OLED_RENDER_KEYLOGGER "Keylogger: " -# define OLED_RENDER_LAYOUT_NAME "Layout: " -# define OLED_RENDER_LAYOUT_QWERTY "Qwerty" -# define OLED_RENDER_LAYOUT_COLEMAK "Colemak" -# define OLED_RENDER_LAYOUT_DVORAK "Dvorak" -# define OLED_RENDER_LAYOUT_WORKMAN "Workman" -# define OLED_RENDER_LAYOUT_NORMAN "Norman" -# define OLED_RENDER_LAYOUT_MALTRON "Matron" -# define OLED_RENDER_LAYOUT_EUCALYN "Eucalyn" -# define OLED_RENDER_LAYOUT_CARPLAX "Carplax" +# define OLED_RENDER_LAYOUT_NAME "Layout: " +# define OLED_RENDER_LAYOUT_QWERTY "Qwerty" +# define OLED_RENDER_LAYOUT_COLEMAK_DH "Colemak-DH" +# define OLED_RENDER_LAYOUT_COLEMAK "Colemak" +# define OLED_RENDER_LAYOUT_DVORAK "Dvorak" +# define OLED_RENDER_LAYOUT_WORKMAN "Workman" +# define OLED_RENDER_LAYOUT_NORMAN "Norman" +# define OLED_RENDER_LAYOUT_MALTRON "Matron" +# define OLED_RENDER_LAYOUT_EUCALYN "Eucalyn" +# define OLED_RENDER_LAYOUT_CARPLAX "Carplax" -# define OLED_RENDER_LAYER_NAME "Layer:" -# define OLED_RENDER_LAYER_LOWER "Lower" -# define OLED_RENDER_LAYER_RAISE "Raise" -# define OLED_RENDER_LAYER_ADJUST "Adjust" -# define OLED_RENDER_LAYER_MODS "Mods" +# define OLED_RENDER_LAYER_NAME "Layer:" +# define OLED_RENDER_LAYER_LOWER "Lower" +# define OLED_RENDER_LAYER_RAISE "Raise" +# define OLED_RENDER_LAYER_ADJUST "Adjust" +# define OLED_RENDER_LAYER_MODS "Mods" -# define OLED_RENDER_LOCK_NAME "Lock: " -# define OLED_RENDER_LOCK_NUML "NUML" -# define OLED_RENDER_LOCK_CAPS "CAPS" -# define OLED_RENDER_LOCK_SCLK "SCLK" +# define OLED_RENDER_LOCK_NAME "Lock: " +# define OLED_RENDER_LOCK_NUML "NUML" +# define OLED_RENDER_LOCK_CAPS "CAPS" +# define OLED_RENDER_LOCK_SCLK "SCLK" -# define OLED_RENDER_MODS_NAME "Mods:" -# define OLED_RENDER_MODS_SFT "Sft" -# define OLED_RENDER_MODS_CTL "Ctl" -# define OLED_RENDER_MODS_ALT "Alt" -# define OLED_RENDER_MODS_GUI "GUI" +# define OLED_RENDER_MODS_NAME "Mods:" +# define OLED_RENDER_MODS_SFT "Sft" +# define OLED_RENDER_MODS_CTL "Ctl" +# define OLED_RENDER_MODS_ALT "Alt" +# define OLED_RENDER_MODS_GUI "GUI" -# define OLED_RENDER_BOOTMAGIC_NAME "Boot " -# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" -# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" -# define OLED_RENDER_BOOTMAGIC_GRV "GRV" +# define OLED_RENDER_BOOTMAGIC_NAME "Boot " +# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" +# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" +# define OLED_RENDER_BOOTMAGIC_GRV "GRV" # define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT" -# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP" -# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" +# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP" +# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" -# define OLED_RENDER_USER_NAME "USER:" -# define OLED_RENDER_USER_ANIM "Anim" -# define OLED_RENDER_USER_LAYR "Layr" -# define OLED_RENDER_USER_NUKE "Nuke" +# define OLED_RENDER_USER_NAME "USER:" +# define OLED_RENDER_USER_ANIM "Anim" +# define OLED_RENDER_USER_LAYR "Layr" +# define OLED_RENDER_USER_NUKE "Nuke" -# define OLED_RENDER_WPM_COUNTER "WPM: " +# define OLED_RENDER_WPM_COUNTER "WPM: " #else -# define OLED_RENDER_KEYLOGGER "KLogr" +# define OLED_RENDER_KEYLOGGER "KLogr" -# define OLED_RENDER_LAYOUT_NAME "Lyout" -# define OLED_RENDER_LAYOUT_QWERTY " QRTY" -# define OLED_RENDER_LAYOUT_COLEMAK " COLE" -# define OLED_RENDER_LAYOUT_DVORAK " DVRK" -# define OLED_RENDER_LAYOUT_WORKMAN " WKMN" -# define OLED_RENDER_LAYOUT_NORMAN " NORM" -# define OLED_RENDER_LAYOUT_MALTRON " MLTN" -# define OLED_RENDER_LAYOUT_EUCALYN " ECLN" -# define OLED_RENDER_LAYOUT_CARPLAX " CRPX" +# define OLED_RENDER_LAYOUT_NAME "Lyout" +# define OLED_RENDER_LAYOUT_QWERTY " QRTY" +# define OLED_RENDER_LAYOUT_COLEMAK_DH " cmDH" +# define OLED_RENDER_LAYOUT_COLEMAK " COLE" +# define OLED_RENDER_LAYOUT_DVORAK " DVRK" +# define OLED_RENDER_LAYOUT_WORKMAN " WKMN" +# define OLED_RENDER_LAYOUT_NORMAN " NORM" +# define OLED_RENDER_LAYOUT_MALTRON " MLTN" +# define OLED_RENDER_LAYOUT_EUCALYN " ECLN" +# define OLED_RENDER_LAYOUT_CARPLAX " CRPX" -# define OLED_RENDER_LAYER_NAME "LAYER" -# define OLED_RENDER_LAYER_LOWER "Lower" -# define OLED_RENDER_LAYER_RAISE "Raise" -# define OLED_RENDER_LAYER_ADJUST "Adjst" -# define OLED_RENDER_LAYER_MODS " Mods" +# define OLED_RENDER_LAYER_NAME "LAYER" +# define OLED_RENDER_LAYER_LOWER "Lower" +# define OLED_RENDER_LAYER_RAISE "Raise" +# define OLED_RENDER_LAYER_ADJUST "Adjst" +# define OLED_RENDER_LAYER_MODS " Mods" -# define OLED_RENDER_LOCK_NAME "Lock:" -# define OLED_RENDER_LOCK_NUML "NumL" -# define OLED_RENDER_LOCK_CAPS "CapL" -# define OLED_RENDER_LOCK_SCLK "ScrL" +# define OLED_RENDER_LOCK_NAME "Lock:" +# define OLED_RENDER_LOCK_NUML "NumL" +# define OLED_RENDER_LOCK_CAPS "CapL" +# define OLED_RENDER_LOCK_SCLK "ScrL" -# define OLED_RENDER_MODS_NAME "Mods: " -# define OLED_RENDER_MODS_SFT "Shft" -# define OLED_RENDER_MODS_CTL "Ctrl" -# define OLED_RENDER_MODS_ALT "Alt\n" -# define OLED_RENDER_MODS_GUI "GUI\n" +# define OLED_RENDER_MODS_NAME "Mods: " +# define OLED_RENDER_MODS_SFT "Shft" +# define OLED_RENDER_MODS_CTL "Ctrl" +# define OLED_RENDER_MODS_ALT "Alt\n" +# define OLED_RENDER_MODS_GUI "GUI\n" -# define OLED_RENDER_BOOTMAGIC_NAME "BTMGK" -# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" -# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" -# define OLED_RENDER_BOOTMAGIC_GRV "GRV" +# define OLED_RENDER_BOOTMAGIC_NAME "BTMGK" +# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO" +# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI" +# define OLED_RENDER_BOOTMAGIC_GRV "GRV" # define OLED_RENDER_BOOTMAGIC_ONESHOT "1SHT" -# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP" -# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" +# define OLED_RENDER_BOOTMAGIC_SWAP "SWAP" +# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS" -# define OLED_RENDER_USER_NAME "USER:" -# define OLED_RENDER_USER_ANIM "Anim" -# define OLED_RENDER_USER_LAYR "Layr" -# define OLED_RENDER_USER_NUKE "Nuke" +# define OLED_RENDER_USER_NAME "USER:" +# define OLED_RENDER_USER_ANIM "Anim" +# define OLED_RENDER_USER_LAYR "Layr" +# define OLED_RENDER_USER_NUKE "Nuke" -# define OLED_RENDER_WPM_COUNTER "WPM: " +# define OLED_RENDER_WPM_COUNTER "WPM: " #endif diff --git a/users/drashna/pimoroni_trackball.c b/users/drashna/pimoroni_trackball.c deleted file mode 100644 index a6ca6c996..000000000 --- a/users/drashna/pimoroni_trackball.c +++ /dev/null @@ -1,151 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "pimoroni_trackball.h" -#include "i2c_master.h" - -static uint8_t scrolling = 0; -static int16_t x_offset = 0; -static int16_t y_offset = 0; -static int16_t h_offset = 0; -static int16_t v_offset = 0; -static float precisionSpeed = 1; - -#ifndef I2C_TIMEOUT -# define I2C_TIMEOUT 100 -#endif -#ifndef MOUSE_DEBOUNCE -# define MOUSE_DEBOUNCE 5 -#endif - -void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white) { - uint8_t data[] = {0x00, red, green, blue, white}; - i2c_transmit(TRACKBALL_ADDRESS << 1, data, sizeof(data), I2C_TIMEOUT); -} - -int16_t mouse_offset(uint8_t positive, uint8_t negative, int16_t scale) { - int16_t offset = (int16_t)positive - (int16_t)negative; - int16_t magnitude = (int16_t)(scale * offset * offset * precisionSpeed); - return offset < 0 ? -magnitude : magnitude; -} - -void update_member(int8_t* member, int16_t* offset) { - if (*offset > 127) { - *member = 127; - *offset -= 127; - } else if (*offset < -127) { - *member = -127; - *offset += 127; - } else { - *member = *offset; - *offset = 0; - } -} - -__attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* mouse) { - if (pressed) { - mouse->buttons |= MOUSE_BTN1; - } else { - mouse->buttons &= ~MOUSE_BTN1; - } -} - -void trackball_register_button(bool pressed, enum mouse_buttons button) { - report_mouse_t currentReport = pointing_device_get_report(); - if (pressed) { - currentReport.buttons |= button; - } else { - currentReport.buttons &= ~button; - } - pointing_device_set_report(currentReport); -} - -float trackball_get_precision(void) { return precisionSpeed; } -void trackball_set_precision(float precision) { precisionSpeed = precision; } -bool trackball_is_scrolling(void) { return scrolling; } -void trackball_set_scrolling(bool scroll) { scrolling = scroll; } - -bool has_report_changed (report_mouse_t first, report_mouse_t second) { - return !( - (!first.buttons && first.buttons == second.buttons) && - (!first.x && first.x == second.x) && - (!first.y && first.y == second.y) && - (!first.h && first.h == second.h) && - (!first.v && first.v == second.v) ); -} - - -__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00, 0x00, 0x00, 0x4F); } - -void pointing_device_task(void) { - static bool debounce; - static uint16_t debounce_timer; - uint8_t state[5] = {}; - if (i2c_readReg(TRACKBALL_ADDRESS << 1, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) { - if (!state[4] && !debounce) { - if (scrolling) { -#ifdef PIMORONI_TRACKBALL_INVERT_X - h_offset += mouse_offset(state[2], state[3], 1); -#else - h_offset -= mouse_offset(state[2], state[3], 1); -#endif -#ifdef PIMORONI_TRACKBALL_INVERT_Y - v_offset += mouse_offset(state[1], state[0], 1); -#else - v_offset -= mouse_offset(state[1], state[0], 1); -#endif - } else { -#ifdef PIMORONI_TRACKBALL_INVERT_X - x_offset -= mouse_offset(state[2], state[3], 5); -#else - x_offset += mouse_offset(state[2], state[3], 5); -#endif -#ifdef PIMORONI_TRACKBALL_INVERT_Y - y_offset -= mouse_offset(state[1], state[0], 5); -#else - y_offset += mouse_offset(state[1], state[0], 5); -#endif - } - } else { - if (state[4]) { - debounce = true; - debounce_timer = timer_read(); - } - } - } - - if (timer_elapsed(debounce_timer) > MOUSE_DEBOUNCE) debounce = false; - - report_mouse_t mouse = pointing_device_get_report(); - - trackball_check_click(state[4] & (1 << 7), &mouse); - -#ifndef PIMORONI_TRACKBALL_ROTATE - update_member(&mouse.x, &x_offset); - update_member(&mouse.y, &y_offset); - update_member(&mouse.h, &h_offset); - update_member(&mouse.v, &v_offset); -#else - update_member(&mouse.x, &y_offset); - update_member(&mouse.y, &x_offset); - update_member(&mouse.h, &v_offset); - update_member(&mouse.v, &h_offset); -#endif - pointing_device_set_report(mouse); - if (has_report_changed(mouse, pointing_device_get_report())) { - pointing_device_send(); - } -} diff --git a/users/drashna/pimoroni_trackball.h b/users/drashna/pimoroni_trackball.h deleted file mode 100644 index a30fb0bb8..000000000 --- a/users/drashna/pimoroni_trackball.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . - */ - -#pragma once - -#include "quantum.h" -#include "pointing_device.h" - -#ifndef TRACKBALL_ADDRESS -# define TRACKBALL_ADDRESS 0x0A -#endif -#define TRACKBALL_WRITE ((TRACKBALL_ADDRESS << 1) | I2C_WRITE) -#define TRACKBALL_READ ((TRACKBALL_ADDRESS << 1) | I2C_READ) - -void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); -void trackball_check_click(bool pressed, report_mouse_t *mouse); -void trackball_register_button(bool pressed, enum mouse_buttons button); - -float trackball_get_precision(void); -void trackball_set_precision(float precision); -bool trackball_is_scrolling(void); -void trackball_set_scrolling(bool scroll); diff --git a/users/drashna/post_config.h b/users/drashna/post_config.h new file mode 100644 index 000000000..7c214b66d --- /dev/null +++ b/users/drashna/post_config.h @@ -0,0 +1,40 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . + */ + +#pragma once + +// because layouts seem to not be respecting config.h order atm +#ifdef RGBLIGHT_ENABLE +# undef RGBLIGHT_ANIMATIONS +# if defined(__AVR__) && (!defined(__AVR_AT90USB1286__) && !defined(RGBLIGHT_ALL_ANIMATIONS)) +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_KNIGHT +# else +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_KNIGHT +# if defined(RGBLIGHT_ALL_ANIMATIONS) +# define RGBLIGHT_EFFECT_CHRISTMAS +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +# define RGBLIGHT_EFFECT_RGB_TEST +# define RGBLIGHT_EFFECT_ALTERNATING +# endif +# define RGBLIGHT_EFFECT_TWINKLE +# endif +#endif diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index ef901226e..900b6da15 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -19,18 +19,17 @@ uint16_t copy_paste_timer; -__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } - -__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } - // Defines actions tor my global custom keycodes. Defined in drashna.h file // Then runs the _keymap's record handier if not processed here -bool process_record_user(uint16_t keycode, keyrecord_t *record) { + +__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } +__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } +bool process_record_user(uint16_t keycode, keyrecord_t *record) { // If console is enabled, it will print the matrix position and status of each key pressed #ifdef KEYLOGGER_ENABLE uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count); #endif // KEYLOGGER_ENABLE -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE process_record_user_oled(keycode, record); #endif // OLED @@ -46,15 +45,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } switch (keycode) { - case KC_QWERTY ... KC_WORKMAN: + case FIRST_DEFAULT_LAYER_KEYCODE ... LAST_DEFAULT_LAYER_KEYCODE: if (record->event.pressed) { uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); if (!mods) { - set_single_persistent_default_layer(keycode - KC_QWERTY); + set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE); +#if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3) } else if (mods & MOD_MASK_SHIFT) { - set_single_persistent_default_layer(keycode - KC_QWERTY + 4); + set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE + 4); +# if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7) + } else if (mods & MOD_MASK_CTRL) { - set_single_persistent_default_layer(keycode - KC_QWERTY + 8); + set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE + 8); +# endif +#endif } } break; @@ -79,15 +83,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif } send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY); -#ifdef RGB_MATRIX_SPLIT_RIGHT - send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); -# ifndef OLED_DRIVER_ENABLE - send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); -# endif +#ifdef CONVERT_TO_PROTON_C + send_string_with_delay_P(PSTR(" -e CTPC=yes"), TAP_CODE_DELAY); #endif send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); } - break; case VRSN: // Prints firmware version @@ -202,3 +202,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } + +__attribute__((weak)) void post_process_record_keymap(uint16_t keycode, keyrecord_t *record) {} +void post_process_record_user(uint16_t keycode, keyrecord_t *record) { post_process_record_keymap(keycode, record); } diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h index f60e6d7eb..231480ac5 100644 --- a/users/drashna/process_records.h +++ b/users/drashna/process_records.h @@ -17,58 +17,78 @@ #pragma once #include "drashna.h" -#if defined(KEYBOARD_handwired_dactyl_manuform_5x6_right_trackball) +#if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right) # define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE #else # define PLACEHOLDER_SAFE_RANGE SAFE_RANGE #endif enum userspace_custom_keycodes { - VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info - KC_QWERTY, // Sets default layer to QWERTY - KC_COLEMAK, // Sets default layer to COLEMAK - KC_DVORAK, // Sets default layer to DVORAK - KC_WORKMAN, // Sets default layer to WORKMAN - KC_DIABLO_CLEAR, // Clears all Diablo Timers - KC_MAKE, // Run keyboard's customized make command - KC_RGB_T, // Toggles RGB Layer Indication mode - RGB_IDL, // RGB Idling animations - KC_SECRET_1, // test1 - KC_SECRET_2, // test2 - KC_SECRET_3, // test3 - KC_SECRET_4, // test4 - KC_SECRET_5, // test5 - KC_CCCV, // Hold to copy, tap to paste - KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! - UC_FLIP, // (ಠ痊ಠ)┻━┻ - UC_TABL, // ┬─┬ノ( º _ ºノ) - UC_SHRG, // ¯\_(ツ)_/¯ - UC_DISA, // ಠ_ಠ - NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes + VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info + KC_QWERTY, // Sets default layer to QWERTY + FIRST_DEFAULT_LAYER_KEYCODE = KC_QWERTY, // Sets default layer to QWERTY + KC_COLEMAK_DH, // Sets default layer to COLEMAK + KC_COLEMAK, // Sets default layer to COLEMAK + KC_DVORAK, // Sets default layer to DVORAK + LAST_DEFAULT_LAYER_KEYCODE = KC_DVORAK, // Sets default layer to WORKMAN + KC_DIABLO_CLEAR, // Clears all Diablo Timers + KC_MAKE, // Run keyboard's customized make command + KC_RGB_T, // Toggles RGB Layer Indication mode + RGB_IDL, // RGB Idling animations + KC_SECRET_1, // test1 + KC_SECRET_2, // test2 + KC_SECRET_3, // test3 + KC_SECRET_4, // test4 + KC_SECRET_5, // test5 + KC_CCCV, // Hold to copy, tap to paste + KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! + UC_FLIP, // (ಠ痊ಠ)┻━┻ + UC_TABL, // ┬─┬ノ( º _ ºノ) + UC_SHRG, // ¯\_(ツ)_/¯ + UC_DISA, // ಠ_ಠ + NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes }; bool process_record_secrets(uint16_t keycode, keyrecord_t *record); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); +void post_process_record_keymap(uint16_t keycode, keyrecord_t *record); -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) -#define ADJUST MO(_ADJUST) -#define TG_MODS OS_TOGG -#define TG_GAME TG(_GAMEPAD) -#define TG_DBLO TG(_DIABLO) -#define OS_LWR OSL(_LOWER) -#define OS_RSE OSL(_RAISE) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) +#define TG_MODS OS_TOGG +#define TG_GAME TG(_GAMEPAD) +#define TG_DBLO TG(_DIABLO) +#define OS_LWR OSL(_LOWER) +#define OS_RSE OSL(_RAISE) -#define KC_SEC1 KC_SECRET_1 -#define KC_SEC2 KC_SECRET_2 -#define KC_SEC3 KC_SECRET_3 -#define KC_SEC4 KC_SECRET_4 -#define KC_SEC5 KC_SECRET_5 +#define KC_SEC1 KC_SECRET_1 +#define KC_SEC2 KC_SECRET_2 +#define KC_SEC3 KC_SECRET_3 +#define KC_SEC4 KC_SECRET_4 +#define KC_SEC5 KC_SECRET_5 -#define QWERTY KC_QWERTY -#define DVORAK KC_DVORAK -#define COLEMAK KC_COLEMAK -#define WORKMAN KC_WORKMAN +#define QWERTY KC_QWERTY +#define DVORAK KC_DVORAK +#define COLEMAK KC_COLEMAK +#define COLEMAKDH KC_COLEMAK_DH + +#define DEFLYR1 FIRST_DEFAULT_LAYER_KEYCODE +#define DEFLYR2 (FIRST_DEFAULT_LAYER_KEYCODE + 1) +#define DEFLYR3 (FIRST_DEFAULT_LAYER_KEYCODE + 2) +#define DEFLYR4 (FIRST_DEFAULT_LAYER_KEYCODE + 3) +#if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3) +# define DEFLYR5 (FIRST_DEFAULT_LAYER_KEYCODE + 4) +# define DEFLYR6 (FIRST_DEFAULT_LAYER_KEYCODE + 5) +# define DEFLYR7 (FIRST_DEFAULT_LAYER_KEYCODE + 6) +# define DEFLYR8 (FIRST_DEFAULT_LAYER_KEYCODE + 7) +# if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7) +# define DEFLYR9 (FIRST_DEFAULT_LAYER_KEYCODE + 8) +# define DEFLYR10 (FIRST_DEFAULT_LAYER_KEYCODE + 9) +# define DEFLYR11 (FIRST_DEFAULT_LAYER_KEYCODE + 10) +# define DEFLYR12 (FIRST_DEFAULT_LAYER_KEYCODE + 11) +# endif +#endif #define KC_RESET RESET #define KC_RST KC_RESET diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c index 9e9e1e427..97811092c 100644 --- a/users/drashna/rgb_matrix_stuff.c +++ b/users/drashna/rgb_matrix_stuff.c @@ -20,11 +20,6 @@ extern led_config_t g_led_config; static uint32_t hypno_timer; -#if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) -# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL -#else -# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN -#endif void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type, uint8_t led_min, uint8_t led_max) { HSV hsv = {hue, sat, val}; @@ -34,27 +29,27 @@ void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode switch (mode) { case 1: // breathing - { - uint16_t time = scale16by8(g_rgb_timer, speed / 8); - hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); - RGB rgb = hsv_to_rgb(hsv); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], led_type)) { - RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); + { + uint16_t time = scale16by8(g_rgb_timer, speed / 8); + hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); + } } + break; } - break; - } default: // Solid Color - { - RGB rgb = hsv_to_rgb(hsv); - for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], led_type)) { - RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); + { + RGB rgb = hsv_to_rgb(hsv); + for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); + } } + break; } - break; - } } } diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 6723ad4bf..15108bde0 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -23,106 +23,19 @@ bool has_initialized; void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val(), index); } - -# ifdef RGBLIGHT_TWINKLE -static rgblight_fadeout lights[RGBLED_NUM]; - -/* Handler for fading/twinkling effect */ -void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive - bool litup = false; - - for (uint8_t light_index = 0; light_index < RGBLED_NUM; ++light_index) { - if (lights[light_index].enabled && sync_timer_elapsed(lights[light_index].timer) > 10) { - rgblight_fadeout *light = &lights[light_index]; - litup = true; - - if (light->life) { - light->life -= 1; - if (get_highest_layer(layer_state) == 0) { - sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); - } - light->timer = sync_timer_read(); - } else { - if (light->enabled && get_highest_layer(layer_state) == 0) { - rgblight_sethsv_default_helper(light_index); - } - litup = light->enabled = false; - } - } - } - if (litup && get_highest_layer(layer_state) == 0) { - rgblight_set(); - } +void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { + rgblight_sethsv_noeeprom(hue, sat, val); + // wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly + rgblight_mode_noeeprom(mode); } -/* Triggers a LED to fade/twinkle. - * This function handles the selection of the LED and prepres for it to be used. - */ -void start_rgb_light(void) { - uint8_t indices[RGBLED_NUM]; - uint8_t indices_count = 0; - uint8_t min_life = 0xFF; - uint8_t min_life_index = -1; - - for (uint8_t index = 0; index < RGBLED_NUM; ++index) { - if (lights[index].enabled) { - if (min_life_index == -1 || lights[index].life < min_life) { - min_life = lights[index].life; - min_life_index = index; - } - continue; - } - - indices[indices_count] = index; - ++indices_count; - } - - uint8_t light_index; - if (!indices_count) { - light_index = min_life_index; - } else { - light_index = indices[rand() % indices_count]; - } - - rgblight_fadeout *light = &lights[light_index]; - light->enabled = true; - light->timer = sync_timer_read(); - light->life = 0xC0 + rand() % 0x40; - - light->hue = rgblight_get_hue() + (rand() % 0xB4) - 0x54; - - rgblight_sethsv_at(light->hue, 255, light->life, light_index); -} -# endif - -bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record) { - uint16_t temp_keycode = keycode; - // Filter out the actual keycode from MT and LT keys. - if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { - temp_keycode &= 0xFF; - } - - switch (temp_keycode) { -# ifdef RGBLIGHT_TWINKLE - case KC_A ... KC_SLASH: - case KC_F1 ... KC_F12: - case KC_INSERT ... KC_UP: - case KC_KP_SLASH ... KC_KP_DOT: - case KC_F13 ... KC_F24: - case KC_AUDIO_MUTE ... KC_MEDIA_REWIND: - if (record->event.pressed) { - start_rgb_light(); - } - break; -# endif // RGBLIGHT_TWINKLE - } - return true; -} +bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record) { return true; } # if defined(RGBLIGHT_STARTUP_ANIMATION) static bool is_enabled; static bool is_rgblight_startup; -static uint8_t old_hue; +static HSV old_hsv; +static uint8_t old_mode; static uint16_t rgblight_startup_loop_timer; # endif @@ -130,37 +43,35 @@ void keyboard_post_init_rgb_light(void) { # if defined(RGBLIGHT_STARTUP_ANIMATION) is_enabled = rgblight_is_enabled(); if (userspace_config.rgb_layer_change) { - rgblight_enable_noeeprom(); - } - if (rgblight_is_enabled()) { layer_state_set_rgb_light(layer_state); - old_hue = rgblight_get_hue(); - rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); - is_rgblight_startup = true; } + old_hsv = rgblight_get_hsv(); + old_mode = rgblight_get_mode(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); + is_rgblight_startup = true; # endif - layer_state_set_rgb_light(layer_state); + if (userspace_config.rgb_layer_change) { + layer_state_set_rgb_light(layer_state); + } } void matrix_scan_rgb_light(void) { -# ifdef RGBLIGHT_TWINKLE - scan_rgblight_fadeout(); -# endif // RGBLIGHT_ENABLE - # if defined(RGBLIGHT_STARTUP_ANIMATION) if (is_rgblight_startup && is_keyboard_master()) { if (sync_timer_elapsed(rgblight_startup_loop_timer) > 10) { static uint8_t counter; counter++; - rgblight_sethsv_noeeprom((counter + old_hue) % 255, 255, 255); + rgblight_sethsv_noeeprom((counter + old_hsv.h) % 255, 255, 255); rgblight_startup_loop_timer = sync_timer_read(); if (counter == 255) { is_rgblight_startup = false; - if (!is_enabled) { - rgblight_disable_noeeprom(); - } if (userspace_config.rgb_layer_change) { layer_state_set_rgb_light(layer_state); + } else { + rgblight_set_hsv_and_mode(old_hsv.h, old_hsv.s, old_hsv.v, old_mode); + } + if (!is_enabled) { + rgblight_disable_noeeprom(); } } } @@ -168,19 +79,17 @@ void matrix_scan_rgb_light(void) { # endif } -void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { - rgblight_sethsv_noeeprom(hue, sat, val); - // wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly - rgblight_mode_noeeprom(mode); -} - layer_state_t layer_state_set_rgb_light(layer_state_t state) { # ifdef RGBLIGHT_ENABLE if (userspace_config.rgb_layer_change) { switch (get_highest_layer(state | default_layer_state)) { - case _MACROS: // mouse + case _MOUSE: // mouse if (!layer_state_cmp(state, _GAMEPAD) && !layer_state_cmp(state, _DIABLO)) { +# if defined(RGBLIGHT_EFFECT_TWINKLE) + rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_TWINKLE + 5); +# else rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_BREATHING + 3); +# endif } break; case _MEDIA: @@ -201,29 +110,17 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) { case _ADJUST: rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); break; - case _COLEMAK: - rgblight_set_hsv_and_mode(HSV_MAGENTA, RGBLIGHT_MODE_STATIC_LIGHT); + case _DEFAULT_LAYER_1: + rgblight_set_hsv_and_mode(DEFAULT_LAYER_1_HSV, RGBLIGHT_MODE_STATIC_LIGHT); break; - case _DVORAK: - rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, RGBLIGHT_MODE_STATIC_LIGHT); + case _DEFAULT_LAYER_2: + rgblight_set_hsv_and_mode(DEFAULT_LAYER_2_HSV, RGBLIGHT_MODE_STATIC_LIGHT); break; - case _WORKMAN: - rgblight_set_hsv_and_mode(HSV_GOLDENROD, RGBLIGHT_MODE_STATIC_LIGHT); + case _DEFAULT_LAYER_3: + rgblight_set_hsv_and_mode(DEFAULT_LAYER_3_HSV, RGBLIGHT_MODE_STATIC_LIGHT); break; - case _NORMAN: - rgblight_set_hsv_and_mode(HSV_CORAL, RGBLIGHT_MODE_STATIC_LIGHT); - break; - case _MALTRON: - rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_STATIC_LIGHT); - break; - case _EUCALYN: - rgblight_set_hsv_and_mode(HSV_PINK, RGBLIGHT_MODE_STATIC_LIGHT); - break; - case _CARPLAX: - rgblight_set_hsv_and_mode(HSV_BLUE, RGBLIGHT_MODE_STATIC_LIGHT); - break; - default: - rgblight_set_hsv_and_mode(HSV_CYAN, RGBLIGHT_MODE_STATIC_LIGHT); + case _DEFAULT_LAYER_4: + rgblight_set_hsv_and_mode(DEFAULT_LAYER_4_HSV, RGBLIGHT_MODE_STATIC_LIGHT); break; } } diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 0153adb54..af1acdde7 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h @@ -17,22 +17,9 @@ #pragma once #include "quantum.h" -#if defined(RGBLIGHT_TWINKLE) -typedef struct { - bool enabled; - uint8_t hue; - uint16_t timer; - uint8_t life; -} rgblight_fadeout; -#endif - bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record); void keyboard_post_init_rgb_light(void); void matrix_scan_rgb_light(void); layer_state_t layer_state_set_rgb_light(layer_state_t state); layer_state_t default_layer_state_set_rgb_light(layer_state_t state); void rgblight_sethsv_default_helper(uint8_t index); - -#if defined(RGBLIGHT_TWINKLE) -void scan_rgblight_fadeout(void); -#endif diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index b79051508..dbacae1d5 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -2,7 +2,9 @@ SRC += drashna.c \ process_records.c ifneq ($(PLATFORM),CHIBIOS) - LTO_ENABLE = yes + ifneq ($(strip $(LTO_SUPPORTED)), no) + LTO_ENABLE = yes + endif endif SPACE_CADET_ENABLE = no GRAVE_ESC_ENABLE = no @@ -27,9 +29,6 @@ CUSTOM_RGBLIGHT ?= yes ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) ifeq ($(strip $(CUSTOM_RGBLIGHT)), yes) SRC += rgb_stuff.c - ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes) - OPT_DEFS += -DRGBLIGHT_TWINKLE - endif ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes) OPT_DEFS += -DRGBLIGHT_NOEEPROM endif @@ -65,42 +64,25 @@ ifeq ($(strip $(PROTOCOL)), VUSB) endif CUSTOM_OLED_DRIVER ?= yes -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes) SRC += oled_stuff.c + OPT_DEFS += -DCUSTOM_OLED_DRIVER_CODE endif endif ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes) POINTING_DEVICE_ENABLE := yes OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE - SRC += pimoroni_trackball.c + SRC += drivers/sensors/pimoroni_trackball.c QUANTUM_LIB_SRC += i2c_master.c endif -CUSTOM_SPLIT_TRANSPORT ?= yes -ifeq ($(strip $(SPLIT_KEYBOARD)), yes) - ifneq ($(strip $(SPLIT_TRANSPORT)), custom) - ifeq ($(strip $(CUSTOM_SPLIT_TRANSPORT)), yes) - SPLIT_TRANSPORT = custom - QUANTUM_LIB_SRC += drashna_transport.c - OPT_DEFS += -DDRASHNA_CUSTOM_TRANSPORT - # Unused functions are pruned away, which is why we can add multiple drivers here without bloat. - ifeq ($(PLATFORM),AVR) - 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 - QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c - endif - endif +CUSTOM_SPLIT_TRANSPORT_SYNC ?= yes +ifeq ($(strip $(CUSTOM_SPLIT_TRANSPORT_SYNC)), yes) + ifeq ($(strip $(SPLIT_KEYBOARD)), yes) + QUANTUM_LIB_SRC += transport_sync.c + OPT_DEFS += -DCUSTOM_SPLIT_TRANSPORT_SYNC endif endif diff --git a/users/drashna/tap_dances.h b/users/drashna/tap_dances.h index 7f73f2803..81e462ce2 100644 --- a/users/drashna/tap_dances.h +++ b/users/drashna/tap_dances.h @@ -35,12 +35,10 @@ extern diablo_timer_t diablo_timer[]; void run_diablo_macro_check(void); #ifdef TAP_DANCE_ENABLE -// clang-format off enum { TD_D3_1 = 0, TD_D3_2, TD_D3_3, - TD_D3_4 + TD_D3_4, }; -// clang-format on #endif // TAP_DANCE_ENABLE diff --git a/users/drashna/transport_sync.c b/users/drashna/transport_sync.c new file mode 100644 index 000000000..fdd596c04 --- /dev/null +++ b/users/drashna/transport_sync.c @@ -0,0 +1,192 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 "transport_sync.h" +#include "transactions.h" +#include + +#ifdef UNICODE_ENABLE +extern unicode_config_t unicode_config; +#endif +#ifdef AUDIO_ENABLE +# include "audio.h" +extern bool delayed_tasks_run; +#endif +#if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform) +extern bool tap_toggling; +#endif +#ifdef SWAP_HANDS_ENABLE +extern bool swap_hands; +#endif +extern userspace_config_t userspace_config; + +__attribute__((aligned(8))) typedef struct { + bool audio_enable; + bool audio_clicky_enable; + bool tap_toggling; + bool unicode_mode; + bool swap_hands; +} user_runtime_config_t; + +uint16_t transport_keymap_config = 0; +uint32_t transport_userspace_config = 0; + +user_runtime_config_t user_state; + +void user_state_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + if (initiator2target_buffer_size == sizeof(user_state)) { + memcpy(&user_state, initiator2target_buffer, initiator2target_buffer_size); + } +} +void user_keymap_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + if (initiator2target_buffer_size == sizeof(transport_keymap_config)) { + memcpy(&transport_keymap_config, initiator2target_buffer, initiator2target_buffer_size); + } +} +void user_config_sync(uint8_t initiator2target_buffer_size, const void* initiator2target_buffer, uint8_t target2initiator_buffer_size, void* target2initiator_buffer) { + if (initiator2target_buffer_size == sizeof(transport_userspace_config)) { + memcpy(&transport_userspace_config, initiator2target_buffer, initiator2target_buffer_size); + } +} + +void keyboard_post_init_transport_sync(void) { + // Register keyboard state sync split transaction + transaction_register_rpc(RPC_ID_USER_STATE_SYNC, user_state_sync); + transaction_register_rpc(RPC_ID_USER_KEYMAP_SYNC, user_keymap_sync); + transaction_register_rpc(RPC_ID_USER_CONFIG_SYNC, user_config_sync); +} + +void user_transport_update(void) { + if (is_keyboard_master()) { + transport_keymap_config = keymap_config.raw; + transport_userspace_config = userspace_config.raw; +#ifdef AUDIO_ENABLE + user_state.audio_enable = is_audio_on(); + user_state.audio_clicky_enable = is_clicky_on(); +#endif +#if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform) + user_state.tap_toggling = tap_toggling; +#endif +#ifdef SWAP_HANDS_ENABLE + user_state.swap_hands = swap_hands; +#endif + + } else { + keymap_config.raw = transport_keymap_config; + userspace_config.raw = transport_userspace_config; +#ifdef UNICODE_ENABLE + unicode_config.input_mode = user_state.unicode_mode; +#endif +#ifdef AUDIO_ENABLE + if (delayed_tasks_run) { + if (user_state.audio_enable != is_audio_on()) { + if (user_state.audio_enable) { + audio_on(); + } else { + audio_off(); + } + } + if (user_state.audio_clicky_enable != is_clicky_on()) { + if (user_state.audio_clicky_enable) { + clicky_on(); + } else { + clicky_off(); + } + } + } +#endif +#if defined(POINTING_DEVICE_ENABLE) && defined(KEYBOARD_handwired_tractyl_manuform) + tap_toggling = user_state.tap_toggling; +#endif +#ifdef SWAP_HANDS_ENABLE + swap_hands = user_state.swap_hands; +#endif + } +} + +void user_transport_sync(void) { + if (is_keyboard_master()) { + // Keep track of the last state, so that we can tell if we need to propagate to slave + static user_runtime_config_t last_user_state; + static uint16_t last_keymap = 0; + static uint32_t last_config = 0; + static uint32_t last_sync[3]; + bool needs_sync = false; + + // Check if the state values are different + if (memcmp(&user_state, &last_user_state, sizeof(user_state))) { + needs_sync = true; + memcpy(&last_user_state, &user_state, sizeof(user_state)); + } + // Send to slave every 500ms regardless of state change + if (timer_elapsed32(last_sync[0]) > 250) { + needs_sync = true; + } + + // Perform the sync if requested + if (needs_sync) { + if (transaction_rpc_send(RPC_ID_USER_STATE_SYNC, sizeof(user_state), &user_state)) { + last_sync[0] = timer_read32(); + } + needs_sync = false; + } + + // Check if the state values are different + if (memcmp(&transport_keymap_config, &last_keymap, sizeof(transport_keymap_config))) { + needs_sync = true; + memcpy(&last_keymap, &transport_keymap_config, sizeof(transport_keymap_config)); + } + + // Send to slave every 500ms regardless of state change + if (timer_elapsed32(last_sync[1]) > 250) { + needs_sync = true; + } + + // Perform the sync if requested + if (needs_sync) { + if (transaction_rpc_send(RPC_ID_USER_KEYMAP_SYNC, sizeof(transport_keymap_config), &transport_keymap_config)) { + last_sync[1] = timer_read32(); + } + needs_sync = false; + } + + // Check if the state values are different + if (memcmp(&user_state, &last_config, sizeof(transport_userspace_config))) { + needs_sync = true; + memcpy(&last_config, &user_state, sizeof(transport_userspace_config)); + } + + // Send to slave every 500ms regardless of state change + if (timer_elapsed32(last_sync[2]) > 250) { + needs_sync = true; + } + + // Perform the sync if requested + if (needs_sync) { + if (transaction_rpc_send(RPC_ID_USER_CONFIG_SYNC, sizeof(transport_userspace_config), &transport_userspace_config)) { + last_sync[2] = timer_read32(); + } + } + } +} + +void housekeeping_task_user(void) { + // Update kb_state so we can send to slave + user_transport_update(); + + // Data sync from master to slave + user_transport_sync(); +} diff --git a/users/drashna/transport_sync.h b/users/drashna/transport_sync.h new file mode 100644 index 000000000..e2b3eae76 --- /dev/null +++ b/users/drashna/transport_sync.h @@ -0,0 +1,22 @@ + +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . + */ + +#pragma once + +#include "drashna.h" + +void keyboard_post_init_transport_sync(void); diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h index be8162dfa..8ac252926 100644 --- a/users/drashna/wrappers.h +++ b/users/drashna/wrappers.h @@ -60,120 +60,120 @@ NOTE: These are all the same length. If you do a search/replace #define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH -#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I -#define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X +#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I +#define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X -#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L -#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH -#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z +#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L +#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH +#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z -#define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U -#define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X +#define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U +#define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X -#define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L -#define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH -#define ________________DVORAK_AU_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z +#define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L +#define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH +#define ________________DVORAK_AU_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z -#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B -#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G -#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V +#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B +#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G +#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V -#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN -#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT -#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH +#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN +#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT +#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH -#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K -#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G -#define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B +#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K +#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G +#define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B -#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN -#define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U, KC_QUOT -#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH +#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN +#define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U, KC_QUOT +#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH -#define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B -#define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F -#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM +#define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B +#define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F +#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM -#define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L -#define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R, KC_QUOT -#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X +#define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L +#define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R, KC_QUOT +#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X -#define _________________EUCALYN_L1________________ KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN -#define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U -#define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_F +#define _________________EUCALYN_L1________________ KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN +#define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U +#define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_F -#define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P -#define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N, KC_QUOT -#define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SLSH +#define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P +#define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N, KC_QUOT +#define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SLSH // Qwerty-like -#define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W -#define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R -#define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X +#define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W +#define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R +#define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X -#define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J -#define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN, KC_QUOT -#define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH +#define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J +#define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN, KC_QUOT +#define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH // Colemak like -#define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W -#define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R -#define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J +#define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W +#define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R +#define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J -#define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN -#define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT -#define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH +#define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN +#define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT +#define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH // colemak like, zxcv fixed -#define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W -#define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R -#define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J +#define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W +#define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R +#define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J -#define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN -#define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT -#define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH +#define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN +#define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT +#define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH // teeheehee -#define _____________CARPLAX_TNWCLR_L1_____________ KC_T, KC_N, KC_W, KC_C, KC_L -#define _____________CARPLAX_TNWCLR_L2_____________ KC_S, KC_K, KC_J, KC_X, KC_G -#define _____________CARPLAX_TNWCLR_L3_____________ KC_E, KC_O, KC_D, KC_I, KC_A +#define _____________CARPLAX_TNWCLR_L1_____________ KC_T, KC_N, KC_W, KC_C, KC_L +#define _____________CARPLAX_TNWCLR_L2_____________ KC_S, KC_K, KC_J, KC_X, KC_G +#define _____________CARPLAX_TNWCLR_L3_____________ KC_E, KC_O, KC_D, KC_I, KC_A -#define _____________CARPLAX_TNWCLR_R1_____________ KC_R, KC_B, KC_F, KC_M, KC_H -#define _____________CARPLAX_TNWCLR_R2_____________ KC_P, KC_Q, KC_Z, KC_V, KC_SCLN, KC_QUOT -#define _____________CARPLAX_TNWCLR_R3_____________ KC_U, KC_Y, KC_COMM, KC_DOT, KC_SLSH +#define _____________CARPLAX_TNWCLR_R1_____________ KC_R, KC_B, KC_F, KC_M, KC_H +#define _____________CARPLAX_TNWCLR_R2_____________ KC_P, KC_Q, KC_Z, KC_V, KC_SCLN, KC_QUOT +#define _____________CARPLAX_TNWCLR_R3_____________ KC_U, KC_Y, KC_COMM, KC_DOT, KC_SLSH -#define _________________WHITE_R1__________________ KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT -#define _________________WHITE_R2__________________ KC_A, KC_T, KC_H, KC_E, KC_B -#define _________________WHITE_R3__________________ KC_P, KC_K, KC_G, KC_W, KC_Q +#define _________________WHITE_R1__________________ KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT +#define _________________WHITE_R2__________________ KC_A, KC_T, KC_H, KC_E, KC_B +#define _________________WHITE_R3__________________ KC_P, KC_K, KC_G, KC_W, KC_Q -#define _________________WHITE_L1__________________ KC_INT1, KC_J, KC_M, KC_L, KC_U -#define _________________WHITE_L2__________________ KC_MINS, KC_C, KC_S, KC_N, KC_O, KC_I -#define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z +#define _________________WHITE_L1__________________ KC_INT1, KC_J, KC_M, KC_L, KC_U +#define _________________WHITE_L2__________________ KC_MINS, KC_C, KC_S, KC_N, KC_O, KC_I +#define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z -#define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z -#define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM -#define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH +#define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z +#define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM +#define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH -#define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J -#define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE -#define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y +#define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J +#define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE +#define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y -#define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z -#define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM -#define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH +#define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z +#define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM +#define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH -#define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J -#define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE -#define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y +#define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J +#define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE +#define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 @@ -181,35 +181,35 @@ NOTE: These are all the same length. If you do a search/replace #define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 #define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 -#define ___________________BLANK___________________ _______, _______, _______, _______, _______ +#define ___________________BLANK___________________ _______, _______, _______, _______, _______ -#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________ -#define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________ +#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________ +#define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________ -#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN -#define _________________LOWER_R2__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR -#define _________________LOWER_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN +#define _________________LOWER_R2__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR +#define _________________LOWER_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END -#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ -#define _________________RAISE_L2__________________ ___________________BLANK___________________ -#define _________________RAISE_L3__________________ ___________________BLANK___________________ +#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ +#define _________________RAISE_L2__________________ ___________________BLANK___________________ +#define _________________RAISE_L3__________________ ___________________BLANK___________________ -#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ -#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC -#define _________________RAISE_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ +#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC +#define _________________RAISE_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG -#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM -#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T +#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG +#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM +#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T -#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 -#define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN -#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT +#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 +#define _________________ADJUST_R2_________________ CG_SWAP, DEFLYR1, DEFLYR2, DEFLYR3, DEFLYR4 +#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT // clang-format on diff --git a/users/dshields/rules.mk b/users/dshields/rules.mk index 462649289..00e18521b 100644 --- a/users/dshields/rules.mk +++ b/users/dshields/rules.mk @@ -5,7 +5,6 @@ COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no # Console for debug(+400) EXTRAKEY_ENABLE = no SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -API_SYSEX_ENABLE = no SPACE_CADET_ENABLE = no LEADER_ENABLE = no DYNAMIC_MACRO_ENABLE = yes diff --git a/users/edvorakjp/edvorakjp.c b/users/edvorakjp/edvorakjp.c index d0cd106ff..c44d8bb44 100644 --- a/users/edvorakjp/edvorakjp.c +++ b/users/edvorakjp/edvorakjp.c @@ -7,7 +7,7 @@ void matrix_init_user(void) { __attribute__((weak)) void matrix_init_keymap() {} -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, L_EDVORAKJP_LOWER, L_EDVORAKJP_RAISE, L_EDVORAKJP_ADJUST); return layer_state_set_keymap(state); } diff --git a/users/edvorakjp/edvorakjp.h b/users/edvorakjp/edvorakjp.h index 5f20762c6..93cd9851b 100644 --- a/users/edvorakjp/edvorakjp.h +++ b/users/edvorakjp/edvorakjp.h @@ -67,7 +67,7 @@ enum tap_dance_code { // base void matrix_init_user(void); void matrix_init_keymap(void); -uint32_t layer_state_set_user(uint32_t state); +layer_state_t layer_state_set_user(layer_state_t state); uint32_t layer_state_set_keymap(uint32_t state); bool process_record_user(uint16_t keycode, keyrecord_t *record); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); diff --git a/users/ericgebhart/base_layers.h b/users/ericgebhart/base_layers.h index caf081057..fd88a40ae 100644 --- a/users/ericgebhart/base_layers.h +++ b/users/ericgebhart/base_layers.h @@ -87,7 +87,7 @@ // the bottom rows for keyboards on bepo. // bepo on bepo - not enough space to go around.... -#define ___BOTTOM_LEFT_BP___ LCTL(BP_C), BP_ECRC, LCTL(BP_V), KC_LEFT, KC_RIGHT +#define ___BOTTOM_LEFT_BP___ LCTL(BP_C), BP_ECIR, LCTL(BP_V), KC_LEFT, KC_RIGHT #define ___BOTTOM_RIGHT_BP___ KC_UP, KC_DOWN, DB_BACKSLASH, BP_CCED, BP_PERC // for dvorak on bepo diff --git a/users/ericgebhart/core_keys.h b/users/ericgebhart/core_keys.h index 035f74001..a71d90574 100644 --- a/users/ericgebhart/core_keys.h +++ b/users/ericgebhart/core_keys.h @@ -231,7 +231,7 @@ enum { #define BP_SFT_T_E SFT_T(BP_E) #define BP_SFT_T_M SFT_T(BP_M) -#define BP_SFT_T_ECRC SFT_T(BP_ECRC) +#define BP_SFT_T_ECRC SFT_T(BP_ECIR) #define BP_SFT_T_CCED SFT_T(BP_CCED) #define BP_LT_SYMB_COMM LT(SYMB,BP_COMM) diff --git a/users/ericgebhart/core_keysets.h b/users/ericgebhart/core_keysets.h index ffe02192f..5baf02ccf 100644 --- a/users/ericgebhart/core_keysets.h +++ b/users/ericgebhart/core_keysets.h @@ -111,33 +111,33 @@ // Bepo on fr-bepo software layer // for bepo on bepo -/* BP_DLR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL, */ -#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN +/* BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, */ +#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN /* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ -#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLASH, BP_ASTR /* BP_EQL, BP_PERC */ +#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR /* BP_EQL, BP_PERC */ -#define ___BEPO_FR_L1___ BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV +#define ___BEPO_FR_L1___ BP_B, BP_EACU, BP_P, BP_O, BP_EGRV #define ___BEPO_FR_L2___ BP_SFT_T_A, BP_LT_KP_U, BP_LT_SYMB_I, BP_LT_MDIA_E, BP_COMM -#define ___BEPO_FR_L3___ /*BP_ECRC*/ BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K +#define ___BEPO_FR_L3___ /*BP_ECIR*/ BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K -#define ___BEPO_FR_R1___ /* BP_DCRC,*/ BP_V, BP_D, BP_L, BP_J, BP_Z +#define ___BEPO_FR_R1___ /* BP_DCIR,*/ BP_V, BP_D, BP_L, BP_J, BP_Z #define ___BEPO_FR_R2___ /* BP_C, */ BP_T, BP_LT_SYMB_S, BP_LT_MDIA_R, BP_LT_KP_N, BP_SFT_T_M //BP_CCED -#define ___BEPO_FR_R3___ BP_APOS, BP_Q, BP_G, BP_H, BP_F //BP_SFT_T_W +#define ___BEPO_FR_R3___ BP_QUOT, BP_Q, BP_G, BP_H, BP_F //BP_SFT_T_W -/* BP_DLR, BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN, KC_DEL, */ -/* KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, */ +/* BP_DLR, BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, KC_DEL, */ +/* KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, KC_BSPC, */ /* KC_LSFT, BP_A, BP_U, BP_I, BP_E, BP_COMM, */ /* KC_LCTRL, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, */ -/* ESC_FN, BP_ECRC, KC_LGUI, KC_LALT, SPC_RALT, */ +/* ESC_FN, BP_ECIR, KC_LGUI, KC_LALT, SPC_RALT, */ /* TT(SWAP), KC_MNXT, */ /* KC_MPLY, */ /* TT(FN), TT(NUMS), KC_MPRV, */ /* /\* right hand *\/ */ /* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ -/* KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, */ +/* KC_BSPC, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z, */ /* BP_C, BP_T, BP_S, BP_R, BP_N, M_RSFT, */ -/* KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, W_RCTL, */ +/* KC_ENT, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, W_RCTL, */ /*******************************************************************/ @@ -183,7 +183,7 @@ #define ___KEYPAD_4_ALT___ KC_P0, KC_DOT, KC_PENT, KC_PENT // For Bepo -#define ___KEYPAD_1_BP___ DB_7, DB_8, DB_9, BP_SLASH +#define ___KEYPAD_1_BP___ DB_7, DB_8, DB_9, BP_SLSH #define ___KEYPAD_2_BP___ DB_4, DB_5, DB_6, BP_ASTR #define ___KEYPAD_3_BP___ DB_1, DB_2, DB_3, DB_MINUS #define ___KEYPAD_4_BP___ DB_0, DB_DOT, DB_EQL, BP_PLUS @@ -225,9 +225,9 @@ // SYMBOLS FOR BEPO // The top row. Bepo has symbols not numbers. Numbers are the shifted values. -#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQOT, BP_LGIL, BP_RGIL, BP_LPRN, BP_RPRN +#define ___SYMBOL_BEPO_L___ /* BP_DLR */ BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN /* KC_DEL, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, */ -#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLASH, BP_ASTR /* BP_EQL, BP_PERC */ +#define ___SYMBOL_BEPO_R___ BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR /* BP_EQL, BP_PERC */ // An arrangement for the left hand with a focus on the ()[]{}s. #define ___SYMBOLS_1_BP___ KC_EXLM, BP_AT, DB_LCBR, DB_RCBR, DB_PIPE @@ -237,7 +237,7 @@ // A larger 6 column arrangement for the left hand, A merge of dvorak and the above. #define ___SYMBOLS6_1_BP___ DB_GRV, DB_LESS, DB_GRTR, DB_LCBR, DB_RCBR, DB_HASH #define ___SYMBOLS6_2_BP___ KC_AMPR, BP_AT, BP_ASTR, DB_LPRN, DB_RPRN, BP_PERC -#define ___SYMBOLS6_3_BP___ BP_DLR, BP_DQOT, DB_QUOT, DB_LBRC, DB_RBRC, KC_COLON +#define ___SYMBOLS6_3_BP___ BP_DLR, BP_DQUO, DB_QUOT, DB_LBRC, DB_RBRC, KC_COLON #define ___SYMBOLS6_4_BP___ ___2___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON #define ___SYMBOLS5_4_BP___ ___, DB_TILD, DB_DOT, KC_EXLM, DB_SCOLON @@ -248,9 +248,9 @@ #define ___SYMPAD_1_BP___ DB_GRV, BP_AMPR, BP_ASTR, DB_LCBR, BP_PLUS, DB_PIPE #define ___SYMPAD_2_BP___ DB_TILD, BP_DLR, BP_PERC, DB_CIRC, BP_ASTR, DB_GRV #define ___SYMPAD_3_BP___ ___, BP_EXLM, BP_AT, DB_HASH, BP_MINS, BP_SLSH -#define ___SYMPAD_4_BP___ ___, DB_RCBR, DB_DOT, BP_EQL, BP_MINUS, DB_BACKSLASH +#define ___SYMPAD_4_BP___ ___, DB_RCBR, DB_DOT, BP_EQL, BP_MINS, DB_BACKSLASH -#define ___5_SYMPAD_4_BP___ DB_RCBR, DB_DOT, BP_EQL, BP_MINUS, DB_BACKSLASH +#define ___5_SYMPAD_4_BP___ DB_RCBR, DB_DOT, BP_EQL, BP_MINS, DB_BACKSLASH // Parts are parts. // MOUSE, ARROW and MEDIA KEY SETS diff --git a/users/ericgebhart/ericgebhart.c b/users/ericgebhart/ericgebhart.c index abb87899b..d34563865 100644 --- a/users/ericgebhart/ericgebhart.c +++ b/users/ericgebhart/ericgebhart.c @@ -86,25 +86,25 @@ static void switch_default_layer(uint8_t layer) { // reasnably sized array without difficulties. The macro is for the constant declarations // the function is for when we use it. const uint8_t key_translations[][2][2] = { - [GR(DB_1)] = {{BP_DQOT, MOD_LSFT}, {BP_DCRC, MOD_LSFT}}, - [GR(DB_2)] = {{BP_LGIL, MOD_LSFT}, {BP_AT, MOD_NONE}}, - [GR(DB_3)] = {{BP_RGIL, MOD_LSFT}, {BP_DLR, MOD_LSFT}}, + [GR(DB_1)] = {{BP_DQUO, MOD_LSFT}, {BP_DCIR, MOD_LSFT}}, + [GR(DB_2)] = {{BP_LDAQ, MOD_LSFT}, {BP_AT, MOD_NONE}}, + [GR(DB_3)] = {{BP_RDAQ, MOD_LSFT}, {BP_DLR, MOD_LSFT}}, [GR(DB_4)] = {{BP_LPRN, MOD_LSFT}, {BP_DLR, MOD_NONE}}, [GR(DB_5)] = {{BP_RPRN, MOD_LSFT}, {BP_PERC, MOD_NONE}}, [GR(DB_6)] = {{BP_AT, MOD_LSFT}, {BP_AT, MOD_BIT(KC_RALT)}}, [GR(DB_7)] = {{BP_PLUS, MOD_LSFT}, {BP_P, MOD_BIT(KC_RALT)}}, [GR(DB_8)] = {{BP_MINS, MOD_LSFT}, {BP_ASTR, MOD_NONE}}, - [GR(DB_9)] = {{BP_SLASH, MOD_LSFT}, {BP_LPRN, MOD_NONE}}, + [GR(DB_9)] = {{BP_SLSH, MOD_LSFT}, {BP_LPRN, MOD_NONE}}, [GR(DB_0)] = {{BP_ASTR, MOD_LSFT}, {BP_RPRN, MOD_NONE}}, [GR(DB_GRV)] = {{BP_PERC, MOD_LSFT}, {BP_K, MOD_BIT(KC_RALT)}}, [GR(DB_SCOLON)] = {{BP_COMM, MOD_LSFT}, {BP_DOT, MOD_LSFT}}, - [GR(DB_SLASH)] = {{BP_SLASH, MOD_NONE}, {BP_APOS, MOD_LSFT}}, + [GR(DB_SLASH)] = {{BP_SLSH, MOD_NONE}, {BP_QUOT, MOD_LSFT}}, [GR(DB_BACKSLASH)] = {{BP_AGRV, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}}, [GR(DB_EQL)] = {{BP_EQL, MOD_NONE}, {BP_PLUS, MOD_NONE}}, - [GR(DB_COMM)] = {{BP_COMMA, MOD_NONE}, {BP_LGIL, MOD_BIT(KC_RALT)}}, - [GR(DB_DOT)] = {{BP_DOT, MOD_NONE}, {BP_RGIL, MOD_BIT(KC_RALT)}}, - [GR(DB_QUOT)] = {{BP_APOS, MOD_NONE}, {BP_DQOT, MOD_NONE}}, - [GR(DB_MINUS)] = {{BP_MINUS, MOD_NONE}, {KC_SPC, MOD_BIT(KC_RALT)}}, + [GR(DB_COMM)] = {{BP_COMM, MOD_NONE}, {BP_LDAQ, MOD_BIT(KC_RALT)}}, + [GR(DB_DOT)] = {{BP_DOT, MOD_NONE}, {BP_RDAQ, MOD_BIT(KC_RALT)}}, + [GR(DB_QUOT)] = {{BP_QUOT, MOD_NONE}, {BP_DQUO, MOD_NONE}}, + [GR(DB_MINUS)] = {{BP_MINS, MOD_NONE}, {KC_SPC, MOD_BIT(KC_RALT)}}, [GR(DB_LPRN)] = {{BP_LPRN, MOD_NONE}, {BP_LPRN, MOD_BIT(KC_RALT)}}, [GR(DB_RPRN)] = {{BP_RPRN, MOD_NONE}, {BP_RPRN, MOD_BIT(KC_RALT)}}, [GR(DB_LBRC)] = {{BP_Y, MOD_BIT(KC_RALT)}, {BP_LPRN, MOD_BIT(KC_RALT)}}, @@ -116,8 +116,8 @@ const uint8_t key_translations[][2][2] = { [GR(DB_PIPE)] = {{BP_B, MOD_BIT(KC_RALT)}, {BP_B, MOD_BIT(KC_RALT)}}, [GR(DB_TILD)] = {{BP_K, MOD_BIT(KC_RALT)}, {BP_K, MOD_BIT(KC_RALT)}}, [GR(DB_CIRC)] = {{BP_AT, MOD_BIT(KC_RALT)}, {BP_AT, MOD_BIT(KC_RALT)}}, - [GR(DB_LESS)] = {{BP_LGIL, MOD_BIT(KC_RALT)}, {BP_LGIL, MOD_BIT(KC_RALT)}}, - [GR(DB_GRTR)] = {{BP_RGIL, MOD_BIT(KC_RALT)}, {BP_RGIL, MOD_BIT(KC_RALT)}}, + [GR(DB_LESS)] = {{BP_LDAQ, MOD_BIT(KC_RALT)}, {BP_LDAQ, MOD_BIT(KC_RALT)}}, + [GR(DB_GRTR)] = {{BP_RDAQ, MOD_BIT(KC_RALT)}, {BP_RDAQ, MOD_BIT(KC_RALT)}}, }; diff --git a/users/ericgebhart/rules.mk b/users/ericgebhart/rules.mk index 70017a595..698f6131e 100755 --- a/users/ericgebhart/rules.mk +++ b/users/ericgebhart/rules.mk @@ -9,7 +9,6 @@ KEY_LOCK_ENABLE = yes # Enable the KC_LOCK key TAP_DANCE_ENABLE = yes # Enable the tap dance feature. CONSOLE_ENABLE = no # Console for debug -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite UNICODE_ENABLE = no SLEEP_LED_ENABLE = no -API_SYSEX_ENABLE = no diff --git a/users/gordon/rules.mk b/users/gordon/rules.mk index 06e671a63..c282f0028 100644 --- a/users/gordon/rules.mk +++ b/users/gordon/rules.mk @@ -1,4 +1,3 @@ TAP_DANCE_ENABLE = yes SRC += gordon.c -# BOOTMAGIC_ENABLE = full diff --git a/users/issmirnov/rules.mk b/users/issmirnov/rules.mk index 93ec21b01..d96083f7d 100644 --- a/users/issmirnov/rules.mk +++ b/users/issmirnov/rules.mk @@ -19,7 +19,7 @@ NKRO_ENABLE = no # note: also needs FORCE_NKRO in config.h # Disable unused features to save on space # https://thomasbaart.nl/2018/12/01/reducing-firmware-size-in-qmk/ MOUSEKEY_ENABLE = no # 2000 bytes -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = no # https://beta.docs.qmk.fm/features/feature_command UNICODE_ENABLE = no # Unicode SWAP_HANDS_ENABLE = no # Allow swapping hands of keyboard diff --git a/users/jdelkins/rules.mk b/users/jdelkins/rules.mk index 76d391d70..075aab7d3 100644 --- a/users/jdelkins/rules.mk +++ b/users/jdelkins/rules.mk @@ -12,4 +12,4 @@ users/jdelkins/secrets.h: users/jdelkins/secrets.h.gpg gpg -d $< >$@ endif -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite diff --git a/users/jonavin/config.h b/users/jonavin/config.h index 4f4568f70..440d222df 100644 --- a/users/jonavin/config.h +++ b/users/jonavin/config.h @@ -26,5 +26,5 @@ #ifdef RGB_MATRIX_ENABLE #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR - #define RGB_DISABLE_WHEN_USB_SUSPENDED true +# define RGB_DISABLE_WHEN_USB_SUSPENDED #endif diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index 72aca9fb8..3fdf5a4ca 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -97,7 +97,7 @@ uint32_t layer_state_set_keymap(uint32_t state) { return state; } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { state = layer_state_set_keymap(state); #ifdef LAYER_NUMPAD diff --git a/users/kuchosauronad0/kuchosauronad0.c b/users/kuchosauronad0/kuchosauronad0.c index 6c38d0f10..a8f17b08e 100644 --- a/users/kuchosauronad0/kuchosauronad0.c +++ b/users/kuchosauronad0/kuchosauronad0.c @@ -1,5 +1,5 @@ /* -Copyright 2019 Andre Poley +Copyright 2019 Andre Poley This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -123,7 +123,7 @@ uint32_t layer_state_set_keymap (uint32_t state) { // on layer change, no matter where the change was initiated // Then runs keymap's layer change check -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); #ifdef RGBLIGHT_ENABLE state = layer_state_set_rgb(state); diff --git a/users/losinggeneration/rules.mk b/users/losinggeneration/rules.mk index 295367fbc..41d6f9167 100644 --- a/users/losinggeneration/rules.mk +++ b/users/losinggeneration/rules.mk @@ -2,7 +2,6 @@ # Only enable things here that are generic to all keyboards. A yes or no here # will override keyboard/keymap specific values # -#BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) #COMMAND_ENABLE = no # Commands for debug and configuration #CONSOLE_ENABLE = no # Console for debug(+400) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) diff --git a/users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk b/users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk index 7eb39e108..41273a9a6 100644 --- a/users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk +++ b/users/miles2go/keymaps/handwired/ms_sculpt_mobile/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/users/mtdjr/mtdjr.c b/users/mtdjr/mtdjr.c index c31b077b4..9c6c26bc8 100644 --- a/users/mtdjr/mtdjr.c +++ b/users/mtdjr/mtdjr.c @@ -136,7 +136,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case _RAISE: #ifdef RGBLIGHT_ENABLE diff --git a/users/ninjonas/oled.c b/users/ninjonas/oled.c index a3514f54f..1d88c3057 100644 --- a/users/ninjonas/oled.c +++ b/users/ninjonas/oled.c @@ -2,7 +2,7 @@ #include #include "ninjonas.h" -#if defined(OLED_DRIVER_ENABLE) & !defined(KEYBOARD_kyria_rev1) +#if defined(OLED_ENABLE) & !defined(KEYBOARD_kyria_rev1) static uint32_t oled_timer = 0; @@ -49,16 +49,16 @@ void render_layer_state(void) { bool adjust = layer_state_is(_ADJUST); bool numpad = layer_state_is(_NUMPAD); - if(lower){ - oled_write_P(PSTR(" Lower "), true); - } else if(raise){ - oled_write_P(PSTR(" Raise "), true); - } else if(adjust){ - oled_write_P(PSTR(" Adjust "), true); + if(lower){ + oled_write_P(PSTR(" Lower "), true); + } else if(raise){ + oled_write_P(PSTR(" Raise "), true); + } else if(adjust){ + oled_write_P(PSTR(" Adjust "), true); } else if(numpad) { - oled_write_P(PSTR(" Numpad "), true); - } else { - oled_write_P(PSTR(" Default"), false); + oled_write_P(PSTR(" Numpad "), true); + } else { + oled_write_P(PSTR(" Default"), false); } } diff --git a/users/ninjonas/process_records.c b/users/ninjonas/process_records.c index a3b841791..c298227e5 100644 --- a/users/ninjonas/process_records.c +++ b/users/ninjonas/process_records.c @@ -6,7 +6,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; __attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE __attribute__((weak)) bool process_record_oled(uint16_t keycode, keyrecord_t *record) { return true; } #endif @@ -110,7 +110,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return process_record_keymap(keycode, record) && process_record_secrets(keycode, record) - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE && process_record_oled(keycode, record) #endif ; // Close return diff --git a/users/ninjonas/process_records.h b/users/ninjonas/process_records.h index 2e69ca216..5b901a165 100644 --- a/users/ninjonas/process_records.h +++ b/users/ninjonas/process_records.h @@ -25,6 +25,6 @@ enum custom_keycodes { bool process_record_secrets(uint16_t keycode, keyrecord_t *record); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE bool process_record_oled(uint16_t keycode, keyrecord_t *record); #endif diff --git a/users/ninjonas/rules.mk b/users/ninjonas/rules.mk index a5cd0fdd9..7ff8f24b9 100644 --- a/users/ninjonas/rules.mk +++ b/users/ninjonas/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = no # Disable Boot Magic (https://beta.docs.qmk.fm/features/feature_bootmagic) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) TAP_DANCE_ENABLE = yes # Enable Tap Dance. diff --git a/users/pvinis/pvinis.c b/users/pvinis/pvinis.c index 31c3023e8..71f9210ae 100644 --- a/users/pvinis/pvinis.c +++ b/users/pvinis/pvinis.c @@ -10,7 +10,7 @@ float song_test[][2] = SONG(QWERTY_SOUND); #endif // SYMBOL + SYSCTL = KBCTL -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { uint32_t intermediate_state = update_tri_layer_state(state, LR_SYMBOL, LR_SYSCTL, LR_KBCTL); intermediate_state = layer_state_set_user_keymap(intermediate_state); return intermediate_state; diff --git a/users/riblee/riblee.c b/users/riblee/riblee.c index 6e548f1d8..6e6a7c23c 100644 --- a/users/riblee/riblee.c +++ b/users/riblee/riblee.c @@ -173,7 +173,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static char receive_buffer[128] = {}; static uint8_t receive_buffer_length = 0; @@ -227,4 +227,4 @@ void raw_hid_receive(uint8_t *data, uint8_t length) { #endif -#endif \ No newline at end of file +#endif diff --git a/users/ridingqwerty/rules.mk b/users/ridingqwerty/rules.mk index 153e5ff90..93b88068e 100644 --- a/users/ridingqwerty/rules.mk +++ b/users/ridingqwerty/rules.mk @@ -1,7 +1,7 @@ SRC += ridingqwerty.c \ process_records.c -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite CONSOLE_ENABLE = no COMMAND_ENABLE = no UNICODE_ENABLE = no # "yes" in Atreus default keymap, blocking UNICODEMAP_ENABLE diff --git a/users/romus/romus.c b/users/romus/romus.c index 35b524f94..f707bb884 100644 --- a/users/romus/romus.c +++ b/users/romus/romus.c @@ -72,7 +72,7 @@ __attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) { } // Set RGBLIGHT state depending on layer void rgblight_change( uint8_t this_layer ) { // Enable RGB light; will not work without this - //rgblight_enable_noeeprom(); + //rgblight_enable_noeeprom(); // Change RGB light switch ( this_layer ) { case _DV: @@ -83,21 +83,21 @@ void rgblight_change( uint8_t this_layer ) { // Do yellow for alternate rgblight_enable_noeeprom(); rgblight_sethsv_noeeprom( 60,255,255); - + break; case _GA: // Do purple for game rgblight_enable_noeeprom(); rgblight_sethsv_noeeprom(285,255,255); - + break; case _NU: // Do azure for number rgblight_enable_noeeprom(); rgblight_sethsv_noeeprom(186,200,255); - + break; case _SE: @@ -105,27 +105,27 @@ void rgblight_change( uint8_t this_layer ) { rgblight_enable_noeeprom(); rgblight_sethsv_noeeprom( 16,255,255); - + break; case _MO: // Do green for mouse rgblight_enable_noeeprom(); rgblight_sethsv_noeeprom(120,255,255); - + break; case _MU: // Do orange for music - + rgblight_enable_noeeprom(); rgblight_sethsv_noeeprom( 39,255,255); - + break; default: // Something went wrong rgblight_enable_noeeprom(); rgblight_sethsv_noeeprom( 0,255,255); - + break; } } @@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; -#endif +#endif // Lock functionality: These layers are locked if the LOCKED buttons are // pressed. Otherwise, they are momentary toggles @@ -225,7 +225,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - + // Layer switches with sound case K_GAMES: if (record->event.pressed) { @@ -546,7 +546,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { |*-----LAYER CHANGE-----*| \*----------------------*/ -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { state = layer_state_set_keymap (state); #ifdef RGBLIGHT_ENABLE @@ -554,4 +554,4 @@ uint32_t layer_state_set_user(uint32_t state) { rgblight_change( biton32(state) ); #endif return state; -} \ No newline at end of file +} diff --git a/users/romus/rules.mk b/users/romus/rules.mk index 12bbabb02..32a5ab092 100644 --- a/users/romus/rules.mk +++ b/users/romus/rules.mk @@ -10,14 +10,12 @@ ifndef BLUETOOTH_ENABLE BLUETOOTH_ENABLE = no # No bluetooth endif COMMAND_ENABLE = no # Some bootmagic thing i dont use -BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite CONSOLE_ENABLE = no # Allows console output with a command SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. NKRO_ENABLE = no # Default is 6KRO which is plenty MIDI_ENABLE = no # Untested feature KEY_LOCK_ENABLE = no # Allows locking any key. Not used -API_SYSEX_ENABLE = no # Allows OS to send signals. - # Disabling this makes it compile, i dont know why # VARIABLE_TRACE = no # Allows debugging variables diff --git a/users/sethBarberee/sethBarberee.c b/users/sethBarberee/sethBarberee.c index 536f3f921..c5fceee68 100644 --- a/users/sethBarberee/sethBarberee.c +++ b/users/sethBarberee/sethBarberee.c @@ -58,7 +58,7 @@ void keyboard_post_init_user(void) __attribute__((weak)) void suspend_power_down_keymap(void) {} void suspend_power_down_user(void) { -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE oled_off(); #endif suspend_power_down_keymap(); diff --git a/users/sigul/sigul.c b/users/sigul/sigul.c index 0995ca736..16bcd411d 100644 --- a/users/sigul/sigul.c +++ b/users/sigul/sigul.c @@ -40,13 +40,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case IT_APDQ: if (record->event.pressed){ if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ - register_code16(IT_DQOT); + register_code16(IT_DQUO); } else { - register_code16(IT_APOS); + register_code16(IT_QUOT); } } else { - unregister_code16(IT_DQOT); - unregister_code16(IT_APOS); + unregister_code16(IT_DQUO); + unregister_code16(IT_QUOT); } return false; break; @@ -55,13 +55,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed){ if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ unregister_code16(KC_LSFT); - register_code16(IT_LESS); + register_code16(IT_LABK); register_code16(KC_LSFT); } else { register_code16(IT_COMM); } } else { - unregister_code16(IT_LESS); + unregister_code16(IT_LABK); unregister_code16(IT_COMM); } return false; @@ -70,12 +70,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case IT_DTMR: if (record->event.pressed){ if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ - register_code16(IT_MORE); + register_code16(IT_RABK); } else { register_code16(IT_DOT); } } else { - unregister_code16(IT_MORE); + unregister_code16(IT_RABK); unregister_code16(IT_DOT); } return false; @@ -84,12 +84,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case IT_SLQS: if (record->event.pressed){ if (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)){ - register_code16(IT_QST); + register_code16(IT_QUES); } else { register_code16(IT_SLSH); } } else { - unregister_code16(IT_QST); + unregister_code16(IT_QUES); unregister_code16(IT_SLSH); } return false; diff --git a/users/sigul/sigul.h b/users/sigul/sigul.h index 6adc67063..8f806017c 100644 --- a/users/sigul/sigul.h +++ b/users/sigul/sigul.h @@ -15,10 +15,10 @@ enum userspace_layers { enum userspace_custom_keycodes { QWERTY = SAFE_RANGE, // custom keycodes for an Italian ANSI layout with accented vowels - IT_CMLS, // IT_COMM and IT_LESS when combined with shift - IT_DTMR, // IT_DOT and IT_MORE when combined with shift - IT_SLQS, // IT_SLSH and IT_QST when combined with shift - IT_APDQ, // IT_APO and IT_DQOT when combined with shift + IT_CMLS, // IT_COMM and IT_LABK when combined with shift + IT_DTMR, // IT_DOT and IT_RABK when combined with shift + IT_SLQS, // IT_SLSH and IT_QUES when combined with shift + IT_APDQ, // IT_APO and IT_DQUO when combined with shift IT_SCCL, // IT_SMCL and IT_COLN when combined with shift SECRET0, SECRET1, diff --git a/users/snowe/oled_setup.c b/users/snowe/oled_setup.c index b3e04df45..3d21ea9f0 100644 --- a/users/snowe/oled_setup.c +++ b/users/snowe/oled_setup.c @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include QMK_KEYBOARD_H # include "quantum.h" @@ -138,4 +138,4 @@ void oled_task_user(void) { } } -#endif // OLED_DRIVER_ENABLE +#endif // OLED_ENABLE diff --git a/users/snowe/oled_setup.h b/users/snowe/oled_setup.h index 031ce6bd0..7281dcd76 100644 --- a/users/snowe/oled_setup.h +++ b/users/snowe/oled_setup.h @@ -18,7 +18,7 @@ #pragma once #include "quantum.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include "oled_driver.h" # define OLED_RENDER_WPM_COUNTER " WPM: " #endif @@ -27,4 +27,4 @@ #endif #ifdef OCEAN_DREAM_ENABLE # include "ocean_dream.h" -#endif \ No newline at end of file +#endif diff --git a/users/snowe/readme_ocean_dream.md b/users/snowe/readme_ocean_dream.md index ca15dd47c..688afc899 100644 --- a/users/snowe/readme_ocean_dream.md +++ b/users/snowe/readme_ocean_dream.md @@ -41,7 +41,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ``` 4. In your `rules.mk` to make it easier to turn the animation on/off, add ```makefile -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) #... your code here... ifdef OCEAN_DREAM_ENABLE @@ -59,7 +59,8 @@ endif You're done! Now you can enable **Ocean Dream** by simply turning on the OLED feature ```makefile -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ``` And if you want to disable it without turning off the OLED Driver you can simply set diff --git a/users/snowe/rules.mk b/users/snowe/rules.mk index a6e152c1c..f188c9022 100644 --- a/users/snowe/rules.mk +++ b/users/snowe/rules.mk @@ -1,6 +1,6 @@ -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) SRC += oled_setup.c ifdef OCEAN_DREAM_ENABLE diff --git a/users/snowe/snowe.h b/users/snowe/snowe.h index 4453b2646..21764ca50 100644 --- a/users/snowe/snowe.h +++ b/users/snowe/snowe.h @@ -35,7 +35,7 @@ along with this program. If not, see . //#if defined(RGB_MATRIX_ENABLE) //# include "rgb_matrix_stuff.h" //#endif -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE # include "oled_setup.h" #endif diff --git a/users/spacebarracecar/spacebarracecar.c b/users/spacebarracecar/spacebarracecar.c index bbd864aa9..3141b8758 100644 --- a/users/spacebarracecar/spacebarracecar.c +++ b/users/spacebarracecar/spacebarracecar.c @@ -178,11 +178,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; case CU_AE: - UML(DE_AE) + UML(DE_ADIA) case CU_OE: - UML(DE_OE) + UML(DE_ODIA) case CU_UE: - UML(DE_UE) + UML(DE_UDIA) case CU_SS: if(record->event.pressed) { timer_timeout(); @@ -291,9 +291,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; case CU_COMM: - SHIFT_NO(DE_COMM, DE_LESS) + SHIFT_NO(DE_COMM, DE_LABK) case CU_DOT: - SHIFT_NORM(DE_DOT, DE_LESS) + SHIFT_NORM(DE_DOT, DE_LABK) case CU_SLSH: SHIFT_ALL(DE_7, DE_SS) case CU_SCLN: @@ -315,7 +315,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case CU_RBRC: SHIFT_ALGR(DE_9, DE_0) case CU_BSLS: - SHIFT_ALGR(DE_SS, DE_LESS) + SHIFT_ALGR(DE_SS, DE_LABK) case CU_Z: CTRL(DE_Z, KC_Z) case CU_Y: diff --git a/users/spidey3/config.h b/users/spidey3/config.h index 7062fde03..f5f5e07f0 100644 --- a/users/spidey3/config.h +++ b/users/spidey3/config.h @@ -1,7 +1,7 @@ #pragma once -#define LED_DISABLE_WHEN_USB_SUSPENDED true -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define LED_DISABLE_WHEN_USB_SUSPENDED +#define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGBLIGHT_LAYERS #define RGBLIGHT_MAX_LAYERS 17 #define RGBLIGHT_LAYER_BLINK diff --git a/users/spidey3/rules.mk b/users/spidey3/rules.mk index bd378f545..69327038b 100644 --- a/users/spidey3/rules.mk +++ b/users/spidey3/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite CONSOLE_ENABLE = yes # Console for debug BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality LTO_ENABLE = yes diff --git a/users/spotpuff/rules.mk b/users/spotpuff/rules.mk index 279054837..7b4abdbc1 100644 --- a/users/spotpuff/rules.mk +++ b/users/spotpuff/rules.mk @@ -1 +1 @@ -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite diff --git a/users/stanrc85/layer_rgb.c b/users/stanrc85/layer_rgb.c index 58f17489a..6d57198f3 100644 --- a/users/stanrc85/layer_rgb.c +++ b/users/stanrc85/layer_rgb.c @@ -4,7 +4,7 @@ void matrix_init_user(void) { rgblight_setrgb(0xFF, 0x00, 0x00); }; -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { switch (biton32(state)) { case 0: rgblight_setrgb (0xFF, 0x00, 0x00); diff --git a/users/talljoe/rules.mk b/users/talljoe/rules.mk index 42ffb411a..632e725b7 100644 --- a/users/talljoe/rules.mk +++ b/users/talljoe/rules.mk @@ -13,4 +13,4 @@ TAP_DANCE_ENABLE=yes CONSOLE_ENABLE=no COMMAND_ENABLE=no DYNAMIC_KEYMAP_ENABLE=no -BOOTMAGIC_ENABLE=full +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite diff --git a/users/talljoe/talljoe.h b/users/talljoe/talljoe.h index f151bde68..cdb01a974 100644 --- a/users/talljoe/talljoe.h +++ b/users/talljoe/talljoe.h @@ -92,6 +92,7 @@ enum layers { #define MLT_E LT(_NUM, KC_E) #ifndef SWAP_HANDS_ENABLE +#undef SH_T #define SH_T #endif diff --git a/users/tominabox1/config.h b/users/tominabox1/config.h index 2a8c1e943..004f58ab5 100644 --- a/users/tominabox1/config.h +++ b/users/tominabox1/config.h @@ -31,7 +31,7 @@ // RGB_Matrix settings #ifdef RGB_MATRIX_ENABLE #define RGB_MATRIX_KEYPRESSES // reacts to keypresses - #define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended + #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash. #define RGB_MATRIX_HUE_STEP 8 diff --git a/users/tominabox1/rules.mk b/users/tominabox1/rules.mk index 22b6a858f..160dcce7b 100644 --- a/users/tominabox1/rules.mk +++ b/users/tominabox1/rules.mk @@ -5,13 +5,14 @@ CONSOLE_ENABLE = no TAP_DANCE_ENABLE = yes NKRO_ENABLE = yes -BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite ifeq ($(strip $(KEYBOARD)), crkbd/rev1) RGB_MATRIX_ENABLE = yes EXTRAFLAGS += -flto BOOTLOADER = qmk-dfu -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 endif ifeq ($(strip $(KEYBOARD)), lazydesigners/dimple) diff --git a/users/tominabox1/tominabox1.c b/users/tominabox1/tominabox1.c index d2e9e1258..e48959be9 100644 --- a/users/tominabox1/tominabox1.c +++ b/users/tominabox1/tominabox1.c @@ -126,7 +126,7 @@ layer_state_t layer_state_set_keymap (layer_state_t state) { return state; } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); switch (biton32(state)) { case _LOWER: @@ -172,10 +172,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif if (record->event.pressed) { - #ifdef OLED_DRIVER_ENABLE + #ifdef OLED_ENABLE oled_timer = timer_read(); oled_on(); - #endif // OLED_DRIVER_ENABLE + #endif // OLED_ENABLE switch (keycode) { case KC_BBB: if (record->event.pressed) { @@ -193,7 +193,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef KEYBOARD_crkbd_rev1 -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE 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, diff --git a/users/turbomech/backupturbomech.c b/users/turbomech/backupturbomech.c index 2815aa452..aaea05df9 100644 --- a/users/turbomech/backupturbomech.c +++ b/users/turbomech/backupturbomech.c @@ -296,7 +296,7 @@ case RGB_MODE_GRADIENT: } -uint32_t layer_state_set_user(uint32_t state) { +layer_state_t layer_state_set_user(layer_state_t state) { #ifdef RGBLIGHT_ENABLE uint8_t default_layer = eeconfig_read_default_layer(); if (rgb_layer_change) { diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c index b6a4e5cfa..47996110b 100644 --- a/users/xulkal/process_records.c +++ b/users/xulkal/process_records.c @@ -6,7 +6,7 @@ #endif #ifdef TRILAYER_ENABLED -uint32_t layer_state_set_user(uint32_t state) +layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); } diff --git a/users/xulkal/rules.mk b/users/xulkal/rules.mk index 8f8365ea7..7094191f2 100644 --- a/users/xulkal/rules.mk +++ b/users/xulkal/rules.mk @@ -27,6 +27,6 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) SRC += custom_rgb.c endif -ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) +ifeq ($(strip $(OLED_ENABLE)), yes) SRC += custom_oled.c endif diff --git a/users/yanfali/rules.mk b/users/yanfali/rules.mk index 467adceef..631dda4fb 100644 --- a/users/yanfali/rules.mk +++ b/users/yanfali/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite DYNAMIC_KEYMAP_ENABLE = no LTO_ENABLE = yes AUDIO_ENABLE = no diff --git a/util/new_keyboard.sh b/util/new_keyboard.sh index d0db23bb4..62e8cb9e1 100755 --- a/util/new_keyboard.sh +++ b/util/new_keyboard.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # This script generates a new keyboard directory under keyboards/, -# and copies the template files from quantum/template/ into it. +# and copies the template files from data/templates/ into it. # Print an error message with the word "ERROR" in red. echo_error() { @@ -35,11 +35,11 @@ copy_templates() { mkdir -p "$keyboard_dir" echo -n "Copying base template files..." - cp -r "quantum/template/base/." "${keyboard_dir}" + cp -r "data/templates/base/." "${keyboard_dir}" echo " done" echo -n "Copying $keyboard_type template files..." - cp -r "quantum/template/${keyboard_type}/." "${keyboard_dir}" + cp -r "data/templates/${keyboard_type}/." "${keyboard_dir}" echo " done" echo -n "Renaming keyboard files..." @@ -129,6 +129,12 @@ if [ ! -d "quantum" ]; then exit 1 fi +echo_bold "########################################" +echo_bold "# NOTICE #" +echo_bold "# This script has been deprecated. #" +echo_bold "# Please use qmk new-keyboard instead. #" +echo_bold "########################################" +echo echo_bold "Generating a new QMK keyboard directory" echo diff --git a/nix/poetry.lock b/util/nix/poetry.lock similarity index 100% rename from nix/poetry.lock rename to util/nix/poetry.lock diff --git a/nix/pyproject.toml b/util/nix/pyproject.toml similarity index 100% rename from nix/pyproject.toml rename to util/nix/pyproject.toml diff --git a/nix/sources.json b/util/nix/sources.json similarity index 100% rename from nix/sources.json rename to util/nix/sources.json diff --git a/nix/sources.nix b/util/nix/sources.nix similarity index 100% rename from nix/sources.nix rename to util/nix/sources.nix diff --git a/quantum/tools/eeprom_reset.hex b/util/reset.eep similarity index 100% rename from quantum/tools/eeprom_reset.hex rename to util/reset.eep diff --git a/util/stm32eeprom_parser.py b/util/stm32eeprom_parser.py new file mode 100755 index 000000000..b124f713d --- /dev/null +++ b/util/stm32eeprom_parser.py @@ -0,0 +1,317 @@ +#!/usr/bin/env python +# +# Copyright 2021 Don Kjer +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +from __future__ import print_function + +import argparse +from struct import pack, unpack +import os, sys + +MAGIC_FEEA = '\xea\xff\xfe\xff' + +MAGIC_FEE9 = '\x16\x01' +EMPTY_WORD = '\xff\xff' +WORD_ENCODING = 0x8000 +VALUE_NEXT = 0x6000 +VALUE_RESERVED = 0x4000 +VALUE_ENCODED = 0x2000 +BYTE_RANGE = 0x80 + +CHUNK_SIZE = 1024 + +STRUCT_FMTS = { + 1: 'B', + 2: 'H', + 4: 'I' +} +PRINTABLE='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~ ' + +EECONFIG_V1 = [ + ("MAGIC", 0, 2), + ("DEBUG", 2, 1), + ("DEFAULT_LAYER", 3, 1), + ("KEYMAP", 4, 1), + ("MOUSEKEY_ACCEL", 5, 1), + ("BACKLIGHT", 6, 1), + ("AUDIO", 7, 1), + ("RGBLIGHT", 8, 4), + ("UNICODEMODE", 12, 1), + ("STENOMODE", 13, 1), + ("HANDEDNESS", 14, 1), + ("KEYBOARD", 15, 4), + ("USER", 19, 4), + ("VELOCIKEY", 23, 1), + ("HAPTIC", 24, 4), + ("MATRIX", 28, 4), + ("MATRIX_EXTENDED", 32, 2), + ("KEYMAP_UPPER_BYTE", 34, 1), +] +VIABASE_V1 = 35 + +VERBOSE = False + +def parseArgs(): + parser = argparse.ArgumentParser(description='Decode an STM32 emulated eeprom dump') + parser.add_argument('-s', '--size', type=int, + help='Size of the emulated eeprom (default: input_size / 2)') + parser.add_argument('-o', '--output', help='File to write decoded eeprom to') + parser.add_argument('-y', '--layout-options-size', type=int, + help='VIA layout options size (default: 1)', default=1) + parser.add_argument('-t', '--custom-config-size', type=int, + help='VIA custom config size (default: 0)', default=0) + parser.add_argument('-l', '--layers', type=int, + help='VIA keyboard layers (default: 4)', default=4) + parser.add_argument('-r', '--rows', type=int, help='VIA matrix rows') + parser.add_argument('-c', '--cols', type=int, help='VIA matrix columns') + parser.add_argument('-m', '--macros', type=int, + help='VIA macro count (default: 16)', default=16) + parser.add_argument('-C', '--canonical', action='store_true', + help='Canonical hex+ASCII display.') + parser.add_argument('-v', '--verbose', action='store_true', help='Verbose output') + parser.add_argument('input', help='Raw contents of the STM32 flash area used to emulate eeprom') + return parser.parse_args() + + +def decodeEepromFEEA(in_file, size): + decoded=size*[None] + pos = 0 + while True: + chunk = in_file.read(CHUNK_SIZE) + for i in range(0, len(chunk), 2): + decoded[pos] = unpack('B', chunk[i])[0] + pos += 1 + if pos >= size: + break + + if len(chunk) < CHUNK_SIZE or pos >= size: + break + return decoded + +def decodeEepromFEE9(in_file, size): + decoded=size*[None] + pos = 0 + # Read compacted flash + while True: + read_size = min(size - pos, CHUNK_SIZE) + chunk = in_file.read(read_size) + for i in range(len(chunk)): + decoded[pos] = unpack('B', chunk[i])[0] ^ 0xFF + pos += 1 + if pos >= size: + break + + if len(chunk) < read_size or pos >= size: + break + if VERBOSE: + print("COMPACTED EEPROM:") + dumpBinary(decoded, True) + print("WRITE LOG:") + # Read write log + while True: + entry = in_file.read(2) + if len(entry) < 2: + print("Partial log address at position 0x%04x" % pos, file=sys.stderr) + break + pos += 2 + + if entry == EMPTY_WORD: + break + + be_entry = unpack('>H', entry)[0] + entry = unpack('H', entry)[0] + if not (entry & WORD_ENCODING): + address = entry >> 8 + decoded[address] = entry & 0xFF + if VERBOSE: + print("[0x%04x]: BYTE 0x%02x = 0x%02x" % (be_entry, address, decoded[address])) + else: + if (entry & VALUE_NEXT) == VALUE_NEXT: + # Read next word as value + value = in_file.read(2) + if len(value) < 2: + print("Partial log value at position 0x%04x" % pos, file=sys.stderr) + break + pos += 2 + address = entry & 0x1FFF + address <<= 1 + address += BYTE_RANGE + decoded[address] = unpack('B', value[0])[0] ^ 0xFF + decoded[address+1] = unpack('B', value[1])[0] ^ 0xFF + be_value = unpack('>H', value)[0] + if VERBOSE: + print("[0x%04x 0x%04x]: WORD 0x%04x = 0x%02x%02x" % (be_entry, be_value, address, decoded[address+1], decoded[address])) + else: + # Reserved for future use + if entry & VALUE_RESERVED: + if VERBOSE: + print("[0x%04x]: RESERVED 0x%04x" % (be_entry, address)) + continue + address = entry & 0x1FFF + address <<= 1 + decoded[address] = (entry & VALUE_ENCODED) >> 13 + decoded[address+1] = 0 + if VERBOSE: + print("[0x%04x]: ENCODED 0x%04x = 0x%02x%02x" % (be_entry, address, decoded[address+1], decoded[address])) + + return decoded + +def dumpBinary(data, canonical): + def display(pos, row): + print("%04x" % pos, end='') + for i in range(len(row)): + if i % 8 == 0: + print(" ", end='') + char = row[i] + if char is None: + print(" ", end='') + else: + print(" %02x" % row[i], end='') + if canonical: + print(" |", end='') + for i in range(len(row)): + char = row[i] + if char is None: + char = " " + else: + char = chr(char) + if char not in PRINTABLE: + char = "." + print(char, end='') + print("|", end='') + + print("") + + size = len(data) + empty_rows = 0 + prev_row = '' + first_repeat = True + for pos in range(0, size, 16): + row=data[pos:pos+16] + row[len(row):16] = (16-len(row))*[None] + if row == prev_row: + if first_repeat: + print("*") + first_repeat = False + else: + first_repeat = True + display(pos, row) + prev_row = row + print("%04x" % (pos+16)) + +def dumpEeconfig(data, eeconfig): + print("EECONFIG:") + for (name, pos, length) in eeconfig: + fmt = STRUCT_FMTS[length] + value = unpack(fmt, ''.join([chr(x) for x in data[pos:pos+length]]))[0] + print(("%%04x %%s = 0x%%0%dx" % (length * 2)) % (pos, name, value)) + +def dumpVia(data, base, layers, cols, rows, macros, + layout_options_size, custom_config_size): + magicYear = data[base + 0] + magicMonth = data[base + 1] + magicDay = data[base + 2] + # Sanity check + if not 10 <= magicYear <= 0x99 or \ + not 0 <= magicMonth <= 0x12 or \ + not 0 <= magicDay <= 0x31: + print("ERROR: VIA Signature is not valid; Year:%x, Month:%x, Day:%x" % (magicYear, magicMonth, magicDay)) + return + if cols is None or rows is None: + print("ERROR: VIA dump requires specifying --rows and --cols", file=sys.stderr) + return 2 + print("VIA:") + # Decode magic + print("%04x MAGIC = 20%02x-%02x-%02x" % (base, magicYear, magicMonth, magicDay)) + # Decode layout options + options = 0 + pos = base + 3 + for i in range(base+3, base+3+layout_options_size): + options = options << 8 + options |= data[i] + print(("%%04x LAYOUT_OPTIONS = 0x%%0%dx" % (layout_options_size * 2)) % (pos, options)) + pos += layout_options_size + custom_config_size + # Decode keycodes + keymap_size = layers * rows * cols * 2 + if (pos + keymap_size) >= (len(data) - 1): + print("ERROR: VIA keymap requires %d bytes, but only %d available" % (keymap_size, len(data) - pos)) + return 3 + for layer in range(layers): + print("%s LAYER %d %s" % ('-'*int(cols*2.5), layer, '-'*int(cols*2.5))) + for row in range(rows): + print("%04x | " % pos, end='') + for col in range(cols): + keycode = (data[pos] << 8) | (data[pos+1]) + print(" %04x" % keycode, end='') + pos += 2 + print("") + # Decode macros + for macro_num in range(macros): + macro = "" + macro_pos = pos + while pos < len(data): + char = chr(data[pos]) + pos += 1 + if char == '\x00': + print("%04x MACRO[%d] = '%s'" % (macro_pos, macro_num, macro)) + break + else: + macro += char + return 0 + + +def decodeSTM32Eeprom(input, canonical, size=None, output=None, **kwargs): + input_size = os.path.getsize(input) + if size is None: + size = input_size >> 1 + + # Read the first few bytes to check magic signature + with open(input, 'rb') as in_file: + magic=in_file.read(4) + in_file.seek(0) + + if magic == MAGIC_FEEA: + decoded = decodeEepromFEEA(in_file, size) + eeconfig = EECONFIG_V1 + via_base = VIABASE_V1 + elif magic[:2] == MAGIC_FEE9: + decoded = decodeEepromFEE9(in_file, size) + eeconfig = EECONFIG_V1 + via_base = VIABASE_V1 + else: + print("Unknown magic signature: %s" % " ".join(["0x%02x" % ord(x) for x in magic]), file=sys.stderr) + return 1 + + if output is not None: + with open(output, 'wb') as out_file: + out_file.write(pack('%dB' % len(decoded), *decoded)) + print("DECODED EEPROM:") + dumpBinary(decoded, canonical) + dumpEeconfig(decoded, eeconfig) + if kwargs['rows'] is not None and kwargs['cols'] is not None: + return dumpVia(decoded, via_base, **kwargs) + + return 0 + +def main(): + global VERBOSE + kwargs = vars(parseArgs()) + VERBOSE = kwargs.pop('verbose') + return decodeSTM32Eeprom(**kwargs) + +if __name__ == '__main__': + sys.exit(main()) diff --git a/util/udev/50-qmk.rules b/util/udev/50-qmk.rules index 679fe4ced..db27d4dc8 100644 --- a/util/udev/50-qmk.rules +++ b/util/udev/50-qmk.rules @@ -63,3 +63,9 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="0037", TAG+="uacc # hid_listen KERNEL=="hidraw*", MODE="0660", GROUP="plugdev", TAG+="uaccess", TAG+="udev-acl" + +# hid bootloaders +## QMK HID +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2067", TAG+="uaccess" +## PJRC's HalfKay +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="0478", TAG+="uaccess" diff --git a/util/update_chibios_mirror.sh b/util/update_chibios_mirror.sh new file mode 100755 index 000000000..d4593a843 --- /dev/null +++ b/util/update_chibios_mirror.sh @@ -0,0 +1,83 @@ +#!/bin/bash + +################################ +# Configuration + +# The ChibiOS branches to mirror +chibios_branches="trunk stable_20.3.x stable_21.6.x" + +# The ChibiOS tags to mirror +chibios_tags="ver20.3.1 ver20.3.2 ver20.3.3 ver21.6.0" + +# The ChibiOS-Contrib branches to mirror +contrib_branches="master chibios-20.3.x" + +################################ +# Actions + +set -eEuo pipefail +umask 022 + +this_script="$(realpath "${BASH_SOURCE[0]}")" +script_dir="$(realpath "$(dirname "$this_script")")" +qmk_firmware_dir="$(realpath "$script_dir/../")" +chibios_dir="$qmk_firmware_dir/lib/chibios" +contrib_dir="$qmk_firmware_dir/lib/chibios-contrib" + +chibios_git_location=$(realpath "$chibios_dir/$(cat "$chibios_dir/.git" | awk '/gitdir:/ {print $2}')") +chibios_git_config=$(realpath "$chibios_git_location/config") +contrib_git_location=$(realpath "$contrib_dir/$(cat "$contrib_dir/.git" | awk '/gitdir:/ {print $2}')") +contrib_git_config=$(realpath "$contrib_git_location/config") + +cd "$chibios_dir" + +if [[ -z "$(cat "$chibios_git_config" | grep '\[svn-remote "svn"\]')" ]] ; then + git svn init --stdlayout --prefix='svn/' http://svn.osdn.net/svnroot/chibios/ +fi + +if [[ -z "$(cat "$chibios_git_config" | grep '\[remote "qmk"\]')" ]] ; then + git remote add qmk git@github.com:qmk/ChibiOS.git + git remote set-url qmk git@github.com:qmk/ChibiOS.git --push +fi + +echo "Updating remotes..." +git fetch --all --tags --prune + +echo "Fetching latest from subversion..." +git svn fetch + +echo "Updating ChibiOS branches..." +for branch in $chibios_branches ; do + echo "Creating branch 'svn-mirror/$branch' from 'svn/$branch'..." + git branch -f svn-mirror/$branch svn/$branch \ + && git push qmk svn-mirror/$branch +done + +echo "Updating ChibiOS tags..." +for tagname in $chibios_tags ; do + echo "Creating tag 'svn-mirror/$tagname' from 'svn/tags/$tagname'..." + GIT_COMMITTER_DATE="$(git log -n1 --pretty=format:'%ad' svn/tags/$tagname)" git tag -f -a -m "Tagging $tagname" svn-mirror/$tagname svn/tags/$tagname + git push qmk svn-mirror/$tagname +done + +cd "$contrib_dir" + +if [[ -z "$(cat "$contrib_git_config" | grep '\[remote "qmk"\]')" ]] ; then + git remote add qmk git@github.com:qmk/ChibiOS-Contrib.git + git remote set-url qmk git@github.com:qmk/ChibiOS-Contrib.git --push +fi + +if [[ -z "$(cat "$contrib_git_config" | grep '\[remote "upstream"\]')" ]] ; then + git remote add upstream git@github.com:ChibiOS/ChibiOS-Contrib.git + git remote set-url upstream git@github.com:ChibiOS/ChibiOS-Contrib.git --push +fi + +echo "Updating remotes..." +git fetch --all --tags --prune + +echo "Updating ChibiOS-Contrib branches..." +for branch in $contrib_branches ; do + echo "Creating branch 'mirror/$branch' from 'upstream/$branch'..." + git branch -f mirror/$branch upstream/$branch \ + && git push qmk mirror/$branch +done